├── zxp-tools ├── .gitignore ├── selfWT.p12 └── ZXPSignCmd.exe ├── .gitignore ├── BloksAIPlugin ├── Mac │ └── release │ │ └── BloksAIPlugin.aip │ │ └── Contents │ │ ├── PkgInfo │ │ ├── MacOS │ │ └── BloksAIPlugin │ │ ├── Resources │ │ ├── BloksAIPlugin.rsrc │ │ ├── AIPluginDebug.xcconfig │ │ ├── AIPluginRelease.xcconfig │ │ └── AIPluginCommon.xcconfig │ │ └── Info.plist ├── Vendor │ ├── common │ │ ├── win │ │ │ ├── PluginMain.def │ │ │ ├── pragma.h │ │ │ └── VersionInfo.rc │ │ ├── mac │ │ │ ├── AIPluginDebug.xcconfig │ │ │ ├── AIPluginRelease.xcconfig │ │ │ ├── Info.plist │ │ │ ├── AIPluginCommon.xcconfig │ │ │ └── Plugin.r │ │ ├── source │ │ │ ├── IllustratorSDK.cpp │ │ │ ├── FlashUIController.cpp │ │ │ ├── HtmlUIController.cpp │ │ │ ├── AppContext.cpp │ │ │ ├── SDKErrors.cpp │ │ │ └── legacy │ │ │ │ └── About.cpp │ │ └── includes │ │ │ ├── IllustratorSDKRelease.pch │ │ │ ├── IllustratorSDKDebug.pch │ │ │ ├── AppContext.hpp │ │ │ ├── PluginStd.h │ │ │ ├── legacy │ │ │ ├── About.h │ │ │ ├── reportError.h │ │ │ └── stringUtils.h │ │ │ ├── pragma.h │ │ │ ├── ArtMatcher.hpp │ │ │ ├── CASFault.hpp │ │ │ ├── FlashUIController.h │ │ │ ├── HtmlUIController.h │ │ │ ├── Suites.hpp │ │ │ ├── SDKDef.h │ │ │ └── IllustratorSDK.h │ ├── illustratorapi │ │ ├── pica_sp │ │ │ ├── SPPiPL.h │ │ │ ├── SPAdapts.h │ │ │ ├── SPHeaderEnd.h │ │ │ ├── SPHeaderBegin.h │ │ │ ├── SPErrors.h │ │ │ ├── SPSTSPrp.h │ │ │ ├── SPConfig.h │ │ │ └── SPMData.h │ │ ├── illustrator │ │ │ ├── AILayer.h │ │ │ ├── AIMask.h │ │ │ ├── AIUID.h │ │ │ ├── AIRaster.h │ │ │ ├── AIArtStyle.h │ │ │ ├── AIGradient.h │ │ │ ├── AIPreference.h │ │ │ ├── AIRealMath.h │ │ │ ├── AISwatchList.h │ │ │ ├── AIActionManager.h │ │ │ ├── SloTextdomTypes.h │ │ │ ├── AICSXS.h │ │ │ ├── IAIRepeat.hpp │ │ │ ├── config │ │ │ │ ├── AIConfig.h │ │ │ │ ├── compiler │ │ │ │ │ ├── AIConfigMSVC.h │ │ │ │ │ └── AIConfigClang.h │ │ │ │ └── AIAssertConfig.h │ │ │ ├── AIBasicUtilities.h │ │ │ ├── IAIRefAutoSuite.cpp │ │ │ ├── IAIRepeat.cpp │ │ │ ├── AIWinDef.h │ │ │ ├── AIExternDef.h │ │ │ ├── AILiveEditConstants.h │ │ │ ├── AITIFFKeys.h │ │ │ ├── AIGlobalUnicodeString.h │ │ │ ├── IAIStringUtils.h │ │ │ ├── AIAssertion.h │ │ │ ├── AIPragma.h │ │ │ ├── ASPragma.h │ │ │ ├── AIEraserTool.h │ │ │ ├── AIPSDKeys.h │ │ │ ├── IAIColorSpace.inl │ │ │ ├── IAIUUID.h │ │ │ ├── AICMS.h │ │ │ ├── IASTypes.hpp │ │ │ ├── AIURL.h │ │ │ ├── actions │ │ │ │ ├── AITracingAction.h │ │ │ │ └── AILivePaintAction.h │ │ │ ├── AIPlacedTypes.h │ │ │ ├── IAIGlobalUnicodeString.cpp │ │ │ ├── AIHeaderEnd.h │ │ │ ├── IAIAutoBuffer.cpp │ │ │ ├── AIScriptMessage.h │ │ │ ├── AIDeviceInfo.h │ │ │ ├── AIHeaderBegin.h │ │ │ ├── AIAssert.cpp │ │ │ ├── AIModalParent.h │ │ │ ├── AIRasterExport.h │ │ │ ├── AIApplication.h │ │ │ ├── AISFWUtilities.h │ │ │ ├── AIAutoCoordinateSystem.h │ │ │ ├── AIDynamicSymbol.h │ │ │ ├── AILimits.h │ │ │ ├── AIBasicTypes.h │ │ │ ├── IAILiveEdit.h │ │ │ └── AIStringPool.h │ │ └── ate │ │ │ ├── IThrowException.cpp │ │ │ ├── IThrowException.h │ │ │ ├── ATEException.h │ │ │ ├── slotextdomtypes │ │ │ └── SloTextdomTypes.h │ │ │ └── legacy │ │ │ ├── ATE25TextSuitesDeclare.h │ │ │ ├── ATE25TextSuitesExtern.h │ │ │ └── ATE25TextSuitesImportHelper.h │ └── tools │ │ └── pipl │ │ ├── pipl_gen │ │ ├── __init__.pyc │ │ ├── pipl_gen.pyc │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-310.pyc │ │ │ └── pipl_gen.cpython-310.pyc │ │ ├── __init__.py │ │ └── template_plugin.json │ │ └── create_pipl.py ├── Release │ └── BloksAIPlugin.aip ├── BloksAIPlugin │ ├── BloksAIPlugin.rc │ ├── BloksAIPlugin.r │ ├── plugin.pipl │ ├── BloksAIPluginID.h │ ├── BloksAIPluginSuites.h │ ├── resource.h │ ├── BloksAIPluginSuites.cpp │ ├── BloksAIPlugin.h │ └── BloksAIPlugin.vcxproj.filters ├── x64 │ └── Release │ │ └── BloksAIPlugin.aip ├── .gitignore └── BloksAIPlugin.sln ├── feature.png ├── icons ├── iconDisabled.png ├── iconNormal.png ├── iconRollover.png ├── iconDarkNormal.png ├── iconDarkRollover.png ├── plugin.ai ├── buttons.ai └── getstarted.ai ├── .gitattributes ├── jsx └── ts │ ├── shim │ └── myshims.js │ ├── test │ ├── blok-container-layout-one-deep.ai │ ├── blok-container-layout-strokes.ai │ ├── blok-container-layout-two-deep.ai │ ├── blok-container-layout-nested-groups.ai │ ├── blok-container-layout-one-deep-3.ai │ ├── blok-container-layout-two-deep-alt.ai │ ├── blok-container-layout-nested-groups-alt.ai │ ├── blok-container-layout-one-deep-textframearea.ai │ ├── assert.ts │ └── test-framework.ts │ ├── typings │ ├── illustrator.d.ts │ └── noderequire.d.ts │ ├── blok-user-settings.ts │ ├── blok-container-user-settings.ts │ ├── css.ts │ ├── utils.ts │ └── rect.ts ├── tsconfig.json ├── sample-files ├── grid.ai ├── BloksTutorial.ai ├── simple-list.ai └── variable-list.ai ├── package.json ├── .debug ├── LICENSE ├── README.md ├── CSXS └── manifest.xml └── css └── styles.css /zxp-tools/.gitignore: -------------------------------------------------------------------------------- 1 | certificate-creds.json 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | todo.txt 2 | *.jsx 3 | 4 | /node_modules/ 5 | /release/ -------------------------------------------------------------------------------- /BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | ARPIART5 -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/win/PluginMain.def: -------------------------------------------------------------------------------- 1 | EXPORTS PluginMain 2 | -------------------------------------------------------------------------------- /feature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/feature.png -------------------------------------------------------------------------------- /icons/iconDisabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/icons/iconDisabled.png -------------------------------------------------------------------------------- /icons/iconNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/icons/iconNormal.png -------------------------------------------------------------------------------- /icons/iconRollover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/icons/iconRollover.png -------------------------------------------------------------------------------- /zxp-tools/selfWT.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/zxp-tools/selfWT.p12 -------------------------------------------------------------------------------- /icons/iconDarkNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/icons/iconDarkNormal.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.ai filter=lfs diff=lfs merge=lfs -text 2 | *.exe filter=lfs diff=lfs merge=lfs -text 3 | -------------------------------------------------------------------------------- /icons/iconDarkRollover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/icons/iconDarkRollover.png -------------------------------------------------------------------------------- /BloksAIPlugin/Release/BloksAIPlugin.aip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Release/BloksAIPlugin.aip -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.rc -------------------------------------------------------------------------------- /BloksAIPlugin/x64/Release/BloksAIPlugin.aip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/x64/Release/BloksAIPlugin.aip -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.r: -------------------------------------------------------------------------------- 1 | #define PIPL_PLUGIN_NAME "BloksAIPlugin" 2 | #include "BloksAIPluginID.h" 3 | #include 4 | -------------------------------------------------------------------------------- /jsx/ts/shim/myshims.js: -------------------------------------------------------------------------------- 1 | Array.prototype.forEach = function(cb) { 2 | for (var i = 0; i < this.length; i++) { 3 | cb(this[i]); 4 | } 5 | }; -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/plugin.pipl: -------------------------------------------------------------------------------- 1 | ADBEivrsADBEwx86PluginMainADBEkindSPEAADBEpinmBloksAIPlugin -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPiPL.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPiPL.h -------------------------------------------------------------------------------- /icons/plugin.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:60d7059d132ab4d1656c488c015008a03f5fb0991234cd62fea47947ed0c8465 3 | size 175960 4 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "noImplicitAny": false, 5 | "target": "es3" 6 | } 7 | } -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAdapts.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAdapts.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.pyc -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.pyc -------------------------------------------------------------------------------- /icons/buttons.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f6384f08c285c621a0c1dca9229bea93976f7dc4c3914e5f379fb44b585966c8 3 | size 415186 4 | -------------------------------------------------------------------------------- /icons/getstarted.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:38a283a7c6ea72c6add7c606d743c5da97cb880c253a52b4698ffb57ae7e0539 3 | size 177411 4 | -------------------------------------------------------------------------------- /sample-files/grid.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:40fdbeea0c7cc4fdd84b15fd8f9efcc4e72b6af2486a4850d2a9bda2707eff19 3 | size 394285 4 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayer.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMask.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMask.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUID.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUID.h -------------------------------------------------------------------------------- /zxp-tools/ZXPSignCmd.exe: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fd734fb1f6c2e9dab4cab27e619410d114573f73d5cfcba298eb9abbae1b5650 3 | size 4834816 4 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRaster.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRaster.h -------------------------------------------------------------------------------- /sample-files/BloksTutorial.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8203349a02b9cc3ddef70cc59f0560d8641550e1b32f22710e94ca15943ef73c 3 | size 875252 4 | -------------------------------------------------------------------------------- /sample-files/simple-list.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:459da65d503036d1f568ad658f5f8b2b73c32fcda3da0203915be9d1bf08b1f9 3 | size 620667 4 | -------------------------------------------------------------------------------- /sample-files/variable-list.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4f6667f13ac1f9cfa56117b2c2cefdc3566b97d68b0a20faef85d79d00794fc3 3 | size 610443 4 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyle.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyle.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGradient.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGradient.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreference.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreference.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealMath.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealMath.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchList.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchList.h -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIActionManager.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIActionManager.h -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-one-deep.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c4ff17c9fe90ba6f4f842ea0133a442ee0c7035347271c73779e7ff026a0ef4b 3 | size 355415 4 | -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-strokes.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5c0373bcfd55759c8929a6e686bab054a04476f0e36640db671490e1894a357d 3 | size 365064 4 | -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-two-deep.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2a250444f6869e741930b00d84040f56999aec41bb7d6efde6367f4c458d8716 3 | size 356093 4 | -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-nested-groups.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a14ab9937bc2cd2da87f97bef1dd910d1c465903cfaa0e9e8d4d84041e9e1445 3 | size 356618 4 | -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-one-deep-3.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ac603773e4e6cde5aaa1585979f34cf6aca238c88d1d9faf43da219442005b8a 3 | size 356084 4 | -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-two-deep-alt.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bcb11ec42e57811453582658fd5ea68cb5b81581dedfa04d6ad2e08de31c1ab3 3 | size 358003 4 | -------------------------------------------------------------------------------- /BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/MacOS/BloksAIPlugin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/MacOS/BloksAIPlugin -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-nested-groups-alt.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d10d83c070955c045c9828d8e258a68f3b542f44e436af23bcf8fbe8917c7544 3 | size 357603 4 | -------------------------------------------------------------------------------- /jsx/ts/test/blok-container-layout-one-deep-textframearea.ai: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:24c2701f4a1fd88b47a83956b1f1e355872d4c2124ffc178afedbde879888c7a 3 | size 360535 4 | -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/BloksAIPluginID.h: -------------------------------------------------------------------------------- 1 | #ifndef __BloksAIPluginID_H__ 2 | #define __BloksAIPluginID_H__ 3 | 4 | #define kBloksAIPluginName "BloksAIPlugin" 5 | 6 | #endif // End BloksAIPluginID.h 7 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/pipl_gen.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/pipl_gen.cpython-310.pyc -------------------------------------------------------------------------------- /BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/BloksAIPlugin.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WestonThayer/Bloks/HEAD/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/BloksAIPlugin.rsrc -------------------------------------------------------------------------------- /jsx/ts/typings/illustrator.d.ts: -------------------------------------------------------------------------------- 1 | declare var app: any; 2 | declare var $: any; // $.writeln() for logging 3 | declare var SaveOptions: any; 4 | declare var ElementPlacement: any; 5 | declare var ExternalObject: any; 6 | declare var CSXSEvent: any; 7 | declare var ZOrderMethod: any; 8 | declare var TextType: any; 9 | declare var Transformation: any; -------------------------------------------------------------------------------- /jsx/ts/blok-user-settings.ts: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /** 4 | * A simple, serializable container for what the user 5 | * can set on a Blok. 6 | */ 7 | class BlokUserSettings { 8 | public flex: number; 9 | public alignSelf: number; 10 | 11 | constructor() { 12 | // Leave everything as undefined 13 | } 14 | } 15 | 16 | export = BlokUserSettings; -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/mac/AIPluginDebug.xcconfig: -------------------------------------------------------------------------------- 1 | AI_CONFIGURATION = debug 2 | DEAD_CODE_STRIPPING = NO 3 | DEBUG_INFORMATION_FORMAT = dwarf 4 | DEPLOYMENT_POSTPROCESSING = NO 5 | GCC_ENABLE_FIX_AND_CONTINUE = YES 6 | GCC_OPTIMIZATION_LEVEL = 0 7 | GCC_SYMBOLS_PRIVATE_EXTERN = YES 8 | LLVM_LTO = NO 9 | SEPARATE_STRIP = NO 10 | STRIP_INSTALLED_PRODUCT = NO 11 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/mac/AIPluginRelease.xcconfig: -------------------------------------------------------------------------------- 1 | AI_CONFIGURATION = release 2 | DEAD_CODE_STRIPPING = YES 3 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 4 | DEPLOYMENT_POSTPROCESSING = YES 5 | GCC_ENABLE_FIX_AND_CONTINUE = NO 6 | GCC_OPTIMIZATION_LEVEL = z 7 | GCC_SYMBOLS_PRIVATE_EXTERN = NO 8 | LLVM_LTO = YES 9 | SEPARATE_STRIP = YES 10 | STRIP_INSTALLED_PRODUCT = YES 11 | -------------------------------------------------------------------------------- /BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginDebug.xcconfig: -------------------------------------------------------------------------------- 1 | AI_CONFIGURATION = debug 2 | DEAD_CODE_STRIPPING = NO 3 | DEBUG_INFORMATION_FORMAT = dwarf 4 | DEPLOYMENT_POSTPROCESSING = NO 5 | GCC_ENABLE_FIX_AND_CONTINUE = YES 6 | GCC_OPTIMIZATION_LEVEL = 0 7 | GCC_SYMBOLS_PRIVATE_EXTERN = YES 8 | LLVM_LTO = NO 9 | SEPARATE_STRIP = NO 10 | STRIP_INSTALLED_PRODUCT = NO 11 | -------------------------------------------------------------------------------- /BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginRelease.xcconfig: -------------------------------------------------------------------------------- 1 | AI_CONFIGURATION = release 2 | DEAD_CODE_STRIPPING = YES 3 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 4 | DEPLOYMENT_POSTPROCESSING = YES 5 | GCC_ENABLE_FIX_AND_CONTINUE = NO 6 | GCC_OPTIMIZATION_LEVEL = z 7 | GCC_SYMBOLS_PRIVATE_EXTERN = NO 8 | LLVM_LTO = YES 9 | SEPARATE_STRIP = YES 10 | STRIP_INSTALLED_PRODUCT = YES 11 | -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.h: -------------------------------------------------------------------------------- 1 | #ifndef __BloksAIPluginSuites_H__ 2 | #define __BloksAIPluginSuites_H__ 3 | 4 | #include "IllustratorSDK.h" 5 | #include "Suites.hpp" 6 | #include "AIStringFormatUtils.h" 7 | 8 | // AI suite headers 9 | 10 | // Suite externs 11 | extern "C" SPBlocksSuite *sSPBlocks; 12 | extern "C" AIUnicodeStringSuite* sAIUnicodeString; 13 | extern "C" AIStringFormatUtilsSuite* sAIStringFormatUtils; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /jsx/ts/typings/noderequire.d.ts: -------------------------------------------------------------------------------- 1 | // All we need from node is the module system. Copied from 2 | // https://github.com/borisyankov/DefinitelyTyped/blob/master/node/node.d.ts 3 | 4 | interface NodeRequireFunction { 5 | (id: string): any; 6 | } 7 | 8 | interface NodeRequire extends NodeRequireFunction { 9 | resolve(id:string): string; 10 | cache: any; 11 | extensions: any; 12 | main: any; 13 | } 14 | 15 | declare var require: NodeRequire; -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by BloksAIPlugin.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /BloksAIPlugin/.gitignore: -------------------------------------------------------------------------------- 1 | *.opensdf 2 | *.sdf 3 | *.aps 4 | *.user 5 | 6 | /BloksAIPlugin.VC.db 7 | /BloksAIPlugin.VC.VC.opendb 8 | 9 | /.vs/ 10 | /BloksAIPlugin/x64/ 11 | /BloksAIPlugin/Release/ 12 | 13 | /x64/Debug/ 14 | /Debug/ 15 | 16 | /x64/Release/* 17 | !/x64/Release/BloksAIPlugin.aip 18 | 19 | /Release/* 20 | !/Release/BloksAIPlugin.aip 21 | 22 | # Xcode specific 23 | /BloksAIPlugin.build/ 24 | /output/ 25 | /BloksAIPlugin.xcodeproj/* 26 | !/BloksAIPlugin.xcodeproj/project.pbxproj 27 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2018 Adobe Systems, Inc. 3 | # All rights reserved. 4 | # 5 | # FILENAME: pipl_gen.py 6 | # 7 | # FUNCTION: pipl generator 8 | # 9 | # SYNTAX: N/A 10 | # 11 | # PARAMETERS: N/A 12 | # 13 | # EXAMPLE: N/A 14 | # 15 | # AUTHOR : amisriva 16 | # 17 | ################################################################################## 18 | from .pipl_gen import pipl 19 | from .pipl_gen import generate_multi_pipl_bin 20 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/SloTextdomTypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __SloTextdomTypes___ 2 | #define __SloTextdomTypes___ 3 | 4 | #include "AITypes.h" 5 | 6 | namespace ATETextDOM 7 | { 8 | typedef ai::int32 Int32; 9 | typedef ASUnicode Unicode; 10 | typedef ai::int32 ATETextDomErr; 11 | typedef AIFloat Float; 12 | typedef AIReal Real; 13 | typedef AIFloatMatrix FloatMatrix; 14 | typedef AIRealMatrix RealMatrix; 15 | typedef AIFloatPoint FloatPoint; 16 | typedef AIRealPoint RealPoint; 17 | 18 | } 19 | #endif -------------------------------------------------------------------------------- /jsx/ts/test/assert.ts: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | import Utils = require("../utils"); 4 | 5 | export function isTrue(value: boolean): void { 6 | if (!value) { 7 | throw new Error("Value is not true!"); 8 | } 9 | } 10 | 11 | export function areEqual(one: any, two: any): void { 12 | if (typeof one === "number" && typeof two === "number") { 13 | if (!Utils.nearlyEqual(one, two)) { 14 | throw new Error(one + " is not nearly equal to " + two); 15 | } 16 | } 17 | else if (one !== two) { 18 | throw new Error(one + " is not equal to " + two); 19 | } 20 | } -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.cpp: -------------------------------------------------------------------------------- 1 | #include "IllustratorSDK.h" 2 | #include "BloksAIPluginSuites.h" 3 | 4 | // Suite externs 5 | extern "C" 6 | { 7 | SPBlocksSuite* sSPBlocks = NULL; 8 | AIUnicodeStringSuite* sAIUnicodeString = NULL; 9 | AIStringFormatUtilsSuite* sAIStringFormatUtils = NULL; 10 | } 11 | 12 | // Import suites 13 | ImportSuite gImportSuites[] = 14 | { 15 | kSPBlocksSuite, kSPBlocksSuiteVersion, &sSPBlocks, 16 | kAIUnicodeStringSuite, kAIUnicodeStringVersion, &sAIUnicodeString, 17 | kAIStringFormatUtilsSuite, kAIStringFormatUtilsSuiteVersion, &sAIStringFormatUtils, 18 | nullptr, 0, nullptr 19 | }; 20 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/source/IllustratorSDK.cpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #include "IllustratorSDK.h" 17 | -------------------------------------------------------------------------------- /jsx/ts/blok-container-user-settings.ts: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | import BlokUserSettings = require("./blok-user-settings"); 4 | import Css = require("./css"); 5 | 6 | /** 7 | * A simple, serializable container for what the user 8 | * can set on a BlokContainer. 9 | */ 10 | class BlokContainerUserSettings extends BlokUserSettings { 11 | public flexDirection: number; 12 | public justifyContent: number; 13 | public alignItems: number; 14 | public flexWrap: number; 15 | 16 | constructor() { 17 | super(); 18 | 19 | this.flexDirection = Css.FlexDirections.ROW; 20 | this.justifyContent = Css.Justifications.FLEX_START; 21 | this.alignItems = Css.Alignments.FLEX_START; 22 | this.flexWrap = Css.FlexWraps.NOWRAP; 23 | } 24 | } 25 | 26 | export = BlokContainerUserSettings; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.westonthayer.bloks", 3 | "private": true, 4 | "version": "1.0.0", 5 | "description": "Bloks for AI", 6 | "main": "index.js", 7 | "scripts": { 8 | "build-jsx": "gulp build-jsx", 9 | "build-jsx-tests": "browserify jsx/ts/test/blok-container-layout.ts -p [ tsify ] > jsx/ts/test/blok-container-layout.jsx", 10 | "zxp": "gulp zxp" 11 | }, 12 | "author": "Weston Thayer ", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "JSON2": "^0.1.0", 16 | "browserify": "^11.2.0", 17 | "css-layout": "^1.0.0", 18 | "del": "^2.2.0", 19 | "gulp": "^3.9.1", 20 | "gulp-shell": "^0.5.2", 21 | "gulp-util": "^3.0.7", 22 | "through2": "^2.0.1", 23 | "tsify": "^0.12.2", 24 | "vinyl-buffer": "^1.0.0", 25 | "vinyl-source-stream": "^1.1.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/IllustratorSDKRelease.pch: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | // Release configuration prefix header for pre-compiled headers on Macintosh 17 | 18 | #include "PluginStd.h" 19 | #include "IllustratorSDK.h" 20 | 21 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXS.h: -------------------------------------------------------------------------------- 1 | #ifndef _AICSXS_H_ 2 | #define _AICSXS_H_ 3 | /* 4 | * Name: AICSXS.h 5 | * Date: Started 2010 6 | * Purpose: Adobe Illustrator CSXS Header. 7 | * 8 | * ADOBE SYSTEMS INCORPORATED 9 | * Copyright 2009 Adobe Systems Incorporated. 10 | * All rights reserved. 11 | * 12 | * NOTICE: Adobe permits you to use, modify, and distribute this file 13 | * in accordance with the terms of the Adobe license agreement 14 | * accompanying it. If you have received this file from a source other 15 | * than Adobe, then your use, modification, or distribution of it 16 | * requires the prior written permission of Adobe. 17 | * 18 | */ 19 | 20 | /** @ingroup Notifiers 21 | Sent after CSXS PlugPlug setup completion. 22 | */ 23 | #define kAICSXSPlugPlugSetupCompleteNotifier "AI CSXS PlugPlug Setup Complete" 24 | 25 | #endif //_AICSXS_H_ 26 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/IllustratorSDKDebug.pch: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | // Debug configuration prefix header for pre-compiled headers on Macintosh 17 | 18 | /* Turn on debugging */ 19 | #define DEBUG 1 20 | #define _DEBUG 1 21 | #include "PluginStd.h" 22 | #include "IllustratorSDK.h" 23 | 24 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * ADOBE CONFIDENTIAL 3 | * ___________________ 4 | * 5 | * Copyright 2020 Adobe 6 | * All Rights Reserved. 7 | * 8 | * NOTICE: All information contained herein is, and remains 9 | * the property of Adobe and its suppliers, if any. The intellectual 10 | * and technical concepts contained herein are proprietary to Adobe 11 | * and its suppliers and are protected by all applicable intellectual 12 | * property laws, including trade secret and copyright laws. 13 | * Dissemination of this information or reproduction of this material 14 | * is strictly forbidden unless prior written permission is obtained 15 | * from Adobe. 16 | **************************************************************************/ 17 | 18 | #pragma once 19 | 20 | namespace ai 21 | { 22 | namespace RepeatArtUtils 23 | { 24 | bool IsRepeatArt(short type); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/win/pragma.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #pragma warning (disable: 4290) // C++ exception specification ignored except 17 | // to indicate a function is not __declspec(nothrow) 18 | 19 | #pragma warning (disable: 4800) // Ignore "'AIBool8' : forcing value to bool 'true' or 20 | // 'false' (performance warning)" warning 21 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/tools/pipl/pipl_gen/template_plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind" : { 3 | "vendor": "ADBE", 4 | "value":"SPEA", 5 | "comment":"Only change vendor property, do not change value property" 6 | }, 7 | "ivrs" : { 8 | "vendor": "ADBE", 9 | "value": 2, 10 | "comment":"Only change vendor property, do not change value property" 11 | }, 12 | "mac" : { 13 | "mi32" : { 14 | "vendor": "ADBE", 15 | "value": "", 16 | "comment": "MacOnly, Change Vendor, set value to your plugin's entry point name, or pass name in API" 17 | } 18 | }, 19 | "win" : { 20 | "wx86" : { 21 | "vendor": "ADBE", 22 | "value": "", 23 | "comment": "WinOnly, Change Vendor, set value to your plugin's entry point name, or pass name in API" 24 | } 25 | }, 26 | "pinm" : { 27 | "vendor": "ADBE", 28 | "value":"Sample Plugin", 29 | "comment":"Change Vendor, change Sample Plugin to your plugin name, or pass name in API" 30 | }, 31 | "StsP" : { 32 | "vendor": "ADBE" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/AppContext.hpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef __AppContext_hpp__ 17 | #define __AppContext_hpp__ 18 | 19 | #ifndef __SPAccess__ 20 | #include "SPAccess.h" 21 | #endif 22 | 23 | class AppContext 24 | { 25 | protected: 26 | void *fAppContext; 27 | 28 | public: 29 | AppContext(SPPluginRef plugin); 30 | ~AppContext(); 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIConfig.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | #include "../ASConfig.h" 20 | 21 | #if defined(MAC_ENV) 22 | #include "./compiler/AIConfigClang.h" 23 | 24 | #elif defined(WIN_ENV) 25 | #include "./compiler/AIConfigMSVC.h" 26 | 27 | #elif defined(LINUX_ENV) 28 | #include "./compiler/AIConfigClang.h" 29 | 30 | #else 31 | #error "Platform not supported or configured" 32 | 33 | #endif // MAC_ENV 34 | -------------------------------------------------------------------------------- /.debug: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicUtilities.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: AIBasicUtilities.h 3 | * $Revision: 1 $ 4 | * Author: 5 | * 6 | * ADOBE SYSTEMS INCORPORATED 7 | * Copyright 2008 Adobe Systems Incorporated 8 | * All rights reserved. 9 | * 10 | * NOTICE: Adobe permits you to use, modify, and distribute this file 11 | * in accordance with the terms of the Adobe license agreement 12 | * accompanying it. If you have received this file from a source other 13 | * than Adobe, then your use, modification, or distribution of it 14 | * requires the prior written permission of Adobe. 15 | * 16 | */ 17 | 18 | #ifndef __AIBasicUtilities__ 19 | #define __AIBasicUtilities__ 20 | 21 | namespace ai 22 | { 23 | template 24 | inline const T& Min ( const T& obj1, const T& obj2 ) 25 | { 26 | return obj1 < obj2 ? obj1 : obj2; 27 | } 28 | 29 | template 30 | inline const T& Max ( const T& obj1, const T& obj2 ) 31 | { 32 | return obj1 > obj2 ? obj1 : obj2; 33 | } 34 | } 35 | 36 | #endif //__AIBasicUtilities__ -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.cpp: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------- 2 | 3 | Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. 4 | 5 | NOTICE: Adobe permits you to use, modify, and distribute this file 6 | in accordance with the terms of the Adobe license agreement accompanying 7 | it. If you have received this file from a source other than Adobe, then 8 | your use, modification, or distribution of it requires the prior written 9 | permission of Adobe. 10 | 11 | ---------------------------------------------------------------------------------- 12 | 13 | File: IThrowException.cpp 14 | 15 | Notes: Include this file in your plugin project, or write your own custom file. 16 | 17 | ---------------------------------------------------------------------------------- */ 18 | #include "IThrowException.h" 19 | #include "ATEException.h" 20 | 21 | namespace ATE 22 | { 23 | 24 | void Throw_ATE_Exception (ATEErr err) 25 | { 26 | throw Exception(err); 27 | } 28 | 29 | } // namespace ATE 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------- 2 | 3 | Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. 4 | 5 | NOTICE: Adobe permits you to use, modify, and distribute this file 6 | in accordance with the terms of the Adobe license agreement accompanying 7 | it. If you have received this file from a source other than Adobe, then 8 | your use, modification, or distribution of it requires the prior written 9 | permission of Adobe. 10 | 11 | ---------------------------------------------------------------------------------- 12 | 13 | File: IThrowException.h 14 | 15 | Notes: define the exception method. 16 | 17 | ---------------------------------------------------------------------------------- */ 18 | #ifndef __IThrowException__ 19 | #define __IThrowException__ 20 | 21 | #include "ATETypes.h" 22 | #include "ATETypesDef.h" 23 | 24 | namespace ATE 25 | { 26 | 27 | void Throw_ATE_Exception (ATEErr err); 28 | 29 | } // namespace ATE 30 | 31 | #endif //__IThrowException__ 32 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/PluginStd.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | // Common prefix header for Macintosh 17 | 18 | //This let's us use p2cstr, c2pstr, C2PStr, and P2CStr. 19 | //These functions have been deprecated. We'll hopefully remove this in the future. 20 | //dmaclach 21 | #define OLDP2C 1 22 | 23 | // Let things know we're working on the Mac side 24 | #define MAC_ENV 1 25 | 26 | #ifndef macintosh 27 | #define macintosh 1 28 | #endif 29 | 30 | #define Platform_Carbon 1 31 | 32 | -------------------------------------------------------------------------------- /jsx/ts/test/test-framework.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | "use strict"; 4 | 5 | /** 6 | * Open the given file in Illustrator from the given relative path. 7 | * 8 | * @param fileName - the name of a file, with extension, relative to the executing script 9 | */ 10 | function open(fileName: string): void { 11 | // Awkwardly have to cast since File is already defined in lib.d.ts, but Illustrator 12 | // overrides it 13 | let F: any = File; 14 | 15 | let thisFile = new F($.fileName); 16 | let folder = thisFile.parent; 17 | 18 | app.open(new F(folder + "/" + fileName)); 19 | } 20 | 21 | 22 | /** 23 | * Open the specified file and run the test function. Will alert if passing. The document 24 | * will be closed without saving. 25 | * 26 | * @param fileName - the name of a file, with extension, relative to the executing script 27 | * @param test - a function to run 28 | */ 29 | export function run(fileName: string, test: any): void { 30 | open(fileName); 31 | test(); 32 | 33 | if (confirm("Passed! Close the document?")) { 34 | app.activeDocument.close(SaveOptions.DONOTSAVECHANGES); 35 | } 36 | } -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/legacy/About.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | 17 | #include "SPInterf.h" 18 | 19 | 20 | /**----------------------------------------------------------------------------- 21 | ** 22 | ** Types 23 | ** 24 | **/ 25 | 26 | 27 | #define kBadSelectionErr '!sel' 28 | 29 | 30 | /**----------------------------------------------------------------------------- 31 | ** 32 | ** Functions 33 | ** 34 | **/ 35 | typedef AIErr FXErr; 36 | 37 | extern AIErr goAbout( SPInterfaceMessage *message ); 38 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/pragma.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #pragma warning (disable: 4290) // C++ exception specification ignored except 17 | // to indicate a function is not __declspec(nothrow) 18 | 19 | #pragma warning (disable: 4800) // Ignore "'AIBool8' : forcing value to bool 'true' or 20 | // 'false' (performance warning)" warning 21 | 22 | #pragma warning (disable: 4996) // Disable warning for deprecation of sprintf, strncpy etc. 23 | // which are still used in C++ framework files from core. 24 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRefAutoSuite.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: IAIRefAutoSuite.cpp 3 | * $Revision: 1 $ 4 | * Author: dmaclach 5 | * Date: Thursday, March 25, 2004 11:26:12 6 | * Purpose: 7 | * 8 | * ADOBE SYSTEMS INCORPORATED 9 | * Copyright 1986-2007 Adobe Systems Incorporated. 10 | * All rights reserved. 11 | * 12 | * NOTICE: Adobe permits you to use, modify, and distribute this file 13 | * in accordance with the terms of the Adobe license agreement 14 | * accompanying it. If you have received this file from a source other 15 | * than Adobe, then your use, modification, or distribution of it 16 | * requires the prior written permission of Adobe. 17 | * 18 | */ 19 | 20 | /** @file IAIRefAutoSuite.cpp*/ 21 | #define AICOUNTEDOBJECTSUITE_DEFINED 1 22 | #include "IAIRef.h" 23 | #include "AutoSuite.h" 24 | 25 | use_suite_required(AICountedObject) 26 | 27 | /** 28 | This implements the GetAICountedObjectSuitePtr for autosuited AICountedObjectSuites. 29 | */ 30 | 31 | AICountedObjectSuite *ai::GetAICountedObjectSuitePtr() 32 | { 33 | return const_cast(sAICountedObject.operator->()); 34 | } 35 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * ADOBE CONFIDENTIAL 3 | * ___________________ 4 | * 5 | * Copyright 2020 Adobe 6 | * All Rights Reserved. 7 | * 8 | * NOTICE: All information contained herein is, and remains 9 | * the property of Adobe and its suppliers, if any. The intellectual 10 | * and technical concepts contained herein are proprietary to Adobe 11 | * and its suppliers and are protected by all applicable intellectual 12 | * property laws, including trade secret and copyright laws. 13 | * Dissemination of this information or reproduction of this material 14 | * is strictly forbidden unless prior written permission is obtained 15 | * from Adobe. 16 | **************************************************************************/ 17 | 18 | #include "IAIRepeat.hpp" 19 | #include "AIArt.h" 20 | 21 | namespace ai 22 | { 23 | namespace RepeatArtUtils 24 | { 25 | bool IsRepeatArt(short type) 26 | { 27 | return (type == kRadialRepeatArt 28 | || type == kGridRepeatArt 29 | || type == kSymmetryArt 30 | || type == kConcentricRepeatArt); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderEnd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: SPHeaderEnd.h 3 | * $Revision: 1 $ 4 | * Author: 5 | * Date: 6 | * Purpose: 7 | * 8 | * ADOBE SYSTEMS INCORPORATED 9 | * Copyright 1986-2012 Adobe Systems Incorporated. 10 | * All rights reserved. 11 | * 12 | * NOTICE: Adobe permits you to use, modify, and distribute this file 13 | * in accordance with the terms of the Adobe license agreement 14 | * accompanying it. If you have received this file from a source other 15 | * than Adobe, then your use, modification, or distribution of it 16 | * requires the prior written permission of Adobe. 17 | * 18 | */ 19 | 20 | #if !defined(__SPHeaderBegin_H__) 21 | #error You need to include SPHeaderBegin before this file 22 | #endif 23 | 24 | #undef __SPHeaderBegin_H__ 25 | 26 | #ifdef MAC_ENV 27 | #pragma options align=reset 28 | #if defined (__MWERKS__) 29 | //GCC doesn't allow non int enums without using an attribute decl directly on 30 | //the enum, so no need to set it 31 | #pragma enumsalwaysint reset 32 | #endif 33 | #endif 34 | 35 | #ifdef WIN_ENV 36 | #pragma pack(pop) 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWinDef.h: -------------------------------------------------------------------------------- 1 | #ifndef __AIWinDef__ 2 | #define __AIWinDef__ 3 | 4 | /* 5 | * Name: AIWinDef.h 6 | * Date: Started 2010 7 | * 8 | * ADOBE SYSTEMS INCORPORATED 9 | * Copyright 2010 Adobe Systems Incorporated. 10 | * All rights reserved. 11 | * 12 | * NOTICE: Adobe permits you to use, modify, and distribute this file 13 | * in accordance with the terms of the Adobe license agreement 14 | * accompanying it. If you have received this file from a source other 15 | * than Adobe, then your use, modification, or distribution of it 16 | * requires the prior written permission of Adobe. 17 | * 18 | */ 19 | 20 | #ifdef WIN_ENV 21 | #ifndef _INC_WINDOWS // if windows.h is not included 22 | 23 | // A way to declare handle similar to how Windows does it 24 | #define DECLARE_AI_WINDOWS_HANDLE(name) struct name##__; typedef struct name##__ *name 25 | 26 | // Declare handles that we are interested in 27 | DECLARE_AI_WINDOWS_HANDLE(HDC); 28 | DECLARE_AI_WINDOWS_HANDLE(HINSTANCE); 29 | DECLARE_AI_WINDOWS_HANDLE(HFONT); 30 | DECLARE_AI_WINDOWS_HANDLE(HWND); 31 | 32 | #undef DECLARE_AI_WINDOWS_HANDLE 33 | 34 | #endif // _INC_WINDOWS 35 | #endif // WIN_ENV 36 | 37 | #endif // __AIWinDef__ 38 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/ate/ATEException.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------- 2 | 3 | Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. 4 | 5 | NOTICE: Adobe permits you to use, modify, and distribute this file 6 | in accordance with the terms of the Adobe license agreement accompanying 7 | it. If you have received this file from a source other than Adobe, then 8 | your use, modification, or distribution of it requires the prior written 9 | permission of Adobe. 10 | 11 | ---------------------------------------------------------------------------------- 12 | 13 | File: Exception.h 14 | 15 | Notes: define ATE exception class. 16 | 17 | ---------------------------------------------------------------------------------- */ 18 | #ifndef __Exception__ 19 | #define __Exception__ 20 | #include 21 | #include "ATETypes.h" //for error values. 22 | 23 | namespace ATE 24 | { 25 | 26 | class Exception : public std::exception 27 | { 28 | public: 29 | Exception(ATEErr errorCode) 30 | :error(errorCode) 31 | { 32 | } 33 | // error code 34 | ATEErr error; 35 | }; 36 | 37 | 38 | }// namespace ATE 39 | 40 | #endif //__Exception__ 41 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/ate/slotextdomtypes/SloTextdomTypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __SloTextdomTypes___ 2 | #define __SloTextdomTypes___ 3 | 4 | // error codes 5 | #define kNoErr 0 6 | #define kOutOfMemoryErr '!MEM' 7 | #define kBadParameterErr 'PARM' 8 | #define kNotImplementedErr '!IMP' 9 | #define kCantHappenErr 'CANT' 10 | 11 | namespace ATETextDOM 12 | { 13 | 14 | #ifdef WINDOWS 15 | typedef __int32 Int32; 16 | #endif 17 | 18 | #if defined(MACINTOSH) || IOS || defined(WEB) 19 | typedef int32_t Int32; 20 | #endif 21 | 22 | #ifdef WINDOWS 23 | typedef __int32 ATETextDomErr; 24 | #endif 25 | #if defined(MACINTOSH) || IOS || defined(WEB) 26 | typedef int32_t ATETextDomErr; 27 | #endif 28 | 29 | typedef unsigned short Unicode; 30 | 31 | typedef float Float; 32 | typedef double Real; 33 | 34 | typedef struct _t_FloatMatrix { 35 | Float a, b, c, d, tx, ty; 36 | } FloatMatrix; 37 | 38 | typedef struct _t_FloatPoint { 39 | Float h, v; 40 | } FloatPoint; 41 | 42 | typedef struct _t_RealMatrix { 43 | Real a, b, c, d, tx, ty; 44 | } RealMatrix; 45 | 46 | typedef struct _t_RealPoint { 47 | Real h, v; 48 | } RealPoint; 49 | 50 | } // namespace ATETextDOM 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesDeclare.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------- 2 | 3 | Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. 4 | 5 | NOTICE: Adobe permits you to use, modify, and distribute this file 6 | in accordance with the terms of the Adobe license agreement accompanying 7 | it. If you have received this file from a source other than Adobe, then 8 | your use, modification, or distribution of it requires the prior written 9 | permission of Adobe. 10 | 11 | ---------------------------------------------------------------------------------- 12 | 13 | File: ATE25TextSuitesDeclare.h 14 | 15 | Notes: Machine Generated file from script version 1.45 16 | Please don't modify manually! 17 | 18 | ---------------------------------------------------------------------------------- */ 19 | 20 | #include "ATETextSuitesDeclare.h" 21 | 22 | // ATE 2.5 Suites 23 | DECLARE_ATE_AUTOSUITE(ATE25DocumentTextResources) 24 | DECLARE_ATE_AUTOSUITE(ATE25TextFrame) 25 | DECLARE_ATE_AUTOSUITE(ATE25CharFeatures) 26 | DECLARE_ATE_AUTOSUITE(ATE25CharInspector) 27 | DECLARE_ATE_AUTOSUITE(ATE25Find) 28 | DECLARE_ATE_AUTOSUITE(ATE25ParaFeatures) 29 | DECLARE_ATE_AUTOSUITE(ATE25ParaInspector) 30 | DECLARE_ATE_AUTOSUITE(ATE25Spell) -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/source/FlashUIController.cpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File: //ai/ai16/devtech/sdk/public/samplecode/common/source/FlashUIController.cpp $ 4 | // 5 | // $Revision: #1 $ 6 | // 7 | // Copyright 2011 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #include "IllustratorSDK.h" 17 | #include "FlashUIController.h" 18 | 19 | FlashUIController::FlashUIController(const char* extensionId) 20 | : fExtensionId(extensionId) 21 | { 22 | fPPLib.Load(sAIFolders); 23 | } 24 | 25 | FlashUIController::~FlashUIController(void) 26 | { 27 | fPPLib.Unload(); 28 | } 29 | 30 | PlugPlugErrorCode FlashUIController::LoadExtension() 31 | { 32 | return fPPLib.LoadExtension(fExtensionId); 33 | } 34 | 35 | PlugPlugErrorCode FlashUIController::UnloadExtension() 36 | { 37 | return fPPLib.UnloadExtension(fExtensionId); 38 | } 39 | -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BloksAIPlugin", "BloksAIPlugin\BloksAIPlugin.vcxproj", "{7A544664-F702-4E4A-ACB6-5F33F3040056}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Debug|x64.ActiveCfg = Debug|x64 17 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Debug|x64.Build.0 = Debug|x64 18 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Debug|x86.ActiveCfg = Debug|Win32 19 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Debug|x86.Build.0 = Debug|Win32 20 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Release|x64.ActiveCfg = Release|x64 21 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Release|x64.Build.0 = Release|x64 22 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Release|x86.ActiveCfg = Release|Win32 23 | {7A544664-F702-4E4A-ACB6-5F33F3040056}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/source/HtmlUIController.cpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File: //ai/ai16/devtech/sdk/public/samplecode/common/source/HtmlUIController.cpp $ 4 | // 5 | // $Revision: #1 $ 6 | // 7 | // Copyright 2011 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #include "IllustratorSDK.h" 17 | #include "HtmlUIController.h" 18 | 19 | HtmlUIController::HtmlUIController(const char* extensionId) 20 | : htmlExtensionId(extensionId) 21 | { 22 | htmlPPLib.Load(sAIFolders); 23 | } 24 | 25 | HtmlUIController::~HtmlUIController(void) 26 | { 27 | htmlPPLib.Unload(); 28 | } 29 | 30 | PlugPlugErrorCode HtmlUIController::LoadExtension() 31 | { 32 | return htmlPPLib.LoadExtension(htmlExtensionId); 33 | } 34 | 35 | PlugPlugErrorCode HtmlUIController::UnloadExtension() 36 | { 37 | return htmlPPLib.UnloadExtension(htmlExtensionId); 38 | } 39 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/legacy/reportError.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #include "SPInterf.h" 17 | 18 | 19 | /**----------------------------------------------------------------------------- 20 | ** 21 | ** Types 22 | ** 23 | **/ 24 | 25 | 26 | #define kBadSelectionErr '!sel' 27 | 28 | 29 | /**----------------------------------------------------------------------------- 30 | ** 31 | ** Functions 32 | ** 33 | **/ 34 | //typedef AIErr FXErr; 35 | 36 | // string stuff 37 | extern void AIErrToCString( AIErr error_to_report, char *errorText ); 38 | extern void CStringToAIErr( char *errorText, AIErr *error_to_report ); 39 | 40 | // ui stuff 41 | extern void report_error( SPInterfaceMessage *message, AIErr error_to_report ); 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bloks 2 | 3 | A UX for flexbox layout within Illustrator. [Read the blog post](http://westonthayer.com/writing/2016/07/27/layout-experiments-in-adobe-illustrator/). 4 | 5 | ![Feature img](https://raw.githubusercontent.com/WestonThayer/Bloks/master/feature.png) 6 | 7 | ## Installation 8 | 9 | v0.2.0+ Requires **Illustrator 2022** 10 | 11 | 1. [Download latest bloks.zip](https://github.com/wcork/Bloks/releases/download/v0.2.1/bloks-v0.2.1.zip) 12 | 2. Unzip 13 | 3. Copy the `com.westonthayer.bloks` folder to 14 | 1. Windows: `C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\` 15 | 2. Mac: `/Library/Application Support/Adobe/CEP/extensions/` 16 | 4. Copy the native plugin to 17 | 1. Windows (x86): copy `WIN_32\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator 2022\Plug-ins\` 18 | 2. Windows (x64): copy `WIN_64\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator 2022\Plug-ins\` 19 | 3. Mac: copy `Mac/BloksAIPlugin.aip` to `/Applications/Adobe Illustrator 2022/Plug-ins/` 20 | 21 | Finder/File Explorer may ask you for adminsitrator permission to copy to those folders. To uninstall, simply delete the files you copied. 22 | 23 | Get started by opening a document in Illustrator and going to *Window > Extensions > Bloks*. Select two or more objects to create a BlokGroup. 24 | 25 | ## Tutorial 26 | 27 | For a quick introduction to how Bloks works, open `samples/BloksTutorial.ai`. 28 | -------------------------------------------------------------------------------- /jsx/ts/css.ts: -------------------------------------------------------------------------------- 1 | "use strict" 2 | 3 | /** 4 | * Converts from UPPERCASE_ENUM_NAME to uppercase-enum-name. 5 | * 6 | * @param value - ex: MyEnum[MyEnum.VALUE_ONE] 7 | * @returns ex: value-one 8 | */ 9 | export function enumStringToCssString(value: string): string { 10 | return value.toLowerCase().replace("_", "-"); 11 | } 12 | 13 | /** 14 | * Converts from lowercase-enum-name to LOWERCASE_ENUM_NAME. 15 | * @param value - ex: lowercase-enum-name 16 | * @returns ex: LOWERCASE_ENUM_NAME 17 | */ 18 | export function cssStringToEnumString(value: string): string { 19 | return value.replace("-", "_").toUpperCase(); 20 | } 21 | 22 | /** CSS flexbox alignment values */ 23 | export enum Alignments { 24 | FLEX_START, 25 | CENTER, 26 | FLEX_END, 27 | STRETCH, 28 | } 29 | 30 | /** CSS flexbox flex-direction. We only support row and column for simplicity. */ 31 | export enum FlexDirections { 32 | ROW, 33 | COLUMN, 34 | } 35 | 36 | /** 37 | * CSS justify-content. We only support flex-start and space-between. 38 | * Other options wouldn't make sense for Illustrator since they require the idea 39 | * of a container that can be larger than it's contents (padding). Illustrator 40 | * doesn't know how to draw the UI handles for that. 41 | */ 42 | export enum Justifications { 43 | FLEX_START, 44 | SPACE_BETWEEN, 45 | } 46 | 47 | /** CSS flex-wrap. We don't support wrap-reverse. */ 48 | export enum FlexWraps { 49 | NOWRAP, 50 | WRAP, 51 | } -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExternDef.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // ADOBE CONFIDENTIAL 4 | // 5 | // File: PluginCommon.hpp 6 | // Author: Angad Gupta 7 | // DateTime: 07-June-2021 8 | // Change: Macros to maching c/c++ externs. 9 | // 10 | // Copyright 2021 Adobe Systems Incorporated 11 | // All Rights Reserved. 12 | // 13 | // NOTICE: All information contained herein is, and remains 14 | // the property of Adobe Systems Incorporated and its suppliers, 15 | // if any. The intellectual and technical concepts contained 16 | // herein are proprietary to Adobe Systems Incorporated and its 17 | // suppliers and are protected by trade secret or copyright law. 18 | // Dissemination of this information or reproduction of this material 19 | // is strictly forbidden unless prior written permission is obtained 20 | // from Adobe Systems Incorporated. 21 | // 22 | //======================================================================================== 23 | 24 | #pragma once 25 | 26 | #if defined(STATIC_LINKED_PLUGIN) 27 | #define AI_EXTERN_C_BEGIN 28 | #define AI_EXTERN_C_END 29 | #else 30 | #if defined(__cplusplus) 31 | #define AI_EXTERN_C_BEGIN extern "C" { 32 | #define AI_EXTERN_C_END } //extern "C" 33 | #else 34 | #define AI_EXTERN_C_BEGIN 35 | #define AI_EXTERN_C_END 36 | #endif 37 | #endif //!STATIC_LINKED_PLUGIN 38 | 39 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/legacy/stringUtils.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef __PSTRING__ 17 | #define __PSTRING__ 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | unsigned char *SUctopstr( char *s ); 24 | char *SUptocstr( unsigned char *p ); 25 | unsigned char *SUpstrcpy( unsigned char *dst, const unsigned char *src ); 26 | unsigned long SUstrlen(char* s); 27 | 28 | void SUpstrcat( unsigned char *dst, unsigned char *src ); 29 | void SUpstrinsert( unsigned char *dst, unsigned char *src ); 30 | 31 | char *SUsafestrncpy(char *dst, const char *src, int dstsize); 32 | char *SUsafestrncat(char *dst, const char *src, int dstsize); 33 | 34 | void SUpasToPostscriptStr( unsigned char dst, unsigned char src ); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEditConstants.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * ADOBE CONFIDENTIAL 3 | * 4 | * Copyright 2018 Adobe 5 | * All Rights Reserved. 6 | * 7 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 8 | * accordance with the terms of the Adobe license agreement accompanying 9 | * it. If you have received this file from a source other than Adobe, 10 | * then your use, modification, or distribution of it requires the prior 11 | * written permission of Adobe. 12 | *******************************************************************************/ 13 | 14 | #pragma once 15 | 16 | /******************************************************************************* 17 | ** 18 | ** Imports 19 | ** 20 | **/ 21 | 22 | #include "AITypes.h" 23 | 24 | #include "AIHeaderBegin.h" 25 | 26 | /******************************************************************************* 27 | ** 28 | ** Constants 29 | ** 30 | **/ 31 | 32 | 33 | namespace ai 34 | { 35 | namespace LiveEdit 36 | { 37 | 38 | // EPF (event processing frequency) 39 | namespace EPF 40 | { 41 | constexpr AIReal kMinimumLimitValue { 1.0 }; // 1000 ms per event 42 | constexpr AIReal kMaximumLimitValue { 60.0 }; // 1000/60 ms per event 43 | 44 | constexpr AIReal kUseGlobaLimitValue { 0.0 }; // Maps to system default 45 | } 46 | 47 | } 48 | } 49 | 50 | #include "AIHeaderEnd.h" 51 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/source/AppContext.cpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | /* 17 | NOTE: this file was yanked out of the PaintStyle plugin and stuck in the GlobLists 18 | experimental plugin. If this code is ever stuck into the real PlugInDev tree, this 19 | file should be shared with the corresponding file in PaintStyle. 20 | THERE IS NO GLOBLISTS SPECIFIC CODE HERE 21 | */ 22 | 23 | #include "AIContext.h" 24 | #include "AppContext.hpp" 25 | 26 | extern "C" AIAppContextSuite *sAIAppContext; 27 | 28 | AppContext::AppContext(SPPluginRef pluginRef) 29 | { 30 | fAppContext = nullptr; 31 | if (sAIAppContext) 32 | sAIAppContext->PushAppContext(pluginRef, (AIAppContextHandle *)&fAppContext); 33 | } 34 | 35 | AppContext::~AppContext() 36 | { 37 | if (sAIAppContext) 38 | sAIAppContext->PopAppContext((AIAppContextHandle)fAppContext); 39 | } 40 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderBegin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: SPHeaderBegin.h 3 | * $Revision: 1 $ 4 | * Author: 5 | * Date: 6 | * Purpose: 7 | * 8 | * ADOBE SYSTEMS INCORPORATED 9 | * Copyright 1986-2012 Adobe Systems Incorporated. 10 | * All rights reserved. 11 | * 12 | * NOTICE: Adobe permits you to use, modify, and distribute this file 13 | * in accordance with the terms of the Adobe license agreement 14 | * accompanying it. If you have received this file from a source other 15 | * than Adobe, then your use, modification, or distribution of it 16 | * requires the prior written permission of Adobe. 17 | * 18 | */ 19 | 20 | #if defined(__SPHeaderBegin_H__) 21 | #error __SPHeaderBegin_H__ included multiple times in a single file 22 | #endif 23 | 24 | #define __SPHeaderBegin_H__ 1 25 | 26 | #ifndef __ASConfig__ 27 | #include "ASConfig.h" 28 | #endif 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | #ifdef MAC_ENV 35 | //power_gcc on MWERKS is basically equivalent to power on GCC 36 | #if defined (__MWERKS__) 37 | #pragma options align=power_gcc 38 | #pragma enumsalwaysint on 39 | #elif defined (__GNUC__) 40 | //GCC doesn't allow non int enums without using an attribute decl directly on 41 | //the enum, so no need to set it 42 | #pragma options align=power 43 | #endif 44 | #endif 45 | 46 | #if defined(WIN_ENV) 47 | #pragma warning(disable: 4103) // Gets rid of the unbalanced alignment warning. 48 | #pragma pack(push, 8) 49 | #endif 50 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigMSVC.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | #ifdef __cplusplus 20 | 21 | #ifdef _MSC_VER 22 | 23 | #if (_MSC_VER >= 1600) // VC++ 10 (aka 2010) 24 | #define AI_HAS_NULLPTR 25 | #define AI_HAS_STATIC_ASSERT 26 | #define AI_HAS_RVALUE_REFERENCES 27 | #define AI_HAS_LAMBDAS 28 | #endif 29 | 30 | #if (_MSC_FULL_VER >= 180020827) // VC++ 12 (aka 2013) 31 | #define AI_HAS_DELETED_FUNCTIONS 32 | #define AI_HAS_EXPLICIT_CONVERSION_OPERATORS 33 | #endif 34 | 35 | #if (_MSC_FULL_VER >= 190023026) // VC++ 14 (aka 2015) 36 | // NOTE: Even though defaulted functions are supported with VC++ 12, but the use of = default to request 37 | // member-wise move constructors and move assignment operators is not supported. 38 | #define AI_HAS_DEFAULTED_FUNCTIONS 39 | #define AI_HAS_NOEXCEPT 40 | #define AI_HAS_RETURN_TYPE_DEDUCTION 41 | #endif 42 | 43 | #endif // _MSC_VER 44 | 45 | #endif // __cplusplus -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AITIFFKeys.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: AITIFFKeys.h 3 | * Purpose: Adobe Illustrator TIFF Options Dictionary Keys. 4 | * 5 | * ADOBE SYSTEMS INCORPORATED 6 | * Copyright 2014 Adobe Systems Incorporated. 7 | * All rights reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file 10 | * in accordance with the terms of the Adobe license agreement 11 | * accompanying it. If you have received this file from a source other 12 | * than Adobe, then your use, modification, or distribution of it 13 | * requires the prior written permission of Adobe. 14 | * 15 | */ 16 | 17 | 18 | /******************************************************************************* 19 | ** 20 | ** Imports 21 | ** 22 | **/ 23 | 24 | #pragma once 25 | 26 | #include "AIHeaderBegin.h" 27 | 28 | 29 | enum AIAntialiasType:ai::uint8 30 | { 31 | kAIAntialiasNone = 1, 32 | kAIAntialiasArtOptimized, 33 | kAIAntialiasTypeOptimized 34 | }; 35 | /******************************************************************************* 36 | ** 37 | ** Constants 38 | ** 39 | **/ 40 | 41 | /* Use with \c #AIDicionarySuite::SetIntegerEntry. */ 42 | #define kAITIFFColorModelOption "TIFFColorModel" 43 | 44 | /* Use with \c #AIDicionarySuite::SetBooleanEntry. */ 45 | #define kAITIFFLZWCompressionOption "TIFFLZWCompression" 46 | 47 | /* Use with \c #AIDicionarySuite::SetIntegerEntry with reference to enum AIAntialiasType. */ 48 | #define kAITIFFAntiAliasOption "TIFFAntiAlias" 49 | 50 | 51 | #include "AIHeaderEnd.h" 52 | 53 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesExtern.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------- 2 | 3 | Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. 4 | 5 | NOTICE: Adobe permits you to use, modify, and distribute this file 6 | in accordance with the terms of the Adobe license agreement accompanying 7 | it. If you have received this file from a source other than Adobe, then 8 | your use, modification, or distribution of it requires the prior written 9 | permission of Adobe. 10 | 11 | ---------------------------------------------------------------------------------- 12 | 13 | File: ATE25TextSuitesExtern.h 14 | 15 | Notes: Machine Generated file from script version 1.45 16 | Please don't modify manually! 17 | 18 | ---------------------------------------------------------------------------------- */ 19 | #ifndef __ATE25TextSuitesExtern__ 20 | #define __ATE25TextSuitesExtern__ 21 | 22 | #include "ATETextSuitesExtern.h" 23 | 24 | namespace ATE 25 | { 26 | extern "C" ATE25DocumentTextResourcesSuite* sATE25DocumentTextResources; 27 | extern "C" ATE25TextFrameSuite* sATE25TextFrame; 28 | extern "C" ATE25CharFeaturesSuite* sATE25CharFeatures; 29 | extern "C" ATE25CharInspectorSuite* sATE25CharInspector; 30 | extern "C" ATE25FindSuite* sATE25Find; 31 | extern "C" ATE25ParaFeaturesSuite* sATE25ParaFeatures; 32 | extern "C" ATE25ParaInspectorSuite* sATE25ParaInspector; 33 | extern "C" ATE25SpellSuite* sATE25Spell; 34 | }// namespace ATE 35 | #endif //__ATE25TextSuitesExtern__ 36 | 37 | 38 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | $(PRODUCT_NAME) 9 | CFBundleExecutable 10 | $(PRODUCT_NAME) 11 | CFBundleGetInfoHTML 12 | $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString 13 | CFBundleGetInfoString 14 | $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString 15 | CFBundleIdentifier 16 | $(PRODUCT_BUNDLE_IDENTIFIER) 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | $(PRODUCT_NAME) 21 | CFBundlePackageType 22 | ARPI 23 | CFBundleShortVersionString 24 | $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber 25 | CFBundleSignature 26 | ART5 27 | CFBundleVersion 28 | kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGlobalUnicodeString.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | 20 | #include "IAIUnicodeString.h" 21 | 22 | #include "AIHeaderBegin.h" 23 | 24 | 25 | #define kAIGlobalUnicodeStringSuite "AI Global UnicodeString Suite" 26 | #define kAIGlobalUnicodeStringSuiteVersion1 AIAPI_VERSION(1) 27 | #define kAIGlobalUnicodeStringSuiteVersion kAIGlobalUnicodeStringSuiteVersion1 28 | #define kAIGlobalUnicodeStringVersion kAIGlobalUnicodeStringSuiteVersion 29 | 30 | 31 | 32 | /** 33 | @ingroup Suites 34 | @see ai::GlobalUnicodeString defined in IAIGlobalUnicodeString.hpp 35 | */ 36 | struct AIGlobalUnicodeStringSuite 37 | { 38 | /** 39 | Adds an ai::UnicodeString in the global pool and returns a permanent pointer to stored string. 40 | The lifetime of this pointer is guaranteed till plugin shutdown. 41 | 42 | @note: DO NOT FREE the returned pointer, its ownership is held by the app. 43 | */ 44 | AIAPI AIErr (*AddString)(ai::UnicodeString string, ai::UnicodeString** outPtr); 45 | }; 46 | 47 | #include "AIHeaderEnd.h" 48 | -------------------------------------------------------------------------------- /jsx/ts/utils.ts: -------------------------------------------------------------------------------- 1 | "use strict" 2 | 3 | /** 4 | * Compare two numbers and see if they're within 0.0001 of eachother. 5 | * From: http://floating-point-gui.de/errors/comparison/ 6 | * 7 | * @param a any number 8 | * @param b any number 9 | */ 10 | export function nearlyEqual(a: number, b: number): boolean { 11 | let epsilon = 0.0001; 12 | let absA = Math.abs(a); 13 | let absB = Math.abs(b); 14 | let diff = Math.abs(a - b); 15 | 16 | if (a === b) { 17 | return true; 18 | } 19 | else if (a === 0 || b === 0 || diff < Number.MIN_VALUE) { 20 | return diff < (epsilon * Number.MIN_VALUE); 21 | } 22 | else { 23 | return (diff / Math.min((absA + absB), Number.MAX_VALUE)) < epsilon; 24 | } 25 | } 26 | 27 | /** 28 | * Detects whether the key is space delimited in the given string. For example, if 29 | * the key is ".spacer": 30 | * ".spacer" -> true 31 | * ".spacer thing" -> true 32 | * ".spacerthing" -> false 33 | * "thing .spacer" -> true 34 | * "thing.spacer" -> false 35 | * 36 | * @param name - the string to search 37 | * @param key - the string to search for 38 | */ 39 | export function isKeyInString(name: string, key: string): boolean { 40 | if (!name) { 41 | return false; 42 | } 43 | 44 | if (name === key) { // exact match 45 | return true; 46 | } 47 | else if (name.indexOf(key, 0) !== -1) { 48 | if (name.indexOf(key + " ", 0) === 0 || // start of the string 49 | name.indexOf(" " + key) === ((name.length - key.length) - 1) || // end of the string 50 | name.indexOf(" " + key + " ", 0) !== -1) { // inside of the string 51 | return true; 52 | } 53 | } 54 | 55 | return false; 56 | } -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/ArtMatcher.hpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef _ARTMATCHER_HPP_ 17 | #define _ARTMATCHER_HPP_ 18 | 19 | #include "AIArt.h" 20 | #include "AIMatchingArt.h" 21 | 22 | class ArtMatcher 23 | { 24 | public: 25 | ArtMatcher(ai::int16 iNumSpecs, AIBoolean matchArtInDictionaries = false); 26 | virtual ~ArtMatcher(void); 27 | // 28 | ASErr SetSpec(ai::int16 iX, ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr); 29 | // 30 | ASErr GetMatchingArt(void); 31 | ai::int32 GetNumMatches(void); 32 | AIArtHandle GetMatchedArt(ai::int32 iX); 33 | void ClearMatchedArt(ai::int32 iX); // to enable multi-pass algorithms to filter out some of the matches 34 | // 35 | enum eArtMatcherErrors 36 | { 37 | AM_OK = kNoErr, 38 | AM_InvalidIndex, 39 | AM_InvalidSuite, 40 | AM_NumErrs 41 | }; 42 | // 43 | private: 44 | ai::int16 m_iNumSpecs; 45 | AIMatchingArtSpec *m_pSpecs; 46 | AIBoolean m_MatchArtInDictionaries; 47 | 48 | // 49 | ai::int32 m_lNumMatches; 50 | AIArtHandle **m_hMatches; 51 | }; 52 | 53 | #endif // _ARTMATCHER_HPP_ 54 | 55 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/CASFault.hpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef _CASFAULT_HPP_ 17 | #define _CASFAULT_HPP_ 18 | 19 | //////////////////////////////////////////////////////////////////////// 20 | // 21 | // A very simple exception class which allows Illustrator error codes to be 22 | // returned as exceptions. 23 | // 24 | // Example of use: 25 | // 26 | // ASErr 27 | // Foo(void) 28 | // { 29 | // ASErr result = kNoErr; 30 | // ... 31 | // try 32 | // { 33 | // ... 34 | // throw CASFault(kBadParameterErr); 35 | // ... 36 | // } 37 | // catch (CASFault &f) // catch by (C++) reference 38 | // { 39 | // // assigns the ASErr field 40 | // result = f; 41 | // } 42 | // 43 | // return result; 44 | // } 45 | // 46 | //////////////////////////////////////////////////////////////////////// 47 | 48 | class CASFault { 49 | public: 50 | CASFault (ASErr id) : fId(id) 51 | {} 52 | 53 | operator ASErr() const 54 | {return fId;} 55 | 56 | protected: 57 | ASErr fId; 58 | }; 59 | 60 | #endif // _CASFAULT_HPP_ 61 | 62 | -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h: -------------------------------------------------------------------------------- 1 | #ifndef __BloksAIPlugin_h__ 2 | #define __BloksAIPlugin_h__ 3 | 4 | #include "Plugin.hpp" 5 | #include "BloksAIPluginID.h" 6 | 7 | /** Creates a new BloksAIPlugin. 8 | @param pluginRef IN unique reference to this plugin. 9 | @return pointer to new BloksAIPlugin. 10 | */ 11 | Plugin* AllocatePlugin(SPPluginRef pluginRef); 12 | 13 | /** Reloads the BloksAIPlugin class state when the plugin is 14 | reloaded by the application. 15 | @param plugin IN pointer to plugin being reloaded. 16 | */ 17 | void FixupReload(Plugin* plugin); 18 | 19 | /** Hooks BloksAIPlugin up as an Illustrator plug-in. 20 | @ingroup BloksAIPlugin 21 | */ 22 | class BloksAIPlugin : public Plugin 23 | { 24 | public: 25 | /** Constructor. 26 | @param pluginRef IN reference to this plugin. 27 | */ 28 | BloksAIPlugin(SPPluginRef pluginRef); 29 | 30 | /** Destructor. 31 | */ 32 | virtual ~BloksAIPlugin(); 33 | 34 | /** Restores state of BloksAIPlugin during reload. 35 | */ 36 | FIXUP_VTABLE_EX(BloksAIPlugin, Plugin); // override 37 | 38 | /** Initializes the plugin. 39 | @param message IN message sent by the plugin manager. 40 | @return kNoErr on success, other ASErr otherwise. 41 | */ 42 | ASErr StartupPlugin(SPInterfaceMessage * message); // override 43 | 44 | /** Removes the plugin. 45 | @param message IN message sent by the plugin manager. 46 | @return kNoErr on success, other ASErr otherwise. 47 | */ 48 | ASErr ShutdownPlugin(SPInterfaceMessage * message); // override 49 | 50 | protected: 51 | virtual ASErr Notify(AINotifierMessage* message); // override 52 | 53 | private: 54 | AINotifierHandle fRegisterEventNotifierHandle; 55 | AINotifierHandle fRegisterSelectionChangedHandle; 56 | AINotifierHandle fRegisterUndoHandle; 57 | AINotifierHandle fRegisterRulerHandle; 58 | }; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringUtils.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2018 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ai 23 | { 24 | namespace detail 25 | { 26 | // Base case: No args to stream 27 | void StreamArgs(std::ostringstream& ss) 28 | { 29 | } 30 | 31 | // Recursively stream each arg in the parameter pack 32 | template 33 | void StreamArgs(std::ostringstream& ss, const T& t, const Ts&... ts) 34 | { 35 | ss << t; 36 | StreamArgs(ss, ts...); 37 | } 38 | 39 | } // namespace detail 40 | 41 | /* 42 | * Stream arbitrary number of arguments to std::string 43 | */ 44 | template 45 | inline std::string StreamArgs(const Args&... args) 46 | { 47 | std::ostringstream ss; 48 | // TODO: In C++17, fold expression can be used to expand the pack 49 | // (ss << ... << args); 50 | detail::StreamArgs(ss, args...); 51 | return ss.str(); 52 | } 53 | 54 | /* 55 | * Utility to create std::string using ostringstream. 56 | */ 57 | template 58 | inline std::string to_string(const T& value) 59 | { 60 | return StreamArgs(value); 61 | } 62 | 63 | } // namespace ai -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssertion.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | #include "AITypes.h" 20 | 21 | #include "AIHeaderBegin.h" 22 | 23 | 24 | /******************************************************************************* 25 | ** 26 | ** Constants 27 | ** 28 | **/ 29 | 30 | #define kAIAssertionSuite "AI Assertion Suite" 31 | #define kAIAssertionSuiteVersion1 AIAPI_VERSION(1) 32 | #define kAIAssertionSuiteVersion kAIAssertionSuiteVersion1 33 | #define kAIAssertionVersion kAIAssertionSuiteVersion 34 | 35 | /******************************************************************************* 36 | ** 37 | ** Suite 38 | ** 39 | **/ 40 | 41 | struct AIAssertionSuite 42 | { 43 | /** Show an assert. 44 | @param success : condition of assert. 45 | @param message : Message to be displayed in Assert. Can be NULL. 46 | @param inFile : Name of the file from where the assertion is thrown. Can be NULL. 47 | @param inLine : Line number from where the assertion is thrown. 48 | This value is ignored if inFile is NULL. 49 | */ 50 | AIAPI void (*AssertProc)(AIBoolean success, const char* message, const char* inFile, ai::int32 inLine); 51 | 52 | }; 53 | 54 | #include "AIHeaderEnd.h" -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIAssertConfig.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | // Asserts should be force enabled (i.e. for release build as well) until RC. 20 | 21 | // Custom configuration 22 | #ifdef ILLUSTRATOR_MINIMAL 23 | #define AI_ASSERTS_ENABLED 0 24 | #else 25 | #ifdef AI_BETA 26 | #define AI_ASSERTS_ENABLED 0 //disable asserts for Beta build 27 | #else 28 | #define AI_ASSERTS_ENABLED 1 // <--Should be turned to 0 after RC 29 | #endif 30 | // Automatic configuration 31 | #ifdef NDEBUG 32 | #define AI_ASSERT_CONTROL_DEBUG 0 // Release mode 33 | 34 | #else //NDEBUG 35 | 36 | //Make sure Asserts are always enabled in debug builds 37 | #if defined(AI_ASSERTS_ENABLED) && !AI_ASSERTS_ENABLED 38 | #undef AI_ASSERTS_ENABLED //It will be turned on below 39 | #endif //defined(AI_ASSERTS_ENABLED) && !AI_ASSERTS_ENABLED 40 | #ifdef AI_BETA 41 | #define AI_ASSERT_CONTROL_DEBUG 0 // disable asserts for Beta build 42 | #else 43 | #define AI_ASSERT_CONTROL_DEBUG 1 // Debug mode 44 | #endif 45 | #endif // NDEBUG 46 | 47 | #ifndef AI_ASSERTS_ENABLED 48 | #define AI_ASSERTS_ENABLED AI_ASSERT_CONTROL_DEBUG 49 | #endif // AI_ASSERT_FORCE_ENABLE 50 | 51 | #endif //ILLUSTRATOR_MINIMAL 52 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPragma.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* AIPragma.h */ 4 | /* Makes #defines for #pragmas to eliminate compiler dependencies */ 5 | /* */ 6 | /* ADOBE SYSTEMS INCORPORATED */ 7 | /* Copyright 2001-2007 Adobe Systems Incorporated. */ 8 | /* All Rights Reserved. */ 9 | /* */ 10 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 11 | /* in accordance with the terms of the Adobe license agreement */ 12 | /* accompanying it. If you have received this file from a source other */ 13 | /* than Adobe, then your use, modification, or distribution of it */ 14 | /* requires the prior written permission of Adobe. */ 15 | /* */ 16 | /* Patents Pending */ 17 | /* */ 18 | /* */ 19 | /* Started by Dave MacLachlan, 09/27/2001 */ 20 | /* */ 21 | /***********************************************************************/ 22 | 23 | #ifndef __AIPragma__ 24 | #define __AIPragma__ 25 | 26 | #ifndef __ASConfig__ 27 | #include "ASConfig.h" 28 | #endif 29 | 30 | #error Don't want this file! 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/ASPragma.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* ASPragma.h */ 4 | /* Makes #defines for #pragmas to eliminate compiler dependencies */ 5 | /* */ 6 | /* ADOBE SYSTEMS INCORPORATED */ 7 | /* Copyright 1996-2007 Adobe Systems Incorporated. */ 8 | /* All Rights Reserved. */ 9 | /* */ 10 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 11 | /* in accordance with the terms of the Adobe license agreement */ 12 | /* accompanying it. If you have received this file from a source other */ 13 | /* than Adobe, then your use, modification, or distribution of it */ 14 | /* requires the prior written permission of Adobe. */ 15 | /* */ 16 | /* Patents Pending */ 17 | /* */ 18 | /* */ 19 | /* Started by Dave Lazarony, 01/26/1996 */ 20 | /* */ 21 | /***********************************************************************/ 22 | 23 | #ifndef __ASPragma__ 24 | #define __ASPragma__ 25 | 26 | #ifndef __ASConfig__ 27 | #include "ASConfig.h" 28 | #endif 29 | 30 | #error Don't want this file! 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEraserTool.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // ADOBE CONFIDENTIAL 4 | // 5 | // File: AIEraserTool.h 6 | // 7 | // Copyright 2016 Adobe Systems Incorporated 8 | // All Rights Reserved. 9 | // 10 | // NOTICE: All information contained herein is, and remains 11 | // the property of Adobe Systems Incorporated and its suppliers, 12 | // if any. The intellectual and technical concepts contained 13 | // herein are proprietary to Adobe Systems Incorporated and its 14 | // suppliers and are protected by trade secret or copyright law. 15 | // Dissemination of this information or reproduction of this material 16 | // is strictly forbidden unless prior written permission is obtained 17 | // from Adobe Systems Incorporated. 18 | // 19 | //======================================================================================== 20 | 21 | #ifndef __AIEraserTool__ 22 | #define __AIEraserTool__ 23 | 24 | #include "AITypes.h" 25 | 26 | #include "AIHeaderBegin.h" 27 | 28 | /******************************************************************************* 29 | ** 30 | ** Constants 31 | ** 32 | **/ 33 | 34 | #define kAIEraserToolSuite "AI Eraser Tool Suite" 35 | #define kAIEraserToolSuiteVersion2 AIAPI_VERSION(2) 36 | #define kAIEraserToolSuiteVersion kAIEraserToolSuiteVersion2 37 | #define kAIEraserToolVersion kAIEraserToolSuiteVersion 38 | 39 | struct AIEraserToolSuite 40 | { 41 | /*Erases the art under the given panPoints like an eraser */ 42 | AIErr (*Erase)(const AIRealPoint* panPoints, const size_t count); 43 | /* Sets the diameter for the eraser based on the value provided. */ 44 | AIErr (*SetDiameter)(const AIReal diameter); 45 | }; 46 | 47 | #include "AIHeaderEnd.h" 48 | 49 | #endif // __AIEraserTool__ 50 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/mac/AIPluginCommon.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_SEARCH_USER_PATHS = NO 2 | ARCHS = $(ARCHS_STANDARD) 3 | CLANG_CXX_LANGUAGE_STANDARD = c++14 4 | CLANG_CXX_LIBRARY = libc++ 5 | CONFIGURATION_BUILD_DIR = ./../output/mac/$(AI_CONFIGURATION) 6 | CONFIGURATION_TEMP_DIR = $(PROJECT_TEMP_DIR)/Default 7 | DSTROOT = /tmp/$(PRODUCT_NAME).dst 8 | EXPORTED_SYMBOLS_FILE = 9 | FRAMEWORK_SEARCH_PATHS = 10 | LIBRARY_SEARCH_PATHS = 11 | GCC_DEBUGGING_SYMBOLS = full 12 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES 13 | GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp 14 | GCC_PRECOMPILE_PREFIX_HEADER = YES 15 | GCC_PREFIX_HEADER = ../common/includes/IllustratorSDK$(AI_CONFIGURATION).pch 16 | GCC_VERSION=com.apple.compilers.llvm.clang.1_0 17 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO 18 | GCC_WARN_UNKNOWN_PRAGMAS = YES 19 | GCC_WARN_UNUSED_VARIABLE = YES 20 | GENERATE_PKGINFO_FILE = YES 21 | HEADER_SEARCH_PATHS = ../../illustratorapi/ate ../../illustratorapi/illustrator ../../illustratorapi/illustrator/actions ../../illustratorapi/pica_sp /Developer/Headers/FlatCarbon ../common/includes Source 22 | INFOPLIST_FILE = ../common/mac/Info.plist 23 | INFOPLIST_PREFIX_HEADER = ../common/includes/SDKDef.h 24 | INFOPLIST_PREPROCESS = YES 25 | MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0 26 | MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.15 27 | OBJROOT = $(PROJECT_DIR)/build 28 | ONLY_LINK_ESSENTIAL_SYMBOLS = YES 29 | PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO 30 | PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES 31 | PRODUCT_BUNDLE_IDENTIFIER = com.adobe.illustrator.plugins.$(PRODUCT_NAME) 32 | PRODUCT_NAME = $(PROJECT_NAME) 33 | REZ_SEARCH_PATHS = Resources/raw Resources/Mac ../common/mac 34 | SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES 35 | SDKROOT = macosx 36 | SHARED_PRECOMPS_DIR = ./../output/mac/sharedprecompiledheaders/$(AI_CONFIGURATION) 37 | SYMROOT = ../output/mac/$(AI_CONFIGURATION) 38 | WRAPPER_EXTENSION = aip 39 | -------------------------------------------------------------------------------- /BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginCommon.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_SEARCH_USER_PATHS = NO 2 | ARCHS = $(ARCHS_STANDARD) 3 | CLANG_CXX_LANGUAGE_STANDARD = c++14 4 | CLANG_CXX_LIBRARY = libc++ 5 | CONFIGURATION_BUILD_DIR = ./../output/mac/$(AI_CONFIGURATION) 6 | CONFIGURATION_TEMP_DIR = $(PROJECT_TEMP_DIR)/Default 7 | DSTROOT = /tmp/$(PRODUCT_NAME).dst 8 | EXPORTED_SYMBOLS_FILE = 9 | FRAMEWORK_SEARCH_PATHS = 10 | LIBRARY_SEARCH_PATHS = 11 | GCC_DEBUGGING_SYMBOLS = full 12 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES 13 | GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp 14 | GCC_PRECOMPILE_PREFIX_HEADER = YES 15 | GCC_PREFIX_HEADER = ../common/includes/IllustratorSDK$(AI_CONFIGURATION).pch 16 | GCC_VERSION=com.apple.compilers.llvm.clang.1_0 17 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO 18 | GCC_WARN_UNKNOWN_PRAGMAS = YES 19 | GCC_WARN_UNUSED_VARIABLE = YES 20 | GENERATE_PKGINFO_FILE = YES 21 | HEADER_SEARCH_PATHS = ../../illustratorapi/ate ../../illustratorapi/illustrator ../../illustratorapi/illustrator/actions ../../illustratorapi/pica_sp /Developer/Headers/FlatCarbon ../common/includes Source 22 | INFOPLIST_FILE = ../common/mac/Info.plist 23 | INFOPLIST_PREFIX_HEADER = ../common/includes/SDKDef.h 24 | INFOPLIST_PREPROCESS = YES 25 | MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0 26 | MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.15 27 | OBJROOT = $(PROJECT_DIR)/build 28 | ONLY_LINK_ESSENTIAL_SYMBOLS = YES 29 | PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO 30 | PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES 31 | PRODUCT_BUNDLE_IDENTIFIER = com.adobe.illustrator.plugins.$(PRODUCT_NAME) 32 | PRODUCT_NAME = $(PROJECT_NAME) 33 | REZ_SEARCH_PATHS = Resources/raw Resources/Mac ../common/mac 34 | SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES 35 | SDKROOT = macosx 36 | SHARED_PRECOMPS_DIR = ./../output/mac/sharedprecompiledheaders/$(AI_CONFIGURATION) 37 | SYMROOT = ../output/mac/$(AI_CONFIGURATION) 38 | WRAPPER_EXTENSION = aip 39 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPSDKeys.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: AIPSDKeys.h 3 | * Purpose: Adobe Illustrator PSD Options Dictionary Keys. 4 | * 5 | * ADOBE SYSTEMS INCORPORATED 6 | * Copyright 2014 Adobe Systems Incorporated. 7 | * All rights reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file 10 | * in accordance with the terms of the Adobe license agreement 11 | * accompanying it. If you have received this file from a source other 12 | * than Adobe, then your use, modification, or distribution of it 13 | * requires the prior written permission of Adobe. 14 | * 15 | */ 16 | 17 | #pragma once 18 | 19 | /******************************************************************************* 20 | ** 21 | ** Imports 22 | ** 23 | **/ 24 | 25 | #include "AIHeaderBegin.h" 26 | 27 | 28 | /******************************************************************************* 29 | ** 30 | ** Constants 31 | ** 32 | **/ 33 | 34 | /* Use with \c #AIDicionarySuite::SetPSDPluginColorModeEntry in Integeral form. 35 | Enum given in AIPhotoshopPrefs.h*/ 36 | #define kAIPSDColorModelOption "PSDColorModel" 37 | 38 | /* Use with \c #AIDicionarySuite::SetRealEntry. */ 39 | #define kAIPSDResolutionOption "PSDResolution" 40 | 41 | /* Use with \c #AIDicionarySuite::SetBooleanEntry. */ 42 | #define kAIPSDWriteLayersOption "PSDWriteLayers" 43 | 44 | /* Use with \c #AIDicionarySuite::SetAntiAliasOptionsEntry in integral form. 45 | Enum given in AIPhotoshopPrefs.h*/ 46 | #define kAIPSDAntiAliasOption "PSDAntiAlias" 47 | 48 | /* Use with \c #AIDicionarySuite::SetBooleanEntry. */ 49 | #define kAIPSDMaxEditabilityOption "PSDMaxEditability" 50 | 51 | /* Use with \c #AIDicionarySuite::SetBooleanEntry. */ 52 | #define kAIPSDPreserveSpotColorsOption "PSDPreserveSpotColors" 53 | 54 | 55 | 56 | #include "AIHeaderEnd.h" 57 | 58 | 59 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrors.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* SPErrors.h */ 4 | /* */ 5 | /* ADOBE SYSTEMS INCORPORATED */ 6 | /* Copyright 1995-2007 Adobe Systems Incorporated. */ 7 | /* All Rights Reserved. */ 8 | /* */ 9 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 10 | /* in accordance with the terms of the Adobe license agreement */ 11 | /* accompanying it. If you have received this file from a source other */ 12 | /* than Adobe, then your use, modification, or distribution of it */ 13 | /* requires the prior written permission of Adobe. */ 14 | /* */ 15 | /* Patents Pending */ 16 | /* */ 17 | /* */ 18 | /***********************************************************************/ 19 | 20 | 21 | /******************************************************************************* 22 | ** 23 | ** Errors 24 | ** 25 | **/ 26 | /** @ingroup Errors 27 | PICA access error. See \c #SPAccessSuite. */ 28 | #define kSPCantAcquirePluginError '!Acq' 29 | /** @ingroup Errors 30 | PICA access error. See \c #SPAccessSuite. */ 31 | #define kSPCantReleasePluginError '!Rel' 32 | /** @ingroup Errors 33 | PICA access error. See \c #SPAccessSuite. */ 34 | #define kSPPluginAlreadyReleasedError 'AlRl' 35 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/FlashUIController.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File: //ai/ai16/devtech/sdk/public/samplecode/common/includes/FlashUIController.h $ 4 | // 5 | // $Revision: #1 $ 6 | // 7 | // Copyright 2011 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef __FLASHUICONTROLLER_H__ 17 | #define __FLASHUICONTROLLER_H__ 18 | 19 | #include "SDKPlugPlug.h" 20 | #include "IllustratorSDK.h" 21 | #include "Suites.hpp" 22 | 23 | class FlashUIController 24 | { 25 | public: 26 | 27 | FlashUIController(const char* extensionId); 28 | 29 | virtual ~FlashUIController(void); 30 | 31 | virtual PlugPlugErrorCode LoadExtension(); 32 | 33 | virtual PlugPlugErrorCode UnloadExtension(); 34 | 35 | /** Registers the events this plug-in will listen for with PlugPlug. 36 | @return error code if error found, or success otherwise. 37 | */ 38 | virtual csxs::event::EventErrorCode RegisterCSXSEventListeners() = 0; 39 | 40 | /** Removes the previously added event listeners from PlugPlug. 41 | @return error code if error found, or success otherwise. 42 | */ 43 | virtual csxs::event::EventErrorCode RemoveEventListeners() = 0; 44 | 45 | virtual ASErr SendData() = 0; 46 | 47 | virtual void ParseData(const char* eventData) = 0; 48 | 49 | protected: 50 | 51 | SDKPlugPlug fPPLib; 52 | 53 | private: 54 | 55 | const char* fExtensionId; 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/HtmlUIController.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File: //ai/ai16/devtech/sdk/public/samplecode/common/includes/HtmlUIController.h $ 4 | // 5 | // $Revision: #1 $ 6 | // 7 | // Copyright 2011 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef __HTMLUICONTROLLER_H__ 17 | #define __HTMLUICONTROLLER_H__ 18 | 19 | #include "SDKPlugPlug.h" 20 | #include "IllustratorSDK.h" 21 | #include "Suites.hpp" 22 | 23 | class HtmlUIController 24 | { 25 | public: 26 | 27 | HtmlUIController(const char* extensionId); 28 | 29 | virtual ~HtmlUIController(void); 30 | 31 | virtual PlugPlugErrorCode LoadExtension(); 32 | 33 | virtual PlugPlugErrorCode UnloadExtension(); 34 | 35 | /** Registers the events this plug-in will listen for with PlugPlug. 36 | @return error code if error found, or success otherwise. 37 | */ 38 | virtual csxs::event::EventErrorCode RegisterCSXSEventListeners() = 0; 39 | 40 | /** Removes the previously added event listeners from PlugPlug. 41 | @return error code if error found, or success otherwise. 42 | */ 43 | virtual csxs::event::EventErrorCode RemoveEventListeners() = 0; 44 | 45 | virtual ASErr SendData() = 0; 46 | 47 | virtual void ParseData(const char* eventData) = 0; 48 | 49 | protected: 50 | 51 | SDKPlugPlug htmlPPLib; 52 | 53 | private: 54 | 55 | const char* htmlExtensionId; 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: IAIColorSpace.inl 3 | * $Revision: 1 $ 4 | * Author: Simon Chen 5 | * Date: 6 | * Purpose: Common impl file for the core and plug-ins. 7 | * This file is included by IAIColorSpace.cpp & IAIColorSpaceCore.cpp 8 | * Code added here MUST be shareable between the core and plug-ins. 9 | * * You may not throw specific errors from these methods (ai::Error vs. CAIFault). But this 10 | * does not mean that the methods won't throw. In fact, the methods that they call might 11 | * throw. 12 | * 13 | * ADOBE SYSTEMS INCORPORATED 14 | * Copyright 2005-2007 Adobe Systems Incorporated. 15 | * All rights reserved. 16 | * 17 | * NOTICE: Adobe permits you to use, modify, and distribute this file 18 | * in accordance with the terms of the Adobe license agreement 19 | * accompanying it. If you have received this file from a source other 20 | * than Adobe, then your use, modification, or distribution of it 21 | * requires the prior written permission of Adobe. 22 | * 23 | */ 24 | 25 | #ifndef _IAICOLORSPACE_INL_ 26 | #define _IAICOLORSPACE_INL_ 27 | 28 | bool ai::ColorSpace::operator!=(const ai::ColorSpace &rhs) const 29 | { 30 | return !(*this == rhs); 31 | } 32 | 33 | int ai::ColorSpace::NumProcessComponents(void) const 34 | { 35 | return NumColorComponents() - NumSpotComponents(); 36 | } 37 | 38 | const ai::uint8* ai::ColorSpace::IndexedColors(ai::uint8 index) const 39 | { 40 | const ai::uint8 *comps = NULL; 41 | if (IndexedNumEntries() > 0 && index < IndexedNumEntries()) 42 | { 43 | comps = IndexedTable() + index*IndexedNumComponents(); 44 | 45 | if (BaseColorSpace().GetFamily() == ai::ColorSpace::kAIColorSpaceFamilyRGB && 46 | IndexedNumComponents() == 4) 47 | { 48 | comps ++; // skip the zero channel in 0RGB color table 49 | } 50 | } 51 | 52 | return comps; 53 | } 54 | 55 | #endif //_IAICOLORSPACE_INL_ -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigClang.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | #ifdef __cplusplus 20 | 21 | #ifdef __clang__ 22 | 23 | // Identify libc++ vs libstdc++ 24 | #if __has_include() 25 | #include 26 | #if defined(_LIBCPP_VERSION) 27 | #define AI_LIBCPP 1 // libc++ 28 | #endif 29 | #endif 30 | 31 | #if !AI_LIBCPP 32 | #define AI_LIBSTDCXX 1 // libstdc++ 33 | #endif 34 | 35 | #if AI_LIBCPP && __has_feature(cxx_nullptr) 36 | #define AI_HAS_NULLPTR 37 | #endif 38 | 39 | #if __has_feature(cxx_static_assert) 40 | #define AI_HAS_STATIC_ASSERT 41 | #endif 42 | 43 | #if AI_LIBCPP && __has_feature(cxx_rvalue_references) 44 | #define AI_HAS_RVALUE_REFERENCES 45 | #endif 46 | 47 | #if __has_feature(cxx_lambdas) 48 | #define AI_HAS_LAMBDAS 49 | #endif 50 | 51 | #if __has_feature(cxx_defaulted_functions) 52 | #define AI_HAS_DEFAULTED_FUNCTIONS 53 | #endif 54 | 55 | #if __has_feature(cxx_deleted_functions) 56 | #define AI_HAS_DELETED_FUNCTIONS 57 | #endif 58 | 59 | #if __has_feature(cxx_explicit_conversions) 60 | #define AI_HAS_EXPLICIT_CONVERSION_OPERATORS 61 | #endif 62 | 63 | #if __has_feature(cxx_noexcept) 64 | #define AI_HAS_NOEXCEPT 65 | #endif 66 | 67 | #if __has_feature(cxx_return_type_deduction) 68 | #define AI_HAS_RETURN_TYPE_DEDUCTION 69 | #endif 70 | 71 | #endif // __clang__ 72 | 73 | #endif // __cplusplus -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUUID.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #pragma once 18 | 19 | #include "AIBasicTypes.h" 20 | #include 21 | 22 | #include "AIHeaderBegin.h" 23 | 24 | namespace ai 25 | { 26 | constexpr size_t kUUID_SIZE = 16; 27 | 28 | /** Class to keep the data of UUID associated with an art object. 29 | Each art object keeps a unique id which remain same through out 30 | the life of the object in single session. 31 | Utility functions to interact with UUID are provided in suite #AIUUIDSuite 32 | @see \c #AIUUIDSuite */ 33 | class uuid 34 | { 35 | public: 36 | uuid() 37 | {} 38 | 39 | uuid(const ai::uint8 data[kUUID_SIZE]) 40 | { 41 | Set(data); 42 | } 43 | 44 | void Set(const ai::uint8 data[kUUID_SIZE]) 45 | { 46 | memcpy(mData, data, kUUID_SIZE); 47 | } 48 | 49 | bool operator==(const uuid &rhs) const 50 | { 51 | return (0 == memcmp(mData, rhs.mData, kUUID_SIZE)); 52 | } 53 | 54 | bool operator!=(const uuid &rhs) const 55 | { 56 | return (0 != memcmp(mData, rhs.mData, kUUID_SIZE)); 57 | } 58 | 59 | bool operator<(const uuid &rhs) const 60 | { 61 | return (0 > memcmp(mData, rhs.mData, kUUID_SIZE)); 62 | } 63 | 64 | void Clear() 65 | { 66 | memset(mData, 0, kUUID_SIZE); 67 | } 68 | 69 | ai::uint8 mData[kUUID_SIZE] = { 0 }; 70 | }; 71 | } 72 | 73 | #include "AIHeaderEnd.h" 74 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AICMS.h: -------------------------------------------------------------------------------- 1 | #ifndef __AICMS__ 2 | #define __AICMS__ 3 | 4 | /* 5 | * Name: AICMS.h 6 | * $Revision: 1 $ 7 | * Author: 8 | * Date: 9 | * Purpose: Adobe Illustrator Color Management System (CMS) Suite 10 | * (Currently just a notifier) 11 | * 12 | * ADOBE SYSTEMS INCORPORATED 13 | * Copyright 1996-2007 Adobe Systems Incorporated. 14 | * All rights reserved. 15 | * 16 | * NOTICE: Adobe permits you to use, modify, and distribute this file 17 | * in accordance with the terms of the Adobe license agreement 18 | * accompanying it. If you have received this file from a source other 19 | * than Adobe, then your use, modification, or distribution of it 20 | * requires the prior written permission of Adobe. 21 | * 22 | */ 23 | 24 | 25 | /******************************************************************************* 26 | ** 27 | ** Imports 28 | ** 29 | **/ 30 | #include "AITypes.h" 31 | 32 | 33 | #include "AIHeaderBegin.h" 34 | 35 | /** @file AICMS.h */ 36 | 37 | /******************************************************************************* 38 | ** 39 | ** Constants 40 | ** 41 | **/ 42 | #define kAICMSSuite "AI Color Management System Suite" 43 | #define kAICMSSuiteVersion AIAPI_VERSION(3) 44 | #define kAICMSVersion kAICMSSuiteVersion 45 | 46 | /** @ingroup Notifiers 47 | Sent whenever the color management settings for are changed. 48 | */ 49 | #define kAIColorCalibrationChangedNotifier "AI Color Calibration Changed Notifier" 50 | 51 | /******************************************************************************* 52 | ** 53 | ** Types 54 | ** 55 | **/ 56 | 57 | 58 | /******************************************************************************* 59 | ** 60 | ** Suite 61 | ** 62 | **/ 63 | 64 | // Internal (placeholder for further development) 65 | /* 66 | typedef struct { 67 | AIAPI AIErr (*NothingDefinedYet) ( void ); 68 | } AICMSSuite; 69 | */ 70 | 71 | 72 | #include "AIHeaderEnd.h" 73 | 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/tools/pipl/create_pipl.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2018 Adobe Systems, Inc. 3 | # All rights reserved. 4 | # 5 | # FILENAME: create_pipl.py 6 | # 7 | # FUNCTION: create pipl file for given plugin pipl info. 8 | # 9 | # SYNTAX: python create_pipl.py -input '[{"name" : "plugin_name1", "entry_point" : "entry_point1"}, {"name" : "plugin_name2", "entry_point" : "entry_point2"}, ...] -output "pipl_name.pipl" 10 | # 11 | # PARAMETERS: N/A 12 | # 13 | # EXAMPLE: see Help for more detailed info 14 | # 15 | # AUTHOR : amisriva 16 | # 17 | ################################################################################## 18 | 19 | import sys 20 | import os 21 | import json 22 | import argparse 23 | 24 | from pipl_gen import pipl 25 | from pipl_gen import generate_multi_pipl_bin 26 | 27 | def parse_argument(): 28 | parser = argparse.ArgumentParser(description='Creates a PIPL file from given pipl info at given path') 29 | parser.add_argument('-input', help='Input json list of pipl dictionaries, with keys having name and entry_point', nargs = '?', default = [], dest = 'input_list') 30 | parser.add_argument('-output', help='file path of output pipl', dest = "output_file", nargs = 1) 31 | return parser.parse_args() 32 | 33 | def main(args): 34 | args = parse_argument() 35 | pipl_obj_list = [] 36 | if len(args.input_list): 37 | list_pipl = json.loads(args.input_list) 38 | for pipl_data in list_pipl: 39 | obj = pipl() 40 | if 'name' in pipl_data and len(pipl_data['name']): 41 | obj.add_plugin_name(str(pipl_data['name'])) 42 | if 'entry_point' in pipl_data and len(pipl_data['entry_point']): 43 | obj.add_plugin_entry(str(pipl_data['entry_point'])) 44 | if 'stsp' in pipl_data and pipl_data['stsp'] is True: 45 | obj.add_plugin_stsp(1) 46 | 47 | pipl_obj_list += [obj] 48 | else: 49 | obj = pipl() 50 | pipl_obj_list += [obj] 51 | generate_multi_pipl_bin(pipl_obj_list, "plugin.pipl") 52 | 53 | 54 | if __name__ == "__main__": 55 | main(sys.argv[1:]) 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 21E258 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleDisplayName 10 | BloksAIPlugin 11 | CFBundleExecutable 12 | BloksAIPlugin 13 | CFBundleGetInfoHTML 14 | BloksAIPlugin version 25 . 3 . 0 . 0, "Copyright © 1987-2021 by Adobe Inc. All rights reserved." 15 | CFBundleGetInfoString 16 | BloksAIPlugin version 25 . 3 . 0 . 0, "Copyright © 1987-2021 by Adobe Inc. All rights reserved." 17 | CFBundleIdentifier 18 | kSDKDefAIBundlePrefix.plugins.BloksAIPlugin 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundleName 22 | BloksAIPlugin 23 | CFBundlePackageType 24 | ARPI 25 | CFBundleShortVersionString 26 | BloksAIPlugin version 25 . 3 . 0 . 0 27 | CFBundleSignature 28 | ART5 29 | CFBundleSupportedPlatforms 30 | 31 | MacOSX 32 | 33 | CFBundleVersion 34 | 25 . 3 . 0 . 0 35 | CSResourcesFileMapped 36 | 37 | DTCompiler 38 | com.apple.compilers.llvm.clang.1_0 39 | DTPlatformBuild 40 | 13C100 41 | DTPlatformName 42 | macosx 43 | DTPlatformVersion 44 | 12.1 45 | DTSDKBuild 46 | 21C46 47 | DTSDKName 48 | macosx12.1 49 | DTXcode 50 | 1321 51 | DTXcodeBuild 52 | 13C100 53 | LSMinimumSystemVersion 54 | 10.9 55 | LSRequiresCarbon 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IASTypes.hpp: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* IASTypes.hpp */ 4 | /* ASTypes object wrapper classes */ 5 | /* */ 6 | /* ADOBE SYSTEMS INCORPORATED */ 7 | /* Copyright 1996-2007 Adobe Systems Incorporated. */ 8 | /* All Rights Reserved. */ 9 | /* */ 10 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 11 | /* in accordance with the terms of the Adobe license agreement */ 12 | /* accompanying it. If you have received this file from a source other */ 13 | /* than Adobe, then your use, modification, or distribution of it */ 14 | /* requires the prior written permission of Adobe. */ 15 | /* */ 16 | /* Patents Pending */ 17 | /* */ 18 | /* */ 19 | /* Started by Dave Lazarony, 03/26/1996 */ 20 | /* */ 21 | /***********************************************************************/ 22 | 23 | #ifndef __IASTypes_hpp__ 24 | #define __IASTypes_hpp__ 25 | 26 | /* 27 | * Includes 28 | */ 29 | 30 | #ifndef __IASFixed_hpp__ 31 | #include "IASFixed.hpp" 32 | #endif 33 | 34 | // The following files have been obsoleted. Use IADMPoint or IADMRect instead. 35 | /* 36 | #ifndef __IASPoint_hpp__ 37 | #include "IASPoint.hpp" 38 | #endif 39 | 40 | #ifndef __IASRect_hpp__ 41 | #include "IASRect.hpp" 42 | #endif 43 | */ 44 | #endif 45 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSTSPrp.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* SPSTSPrp.h */ 4 | /* */ 5 | /* ADOBE SYSTEMS INCORPORATED */ 6 | /* Copyright 1995-2007 Adobe Systems Incorporated. */ 7 | /* All Rights Reserved. */ 8 | /* */ 9 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 10 | /* in accordance with the terms of the Adobe license agreement */ 11 | /* accompanying it. If you have received this file from a source other */ 12 | /* than Adobe, then your use, modification, or distribution of it */ 13 | /* requires the prior written permission of Adobe. */ 14 | /* */ 15 | /* Patents Pending */ 16 | /* */ 17 | /* */ 18 | /***********************************************************************/ 19 | 20 | #ifndef __SPSTSPrp__ 21 | #define __SPSTSPrp__ 22 | 23 | 24 | /******************************************************************************* 25 | ** 26 | ** Imports 27 | ** 28 | **/ 29 | 30 | #include "SPPiPL.h" 31 | 32 | 33 | /******************************************************************************* 34 | ** 35 | ** Constants 36 | ** 37 | **/ 38 | 39 | /** Internal */ 40 | #define PISuperTopSecretProperty 'StsP' 41 | /** Internal */ 42 | #define PISuperTopSecretValue 'clEn' 43 | 44 | 45 | /******************************************************************************* 46 | ** 47 | ** Types 48 | ** 49 | **/ 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /CSXS/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ./index.html 24 | ./jsx/hostscript.jsx 25 | 26 | 27 | true 28 | 29 | 30 | Panel 31 | Bloks 32 | 33 | 34 | 440 35 | 280 36 | 37 | 45 | 46 | 47 | 48 | ./icons/iconNormal.png 49 | ./icons/iconRollover.png 50 | ./icons/iconDisabled.png 51 | ./icons/iconDarkNormal.png 52 | ./icons/iconDarkRollover.png 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIURL.h: -------------------------------------------------------------------------------- 1 | #ifndef _AIURL_H_ 2 | #define _AIURL_H_ 3 | 4 | /* 5 | * Name: AIURL.h 6 | * $Revision: 1 $ 7 | * Purpose: Adobe Illustrator URL Suite. 8 | * 9 | * ADOBE SYSTEMS INCORPORATED 10 | * Copyright 1986-2007 Adobe Systems Incorporated. 11 | * All rights reserved. 12 | * 13 | * NOTICE: Adobe permits you to use, modify, and distribute this file 14 | * in accordance with the terms of the Adobe license agreement 15 | * accompanying it. If you have received this file from a source other 16 | * than Adobe, then your use, modification, or distribution of it 17 | * requires the prior written permission of Adobe. 18 | *: 19 | */ 20 | 21 | #ifndef __ASTypes__ 22 | #include "ASTypes.h" 23 | #endif 24 | 25 | #include "AIHeaderBegin.h" 26 | 27 | /** @file AIURL.h */ 28 | 29 | 30 | #define kAIURLSuite "AI URL Suite" 31 | #define kAIURLSuiteVersion3 AIAPI_VERSION(3) 32 | #define kAIURLSuiteVersion kAIURLSuiteVersion3 33 | #define kAIURLVersion kAIURLSuiteVersion 34 | 35 | /** @ingroup Errors 36 | See \c #AIURLSuite */ 37 | #define kFailureErr 'FAIL' 38 | 39 | 40 | 41 | /** @ingroup Suites 42 | This suite provides a simple interface to go to a URL through a web 43 | browser. You can use this to lead users to your web site for updates or other 44 | information. 45 | 46 | \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants 47 | \c #kAIURLSuite and \c #kAIURLSuiteVersion. 48 | */ 49 | typedef struct { 50 | /** Reports whether a web browser is available. 51 | (Note that this function returns a boolean value, not an error code.) 52 | @return True if a web browser is available. 53 | */ 54 | ASAPI ASBoolean (*IsBrowserAvailable)(void); 55 | 56 | /** Opens a web browser and displays a URL. 57 | (Note that this function returns a boolean value, not an error code.) 58 | @param url The URL to display. 59 | @return True if the web browser is opened successfully. 60 | */ 61 | ASAPI ASBoolean (*OpenURL)(const char *url); 62 | } AIURLSuite; 63 | 64 | 65 | #include "AIHeaderEnd.h" 66 | 67 | 68 | #endif // _AIURL_H_ -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITracingAction.h: -------------------------------------------------------------------------------- 1 | #ifndef _AITRACINGACTION_H_ 2 | #define _AITRACINGACTION_H_ 3 | 4 | /* 5 | * Name: AITracingAction.h 6 | * $Revision: 1 $ 7 | * Author: 8 | * Date: 9 | * Purpose: Adobe Illustrator 10.0 Actions for envelopes. 10 | * 11 | * ADOBE SYSTEMS INCORPORATED 12 | * Copyright 2001-2007 Adobe Systems Incorporated. 13 | * All rights reserved. 14 | * 15 | * NOTICE: Adobe permits you to use, modify, and distribute this file 16 | * in accordance with the terms of the Adobe license agreement 17 | * accompanying it. If you have received this file from a source other 18 | * than Adobe, then your use, modification, or distribution of it 19 | * requires the prior written permission of Adobe. 20 | * 21 | */ 22 | 23 | #ifndef __AIActionManager_h__ 24 | #include "AIActionManager.h" 25 | #endif 26 | 27 | 28 | 29 | // ----------------------------------------------------------------------------- 30 | // Action: kAITracingMenuAction 31 | // Purpose: runs some functionality accessible through the Tracing submenus 32 | // 33 | // Parameters: 34 | // - kAITracingMenuItem, enum: the menu item to run 35 | // ----------------------------------------------------------------------------- 36 | 37 | /** @ingroup Actions 38 | Executes items in the Tracing submenus. 39 | @param #kAITracingMenuItem The menu item to run, 40 | a \c kTracingAction* constant.See \c AITracingAction.h. 41 | */ 42 | #define kTracingPluginActionName "ai_plugin_tracing" 43 | 44 | /** Parameter to \c #kTracingPluginActionName. 45 | The menu item to run, a \c kTracingAction* constant. */ 46 | const ActionParamKeyID kAITracingMenuItem = 'menu'; // enum 47 | 48 | /** Menu item identifier for \c #kAITracingMenuItem: Make */ 49 | #define kTracingActionMake 1 50 | /** Menu item identifier for \c #kAITracingMenuItem: Make and Expand */ 51 | #define kTracingActionMakeAndExpand 2 52 | /** Menu item identifier for \c #kAITracingMenuItem: Release */ 53 | #define kTracingActionRelease 4 54 | /** Menu item identifier for \c #kAITracingMenuItem: Expand */ 55 | #define kTracingActionExpand 6 56 | 57 | 58 | #endif // _AITRACINGACTION_H_ -------------------------------------------------------------------------------- /css/styles.css: -------------------------------------------------------------------------------- 1 | /*Your styles*/ 2 | 3 | .content { 4 | display: flex; 5 | flex-direction: column; 6 | align-items: stretch; 7 | min-height: 100vh; 8 | } 9 | 10 | .centered-presenter { 11 | flex-grow: 1; 12 | display: flex; 13 | align-self: stretch; 14 | flex-direction: column; 15 | justify-content: center; 16 | align-items: center; 17 | } 18 | 19 | .centered-presenter_label { 20 | text-align: center; 21 | margin: 8px 36px; 22 | font-size: 110%; 23 | } 24 | 25 | .error-state > #svg-plugin { 26 | opacity: 0.8; 27 | } 28 | 29 | .settings-container { 30 | flex-grow: 1; 31 | margin: 0 6px 6px; 32 | position: relative; 33 | } 34 | 35 | .bottombuttons { 36 | margin: 12px 6px 4px; 37 | } 38 | 39 | .bottombuttons .topcoat-checkbox { 40 | margin: 6px 0 0 0; 41 | } 42 | 43 | .divider { 44 | border-top: 1px solid rgba(0,0,0,0.8); 45 | border-bottom: 1px solid rgba(255,255,255,0.2); 46 | width: 100%; 47 | margin: 12px 0 0 0; 48 | } 49 | 50 | .label { 51 | -webkit-user-select: none; 52 | user-select: none; 53 | cursor: default; 54 | } 55 | 56 | .label--inline { 57 | display: inline-block; 58 | margin: 5px 0 0 0; 59 | vertical-align: top; 60 | } 61 | 62 | .label--disabled { 63 | opacity: 0.6; 64 | } 65 | 66 | .label-placeholder-container { 67 | position: absolute; 68 | text-align: center; 69 | left: 0; 70 | right: 0; 71 | } 72 | 73 | 74 | 75 | /* 76 | Those classes will be edited at runtime with values specified 77 | by the settings of the CC application 78 | */ 79 | .hostFontColor{} 80 | .hostFontFamily{} 81 | .hostFontSize{} 82 | 83 | /*font family, color and size*/ 84 | .hostFont{} 85 | /*background color*/ 86 | .hostBgd{} 87 | /*lighter background color*/ 88 | .hostBgdLight{} 89 | /*darker background color*/ 90 | .hostBgdDark{} 91 | /*background color and font*/ 92 | .hostElt{} 93 | 94 | 95 | .hostButton{ 96 | border:1px solid; 97 | border-radius:2px; 98 | height:20px; 99 | vertical-align:bottom; 100 | font-family:inherit; 101 | color:inherit; 102 | font-size:inherit; 103 | } 104 | 105 | /* Bloks helper for SVG fills */ 106 | .hostFill{} 107 | .hostStroke{} -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlacedTypes.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * ADOBE CONFIDENTIAL 3 | * ___________________ 4 | * 5 | * Copyright 2018 Adobe Systems Incorporated 6 | * All Rights Reserved. 7 | * 8 | * NOTICE: All information contained herein is, and remains 9 | * the property of Adobe Systems Incorporated and its suppliers, 10 | * if any. The intellectual and technical concepts contained 11 | * herein are proprietary to Adobe Systems Incorporated and its 12 | * suppliers and are protected by all applicable intellectual property 13 | * laws, including trade secret and copyright laws. 14 | * Dissemination of this information or reproduction of this material 15 | * is strictly forbidden unless prior written permission is obtained 16 | * from Adobe Systems Incorporated. 17 | **************************************************************************/ 18 | 19 | #pragma once 20 | #ifndef __AIPlacedTypes__ 21 | #define __AIPlacedTypes__ 22 | 23 | namespace ai{ 24 | /** Methods for positioning and sizing a linked object. 25 | @see \c #AIPlacedSuite::SetPlaceOptions(), \c #AIPlacedSuite::GetPlaceOptions() */ 26 | enum PlaceMethod { 27 | /** Preserve original dimensions regardless of bounding box size and transformations. */ 28 | kAsIs, 29 | /** Fill bounding box while preserving proportions. Can overlap edges in one dimension. */ 30 | kFill, 31 | /** Fit fully inside bounding box while preserving proportions. */ 32 | kFit, 33 | /** Fit to bounding box; replaced file preserves bounds but not proportions. */ 34 | kConform, 35 | /** Fit to bounding box; replaced file preserves transformations and tries to preserve size. 36 | Default. */ 37 | kReconform 38 | }; 39 | 40 | /** Alignment options for positioning a linked object. 41 | @see \c #AIPlacedSuite::SetPlaceOptions(), \c #AIPlacedSuite::GetPlaceOptions() */ 42 | enum PlaceAlignment { 43 | kTopLeft, 44 | kMidLeft, 45 | kBotLeft, 46 | 47 | kTopMid, 48 | kMidMid, 49 | kBotMid, 50 | 51 | kTopRight, 52 | kMidRight, 53 | kBotRight 54 | }; 55 | } 56 | #endif 57 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2017 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #include "IAIGlobalUnicodeString.hpp" 18 | #include "AIGlobalUnicodeString.h" 19 | #include "AIErrorHandler.h" 20 | #include "AIContract.hpp" 21 | 22 | #if AI_AUTO_SUITE_AVAILABLE 23 | #include "AutoSuite.h" 24 | use_suite_required(AIGlobalUnicodeString) 25 | #elif defined (_IAIGlobalUnicodeString_SUITE_INCLUDE_H) 26 | #include _IAIGlobalUnicodeString_SUITE_INCLUDE_H 27 | #else 28 | // These need to be declared by client. 29 | extern "C" AIGlobalUnicodeStringSuite* sAIGlobalUnicodeString; 30 | #endif 31 | 32 | namespace ai 33 | { 34 | const ai::UnicodeString& GlobalUnicodeString::Get() const 35 | { 36 | AIErrorThrower error; 37 | if (mStringPtr) 38 | { 39 | return *mStringPtr; 40 | } 41 | 42 | if (mIsZRef) 43 | error = sAIGlobalUnicodeString->AddString(ai::UnicodeString(ZREF(mStr)), &mStringPtr); 44 | else 45 | error = sAIGlobalUnicodeString->AddString(ai::UnicodeString(mStr, mSize, mEncoding), &mStringPtr); 46 | 47 | ai::Ensures(mStringPtr != nullptr); 48 | return *mStringPtr; 49 | } 50 | 51 | GlobalUnicodeString::GlobalUnicodeString(ai::UnicodeString str) 52 | { 53 | AIErrorThrower error; 54 | error = sAIGlobalUnicodeString->AddString(std::move(str), &mStringPtr); 55 | ai::Ensures(mStringPtr != nullptr); 56 | } 57 | 58 | void GlobalUnicodeString::Set(ai::UnicodeString newStr) 59 | { 60 | AIErrorThrower error; 61 | if (!mStringPtr) 62 | { 63 | error = sAIGlobalUnicodeString->AddString(std::move(newStr), &mStringPtr); 64 | ai::Ensures(mStringPtr != nullptr); 65 | return; 66 | } 67 | 68 | mStringPtr->swap(newStr); 69 | } 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderEnd.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* AIHeaderEnd.h */ 4 | /* A standard place to put the junk that occurs at the end */ 5 | /* of all of our headers. You must include AIHeaderBegin.h BEFORE */ 6 | /* you include this file or you will get an error */ 7 | /* */ 8 | /* ADOBE SYSTEMS INCORPORATED */ 9 | /* Copyright 2005-2007 Adobe Systems Incorporated. */ 10 | /* All Rights Reserved. */ 11 | /* */ 12 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 13 | /* in accordance with the terms of the Adobe license agreement */ 14 | /* accompanying it. If you have received this file from a source other */ 15 | /* than Adobe, then your use, modification, or distribution of it */ 16 | /* requires the prior written permission of Adobe. */ 17 | /* */ 18 | /* Patents Pending */ 19 | /* */ 20 | /* */ 21 | /* Started by Dave MacLachlan, 07/10/2005 */ 22 | /* */ 23 | /***********************************************************************/ 24 | 25 | #if !defined(__AIHeaderBegin_H__) 26 | #error You need to include AIHeaderBegin before this file 27 | #endif 28 | 29 | #undef __AIHeaderBegin_H__ 30 | 31 | #ifdef MAC_ENV 32 | #pragma options align=reset 33 | #if defined (__MWERKS__) 34 | //GCC doesn't allow non int enums without using an attribute decl directly on 35 | //the enum, so no need to set it 36 | #pragma enumsalwaysint reset 37 | #endif 38 | #endif 39 | 40 | #ifdef WIN_ENV 41 | #pragma pack(pop) 42 | #endif 43 | 44 | AI_EXTERN_C_END 45 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesImportHelper.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------- 2 | 3 | Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. 4 | 5 | NOTICE: Adobe permits you to use, modify, and distribute this file 6 | in accordance with the terms of the Adobe license agreement accompanying 7 | it. If you have received this file from a source other than Adobe, then 8 | your use, modification, or distribution of it requires the prior written 9 | permission of Adobe. 10 | 11 | ---------------------------------------------------------------------------------- 12 | 13 | File: ATE25TextSuitesImportHelper.h 14 | 15 | Notes: Machine Generated file from script version 1.45 16 | Please don't modify manually! 17 | 18 | ---------------------------------------------------------------------------------- */ 19 | #ifndef __ATE25TextSuitesImportHelper__ 20 | #define __ATE25TextSuitesImportHelper__ 21 | 22 | #include "ATETextSuitesImportHelper.h" 23 | 24 | #define EXTERN_TEXT_SUITES_25\ 25 | EXTERN_TEXT_SUITES 26 | ATE::ATE25DocumentTextResourcesSuite* sATE25DocumentTextResources;\ 27 | ATE::ATE25TextFrameSuite* sATE25TextFrame;\ 28 | ATE::ATE25CharFeaturesSuite* sATE25CharFeatures;\ 29 | ATE::ATE25CharInspectorSuite* sATE25CharInspector;\ 30 | ATE::ATE25FindSuite* sATE25Find;\ 31 | ATE::ATE25ParaFeaturesSuite* sATE25ParaFeatures;\ 32 | ATE::ATE25ParaInspectorSuite* sATE25ParaInspector;\ 33 | ATE::ATE25SpellSuite* sATE25Spell;\ 34 | 35 | #define IMPORT_TEXT_SUITES_25\ 36 | IMPORT_TEXT_SUITES 37 | { kATE25DocumentTextResourcesSuite, kATE25DocumentTextResourcesSuiteVersion, &sATE25DocumentTextResources },\ 38 | { kATE25TextFrameSuite, kATE25TextFrameSuiteVersion, &sATE25TextFrame },\ 39 | { kATE25CharFeaturesSuite, kATE25CharFeaturesSuiteVersion, &sATE25CharFeatures },\ 40 | { kATE25CharInspectorSuite, kATE25CharInspectorSuiteVersion, &sATE25CharInspector },\ 41 | { kATE25FindSuite, kATE25FindSuiteVersion, &sATE25Find },\ 42 | { kATE25ParaFeaturesSuite, kATE25ParaFeaturesSuiteVersion, &sATE25ParaFeatures },\ 43 | { kATE25ParaInspectorSuite, kATE25ParaInspectorSuiteVersion, &sATE25ParaInspector },\ 44 | { kATE25SpellSuite, kATE25SpellSuiteVersion, &sATE25Spell },\ 45 | 46 | #endif //__ATE25TextSuitesImportHelper__ 47 | 48 | 49 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: IAIAutoBuffer.cpp 3 | * $Revision: 1 $ 4 | * Author: 5 | * Date: 6 | * Purpose: Plug-in side implementation of the 7 | * ai::AutoBuffer object interface. 8 | * This file should NOT be included in the 9 | * core application. 10 | * 11 | * ADOBE SYSTEMS INCORPORATED 12 | * Copyright 2004-2007 Adobe Systems Incorporated. 13 | * All rights reserved. 14 | * 15 | * NOTICE: Adobe permits you to use, modify, and distribute this file 16 | * in accordance with the terms of the Adobe license agreement 17 | * accompanying it. If you have received this file from a source other 18 | * than Adobe, then your use, modification, or distribution of it 19 | * requires the prior written permission of Adobe. 20 | * 21 | */ 22 | 23 | #include "IAIAutoBuffer.h" 24 | #include "SPBlocks.h" 25 | 26 | #include "AITypes.h" // For ai::Error & inclusion of ASTypes.h 27 | 28 | #if AI_AUTO_SUITE_AVAILABLE 29 | #include "AutoSuite.h" 30 | use_suite(SPBlocks) 31 | #elif defined(_IAIAUTOBUFFER_SUITE_INCLUDE_H_) 32 | #include _IAIAUTOBUFFER_SUITE_INCLUDE_H_ 33 | #else 34 | #ifndef _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ 35 | #define _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ 1 36 | #endif 37 | #if _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ 38 | extern "C" 39 | { 40 | #endif 41 | /** The plug-in using the ai::AutoBuffer class is required to provide 42 | the SPBlocksSuite pointer. Alternatively, a plug-in may provide 43 | its own implementation for the AllocateBlock and DeleteBlock. 44 | */ 45 | extern SPBlocksSuite *sSPBlocks; 46 | 47 | #if _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ 48 | } 49 | #endif // _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ 50 | 51 | #endif 52 | 53 | 54 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// 55 | // ai::SPAlloc methods 56 | 57 | void* ai::SPAlloc::AllocateBlock (size_t byteCount) 58 | { 59 | void* block = 0; 60 | SPErr spError = sSPBlocks->AllocateBlock( byteCount, "ai::SPAlloc::AllocateBlock", &block ); 61 | if ( spError != 0 ) 62 | { 63 | throw ai::Error(kOutOfMemoryErr); 64 | } 65 | return block; 66 | } 67 | 68 | void ai::SPAlloc::DeleteBlock (void* block) 69 | { 70 | if ( block ) 71 | { 72 | /*SPErr spError =*/ sSPBlocks->FreeBlock (block); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIScriptMessage.h: -------------------------------------------------------------------------------- 1 | #ifndef __AIScriptMessage__ 2 | #define __AIScriptMessage__ 3 | 4 | /* 5 | * Name: AIScriptMessage.h 6 | * $Id $ 7 | * Author: 8 | * Date: 9 | * Purpose: Adobe Illustrator AIScriptMessage. 10 | * 11 | * Copyright (c) 2010 Adobe Systems Incorporated, All Rights Reserved. 12 | * 13 | */ 14 | 15 | 16 | /******************************************************************************* 17 | ** 18 | ** Imports 19 | ** 20 | **/ 21 | #ifndef __AITypes__ 22 | #include "AITypes.h" 23 | #endif 24 | 25 | #ifndef __SPAccess__ 26 | #include "SPAccess.h" 27 | #endif 28 | 29 | #include "IAIUnicodeString.h" 30 | 31 | #include "AIHeaderBegin.h" 32 | 33 | /** @file AIScriptMessage.h */ 34 | /******************************************************************************* 35 | ** 36 | ** Constants 37 | ** 38 | **/ 39 | #define kCallerAIScriptMessage "AI Script Message Caller" 40 | 41 | 42 | /** 43 | Script message structure 44 | */ 45 | struct AIScriptMessage { 46 | /** A buffer in which to return the modified artwork when the message is completed. */ 47 | AIScriptMessage():art(NULL) {} 48 | /** The message data */ 49 | SPMessageData d; 50 | /** The art to be operated on. */ 51 | AIArtHandle art; 52 | /** Developer-defined input parameters to the message. */ 53 | ai::UnicodeString inParam; 54 | /** Developer-defined output parameters for the message. */ 55 | ai::UnicodeString outParam; 56 | }; 57 | 58 | /* 59 | Sample code to send a script message 60 | 61 | AIErr SendScriptMessage(const char* pluginName, const char* selector, const ai::Unicodestring& inputString, ai::Unicodestring& outString) 62 | { 63 | SPPluginRef pluginRef; 64 | error = sSPPlugins->GetNamedPlugin(pluginName, &pluginRef); 65 | 66 | if (!error) 67 | { 68 | AIScriptMessage msg; 69 | msg.inParam = inputString; 70 | 71 | error = sSPInterface->SetupMessageData(pluginRef, &msg.d); 72 | if (!error) 73 | { 74 | error = sSPInterface->SendMessage(pluginRef, kCallerAIScriptMessage, selector, &msg, &spResult); 75 | if (spResult) 76 | error = spResult; 77 | 78 | sSPInterface->EmptyMessageData(pluginRef, &msg.d); 79 | 80 | if(!error) 81 | outString = msg.outParam; 82 | } 83 | } 84 | 85 | return error; 86 | } 87 | */ 88 | #include "AIHeaderEnd.h" 89 | 90 | 91 | #endif // __AIScriptMessage__ 92 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/Suites.hpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef __Suites_hpp__ 17 | #define __Suites_hpp__ 18 | 19 | #include "ASTypes.h" 20 | 21 | #include "SPAccess.h" 22 | #include "SPPlugs.h" 23 | #include "AINotifier.h" 24 | #include "AIContext.h" 25 | #include "AIUser.h" 26 | #include "AIFolders.h" 27 | 28 | // Suites acquired by the Suites class 29 | extern "C" SPAccessSuite *sSPAccess; 30 | extern "C" SPPluginsSuite *sSPPlugins; 31 | extern "C" AINotifierSuite *sAINotifier; 32 | extern "C" AIAppContextSuite *sAIAppContext; 33 | extern "C" AIUserSuite* sAIUser; 34 | extern "C" AIFilePathSuite* sAIFilePath; 35 | extern "C" AIFoldersSuite* sAIFolders; 36 | /* 37 | A dumb "acquire all these suites when I instantiate a Suites object and 38 | release them when it's destroyed" class. 39 | */ 40 | 41 | struct ImportSuite 42 | { 43 | const char *name; 44 | int version; 45 | void *suite; 46 | }; 47 | const ASInt32 kStartOptionalSuites = 'OPTS'; 48 | const ASInt32 kEndAllSuites = 0; 49 | 50 | // The fAcquiredCount field is not necessarily maintained across unload/reloads; 51 | // in fact it probably isn't. Whenever we first create a Suites object after 52 | // being loaded or reloaded, it's important to call InitializeRefCount on it. 53 | 54 | class Suites 55 | { 56 | public: 57 | Suites(); 58 | ~Suites(); 59 | ASErr Error() { return fError; } 60 | 61 | void InitializeRefCount() { fAcquiredCount = 1; } 62 | void acquire_Optional_Suites(); 63 | 64 | private: 65 | static ASUInt16 fAcquiredCount; 66 | ASErr fError; 67 | ASUInt16 fOptionalSuitesTotalCount; 68 | ASUInt16 fRequiredSuitesCount; 69 | ASUInt16 fOptionalSuitesAcquiredCount; 70 | 71 | ASErr AcquireSuites(); 72 | ASErr ReleaseSuites(); 73 | ASErr AcquireSuite(ImportSuite *suite); 74 | ASErr ReleaseSuite(ImportSuite *suite); 75 | }; 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/win/VersionInfo.rc: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 2006 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #include "SDKDef.h" 17 | 18 | // Define kYourSDKPluginName before including this file to set the plug-in name for the version resource. 19 | #ifndef kMySDKPluginName 20 | #define kMySDKPluginName "MySDKPluginName" 21 | #endif 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // VersionInfo 26 | // 27 | 1 VERSIONINFO 28 | FILEVERSION kSDKDefAIMajorVersionNum, kSDKDefAIMinorVersionNum, kSDKDefAIRevisionVersionNum, kSDKDefBuildNumber 29 | PRODUCTVERSION kSDKDefAIMajorVersionNum, kSDKDefAIMinorVersionNum, kSDKDefAIRevisionVersionNum, kSDKDefBuildNumber 30 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 31 | #ifdef _DEBUG 32 | FILEFLAGS VS_FF_DEBUG 33 | #else 34 | FILEFLAGS 0x0L 35 | #endif 36 | FILEOS VOS__WINDOWS32 37 | FILETYPE VFT_DLL 38 | FILESUBTYPE VFT2_UNKNOWN 39 | BEGIN 40 | BLOCK "StringFileInfo" 41 | BEGIN 42 | BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual 43 | BEGIN 44 | VALUE "CompanyName", kSDKDefAIFullCompanyName, "\0" 45 | VALUE "FileDescription", kSDKDefFileDescriptionString, "\0" 46 | VALUE "FileVersion", kSDKDefProductVersionString, "\0" 47 | VALUE "InternalName", kMySDKPluginName, "\0" 48 | VALUE "LegalCopyright", kSDKDefCopyrightString, "\0" 49 | VALUE "OriginalFilename", kMySDKPluginName ".aip", "\0" 50 | VALUE "ProductName", kSDKDefAIFullProductName, "\0" 51 | VALUE "ProductVersion", kSDKDefProductVersionString, "\0" 52 | VALUE "Copyright", kSDKDefCopyrightString, "\0" 53 | END 54 | END 55 | BLOCK "VarFileInfo" 56 | BEGIN 57 | VALUE "Translation", 0x0409, 0x04E4 58 | END 59 | END 60 | ///////////////////////////////////////////////////////////////////////////// 61 | 62 | 63 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDeviceInfo.h: -------------------------------------------------------------------------------- 1 | #ifndef __AIDeviceInfo__ 2 | #define __AIDeviceInfo__ 3 | 4 | /******************************************************************************** 5 | * ADOBE SYSTEMS INCORPORATED 6 | * Copyright 2015 Adobe Systems Incorporated 7 | * All Rights Reserved. 8 | 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 10 | * terms of the Adobe license agreement accompanying it. If you have received this file from a 11 | * source other than Adobe, then your use, modification, or distribution of it requires the prior 12 | * written permission of Adobe. 13 | * 14 | * 15 | * Author: Vivek Agrawal 16 | * Created: 09/10/2015 17 | * Purpose: Adobe Illustrator Device Info Suite 18 | **************************************************************************/ 19 | 20 | 21 | /******************************************************************************* 22 | ** 23 | ** Imports 24 | ** 25 | **/ 26 | 27 | #ifndef __AITypes__ 28 | #include "AITypes.h" 29 | #endif 30 | 31 | #ifndef __AIArt__ 32 | #include "AIArt.h" 33 | #endif 34 | 35 | #include "AIHeaderBegin.h" 36 | 37 | /** @file AIDeviceInfo.h */ 38 | 39 | 40 | /******************************************************************************* 41 | ** 42 | ** Constants 43 | ** 44 | **/ 45 | 46 | #define kAIDeviceInfoSuite "AI DeviceInfo Suite" 47 | #define kAIDeviceInfoSuiteVersion1 AIAPI_VERSION(1) 48 | #define kAIDeviceInfoSuiteVersion kAIDeviceInfoSuiteVersion1 49 | #define kAIDeviceInfoVersion kAIDeviceInfoSuiteVersion 50 | 51 | 52 | /******************************************************************************* 53 | ** 54 | ** Suite 55 | ** 56 | **/ 57 | 58 | 59 | /** @ingroup Suites 60 | This suite provides functions that allow you to access various informations about the 61 | device on which illustrator is running or the device which is being connected for 62 | using illustrator through it. 63 | 64 | \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants 65 | \c #kAIDeviceInfoSuite and \c #kAIDeviceInfoVersion. 66 | */ 67 | struct AIDeviceInfoSuite { 68 | 69 | /* 70 | function: To be used to check whether a tablet is connected or not. This only works for Wacom tablets. 71 | @param: 72 | @out out: An AIBoolean reference in which to return the status whether a tablet is connected or not. 73 | */ 74 | AIAPI AIErr(*IsTabletConnected) (AIBoolean& out); 75 | 76 | }; 77 | 78 | #include "AIHeaderEnd.h" 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/source/SDKErrors.cpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #include "IllustratorSDK.h" 17 | 18 | #include "SDKErrors.h" 19 | 20 | void aisdk::report_error(ASErr err) 21 | { 22 | if (sAIUser) { 23 | char errbuf[5]; 24 | *(reinterpret_cast(errbuf)) = err; 25 | errbuf [4] = '\0'; 26 | char buf[1024]; 27 | #ifdef MAC_ENV 28 | snprintf ( buf, sizeof(buf), "Unexpected internal error=%x, %s", err, errbuf); 29 | #endif 30 | #ifdef WIN_ENV 31 | char tmpbuf[5]; 32 | *(reinterpret_cast(tmpbuf)) = err; 33 | tmpbuf [4] = '\0'; 34 | errbuf[0] = tmpbuf[3]; 35 | errbuf[1] = tmpbuf[2]; 36 | errbuf[2] = tmpbuf[1]; 37 | errbuf[3] = tmpbuf[0]; 38 | _snprintf ( buf, sizeof(buf), "Unexpected internal error=%x, %s", err, errbuf); 39 | #endif 40 | sAIUser->ErrorAlert(ai::UnicodeString(buf)); 41 | } 42 | } 43 | 44 | #ifdef DEBUG 45 | void aisdk::report_assert(const char* message, const char* file, int line, bool throwException) 46 | { 47 | 48 | if (sAIUser) { 49 | char buf[1024]; 50 | #ifdef MAC_ENV 51 | snprintf ( buf, sizeof(buf), "SDK_ASSERT %s\nFile=%s\nLine=%d", message, file, line); 52 | #endif 53 | #ifdef WIN_ENV 54 | _snprintf ( buf, sizeof(buf), "SDK_ASSERT %s\nFile=%s\nLine=%d", message, file, line); 55 | #endif 56 | sAIUser->ErrorAlert(ai::UnicodeString(buf)); 57 | } 58 | 59 | if (throwException) { 60 | check_assertion(false); // throw assert exception 61 | } 62 | } 63 | #endif 64 | 65 | #ifdef DEBUG 66 | char* aisdk::format_args(const char *str, ...) 67 | { 68 | static char buf[1024]; 69 | 70 | va_list args; 71 | va_start(args, str); 72 | #ifdef MAC_ENV 73 | vsnprintf(buf, sizeof(buf) - 1, str, args); 74 | #endif 75 | #ifdef WIN_ENV 76 | _vsnprintf(buf, sizeof(buf) - 1, str, args); 77 | #endif 78 | 79 | va_end(args); 80 | 81 | return buf; 82 | } 83 | #endif 84 | 85 | // End SDKErrors.cpp 86 | -------------------------------------------------------------------------------- /jsx/ts/rect.ts: -------------------------------------------------------------------------------- 1 | "use strict" 2 | 3 | import Utils = require("./utils"); 4 | 5 | /** 6 | * Represents a rectangle in screen coordinate space. 7 | * 8 | * | (-y) 9 | * | 10 | * (-x) | (+x) 11 | * -------------------------------- 12 | * | 13 | * | 14 | * | (+y) 15 | */ 16 | class Rect { 17 | private x1: number; 18 | private y1: number; 19 | private x2: number; 20 | private y2: number; 21 | 22 | /** 23 | * @param bounds - an array of 4 numbers, left, top, right, bottom 24 | * @constructor 25 | */ 26 | constructor(bounds: number[]) { 27 | this.x1 = bounds[0]; 28 | this.y1 = bounds[1]; 29 | this.x2 = bounds[2]; 30 | this.y2 = bounds[3]; 31 | } 32 | 33 | public getLeft(): number { 34 | return this.x1; 35 | } 36 | 37 | public getTop(): number { 38 | return this.y1; 39 | } 40 | 41 | public getRight(): number { 42 | return this.x2; 43 | } 44 | 45 | public getBottom(): number { 46 | return this.y2; 47 | } 48 | 49 | public getX(): number { 50 | return this.x1; 51 | } 52 | /** Update the x position without changing width */ 53 | public setX(value: number): void { 54 | let delta = value - this.x1; 55 | this.x1 = value; 56 | this.x2 += delta; 57 | } 58 | 59 | public getY(): number { 60 | return this.y1; 61 | } 62 | /** Update the y position without changing height */ 63 | public setY(value: number): void { 64 | let delta = value - this.y1; 65 | this.y1 = value; 66 | this.y2 += delta; 67 | } 68 | 69 | public getWidth(): number { 70 | return Math.abs(this.x1 - this.x2); 71 | } 72 | /** Update the width without adjusting the x position */ 73 | public setWidth(value: number): void { 74 | this.x2 = this.x1 + value; 75 | } 76 | 77 | public getHeight(): number { 78 | return Math.abs(this.y1 - this.y2); 79 | } 80 | /** Update the height without adjusting the y position */ 81 | public setHeight(value: number): void { 82 | this.y2 = this.y1 + value; 83 | } 84 | 85 | public equals(rect: Rect): boolean { 86 | if (Utils.nearlyEqual(this.x1, rect.x1) && 87 | Utils.nearlyEqual(this.y1, rect.y1) && 88 | Utils.nearlyEqual(this.x2, rect.x2) && 89 | Utils.nearlyEqual(this.y2, rect.y2)) { 90 | return true; 91 | } 92 | 93 | return false; 94 | } 95 | } 96 | 97 | export = Rect; -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderBegin.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* AIHeaderBegin.h */ 4 | /* A standard place to put the junk that occurs at the beginning */ 5 | /* of all of our headers. This is all reset with AIHeaderEnd.h */ 6 | /* */ 7 | /* ADOBE SYSTEMS INCORPORATED */ 8 | /* Copyright 2005-2007 Adobe Systems Incorporated. */ 9 | /* All Rights Reserved. */ 10 | /* */ 11 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 12 | /* in accordance with the terms of the Adobe license agreement */ 13 | /* accompanying it. If you have received this file from a source other */ 14 | /* than Adobe, then your use, modification, or distribution of it */ 15 | /* requires the prior written permission of Adobe. */ 16 | /* */ 17 | /* Patents Pending */ 18 | /* */ 19 | /* */ 20 | /* Started by Dave MacLachlan, 07/10/2005 */ 21 | /* */ 22 | /***********************************************************************/ 23 | 24 | #if defined(__AIHeaderBegin_H__) 25 | #error __AIHeaderBegin_H__ included multiple times in a single file 26 | #endif 27 | 28 | #define __AIHeaderBegin_H__ 1 29 | 30 | #include "AIExternDef.h" 31 | 32 | #ifndef __ASConfig__ 33 | #include "ASConfig.h" 34 | #endif 35 | 36 | AI_EXTERN_C_BEGIN 37 | 38 | #ifdef MAC_ENV 39 | //power_gcc on MWERKS is basically equivalent to power on GCC 40 | #if defined (__MWERKS__) 41 | #pragma options align=power_gcc 42 | #pragma enumsalwaysint on 43 | #elif defined (__GNUC__) 44 | //GCC doesn't allow non int enums without using an attribute decl directly on 45 | //the enum, so no need to set it 46 | #pragma options align=power 47 | #endif 48 | #endif 49 | 50 | #if defined(WIN_ENV) 51 | #pragma warning(disable: 4103) // Gets rid of the unbalanced alignment warning. 52 | #pragma pack(push, 8) 53 | #endif 54 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2018 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #include "AIAssert.hpp" 18 | 19 | #if AI_ASSERTS_ENABLED 20 | 21 | #ifdef WIN_ENV 22 | #include 23 | namespace ai 24 | { 25 | void ShowPlatformAssert(const bool success, const char* message) 26 | { 27 | if (success) 28 | return; 29 | bool shouldBreak = IDYES == ::MessageBoxA(nullptr, message, "Assertion failure, Do you want to Debug?", MB_YESNO | MB_ICONSTOP | MB_TASKMODAL | MB_TOPMOST); 30 | if (shouldBreak) 31 | { 32 | __debugbreak(); 33 | } 34 | } 35 | } 36 | #elif defined(LINUX_ENV) 37 | #include 38 | #include 39 | namespace ai 40 | { 41 | void ShowPlatformAssert(const bool success, const char* message) 42 | { 43 | if (!success) 44 | std::cout << "Assertion failed: " << message << std::endl; 45 | assert(false); 46 | } 47 | } 48 | #elif !defined(IOS_ENV) 49 | #include 50 | namespace ai 51 | { 52 | void ShowPlatformAssert(const bool success, const char* message) 53 | { 54 | if (success) 55 | return; 56 | bool shouldBreak = false; 57 | @autoreleasepool 58 | { 59 | NSAlert *alert = [[[NSAlert alloc] init] autorelease]; 60 | if(alert) 61 | { 62 | [alert setMessageText:@"Assertion failure, Do you want to Debug?"]; 63 | [alert addButtonWithTitle:@"Yes"]; 64 | [alert addButtonWithTitle:@"No"]; 65 | NSString *msgStr = [NSString stringWithCString:message encoding:NSASCIIStringEncoding]; 66 | [alert setInformativeText:msgStr]; 67 | [alert setAlertStyle:NSAlertStyleWarning]; 68 | shouldBreak = [alert runModal] == NSAlertFirstButtonReturn; 69 | } 70 | } 71 | if(shouldBreak) 72 | { 73 | __builtin_debugtrap(); 74 | } 75 | } 76 | } 77 | #endif//WIN_ENV 78 | 79 | #endif // AI_ASSERTS_ENABLED 80 | 81 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AILivePaintAction.h: -------------------------------------------------------------------------------- 1 | #ifndef _AILIVEPAINTACTION_H_ 2 | #define _AILIVEPAINTACTION_H_ 3 | 4 | /* 5 | * Name: AILivePaintAction.h 6 | * Purpose: Adobe Illustrator 12.0 Actions for Live Paint objects. 7 | * 8 | * ADOBE SYSTEMS INCORPORATED 9 | * Copyright 2005-2007 Adobe Systems Incorporated. 10 | * All rights reserved. 11 | * 12 | * NOTICE: Adobe permits you to use, modify, and distribute this file 13 | * in accordance with the terms of the Adobe license agreement 14 | * accompanying it. If you have received this file from a source other 15 | * than Adobe, then your use, modification, or distribution of it 16 | * requires the prior written permission of Adobe. 17 | * 18 | */ 19 | 20 | #ifndef __AIActionManager_h__ 21 | #include "AIActionManager.h" 22 | #endif 23 | 24 | /** Action > LivePaint command identifier, "Make" */ 25 | #define kPlanarActionMake 1 26 | /** Action > LivePaint command identifier, "Expand" */ 27 | #define kPlanarActionRelease 2 28 | /** Action > LivePaint command identifier, "Release" */ 29 | #define kPlanarActionExpand 3 30 | /** Action > LivePaint command identifier, "Gap Options" */ 31 | #define kPlanarActionOptions 4 32 | 33 | 34 | /** @ingroup Actions 35 | Runs an operation from a Live Paint submenu 36 | @param #kAILivePaintMenuItem The menu item to run, one of: 37 |
\c #kPlanarActionMake "Make" 38 |
\c #kPlanarActionRelease "Release" 39 |
\c #kPlanarActionExpand "Expand" 40 |
\c #kPlanarActionOptions "Gap Options" 41 | @param #kAILivePaintGapDetect When item is "Gap Options", whether to 42 | turn on gap detection. 43 | @param #kAILivePaintGapSize When item is "Gap Options", the point size of 44 | gaps to tolerate. 45 | @param #kAILivePaintCloseGaps When item is "Gap Options", whether to 46 | close gaps with real paths. 47 | */ 48 | #define kAILivePaintMenuAction "ai_plugin_planetx" 49 | 50 | /** Parameter to \c #kAILivePaintMenuAction. The menu item to run. */ 51 | const ActionParamKeyID kAILivePaintMenuItem = 'menu'; // enum 52 | /** Parameter to \c #kAILivePaintMenuAction. Whether to turn on gap detection.*/ 53 | const ActionParamKeyID kAILivePaintGapDetect = 'gdct'; // bool 54 | /** Parameter to \c #kAILivePaintMenuAction. The point size of gaps to tolerate.*/ 55 | const ActionParamKeyID kAILivePaintGapSize = 'gsiz'; // unit real 56 | /** Parameter to \c #kAILivePaintMenuAction. Whether to close gaps with real paths. */ 57 | const ActionParamKeyID kAILivePaintCloseGaps = 'gexp'; // bool 58 | 59 | #endif // _AILIVEPAINTACTION_H_ 60 | -------------------------------------------------------------------------------- /BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 11 | 12 | 13 | {0726551e-619e-4dcb-b2a9-1c60b7bb495a} 14 | 15 | 16 | 17 | 18 | Source Files 19 | 20 | 21 | Vendor Source 22 | 23 | 24 | Source Files 25 | 26 | 27 | Vendor Source 28 | 29 | 30 | Vendor Source 31 | 32 | 33 | Vendor Source 34 | 35 | 36 | Vendor Source 37 | 38 | 39 | Vendor Source 40 | 41 | 42 | Vendor Source 43 | 44 | 45 | 46 | 47 | Source Files 48 | 49 | 50 | Source Files 51 | 52 | 53 | Source Files 54 | 55 | 56 | Resource Files 57 | 58 | 59 | 60 | 61 | Resource Files 62 | 63 | 64 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/SDKDef.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef __SDKDef_h__ 17 | #define __SDKDef_h__ 18 | 19 | /* 20 | // VersionInfo: 21 | // Version information for SDK plug-ins. 22 | // This file is parsed by rez, plc as well as C++ compilers. 23 | // It must only contain preprocessor definitions. 24 | */ 25 | #ifndef __PLIST__ 26 | #define __STRING__(x) SDKDef_InternalMacroToString(x) 27 | #define SDKDef_InternalMacroToString(x) #x 28 | #endif 29 | #define kSDKDefBuildNumber 0 30 | 31 | #define kSDKDefAIMajorVersionNum 25 32 | #define kSDKDefAIMinorVersionNum 3 33 | #define kSDKDefAIRevisionVersionNum 0 34 | //eg "15.0.0.0" 35 | #define kSDKDefAIShortVersionString __STRING__(kSDKDefAIMajorVersionNum) "." __STRING__(kSDKDefAIMinorVersionNum) "." __STRING__(kSDKDefAIRevisionVersionNum) "." __STRING__(kSDKDefBuildNumber) 36 | #define kSDKDefAIFullCompanyName "Adobe Systems Incorporated" 37 | #define kSDKDefAIFullProductName "Adobe Illustrator" 38 | //Mac specific for Plists 39 | #define kSDKDefAIBundlePrefix com.adobe.illustrator 40 | 41 | #define kSDKDefCopyrightString "Copyright © 1987-2021 by Adobe Inc. All rights reserved." 42 | #define kSDKDefFileDescriptionString "Adobe Illustrator SDK Plug-in" 43 | //eg "15.0" 44 | #define kSDKDefProductVersionString __STRING__(kSDKDefAIMajorVersionNum) "." __STRING__(kSDKDefAIMinorVersionNum) 45 | #define kSDKDefAboutPluginString "An Adobe Illustrator SDK plugin http://partners.adobe.com" 46 | 47 | 48 | /* About Plug-ins menu 49 | */ 50 | // Group name and ui display string for About Plug-ins menu for SDK sample plug-ins - third parties should add their own group. 51 | #define kSDKDefAboutSDKCompanyPluginsGroupName "SDKAboutPluginsGroupName" 52 | #define kSDKDefAboutSDKCompanyPluginsGroupNameString "About SDK Plug-ins" 53 | 54 | // About box description for SDK plug-ins 55 | #define kSDKDefAboutSDKCompanyPluginsAlertString "An Adobe Illustrator SDK sample\nhttp://www.adobe.com/devnet/\nCopyright © 1987-2021 by Adobe Inc. All rights reserved." 56 | #endif //__SDKDef_h__ 57 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/includes/IllustratorSDK.h: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | #ifndef __IllustratorSDK__ 17 | #define __IllustratorSDK__ 18 | 19 | #include "SPConfig.h" 20 | 21 | // std library 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | // several methods are now deprecated on windows xp but not mactel or ppc, the following define statements determine which method 31 | // name to use on which platform 32 | 33 | #ifdef MAC_ENV 34 | #include 35 | #endif 36 | 37 | #ifdef WIN_ENV 38 | #include "windows.h" 39 | #include 40 | //The following defines were added to keep the methods cross platform after they were deprecated on Windows. 41 | #define strcpy strcpy_s 42 | #define sprintf sprintf_s 43 | #define strncpy strncpy_s 44 | #define strcat strcat_s 45 | #define _strdate _strdate_s 46 | #define fopen fopen_s 47 | #define _strtime _strtime_s 48 | #endif 49 | 50 | using namespace std; 51 | 52 | 53 | // sweet pea headers 54 | #include "SPTypes.h" 55 | #include "SPBlocks.h" 56 | 57 | // illustrator headers 58 | #include "AITypes.h" 59 | #include "AIArt.h" 60 | #include "AIArtSet.h" 61 | #include "AICSXSExtension.h" 62 | #include "AIDictionary.h" 63 | #include "AIDocument.h" 64 | #include "AIHardSoft.h" 65 | #include "AILayer.h" 66 | #include "AILegacyTextConversion.h" 67 | #include "AIMatchingArt.h" 68 | #include "AIMdMemory.h" 69 | #include "AIMenu.h" 70 | #include "AIMenuGroups.h" 71 | #include "AINotifier.h" 72 | #include "AIPath.h" 73 | #include "AIPathStyle.h" 74 | #include "AIPlugin.h" 75 | #include "AIPreference.h" 76 | #include "AITextFrame.h" 77 | #include "AITimer.h" 78 | #include "AITool.h" 79 | #include "AIRuntime.h" 80 | #include "AIUndo.h" 81 | #include "AIUser.h" 82 | 83 | // ATE text API 84 | #include "IText.h" 85 | 86 | // SDK common headers 87 | #include "Suites.hpp" 88 | #include "Plugin.hpp" 89 | 90 | #endif // __IllustratorSDK__ 91 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIModalParent.h: -------------------------------------------------------------------------------- 1 | /************************************************************************/ 2 | /* */ 3 | /* Name : AIModalParent.h */ 4 | /* $Revision : 1$ */ 5 | /* Author : */ 6 | /* Date : 16 Jan 2012 */ 7 | /* Purpose : Suite for Creating and Managing Control bars */ 8 | /* */ 9 | /* ADOBE SYSTEMS INCORPORATED */ 10 | /* Copyright 2011 Adobe Systems Incorporated. */ 11 | /* All rights reserved. */ 12 | /* */ 13 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 14 | /* in accordance with the terms of the Adobe license agreement */ 15 | /* accompanying it. If you have received this file from a source other */ 16 | /* than Adobe, then your use, modification, or distribution of it */ 17 | /* requires the prior written permission of Adobe. */ 18 | /* */ 19 | /************************************************************************/ 20 | 21 | #ifndef __AIMODALPARENT_H__ 22 | #define __AIMODALPARENT_H__ 23 | 24 | #include "AITypes.h" 25 | #include "IAIUnicodeString.h" 26 | 27 | 28 | 29 | /** @file AIControlBar.h */ 30 | 31 | /******************************************************************************* 32 | ** 33 | ** Constants 34 | ** 35 | **/ 36 | 37 | #define kAIModalParentSuite "AI Modal Parent Suite" 38 | #define kAIModalParentSuiteVersion2 AIAPI_VERSION(2) 39 | #define kAIModalParentSuiteVersion kAIModalParentSuiteVersion2 40 | #define kAIModalParentVersion kAIModalParentSuiteVersion 41 | 42 | /******************************************************************************* 43 | ** 44 | ** Types 45 | ** 46 | **/ 47 | #ifdef WIN_ENV 48 | typedef HWND AIPlatformWindow; 49 | #elif defined(MAC_ENV) 50 | #ifdef __OBJC__ 51 | @class NSWindow; 52 | typedef NSWindow* AIPlatformWindow; 53 | #else 54 | typedef void* AIPlatformWindow; 55 | #endif 56 | #else 57 | #error unknown configuration 58 | #endif 59 | 60 | /******************************************************************************* 61 | ** 62 | ** Suite 63 | ** 64 | **/ 65 | 66 | /** @ingroup Suites 67 | This suite provides functions for specifying the parent window of an AI dialog. 68 | This is required only when AI's dialog is to be shown over a third party modal dialog on Windows. 69 | 70 | \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants 71 | \c #kAIModalParentSuite and \c #kAIModalParentSuiteVersion. 72 | */ 73 | struct AIModalParentSuite{ 74 | 75 | AIAPI AIErr (*SetParent)(const AIPlatformWindow& inParent); 76 | 77 | AIAPI AIErr (*RemoveParent)(); 78 | 79 | }; 80 | 81 | 82 | #endif //__AIMODALPARENT_H__ -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterExport.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * ADOBE CONFIDENTIAL 3 | * ___________________ 4 | * 5 | * Copyright 2017 Adobe Systems Incorporated 6 | * All Rights Reserved. 7 | * 8 | * NOTICE: All information contained herein is, and remains 9 | * the property of Adobe Systems Incorporated and its suppliers, 10 | * if any. The intellectual and technical concepts contained 11 | * herein are proprietary to Adobe Systems Incorporated and its 12 | * suppliers and are protected by all applicable intellectual property 13 | * laws, including trade secret and copyright laws. 14 | * Dissemination of this information or reproduction of this material 15 | * is strictly forbidden unless prior written permission is obtained 16 | * from Adobe Systems Incorporated. 17 | **************************************************************************/ 18 | 19 | 20 | #pragma once 21 | 22 | #include "AITypes.h" 23 | #include "AIFilePath.h" 24 | #include "AIDictionary.h" 25 | #include "IAIRef.h" 26 | #include "AIHeaderBegin.h" 27 | 28 | 29 | #define kAIRasterExportSuite "AI Raster Export Suite" 30 | #define kAIRasterExportSuiteVersion AIAPI_VERSION(1) 31 | 32 | 33 | enum AIRasterFileFormats:ai::uint8 34 | { 35 | kAIFormatUnknown = 0, 36 | kAIFormatPSD, 37 | kAIFormatTIFF 38 | }; 39 | 40 | 41 | struct AIRasterExportSuite { 42 | 43 | // This function allows the client to export an art in various formats. It accepts several parameters: 44 | // @param hRaster is the opaque reference to an art object which need not be raster art. API will rasterize it first. 45 | // @param filePath is the location of exported file. 46 | // @param AIRasterFileFormats are the supported file formats. 47 | // @param ConstAIDictionaryRef is a dictionary variable taken up by the client. 48 | /* 49 | #include "AITIFFKeys.h" 50 | #include "IAIDictionary.hpp" 51 | #include "AIRasterExport.h" 52 | #include "AITypes.h" 53 | #include "AIDictionary.h" 54 | #include "AIDictionaryKeyHelper.hpp" 55 | 56 | use_suite_required(AIRasterExport) 57 | use_suite_required(AIDictionary) 58 | 59 | #define kAiAntiAlias "AntiAlias" 60 | 61 | DictionaryKeyDeclareAndDefine(kAIAntiAliasKey, kAiAntiAlias); 62 | 63 | AIErr ExportToTiff(const AIArtHandle hRaster, const ai::FilePath& path) 64 | { 65 | ai::Dictionary dict; 66 | dict.Set(kAIAntiAliasKey, 1); 67 | return sAIRasterExport->RasterExport(hRaster, path, kAIFormatTIFF, dict.get()); 68 | } 69 | 70 | */ 71 | AIAPI AIErr(*RasterExport)(const AIArtHandle hRaster, const ai::FilePath& filePath, AIRasterFileFormats format, 72 | ai::Ref formatOptionsDict); 73 | 74 | }; 75 | 76 | 77 | #include "AIHeaderEnd.h" 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIApplication.h: -------------------------------------------------------------------------------- 1 | #ifndef __AIApplication__ 2 | #define __AIApplication__ 3 | 4 | /* 5 | * Name: AIApplication.h 6 | * $Revision: 1 $ 7 | * Author: 8 | * Date: 9 | * Purpose: Adobe Illustrator Document Suite. 10 | * 11 | * ADOBE SYSTEMS INCORPORATED 12 | * Copyright 1986-2007 Adobe Systems Incorporated. 13 | * All rights reserved. 14 | * 15 | * NOTICE: Adobe permits you to use, modify, and distribute this file 16 | * in accordance with the terms of the Adobe license agreement 17 | * accompanying it. If you have received this file from a source other 18 | * than Adobe, then your use, modification, or distribution of it 19 | * requires the prior written permission of Adobe. 20 | * 21 | */ 22 | 23 | 24 | /******************************************************************************* 25 | ** 26 | ** Imports 27 | ** 28 | **/ 29 | 30 | #ifndef __AITypes__ 31 | #include "AITypes.h" 32 | #endif 33 | 34 | #ifndef __DocumentList__ 35 | #include "AIDocumentList.h" 36 | #endif 37 | 38 | #include "AIHeaderBegin.h" 39 | 40 | /** @file AIApplication.h */ 41 | 42 | /******************************************************************************* 43 | ** 44 | ** Constants 45 | ** 46 | **/ 47 | 48 | #define kAIApplicationSuite "AI Application Suite" 49 | #define kAIApplicationSuiteVersion3 AIAPI_VERSION(3) 50 | 51 | // latest version 52 | #define kAIApplicationSuiteVersion kAIApplicationSuiteVersion3 53 | #define kAIApplicationVersion kAIApplicationSuiteVersion 54 | 55 | 56 | /******************************************************************************* 57 | ** 58 | ** Types 59 | ** 60 | **/ 61 | 62 | 63 | /******************************************************************************* 64 | ** 65 | ** Suite 66 | ** 67 | **/ 68 | 69 | /** @ingroup Suites 70 | The Application suite provides functions for querying and controlling the state 71 | of a plug-in host application. 72 | 73 | \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants 74 | \c #kAIApplicationSuite and \c #kAIApplicationVersion. 75 | */ 76 | 77 | typedef struct { 78 | 79 | /** Instructs the application to quit. This is identical to the user issuing a quit command. */ 80 | AIAPI AIErr (*Quit) (); 81 | /** Returns true if this is the first time the application has run. Not implemented.Always returns false. */ 82 | AIAPI ASBoolean (*IsFirstTime)(); 83 | /** Returns true if the application visible. Only implemented in Windows. */ 84 | AIAPI ASBoolean (*IsVisible)(); 85 | /** Hide or show the application. Not implemented. */ 86 | AIAPI AIErr (*SetVisible)(ASBoolean bVisible); 87 | 88 | } AIApplicationSuite; 89 | 90 | 91 | 92 | #include "AIHeaderEnd.h" 93 | 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AISFWUtilities.h: -------------------------------------------------------------------------------- 1 | #ifndef __AISFWUTILITIES__ 2 | #define __AISFWUTILITIES__ 3 | 4 | /* 5 | * Name: AISFWUtilities.h 6 | * Purpose: Adobe Illustrator Save For Web Utilities Suite 7 | * 8 | * ADOBE SYSTEMS INCORPORATED 9 | * Copyright 1986-2007 Adobe Systems Incorporated. 10 | * All rights reserved. 11 | * 12 | * NOTICE: Adobe permits you to use, modify, and distribute this file 13 | * in accordance with the terms of the Adobe license agreement 14 | * accompanying it. If you have received this file from a source other 15 | * than Adobe, then your use, modification, or distribution of it 16 | * requires the prior written permission of Adobe. 17 | * 18 | */ 19 | 20 | 21 | /******************************************************************************* 22 | ** 23 | ** Imports 24 | ** 25 | **/ 26 | 27 | #ifndef __AITypes__ 28 | #include "AITypes.h" 29 | #endif 30 | #ifndef __AIDataFilter__ 31 | #include "AIDataFilter.h" 32 | #endif 33 | #ifndef __AIFileFormat__ 34 | #include "AIFileFormat.h" 35 | #endif 36 | 37 | 38 | #include "AIHeaderBegin.h" 39 | 40 | /** @file AISFWUtilities.h */ 41 | 42 | 43 | /******************************************************************************* 44 | ** 45 | ** Constants 46 | ** 47 | **/ 48 | 49 | #define kAISFWUtilitiesSuite "AI SFW Utilities Suite" 50 | #define kAISFWUtilitiesSuiteVersion4 AIAPI_VERSION(4) 51 | 52 | /* Latest version */ 53 | #define kAISFWUtilitiesSuiteVersion kAISFWUtilitiesSuiteVersion4 54 | #define kAISFWUtilitiesVersion kAISFWUtilitiesSuiteVersion 55 | 56 | /******************************************************************************* 57 | ** 58 | ** Suite 59 | ** 60 | **/ 61 | 62 | /** @ingroup Suites 63 | This suite provides access to save-for-Web features. 64 | 65 | \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants 66 | \c #kAISFWUtilitiesSuite and \c #kAISFWUtilitiesSuiteVersion. 67 | */ 68 | typedef struct { 69 | 70 | /** Retrieves the location of the file in which application Save-For-Web 71 | settings are saved. 72 | @param outFileSpec [out] A buffer in which to return the file 73 | specification. 74 | */ 75 | AIAPI AIErr (*GetSaveSettingsDirectory) (ai::FilePath &outFileSpec); 76 | 77 | /** Displays the Slice Options dialog, which allows the user 78 | to set the options for an image slice. This is the dialog shown 79 | when you create a slice in the document (draw an object, choose Object>Slice>Make), 80 | select it, and choose Object>Slice>Slice Options. Modifiable options 81 | in this dialog include slice type, name, URL, target, message, alternate 82 | text, and background color. 83 | @param inSliceID The unique slice identifier. 84 | */ 85 | AIAPI AIErr (*ShowSliceOptions) (ai::int32 inSliceID); 86 | 87 | } AISFWUtilitiesSuite; 88 | 89 | 90 | #include "AIHeaderEnd.h" 91 | 92 | 93 | #endif 94 | 95 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPConfig.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* SPConfig.h */ 4 | /* */ 5 | /* ADOBE SYSTEMS INCORPORATED */ 6 | /* Copyright 1995-2007 Adobe Systems Incorporated. */ 7 | /* All Rights Reserved. */ 8 | /* */ 9 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 10 | /* in accordance with the terms of the Adobe license agreement */ 11 | /* accompanying it. If you have received this file from a source other */ 12 | /* than Adobe, then your use, modification, or distribution of it */ 13 | /* requires the prior written permission of Adobe. */ 14 | /* */ 15 | /* Patents Pending */ 16 | /* */ 17 | /* */ 18 | /***********************************************************************/ 19 | 20 | /** 21 | 22 | SPConfig.h is the environment configuration file for Sweet Pea. It 23 | defines MAC_ENV/WIN_ENV/IOS_ENV/LINUX_ENV. These are used to control platform-specific 24 | sections of code. 25 | 26 | **/ 27 | 28 | #ifndef __SPCnfig__ 29 | #define __SPCnfig__ 30 | 31 | /* 32 | * Defines for Metrowerks 33 | */ 34 | #if defined (__MWERKS__) 35 | #if defined (__POWERPC__) 36 | #ifndef MAC_ENV 37 | #define MAC_ENV 1 38 | #endif 39 | #endif 40 | #if defined (__INTEL__) 41 | #ifndef WIN_ENV 42 | #define WIN_ENV 1 43 | #endif 44 | #endif 45 | #endif 46 | 47 | /* 48 | * Defines for GNU 49 | */ 50 | #if defined(__GNUC__) 51 | #if ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) ) 52 | #ifndef MAC_ENV 53 | #define MAC_ENV 1 54 | #endif 55 | #endif 56 | #if defined (__INTEL__) 57 | #ifndef WIN_ENV 58 | #define WIN_ENV 1 59 | #endif 60 | #endif 61 | #endif 62 | 63 | /* 64 | * Defines for Visual C++ on Windows. 65 | */ 66 | #ifdef _MSC_VER 67 | #ifndef WIN_ENV 68 | #define WIN_ENV 1 69 | #endif 70 | #endif 71 | 72 | /* 73 | * Make certain that one and only one of the platform constants is defined. 74 | */ 75 | 76 | #if !defined(WIN_ENV) && !defined(MAC_ENV) && !defined(IOS_ENV) && !defined(LINUX_ENV) 77 | #error 78 | #endif 79 | 80 | #if defined(WIN_ENV) && defined(MAC_ENV) 81 | #error 82 | #endif 83 | 84 | #if defined(WIN_ENV) && defined(LINUX_ENV) 85 | #error 86 | #endif 87 | 88 | #if defined(LINUX_ENV) && defined(MAC_ENV) 89 | #error 90 | #endif 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAutoCoordinateSystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Name: AIAutoCoordinateSystem.h 3 | * Author: Started by Pushp 4 | * Date: January, 2009 5 | * Purpose: Adobe Illustrator AutoCoordinateSystem Auto object 6 | * 7 | * ADOBE SYSTEMS INCORPORATED 8 | * Copyright 2008 Adobe Systems Incorporated. 9 | * All rights reserved. 10 | * 11 | * NOTICE: Adobe permits you to use, modify, and distribute this file 12 | * in accordance with the terms of the Adobe license agreement 13 | * accompanying it. If you have received this file from a source other 14 | * than Adobe, then your use, modification, or distribution of it 15 | * requires the prior written permission of Adobe. 16 | * 17 | */ 18 | #pragma once 19 | 20 | #ifndef _AIAutoCoordinateSystem_H_ 21 | #define _AIAutoCoordinateSystem_H_ 22 | 23 | #include "AIHardSoft.h" 24 | 25 | #ifdef _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_ 26 | #include _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_ 27 | #elif AI_AUTO_SUITE_AVAILABLE 28 | #include "AutoSuite.h" 29 | extern_declare_suite(AIHardSoft); 30 | #else 31 | #ifndef _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 32 | #define _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 1 33 | #endif 34 | #if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 35 | extern "C" 36 | { 37 | #endif 38 | /** A plug-in using the \c #ai::AutoCoordinateSystem class is required to provide 39 | these global suite pointers. These pointers must be valid prior 40 | to any call to \c #ai::AutoCoordinateSystem methods. 41 | */ 42 | extern AIHardSoftSuite* sAIHardSoft; 43 | 44 | #if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 45 | } 46 | #endif // _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 47 | 48 | #endif 49 | 50 | namespace ai 51 | { 52 | /** A stack object used to change the coordinate system 53 | to be used by Illustrator API functions. The coordinate 54 | system remains in use until the destruction of this object. 55 | @see \c #kAIHardSoftSuite 56 | */ 57 | 58 | class AutoCoordinateSystem 59 | { 60 | public: 61 | /** 62 | Changes the coordinate system to be used by Illustrator API functions. 63 | The coordinate system remains in use until the destruction of this object, 64 | at which time the previous system is restored. 65 | @see \c #kAIHardSoftSuite 66 | 67 | @param coordinateSystem [in] The new coordinate system constant, an \c #AICoordinateSystem value. 68 | 69 | */ 70 | AutoCoordinateSystem(AICoordinateSystem coordinateSystem= kAICurrentCoordinateSystem) 71 | { 72 | sAIHardSoft->GetCoordinateSystem(fCoordinateSystem); 73 | sAIHardSoft->SetCoordinateSystem(coordinateSystem); 74 | } 75 | /** 76 | Destructor. Resets the coordinate system used by Illustrator API functions 77 | to the one that was saved when this object was created. 78 | */ 79 | ~AutoCoordinateSystem() 80 | { 81 | try 82 | { 83 | sAIHardSoft->SetCoordinateSystem(fCoordinateSystem); 84 | } 85 | catch (...) 86 | { 87 | } 88 | } 89 | private: 90 | ai::int32 fCoordinateSystem; 91 | }; 92 | } 93 | 94 | #endif -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/mac/Plugin.r: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1987 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | // This resource file handles PIPL resources for the Illustrator SDK projects. 17 | 18 | #include "PiPL.r" 19 | 20 | //This defines the name of the plug-in, this is left blank otherwise this file would be project specific 21 | #ifndef PIPL_PLUGIN_NAME 22 | #error Need to define plugin name 23 | //#define PIPL_PLUGIN_NAME "" 24 | #endif 25 | 26 | //Define this if your plugin exports any suites. This will guarantee them being earlier in the load order 27 | #ifndef PIPL_EXPORT 28 | #define PIPL_EXPORT 0 29 | #else 30 | // There is no need to define suites, just turning on the export flag is enough, however, 31 | // if you do define exported suites, the list should like the one below: 32 | // The first entry is the suite name, the second is the suite version. 33 | #ifndef PIPL_EXPORTED_SUITES 34 | #define PIPL_EXPORTED_SUITES { "Exported Suite", 1 } 35 | #endif 36 | #endif 37 | 38 | #ifndef PIPL_MESSAGE 39 | #define PIPL_MESSAGE 0 40 | //Define PIPL_MESSAGES to a List of the Messages you want from PiPL.r if you want to be able to use messages 41 | //#define PIPL_MESSAGES startupRequired,purgeCache,shutdownRequired,acceptProperty 42 | #endif 43 | 44 | //If you are an adaptor plugin, define this 45 | #ifndef PIPL_ADAPTOR 46 | #define PIPL_ADAPTOR 0 47 | #endif 48 | 49 | #define TARGET ADBECodeCarbon 50 | #ifndef PPC_PIPL_ENTRY 51 | #define PPC_PIPL_ENTRY 0,0,"" 52 | #endif 53 | #define TARGET1 ADBECodeMachO 54 | #ifndef PIPL_ENTRY 55 | #define PIPL_ENTRY "" 56 | #endif 57 | #define TARGET2 ADBECodeMacIntel32 58 | #ifndef PIPL_ENTRY 59 | #define PIPL_ENTRY "" 60 | #endif 61 | 62 | resource 'PiPL' (16000, PIPL_PLUGIN_NAME " PiPL", purgeable) 63 | { 64 | { 65 | ADBEKind {'SPEA'}, 66 | InterfaceVersion { 2 }, 67 | TARGET 68 | { 69 | PPC_PIPL_ENTRY 70 | }, 71 | TARGET1 72 | { 73 | PIPL_ENTRY 74 | }, 75 | TARGET2 76 | { 77 | PIPL_ENTRY 78 | }, 79 | #if PIPL_EXPORT 80 | Exports 81 | { 82 | PIPL_EXPORTED_SUITES 83 | }, 84 | #endif 85 | #if PIPL_MESSAGE 86 | Messages 87 | { 88 | PIPL_MESSAGES 89 | }, 90 | #endif 91 | #if PIPL_ADAPTOR 92 | AdapterVersion { 2 } 93 | #endif 94 | InternalName 95 | { 96 | PIPL_PLUGIN_NAME 97 | } 98 | } 99 | }; 100 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPMData.h: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* SPMData.h */ 4 | /* */ 5 | /* ADOBE SYSTEMS INCORPORATED */ 6 | /* Copyright 1995-2007 Adobe Systems Incorporated. */ 7 | /* All Rights Reserved. */ 8 | /* */ 9 | /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 10 | /* in accordance with the terms of the Adobe license agreement */ 11 | /* accompanying it. If you have received this file from a source other */ 12 | /* than Adobe, then your use, modification, or distribution of it */ 13 | /* requires the prior written permission of Adobe. */ 14 | /* */ 15 | /* Patents Pending */ 16 | /* */ 17 | /* */ 18 | /***********************************************************************/ 19 | 20 | #ifndef __SPMessageData__ 21 | #define __SPMessageData__ 22 | 23 | 24 | /******************************************************************************* 25 | ** 26 | ** Imports 27 | ** 28 | **/ 29 | 30 | #include "SPTypes.h" 31 | #include "AIBasicTypes.h" 32 | 33 | #include "SPHeaderBegin.h" 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | 40 | /******************************************************************************* 41 | ** 42 | ** Types 43 | ** 44 | **/ 45 | 46 | /** The value of \c #SPMessageData::SPCheck, if the message data associated 47 | with a call to a plug-in has come from \c #SPInterfaceSuite::SendMessage(), 48 | or is prepared using \c #SPInterfaceSuite::SetupMessageData(). */ 49 | #define kSPValidSPMessageData 'SPCk' 50 | 51 | /** Basic suite-access information provided with every call. */ 52 | struct SPMessageData { 53 | #ifdef __cplusplus 54 | SPMessageData(ai::int32 SPCheck_ = 0, struct SPPlugin *self_ = 0, void *globals_ = 0, struct SPBasicSuite *basic_ = 0) 55 | : SPCheck(SPCheck_), self(self_), globals(globals_), basic(basic_) {} 56 | #endif 57 | 58 | /** \c #kSPValidSPMessageData if this is a valid PICA message. */ 59 | ai::int32 SPCheck; 60 | /** This plug-in, an \c #SPPluginRef. */ 61 | struct SPPlugin *self; 62 | /** An array of application-wide global variables. */ 63 | void *globals; 64 | /** A pointer to the basic PICA suite, which you use to obtain all other suites. */ 65 | struct SPBasicSuite *basic; 66 | 67 | }; 68 | 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #include "SPHeaderEnd.h" 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDynamicSymbol.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | ADOBE SYSTEMS INCORPORATED 3 | Copyright 2015 Adobe Systems Incorporated 4 | All Rights Reserved. 5 | 6 | NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 7 | terms of the Adobe license agreement accompanying it. If you have received this file from a 8 | source other than Adobe, then your use, modification, or distribution of it requires the prior 9 | written permission of Adobe. 10 | **************************************************************************/ 11 | 12 | #ifndef _AI_DYNAMIC_SYMBOL_H_ 13 | #define _AI_DYNAMIC_SYMBOL_H_ 14 | 15 | #ifndef __ASTypes__ 16 | #include "ASTypes.h" 17 | #endif 18 | 19 | #ifndef __AIPlugin__ 20 | #include "AIPlugin.h" 21 | #endif 22 | 23 | #include "AIHeaderBegin.h" 24 | 25 | #define kAIDynamicSymbolSuite "AI Dynamic Symbol Suite" 26 | #define kAIDynamicSymbolSuiteVersion AIAPI_VERSION(1) 27 | 28 | /** Symbol type.*/ 29 | /**Symbol Type constants for symbols that mark whether a user has made the symbol dynamic, 30 | using the symbol dialog. When a symbol has been marked as dynamic, users can 31 | use the direct selection tool to override the appearance for specific instance. 32 | @see \c #AIDynamicSymbolSuite::GetSymbolType() 33 | */ 34 | enum AISymbolType 35 | { 36 | /** Marks a static symbol, whose appearance is the same for all instances. */ 37 | kAISymbolStaticType = 0x01, 38 | /** Marks a dynamic symbol, whose appearance can be overridden for specific instances. */ 39 | kAISymbolDynamicType = 0x02 40 | }; 41 | 42 | /******************************************************************************* 43 | ** 44 | ** AIDynamicSymbol Suite 45 | ** 46 | **/ 47 | struct AIDynamicSymbolSuite 48 | { 49 | /** Retrieves the expanded art for the overridden appearance of a symbol, if the appearance has been overridden. 50 | @param symbolArt [in] The symbol art object reference. 51 | @param art [out] A buffer in which to return the overridden art, or NULL if the art is not overridden. 52 | @see \c #GetSymbolArtHasOverride() 53 | */ 54 | AIAPI AIErr(*GetSymbolOverriddenArt) (AIArtHandle inSymbolArt, AIArtHandle *outArt); 55 | 56 | /** Reports whether the appearance of a symbol instance has been overridden. 57 | @param SymbolArt [in] The symbol art object reference. 58 | @param outHasOverridden [out] A boolean in which to return true if the art in the symbol instance has been overridden. 59 | */ 60 | AIAPI AIErr(*GetSymbolArtHasOverride)(AIArtHandle inSymbolArt, AIBoolean &outHasOverride); 61 | 62 | /* 63 | Retrieves the type of a symbol, static or dynamic. Only dynamic symbols can have an overridden appearance. 64 | @param symbolPattern [in] The symbol pattern reference. 65 | @param outSymbolType [out] A buffer in which to return the symbol type. 66 | */ 67 | AIAPI AIErr(*GetSymbolType) (const AIPatternHandle inSymbolArt, AISymbolType& outSymbolType); 68 | 69 | }; 70 | 71 | #include "AIHeaderEnd.h" 72 | 73 | #endif // _AI_DYNAMIC_SYMBOL_H_ 74 | 75 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/common/source/legacy/About.cpp: -------------------------------------------------------------------------------- 1 | //======================================================================================== 2 | // 3 | // $File$ 4 | // 5 | // $Revision$ 6 | // 7 | // Copyright 1997 Adobe Systems Incorporated. All rights reserved. 8 | // 9 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance 10 | // with the terms of the Adobe license agreement accompanying it. If you have received 11 | // this file from a source other than Adobe, then your use, modification, or 12 | // distribution of it requires the prior written permission of Adobe. 13 | // 14 | //======================================================================================== 15 | 16 | /** 17 | This file provides two simple dialog interfaces used by the plug-in shell. 18 | One does a simple about message. The other displays an error dialog based 19 | on a string list in the file shellSupport.rsrc. 20 | 21 | **/ 22 | 23 | /**----------------------------------------------------------------------------- 24 | ** 25 | ** Headers 26 | ** 27 | **/ 28 | #include "IllustratorSDK.h" 29 | 30 | #include "common.h" 31 | 32 | #include "about.h" 33 | #include "plugin.h" // for dialog constants 34 | #include "reportError.h" 35 | #include "stringUtils.h" 36 | 37 | 38 | /**----------------------------------------------------------------------------- 39 | ** 40 | ** Private Functions 41 | ** 42 | **/ 43 | 44 | ASErr ASAPI AboutPluginInitProc(ADMDialogRef dialog); 45 | void ASAPI AboutDlgOKButtonProc(ADMItemRef item, ADMNotifierRef notifier); 46 | 47 | 48 | /******************************************************************************* 49 | ** 50 | ** UI Functions 51 | ** 52 | **/ 53 | 54 | 55 | AIErr goAbout( SPInterfaceMessage *message ) 56 | { 57 | AIErr error; 58 | 59 | 60 | // Initialize the dialog 61 | error = sADMDialog->Modal(message->d.self, "About Dialog", kAboutDLOG, kADMModalDialogStyle, 62 | AboutPluginInitProc, NULL, 0); 63 | if (error) goto errorTag; 64 | 65 | return kNoErr; 66 | 67 | errorTag: 68 | return error; 69 | 70 | } 71 | 72 | 73 | 74 | 75 | 76 | /******************************************************************************* 77 | ** 78 | ** About Private Functions 79 | ** 80 | **/ 81 | 82 | 83 | ASErr ASAPI AboutPluginInitProc(ADMDialogRef dialog) 84 | { 85 | // Call the default Init first to create the modal dialog and items. 86 | // By default OK is assumed to be item 1 87 | sADMItem->SetNotifyProc(sADMDialog->GetItem(dialog, kDlgOKButton), AboutDlgOKButtonProc); 88 | 89 | return kNoErr; 90 | } 91 | 92 | void ASAPI AboutDlgOKButtonProc(ADMItemRef item, ADMNotifierRef notifier) 93 | { 94 | // This is here more by way of example, since there really isn't any 95 | // other reason to be overriding this handler. The SetNotifyProc( ) call 96 | // above could be removed entirely. 97 | // Call the default Notify so the dialog knows the OK button was hit. 98 | sADMItem->DefaultNotify(item, notifier); 99 | } 100 | 101 | 102 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AILimits.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * ADOBE CONFIDENTIAL 3 | * 4 | * Copyright 2017 Adobe 5 | * All Rights Reserved. 6 | * 7 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 8 | * accordance with the terms of the Adobe license agreement accompanying 9 | * it. If you have received this file from a source other than Adobe, 10 | * then your use, modification, or distribution of it requires the prior 11 | * written permission of Adobe. 12 | **************************************************************************/ 13 | 14 | #pragma once 15 | 16 | 17 | #define kAILimitsSuite "AI Limits Suite" 18 | #define kAILimitsSuiteVersion AIAPI_VERSION(2) 19 | #define kAILimitsVersion kAILimitsSuiteVersion 20 | 21 | #include 22 | 23 | #include "AITypes.h" 24 | 25 | namespace ai 26 | { 27 | constexpr auto kInfinity = std::numeric_limits::infinity(); 28 | 29 | // Use following constants for initializing "bounds" which will contain a union of bounds. 30 | // kNullUnionBoundsSoft has max limits considering axis +Y going in bottom 31 | // kNullUnionBoundsHard has max limits considering axis +Y going in top (+X going in left in both of above) 32 | // { LEFT, TOP, RIGHT, BOTTOM }; 33 | constexpr AIRealRect kNullUnionBoundsHard{ kInfinity , kInfinity , -kInfinity , -kInfinity }; 34 | constexpr AIRealRect kNullUnionBoundsSoft{ kInfinity , -kInfinity , -kInfinity , kInfinity }; 35 | 36 | } 37 | 38 | #include "AIHeaderBegin.h" 39 | /******************************************************************************* 40 | ** 41 | ** Suite 42 | ** 43 | **/ 44 | 45 | /** @ingroup Suites 46 | This suite provides utilities that allow you to get the Limits . 47 | 48 | \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants 49 | \c #kAILimitsSuite and \c #kAILimitsSuiteVersion. 50 | 51 | */ 52 | enum class AIDecimalPrecisionType : ai::uint16 53 | { 54 | kValue = 0, // precision for general value inputs like color, opacity etc 55 | kDimension, // precision for dimensions like length, height etc 56 | kType, // for values related to text 57 | kScale, // for scaling factors 58 | kArtboardSize, // for artboard dimensions 59 | kPercentage, // for percentage values 60 | kColor, // precision for color values 61 | kAngle, // for angle values 62 | kResolution, // for resolution values 63 | kStroke //Precision for stroke dimension 64 | }; 65 | 66 | struct AILimitsSuite 67 | { 68 | /** Retrieves the size of the canvas. 69 | (Note that this function returns a constant value, not an error code.) 70 | @return The canvas size (assuming square canvas) 71 | */ 72 | AIAPI ai::int32(*GetCanvasSize)(); 73 | 74 | /** 75 | * Returns the default large canvas scaling, compared to the regular canvas size. 76 | (Note that this function returns a constant value, not an error code.) 77 | */ 78 | AIAPI AIReal(*GetLargeCanvasScale)(); 79 | 80 | AIAPI ai::int32(*GetDecimalPrecision)(AIDecimalPrecisionType type); 81 | AIAPI AIReal(*GetMinTransformDimensionValue)(); 82 | }; 83 | 84 | #include "AIHeaderEnd.h" 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicTypes.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * ADOBE CONFIDENTIAL 4 | * 5 | * Copyright 2008 Adobe 6 | * 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 10 | * accordance with the terms of the Adobe license agreement accompanying 11 | * it. If you have received this file from a source other than Adobe, 12 | * then your use, modification, or distribution of it requires the prior 13 | * written permission of Adobe. 14 | * 15 | **************************************************************************/ 16 | 17 | #ifndef _AI_BASIC_TYPES_ 18 | #define _AI_BASIC_TYPES_ 19 | 20 | #include "ASConfig.h" 21 | 22 | #include 23 | #include 24 | 25 | namespace ai 26 | { 27 | using int8 = int8_t; 28 | using uint8 = uint8_t; 29 | using int16 = int16_t; 30 | using uint16 = uint16_t; 31 | using int32 = int32_t; 32 | using uint32 = uint32_t; 33 | using int64 = int64_t; 34 | using uint64 = uint64_t; 35 | 36 | using sizediff_t = ptrdiff_t; 37 | using intptr = intptr_t; 38 | using uintptr = uintptr_t; 39 | using SizeType = size_t; 40 | 41 | } // namespace ai 42 | 43 | using AIReal = double; 44 | using AIFloat = float; 45 | 46 | /** Double-byte numeric value */ 47 | using AIDouble = double; 48 | 49 | /** Rectangle specified with \c #AIDouble coordinates.*/ 50 | struct AIDoubleRect { 51 | AIDouble left, top, right, bottom; 52 | }; 53 | 54 | using AIRealRect = AIDoubleRect; 55 | using AIRealRectPtr = AIRealRect*; 56 | 57 | typedef struct _t_AIFloatRect { 58 | AIFloat left, top, right, bottom; 59 | } AIFloatRect, *AIFloatRectPtr; 60 | 61 | typedef struct _t_AIRealMatrix { 62 | AIReal a, b, c, d, tx, ty; 63 | /** Sets to Identity.*/ 64 | void Init() 65 | { 66 | a = 1.0; b = 0.0; 67 | c = 0.0; d = 1.0; 68 | tx = 0.0; ty = 0.0; 69 | } 70 | bool operator==(const _t_AIRealMatrix& other) const 71 | { 72 | return a == other.a && b == other.b && 73 | c == other.c && d == other.d && 74 | tx == other.tx && ty == other.ty; 75 | } 76 | } AIRealMatrix, *AIRealMatrixPtr; 77 | 78 | typedef struct _t_AIRealPoint { 79 | AIReal h, v; 80 | bool operator==(const _t_AIRealPoint& other) const 81 | { 82 | return h == other.h && v == other.v; 83 | } 84 | } AIRealPoint, *AIRealPointPtr; 85 | 86 | // AIRect is the same size and layout as a Windows RECT. 87 | /** Rectangle value in Windows (same as \c RECT) */ 88 | typedef struct _t_AIRect { 89 | /** Coordinate values */ 90 | ai::int32 left, top, right, bottom; 91 | } AIRect; 92 | 93 | // AIPoint is the same size and layout as a Windows POINT. 94 | /** Point value in Windows (same as \c Point) */ 95 | typedef struct _t_AIPoint { 96 | /** Coordinate values */ 97 | ai::int32 h, v; 98 | } AIPoint; 99 | 100 | // 101 | // 102 | // Platform dependant natively aligned structures 103 | // 104 | // 105 | 106 | /** True (1) or false (0) */ 107 | #ifdef MAC_ENV 108 | /** Mac OS only. the same as Mac OS \c Boolean. */ 109 | typedef unsigned char AIBoolean; 110 | #endif 111 | 112 | #ifdef WIN_ENV 113 | /** Windows only. the same as Windows \c BOOL. */ 114 | typedef int AIBoolean; 115 | #endif 116 | 117 | #ifdef LINUX_ENV 118 | typedef unsigned char AIBoolean; 119 | #endif 120 | 121 | #endif // _AI_BASIC_TYPES_ 122 | 123 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiveEdit.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * ADOBE CONFIDENTIAL 3 | * 4 | * Copyright 2018 Adobe 5 | * All Rights Reserved. 6 | * 7 | * NOTICE: Adobe permits you to use, modify, and distribute this file in 8 | * accordance with the terms of the Adobe license agreement accompanying 9 | * it. If you have received this file from a source other than Adobe, 10 | * then your use, modification, or distribution of it requires the prior 11 | * written permission of Adobe. 12 | *******************************************************************************/ 13 | 14 | #pragma once 15 | 16 | /******************************************************************************* 17 | ** 18 | ** Imports 19 | ** 20 | **/ 21 | 22 | #include "AILiveEdit.h" 23 | #include "AILiveEditConstants.h" 24 | #include "AutoSuite.h" 25 | 26 | 27 | /******************************************************************************* 28 | ** 29 | ** Variables 30 | ** 31 | **/ 32 | 33 | extern_declare_suite_optional(AILiveEdit) // Clients need to define separately 34 | // with extern_define_suite_optional 35 | 36 | 37 | /******************************************************************************* 38 | ** 39 | ** Utility Classes 40 | ** 41 | **/ 42 | 43 | namespace ai 44 | { 45 | 46 | // A class to wrap ChangeContinueStartNotify() and ChangeContinueEndNotify() 47 | // in a scope. 48 | class StLiveEditContinueChangeNotifyHelper final 49 | { 50 | public: 51 | StLiveEditContinueChangeNotifyHelper() 52 | { 53 | try 54 | { 55 | if (sAILiveEdit) 56 | { 57 | sAILiveEdit->ChangeContinueStartNotify(); 58 | } 59 | } 60 | catch (...) 61 | { 62 | } 63 | } 64 | ~StLiveEditContinueChangeNotifyHelper() 65 | { 66 | try 67 | { 68 | if (sAILiveEdit) 69 | { 70 | sAILiveEdit->ChangeContinueEndNotify(); 71 | } 72 | } 73 | catch (...) 74 | { 75 | } 76 | } 77 | }; 78 | 79 | // A class to wrap ChangeBeginNotify() and ChangeFinishNotify() in a scope. 80 | class StLiveEditBeginFinishChangeNotifyHelper final 81 | { 82 | public: 83 | StLiveEditBeginFinishChangeNotifyHelper( 84 | const LiteralString& inFeatureName, 85 | AIReal inEPFOverrideValue = LiveEdit::EPF::kUseGlobaLimitValue) 86 | { 87 | try 88 | { 89 | if (sAILiveEdit) 90 | { 91 | sAILiveEdit->ChangeBeginNotify(inFeatureName, 92 | inEPFOverrideValue); 93 | } 94 | } 95 | catch (...) 96 | { 97 | } 98 | } 99 | ~StLiveEditBeginFinishChangeNotifyHelper() 100 | { 101 | try 102 | { 103 | if (sAILiveEdit) 104 | { 105 | sAILiveEdit->ChangeFinishNotify(); 106 | } 107 | } 108 | catch (...) 109 | { 110 | } 111 | } 112 | }; 113 | 114 | // A class to wrap SuspendLiveEditing() and ResumeLiveEditing() in a scope. 115 | class StLiveEditSuspender final 116 | { 117 | public: 118 | StLiveEditSuspender() 119 | { 120 | try 121 | { 122 | if (sAILiveEdit) 123 | { 124 | sAILiveEdit->SuspendLiveEditing(); 125 | } 126 | } 127 | catch (...) 128 | { 129 | } 130 | } 131 | ~StLiveEditSuspender() 132 | { 133 | try 134 | { 135 | if (sAILiveEdit) 136 | { 137 | sAILiveEdit->ResumeLiveEditing(); 138 | } 139 | } 140 | catch (...) 141 | { 142 | } 143 | } 144 | }; 145 | 146 | } // namespace ai 147 | -------------------------------------------------------------------------------- /BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringPool.h: -------------------------------------------------------------------------------- 1 | #ifndef __AIStringPool__ 2 | #define __AIStringPool__ 3 | 4 | /* 5 | * Name: AIStringPool.h 6 | * $Revision: 4 $ 7 | * Author: 8 | * Date: 9 | * Purpose: Adobe Illustrator String Pool Suite. 10 | * 11 | * ADOBE SYSTEMS INCORPORATED 12 | * Copyright 1986-2007 Adobe Systems Incorporated. 13 | * All rights reserved. 14 | * 15 | * NOTICE: Adobe permits you to use, modify, and distribute this file 16 | * in accordance with the terms of the Adobe license agreement 17 | * accompanying it. If you have received this file from a source other 18 | * than Adobe, then your use, modification, or distribution of it 19 | * requires the prior written permission of Adobe. 20 | * 21 | */ 22 | 23 | 24 | /******************************************************************************* 25 | ** 26 | ** Imports 27 | ** 28 | **/ 29 | 30 | #ifndef __AITypes__ 31 | #include "AITypes.h" 32 | #endif 33 | 34 | 35 | #include "AIHeaderBegin.h" 36 | 37 | /** @file AIStringPool.h */ 38 | 39 | 40 | /******************************************************************************* 41 | ** 42 | ** Constants 43 | ** 44 | **/ 45 | 46 | #define kAIStringPoolSuite "AI String Pool Suite" 47 | #define kAIStringPoolSuiteVersion AIAPI_VERSION(4) 48 | #define kAIStringPoolVersion kAIStringPoolSuiteVersion 49 | 50 | 51 | /** @ingroup Errors 52 | See \c #AIStringPoolSuite */ 53 | #define kStringPoolErr 'SPER' 54 | 55 | 56 | /******************************************************************************* 57 | ** 58 | ** Types 59 | ** 60 | **/ 61 | 62 | typedef struct StringPool AIStringPool; 63 | 64 | 65 | /******************************************************************************* 66 | ** 67 | ** Suite 68 | ** 69 | **/ 70 | 71 | /** @ingroup Suites 72 | This suite provides functions for working with \e string \e pools. 73 | A string pool contains a collection of NULL-terminated character sequences. No 74 | single string appears in the pool more than once. You can compare two strings 75 | from the pool for equality by comparing their addresses. You can obtain the application 76 | string pool using \c #AIRuntimeSuite::GetAppStringPool(), or you can use these 77 | functions to create your own string pool. 78 | 79 | \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants 80 | \c #kAIStringPoolSuite and \c #kAIStringPoolVersion. 81 | */ 82 | typedef struct { 83 | 84 | /** Creates a new string pool. The plug-in is responsible for freeing the 85 | pool when it is no longer needed. 86 | @param pool [out] A buffer in which to return the new string pool object. 87 | */ 88 | AIAPI AIErr (*AllocateStringPool) ( AIStringPool **pool ); 89 | 90 | /** Disposes of a string pool that was created with \c #AllocateStringPool(). 91 | @param pool The string pool object. 92 | */ 93 | AIAPI AIErr (*DisposeStringPool) ( AIStringPool *pool ); 94 | 95 | /** Retrieves a string entry from a string pool, or creates it and adds it 96 | to the pool if it is not already there. 97 | @param pool The string pool object. 98 | @param string The string value of the matching or new pool entry. 99 | @param wstring [out] A buffer in which to return the pool entry. 100 | */ 101 | AIAPI AIErr (*MakeWString) ( AIStringPool *pool, const char *string, char **wstring ); 102 | 103 | } AIStringPoolSuite; 104 | 105 | 106 | #include "AIHeaderEnd.h" 107 | 108 | #endif 109 | --------------------------------------------------------------------------------