<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110DrawArt.h<|end_filename|>
#ifndef __AI110DrawArt__
#define __AI110DrawArt__

/*
 *        Name:	AI110DrawArt.h
 *   $Revision: $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 11.0 Draw Art Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AIDrawArt__
#include "AIDrawArt.h"
#endif

#include "AIHeaderBegin.h"

/** @file AI110DrawArt.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI110DrawArtSuite			"AI Draw Art Suite"
#define kAIDrawArtSuiteVersion6		AIAPI_VERSION(6)
#define kAI110DrawArtSuiteVersion	kAIDrawArtSuiteVersion6
#define kAI110DrawArtVersion		kAIDrawArtSuiteVersion

/*******************************************************************************
 **
 **	Types
 **
 **/

/*******************************************************************************
 **
 **	Suite
 **
 **/

/**
	The draw art suite APIs can be used to draw Illustrator artwork to an
	output port (drawing surface). The port can either be contained within
	a window in the UI or it can be an offscreen drawing surface being used
	to rasterize artwork. There are a considerable number of options for
	controlling the drawing process.
 */
typedef struct {

	/** Draw artwork as specified by the AIDrawArtData parameter. */
	AIAPI AIErr (*DrawArt)( AIDrawArtData *data );
	/** Draw a color swatch as specified by the AIDrawColorData parameter. */
	AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data );
	/** This method can only be called from the code that responds to an annotator's draw
		annotations message. It causes the highlighting annotations for the specified art
		object to be drawn using the specified color. */
	AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color );
	/** A convenience API for drawing a thumbnail of the art object to the AGM port with
		the specified bounds. */
	AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect );

} AI110DrawArtSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Document.h<|end_filename|>
#ifndef __AI180Document__
#define __AI180Document__

/*
 *        Name:	AI180Document.h
 *   $Revision: 25 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Document Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIDocument.h"

#include "AIHeaderBegin.h"

/** @file AI180Document.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI180DocumentSuite					kAIDocumentSuite
#define kAI180DocumentSuiteVersion14		AIAPI_VERSION(14)
#define kAI180DocumentSuiteVersion			kAI180DocumentSuiteVersion14
#define kAI180DocumentVersion				kAI180DocumentSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	Use these functions to get and set information about the current document.

	Some functions are only applicable while reading a file format.
	Some are intended for use during a file format write, but can
	be used at any time.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIDocumentSuite and \c #kAIDocumentVersion.
	*/
struct AI180DocumentSuite {

	/** Retrieves the file specification for the current document.
			@param file [out] A buffer in which to return the file specification.
		*/
	AIAPI AIErr (*GetDocumentFileSpecification) ( ai::FilePath &file );

	/** Retrieves the coordinates of the lower left corner of the imageable
		page, specified relative to the ruler origin.
			@param origin [out] A buffer in which to return the origin point.
		*/
	AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin );

	/** Sets the coordinates of the lower left corner of the imageable
		page. The origin for artwork
		coordinates is not changed; affects only what is printed.
			@param origin The new imageable page origin, specified relative
				to the ruler origin.
		 */
	AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin );

	/** Sets the ruler origin for the current document. Positive ruler values
		go the right and above the origin. Negative values go the left and below the
		origin,
			@param origin The new ruler origin, specified relative to the lower left
				of the artboard page, which is always (0,0).
		*/
	AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin );

	/** Retrieves the current unit of measurement, shown in the ruler and
		displayed in dialog boxes.
			@param units The new ruler unit, an \c #AIDocumentRulerUnitValue.
		*/
	AIAPI AIErr (*GetDocumentRulerUnits) ( ai::int16 *units );

	/** Sets the current unit of measurement, shown in the ruler and
		displayed in dialog boxes. Can be used only when reading
		a document.
			@param units [out] A buffer in which to return the ruler unit,
			an \c #AIDocumentRulerUnitValue.
		*/
	AIAPI AIErr (*SetDocumentRulerUnits) ( ai::int16 units );

	/** Retrieves the style of crop marks that are created by the Create Crop Marks command
		and filter. This is not a document setting; it is an application preference.
		In AI11 and later this no longer affects separations printing.
			@param cropStyle [out] A buffer in which to return the style.
		*/
	AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle );

	/** Sets the style of crop marks that are created by the Create Crop Marks command
		and filter. This is not a document setting. It is an application preference.
		In AI11 and later this no longer affects separations printing. */
	AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle );

	/** Not implemented. */
	AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print );

	/** Not implemented. */
	AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print );

	/** Retrieves information about the current document that is set through the
		document Setup dialog.
			@param setup [out] A buffer in which to return the setup information.
		*/
	AIAPI AIErr (*GetDocumentSetup) ( AIDocumentSetup *setup );

	/** Sets the document setup information, as set through the document Setup dialog.
		Can be used only when reading a document.
			@param setup A pointer to a structure containing the new setup information.
		*/
	AIAPI AIErr (*SetDocumentSetup) ( AIDocumentSetup *setup );

	/** Reports whether the document has been edited since it was last saved.
		When it has, the user is prompted to save the document before closing it.
			@param modified [out] A buffer in which to return true if the document has
				been modified.
		*/
	AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified );

	/** Sets the modification state of the current document. When a document is marked
		as modified, the user is prompted to save before closing it.
			@param modified True to mark the document as modified, false to mark it
				as unmodified.
		*/
	AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified );

	/** Retrieves the file format to be used when saving the current document.
		By default, this is the format that opened the document
		or the latest native file format for a new document.
		If the user changes the file format from the Save As dialog, the new format
		is assigned to the document.
			@param fileFormat [out] A buffer in which to return the file format.
			@see \c #AIFileFormatSuite
		 */
	AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat );

	/** Sets the file format to be used when saving the current document.
			@param fileFormat The file format.
			@see \c #AIFileFormatSuite
		*/
	AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat );

	/** Retrieves the block of user parameters associated with the current document's
		associated file format.
			@param parameters [out] A buffer in which to return the parameter block.
				This is a \c void* pointer. The actual format of the parameter block
				is determined by the file format.
			@see \c #AIFileFormatSuite
		*/
	AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters );

	/** Sets the block of user parameters associated with the current document's
		associated file format.
			@param parameters [out] A buffer in which to return the parameter block.
				This is a \c void* pointer. The actual format of the parameter block
				is determined by the file format. Use the \c #AIBlockSuite functions
				to allocate this memory, so that Illustrator can release it when
				it is no longer needed.
			@see \c #AIFileFormatSuite
		*/
	AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters );

	/** Forces the current document to be redrawn. Illustrator automatically redraws
		the document when a plug-in returns, so this function is not usually needed.
		*/
	AIAPI AIErr (*RedrawDocument) ( void );

	/** Retrieves an opaque reference for the current document, to use with functions
		that can operate on documents other than the current one.
			@param document [out] A buffer in which to return the document reference.
		*/
	AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document );

	/** Writes the current document to a file without modifying the document
		or changing its modification status.
			@param file The file specification.
			@param fileFormatName The file format name.
			@param askForParms When true, show a dialog to query user for file-format parameters.
				If no format parameters are available, the function queries the user even if this
				value is false.
	 		@see \c #WriteDocumentWithOptions()
	 	*/
	AIAPI AIErr (*WriteDocument) ( const ai::FilePath &file, const char *fileFormatName, AIBoolean askForParms);

	/**  Retrieves the print record for the current document.
			@param print [in, out] A print record with the \c version and \c recordSize
				members initialized, in which to return the print information.
		*/
	AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );

	/** Not implemented.*/
	AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );

	/** Retrieves the ruler origin for the current document. Positive ruler values
		go the right and above the origin. Negative values go the left and below the
		origin.
			@param origin [out] A buffer in which to return the ruler origin,
				relative to the lower left of the artboard page, which is always (0,0).
		*/
	AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin );

	/** Updates linked objects in the current document, if needed.
			@param updatedSomething [out] Optional. A buffer in which to
				return true if any links were found that needed update.
		*/
	AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething );

	/** Retrieves the limits of zooming as scale factors.
			@param min [out] A buffer in which to return the minimum zoom scale factor.
			@param max [out] A buffer in which to return the maximum zoom scale factor.
		*/
	AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max );

	/** Retrieves the maximum valid bounds of any artboard, expressed relative to
		the ruler origin of the current document, regardless of the current
		size of the document's artboard.
			@param bounds [out] A buffer in which to return the rectangle,
		*/
	AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds );

	/** Reports whether a document exists; that is, is an open document or a clipboard document.
			@param document The document reference.
			@param exists [out] A buffer in which to return true if the document
				is open or in the clipboard.
		*/
	AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists );

	/** Retrieves the recorded dictionary associated with the current document.
		Changes in this dictionary and its contents are recorded in the undo history.

		Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release()
		when you no longer need the reference.
			@param dictionary [out] A buffer in which to return a pointer to
				the dictionary reference.
			@see \c #GetNonRecordedDictionary()
		*/
	AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary );

	/** Retrieves the document color model.
			@param colorModel [out] A buffer in which to return the color model,
				an \c #AIDocumentColorModelValue.
		*/
	AIAPI AIErr (*GetDocumentColorModel) ( ai::int16 *colorModel);

	/** Sets the intended color model for documents upon load.
		Use when reading a file. This function does not convert artwork in
		the current document to the new model. After Illustrator reads
		a file, it processes artwork in the document to ensure it matches
		the model.
			@param colorModel The color model, an \c #AIDocumentColorModelValue.
		*/
	AIAPI AIErr (*SetDocumentColorModel) ( ai::int16 colorModel);

	/** Retrieves the color calibration profiles for the current document.
			@param rgbProfile [out] A buffer in which to return the RGB profile or \c NULL.
			@param cmykProfile [out] A buffer in which to return the CMYK profile or \c NULL.
			@param grayProfile [out] A buffer in which to return the grayscale profile or \c NULL.
		*/
	AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile* rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile );

	/** Sets the color calibration profiles for the current document.
			@param rgbProfile The RGB profile. Can be \c NULL.
			@param cmykProfile The CMYK profile. Can be \c NULL.
			@param grayProfile The grayscale profile. Can be \c NULL.
		*/
	AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile );

	/** Copies the currently selected objects to the clipboard. This is the same as
		the Copy menu command.
			@note Use only when this plug-in is issuing a command and is entirely
			in control of that command. Do not call when responding to messages
			invoked by other commands, such as save, close, update, and so on.
		 */
	AIAPI AIErr (*Copy) ();

	/** Cuts the currently selected objects to the clipboard. This is the same as
		the Cut menu command.
			@note Use only when this plug-in is issuing a command and is entirely
			in control of that command. Do not call when responding to messages
			invoked by other commands, such as save, close, update, and so on.
		*/
	AIAPI AIErr (*Cut) ();

	/** Pastes the contents of the clipboard into the document. This is the same as
		the Paste menu command.
			@note Use only when this plug-in is issuing a command and is entirely
			in control of that command. Do not call when responding to messages
			invoked by other commands, such as save, close, update, and so on.
		*/
	AIAPI AIErr (*Paste) ();

	/** Updates cached artwork properties. For example, the selection state
		of a group is cached, and is determined from the states of its children.
		You do not typically need to call this function. Illustrator recomputes
		cached properties as needed.
		*/
	AIAPI AIErr (*SyncDocument) ( void );

	/** Unimplemented. Always returns \c #kDocTargetExplicit */
	AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget );
	/** Unimplemented. A no-op. */
	AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget );

	/** Retrieves the non-recorded dictionary associated with the current document.
		Changes to this dictionary and its contents are not recorded in the undo
		history.

		Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release()
		when you no longer need the reference.
			@param dictionary [out] A buffer in which to return a pointer to
				the dictionary reference.
			@see \c #GetNonRecordedDictionary()
		*/
	AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary );

	/** Retrieves the version of the Illustrator file format in which
		the current document was last saved. (Note that this function returns
		a constant value, not an error code.)
			@return The version number, an \c #AIVersion value, or 0 if the
				version is unknown or the file is not an AI file.
		 */
	AIAPI int (*GetAIVersion) ();

	/** Reports whether rendering the current document according to its current
		view settings requires any non-opaque drawing operations.
			@param hasTransparency [out] A buffer in which to return true if the
				document has transparency.
			@param detectOverprint When true, drawing an overprinted object
				is considered a non-opaque operation.
		*/
	AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint );

	/** Reports whether rendering the current document according to its current
		view settings requires painting any spot colors.
			  @param hasSpotColorArt [out] A buffer in which to return true if the
				document has art that uses spot colors.
		*/
	AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt );

	// New for AI 10

	/** Retrieves asset management information. Pass \c null for any parameter whose
		state you do not want to retrieve.
		 	@param managed [out] A buffer in which to return true if the file has an associated server URL.
			@param pNAlternates [out] A buffer in which to return the number
				of alternates for a document that is part of Version Cue project,
				or 0 if it is not part of a Version Cue project.
			@param checkedOut [out] A buffer in which to return true if the document is being
				managed by a version-control system and is currently checked out (that is,
				editable and locked by the current user).
			@param URL [out] A buffer in which to return the server URL of a managed file.
			@param canEdit Deprecated, pass \c null.
			@param fileType [out] A buffer in which to return the name of the plug-in
				used to open the current document, or to perform the last Save As operation.
		*/
	AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, ai::int32* pNAlternates, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType);

	/** Sets asset management information. Pass \c null for any parameter whose
		state you do not want to set.
		 	@param managed When true, the file has an associated server URL.
			@param checkedOut Deprecated, pass \c null.
			@param URL The server URL of a managed file.
			@param canEdit Deprecated, pass \c null.
		*/
	AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit);

	/**	Retrieves the URL associated with a document.
			@param document The document reference.
			@param URL [out] A buffer in which to return the URL.
		*/
	AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL);

	/** Retrieves the XMP metadata for the current the document.
			@param xap [out] A buffer in which to return the XML packet
				(in UTF-8 Unicode format).
		*/
	AIAPI AIErr (*GetDocumentXAP)(const char **xap);

	/** Sets the XMP metadata of the current document. Replaces any existing XMP metadata
			@param xap The new XML packet (must be in UTF-8 Unicode format). This is
				copied into the document, and can be deleted after the call. Pass \c null
				to clear metadata.
		*/
	AIAPI AIErr (*SetDocumentXAP)(const char *xap);

	/** Halts any text reflow for all text objects in the current document.
		Match this call with a call to \c #ResumeTextReflow().

		If you manipulate \c #kTextFrameArt objects and do not need text reflow
		after each access, this speeds up the manipulation process.
		Some functions that causes text reflow are:  <br>
		\c #ATE::ITextRange::InsertAfter(), \c #ATE::ITextRange::InsertBefore()	<br>
		\c #ATE::ITextRange::SetLocalCharFeatures(), \c #ATE::ITextRange::SetLocalParaFeatures() <br>
		\c #ATE::ITextRange::Remove()

		@return The error \c #kNoDocumentErr if no document is open.
	*/
	AIAPI AIErr (*SuspendTextReflow)();

	/**  Resumes text reflow. Reflows any text objects that modified after the
		call to \c #SuspendTextReflow().
			@return The error \c #kNoDocumentErr if no document is open.
	*/
	AIAPI AIErr (*ResumeTextReflow)();

	/** Retrieves the text selection object for the current document.
		You must release the object when it is no longer needed.
		It is recommended that you use \c ITextRanges to wrap this object,
		which takes care of memory management. For example:
	@code
ATE::TextRangesRef selectionRef = NULL;
sAIDocument->GetTextSelection(&selectionRef);
{
	ITextRanges mySelection(selectionRef);
	...
}
	@endcode
		At this point \c selectionRef is released.The reference is invalid, and you must
		call \c #GetTextSelection() again to get a valid object.

		The text selection can describe multiple discontiguous ranges of text across multiple art objects.
		 \li If the document is in text editing mode, the result is a range representing the caret
		or the user selection.
		\li If the document is not in text editing mode, there are multiple ranges
		for the selected text frame objects.

			@param pTextSelection [out] A buffer in which to return the text selection object.
		*/
	AIAPI AIErr (*GetTextSelection)( TextRangesRef* pTextSelection );

	/** Reports whether the current document is in text editing mode.
		  @param focus [out] A buffer in which to return true if the document has the text focus.
		*/
	AIAPI AIErr (*HasTextFocus)( AIBoolean *focus);

	/** Reports whether the current document is in text editing mode and the caret
		is blinking (as opposed to a range of text being selected).
			@param caret [out] A buffer in which to return true if the document has
				the text focus and the caret is blinking.
		*/
	AIAPI AIErr (*HasTextCaret)( AIBoolean *caret);

	/** Retrieves the current story that is in editing mode.
		You must release the object when it is no longer needed.
		It is recommended that you use \c IStory to wrap this object,
		which takes care of memory management.
			@param pStory [out] A buffer in which to return the story object,
				or \c NULL if the current document is not in text editing mode.
		*/
	AIAPI AIErr (*GetTextFocus)( StoryRef* pStory);

	/** Sets a story to be in editing mode. The insertion point is positioned at the
		start of the story.
			@param story The story object.
		*/
	AIAPI AIErr (*SetTextFocus)( StoryRef story);

	/** Exits text editing mode. */
	AIAPI AIErr (*LoseTextFocus)();

	/** Retrieves the text resource object for the current document.
		You must release the object when it is no longer needed.
		It is recommended that you use \c IDocumentTextResource to wrap this object,
		which takes care of memory management.

	 	The document text resources object contains various document-wide
		utilities and objects such as the character and paragraph styles.

			@param pDocResources [out] A buffer in which to return the text resources object.
			@see \c ATE suites and \c IText.h.
		*/
	AIAPI AIErr (*GetDocumentTextResources)( DocumentTextResourcesRef* pDocResources);

	/** @deprecated Does nothing in AI13 (CS3)

		Attaches a thumbnail of the current document to the resources of the specified file. This
		is the thumbnail displayed in the Finder in Mac OS.
			@param file The file.
		*/
	AIAPI AIErr (*WriteDocumentMacInformationResource)( const ai::FilePath &file );

	/** Writes the current document to a file with specified write options,
		without modifying the document or changing its modification status.
			@param file The file specification.
			@param fileFormatName The file format name.
			@param options The write options, a logical OR of \c #AIFileFormatOptions values.
			@param askForParms When true, show a dialog to query user for file-format parameters.
						If no format parameters are available, the function queries the user
						even if this value is false.
	 		@see \c #WriteDocument()
		*/
	AIAPI AIErr (*WriteDocumentWithOptions) (const ai::FilePath &file, const char *fileFormatName, ai::int32 options, AIBoolean askForParms);

	/** Reports whether rendering the current document according to its current
		view settings requires painting any overprinted objects.
			@param hasOverprint [out] A buffer in which to return true if the
				document has overprint.
		*/
	AIAPI AIErr (*DocumentHasOverprint)(AIBoolean *hasOverprint);

	/** Reports whether a document contains any managed links.
		A managed link is a URL to an Adobe Workgroup Server where
		one can share and keep versions of the linked document.
			@param document The document reference.
			@param hasManagedLinks [out] A buffer in which to return true if the document
				has managed links.
			@see \c #GetDocumentAssetMgmtInfo(), \c #GetDocumentURL()

        	@note In AI 10, only a managed document could have managed links. In later versions,
        	 non-managed documents can also have managed links.
        */
	AIAPI AIErr (*DocumentHasManagedLinks)(AIDocumentHandle document, AIBoolean *hasManagedLinks);

	/** Retrieves the spot color mode of a document, which controls the
		appearance definitions of new spot colors that are added to the document.
			@param document The document reference, or \c NULL for the current document.
			@param mode [out] A buffer in which to return the mode, an \c #AISpotColorMode value.
			@return The error \c #kNoDocumentErr if \c document is \c NULL and there is no
				current document.
		*/
	AIAPI AIErr (*GetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode *mode);

	/** Sets the spot color mode of a document, which controls the appearance
		definitions of new spot colors that are added to the document.
			@param document The document reference, or \c NULL for the current document.
			@param mode The new mode, an \c #AISpotColorMode value.
			@param convert When true, converts existing spot color definitions to the new mode.
			@param converted [out] Optional. A buffer in which to return true if any colors
				were actually modified.
			@return The error \c #kNoDocumentErr if \c document is \c NULL and there is no
				current document.
		*/
	AIAPI AIErr (*SetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode mode,
			AIBoolean convert, AIBoolean* converted);

	/** Undoes the most recent undoable transaction. This is the same as the Undo menu command.
			@note Use only when this plug-in is issuing a command and is entirely
			in control of that command. Do not call when responding to messages
			invoked by other commands, such as save, close, update, and so on.
		 */
	AIAPI AIErr (*Undo) ();

	/** Redoes the most recent redoable transaction. This is the same as the Redo menu command.
			@note Use only when this plug-in is issuing a command and is entirely
			in control of that command. Do not call when responding to messages
			invoked by other commands, such as save, close, update, and so on.
		 */
	AIAPI AIErr (*Redo) ();
	/** Reports whether the current document contains any DeviceN or overprinting rasters.
			@param hasDeviceNRasters [out] A buffer in which to return true if the
				the document has DeviceN rasters.
			@param hasOverprint [out] A buffer in which to return true if the
				the document has overprinting rasters.
		*/
	AIAPI AIErr (*DocumentRasterAttributes) (AIBoolean *hasDeviceNRasters, AIBoolean *hasOverprint);

	/** Retrieves the document startup profile.
			@param document The document reference, or \c NULL for the current document.
			@param startupProfile [out] A buffer in which to return the document startup profile.
			@return The error \c #kNoDocumentErr if \c document is \c NULL and there is no current document.
		*/
	AIAPI AIErr (*GetDocumentStartupProfile) (AIDocumentHandle document, AIDocumentStartupProfile *startupProfile );

	/** Retrieves the document's bleed values.
	@param bleedOffset [out] A buffer in which to return the bleed values.	
	*/

	AIAPI AIErr (*GetDocumentBleeds) (AIRealRect *bleedOffset);

	/** Sets the document's bleed values.
	@param bleedOffset A rectangle containing the new bleed values.
	*/

	AIAPI AIErr (*SetDocumentBleeds) (const AIRealRect& bleedOffset);
	
	/** Turns Pixel Perfect mode on or off for the document.
	@param isPixelPerfect True to turn Pixel Perfect mode on, false to turn it off.
	*/

	AIAPI AIErr (*SetDocumentPixelPerfectStatus)(AIBoolean isPixelPerfect);
	
	/** Reports whether the document is currently in Pixel Perfect mode.
	@return True if Pixel Perfect mode is on, false otherwise.
	*/

	AIAPI AIBoolean (*GetDocumentPixelPerfectStatus)();

};



#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192User.h<|end_filename|>
#ifndef __AI192User__
#define __AI192User__

/*
 *        Name: AIUser.h
 *   $Revision: 15 $
 *      Author:
 *        Date:
 *     Purpose: Adobe Illustrator User Utilities Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2016 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file
 * in accordance with the terms of the Adobe license agreement
 * accompanying it. If you have received this file from a source other
 * than Adobe, then your use, modification, or distribution of it
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/
#include "AIUser.h"

#include "AIHeaderBegin.h"

/** @file AIUser.h */


/************************************************************************s*******
 **
 **	Constants
 **
 **/

// v.14.0
#define kAI192UserSuite					kAIUserSuite
#define kAI192UserSuiteVersion12		AIAPI_VERSION(12)
#define kAI192UserSuiteVersion			kAI192UserSuiteVersion12
#define kAI192UserVersion				kAI192UserSuiteVersion

#if Macintosh || MSWindows
#define kAI192MacUserSuite				kAIMacUserSuite
#define kAI192MacUserSuiteVersion6		AIAPI_VERSION(6)
#define kAI192MacUserSuiteVersion		kAI192MacUserSuiteVersion5
#define kAI192MacUserVersion			kAI192MacUserSuiteVersion
#endif

/** @ingroup Suites
	This suite provides utility functions for working with Illustrator,
	including unit conversion utilities and a progress bar.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAI192UserSuite and \c #kAI192UserSuiteVersion.
	*/
struct AI192UserSuite {

	/** Reports whether a user has canceled the current operation.
		(Note that this function returns a boolean value, not an error code.)
			@return	True if the user has canceled an operation
				by pressing Command-dot or clicking Cancel or Stop in the
				progress bar.
		*/
	AIAPI AIBoolean (*Cancel) ( void );

	/** Updates the progress bar.
		(Note that this function does not return an error code.)
			@param current A number between 0 and \c max that represents
				how far the operation has progressed.
			@param max The maximum value, representing 100% progress.
		*/
	AIAPI void (*UpdateProgress) ( ai::int32 current, ai::int32 max );

	/**	Sets the text message displayed in the progress bar. If not provided,
		the text line is blank.
		(Note that this function does not return an error code.)
			@param text The text message.
		*/
	AIAPI void (*SetProgressText) ( const ai::UnicodeString& text );

	/** Explicitly close the progress bar if one is currently shown.
		(Note that this function does not return an error code.)
		*/
	AIAPI void (*CloseProgress) ( void );

	/**	Converts a number of document points to a Unicode string, using
		the period as a decimal separator.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4].
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
		using the period as a decimal separator.
		(Note that this function does not return an error code.)
			@param string The string to convert.
			@param value  [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
		*/
	AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value );
	/**	Converts a number of document points to a Unicode string, using the localized
		international utilities (IU) decimal separator.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4].
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
		using the localized international utilities (IU) decimal separator.
		(Note that this function does not return an error code.)
			@param string The string to convert.
			@param value  [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
		*/
	AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/**	Converts a number of document points to a formatted Unicode string containing
		a number and ruler units, using the localized international utilities (IU)
		decimal separator, and the passed preference for precision. If passed precision value is -1
		then user preference for precision is used.
		Uses the currently set ruler units, which can be inches, points, or centimeters.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4]. Pass -1 if user preference for precision should be used.
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, ai::int32 precision, ai::UnicodeString& string );

	/** Converts a formatted Unicode string containing a number expressed in ruler units
		to an \c #AIReal value in points. The current ruler units for the artwork
		are used as the original units to scale the result, and the user's
		preferences for precision are applied.
		(Note that this function does not return an error code.)
			@param string The string to convert, which uses the localized international utilities (IU)
				decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm".
				If no unit specifier is included, uses the current ruler units.
			@param value [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
	  	*/
	AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/** Retrieves a string representing the current ruler units.
			@param format The format for the result, one of:
				<br> \c #kShortUnits
				<br> \c #kLongSingularUnits
				<br> \c #kLongPluralUnits
				<br> If, for instance, the current unit is inches, the returned string
				would be "in", "inch", or "inches".
			@param string [out] A buffer in which to return the units string, at least 20 characters.
		*/
	AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string );

	/**	Retrieves the base name of a global object, stripping off any additional
		token that was added to make the name unique (by a function such as
				\c #AICustomColorSuite::NewCustomColorName(), for example).
			@param name [in, out] A string in which to pass a unique name and
				return the base name. The string is modified in place.
		*/
	AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name );

	/** Opens the appropriate application to edit a placed or raster object.
		This is equivalent to an option-double-click on the object with the selection tool.
			@param art The placed or raster art object.
			@return \c #kApplicationNotFoundErr error if the application is not found.
				<br> \c #kObjectNotLinkedErr error if the object is not a placed or raster object.
		*/
	AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art );

	/** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state.  Can be useful if
	    you have code that has its own message processing.  */
	AIAPI AIErr (*AppIdle) ( void );

	/**	Builds a directory menu.  Available only in Mac OS.  Builds a menu consisting of the specified path as well as all parent directories of that path.
			@param menu	 The platform-specific menu object.
			@param fileSpec	The file object for the directory.
		*/
	AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec);

	/**	Retrieves a directory.  Available only in Mac OS.  Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu.
			@param fileSpec The file object for the directory.
			@param index The 0-based index of the directory.
		*/
	AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, ai::int32 index);

	/**	Reveals a file in the Finder.  Available only in Mac OS.
			@param fileSpec	 The file object for the file.
		*/
	AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec);

	/** Disables (dims) the cancel or stop button in the progress bar.
		(Note that this function does not return an error code.)
		*/
	AIAPI void (*DisableProgressCancel) ( void );

	/** Reports whether it is safe to allocate memory. Call when a timer
		or other  asynchronous event triggers an action that allocates memory.
		Not needed when handling notifications or user events; the plug-in does not receive
		these when it is not ok to allocate memory.
		(Note that this function returns a boolean value, not an error code.)
			@param True if it is safe to allocate memory. False if it is not safe; in this case,
				reschedule the action and try again later.
		*/
	AIAPI AIBoolean (*OKToAllocateMemory) ( void );

	// New for AI 11
	/** Retrieves the current date and time.
			@param outValue [out] A buffer in which to return the current date-time value.
		*/
	AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue);

	/* Formats a date into a Unicode string.
			@param inValue The date to format, or \c NULL to format the current date-time value.
			@param formatFlag The format to use, one of:
				<br> \c #kAIShortDateFormat
				<br> \c #kAILongDateFormat
				<br> \c #kAIAbbrevDateFormat
			@param dateStringUS [out] A buffer in which to return the formatted date string.
		*/
	AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS);

	/* Formats a time into a Unicode string.
			@param inValue The time to format, or \c NULL to format the current date-time value.
			@param formatFlag The format to use, one of:
				<br> \c #kAIShortTimeFormat
				<br> \c #kAILongTimeFormat
			@param dateStringUS [out] A buffer in which to return the formatted time string.
		*/
	AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS);

	/** Retrieves the year value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year);

	/** Retrieves the month value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month);

	/** Retrieves the day value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day);

	/** Retrieves the hour value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour);

	/** Retrieves the minute value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute);

	/** Retrieves the second value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second);

	/** Retrieves the day-of-week value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek);

	/**	Launches an application, and optionally opens the current document in it.
			@param spFileSpec The file specification for the application's executable.
			@param openDoc True to open the current document in the new application.
		*/
	AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc);

	/** Generates an appropriate name for a named object, such as
		a layer, swatch, or style, according to the naming rules for that
		collection.
			@param set The naming rules.
			@param name [out] An ai::UnicodeString in which to return the generated name.
		*/
	AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name);

	/** Generates an appropriate name for a copy of a named object, such as
		a layer, swatch, or style, according to the naming rules for that
		collection.
			@param set The naming rules.
			@param original	Original name to copy (may be an empty string).
			@param copy [out] An ai::UnicodeString in which to return the generated name.
 		*/
    AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString &copy);

	/** Tests for equality of names within a collection of named objects.
		Use in the \c #AIAutoNameGenerator::HasName() callback function
		to test whether an automatically generated name matches a name
		already in the collection.
			@param name1 The first name.
			@param name2 The second name.
			@param same [out] An AIBoolean reference in which to return true if the names
				are the same.
		*/
	AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same);


	/** Opens a platform-specific dialog for saving a file.
     		@param title Dialog title.
			@param AIFileDialogFilters File types to save. Can be \c NULL.
			@param defaultName Default file name to appear in dialog. Can be \c NULL.
			@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
				return the full path of the file chosen by the user.
		*/
	AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for opening a file.
     		@param title Dialog title.
			@param AIFileDialogFilters File types to open. Can be \c NULL.
			@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
				return the full path of the file chosen by the user.
	  */
	AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for choosing a folder.
     		@param title Dialog title.
			@param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and
				return the full path of the folder chosen by the user.
	  */
	AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath);

	/** Displays an alert dialog with a warning icon and OK and Cancel buttons.
			@param msg The message to display.
			@param defaultOk True to make the OK button the default, false to make Cancel the default.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
				in which to store the user's choice and save it in the application preferences file.
				When \c NULL, the dialog does not include the checkbox.
			@return True if the dialog was dismissed with the OK button,
				false if it was canceled.
		*/
	AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey);

	/** Displays an alert dialog with a warning icon and an OK button.
			@param msg The message to display.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
				in which to store the user's choice and save it in the application preferences file.
				When \c NULL, the dialog does not include the checkbox.
			@return Nothing. It does not return AIErr
		*/
	AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey);

	/** Displays an modal alert dialog with a warning icon and an OK button which doesnot get dismissed on ESC key.
			@param msg The message to display.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
			in which to store the user's choice and save it in the application preferences file.
			When \c NULL, the dialog does not include the checkbox.
			@return Nothing. It does not return AIErr
			*/
	AIAPI void (*MessageAlertEx) (const ai::UnicodeString& msg, const char* dontShowKey);

	/** Displays a predefined dialog with a yes/no question.
		The dialog displays text specified with a unicodeString, and
		buttons with default labels Yes, No, and Cancel.
		@param msg The text string.
		@return The \c #AIAnswer constant for the button pressed to dismiss the dialog,
		or \c #kAIAnswer_Invalid in case of error.
		@see \c #ErrorAlert(), \c #MessageAlert(), \c #YesNoAlert()
		*/
	AIAPI AIAnswer (*QuestionAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog with a yes/no question.
		The dialog displays text specified with a unicodeString, and
		buttons with default labels Yes and No.
		@param msg The text string.
		@return The \c #AIAnswer constant for the button pressed to dismiss the dialog,
		or \c #kAIAnswer_Invalid in case of error.
		@see \c #ErrorAlert(), \c #MessageAlert(), \c #QuestionAlert()
		*/
	AIAPI AIAnswer (*YesNoAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog that informs the user that an error occurred.
		The dialog displays text specified with a unicodeString, with the platform-specific
		error icon at the left, and an OK button.
		@param msg The text string.
		@return Nothing.It doesnot return an AIErr
		@see \c #MessageAlert(),  \c #QuestionAlert(), \c #YesNoAlert()
		*/
	AIAPI void (*ErrorAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog with an informational message.
		The dialog displays text specified with a unicodeString, with the
		platform-specific message icon at the left, and an OK button.
		@param msg The text string.
		@return Nothing.It doesnot return an AIErr
		@see \c #ErrorAlert(), \c #QuestionAlert(), \c #YesNoAlert()
		*/
	AIAPI void (*MessageAlert)(const ai::UnicodeString &msg);

	/**	Invokes the platform-specific color picker dialog.
	@param inLocation[int]	The position of the dialog.	 (-1, -1) centers the dialog on the screen.
	@param inColor[in]	The initially selected color value.
	@param outColor	[out] A buffer in which to return the selected color.
	@return True if the user selected a color, false otherwise.
	*/
	AIAPI AIBoolean (*ChooseFromOSColorPicker) (const AIPoint &inLocation,
		const AIRGBColor& inColor, AIRGBColor* outColor);

	/** Evaluates a numeric expression to create a formatted string suitable for display.
	Call, for example, when a numeric edit control loses focus or the user presses "=".
	If the result of evaluation is not a valid numeric value as per options specified, it is recommended that
	the associated control display the last known-good value, or a blank string
	accompanied by a beep or other error indicator.

	@param expr [in] The expression to be evaluated (typically entered by the user
	in the control).
	@param options [in] An \c #AIExpressionOptions structure that determines how
	a numeric result is obtained. Specifies the units for the
	result, a range to which the result is clipped, and the precision.
	@param evaluatedExpr [out] A buffer in which to return the formatted display string.
	@param isChanged [out] A buffer in which to return true if the result of evaluation
	is different from result of user input. Example in case of non numeric input or out of bounds input.
	@param numericValue [out] A buffer in which to return the numeric value, according to the specified options.
	*/
	AIAPI AIErr (*EvaluateExpression)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr,
		AIBoolean & isChanged , AIDouble& numericValue);

	/** Invokes a modal dialog in which the user must input text. The dialog cannot be dismissed
		until text is entered. If default text is provided, however, the user can dismiss the
		dialog without changing that text.

		@param title The title for the dialog
		@param messageText A text message to display above the input field, or NULL to display no message.
		@param label The label for the text field.
		@param ioName [in/out] On input, a default string for the text field. This is replaced by text that
			the user enters, if any.
		@param IsValidInputProc A function pointer to a validation callback that validates the input as typed by the user.
			The first parameter to this call is a \c #AIValidationStage constant that reports whether the call is
			made upon text entry, or upon dismissal of the dialog.
		@param userdata Developer-defined user data to be passed to the validation callback.
		@param maxInputChars The maximum number of characters that user can enter in the text field.
	 */
	AIAPI AIErr (*GetInputFromUser) ( const ai::UnicodeString &title, const ai::UnicodeString* messageText, const ai::UnicodeString &label, ai::UnicodeString& ioField, IsValidInputProc validator, void *userdata, ai::int32 maxInputChars);

	/**  Creates a singleton resource manager instance to be used for cursors.
		Call once for a plugin, after startup is completed.	Destroy the instance on
		application shutdown (not plug-in shutdown).
		@param inRscMgr [out] A buffer in which to return the resource-manager handle.
		@see DisposeCursorResourceMgr()
	*/
	AIAPI AIErr (*CreateCursorResourceMgr)(SPPluginRef, AIResourceManagerHandle* inRscMgr);

	/**  Sets the image to be used for the plug-in's cursor.
		@param cursorID The resource ID of the cursor, or a \c #AIPredefinedCursor
			constant value to use one of the predefined cursors. Cursor images must be
			in PNG format.
		@param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr().
	*/
	AIAPI AIErr (*SetCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr);

	/**  Disposes of the plug-in's singleton resource manager. Call once when
		 \c #kAIApplicationShutdownNotifier is received. Do not call as part of plug-in shutdown.
		@param The resource manager handle, as returned on creation.
	*/
	AIAPI AIErr (*DisposeCursorResourceMgr)(AIResourceManagerHandle);

	/** Reports the current language in use.
	 @param lang [out] A buffer in which to return the language code.
	 */
	AIAPI AIErr (*GetAILanguageCode)(ai::UnicodeString& lang);
    
	/** Reports the maximum scale factor for all the screens in a Mac OS system,
            or the application's UI scale factor in a Windows system.
            @return The scale factor.
    */

	AIAPI AIReal (*GetMaximumScaleFactorOnSystem)();


	/** Reports the ratio of Art Scale factor and View Scale Factor.
		(ArtScaleFactor/ ViewScaleFactor)
    */
	AIAPI AIReal(*GetArtToViewScaleFactor)(AIDocumentViewHandle view);
};

#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140AnnotatorDrawer.h<|end_filename|>
#ifndef __AI140AnnotatorDrawer__
#define __AI140AnnotatorDrawer__

/*
 *        Name:	AI140AnnotatorDrawer.h
 *      Author: Started by <NAME>
 *        Date: 2007
 *     Purpose:	Adobe Illustrator Annotator Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2007-2008 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIAnnotatorDrawer.h"

#include "AIHeaderBegin.h"

// This Windows macro obscures an API
#undef DrawText

/** @file AI140AnnotatorDrawer.h */


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAIAnnotatorDrawerSuiteVersion1		AIAPI_VERSION(1)
#define kAI140AnnotatorDrawerSuiteVersion		kAIAnnotatorDrawerSuiteVersion1
#define kAI140AnnotatorDrawerSuite			kAIOldAnnotatorDrawerSuite
//This suite #defd as "AI Annotator Suite", in the latest version we have changed it to "AI Annotator Drawer
// suite", but cant change it here to maintain backward compatibility.
#define kAIOldAnnotatorDrawerSuite			"AI Annotator Suite"



/**	@ingroup Suites
	The annotator drawer suite allows plug-ins to draw annotations into the
	document window that are not a part of the artwork. Coordinates are in
	document view space.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAI40AnnotatorDrawerSuite and \c #kAI140AnnotatorDrawerSuiteVersion.
 */

struct AI140AnnotatorDrawerSuite
{
	/// @name Color
	//@{
	/// Set drawing color
	AIAPI void (*SetColor)(AIAnnotatorDrawer *drawer, const AIRGBColor &color);

	/// Get drawing color
	AIAPI void (*GetColor)(AIAnnotatorDrawer *drawer, AIRGBColor &color);
	//@}

	/// @name Lines and shapes
	/// Note: Line width is one point by default.
	//@{
	/** Set line width. */
	AIAPI void (*SetLineWidth)(AIAnnotatorDrawer *drawer, const AIReal newWidth);
	/** Get line width. */
	AIAPI AIReal (*GetLineWidth)(AIAnnotatorDrawer *drawer);

	/** Set dashed line drawing on or off. If \a dashed is true, all lines will
		be drawn dashed until set back to false. */
	AIAPI void (*SetLineDashed)(AIAnnotatorDrawer *drawer, AIBoolean dashed);
	/** Get state of dashed line drawing. */
	AIAPI AIBoolean (*GetLineDashed)(AIAnnotatorDrawer *drawer);

	/** Draw a line between \a start and \a end points. */
	AIAPI AIErr (*DrawLine)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint &end);
	/** Draw a rectangle, optionally filling it with the current color. */
	AIAPI AIErr (*DrawRect)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill);

	/** Draw a polygon by connecting the points. */
	AIAPI AIErr (*DrawPolygon)(AIAnnotatorDrawer *drawer, const AIPoint points[], ai::uint32 numPoints, AIBoolean fill);

	/** Draw an ellipse bounded by the rectangle. */
	AIAPI AIErr (*DrawEllipse)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill);

	/** Draw cubic Bezier curves starting at \a start and threading through the points in the \a pointSets array.
		@param start[in]		The starting anchor point for the curve
		@param pointSets[in]	An array of sets of points describing the Bezier. The points in the
			inner array, p0, p1, and p2, have the following meaning:<br>
				p0	exit control point for the previous anchor<br>
				p1	entry control point for anchor<br>
				p2	anchor point<br>
			These are in the same order as for the PostScript CurveTo command.
		@param numPointSets[in]	Number of sets of points in the \a pointSets array.
		*/
	AIAPI AIErr (*DrawBezier)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint pointSets[][3], ai::uint32 numPointSets, AIBoolean fill);
	//@}

	/// @name Text and Fonts
	//@{
	/** Draw \a text putting the bottom left at \a bottomLeft. */
	AIAPI AIErr (*DrawText)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIPoint &bottomLeft);

	/** Draw text aligned in the rectangle \rect with the given vertical and
		horizontal alignment. NB: Text will not wrap. */
	AIAPI AIErr (*DrawTextAligned)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIHorizAlignment horizAlign, const AIVertAlignment vertAlign, const AIRect &rect);

	/**	Find the bounds of text drawn in current font at current size. Specify \a location to
		get the bounds document view coordinates, otherwise bounds will start at 0,0.
		@param text[in]		Text to be drawn
		@param location[in]	Optional parameter to simulate drawing text in document view coordinates.
		@param bounds[out]	Coordinates of text boundary. If \a location is not specified, top left will be 0,0.	
		*/
	AIAPI AIErr (*GetTextBounds)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, AIPoint *location, AIRect &bounds);

	/** Set font size. */
	AIAPI void (*SetFontSize)(AIAnnotatorDrawer *drawer, const AIReal size);

	/** Get font size. */
	AIAPI AIReal (*GetFontSize)(AIAnnotatorDrawer *drawer);

	/** Set the typeface and size with a AIAnnotatorFont enumeration. */
	AIAPI AIErr (*SetFontPreset)(AIAnnotatorDrawer *drawer, AIAnnotatorFont font);

	/** Set the font using an \a AIFontKey. */
	AIAPI AIErr (*SetFontByFontKey)(AIAnnotatorDrawer *drawer, AIFontKey font);

	/** Set the font by name. The API first attempts to interpret \a name as a
		PostScript name, then if not found, as a platform encoded name. */
	AIAPI AIErr (*SetFontByName)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &name);

	/** Get the \a AIFontKey for the current font. */
	AIAPI AIFontKey (*GetFontKey)(AIAnnotatorDrawer *drawer);

	/** Get the name of the current font. */
	AIAPI void (*GetFontName)(AIAnnotatorDrawer *drawer, ai::UnicodeString &name);
	//@}

	/// @name Clipping
	//@{

	/**	Start sequence to define a clipping path. Anything drawn before calling \a DefineClipEnd
		will be unioned into the clipping path, after which all drawing will be clipped
		until calling \a ClearClip. Shapes drawn for clipping should generally be filled.
		*/
	AIAPI void (*DefineClipStart)(AIAnnotatorDrawer *drawer);

	/**	End sequence defining clipping path. Subsequent drawing will be clipped to the paths
		previously drawn until calling \a ClearClip.
		*/
	AIAPI void (*DefineClipEnd)(AIAnnotatorDrawer *drawer);

	/** Remove clipping path defined with \a DefineClipStart/DefineClipEnd. */
	AIAPI void (*ClearClip)(AIAnnotatorDrawer *drawer);
	//@}

	/// @name Miscellaneous
	//@{
	/** Set highlight blending mode (off by default). This provides extra visibility
		like XOR drawing but it cannot be used to erase previous marks drawn in highlight mode.
		*/
	AIAPI AIErr (*SetHighlightMode)(AIAnnotatorDrawer *drawer, AIBoolean highlightOn);

	/** Get highlight blending mode setting. Return value of true indicates highlight mode is on. */
	AIAPI AIBoolean (*GetHighlightMode)(AIAnnotatorDrawer *drawer);

	/**  Draw the icon putting the top left at the point \a topLeft. */
	AIAPI AIErr (*DrawIcon)(AIAnnotatorDrawer *drawer, ADMIconRef inIcon,  const AIPoint &topLeft);

	/** Draw the icon centered in the given rectangle. */
	AIAPI AIErr (*DrawIconCentered)(AIAnnotatorDrawer *drawer, ADMIconRef inIcon, const AIRect &rect);

	/** Get an AGM port suitable for use with AGMSuite. */
	AIAPI AIAGMPort* (*GetAGMPort)(AIAnnotatorDrawer *drawer);

	/** Release AGM port and set pointer to NULL. */
	AIAPI void (*ReleaseAGMPort)(AIAGMPort *&admAGMPort);
	//@}
};


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.h<|end_filename|>
#ifndef __BloksAIPluginSuites_H__
#define __BloksAIPluginSuites_H__

#include "IllustratorSDK.h"
#include "Suites.hpp"
#include "AIStringFormatUtils.h"

// AI suite headers

// Suite externs
extern "C" SPBlocksSuite *sSPBlocks;
extern "C" AIUnicodeStringSuite* sAIUnicodeString;
extern "C" AIStringFormatUtilsSuite* sAIStringFormatUtils;

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Color.h<|end_filename|>
#ifndef __AI110Color__
#define __AI110Color__

/*
 *        Name:	AI110Color.h
 *   $Revision: 17 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 6.0 Color Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIColor.h"

#include "AIHeaderBegin.h"

/** @file AIColor.h */


/*******************************************************************************
 **
 **	Constants
 **
 **/

/** Custom colors define named colors. The appearance of the named color is
	defined by a color of one of these types. */
typedef enum {
	/** Solid ink, expressed in four process colors */
	kAI110CustomFourColor = 0,
	/** RGB colors */
	kAI110CustomThreeColor
} AI110CustomColorTag;


/*******************************************************************************
 **
 **	Types
 **
 **/

/** The union of all possible process colors that can be associated with
	a custom color. */
typedef union {
	AIFourColorStyle	f;
	AIThreeColorStyle	rgb;
	AIGrayColorStyle	gray;
} AI110CustomColorUnion;

/** Custom colors define named colors. These colors may be actual inks or simply
	names for process colors depending on whether the custom color is a spot
	or global process color. In either case the custom color has an associated
	process color. The type of process color is identified by this enumeration. */
typedef struct {
	AI110CustomColorTag		kind;
	AI110CustomColorUnion	c;
	AICustomColorFlags		flag;
	unsigned char			name[32];
} AI110CustomColor;



#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUnicodeString.h<|end_filename|>

#ifndef __AIUnicodeString__
#define __AIUnicodeString__

/*
 *        Name:	AIUnicodeString.h
 *   $Revision: 6 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Unicode String Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2004-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "IAIUnicodeString.h"
#include "AICharacterEncoding.h"
#include "AITypes.h"

#include "AIHeaderBegin.h"

/** @file AIUnicodeString.h */

/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAIUnicodeStringSuite				"AI Unicode String Suite"
#define kAIUnicodeStringSuiteVersion		AIAPI_VERSION(8)
#define kAIUnicodeStringVersion				kAIUnicodeStringSuiteVersion

/*******************************************************************************
 **
 ** Types
 **
 **/

/*******************************************************************************
 **
 **	Suite
 **
 **/

/**	@ingroup Suites
	This suite provides utilities that allow you to create and manipulate
	Unicode strings.
	@note It is recommended that you use the wrapper class, \c #ai::UnicodeString,
	rather than calling these functions directly.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIUnicodeStringSuite and \c #kAIUnicodeStringVersion.
	*/
typedef struct {

	/** Initializes a Unicode string with the contents of a C string.
			@param str [out] A buffer in which to return the Unicode string.
			@param string The C string.
			@param srcByteLen The number of bytes in the C string.
	  		@param encoding The encoding type for the new string.
   		*/
	AIAPI AIErr (*Initialize) (ai::UnicodeString& str, const char* string,
		ai::UnicodeString::offset_type srcByteLen, AICharacterEncoding encoding);

	/** Initializes a Unicode string with the contents of a UTF-16 encoded string.
			@param str [out] A buffer in which to return the Unicode string.
			@param utfs The UTF-16 encoded string, an array UTF-16 code units.
			@param srcUTF16Count The number of UTF-16 code units to be taken from the source string.
				A value of \c npos mean that the source string is 0-terminated.
		*/
	AIAPI AIErr (*InitializeUTF16) (ai::UnicodeString& str, const ASUnicode* utfs, ai::UnicodeString::offset_type srcUTF16Count);

	/** Initializes a Unicode string with a single UTF-32 code point (character) repeated a
		given number of times.
			@param str [out] A buffer in which to return the Unicode string.
			@param count The number of characters.
			@param ch The UTF code point.
 		*/
	AIAPI AIErr (*InitializeUTF32Char) (ai::UnicodeString& str, ai::UnicodeString::offset_type count,
		ai::UnicodeString::UTF32TextChar ch);

	/** Deletes the contents of a Unicode string, and reset it to an uninitialized state.
		Any pointers to UTF-16 buffers derived from that string become invalid.
			@param str The string.
   		*/
	AIAPI AIErr (*Destroy) (ai::UnicodeString& str);

	/* Basic operations (a la std::basic_string) */

	/** Appends one Unicode string to another.
			@param str The string to append to.
			@param str2 The string to append.
		*/
	AIAPI AIErr (*Append) (ai::UnicodeString& str, const ai::UnicodeString& str2);

	/** Appends a sub-string of one Unicode string to another.
			@param str The string to append to.
			@param str2 The source string for the substring to append.
			@param startOffset The 0-based character offset for the substring.
			@param count the maximum number of characters for the substring.
		*/
	AIAPI AIErr (*AppendSubString) (ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/** Assigns one Unicode string to another.
			@param str The destination string.
			@param str2 The source string.
		*/
	AIAPI AIErr (*Assign) (ai::UnicodeString& str,
		const ai::UnicodeString& str2);

	/** Copies one Unicode string into another.
			@param str The destination string.
			@param str2 The source string. If empty or uninitialized,
				the destination string is truncated.
    	*/
	AIAPI AIErr (*Copy) (ai::UnicodeString& str, const ai::UnicodeString& str2);

	/** Retrieves the UTF-32 code point at an index position in a Unicode string.
			@param str The string.
			@param position The 0-based character offset for the character.
			@param ch [out] A buffer in which to return the character.
			@return An error if the given position is not a valid offset into
				the string.
		*/
	AIAPI AIErr (*GetChar) (const ai::UnicodeString& str,
		ai::UnicodeString::size_type position,
		ai::UnicodeString::UTF32TextChar& ch);

	/** Clears the contents of a Unicode string. An uninitialized string remains unchanged.
		(Note that this function does not return an error code.)
			@param str The string.
		*/
	AIAPI void (*Clear) (ai::UnicodeString& str);

	/** Compares substrings in two Unicode strings. Uninitialized strings
		are equal to other uninitialized strings and empty strings, and are less
		than initialized, non-empty strings.
		(Note that this function returns a numeric value, not an error code.)
			@param str The first string (left side of compare).
			@param pos The 0-based offset for the first character of the first substring.
			@param num The number of characters in the first substring.
			@param str2 The second string (right side of compare).
			@param startOffset The 0-based offset for the first character of the second substring.
			@param count The number of characters in the second substring.
			@return 0 if the substrings are equal.
				<br> Positive if the first substring is greater than the second.
				<br> Negative if the second substring is greater than the first.
		*/
	AIAPI ai::int32 (*Compare) (const ai::UnicodeString& str,
		ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num,
		const ai::UnicodeString& str2,
		ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count);

	/**
    * Convert the characters in this to lower case following the conventions of
    * the default locale.
	* @param UnicodeString to modify via reference
    * @return nothing.
    */
	AIAPI AIErr (*toLower) (ai::UnicodeString& src);

	/**
    * Convert the characters in this to upper case following the conventions of
    * the default locale.
	* @param UnicodeString to modify via reference
    * @return nothing.
    */
	AIAPI AIErr (*toUpper) (ai::UnicodeString& src);

	/** Performs a caseless comparison of substrings in two Unicode strings.
	    Strings are case folded in a locale-independent manner prior to comparison.
		Uninitialized strings are equal to other uninitialized strings and
		empty strings, and are less than initialized, non-empty strings.
		(Note that this function returns a numeric value, not an error code.)
			@param str The first string (left side of compare).
			@param pos The 0-based offset for the first character of the first substring.
			@param num The number of characters in the first substring.
			@param str2 The second string (right side of compare).
			@param startOffset The 0-based offset for the first character of the second substring.
			@param count The number of characters in the second substring.
			@return 0 if the substrings are equal.
				<br> Positive if the first substring is greater than the second.
				<br> Negative if the second substring is greater than the first.
			*/
	AIAPI ai::int32 (*CaseCompare) (const ai::UnicodeString& str,
		ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num,
		const ai::UnicodeString& str2,
		ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count);

	/** Performs a normalized comparison of substrings in two Unicode strings.
		Uninitialized strings are equal to other uninitialized strings and
		empty strings, and are less than initialized, non-empty strings.
		(Note that this function returns a numeric value, not an error code.)
			@param str The first string (left side of compare).
			@param pos The 0-based offset for the first character of the first substring.
			@param num The number of characters in the first substring.
			@param str2 The second string (right side of compare).
			@param startOffset The 0-based offset for the first character of the second substring.
			@param count The number of characters in the second substring.
			@return 0 if the substrings are equal.
				<br> Positive if the first substring is greater than the second.
				<br> Negative if the second substring is greater than the first.
		*/
	AIAPI AIErr (*CanonicalCompare) (const ai::UnicodeString& str, const ai::UnicodeString& str2, ai::int32& compareResult);

	/** Performs a normalized, caseless comparison of substrings in two Unicode strings.
	    Strings are case folded in a locale-independent manner prior to comparison.
		Uninitialized strings are equal to other uninitialized strings and
		empty strings, and are less than initialized, non-empty strings.
		(Note that this function returns a numeric value, not an error code.)
			@param str The first string (left side of compare).
			@param pos The 0-based offset for the first character of the first substring.
			@param num The number of characters in the first substring.
			@param str2 The second string (right side of compare).
			@param startOffset The 0-based offset for the first character of the second substring.
			@param count The number of characters in the second substring.
			@return 0 if the substrings are equal.
				<br> Positive if the first substring is greater than the second.
				<br> Negative if the second substring is greater than the first.
		*/
	AIAPI AIErr (*CanonicalCaseCompare) (const ai::UnicodeString& str, const ai::UnicodeString& str2, ai::int32& compareResult);

	/** Retrieves the number of UTF-32 code points (characters) in a Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string.
			@return The number of characters, 0 for an uninitialized or empty string.
		*/
	AIAPI ai::UnicodeString::size_type (*Length) (const ai::UnicodeString& str);

	/** Reports whether a Unicode string is empty.
		(Note that this function returns a boolean value, not an error code.)
			@param str The string.
			@return True if the string is uninitialized or empty.
		*/
	AIAPI AIBool8 (*Empty) (const ai::UnicodeString& str);

	/** Erases characters from a Unicode string.
			@param str The string, which is modified in place.
			@param startOffset The 0-based index of the first character to erase.
			@param count The maximum number of characters to erase.
			@return An error if the given position index is not a valid offset into the string.
		*/
	AIAPI AIErr (*Erase) (ai::UnicodeString& str,
		ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/** Searches for the first occurrence of a character in a substring of a Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string.
			@param ch The character to search for.
			@param startOffset The 0-based index in \c str at which to start the search.
			@return The 0-based character index of the found character,
				or \c npos if the character is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*FindChar) (const ai::UnicodeString& str,
		ai::UnicodeString::UTF32TextChar ch,
		ai::UnicodeString::size_type startOffset);

	/** Searches for the first occurrence of an entire string within a substring of a Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@return The 0-based character index of the found string,
				or \c npos if the string is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*FindString) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset);

	/** Searches for the first occurrence of a substring of one Unicode string within
		a substring of another Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@param count The maximum number of characters within \c str2 to search for.
			@return The 0-based character index of the found string,
				or \c npos if the string is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*FindSubString) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/** Searches for the first occurrence of a substring of one Unicode string within
		a substring of another Unicode string, performing a caseless compare.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@param count The maximum number of characters within \c str2 to search for.
			@return The 0-based character index of the found string,
				or \c npos if the string is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*CaseFindSubString) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/**	Searches for the last occurrence of a character in a substring of a Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string.
			@param ch The character to search for.
			@param startOffset The 0-based index in \c str at which to start the search.
			@return The 0-based character index of the found character,
				or \c npos if the character is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*RFindChar) (const ai::UnicodeString& str,
		ai::UnicodeString::UTF32TextChar ch,
		ai::UnicodeString::size_type startOffset);

	/**	Searches for the last occurrence of an entire string within a substring of a Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@return The 0-based character index of the found string,
				or \c npos if the string is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*RFindString) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset);

	/**	Searches for the last occurrence of a substring of one Unicode string within
		a substring of another Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@param count The maximum number of characters within \c str2 to search for.
			@return The 0-based character index of the found string,
				or \c npos if the string is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*RFindSubString) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/**	Searches for the first occurrence of any character from a subset of one
		Unicode string in a substring of another string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@param count The number of characters from the start of \c str2 to compare.
			@return The 0-based character index of the found character,
				or \c npos if the character is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*FindFirstOf) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/** Searches in a Unicode string for the first occurrence of any character that
		does not appear in a subset of another string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@param count The number of characters from the start of \c str2 to compare.
			@return The 0-based character index of the found character,
				or \c npos if the character is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*FindFirstNotOf) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/** Searches in a Unicode string for the last character that also appears in
		a substring of another string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@param count The number of characters from the start of \c str2 to compare.
			@return The 0-based character index of the found character,
				or \c npos if the character is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*FindLastOf) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/** Searches in a Unicode string for the last character that does not appear in
		a substring of another string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string to search in.
			@param str2 The string to compare against.
			@param startOffset The 0-based index in \c str at which to start the search.
			@param count The number of characters from the start of \c str2 to compare.
			@return The 0-based character index of the found character,
				or \c npos if the character is not found.
		*/
	AIAPI ai::UnicodeString::size_type (*FindLastNotOf) (const ai::UnicodeString& str,
		const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset,
		ai::UnicodeString::size_type count);

	/** Resizes a Unicode string to hold a given number of characters, truncating
		or padding it as needed.
			@param str The string, which is modified in place.
			@param count The number of characters.
			@param ch The padding character, if needed.
		*/
	AIAPI AIErr (*Resize) (ai::UnicodeString& str, ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch);

	/** Creates a substring of a Unicode string.
			@param subString [in, out] A Unicode string in which to return the substring.
				If it is uninitialized on input, it is initialized only if the source
				string is initialized and not empty.
			@param str The source string.
			@param offset The 0-based index in \c str at which to start the substring.
			@param count The maximum number of characters to place in the new substring.
		*/
	AIAPI AIErr (*SubStr) (ai::UnicodeString& subString,
		const ai::UnicodeString& str,
		ai::UnicodeString::size_type offset, ai::UnicodeString::size_type count);

	/** Swaps the contents of two Unicode strings.
			@param str The first string.
			@param str2 The second string.
		*/
	AIAPI AIErr (*SwapStr) (ai::UnicodeString& str, ai::UnicodeString& str2);

	/* non-std::string based functionality */

	//AIAPI int CaseCompare(const ai::UnicodeString& str,
	//	ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num,
	//	const ai::UnicodeString& str2,
	//	ai::UnicodeString::size_type startOffset,
	//	ai::UnicodeString::size_type count);
	//AIAPI void FoldCase(ai::UnicodeString& str);

	/** Reports whether a Unicode string contains surrogate pairs.
		(Note that this function returns a boolean value, not an error code.)
			@param str The string.
			@return True if it contains at least one surrogate pair.
	*/
	AIAPI AIBool8 (*HasSurrogates) (const ai::UnicodeString& str);

	/** Retrieves a read-only pointer to a buffer that contains UTF-16 encoded
		characters in platform byte order, for a given Unicode string.
		(Note that this function returns a numeric value, not an error code.)
			@param str The string.
			@param buffer [out] The pointer to the buffer. Can be 0 if the string is
				empty or uninitialized.	Might not be 0 terminated.
			@return The length of the buffer in UTF-16 code units.
		*/
	AIAPI ai::UnicodeString::size_type (*UTF_16) (const ai::UnicodeString& str,
		const ai::UnicodeString::UTF16Char*& buffer);

	/** Retrieves the contents of a Unicode string in a given encoding.
			@param str The string.
			@param encoding The encoding.
			@param buffer [out] A buffer in which to return the encoded
					contents. Need not be initialized prior to the call.
			@param bufferByteCount [out] A buffer in which to return the number of bytes
				in the buffer that contain the requested data. The buffer can be
				larger than this.
		*/
	AIAPI AIErr (*GetAs) (const ai::UnicodeString& str, AICharacterEncoding encoding,
		ai::AutoBuffer<char>& buffer, ai::UnicodeString::size_type& bufferByteCount);

	/** Initializes a Unicode string from a ZString. (ZStrings are used internally
		for localization.)
			@param str The string.
			@param zStringKey The ZString key.
		*/
	AIAPI AIErr (*InitializeZString) (ai::UnicodeString& str, ZRef zStringKey);

	/* New for AI13 */

	/** Normalizes a Unicode string.
	   		@param str The string.
			@param form The normalization format.
		*/
	AIAPI AIErr (*Normalize) (ai::UnicodeString& str, ai::UnicodeString::NormalizedForm form);


} AIUnicodeStringSuite;


#include "AIHeaderEnd.h"



#endif // __AIUnicodeString__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90ArtStyleParser.h<|end_filename|>
/*
 *        Name:	AI90ArtStyleParser.h
 *     Purpose:	Adobe Illustrator 9.0 Art Style Parser Suite.
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

#ifndef __AI90ArtStyleParser__
#define __AI90ArtStyleParser__


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIArtStyleParser.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI90ArtStyleParserSuite			kAIArtStyleParserSuite
#define kAIArtStyleParserSuiteVersion2		AIAPI_VERSION(2)
#define kAI90ArtStyleParserSuiteVersion		kAIArtStyleParserSuiteVersion2


/*******************************************************************************
 **
 **	Suite
 **
 **/

/* Suite for parsing and editing styles on art objects */
typedef struct {

	// Allocate and delete a parser
	AIAPI AIErr (*NewParser) ( AIStyleParser* parser );
	AIAPI AIErr (*DisposeParser) ( AIStyleParser parser );

	// Initialize a style parser
	AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle );
	AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle );
	AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser );
		// Calls to IsStyleParseable make sense only immediately after ParseStyle
	
	// Count the number of elements inside the parser
	AIAPI ASInt32 (*CountPreEffects) ( AIStyleParser parser );
	AIAPI ASInt32 (*CountPostEffects) ( AIStyleParser parser );
	AIAPI ASInt32 (*CountPaintFields) ( AIStyleParser parser );
	AIAPI ASInt32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField );
	
	// Retrieve elements from the parser
	AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect );
	AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect );
	AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField* paintField );
	AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ASInt32 n,
											  AIParserLiveEffect* effect );
	AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField );
	
	// Insert elements into the parser at specified places and indices. Use index -1 to insert element
	// at the end.
	AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect );
	AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect );
	AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField paintField );
	AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ASInt32 n,
												 AIParserLiveEffect effect );

	// Remove elements from the parser. The doDelete boolean lets the parser know whether it can
	// dispose of the memory associated with the element. Plugins may not want to have the 
	// memory disposed if they are moving the elements from one position to another.
	AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete );
	AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete );
	AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete );
	AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, 
											  AIParserLiveEffect effect, AIBoolean doDelete );
	
	// Simplify the style.
	// RemoveAllEffects removes all the effects in the parser.
	// Simplify removes all the effects and all the paint fields except for the focus fill
	// and focus stroke. Simplify also sets all blends back to normal 100% opaque and places
	// the focus stroke on top of the focus fill.
	AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser );
	AIAPI AIErr (*Simplify) ( AIStyleParser parser );
	
	// Miscellaneous utility functions
	AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField );
	AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField );
	AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField );
	AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField );
		// SetFocus should be called when the given style parser hasn't yet been modified
		// since the call to ParseStyle. The artStyle passed in should be the same one
		// previously passed into ParseStyle. The parser remains linked to the artStyle
		// after this call.
	AIAPI ASInt32 (*GetGroupContentsPosition) ( AIStyleParser parser );
	AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ASInt32 position );
	
	// CreateNewStyle constructs and returns a new art style handle based on the elements
	// in the given parser. ParseStyle would still need to be called on the new style if
	// a plugin wanted to call SetFocus or EditEffectParameters afterward.
	AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle );
	
	// Basic information about the elements in the parser
	AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser );
		// A style is "invisible" if there are no effects, all the paint fields have
		// a none color, and the overall style transparency contains default values.
	AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser );
	AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser );
	AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser );
	
	// Effect-specific calls
	AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle );
	AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params );
	AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle );
	AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params );
	AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect );
	AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect );
		// EditEffectParameters should be called when the given effect was retrieved from a style
		// parser which hasn't yet been modified since the call to ParseStyle. The artStyle
		// passed in should be the same one previously passed into ParseStyle. The parser remains
		// linked to the artStyle after this call. However, a new style will have been created if
		// the user modifies the parameters, and this new style is neither linked to the parser
		// nor the same one as the original artStyle.
	
	// PaintField-specific calls
	// AIArtStylePaintData currently ignored in GetStroke and SetStroke
	AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField );
	AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField );
	AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData );
	AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData );
	AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData );
	AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData );
	AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict );
	AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict );
	AIAPI ASInt32 (*GetColorPosn) ( AIParserPaintField paintField );
	AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ASInt32 colorPosn );
	AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField );
	// PaintFields can contain live effects which substitute for the built-in fill and stroke behaviors
	AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle,
											AILiveEffectParameters* params );
	AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle,
											AILiveEffectParameters params );

	// Transparency-specific calls
	AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict );
	AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict );

} AI90ArtStyleParserSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Pathfinder.h<|end_filename|>
/*
 *        Name:	AI90Pathfinder.h
 *     Purpose:	Adobe Illustrator 9.0 Pathfinder Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

#ifndef __AI90Pathfinder__
#define __AI90Pathfinder__

/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIPathfinder.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI90PathfinderSuite		kAIPathfinderSuite
#define kAIPathfinderSuiteVersion3	AIAPI_VERSION(3)
#define kAI90PathfinderSuiteVersion	kAIPathfinderSuiteVersion3
#define kAI90PathfinderVersion		kAI90PathfinderSuiteVersion


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*DoUniteEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoIntersectEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoExcludeEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoBackMinusFrontEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoFrontMinusBackEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoDivideEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoOutlineEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoTrimEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoMergeEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoCropEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoHardEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoSoftEffect) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*DoTrapEffect) ( AIPathfinderData *data, AIFilterMessage *message );

	AIAPI AIErr (*GetHardEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*GetSoftEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*GetTrapEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message );
	AIAPI AIErr (*GetGlobalOptions) ( AIPathfinderData *data, AIFilterMessage *message );

} AI90PathfinderSuite;


#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/common/source/Main.cpp<|end_filename|>
//========================================================================================
//  
//  $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/Main.cpp $
//
//  $Revision: #1 $
//
//  Copyright 1987 Adobe Systems Incorporated. All rights reserved.
//  
//  NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance 
//  with the terms of the Adobe license agreement accompanying it.  If you have received
//  this file from a source other than Adobe, then your use, modification, or 
//  distribution of it requires the prior written permission of Adobe.
//  
//========================================================================================

#include "Plugin.hpp"

#include <string.h>
#include <stdio.h>

#ifndef NDEBUG
#ifdef MAC_ENV

#else
#include <Windows.h>
#endif
#endif

extern "C"
{
	SPBasicSuite *sSPBasic;
}

extern Plugin *AllocatePlugin(SPPluginRef pluginRef);
extern void FixupReload(Plugin *plugin);


extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message)
{
	ASErr error = kNoErr;
	SPMessageData *msgData = (SPMessageData *)message;
	
	Plugin *plugin = (Plugin *)msgData->globals;
	
	sSPBasic = msgData->basic;
	
	if (strcmp(caller, kSPInterfaceCaller) == 0) 
	{	
		if (strcmp( selector, kSPInterfaceStartupSelector) == 0)
		{
			plugin = AllocatePlugin(msgData->self);
			if (plugin)
			{
				msgData->globals = (void *)plugin;
				error = plugin->StartupPlugin((SPInterfaceMessage *)message);

				if (error != kNoErr)
				{
					// Make sure to delete in case startup failed
					delete plugin;
					plugin = nil;
					msgData->globals = nil;
				}
			}
			else
			{
				error = kOutOfMemoryErr;
			}
		}
		else if (strcmp(selector, kSPInterfaceShutdownSelector) == 0)
		{
			if (plugin)
			{
				error = plugin->ShutdownPlugin((SPInterfaceMessage *)message);				
				delete plugin;
				plugin = nil;
				msgData->globals = nil;
			}
		}
	}
	
	if (plugin)
	{
		if (Plugin::IsReloadMsg(caller, selector))
		{
			// Call this before calling any virtual functions (like Message)
			FixupReload(plugin);
			error = plugin->ReloadPlugin((SPInterfaceMessage *)message);
		}
		else
		{
			// If a load or reload failed because the suites could not be acquired, we released
			// any partially acquired suites and returned an error.  However, SuitePea still might
			// call us, so protect against this situation.
			if (plugin->SuitesAcquired())
				error = plugin->Message(caller, selector, message);
			else
				error = kNoErr;
		}

		if (error == kUnhandledMsgErr)
		{
			error = kNoErr;
#ifndef NDEBUG
#ifdef MAC_ENV
			fprintf(stderr, "Warning: Unhandled plugin message: caller \"%s\" selector \"%s\"\n", caller, selector);
#else
			char buf[1024];
			
			sprintf(buf+1, "Warning: Unhandled plugin message: caller \"%s\" selector \"%s\"\n", caller, selector);
			OutputDebugStringA(buf+1);
#endif
#endif
		}
	}	

	if (error)
	{
		if (plugin)
			plugin->ReportError(error, caller, selector, message);
		else
			Plugin::DefaultError(msgData->self, error);
	}
	
	return error;
}


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Basic.h<|end_filename|>
#ifndef __AI60Basic__
#define __AI60Basic__

/*
 *        Name:	AIBasic.h
 *   $Revision: 2 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 6.0 Basic Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI60BasicSuite		"AI Basic Suite"
#define kAI60BasicSuiteVersion	AIAPI_VERSION(2)
#define kAI60BasicVersion		kAI60BasicSuiteVersion

#define kSuiteNotFoundErr	'STE?'


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*AcquireSuite) ( char *name, long version, void **suiteProcs );
	AIAPI AIErr (*ReleaseSuite) ( void *suiteProcs );

} AIBasicSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100UID.h<|end_filename|>
#ifndef __AI100UID__
#define __AI100UID__

/*
 *        Name:	AI100UID.h
 *		$Id $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 10.0 Unique ID Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIUID.h"


#include "AIHeaderBegin.h"

/** @file AI100UID.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI100UIDUtilsSuite						kAIUIDUtilsSuite
#define kAIUIDUtilsSuiteVersion1				AIAPI_VERSION(3)
#define kAI100UIDUtilsSuiteVersion				kAIUIDUtilsSuiteVersion1


/*******************************************************************************
 **
 **	Types
 **
 **/

/*******************************************************************************
 **
 **	Suite
 **
 **/


/**
	convenience APIs for working with art object UIDs.
*/
typedef struct AI100UIDUtilsSuite {

	/** Get the unique id of the art object. If the object has no UID and create
	is TRUE then a machine generated UID will be assigned to the object. */
	AIAPI AIErr (*GetArtUID) ( AIArtHandle art, AIBoolean create, AIUIDRef* uid );
	/** Set the unique id of the art object replacing its current id if any. */
	AIAPI AIErr (*SetArtUID) ( AIArtHandle art, AIUIDRef uid );
	/** Transfer the id from the source to the destination object */
	AIAPI AIErr (*TransferArtUID) ( AIArtHandle srcart, AIArtHandle dstart );

	/** Get a new UIDREF for the art object. The object will be assigned a uid if
	it does not already have one. */
	AIAPI AIErr (*NewArtUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref );
	/** Get the art object referenced by the UIDREF. */
	AIAPI AIErr (*GetReferencedArt) ( AIUIDREFRef uidref, AIArtHandle* art );

	/** Get the UID name of the art object. An empty string indicates no id
	is assigned. */
	AIAPI AIErr (*GetArtUIDName) ( AIArtHandle art, char* buffer, ASInt32 bufsize );
	/** Set the UID name of the art object. If makeUnique is true then a
	unique id will be manufactured from the name if necessary. */
	AIAPI AIErr (*SetArtUIDName) ( AIArtHandle art, const char* buffer );

	/** Get the name or XML ID of the art object depending on the setting of
	the user preference. isDefaultName may be nil, if not then it is set
	to true if the art object has no name or id and consequently the default
	name for the art was returned. */
	AIAPI AIErr (*GetArtNameOrUID) ( AIArtHandle art, char* buffer, ASInt32 bufsize, ASBoolean* isDefaultName );
	/** Set the name or XML ID of the art object depending on the setting of
	the user preference. Note that names are converted to valid XML IDs
	and then used to specify the XML ID of the object. */
	AIAPI AIErr (*SetArtNameOrUID) ( AIArtHandle art, const char* buffer );

	/** Manufacture a UID based on an existing UID */
	AIAPI AIErr (*MakeUIDFromBase) ( AIUIDRef base, AIUIDRef* uid );
	/** Manufacture a unique name from a base name */
	AIAPI AIErr (*MakeUniqueNameFromBase) ( const char* base, char* buffer, ASInt32 bufsize );

} AI100UIDUtilsSuite;

#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100DrawArt.h<|end_filename|>
#ifndef __AI100DrawArt__
#define __AI100DrawArt__

/*
 *        Name:	AI100DrawArt.h
 *     Purpose:	Adobe Illustrator 10.0 Draw Art Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIDrawArt.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI100DrawArtSuite			kAIDrawArtSuite
#define kAIDrawArtSuiteVersion5		AIAPI_VERSION(5)
#define kAI100DrawArtSuiteVersion	kAIDrawArtSuiteVersion5


/*******************************************************************************
 **
 **	Types
 **
 **/

typedef struct AI100DrawArtData {
	short version;
	
	AIDrawArtFlags flags;
	AIDrawArtOutputType type;
	AIRealPoint origin;
	AIRealMatrix matrix;
	AIArtHandle art;
	AIRealRect destClipRect;
	AIBoolean eraseDestClipRect; // erase destClipRect before arts are drawn.
	AIArtHandle interruptedArt;

	AIReal greekThreshold;
	AIExtendedRGBColorRec selectionColor;
	
	union {
		AIDrawArtGWorld gWorld;
		AIDrawArtAGMPort port;
	} output;
} AI100DrawArtData;


typedef struct AI100DrawColorData {
	AIDrawArtOutputType type;

	AIDrawColorStyle style;
	AIDrawColorOptions options;
	AIColor color;
	AIRealRect rect;
	AIReal width;							// when style is frame
	
	union {
		AIDrawArtGWorld gWorld;
		AIDrawArtAGMPort port;
	} output;
} AI100DrawColorData;


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*DrawArt)( AI100DrawArtData *data );
	AIAPI AIErr (*DrawColorSwatch)( AI100DrawColorData *data );
	AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color );
	AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect );

} AI100DrawArtSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130DrawArt.h<|end_filename|>
#ifndef __AI130DrawArt__
#define __AI130DrawArt__

/*
 *        Name:	AI1300DrawArt.h
 *   $Revision: $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Draw Art Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef	__AI140DrawArt__
#include "AI140DrawArt.h"
#endif

#include "AIHeaderBegin.h"

/** @file AI30DrawArt.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI130DrawArtSuite				kAIDrawArtSuite
#define kAIDrawArtSuiteVersion7		AIAPI_VERSION(7)
#define kAI130DrawArtSuiteVersion		kAIDrawArtSuiteVersion7
#define kAI130DrawArtVersion		kAI130DrawArtSuiteVersion


/*******************************************************************************
 **
 **	Suite
 **
 **/
/* Illustrator 13.0 DrawArt suite */
typedef struct {

	AIAPI AIErr (*DrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options );

	AIAPI AIErr (*BeginDrawArt)( AI140DrawArtData * data, const AIColorConvertOptions& options, AIDrawArtFlags flags );

	AIAPI AIErr (*EndDrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options );

	AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data );

	AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color);

	AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect );

} AI130DrawArtSuite;


#include "AIHeaderEnd.h"


#endif	//__AI130DrawArt__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Art.h<|end_filename|>
#ifndef __AI90Art__
#define __AI90Art__

/*
 *        Name:	AI90Art.h
 *   $Revision: 25 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 9.0 Artwork Object Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIArt.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI90ArtSuite			kAIArtSuite
#define kAIArtSuiteVersion8		AIAPI_VERSION(8)
#define kAI90ArtSuiteVersion	kAIArtSuiteVersion8



/*******************************************************************************
 **
 **	Suite
 **
 **/


/* Illustrator 9.0 Art suite */
typedef struct _AI90ArtSuite {

	AIAPI AIErr (*NewArt) ( short type, short paintOrder, AIArtHandle prep, AIArtHandle *newArt );
	AIAPI AIErr (*DisposeArt) ( AIArtHandle art );
	AIAPI AIErr (*ReorderArt) ( AIArtHandle thisArt, short paintOrder, AIArtHandle prep );
	AIAPI AIErr (*DuplicateArt) ( AIArtHandle thisArt, short paintOrder, AIArtHandle prep, AIArtHandle *newArt );

	AIAPI AIErr (*GetFirstArtOfLayer) ( AILayerHandle layer, AIArtHandle *art );
	AIAPI AIErr (*GetLayerOfArt) ( AIArtHandle art, AILayerHandle *layer );
	AIAPI AIErr (*GetArtType) ( AIArtHandle art, short *type );
	AIAPI AIErr (*GetArtUserAttr) ( AIArtHandle art, long whichAttr, long *attr );
	AIAPI AIErr (*SetArtUserAttr) ( AIArtHandle art, long whichAttr, long attr );
	AIAPI AIErr (*GetArtParent) ( AIArtHandle art, AIArtHandle *parent );
	AIAPI AIErr (*GetArtFirstChild) ( AIArtHandle art, AIArtHandle *child );
	AIAPI AIErr (*GetArtSibling) ( AIArtHandle art, AIArtHandle *sibling );
	AIAPI AIErr (*GetArtPriorSibling) ( AIArtHandle art, AIArtHandle *sibling );

	AIAPI AIErr (*GetArtBounds) ( AIArtHandle art, AIRealRect *bounds );
	AIAPI AIErr (*SetArtBounds) ( AIArtHandle art );

	AIAPI AIErr (*GetArtCenterPointVisible) ( AIArtHandle art, AIBoolean *visible );
	AIAPI AIErr (*SetArtCenterPointVisible) ( AIArtHandle art, AIBoolean visible );

	/* New with Illustrator 7.0 */
	AIAPI AIErr (*GetArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, long flags, AIRealRect *bounds );
	AIAPI AIErr (*UpdateArtworkLink) ( AIArtHandle art, AIBoolean *updated );

	/* New in Illustrator 8.0 */
	AIAPI AIBoolean (*ValidArt) ( AIArtHandle art );
	AIAPI AIErr (*GetArtOrder) ( AIArtHandle art1, AIArtHandle art2, short *order );
	AIAPI AIErr (*SelectNamedArtOfLayer) ( AILayerHandle layer, char *name, AIBoolean matchWholeWord, AIBoolean caseSensitive );
	AIAPI AIErr (*GetArtRotatedBounds) ( AIArtHandle art, AIReal angle, long flags, AIRealRect *bounds );

	AIAPI AIBoolean (*ArtHasFill) ( AIArtHandle art );
	AIAPI AIBoolean (*ArtHasStroke) ( AIArtHandle art );
	AIAPI AIBoolean (*ArtsHaveEqualPaths) ( AIArtHandle art1, AIArtHandle art2 );
	AIAPI AIErr (*ArtCopyFillStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt );
	AIAPI AIErr (*ArtCopyStrokeStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt );

	/* New in Illustrator 9.0 */
	
		/* Any of these parameters may be NULL if not needed. */
	AIAPI AIErr (*GetInsertionPoint) ( AIArtHandle *art, short *paintorder, ASBoolean *editable );
	AIAPI AIErr (*SetInsertionPoint) ( AIArtHandle art );

	AIAPI AIErr (*GetKeyArt) ( AIArtHandle *art );	 
	AIAPI AIErr (*CancelKeyArt) (void);

	/* Returns the dictionary associated with the art object. The same dictionary
		is accessed by the AITag suite but that suite is only capable of
		setting and getting string values. Note that dictionaries are reference
		counted. You must call sAIDictionary->Release() when you're done with
		it. */
	AIAPI AIErr (*GetDictionary) ( AIArtHandle art, struct _AIDictionary** dictionary );
	AIAPI AIErr (*SetArtName) (AIArtHandle art, char const *name);

		/* If there is no user assigned name, a default descriptive name will be
		   returned. *isDefaultName will be set to reflect this. isDefaultName
		   may be null. */
	AIAPI AIErr (*GetArtName) (AIArtHandle art, char name[], int bufferSize, ASBoolean *isDefaultName);

		/* True if art is a group and it corresponds to a layer. */
	AIAPI AIErr (*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup);
	AIAPI AIErr (*ReleaseToLayers) (const AIArtHandle art, ASBoolean build);
	
	/* More efficient than doing one art at a time */
	AIAPI AIErr (*ModifyTargetedArtSet) (AIArtHandle *list, long count, long action);

	/* Return true if art is part of the styled art of another object */
	AIAPI AIBoolean (*IsArtStyledArt) (AIArtHandle art);

	/* Return true if 'art' adds to clipping. Should only be called on
	   descendents of a clipGroup or a maskObject. A return of TRUE indicates
	   'art' is either an appropriate art object with the isClip flag on or a
	   non-clip group with a clipping descendent that isn't bounded by another
	   clipGroup. */
	AIAPI AIBoolean (*IsArtClipping) (AIArtHandle art);

} AI90ArtSuite;

#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Group.h<|end_filename|>
#ifndef __AI100Group__
#define __AI100Group__

/*
 *        Name:	AIGroup.h
 *   $Revision: 6 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 10.0 Group Object Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/


#ifndef __AIGroup__
#include "AIGroup.h"
#endif


#include "AIHeaderBegin.h"



/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI100GroupSuite			"AI Group Suite"
#define kAIGroupSuiteVersion2		AIAPI_VERSION(2)
#define kAI100GroupSuiteVersion		kAIGroupSuiteVersion2


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*GetGroupClipped) ( AIArtHandle group, AIBoolean *clipped );
	AIAPI AIErr (*SetGroupClipped) ( AIArtHandle group, AIBoolean clipped );

	AIAPI AIErr (*GetGroupMaskLock) ( AIArtHandle group, AIBoolean *maskLocked );
	AIAPI AIErr (*SetGroupMaskLock) ( AIArtHandle group, AIBoolean maskLocked );

} AI100GroupSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140DrawArt.h<|end_filename|>
#ifndef __AI140DrawArt__
#define __AI140DrawArt__

/*
 *        Name:	AIDrawArt.h
 *   $Revision: $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Draw Art Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIArt__
#include "AIArt.h"
#endif

#ifndef __AIColor__
#include "AIColor.h"
#endif

#ifndef __AIColorConversion__
#include "AIColorConversion.h"
#endif

#ifndef __AIRaster__
#include "AIRaster.h"
#endif

#include "AIDrawArt.h"

#include "ADMAGMTypes.h"

#include "AIHeaderBegin.h"

/** @file AIDrawArt.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAIDrawArtSuite				"AI Draw Art Suite"
#define kAIDrawArtSuiteVersion8		AIAPI_VERSION(8)
#define kAI140DrawArtSuiteVersion	kAIDrawArtSuiteVersion8
#define kAI140DrawArtVersion		kAI140DrawArtSuiteVersion


/*******************************************************************************
 **
 **	Types
 **
 **/

/** Drawing data, defines an art object to be drawn, the object it is
	to be drawn into and parameters affecting how it is to be
	drawn. See \c #AIDrawArtSuite::DrawArt(), \c #AIDrawArtSuite::BeginDrawArt() */
typedef struct AI140DrawArtData {
	/** The version of \c #AIDrawArtSuite in use, a \c #kAIDrawArtVersion value. */
	short version;
	/** Flags that modify drawing behavior, a logical OR of
		\c #AIDrawArtFlagBitPos values. */
	AIDrawArtFlags flags;
	/** The type of port that is the destination for the draw operation. */
	AIDrawArtOutputType type;
	/** The point in the source artwork coordinates that is mapped to (0,0) in
	 	the destination port.*/
	AIRealPoint origin;
	/** The transformation matrix to be applied after placement
		at the origin. */
	AIRealMatrix matrix;
	/** The art object to be drawn. */
	AIArtHandle art;
	/** The destination clipping bounds. */
	AIRealRect destClipRect;
	/** When true, \c destClipRect is erased before the art is drawn. */
 	AIBoolean eraseDestClipRect;
	/** The art object that was being drawn when the operation was
		interrupted. See \c #kAIDrawArtPreviewInterrupt and \c #kAIDrawArtPreviewContinue. */
	AIArtHandle interruptedArt;
	 /** The greeking threshold. If the point size of text,
	 	after transformation to the coordinate system of the
		destination port, is smaller than this value, the text
		is greeked. Use -1 to indicate no greeking. */
	AIReal greekThreshold;
	/** Not used */
	AIExtendedRGBColorRec selectionColor;
	/** The port that is the destination for the draw operation.*/
	AIDrawArtOutputUnion output;
} AI140DrawArtData;


/*******************************************************************************
 **
 **	Suite
 **
 **/

/**	@ingroup Suites
	Legacy Version
	These functions draw Illustrator artwork to an \e output \e port
	(drawing surface). The port can be a screen window, or it can be
	an offscreen drawing surface used to rasterize artwork.

	The many drawing options are controlled by values in an \c #AIDrawArtData
	structure and related option structures \c #AIColorConvertOptions and
	\c #AIDrawArtFlags.

	When drawing to a port whose color space does  not match the
	document color space, bracket a sequence of calls
	to \c #DrawArt() with calls to.\c #BeginDrawArt() and \c #EndDrawArt().
	Examples are drawing a CMYK document to an RGB window,
	or an RGB document to a window with a different profile.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIDrawArtSuite and \c #kAIDrawArtSuiteVersion8.
 */
typedef struct {

	/** Draws artwork as specified
			@param data A pointer to the structure that specifies an art object
				to be drawn, the object it is to be drawn into, and
				parameters affecting how it is to be drawn.
			@param options An \c #AIColorConvertOptions object that sets
				the appropriate black preservation value--that is, whether
				a CMYK to RGB/Gray color transformation maps CMYK 0,0,0,1
				to the darkest black:
					\li By default, the operation uses the standard conversion,
						which never uses black preservation.
					\li For export, the operation uses the black-preservation setting
						that is currently configured in the print and export preferences.
					\li For preview, the operation uses the black-preservation setting
						that is currently configured in the screen-display preferences.
	*/
	AIAPI AIErr (*DrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options );

	/** Establishes a temporary drawing surface whose color space matches the
		document space. Must be paired with a call to \c #EndDrawArt() at the end
		of a sequence of calls \c #DrawArt().
			@param data A pointer to the structure that specifies an art object
				to be drawn, the object it is to be drawn into, and
				parameters affecting how it is to be drawn. Can be \c NULL.
			@param options An \c #AIColorConvertOptions object; see \c #DrawArt().
			@param flags A set of options that modify drawing behavior, a logical
				OR of \c #AIDrawArtFlagBitPos values.
				@note If you set the \c #kAIDrawArtOPP flag to draw to an OPP port,
					the "begin" call temporarily changes the target port in the \c data
					structure. The call to \c #EndDrawArt() restores the
					original port. In this case, the set of spot colors needed for the
					OPP port are determined from the art object specified in \c data, or
					from the entire document if no art object is specified.

		*/
	AIAPI AIErr (*BeginDrawArt)( AI140DrawArtData * data, const AIColorConvertOptions& options, AIDrawArtFlags flags );

	/** Copies the contents of the temporary drawing surface to the final destination.
			@param data A pointer to the drawing data structure that was passed to
				the corresponding call to \c #BeginDrawArt().
			@param options The \c #AIColorConvertOptions object that was passed to
				the corresponding call to \c #BeginDrawArt().
		*/
	AIAPI AIErr (*EndDrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options );

	/** Draws a color swatch. Color swatches are always assumed to be drawn for the
		purpose of screen display.
			@param data A pointer to the structure that specifies an art object
				to be drawn, the object it is to be drawn into, and
				parameters affecting how it is to be drawn.
		*/
	AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data );

	/** Draws the highlighting annotations for an art object. Call only in the response
		to an annotator's Draw Annotations message.
			@param art The art object.
			@param color The highlight color.
			@param lineWidth The stroke width.
	*/
	AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color, float lineWidth );

	/** Draws a thumbnail of an art object to the AGM port. Thumbnails are always assumed
		to be drawn for the purpose of screen display. No transformations are applied, and
		the image is drawn to fit into the destination rectangle.
			@param art The art object, of type \c #kRasterArt or \c #kPlacedArt.
			@param port A pointer to the AGM port.
			@param dstrect The destination rectangle, a bounding box for the thumbnail image.
		*/
	AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect );

} AI140DrawArtSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90MatchingArt.h<|end_filename|>
#ifndef __AI90MatchingArt__
#define __AI90MatchingArt__

/*
 *        Name:	AI90MatchingArt.h
 *   $Revision: 4 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 9.0 Matching Art Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIMatchingArt.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI90MatchingArtSuite		kAIMatchingArtSuite
#define kAIMatchingArtSuiteVersion3	AIAPI_VERSION(3)
#define kAI90MatchingArtVersion		kAIMatchingArtSuiteVersion3


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	/* Get the art matching the given criteria and on the current layer list. */
	AIAPI AIErr (*GetSelectedArt) ( AIArtHandle ***matches, long *numMatches );
	AIAPI AIErr (*GetMatchingArt) ( AIMatchingArtSpec *specs, short numSpecs,
			AIArtHandle ***matches, long *numMatches );
	
	//new to Illustrator 9.0
	/* Get the art matching the given criteria and on the given layer list. */
	AIAPI AIErr (*GetSelectedArtFromLayerList) ( AILayerList list, AIArtHandle ***matches,
			long *numMatches );
	AIAPI AIErr (*GetMatchingArtFromLayerList) ( AILayerList list, AIMatchingArtSpec *specs,
			short numSpecs, AIArtHandle ***matches, long *numMatches );

} AI90MatchingArtSuite;


#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ArtStyleParser.h<|end_filename|>
#ifndef __AI140ArtStyleParser__
#define __AI140ArtStyleParser__

/*
 *        Name:	AI140ArtStyleParser.h
 *     Purpose:	Adobe Illustrator Art Style Parser Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIArtStyleParser.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI140ArtStyleParserSuite			kAIArtStyleParserSuite
#define kAIArtStyleParserSuiteVersion5		AIAPI_VERSION(5)
#define kAI140ArtStyleParserSuiteVersion	kAIArtStyleParserSuiteVersion5


/*******************************************************************************
 **
 **	Suite
 **
 **/

/* Illustrator 14.0 Art Style Parser Suite */
typedef struct {
	AIAPI AIErr (*NewParser) ( AIStyleParser* parser );

	AIAPI AIErr (*DisposeParser) ( AIStyleParser parser );

	AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle );

	AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle );

	AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser );

	AIAPI ai::int32 (*CountPreEffects) ( AIStyleParser parser );

	AIAPI ai::int32 (*CountPostEffects) ( AIStyleParser parser );

	AIAPI ai::int32 (*CountPaintFields) ( AIStyleParser parser );

	AIAPI ai::int32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField );

	AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect );

	AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect );

	AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField* paintField );

	AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ai::int32 n,
		AIParserLiveEffect* effect );

	AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField );

	AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect );

	AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect );

	AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField paintField );

	AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 n,
												 AIParserLiveEffect effect );

	AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete );

	AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete );

	AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete );

	AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField,
											  AIParserLiveEffect effect, AIBoolean doDelete );

	AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser );

	AIAPI AIErr (*Simplify) ( AIStyleParser parser );

	AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField );

	AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField );

	AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField );

	AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField );

	AIAPI ai::int32 (*GetGroupContentsPosition) ( AIStyleParser parser );

	AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ai::int32 position );

	AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle );

	AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser );

	AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser );

	AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser );

	AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser );

	AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle );

	AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params );

	AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle );

	AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params );

	AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect );

	AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect );

	AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField );

	AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField );

	AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData );

	AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData );

	AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData );

	AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData );

	AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict );

	AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict );

	AIAPI ai::int32 (*GetColorPosn) ( AIParserPaintField paintField );

	AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ai::int32 colorPosn );

	AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField );

	AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle,
											AILiveEffectParameters* params );
	AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle,
											AILiveEffectParameters params );
	AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict );

	AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict );

	AIAPI AIErr (*GetEvenOdd) ( AIParserPaintField paintField, AIBoolean* evenodd );
	AIAPI AIErr (*SetEvenOdd) ( AIParserPaintField paintField, AIBoolean evenodd );
	AIAPI AIErr (*NewPaintFieldFill) ( const AIFillStyle* fill, AIBoolean evenOdd, const AIArtStylePaintData* paintData,
									   AIParserPaintField* paintField );
	AIAPI AIErr (*NewPaintFieldStroke) ( const AIStrokeStyle* stroke, const AIArtStylePaintData* paintData,
										 AIParserPaintField* paintField );

	AIAPI AIErr (*DisposePaintField) ( AIParserPaintField paintField );

	AIAPI AIErr (*NewParserLiveEffect) ( AILiveEffectHandle liveEffectHandle, AILiveEffectParameters params,
										 AIParserLiveEffect* effect );

	AIAPI AIErr (*DisposeParserLiveEffect) ( AIParserLiveEffect effect );

	AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* style );

	AIAPI AIErr (*EditPaintEffectParameters) ( AIArtStyleHandle artStyle, AIParserPaintField paintField );

	AIAPI AIBoolean (*IsNormalOpaquePaintBlend) ( AIParserPaintField paintField );

	AIAPI AIBoolean (*IsNormalOpaqueBlend) ( AIParserBlendField blendField );

	AIAPI AIBoolean (*IsDefaultPaintBlend) ( AIParserPaintField paintField );

	AIAPI AIErr (*SetDefaultPaintBlend) ( AIParserPaintField paintField );

	AIAPI AIBoolean (*IsDefaultBlend) ( AIParserBlendField blendField );

	AIAPI AIErr (*SetDefaultBlend) ( AIParserBlendField blendField, AIBoolean knockoutOff );

	AIAPI AIBoolean (*IsStyleSimple) ( AIStyleParser parser );

	AIAPI AIErr (*GetLiveEffectNameAndVersion) ( AIParserLiveEffect effect, const char** name, ai::int32* major, ai::int32* minor );

	AIAPI AIErr (*GetPaintLiveEffectNameAndVersion) ( AIParserPaintField paintField, const char** name, ai::int32* major, ai::int32* minor );

	AIAPI AIBoolean (*CompareStyles) ( AIStyleParser parserStyle1, AIStyleParser parserStyle2);

	AIAPI AIErr (*GetEffectVisible) ( AIParserLiveEffect effect, AIBoolean *visible);
		
	AIAPI AIErr (*SetEffectVisible) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect, AIBoolean visible );

	AIAPI AIErr (*GetPaintFieldVisible) ( AIParserPaintField paintField, AIBoolean *visible);
	
	AIAPI AIErr (*SetPaintFieldVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible );

	AIAPI AIErr (*GetBlendFieldVisible) ( AIParserBlendField blendField, AIBoolean *visible);
	
	AIAPI AIErr (*SetBlendFieldVisible) ( AIArtStyleHandle artStyle, AIParserBlendField blendField, AIBoolean visible );

	AIAPI AIErr (*GetPaintBlendVisible) ( AIParserPaintField paintField, AIBoolean *visible);
	
	AIAPI AIErr (*SetPaintBlendVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible );

	AIAPI AIErr (*IntersectStyleWithParser) ( AIStyleParser parser, AIArtStyleHandle artStyle );

	AIAPI AIErr (*FindEquivalentPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 startIndex, ai::int32* index );

	AIAPI AIErr (*GetFocusEffect) ( AIStyleParser parser, AIParserLiveEffect* effectField );

	AIAPI AIErr (*SetFocusEffect) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserLiveEffect effectField );

	AIAPI AIErr (*SetParserFocusEffect) ( AIStyleParser parser, AIParserLiveEffect effectField );

	AIAPI AIErr (*EditEffectParametersInSelection) ( AIParserLiveEffect effectField );

	AIAPI AIErr (*FindEquivalentEffect) ( AIStyleParser parser, AIParserPaintField paintField, AIParserLiveEffect effectField, AIBoolean preEffect, ai::int32 startIndex, ai::int32* index );

	AIAPI AIBoolean (*StyleContainsAttributes) ( AIArtStyleHandle artStyle, AIStyleParser attributes, AIBoolean includeTransparency );

} AI140ArtStyleParserSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Envelope.h<|end_filename|>
#ifndef __AI170Envelope__
#define __AI170Envelope__

/*
 *        Name:	AI170Envelope.h
 *   $Revision: 1 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Legacy Envelope Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIEnvelope.h"
#include "AIHeaderBegin.h"

/** @file AI170Envelope.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI170EnvelopeSuite						kAIEnvelopeSuite
#define kAIEnvelopeSuiteVersion3				AIAPI_VERSION(3)
#define kAI170EnvelopeSuiteVersion				kAIEnvelopeSuiteVersion3
#define kAI170EnvelopeVersion					kAI170EnvelopeSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/


/** @ingroup Suites
	This suite provides functions to create and manage \e envelopes, which allow you to apply
	a set of deformations to a set of source art objects. The name derives from the idea of
	putting paper artworks into an envelope, then bending or distorting the envelope.

	The source art can be warped or deformed in various ways, as defined by an \c #AIWarpStyle,
	with respect to a  \e mesh, or grid. The envelope actions are available in the UI
	through the Object > Envelope Distort menu.

	Deformations can only be applied directly to paths, compound paths, meshes, and images.
	To apply a distortion to other types of art objects in the source art, those objects must
	first be \e expanded; that is, converted to paths. Deformation options allow you
	to specify which types of art to expand and deform along with the paths and
	images.

	The envelope for an art group, which encapsulates the deformation options,
	is represented as an art object of type \c #kMeshArt. See also the \c #AIMeshSuite.

	The function \c #DeformArt() allows you to apply the same kinds of deformations
	directly to a source art group, without creating an envelope object.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIEnvelopeSuite and \c #kAIEnvelopeVersion.

*/
typedef struct {

	/** Creates an envelope for a given set of source art objects, or for the currently
		selected art if \c art is \c nil or \c numArt is 0. By default, the new envelope
		is fully selected, and placed above the enveloped art object or objects in the paint order.
			@param art An array of art objects to be enveloped, or \c nil to create an envelope
				for the current selection. Cannot be an art object stored in a dictionary,
				but can be the child of	art stored in a dictionary.
			@param numArt The number of objects in \c art, or 0 to create an
				envelope for the current selection.
			@param envelopeObject The path art object to use as the new envelope,
				or \c nil to use the bounding box of \c art (or of the current selection)
				to create a new envelope object. (This would be the topmost selected
				object if you create the envelope using Object > Envelope Distort > Make
				with Top Object.)
			@param options A pointer to the structure that specifies deformation options
				for the new envelope. Pass \c nil to use the default options, as specified
				by application preferences.
			@param envelope [out] A buffer in which to return the new envelope object.
	 */
	AIAPI AIErr (*MakeEnvelope) ( AIArtHandle* art, ai::int32 numArt, AIArtHandle envelopeObject,
								  AIEnvelopeOptions* options, AIArtHandle* envelope );

	/** Redefines an envelope to use a predefined warp style.
		The envelope must be in process of mesh-editing; that is,
		\c #EditingMesh() would return true for \c envelope.
		Upon return the envelope is fully selected.
			@param envelope The envelope object.
			@param warpStyle The new warp style.
			@param bend the new bend amount.
			@param horizDistort The horizontal distortion amount.
			@param vertDistort The vertical distortion amount.
			@param rotate90 When true, apply bend horizontally, when false, apply bend vertically.
	 */
	AIAPI AIErr (*WarpEnvelope) ( AIArtHandle envelope, AIWarpStyle warpStyle, AIReal bend,
								  AIReal horizDistort, AIReal vertDistort, AIBoolean rotate90 );

	/** Replaces an envelope in the document with its source contents (in the original,
		undistorted state) and a mesh object. Moves both objects into the art tree, with the mesh object
		placed above the content object in the paint order. The content object is selected.

		You cannot release envelopes stored directly in dictionaries,
		but you can release the children of envelopes stored in dictionaries.
			@param envelope The envelope object. Upon return, this reference is no longer valid.
		*/
	AIAPI AIErr (*ReleaseEnvelope) ( AIArtHandle envelope );

	/** Retrieves the distortion options for an envelope. (Note that this function does not
		return an error code.)
			@param envelope The envelope object.
			@param options [out] A buffer in which to return the options structure,
		*/
	AIAPI void (*GetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options );

	/** Sets the distortion options for an envelope. (Note that this function does not
		return an error code.)
			@param envelope The envelope object.
			@param options The new options structure,  */
	AIAPI void (*SetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options );

	/** Retrieves the default distortion options stored in application preferences.
			@param options [out] A buffer in which to return the default options structure,
			*/
	AIAPI void (*GetCurrentEnvelopeOptions) ( AIEnvelopeOptions* options );

	/** Reports whether an art object is an envelope.
		(Note that this function returns a boolean value, not an error code.)
			@param envelope The art object.
			@return True if the art object is an envelope.
		*/
	AIAPI AIBoolean (*IsEnvelope) ( AIArtHandle envelope );

	/** Reports whether the mesh defining the distortion of an envelope is being edited.
		(Note that this function returns a boolean value, not an error code.)
			@param envelope The envelope object.
			@return True if the mesh is being edited.
			@see \c #ToggleEditability(), \c #EditingContents()
	*/
	AIAPI AIBoolean (*EditingMesh) ( AIArtHandle envelope );

	/** Reports whether the contents of an envelope are being edited.
		(Note that this function returns a boolean value, not an error code.)
			@param envelope The envelope object.
			@return True if the contents of the envelope are being edited.
			@see \c #ToggleEditability(), \c #EditingMesh()
		*/
	AIAPI AIBoolean (*EditingContents) ( AIArtHandle envelope );

	/** Switches between editing the mesh and the contents of an envelope.
		This is the same as choosing Object > Envelope Distort > Edit Contents
		or Object > Envelope Distort > Edit Envelope in the UI.
			@param envelope The envelope object.
			@see \c #EditingMesh(), \c #EditingContents()
		*/
	AIAPI AIErr (*ToggleEditability) ( AIArtHandle envelope );

	/** Retrieves the envelope object for an art group.
			@param envelope The art group.
			@param envelopeObject [out] A buffer in which to return the envelope object.

		*/
	AIAPI AIErr (*GetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle* envelopeObject );

	/** Sets the envelope object for an art group.
			@param envelope The art group.
			@param envelopeObject The envelope object, which must be of type \c #kPathArt or
				\c #kMeshArt and must not be directly stored in a dictionary.
		*/
	AIAPI AIErr (*SetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle envelopeObject );

	/** Retrieves the art objects being deformed by an envelope.
			@param envelope The envelope object.
			@param objects [out] A buffer in which to return the art group. This can be
				the edit group of envelope's source art group if the contents are being
				edited (that is, if \c #EditingContents() would return true for \c envelope).
		*/
	AIAPI AIErr (*GetObjectsInEnvelope) ( AIArtHandle envelope, AIArtHandle* objects );

	/** Deforms an art object or group using the parameters in a dictionary. Does not
		make an envelope object, but deforms the art in the same way an envelope would.
		The resulting art object is inserted in the art tree above the original
		art object in the paint order.
			@param artToDeform The source art object or group, which must have a parent.
				The function does not modify this object in any way.
			@param deformParams A dictionary containing the deformation parameters.
				Contains entries for these keys: \c #kAIDeformMeshKey, \c #kAIDeformFidelityKey,
				\c #kAIDeformOptionsKey.
			@param srcRect The bounding box of the source space (that is, the size the envelope
				would be), or \c nil to use the bounds of the source art.
			@param deformedArt [out] A buffer in which to return the resulting art object.
			@param progressProc A callback procedure for displaying a progress bar during
				computation (from which the user can cancel the operation)
				or \c nil to show no progress bar.
			@return The error \c #kCanceledErr if user cancels the operation from the
				progress bar.
		 */
	AIAPI AIErr (*DeformArt) ( AIArtHandle 			artToDeform,
							   AIDictionaryRef 		deformParams,
							   AIRealRect* 			srcRect,
							   AIArtHandle*			deformedArt,
							   AIDeformProgressProc	progressProc );

	/** not implemented */
	AIAPI AIErr (*GenerateDeformMeshFromPath)( AIArtHandle pathArt,
											   AIArtHandle *meshArt );

 	/** Retrieves the type of an envelope (warp, mesh, or object).
 			@param envelope	The envelope object.
 			@param type	[out] A buffer in which to return the envelope type constant.
 			@note Added in AI13. Previously, the type was not stored with the object.
 				For envelope objects created in earlier versions, returns
 				\c #kEnvelopeWarp for Envelope Warp and \c #kEnvelopeMesh for all
 				other types.
 		*/
 	AIAPI AIErr (*GetEnvelopeType) ( AIArtHandle envelope, AIEnvelopeType* type );
	
} AI170EnvelopeSuite;

#include "AIHeaderEnd.h"

#endif

<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110RealBezier.h<|end_filename|>
#ifndef __AI110RealBezier__
#define __AI110RealBezier__

/*
 *        Name:	AIRealBezier.h
 *     Purpose:	Adobe Illustrator bezier suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIRealBezier.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI110RealBezierSuite			kAIRealBezierSuite
#define kAIRealBezierSuiteVersion1		AIAPI_VERSION(1)
#define kAI110RealBezierVersion			kAIRealBezierSuiteVersion1


/*******************************************************************************
 **
 **	Suite
 **
 **/

/** Utilities for working with cubic beziers */
typedef struct {

	/** Set a bezier from its four control points. */
	AIAPI void		(*Set)			(AIRealBezier* b, AIRealPoint* p0, AIRealPoint* p1,
									AIRealPoint* p2, AIRealPoint* p3);
	/** Translate the bezier by the vector. */
	AIAPI void		(*Offset)		(AIRealBezier* b, AIReal dh, AIReal dv);
	/** Apply the transformation matrix to the bezier. */
	AIAPI void		(*Transform)	(AIRealBezier* b, AIRealMatrix* m);
	/** Determine the point on the bezier corresponding to the parameter t. */
	AIAPI void		(*Evaluate)		(AIRealBezier* b, AIReal t, AIRealPoint* p);
	/** Determine the tangent to the bezier corresponding to the parameter t. */
	AIAPI void		(*Tangent)		(AIRealBezier* b, AIReal t, AIRealPoint* v);
	/** Determine the normal to the bezier corresponding to the parameter t. */
	AIAPI void		(*Normal)		(AIRealBezier* b, AIReal t, AIRealPoint* v);
	/** Split b at the parameter t returning the two halves as b1 and b2. */
	AIAPI void		(*Divide)		(AIRealBezier* b, AIReal t, AIRealBezier* b1,
									AIRealBezier* b2);
	/** Test whether the bezier intersects the supplied rectangle. */
	AIAPI AIBoolean	(*IntersectsRect)(AIRealBezier* b, AIRealRect* r, AIReal scale);

	// New for AI8.0.

	/** Calculate the length of the bezier. The flatness parameter controls the accuracy
		with which the curve is approximated. */
	AIAPI AIReal	(*Length)			(AIRealBezier* b, AIReal flatness);
	/** Equivalent to calling Evaluate() and Tangent() with half the work. */
	AIAPI void		(*PointAndTangent)	(AIRealBezier* b, AIReal t, AIRealPoint* p, AIRealPoint *v);

	/** Adjust the bezier such that it passes through the point p at the parameter value
		t. See #AIAdjustThroughPointResult for return values. */
	AIAPI unsigned short (*AdjustThroughPoint) (AIRealBezier* b, AIRealPoint* p, AIReal t);

} AI110RealBezierSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Mask.h<|end_filename|>
#ifndef __AI100Mask__
#define __AI100Mask__

/*
 *        Name:	AI100Mask.h
 *   $Revision: 2 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 10.0 Mask Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AIMask__
#include "AIMask.h"
#endif

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAI100BlendStyleSuite			"AI Blend Style Suite"
#define kAIBlendStyleSuiteVersion2		AIAPI_VERSION(2)
#define kAI100BlendStyleVersion			kAIBlendStyleSuiteVersion2


/*******************************************************************************
 **
 **	Suite
 **
 **/


/* The blend style suite allows manipulation of the compositing attributes
	of object styles. */
typedef struct {
	
	/* The following methods are a short hand for getting the object's style
		and then modifying the opacity applied by the style to the object as
		a whole. */
	AIAPI AIBlendingMode (*GetBlendingMode) (AIArtHandle art);
	AIAPI AIErr (*SetBlendingMode) (AIArtHandle art, AIBlendingMode mode);
	
	AIAPI AIReal (*GetOpacity) (AIArtHandle art);
	AIAPI AIErr (*SetOpacity) (AIArtHandle art, AIReal opacity);
	
	AIAPI AIBoolean (*GetIsolated) (AIArtHandle art);
	AIAPI AIErr (*SetIsolated) (AIArtHandle art, AIBoolean isolated);
	
	AIAPI AIKnockout (*GetKnockout) (AIArtHandle art);
	AIAPI AIKnockout (*GetInheritedKnockout) (AIArtHandle art); // always explicitly on or off.
	AIAPI AIErr (*SetKnockout) (AIArtHandle art, AIKnockout knockout);
	
	AIAPI AIBoolean (*GetAlphaIsShape) (AIArtHandle art);
	AIAPI AIErr (*SetAlphaIsShape) (AIArtHandle art, AIBoolean alphaIsShape);
	
	/* Copy the compositing attributes applied globally by the style applied
		to the source object to the destination object.*/
	AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination);

	/* Manipulate the attributes applied to the object via a dictionary. See
		the definitions above for the names of the appropriate keys. These
		methods are a short hand for first getting the object's style and
		then using the Get/SetStyleAttrs methods. */
	AIAPI AIErr (*GetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs);
	AIAPI AIErr (*SetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs);

	/* Manipulate the attributes applied by the style via a dictionary. See
		the definitions above for the names of the appropriate keys. */
	AIAPI AIErr (*GetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs);
	AIAPI AIErr (*SetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs,
								  AIArtStyleHandle* newStyle);

	/* Manipulate the attributes applied by a specific filter element of an
		active style via a dictionary. See the definitions above for the names
		of the appropriate keys. * /
	AIAPI AIErr (*GetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef style);
	AIAPI AIErr (*SetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef attrs);*/
	
	/* Get and set the transparency attributes for the current selection in the document */
	AIAPI AIErr (*GetCurrentTransparency) (AIDictionaryRef styleAttrs,
										   AIDictionaryRef fillAttrs,
										   AIDictionaryRef strokeAttrs);
	AIAPI AIErr (*SetCurrentTransparency) (AIDictionaryRef styleAttrs,
										   AIDictionaryRef fillAttrs,
										   AIDictionaryRef strokeAttrs);
	
	AIAPI AIErr (*GetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs);
	AIAPI AIErr (*GetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs);
	AIAPI AIErr (*SetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs,
											 AIArtStyleHandle* newStyle);
	AIAPI AIErr (*SetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs,
											   AIArtStyleHandle* newStyle );

	/* Return whether the object (or group, or layer) 
		contains any artwork with non-Normal blending
		that is not isolated at the level of the object. */
	AIAPI AIBoolean (*ContainsNonIsolatedBlending) (AIArtHandle object);
} AI100BlendStyleSuite;



#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Tool.h<|end_filename|>
/*
 *        Name:	AI90Tool.h
 *   $Revision: #5 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 9.0 Tool Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */
#ifndef __AI90Tool__
#define __AI90Tool__



/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AITool.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI90ToolSuite			kAIToolSuite
#define kAIToolSuiteVersion8	AIAPI_VERSION(8)
#define kAI90ToolSuiteVersion	kAIToolSuiteVersion8

/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*AddTool) ( SPPluginRef self, char *name,
				AIAddToolData *data, long options, 
				AIToolHandle *tool );
	
	AIAPI AIErr (*GetToolName) ( AIToolHandle tool, char **name );
	AIAPI AIErr (*GetToolOptions) ( AIToolHandle tool, long *options );
	AIAPI AIErr (*SetToolOptions) ( AIToolHandle tool, long options );
	AIAPI AIErr (*GetToolPlugin) ( AIToolHandle tool, SPPluginRef *plugin );

	AIAPI AIErr (*GetSelectedTool) ( AIToolHandle *tool );
	AIAPI AIErr (*SetSelectedTool) ( AIToolHandle tool );

	AIAPI AIErr (*CountTools) ( long *count );
	AIAPI AIErr (*GetNthTool) ( long n, AIToolHandle *tool );

	AIAPI AIErr (*GetToolHandleFromNumber) ( AIToolType toolNum,  AIToolHandle *tool );
	AIAPI AIErr (*GetToolNumberFromName) ( char *name, AIToolType *toolNum );
	AIAPI AIErr (*GetToolNumberFromHandle) ( AIToolHandle tool, AIToolType *toolNum );
	AIAPI AIErr (*GetToolNameFromNumber) (AIToolType toolNum, char **name);   // Caller must copy result immediately

	AIAPI AIErr (*GetToolTitle) ( AIToolHandle tool, char **title );
	AIAPI AIErr (*SetToolTitle) ( AIToolHandle tool, char *title );
	AIAPI AIErr (*GetToolIcon) ( AIToolHandle tool, ADMIconRef *icon );
	AIAPI AIErr (*SetToolIcon) ( AIToolHandle tool, ADMIconRef icon );
	AIAPI AIErr (*GetTooltip) ( AIToolHandle tool, char **tooltip );
	AIAPI AIErr (*SetTooltip) ( AIToolHandle tool, char *tooltip );
	AIAPI AIErr (*GetToolHelpID) ( AIToolHandle tool, ASHelpID *helpID );
	AIAPI AIErr (*SetToolHelpID) ( AIToolHandle tool, ASHelpID helpID );

	AIAPI AIErr (*SetToolInfoVars) ( AIToolHandle tool, const long * infoVars );
	AIAPI AIErr (*SetToolInfoVarValues) ( const long *infoVars,  void **values );
	
	AIAPI AIErr (*SystemHasPressure) ( ASBoolean *hasPressure );
	
} AI90ToolSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110UID.h<|end_filename|>
#ifndef __AI110UID__
#define __AI110UID__

/*
 *        Name:	AI110UID.h
 *		$Id $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 11.0 Unique ID Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2003-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIUID.h"

#include "AIHeaderBegin.h"

/** @file AI110UID.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI110UIDPoolSuite						kAIUIDPoolSuite
#define kAIUIDPoolSuiteVersion1					AIAPI_VERSION(2)
#define kAI110UIDPoolSuiteVersion				kAIUIDPoolSuiteVersion1
#define kAI110UIDPoolVersion					kAI110UIDPoolSuiteVersion

#define kAI110UIDSuite							kAIUIDSuite
#define kAIUIDSuiteVersion2						AIAPI_VERSION(3)
#define kAI110UIDSuiteVersion					kAIUIDSuiteVersion2
#define kAI110UIDVersion						kAI110UIDSuiteVersion

#define kAI110UIDREFSuite						kAIUIDREFSuite
#define kAIUIDREFSuiteVersion2					AIAPI_VERSION(3)
#define kAI110UIDREFSuiteVersion				kAIUIDREFSuiteVersion2
#define kAI110UIDREFVersion						kAI110UIDREFSuiteVersion

#define kAI110UIDUtilsSuite						kAIUIDUtilsSuite
#define kAIUIDUtilsSuiteVersion4				AIAPI_VERSION(4)
#define kAI110UIDUtilsSuiteVersion				kAIUIDUtilsSuiteVersion4
#define kAI110UIDUtilsVersion					kAI110UIDUtilsSuiteVersion


/*******************************************************************************
 **
 **	Suite
 **
 **/


/**
	The unique id suites provide facilities for creating, querying and
	managing unique ids and references to those ids.

	A unique id is an object that can be stored in a container such as
	a dictionary or an array. Given a unique id it is possible to find
	its container. One particularly useful place to store a unique id is
	in the dictionary of an art object. Given such an id it is possible
	to find the associated art object. In fact art object names are
	ultimately stored as specially encoded unique ids in their associated
	art object dictionaries.

	Unique ids have three important properties. 1) Each id is unique within
	a given pool of ids. 2) Each id has a name which is also unique within
	that pool. 3) Each id can be stored in at most one container. 
	
	AIUIDRef:

	Unique ids are subclasses of container entries. This allows
	them to be stored within dictionaries and arrays. The AIEntry suite
	provides methods to convert between AIEntryRef and AIUIDRef. A unique id
	may not be put into more than one container or more than once in a single
	container. Any attempt to do so will result in the error kUIDNotUnique.

	AIUIDREFRef:

	A reference to a unique id. Unique id references are subclasses of container
	entries. This allows them to be stored within dictionaries and arrays. The
	AIEntry suite provides methods to convert between AIEntryRef and AIUID.
 */

typedef struct AI110UIDPoolSuite {

	// reference count maintenance.
	AIAPI ASInt32 (*AddRef) ( void* pool );
	AIAPI ASInt32 (*Release) ( void* pool );

	/** Get a name pool by its name. At present there is a single pool for
	XML unique id names. This pool is returned regardless of the name
	supplied. */
	AIAPI AIErr (*GetPool) ( const char* name, AINamePoolRef* pool );

	/** Make a new unique id with the given name from the pool. If no name is
	specified then the pool will manufacture a name which is guaranteed
	not to be in use. If the name is specified then it must conform to the
	syntax imposed by the pool and must not be in use. UIDs are reference
	counted. */
	AIAPI AIErr (*NewUID) ( AINamePoolRef pool, const char* name, AIUIDRef* uid );

	/** Make a new reference to the unique id in the pool with the given name.
	If no name is specified then the pool will manufacture a name which is
	guaranteed not to be in use. If the name is specified then it must conform to
	the syntax imposed by the pool and must either not be in use of must be
	in use as a name for a UID or UIDREF. UIDREFs are reference counted. */
	AIAPI AIErr (*NewUIDREF) ( AINamePoolRef pool, const char* name, AIUIDREFRef* uidref );

	/** Make a new unique id based on the given name from the pool. A name that is
	guaranteed to be unique is automatically generated from the base name. If
	the base name is specified then it must conform to the syntax imposed by the
	pool. UIDs are reference counted. */
	AIAPI AIErr (*NewUIDFromBase) ( AINamePoolRef pool, const char* base, AIUIDRef* uid );

} AI110UIDPoolSuite;

/**
	APIs for working with unique ids.
*/
typedef struct AI110UIDSuite {

	// reference count maintenance.
	AIAPI ASInt32 (*AddRef) ( void* uid );
	AIAPI ASInt32 (*Release) ( void* uid );

	/** Returns true if the UID is currently stored within some container */
	AIAPI AIBoolean (*IsInUse) ( AIUIDRef uid );

	/** Returns the pool to which the uid's name belongs. The result is NULL if the
	uid is not valid. */
	AIAPI void (*GetPool) ( AIUIDRef uid, AINamePoolRef* pool );

	/** Returns the name of the uid. The result is NULL if the uid is not valid. */
	AIAPI const char* (*GetName) ( AIUIDRef uid );

	/** Get an entry for the container in which the uid is currently
	stored. A NULL reference is returned if the uid is not stored
	in a container. */
	AIAPI AIEntryRef (*GetContainer) ( AIUIDRef uid );

	/** Make a new reference to the unique id. UIDREFs are reference counted. */
	AIAPI AIErr (*NewUIDREF) ( AIUIDRef uid, AIUIDREFRef* ruidref );

} AI110UIDSuite;


/**
	APIs for working with references to unique ids.
*/
typedef struct AI110UIDREFSuite {

	// reference count maintenance.
	AIAPI ASInt32 (*AddRef) ( void* uidref );
	AIAPI ASInt32 (*Release) ( void* uidref );

	/** Returns true if the UIDREF is currently stored within some container */
	AIAPI AIBoolean (*IsInUse) ( AIUIDREFRef uidref );

	/** Returns the pool to which the UIDREF's name belongs. The result is NULL if the
	UIDREF is not valid. */
	AIAPI void (*GetPool) ( AIUIDREFRef uidref, AINamePoolRef* pool );

	/** Returns the name of the UIDREF. The result is NULL if the UIDREF is not valid. */
	AIAPI const char* (*GetName) ( AIUIDREFRef uidref );

	/** Get an entry for the container in which the UIDREF is currently
	stored. A NULL reference is returned if the UIDREF is not stored
	in a container. */
	AIAPI AIEntryRef (*GetContainer) ( AIUIDREFRef uidref );

	/** Get the unique id referred to. NULL if there is none. */
	AIAPI void (*GetUID) ( AIUIDREFRef uidref, AIUIDRef* uid );

} AI110UIDREFSuite;


/**
	convenience APIs for working with art object UIDs.
*/
typedef struct AI110UIDUtilsSuite {

	/** Get the unique id of the art object. If the object has no UID and create
		is TRUE then a machine generated UID will be assigned to the object. */
	AIAPI AIErr (*GetArtUID) ( AIArtHandle art, AIBoolean create, AIUIDRef* uid );
	/** Set the unique id of the art object replacing its current id if any. */
	AIAPI AIErr (*SetArtUID) ( AIArtHandle art, AIUIDRef uid );
	/** Transfer the id from the source to the destination object. The id
		of the source art is set to NULL. */
	AIAPI AIErr (*TransferArtUID) ( AIArtHandle srcart, AIArtHandle dstart );

	/** Get a new UIDREF for the art object. The object will be assigned a uid if
		it does not already have one. */
	AIAPI AIErr (*NewArtUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref );
	/** Get the art object referenced by the UIDREF. If the UIDREF is associated
		with a text story (sequence of linked text frames) then the first frame
		of the story is returned. */
	AIAPI AIErr (*GetReferencedArt) ( AIUIDREFRef uidref, AIArtHandle* art );

	/** Get the UID name of the art object. An empty string indicates no id
		is assigned. */
	AIAPI AIErr (*GetArtUIDName) ( AIArtHandle art, char* buffer, ASInt32 bufsize );
	/** Set the UID name of the art object. Returns an error if the id is
		already in use. */
	AIAPI AIErr (*SetArtUIDName) ( AIArtHandle art, const char* buffer );

	/** Get the name or XML ID of the art object depending on the setting of
		the user preference. isDefaultName may be nil, if not then it is set
		to true if the art object has no name or id and consequently the default
		name for the art was returned. */
	AIAPI AIErr (*GetArtNameOrUID) ( AIArtHandle art, char* buffer, ASInt32 bufsize, ASBoolean* isDefaultName );
	/** Set the name or XML ID of the art object depending on the setting of
		the user preference. Note that names are converted to valid XML IDs
		and then used to specify the XML ID of the object. */
	AIAPI AIErr (*SetArtNameOrUID) ( AIArtHandle art, const char* buffer );

	/** Manufacture a UID based on an existing UID */
	AIAPI AIErr (*MakeUIDFromBase) ( AIUIDRef base, AIUIDRef* uid );
	/** Manufacture a unique name from a base name */
	AIAPI AIErr (*MakeUniqueNameFromBase) ( const char* base, char* buffer, ASInt32 bufsize );

	/** Get the unique id of the story associated with the art object. The
		object must be of type AIArtType::kTextFrameArt. If the story has no
		UID and create is TRUE then a machine generated UID will be assigned
		to the story. */
	AIAPI AIErr (*GetStoryUID) (AIArtHandle art, AIBoolean create, AIUIDRef* ruid);
	/** Set the unique id of the story associated with the art object. The
		object must be of type AIArtType::kTextFrameArt. */
	AIAPI AIErr (*SetStoryUID) ( AIArtHandle art, AIUIDRef uid );
	/** Transfer the id from the story of the source object to the story of
		the destination object. The id of the source story is set to null. */
	AIAPI AIErr (*TransferStoryUID) ( AIArtHandle srcart, AIArtHandle dstart );
	/** Get a new UIDREF for the story associated with the art object. The
		art object must be of type AIArtType::kTextFrameArt. When the UID
		reference is passed to GetReferencedArt() it will return the first
		frame of the story no matter which frame was used to create the
		reference. */
	AIAPI AIErr (*NewStoryUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref );

	/** Transfer the unique id of the story associated with the text frame
		to the art object. Any type of art object may be supplied including
		a text frame. After the transfer the story will no longer have an id. */
	AIAPI AIErr (*TransferStoryUIDToArt) ( AIArtHandle frame, AIArtHandle art );
	/** Transfer the unique id of the art object to the story associated with
		the text frame. Any type of art object can be supplied including a
		text fame. After the transfer the story will no longer have an id. */
	AIAPI AIErr (*TransferArtUIDToStory) ( AIArtHandle art, AIArtHandle frame );

} AI110UIDUtilsSuite;

#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Symbol.h<|end_filename|>
#ifndef __AI140Symbol__
#define __AI140Symbol__

/*
 *        Name:	AI140Symbol.h
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Symbol Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1990-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AISymbol.h"

#include "AIHeaderBegin.h"

/** @file AI140Symbol.h */


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI140SymbolSuite				kAISymbolSuite
#define kAI140SymbolSuiteVersion4		AIAPI_VERSION(4)
#define kAI140SymbolSuiteVersion		kAI140SymbolSuiteVersion4
#define kAI140SymbolVersion				kAI140SymbolSuiteVersion


/*******************************************************************************
 **
 **	AI140SymbolSuite Suite
 **
 **/

typedef struct {

	/** Counts the number of symbol definitions in the global list for the current document.
		Use with \c #GetNthSymbolPattern() to iterate through listed or through listed and
		unlisted symbols.
			@param count [out] A buffer in which to return the number of symbols.
			@param includeUnlisted When true, include unlisted symbols in the count.
				When false, count only listed symbols. See @ref ListedUnlistedSymbols.
		*/
	AIAPI AIErr (*CountSymbolPatterns) ( ai::int32 *count, ASBoolean includeUnlisted );

	/** Retrieves a symbol pattern from the global list for the current document.Use
		with \c #CountSymbolPatterns() to iterate through listed or through listed and
		unlisted symbols.
			@param n The 0-based position index.
			@param symbolPattern [out] A buffer in which to return the symbol reference.
			@param includeUnlisted When true, get both listed and unlisted symbols.
				When false, get only listed symbols. See @ref ListedUnlistedSymbols.
		*/
	AIAPI AIErr (*GetNthSymbolPattern) ( ai::int32 n, AIPatternHandle *symbolPattern, ASBoolean includeUnlisted );

	/** Retrieves a symbol pattern by name from the current document.
			@param name The name string.
			@param symbolPattern [out] A buffer in which to return the symbol reference,
				or a \c NULL object if no such symbol is found.
		*/
	AIAPI AIErr (*GetSymbolPatternByName) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern );

	/** Retrieves a symbol pattern by name from a specified document.
			@param name The name string.
			@param symbolPattern [out] A buffer in which to return the symbol reference,
				or a \c NULL object if no such symbol is found.
			@param document The document. Use the \c #AIDocumentListSuite
				or \c #AIPathStyleSuite::ImportStyles()	to obtain a document handle.
		*/
	AIAPI AIErr (*GetSymbolByNameFromDocument) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern,
												   AIDocumentHandle document );

	/** Counts the number of symbol definitions in the global list of a specified document.
		Use with \c #GetNthSymbolPatternFromDocument() to iterate through listed (public) symbols.
			@param count [out] A buffer in which to return the number of symbols.
			@param document The document. Use the \c #AIDocumentListSuite
				or \c #AIPathStyleSuite::ImportStyles()	to obtain a document handle.
		*/
	AIAPI AIErr (*CountSymbolPatternsFromDocument) ( ai::int32* count, AIDocumentHandle document );

	/** Retrieves a symbol pattern from the global list for a specified document.
		Use with \c #CountSymbolPatternsFromDocument() to iterate through listed (public) symbols.
			@param n The 0-based position index.
			@param symbolPattern [out] A buffer in which to return the symbol reference.
			@param document The document. Use the \c #AIDocumentListSuite
				or \c #AIPathStyleSuite::ImportStyles()	to obtain a document handle.
		*/
	AIAPI AIErr (*GetNthSymbolPatternFromDocument) ( ai::int32 n, AIPatternHandle *symbolPattern,
													 AIDocumentHandle document );

	/** Creates a new symbol definition from specified source art, which is copied as
		the defining art for the new symbol.
			@param newSymbolPattern [out] A buffer in which to return the new symbol reference.
			@param definitionArt The source art, or \c NULL to create a symbol whose definition
				is an empty group.
 			@param unlisted When true, make the new symbol unlisted. Use \c #SetSymbolPatternName()
				to name unlisted symbols. See @ref ListedUnlistedSymbols.
 		*/
	AIAPI AIErr (*NewSymbolPattern) ( AIPatternHandle *newSymbolPattern, AIArtHandle definitionArt, ASBoolean unlisted );

	/** Creates a new listed symbol definition from selected art, which is copied as the
		defining art for the new symbol. If no art is selected, creates a symbol
		whose definition is an empty group.
			@param symbolPattern [out] A buffer in which to return the new symbol reference.
		*/
	AIAPI AIErr (*NewSymbolPatternFromSel) ( AIPatternHandle *symbolPattern );

	/** Creates a new listed symbol definition from selected art, which is copied as the
		defining art for the new symbol, and reports the bounds of the selected art.
		(You cannot call \c #AIArtSuite::GetArtBounds() for the symbol pattern art after
		defining it, because the definition art is copied and moved.) Use to insert an
		instance of the new symbol in place of the selection.
			@param symbolPattern [out] A buffer in which to return the new symbol reference.
			@param selectionBounds [out] A buffer in which to return the bounding box
				of the selected art.
		*/
	AIAPI AIErr (*NewSymbolPatternFromSelGetBounds) ( AIPatternHandle *symbolPattern, AIRealRect *selectionBounds );

	/** Deletes a symbol definition.
			@param symbolPattern The symbol reference.
        
            @return The error \c #kCantDeleteSymbolUsedInLiveEffectsErr if the symbol pattern is used in a Live Effect.
                    The error \c #kBadParameterErr if NULL is passed.
		*/
	AIAPI AIErr (*DeleteSymbolPattern) ( AIPatternHandle symbolPattern );

	/** Reports whether a symbol is still known to the system. A symbol reference can
		change if you retain it between message. To ensure a valid reference, get
		the reference from the \c #kAIArtSymbolSetChangedNotifier.
		(Note that this function returns a boolean value, not an error code.)
			@param symbolPatter The symbol reference.
			@return True if the symbol is a valid reference.
		 */
	AIAPI AIBoolean (*ValidateSymbolPattern) ( AIPatternHandle symbolPattern );


	// Functions for examining and modifying a symbol definition

	/** Retrieves a copy of the definition art of a symbol. YOu can examine or
		duplicate the returned art, but cannot edit it.
			@param pattern The symbol pattern reference.
			@param art [out] A buffer in which to return the definition art.
		*/
	AIAPI AIErr (*GetSymbolPatternArt) ( AIPatternHandle pattern, AIArtHandle *art );

	/** Creates a copy of a symbol pattern's definition artwork and places it
		into the current document at the center of the current view, at the current
		layer and using the current insertion mode. It is the equivalent of using
		a simple Paste command.
			@param symbolPattern The symbol pattern reference.
			@return The error \c #kUntouchableLayerErr if the current layer or
				current insertion group is locked or hidden.
			@see \c #AIPatternSuite::GetPattern()
			@note To get an editable copy of a symbol, it is better to use
				\c #AIDictionarySuite::NewArtEntry() to create a group that
				is not in the artwork tree, insert the definition copy into that
				using \c #CopySymbolPatternArt(), and then delete the dictionary entry.
				This avoids modifying the art tree and triggering unneeded synchronization
				and change notifications. This technique is often used by export filters
				to make systematic adjustments to Illustrator art before converting
				it to an easy-to-export form.
		*/
	AIAPI AIErr (*PasteSymbolPatternArt) ( AIPatternHandle symbolPattern );

	/** Creates a copy of a symbol pattern's definition artwork and places it
		into the current document at a specified place in the paint order.
			@param symbolPattern The symbol pattern reference.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param newArt [out] Optional. A buffer in which to return the new art object.
		*/
	AIAPI AIErr (*CopySymbolPatternArt) ( AIPatternHandle symbolPattern,
								short paintOrder, AIArtHandle prep, AIArtHandle *newArt );

	/** Creates a copy of source art and makes it the defining art for a symbol. Updates
		any existing instances of the symbol.
			@param symbolPattern The symbol pattern reference.
			@param definitionArt The source art.
		*/
	AIAPI AIErr (*SetSymbolPatternArt) ( AIPatternHandle symbolPattern, AIArtHandle definitionArt );

	/** Copies selected art and makes it the defining art for a symbol. Updates
		any existing instances of the symbol.
			@param symbolPattern The symbol pattern reference.
			@see \c #AIPatternSuite::SetPattern()
		*/
	AIAPI AIErr (*SetSymbolPatternFromSel) ( AIPatternHandle symbolPattern );


	// The functions below use C strings. If you have or want Pascal strings, you can
	// also get and set the name of a symbol using GetPatternName and SetPatternName
	// from AIPattern.h.

	/** Retrieves the name of a symbol.
			@param symbolPattern The symbol pattern reference.
			@param name [out] A buffer in which to return the name string. Truncates
				a name that is too long to fit in the buffer.
			@return \c #kNameTooLongErr error if the name was truncated.
		*/
	AIAPI AIErr (*GetSymbolPatternName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name );

	/** Sets the name of a symbol.
			@param name The new name string.
			@return \c #kNameTooLongErr error if the name length exceeds \c #kMaxSymbolNameLength.
		 		<br> \c #kInvalidNameErr error if the name contains illegal characters,
		 		is of zero length, or consists entirely of spaces.
				<br> \c #kNameInUseErr if the name is already used for another symbol.
		 		<br> In any error case, the symbol name remains unchanged.
			@see \c #SetSymbolPatternBaseName()
		 	 */
	AIAPI AIErr (*SetSymbolPatternName) ( AIPatternHandle symbolPattern, const ai::UnicodeString& name );

	/** Strips any hidden characters from the end of a symbol name to create
		a displayable string.
			@param name [in, out] The symbol name string, which is modified in place.
		*/
	AIAPI AIErr (*GetSymbolPatternDisplayName) ( ai::UnicodeString& name );

	/** Sets the name of a symbol, appending numbers to a name string that is
		already in use to make it unique. If the name string is very long,
		it can be truncated before the numbers are appended.
			@param symbolPattern The symbol pattern reference.
			@param name The new name string.
		*/
	AIAPI AIErr (*SetSymbolPatternBaseName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name );

	/** Creates a new symbol instance in the center of the current document view.
			@param symbolPattern The symbol pattern reference.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param newArt [out] A buffer in which to return the new instance,
				an art object of type \c #kSymbolArt.
			@return \c #kBadParameterErr error if there are no symbols defined
				in the current document.
		*/
	AIAPI AIErr (*NewInstanceCenteredInView) ( AIPatternHandle symbolPattern,
								short paintOrder, AIArtHandle prep, AIArtHandle *newArt );

	/** Creates a new symbol instance with its center at a specified location.
			@param symbolPattern The symbol pattern reference.
			@param center The location, in page coordinates.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param newArt [out] A buffer in which to return the new instance,
				an art object of type \c #kSymbolArt.
			@return \c #kBadParameterErr error if there are no symbols defined
				in the current document.
		*/
	AIAPI AIErr (*NewInstanceAtLocation) ( AIPatternHandle symbolPattern, AIRealPoint center,
								short paintOrder, AIArtHandle prep, AIArtHandle *newArt );

	/** Creates a new symbol instance with a specified transformation matrix.
			@param symbolPattern The symbol pattern reference.
			@param transform The transformation matrix.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param newArt [out] A buffer in which to return the new instance,
				an art object of type \c #kSymbolArt.
			@return \c #kBadParameterErr error if there are no symbols defined
				in the current document.
		*/
	AIAPI AIErr (*NewInstanceWithTransform) ( AIPatternHandle symbolPattern, AIRealMatrix *transform,
								short paintOrder, AIArtHandle prep, AIArtHandle *newArt );

	/** Retrieves the symbol pattern definition of a symbol instance.
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
			@param symbolPattern [out] A buffer in which to return the symbol pattern reference.
		*/
	AIAPI AIErr (*GetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle *symbolPattern );

	/** Sets the symbol pattern definition of a symbol instance.
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
			@param symbolPattern The symbol pattern reference.
		*/
	AIAPI AIErr (*SetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle symbolPattern );

	/** Retrieves the transformation matrix that Illustrator uses to transform specified symbol art
		into a symbol instance.
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
			@param transform [out] A buffer in which to return the transformation matrix.
 			@see \c #AIHardSoftSuite for a discussion of coordinate systems.
			@note	Use \c #AIHardSoftSuite::AIRealMatrixRealSoft() and
					\c #AIHardSoftSuite::AIRealMatrixRealHard() to translate between
					the hard and soft forms of the matrix (\e not
					\c #AIHardSoftSuite::AIRealMatrixHarden() and
					\c #AIHardSoftSuite::AIRealMatrixSoften(), which affect
					only the tx ty components).
			*/
	AIAPI AIErr (*GetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );

	/** Sets the application transformation matrix for a symbol instance.
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
			@param transform The new transformation matrix.
 			@see \c #GetHardTransformOfSymbolArt()
 		*/
	AIAPI AIErr (*SetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );

	/** Retrieves the transformation matrix that a plug-in can use to transform to transform
		specified symbol art into a symbol instance (using the \c #AITransformArtSuite).
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
			@param transform [out] A buffer in which to return the transformation matrix.
 			@see \c #AIHardSoftSuite for a discussion of coordinate systems.
		*/
	AIAPI AIErr (*GetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );

	/** Sets the plug-in transformation matrix for a symbol instance.
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
			@param transform The new transformation matrix.
 			@see \c #GetSoftTransformOfSymbolArt()
 		*/
	AIAPI AIErr (*SetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );

	/**	Expands a symbol instance and places the resulting art into the artwork tree.
		The function preserves the appearance, not the editability, of the symbol
		definition.
			\li If the instance transformation matrix is a simple placement matrix,
				this is equivalent to \c #BreakLinkToSymbol().
			\li If the matrix includes a scale, rotation, shear, or reflection,
				the function expands any appearances or plug-in groups inside
				the symbol definition, then applies the matrix.
			\li If the matrix includes a shear or a non-uniform scale, the function
				expands strokes before applying the matrix.
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
				This object is not deleted.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param expandedArt [out] Optional. A buffer in which to return the new art object.
		*/
	AIAPI AIErr (*InsertExpandedSymbolArt) ( AIArtHandle symbolArt,
												short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt );

	/** Reports whether a symbol definition is listed. See @ref ListedUnlistedSymbols.
		(Note that this function returns a boolean value, not an error code.)
			@param symbolPattern The symbol pattern reference.
			@return True if the symbol pattern is listed.
		*/
	AIAPI AIBoolean (*IsSymbolPatternListed) ( AIPatternHandle symbolPattern );

	/** Makes a symbol definition listed. See @ref ListedUnlistedSymbols.
			@param symbolPattern The symbol pattern reference.
		*/
	AIAPI AIErr (*MakeSymbolPatternListed) ( AIPatternHandle symbolPattern );

	/** Makes a symbol definition unlisted. See @ref ListedUnlistedSymbols.
			@param symbolPattern The symbol pattern reference.
		*/
	AIAPI AIErr (*UnlistSymbolPattern) ( AIPatternHandle symbolPattern );

   	/**	Sorts the listed symbols in the global list of symbols, alphabetically by name.
 		See @ref ListedUnlistedSymbols.
 		*/
  	AIAPI AIErr (*SortListedSymbolPatterns) ( void );

	/** Moves a listed symbol to a specific index position in the global list of symbols.
		Increments the position of the symbol previously at that index, and of all
		subsequent listed symbols. See @ref ListedUnlistedSymbols.
			@param symbolPattern The symbol pattern reference.
			@param index The new 0-based index position, or -1 to move to the
				end of the list.
		*/
	AIAPI AIErr (*MoveSymbolPatternInList) ( AIPatternHandle symbolPattern, int index );

	/** Reports whether an art object uses a specified symbol in a specified way.
		(Note that this function returns a boolean value, not an error code.)
			@param art The art object, or \c NULL to search the entire artwork tree.
				In this case, the search includes descendants regardless of the
				value of the \c #kSearchDescendants flag.
			@param searchScope The scope of the search, a logical OR of \c #AISymbolSearchScope
				bit flags.
			@param targetSymbol	The symbol reference, or \c NULL to search for any symbol.
			@param oneFoundSymbol [out] Optional. When \c targetSymbol is \c NULL, a buffer
				in which to return a single matching symbol found within the search scope,
				or \c NULL if more than one matching symbol is found.

			@note \c oneFoundSymbol is used by the Symbols palette to decide which symbol to select.
   				If an object uses multiple symbols, nothing is selected. The scope for this
   				type of usage should not include \c #kSearchNestedSymbolPatterns. For example, if
   				symbol A's definition includes symbol B, and the user selects an instance of
   				symbol A, symbol A should be selected in the palette. If the user selects
   				a particle set containing instances of both symbol A and symbol B,
   				neither symbol should be selected in the palette.

			@param allFoundSymbols [out] Optional. When \c targetSymbol is \c NULL,  a buffer
				 in which to return the handle of an array of matching symbols, of size \c foundCount.
				 This memory is allocated by the function, and you must free it using
				 \c #AIMdMemorySuite::MdMemoryDisposeHandle().

				 If no art object is specified, you can still specify the output array. This is how
  				the "Select All Unused" command in the Symbols palette is implemented.

				 If an art object is specified, use this array to examine patterns
				 that are referenced by a plug-in group that puts multiple symbols in its dictionary,
				 such as a particle set.
			@param foundCount [out] When \c targetSymbol is \c NULL, a buffer in which to
				return the size of the \c allFoundSymbols array.
			@param globalObjectUsage Not implemented.
			@return True if	any matching symbols are found.
		*/
	AIAPI AIBoolean (*ArtUsesSymbolPattern) ( AIArtHandle art, short searchScope, AIPatternHandle targetSymbol,
											AIPatternHandle *oneFoundSymbol,
											AIPatternHandle ***allFoundSymbols, int *foundCount,
											int *globalObjectUsage);

	/**	Creates a copy of a symbol's definition artwork, transforms it
		using the matrix of a symbol instance, and places it into the
		current document at a specified place in the paint order. Transfers
		attributes from the symbol instance to the transformed art.

		Does not do any internal expansion of strokes, active styles or plug-in groups
		inside the symbol definition, even when a rotational or shear transform is applied.
		Preserves the full structure and editability of the	symbol definition,
		at the cost of sometimes not preserving the appearance of the instance.

		This is the equivalent of calling \c #CopySymbolPatternArt() and then performing
		the transformation using the \c #AITransformArtSuite, but is more efficient.
		If the instance matrix is a simple placement matrix, this is equivalent to
		\c #InsertExpandedSymbolArt().

			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
				This object is not deleted.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param expandedArt [out] Optional. A buffer in which to return the new art object.
		*/
	AIAPI AIErr (*BreakLinkToSymbol) ( AIArtHandle symbolArt,
												short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt );

	/**	Retargets a symbol pattern, fill pattern, or brush pattern for the current document.
		Creates a new pattern if needed, with the same definition art and a unique name based on
		the source pattern's name. All other global objects (colors, patterns, brushes, styles,
		 and so on) used indirectly in the definition are similarly retargeted, using
		an existing object if one matches and creating a new one otherwise.

		In this context, a listed symbol never matches an unlisted one, even if it has
		the same name and definition.

       	Use for drag-and-drop between library palettes and the main document palette.
		 	@param srcPattern A symbol pattern, fill pattern, or brush pattern reference.
			@param dstPattern [out] A buffer in which to return the new pattern, or
				an existing pattern in the current document with the same name and definition,
				or the source pattern if it was already in the current document.

			@note Fill patterns are usually retargeted indirectly using the
				\c #AIPathStyleSuite, and brush patterns using the \c #AIObjectSetSuite.
			 @see \c #AIPatternSuite, \c #AIObjectSetSuite::RetargetForCurrentDocument(),
				\c #AIPathStyleSuite::RetargetForCurrentDoc()
			*/
	AIAPI AIErr (*RetargetForCurrentDocument) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern );

	// New for Illustrator 11:

	/** Creates a copy of a symbol pattern's definition artwork, converts it to outline
		using specified options, and places the result into the current document
		at a specified place in the paint order.
			@param symbolPattern The symbol pattern reference.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param newArt [out] Optional. A buffer in which to return the new art object, or
				a \c NULL object if no outline can be generated.
			@param convertToOutlineOptions Option flags for conversion, a logical OR of these values:
					<br> \c #kOutlineExpandAppearance
					<br> \c #kOutlineEliminateUnpainted
					<br> \c #kOutlineAddStrokes
					<br> \c #kOutlineSubtractStrokes
					<br> \c #kOutlineAlwaysIncludeFillArea
					<br> \c #kOutlineAlwaysStrokeStraightLines
		*/
	AIAPI AIErr (*CopySymbolPatternOutline) ( AIPatternHandle symbolPattern,
		short paintOrder, AIArtHandle prep, AIArtHandle *newArt, ai::int32 convertToOutlineOptions );

	/** Expands a symbol definition, outlines the symbol definition, applies the instance
		transformation to the outlined definition art. and finally places the transformed
		outline art into the artwork tree.
			@param symbolArt The symbol instance, an art object of type \c #kSymbolArt.
				This object is not deleted.
			@param paintOrder The paint order position, relative to the \c prep object,
				an \c #AITypes::AIPaintOrder value.
			@param prep The prepositional art object for the paint order.
			@param expandedArt [out] Optional. A buffer in which to return result art.
			@param convertToOutlineOptions Option flags for conversion, a logical OR of these values:
					<br> \c #kOutlineExpandAppearance
					<br> \c #kOutlineEliminateUnpainted
					<br> \c #kOutlineAddStrokes
					<br> \c #kOutlineSubtractStrokes
					<br> \c #kOutlineAlwaysIncludeFillArea
					<br> \c #kOutlineAlwaysStrokeStraightLines
			@see \c #InsertExpandedSymbolArt()
		*/
	AIAPI AIErr (*InsertSymbolArtOutline) ( AIArtHandle symbolArt,
		short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt, ai::int32 convertToOutlineOptions );

	/** Retrieves a cached outline for a symbol pattern, if one has been generated for a given
		set of conversion options. You can examine or duplicate the returned outline art, but cannot edit it.
			@param symbolPattern The symbol pattern reference.
			@param outlineArt [out] A buffer in which to return	the cached outline art, or \c NULL
				if no cached outline has been generated for the given options.
			@param convertToOutlineOptions Option flags for conversion, a logical OR of these values:
					<br> \c #kOutlineExpandAppearance
					<br> \c #kOutlineEliminateUnpainted
					<br> \c #kOutlineAddStrokes
					<br> \c #kOutlineSubtractStrokes
					<br> \c #kOutlineAlwaysIncludeFillArea
					<br> \c #kOutlineAlwaysStrokeStraightLines
		*/
	AIAPI AIErr (*PeekCachedPatternOutline) ( AIPatternHandle symbolPattern, AIArtHandle *outlineArt, ai::int32 convertToOutlineOptions );

	// New for Illustrator 13:

	/** Sets a symbol definition from selected art, and reports the bounds of the selected art.
			@param symbolPattern The symbol pattern reference.
			@param selectionBounds [out] Optional. A buffer in which to return the bounding box
				of the selected art.
			@see \c #NewSymbolPatternFromSelGetBounds.
		*/
	AIAPI AIErr (*SetSymbolPatternFromSelGetBounds) ( AIPatternHandle symbolPattern, AIRealRect *selectionBounds );


	/** Sets the symbol export type for a symbol pattern, to use when exporting the
	    symbol to Flash.
			@param symbolPattern The symbol pattern reference.
			@param exportType	 The Flash export type.
		*/
	AIAPI AIErr (*SetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType exportType);

	/** Retrieves the symbol export type for a symbol pattern, used when exporting the symbol
	    to Flash. 
			@param symbolPattern The symbol pattern reference.
			@param exportType [out]	 The Flash export type.
		*/
	AIAPI AIErr (*GetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType *exportType);

	
	/** Sets the symbol registration point for a symbol pattern. to use when exporting the
	symbol to Flash.
	@param symbolPattern		The symbol pattern reference.
	@param registrationPoint	The Flash registration point.
	*/
	AIAPI AIErr (*SetSymbolRegistrationPoint) ( AIPatternHandle symbolPattern, AISymbolRegistrationPoint registrationPoint);

	/** Retrieves the symbol registration point for a symbol pattern, used when exporting the symbol
	to Flash. 
	@param symbolPattern			The symbol pattern reference.
	@param registrationPoint [out]	The Flash registration type.
	*/
	AIAPI AIErr (*GetSymbolRegistrationPoint) ( AIPatternHandle symbolPattern, AISymbolRegistrationPoint *registrationPoint);
	
	/** Sets the symbol "Enable guides for 9-slice scaling" option for a symbol pattern,
		to use when exporting the symbol to Flash.
	@param symbolPattern		The symbol pattern reference.
			@param enableGuides	 True to turn 9-slice scaling on, false to turn it off.
	*/
	AIAPI AIErr (*SetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean enableGuides);

	/** Retrieves the symbol "Enable guides for 9-slice scaling" option for a symbol pattern,
		used when exporting the symbol to Flash.
	@param symbolPattern			The symbol pattern reference.
			@param enableGuides [out]	A buffer in which to return true if
				9-slice scaling is on, false if it is off.
	*/
	AIAPI AIErr (*GetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean *enableGuides);

	/** Sets the symbol scaling grid for 9-slice scaling for a symbol pattern,
		to be used when exporting the symbol to Flash.
	@param symbolPattern		The symbol pattern reference.
			@param slice9Grid		The rectangular area of the center slice.
	*/
	AIAPI AIErr (*SetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect slice9Grid);

	/** Retrieves the symbol scaling grid for 9-slice scaling for a symbol pattern,
		used when exporting the symbol to Flash.
	@param symbolPattern			The symbol pattern reference.
			@param slice9Grid [out]		A buffer in which to return the rectangular area of the center slice.
	*/
	AIAPI AIErr (*GetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect *slice9Grid);

	// Symbol editing workflow (new in AI13/CS3)

	/** Starts an editing session for a symbol pattern.

    	Invokes isolation mode on a copy of the prototype of the pattern, and places the
		copy on the artboard. If a symbol art is specified, the copy is placed in the same 
		location as the symbol instance, hiding the original. Otherwise, the copy is placed in the 
		center of the artboard.

		You can start nested editing sessions for nested symbols.

		Editing changes are signaled with \c #AILayerList::kAIIsolationModeChangedNotifier
		and \c #AILayerList::kAIBeforeIsolationModeChangedNotifier. Use \c #ValidateSymbolEditingArt()
		to validate the art being edited.

		@post Use \c #EndEditingSymbolDefinition() to end the editing session, optionally updating
		the symbol pattern's prototype with the changes in the copy before returning it to
       	the artboard.

		@post Use \c #ExitSymbolEditMode() to force all symbol editing sessions to end without
		saving any changes.

			@param symbolPattern The symbol pattern reference.
			@param symbolArt Optional. A symbol art object whose definition needs to be edited.
		*/
	AIAPI AIErr (*SetEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIArtHandle symbolArt);

	/** Ends an editing session for a symbol pattern, allowing you to apply or discard the changes
		made during the session. The corresponding symbol instance that was hidden when
	    setting the symbol in edit mode is made visible.
			@param symbolPattern The symbol pattern reference.
			@param updateSymbol True to apply the edits to the pattern, false to discard the editing
				changes and restore the original symbol pattern.
			@pre \c #SetEditingSymbolDefinition()
		*/
	AIAPI AIErr (*EndEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIBoolean updateSymbol);

	/** Reports whether symbol edit mode is active.
		(Note that this function returns a boolean value, not an error code.)
			@return True if at least one symbol pattern is being edited, false otherwise.
		*/
	AIAPI AIBoolean (*GetSymbolEditMode) ();

	/** Ends all current symbol editing sessions, restoring the original symbol pattern
		prototypes to the artboard and discarding all changes made while editing.

		To save any changes, and to restore the per-symbol editing state information,
		use \c #EndEditingSymbolDefinition() for each symbol being edited.
			@pre \c #SetEditingSymbolDefinition()
		*/
	AIAPI AIErr (*ExitSymbolEditMode) ( );

	/** Reports whether a symbol pattern is currently being edited.
		(Note that this function returns a boolean value, not an error code.)
			@param symbolPattern The symbol pattern reference.
			@return True if at the symbol pattern is being edited, false otherwise.
		*/
	AIAPI AIBoolean (*EditingSymbolPattern) (AIPatternHandle symbolPattern);

	/** Reports whether an art object represents the prototype of a symbol pattern that is
		currently being edited, and if true, optionally returns the pattern being edited.
			@param art			 The art object reference.
			@param symbolPattern [out] Optional. A buffer in which to return the symbol pattern.
			@return True if the art object does represent the prototype of a symbol pattern that is
				currently being edited, false otherwise.
		*/
	AIAPI AIBoolean (*IsSymbolEditingArtType) ( AIArtHandle art, AIPatternHandle *symbolPattern);

	/** Validates the editing art object that represents the prototype of a
		symbol pattern that is being edited.
		The editing art could become invalid due to operations such as duplicate or delete.
		If the symbol pattern's editing art is not a valid art object, looks under the parent
		for an art object whose state represents the editing art of the given symbol pattern,
		and sets it as the valid editing art. If there is no valid art object under the parent,
		creates an empty group and sets it as the valid editing art.

		Use this in response to the \c #AILayerList::kAIBeforeIsolationModeChangedNotifier,
		with the information received by calling \c #AIIsolationModeSuite::GetIsolatedArtAndParents().
			@param symbolPattern The symbol pattern reference.
			@param editingArtParent	Parent object that contains the editing art. 
		*/
	AIAPI AIErr (*ValidateSymbolEditingArt) ( AIPatternHandle symbolPattern, AIArtHandle editingArtParent);


} AI140SymbolSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Plugin.h<|end_filename|>
#ifndef __AI60Plugin__
#define __AI60Plugin__

/*
 *        Name:	AIPlugin.h
 *   $Revision: 4 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 6.0 Plug-in Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AI60Basic__
#include "AI60Basic.h"
#endif

#ifndef __SPPlugins__
#include "SPPlugs.h"
#endif


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI60PluginSuite				"AI Plugin Suite"
#define kAI60PluginSuiteVersion			AIAPI_VERSION(2)
#define kAI60PluginVersion				kAI60PluginSuiteVersion
#if Macintosh
#define kAI60MacPluginSuite				"AI Mac Plugin Suite"
#define kAI60MacPluginSuiteVersion		AIAPI_VERSION(2)
#define kAI60MacPluginVersion			kAI60MacPluginSuiteVersion
#endif


// These are a plug-in's messages:
#define kSelectorAI60StartupPlugin	"AI Startup Plug-in"
#define kSelectorAI60UnloadPlugin		"AI Unload Plug-in"
#define kSelectorAI60ReloadPlugin		"AI Reload Plug-in"
#define kSelectorAI60ShutdownPlugin	"AI Shutdown Plug-in"
#define kSelectorAI60AboutPlugin		"AI About Plug-in"


// These are the options available to a plug-in.
#define kPluginWantsResultsAutoSelectedOption	(1L<<1)


// These are a plug-in's possible states.
#define kPluginIsBuiltinState					(1L<<0)
#define kPluginIsResidentState					(1L<<1)
#define kPluginIsBrokenState					(1L<<2)
#define kPluginIsStartedState					(1L<<3)

#define kCantGetPluginCodePropertyErr		'PLCP'
#define kCantGetPluginCodeErr				'PLCO'
#define kPluginIsBrokenErr					'PLBR'
#define kPluginInternalErr					'PLIN'
#define kCantGetPiPLErr						'PLPI'
#define kCorruptPiPLErr						'PLP?'


/*******************************************************************************
 **
 ** Types
 **
 **/

// This is a reference to a plug-in. It is never dereferenced.
//typedef struct _t_AIPluginOpaque *AIPluginHandle;
typedef  SPPluginRef AIPluginHandle;

// The contents of a plug-in message.
typedef struct {
	AIPluginHandle self;
	void *globals;
	AIBasicSuite *basic;
} AIPluginData;

typedef struct {
	AIPluginData d;
} AIPluginMessage;


/*******************************************************************************
 **
 ** Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*GetPluginOptions) ( AIPluginHandle plugin, long *options );
	AIAPI AIErr (*SetPluginOptions) ( AIPluginHandle plugin, long options );
	
	AIAPI AIErr (*GetPluginInterfaceVersion) ( AIPluginHandle plugin, long *interfaceVersion );
	AIAPI AIErr (*GetPluginGlobals) ( AIPluginHandle plugin, void **globals );
	AIAPI AIErr (*SetPluginGlobals) ( AIPluginHandle plugin, void *globals );
	AIAPI AIErr (*GetPluginState) ( AIPluginHandle plugin, long *state );
	
	AIAPI AIErr (*CountPlugins) ( long *count );
	AIAPI AIErr (*GetNthPlugin) ( long n, AIPluginHandle *plugin );
	AIAPI AIErr (*GetRunningPlugin) ( AIPluginHandle *plugin );
	
	AIAPI AIErr (*SetupPluginData) ( AIPluginHandle plugin, AIPluginData *data );
	AIAPI AIErr (*CallPlugin) ( AIPluginHandle plugin, const char *selector, void *message );
	AIAPI AIErr (*EmptyPluginData) ( AIPluginHandle plugin, AIPluginData *data );

} AI60PluginSuite;


#if Macintosh

typedef char AIISAType;

typedef struct {

	AIAPI AIErr (*MacXGetPluginFSSpec) ( AIPluginHandle plugin, SPPlatformFileSpecification *file );
	AIAPI AIErr (*MacXGetPluginArchitecture) ( AIPluginHandle plugin, AIISAType *architecture );

} AIMacPluginSuite;
#endif


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180CSXSExtension.h<|end_filename|>
#ifndef _AI180CSXSExtension_H_
#define _AI180CSXSExtension_H_
/*
*		 Name:	_AICSXSExtension_H_
*        Date:	Started 2011
*     Purpose:	Adobe Illustrator CSXS Extension Header.
*
* ADOBE SYSTEMS INCORPORATED
* Copyright 2009 Adobe Systems Incorporated.
* All rights reserved.
*
* NOTICE:  Adobe permits you to use, modify, and distribute this file
* in accordance with the terms of the Adobe license agreement
* accompanying it. If you have received this file from a source other
* than Adobe, then your use, modification, or distribution of it
* requires the prior written permission of Adobe.
*
*/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#include "AIHeaderBegin.h"

/** @file AICSXSExtension.h */

/*******************************************************************************
**
** Constants
**
**/

#define kAI180CSXSExtensionSuite			"AI CSXS Extension Suite"
#define kAI180CSXSExtensionSuiteVersion	AIAPI_VERSION(2)
#define kAI180CSXSExtensionVersion		kAICSXSExtensionSuiteVersion

#define kAI180CSXSExtensionUnloadNotifier	"Extension Unloaded Notifier"

/**
	Constants for reporting the status of Creative Suite extensions.
	See \c #AICSXSExtensionSuite::GetExtensionState().
*/
enum AI180CSXSExtensionState
{
	/** Extension is not registered in Illustrator. */
	kAI180CSXSExtensionNotRegisteredState,
	/** Extension is registered in Illustrator and ready to load. */
	kAI180CSXSExtensionRegisteredState,
	/** Extension is loaded. */
	kAI180CSXSExtensionLoadedState,
	/** Extension is unloaded. */
	kAI180CSXSExtensionUnLoadedState,
	/** Internal use  */
	kAI180CSXSExtensionMaximumState      = 0xffff

};

typedef struct AI180CSXSExtensionNotifierMsg
{
	AI180CSXSExtensionState state;
	const char*			 extensionId;
}AI180CSXSExtensionNotifierMsg;

/*******************************************************************************
**
**	Suite
**
**/

/** @ingroup Suites
	This suite provides access to information about the status of Creative Suite
	extensions that might be loaded into Illustrator.

	Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAICSXSExtensionSuite and \c #kAICSXSExtensionVersion.
*/
typedef struct {

	/** Retrieves the current registration and load state of an extension.
	@param extensionId [in] The unique identifier of the extension.
	@param state [out] A buffer in which to return the current state, an \c #AICSXSExtensionState constant value.
	*/
	AIAPI AIErr (*GetExtensionState) (const char* extensionId, ai::int32& state);

	/** Reports whether an extension's main window is currently visible in the UI.
	@param extensionId [in] The unique identifier of the extension.
	@param isVisible [out] True if the extension's main window appears in the UI, false otherwise.
	*/
	AIAPI AIErr (*IsPrimaryStageVisible) (const char* extensionId, AIBoolean& isVisible);

	/** Launches extension of specified extension ID 
	@param extensionId [in] The unique identifier of the extension.
	*/
	AIAPI AIErr (*LaunchExtension) (const char* extensionId);

} AI180CSXSExtensionSuite;

#include "AIHeaderEnd.h"

#endif //_AICSXSExtension_H_


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Geometry.h<|end_filename|>
#ifndef __AI192Geometry__
#define __AI192Geometry__

/*
 *        Name:	AI192Geometry.h
 *     Purpose:	Adobe Illustrator 19.2 Geometry Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIGeometry.h"


#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI192GeometrySuite			kAIGeometrySuite
#define kAIGeometryVersion5			AIAPI_VERSION(5)
#define kAI192GeometrySuiteVersion	kAIGeometryVersion5



/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	ASAPI AIErr(*GeometryIterate) (AIArtHandle art,
		AIGeometryOrganizationProcs *organizationProcs,
		AIGeometryConstructionProcs *constructionProcs,
		AIGeometryPaintingProcs *paintingProcs,
		AIGeometryStateProcs *stateProcs,
		AIGeometryUserData userData);

} AI192GeometrySuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI70Color.h<|end_filename|>
#ifndef __AI70Color__
#define __AI70Color__

/*
 *        Name:	AI70Color.h
 *   $Revision: 1 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 7.0 Color Types.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AIColor__
#include "AIColor.h"
#endif

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIFixedMath__
#include "AIFixedMath.h"
#endif


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Types
 **
 **/

typedef struct {
	AIFixed gray;
} AI70GrayColorStyle;

typedef struct {
	AIFixed cyan, magenta, yellow, black;
} AI70FourColorStyle;

typedef struct {
	AIFixed red, green, blue;
} AI70ThreeColorStyle;


typedef union {
	AI70FourColorStyle	f;
	AI70ThreeColorStyle	rgb;
} AI70CustomColorUnion;

typedef struct {
	AICustomColorTag	kind;
	AI70CustomColorUnion	c;
	unsigned char		name[32];
} AI70CustomColor;

typedef struct {
	AICustomColorHandle color;
	AIFixed tint;
} AI70CustomColorStyle;


typedef struct {
	AIPatternHandle pattern;	 	/* reference to the AIPattern */
	AIFixed shiftDist;	/* distance to translate the [unscaled] prototype before filling */
	AIFixed shiftAngle;	/* angle to translate the [unscaled] prototype before filling */
	AIFixedPoint scale;	/* fraction to scale the prototype before filling */
	AIFixed rotate;		/* angle to rotate the prototype before filling */
	AIBoolean reflect;	/* whether or not the prototype is reflected before filling */
	AIFixed reflectAngle;	/* axis around which to reflect */
	AIFixed shearAngle;	/* angle to slant the shear by */
	AIFixed shearAxis;	/* axis to shear with respect to */
	AIFixedMatrix transform; /* additional transformation arising from manipulating the path */
} AI70PatternStyle;

typedef struct {
	AIGradientHandle gradient; 			/* reference to the AIGradient */
	AIFixedPoint gradientOrigin;			/* gradient vector origin */
	AIFixed gradientAngle;				/* gradient vector angle */
	AIFixed gradientLength;				/* gradient vector length */
	AIFixedMatrix matrix;					/* transformation applied by xform tools */
	AIFixed hiliteAngle;					/* gradient hilite vector angle */
	AIFixed hiliteLength;					/* length of hiliteVector measured as a fraction
										of the length of the gradient vector (gradientLength) */
} AI70GradientStyle;

typedef union { 
	AI70GrayColorStyle g;
	AI70FourColorStyle f;
	AI70ThreeColorStyle rgb;
	AI70CustomColorStyle c;
	AI70PatternStyle p;
	AI70GradientStyle b;
} AI70ColorUnion;

typedef struct {
	AIColorTag kind;			/* Used to determine the color variant */
	AI70ColorUnion c;
} AI70Color;


typedef struct {
	AIFixed midPoint; 				/* midpoint skew value in percent */
	AIFixed rampPoint;				/* location of color in the blend in percent */
	AI70Color color;
} AI70GradientStop;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreferenceKeys.h<|end_filename|>
#ifndef __AIPreferenceKeys__
#define __AIPreferenceKeys__

/*
 *        Name:	AIPreferenceKeys.h
 *     Purpose:	To define shared preference keys, defaults, and other
 *              relevant information.
 *       Notes: When sharing preferences between plugins and the main app,
 *              either a) use a null prefix, or b) access the preferences from
 *              the main app via the AIPreference suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2001-2014 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/** Preference prefix: Use low-resolution proxy for linked EPS files  */
#define kUseLowResProxyPrefix nullptr
/** Preference suffix: Use low-resolution proxy for linked EPS files  */
#define kUseLowResProxySuffix ((const char *)"useLowResProxy")
/** Preference default: Use low-resolution proxy for linked EPS files  */
const bool kUseLowResProxyDefault= false;


/** Preference prefix: Display Bitmaps as Anti-Aliased images in Pixel Preview  */
#define kDisplayBitmapsAsAntiAliasedPixelPreviewPrefix nullptr
/** Preference suffix: Display Bitmaps as Anti-Aliased images in Pixel Preview  */
#define kDisplayBitmapsAsAntiAliasedPixelPreviewSuffix ((const char *)"DisplayBitmapsAsAntiAliasedPixelPreview")
/** Preference default: Display Bitmaps as Anti-Aliased images in Pixel Preview  */
const bool kDisplayBitmapsAsAntiAliasedPixelPreviewDefault= false;



/** Preference prefix: EPS rasterization resolution for linked EPS/DCS files */
#define kEPSResolutionPrefix nullptr
/** Preference suffix: EPS rasterization resolution for linked EPS/DCS files */
#define kEPSResolutionSuffix	((const char *)"EPSResolution")
/** Preference default: EPS rasterization resolution for linked EPS/DCS files */
const ai::int32 kEPSResolutionDefault = 300;

/** Preference prefix: Update linked file options */
#define kFileClipboardPrefix ((const char *)"FileClipboard")
/** Preference suffix: Update linked file options */
#define kLinkOptionsSuffix ((const char *)"linkoptions")
/** Preference options: Update linked file options */
enum UpdateLinkOptions {AUTO, MANUAL, ASKWHENMODIFIED};
/** Preference default: Update linked file options */
const UpdateLinkOptions kLinkOptionsDefault= ASKWHENMODIFIED;

/** Preference prefix: Enable OPI feature for linked EPS files */
#define kEnableOPIPrefix nullptr
/** Preference suffix: Enable OPI feature for linked EPS files */
#define kEnableOPISuffix	((const char *)"enableOPI")
/** Preference default: Enable OPI feature for linked EPS files */
const bool kEnableOPIDefault = false;

/** Preference suffix: Clipboard, copy SVG code*/
#define kcopySVGCodeSuffix		"copySVGCode"
/** Preference suffix: Clipboard, copy SVG code*/
#define kcopySVGCBFormatSuffix		"copySVGCBFormat"
/** Preference suffix: Clipboard, copy as PDF*/
#define kcopyAsPDFSuffix		"copyAsPDF"
/** Preference suffix: Clipboard, copy as Illustrator clipboard */
#define kcopyAsAICBSuffix		"copyAsAICB"
/** Preference suffix: Clipboard, append extension */
#define kappendExtensionSuffix	"appendExtension"
/** Preference suffix: Clipboard, lowercase */
#define klowerCaseSuffix		"lowerCase"
/** Preference suffix: Clipboard, flatten */
#define kflattenSuffix			"flatten"
/** Preference suffix: Clipboard options */
#define kAICBOptionSuffix	    "AICBOption"



/** Preferences: Illustrator clipboard option values */
enum  AICBOptions {PRESERVE_PATH, PRESERVE_APPEARANCE_OVERPRINT};
/** Preference default:Clipboard options */
const AICBOptions kAICBOptionsDefault= PRESERVE_APPEARANCE_OVERPRINT;

/** @ingroup PreferenceKeys
	Version Cue preference */
#define kUseVersionCue			"useVersionCue"

/** @ingroup PreferenceKeys
	Whether screen display uses a black preserving color transformation
	for converting CMYK to RGB or gray. The black preserving transform maps CMYK
	0,0,0,1 to the darkest black available. Not colorimetrically accurate
	but sometimes preferable for viewing CMYK black line art and text. The
	default value is given by \c #kAIPrefDefaultOnscreenBlackPres. */
#define kAIPrefKeyOnscreenBlackPres			((const char*) "blackPreservation/Onscreen")
/** @ingroup PreferenceKeys
	Default value for \c #kAIPrefKeyOnscreenBlackPres. */
#define kAIPrefDefaultOnscreenBlackPres		true

/** @ingroup PreferenceKeys
	Whether printing and export uses a black preserving color transformation
	for converting CMYK to RGB or gray. The black preserving transform maps CMYK
	0,0,0,1 to the darkest black available. Not colorimetrically accurate
	but sometimes preferable for viewing CMYK black line art and text. The
	default value is given by \c #kAIPrefDefaultExportBlackPres. */
#define kAIPrefKeyExportBlackPres			((const char*) "blackPreservation/Export")
/** @ingroup PreferenceKeys
	Default value for \c #kAIPrefKeyExportBlackPres. */
#define kAIPrefDefaultExportBlackPres		true

/** @ingroup PreferenceKeys
	Sets the guide style (solid or dashed).
	The default value is given by \c #kAIPrefDefaultGuideStyle.  */
#define kAIPrefKeyGuideStyle ((const char*)"Guide/Style")
/** @ingroup PreferenceKeys
	The \c #kAIPrefKeyGuideStyle value for solid guides. */
#define kAIPrefGuideStyleSolid 0
/** @ingroup PreferenceKeys
	The \c #kAIPrefKeyGuideStyle value for dashed guides. */
#define kAIPrefGuideStyleDashed 1
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyGuideStyle. */
#define kAIPrefDefaultGuideStyle kAIPrefGuideStyleSolid

/** @ingroup PreferenceKeys
	Sets the red component of the Guide color.
	The default value is given by \c #kAIPrefDefaultGuideColorRed.  */
#define kAIPrefKeyGuideColorRed ((const char*)"Guide/Color/red")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyGuideColorRed. */
#define kAIPrefDefaultGuideColorRed		(0x4A3D/65535.0f)

/** @ingroup PreferenceKeys
	Sets the green component of the Guide color.
	The default value is given by \c #kAIPrefDefaultGuideColorGreen.  */
#define kAIPrefKeyGuideColorGreen ((const char*)"Guide/Color/green")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyGuideColorGreen. */
#define kAIPrefDefaultGuideColorGreen		(1.0f)

/** @ingroup PreferenceKeys
	Sets the blue component of the Guide color.
	The default value is given by \c #kAIPrefDefaultGuideColorBlue.  */
#define kAIPrefKeyGuideColorBlue ((const char*)"Guide/Color/blue")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyGuideColorBlue. */
#define kAIPrefDefaultGuideColorBlue		(1.0f)

/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in)
	Sets the red component of the SmartGuide color.
	The default value is given by \c #kAIPrefDefaultSmartGuideColorRed.  */
#define kAIPrefKeySmartGuideColorRed ((const char*)"snapomatic/Color/red_19_2")
/** @ingroup PreferenceKeys for Smart Guides
	The default value for \c #kAIPrefKeySmartGuideColorRed. */
#define kAIPrefDefaultSmartGuideColorRed		(1.0f)

/** @ingroup PreferenceKeys for Smart Guides
	Sets the green component of the SmartGuide color.
	The default value is given by \c #kAIPrefDefaultGuideColorGreen.  */
#define kAIPrefKeySmartGuideColorGreen ((const char*)"snapomatic/Color/green_19_2")
/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in)
	The default value for \c #kAIPrefKeySmartGuideColorGreen. */
#define kAIPrefDefaultSmartGuideColorGreen		(0x4A3D/65535.0f)

/** @ingroup PreferenceKeys for Smart Guides
	Sets the blue component of the SmartGuide color.
	The default value is given by \c #kAIPrefDefaultSmartGuideColorBlue.  */
#define kAIPrefKeySmartGuideColorBlue ((const char*)"snapomatic/Color/blue_19_2")
/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in)
	The default value for \c #kAIPrefKeySmartGuideColorBlue. */
#define kAIPrefDefaultSmartGuideColorBlue		(1.0f)

/** @ingroup PreferenceKeys
	Whether to show the slice numbers or not.
	The default value is given by \c #kAIPrefDefaultShowSliceNumbers.  */
#define kAIPrefKeyShowSliceNumbers ((const char*)"plugin/AdobeSlicingPlugin/showSliceNumbers")
/** @ingroup PreferenceKeys
	Default value for \c #kAIPrefKeyShowSliceNumbers. */
#define kAIPrefDefaultShowSliceNumbers			true

/** @ingroup PreferenceKeys for Slicing feedback
	Sets the red component of the Slicing feedback color.
	The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorRed.  */
#define kAIPrefKeySlicingFeedbackColorRed ((const char*)"plugin/AdobeSlicingPlugin/feedback/red")
/** @ingroup PreferenceKeys for Slicing feedback
	The default value for \c #kAIPrefKeySlicingFeedbackColorRed. */
#define kAIPrefDefaultSlicingFeedbackColorRed	(0xFFFF)

/** @ingroup PreferenceKeys for Slicing feedback
	Sets the green component of the Slicing feedback color.
	The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorGreen.  */
#define kAIPrefKeySlicingFeedbackColorGreen ((const char*)"plugin/AdobeSlicingPlugin/feedback/green")
/** @ingroup PreferenceKeys for Slicing feedback
	The default value for \c #kAIPrefKeySlicingFeedbackColorGreen. */
#define kAIPrefDefaultSlicingFeedbackColorGreen	(0x4A3D)

/** @ingroup PreferenceKeys for Slicing feedback
	Sets the blue component of the Slicing feedback color.
	The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorBlue.  */
#define kAIPrefKeySlicingFeedbackColorBlue ((const char*)"plugin/AdobeSlicingPlugin/feedback/blue")
/** @ingroup PreferenceKeys for Slicing feedback
	The default value for \c #kAIPrefKeySlicingFeedbackColorBlue. */
#define kAIPrefDefaultSlicingFeedbackColorBlue	(0x4A3D)

/** @ingroup PreferenceKeys
	Sets the greeking threshold for text drawing. Text rendered at a point size less than 
	or equal to the greeking threshold is rendered greeked.
	The default value is given by \c #kAIPrefDefaultTextGreekingThreshold.  */
#define kAIPrefKeyTextGreekingThreshold ((const char*)"text/greekingThreshold")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyTextGreekingThreshold. */
#define kAIPrefDefaultTextGreekingThreshold		(6.0f)

/** @ingroup PreferenceKeys
	Sets the legacy gradient-mesh object conversion options when opening a legacy
	document (from an Illustrator version before CS 3). */
#define kAIPrefKeyLegacyGradientMeshConversionOptions ((const char*) "open/legacyGradientMeshConversion")
/** @ingroup PreferenceKeys
	Key values for \c #kAIPrefKeyLegacyGradientMeshConversionOptions. */
enum  LegacyGradientMeshConversionOptions {MESH_UNKNOWN, MESH_PRESERVE_SPOT, MESH_PRESERVE_APPEARANCE};

/** @ingroup PreferenceKeys
	Sets the tolerance preference for selection. Integer, a number of pixels. */
#define kAIPrefKeySelectionTolerance ((const char*) "selectionTolerance")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeySelectionTolerance. */
#define  kAIPrefDefaultSelectionTolerance (3)

/** @ingroup PreferenceKeys
	Sets the tolerance preference for selection in touch workspace. Integer, a number of pixels. */
#define kAIPrefKeyTWSSelectionTolerance ((const char*) "tws/SelectionTolerance")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyTWSSelectionTolerance. */
#define  kAIPrefDefaultTWSSelectionTolerance (10)

/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefDefaultCornerAngleLimit. */
#define  kAIPrefDefaultCornerAngleLimit (177.0)

/** @ingroup PreferenceKeys
Determines whether strokes and effects will be scaled or not. */
#define kAIPrefKeyScaleStrokesAndEffects			((const char*)"scaleLineWeight")
/** @ingroup PreferenceKeys
	Determines whether or not anchor points will be highlighted on mouseover. */
#define kAIPrefKeyHighlightAnchorOnMouseover		((const char*)"highlightAnchorOnMouseOver")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyHighlightAnchorOnMouseover. */
const bool kAIPrefKeyHighlightAnchorOnMouseoverDefault = true;

/** @ingroup PreferenceKeys
	Whether to show the legacy artboard conversion options when opening a legacy
	document (from an Illustrator version before CS 4). */
#define kShowArtboardConversionDialogKey 			((const char*) "LegacyArtboardOptions/ShowDialog")
/** @ingroup PreferenceKeys
	Sets the legacy artboard conversion options " Legacy Artboard" when opening a legacy
	document (from an Illustrator version before CS 4). */
#define kAIArtboardConversionDialogArtboardKey 		((const char*) "LegacyArtboardOptions/artboard")
/** @ingroup PreferenceKeys
	Sets the legacy artboard conversion options " Crop Area" when opening a legacy
	document (from an Illustrator version before CS 4). */
#define kAIArtboardConversionDialogCropAreaKey 		((const char*) "LegacyArtboardOptions/cropAreas")
/** @ingroup PreferenceKeys
	Sets the legacy artboard conversion options " Print tiles" when opening a legacy
	document (from an Illustrator version before CS 4). */
#define kAIArtboardConversionDialogTilesKey 			((const char*) "LegacyArtboardOptions/pageTiles")
/** @ingroup PreferenceKeys
	Sets the legacy artboard conversion options "Artwork Bounds" when opening a legacy
	document (from an Illustrator version before CS 4). */
#define kAIArtboardConversionDialogArtworkBoundsKey 	((const char*) "LegacyArtboardOptions/artworkBounds")

/** @ingroup PreferenceKeys
	Turns the Pixel Grid On/Off
	The default value is given by \c #kAIPrefDefaultShowPixelGrid.  */
#define kAIPrefKeyShowPixelGrid ((const char*)"Guide/ShowPixelGrid")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyGuideColorRed. */
#define kAIPrefDefaultShowPixelGrid		TRUE

/** @ingroup PreferenceKeys
	Determines whether or not link info will be shown in links panel */
#define kAIPrefKeyShowLinkInfo		((const char*)"showLinkInfo")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefKeyShowLinkInfo. */
const bool kAIPrefKeyShowLinkInfoDefault = false;

/** @ingroup PreferenceKeys
	creative cloud pref - preferences and workspaces.
	The default value is given by \c #kAIPrefDefaultCreativeCloudPreferences.  */
#define kAIPrefCreativeCloudPreferences ((const char*)"CreativeCloud/preferences")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudPreferences. */
#define kAIPrefDefaultCreativeCloudPreferences		TRUE

/** @ingroup PreferenceKeys
	creative cloud pref - Swatches
	The default value is given by \c #kAIPrefDefaultCreativeCloudSwatches.  */
#define kAIPrefCreativeCloudSwatches ((const char*)"CreativeCloud/Swatches")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudSwatches. */
#define kAIPrefDefaultCreativeCloudSwatches		TRUE


/** @ingroup PreferenceKeys
	creative cloud pref - Presets
	The default value is given by \c #kAIPrefDefaultCreativeCloudPresets.  */
#define kAIPrefCreativeCloudPresets ((const char*)"CreativeCloud/Presets")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudPresets. */
#define kAIPrefDefaultCreativeCloudPresets		TRUE

/** @ingroup PreferenceKeys
	creative cloud pref - Symbols
	The default value is given by \c #kAIPrefDefaultCreativeCloudSymbols.  */
#define kAIPrefCreativeCloudSymbols ((const char*)"CreativeCloud/Symbols")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudSymbols. */
#define kAIPrefDefaultCreativeCloudSymbols		TRUE

/** @ingroup PreferenceKeys
	creative cloud pref - Brushes
	The default value is given by \c #kAIPrefDefaultCreativeCloudBrushes.  */
#define kAIPrefCreativeCloudBrushes ((const char*)"CreativeCloud/Brushes")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudBrushes. */
#define kAIPrefDefaultCreativeCloudBrushes		TRUE

/** @ingroup PreferenceKeys
	creative cloud pref - Graphic Styles
	The default value is given by \c #kAIPrefDefaultCreativeCloudGraphicStyles.  */
#define kAIPrefCreativeCloudGraphicStyles ((const char*)"CreativeCloud/GraphicStyles")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudGraphicStyles. */
#define kAIPrefDefaultCreativeCloudGraphicStyles		TRUE

/** @ingroup PreferenceKeys
	creative cloud pref - Workspaces
	The default value is given by \c #kAIPrefDefaultCreativeCloudWorkspaces.  */
#define kAIPrefCreativeCloudWorkspaces ((const char*)"CreativeCloud/Workspaces")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudWorkspaces. */
#define kAIPrefDefaultCreativeCloudWorkspaces		TRUE

/** @ingroup PreferenceKeys
	creative cloud pref - Keyboard shortcuts
	The default value is given by \c #kAIPrefDefaultCreativeCloudKBS.  */
#define kAIPrefCreativeCloudKBS ((const char*)"CreativeCloud/KBS")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudKeyboard shortcuts. */
#define kAIPrefDefaultCreativeCloudKBS		TRUE


/** @ingroup PreferenceKeys
	creative cloud pref - Asian Settings
	The default value is given by \c #kAIPrefDefaultCreativeCloudAsianSettings.  */
#define kAIPrefCreativeCloudAsianSettings ((const char*)"CreativeCloud/AsianSettings")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudAsianSettings. */
#define kAIPrefDefaultCreativeCloudAsianSettings		TRUE

/** @ingroup PreferenceKeys
	creative cloud pref - Conflict Handling Action
	The default value is given by \c #kAIPrefDefaultCreativeCloudConflictHandling.  */
#define kAIPrefCreativeCloudConflictHandling ((const char*)"CreativeCloud/ConflictHandling")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudConflictHandling. */
#define kAIPrefDefaultCreativeCloudConflictHandling		AIPreferenceUtil::kAskMe

/** @ingroup PreferenceKeys
	creative cloud pref - Sync Popup state
	The default value is given by \c #kAIPrefDefaultCreativeCloudSyncPopup.  */
#define kAIPrefCreativeCloudSyncPopup ((const char*)"CreativeCloud/SyncPopup")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefCreativeCloudSyncPopup. */
#define kAIPrefDefaultCreativeCloudSyncPopup		AIPreferenceUtil::kAllSettings

/** @ingroup PreferenceKeys
	Live Shape pref - Constrain dimensions
	The default value is given by \c #kAIPrefDefaultLiveShapesConstrainDimensions.  */
#define kAIPrefLiveShapesConstrainDimensions		((const char*)"LiveShapes/constrainDimensions")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefLiveShapesConstrainDimensions. */
#define kAIPrefDefaultLiveShapesConstrainDimensions		TRUE

/** @ingroup PreferenceKeys
	Live Shape pref - Constrain radii
	The default value is given by \c #kAIPrefDefaultLiveShapesConstrainRadii.  */
#define kAIPrefLiveShapesConstrainRadii		((const char*)"LiveShapes/constrainRadii")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefLiveShapeConstrainRadii. */
#define kAIPrefDefaultLiveShapesConstrainRadii		TRUE

/** @ingroup PreferenceKeys
	Live Shape pref - Constrain angles in pie
	The default value is given by \c #kAIPrefDefaultLiveShapesConstrainPieAngles.  */
#define kAIPrefLiveShapesConstrainPieAngles	((const char*)"LiveShapes/constrainPieAngles")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefLiveShapesConstrainPieAngles. */
#define kAIPrefDefaultLiveShapesConstrainPieAngles		FALSE

/** @ingroup PreferenceKeys
	Live Shape pref - Auto show shape properties UI on shape creation
	The default value is given by \c #kAIPrefDefaultLiveShapesAutoShowPropertiesUI.  */
#define kAIPrefLiveShapesAutoShowPropertiesUI		((const char*)"LiveShapes/autoShowPropertiesUIOnCreatingShape")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefLiveShapeAutoShowPropertiesUI. */
#define kAIPrefDefaultLiveShapesAutoShowPropertiesUI		FALSE

/** @ingroup PreferenceKeys
	Live Shape pref - Hide shape widgets for shape tool
	The default value is given by \c #kAIPrefDefaultLiveShapesHideWidgetsForShapeTool.  */
#define kAIPrefLiveShapesHideWidgetsForShapeTools		((const char*)"LiveShapes/hideWidgetsForShapeTools")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefLiveShapesHideWidgetsForShapeTool. */
#define kAIPrefDefaultLiveShapesHideWidgetsForShapeTools	FALSE

/** @ingroup PreferenceKeys
	Policy for preserving corners: governs the way corners are modified while transformations, e.g. scaling radii, maintaining corner radii value
	The default value is given by \c #kAIPrefDefaultPreserveCornersPolicy.  */
#define kAIPrefPreserveCornersPolicy					((const char*)"policyForPreservingCorners")
/** @ingroup PreferenceKeys
	Key values for \c #kAIPrefPreserveCornersPolicy. */
enum CornerPreservePolicy { kAIPrefScaleCornersRadii = 1, kAIPrefMaintainCornersRadii };
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefPreserveCornersPolicy. */
const CornerPreservePolicy kAIPrefDefaultPreserveCornersPolicy = kAIPrefMaintainCornersRadii;

/** @ingroup PreferenceKeys
 Performance pref - GPU Support detected*/
#define kAIPrefPerformanceGPUSupported ((const char*)"Performance/GPUSupported")
/** @ingroup PreferenceKeys
	Performance pref - Enable GPU rendering*/
#define kAIPrefPerformanceEnableGPU ((const char*)"Performance/EnableGPU_Ver19_2")

/** @ingroup PreferenceKeys
	Performance pref - Enable Animated Zoom*/
#define kAIPrefPerformanceAnimZoom ((const char*)"Performance/AnimZoom")

/** @ingroup PreferenceKeys
	Performance pref - Enable Thin Filled Paths */
#define kAIPrefPerformanceEnableThinFilledPaths ((const char*)"Performance/EnableThinFilledPaths")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefPerformanceEnableThinFilledPaths. */
#define kAIPrefDefaultPerformanceEnableThinFilledPaths		false

/** @ingroup PreferenceKeys
	Performance pref - Enable GPU rendering for CMYK */
#define kAIPrefPerformanceEnableCMYK ((const char*)"Performance/EnableCMYK")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefPerformanceEnableCMYK. */
#define kAIPrefDefaultPerformanceEnableCMYK		false

/** @ingroup PreferenceKeys
Performance pref - Display Setting */
#define kAIPrefPerformanceDisplaySetting ((const char*)"Performance/DisplaySetting")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefPerformanceDisplaySetting. */
#define kAIPrefDefaultPerformanceDisplaySetting		(0)

/** @ingroup PreferenceKeys
Performance pref - MSAA Value */
#define kAIPrefPerformanceMSAAValue ((const char*)"Performance/MSAAValue")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefPerformanceMSAAValue. */
#define kAIPrefDefaultPerformanceMSAAValue		(0)

/** @ingroup PreferenceKeys
	Crash Recovery pref - Automatically Save CheckBox Value*/
#define kAIPrefCrashRecoveryAutomaticallySave ((const char*)"CrashRecovery/AutomaticallySave")

/** @ingroup PreferenceKeys
	Crash Recovery pref - Minimum enforced time between two consecutive incremental save operations*/
#define kAIPrefCrashRecoveryIdleLoopTimeInterval ((const char*)"CrashRecovery/IdleLoopTimeInterval")

/** @ingroup PreferenceKeys
	Crash Recovery pref - Folder location where incremental files are saved*/
#define kAIPrefCrashRecoveryFolderLocation	((const char*)"CrashRecovery/RecoveryFolderLocation")

/** @ingroup PreferenceKeys
	Crash Recovery pref - Turn off for Complex file Checkbox value*/
#define kAIPrefCrashRecoveryTurnOffForComplexDocument	((const char*)"CrashRecovery/TurnOffForComplexDocument")

/** @ingroup PreferenceKeys
	Scale Illustrator UI */
#define kAIPrefScaleUI ((const char*)"UIPreferences/scaleUI")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefScaleUI. */
#define kAIPrefDefaultScaleUI		true

/** @ingroup PreferenceKeys
	Scale Illustrator UI to higher supported or lower supported scale factor. Value 0 means snap to lower supported scale factor while 1 means snap to higher one. */
#define kAIPrefSnapUIScaleFactor ((const char*)"UIPreferences/snapUIScaleFactor")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefSnapUIScaleFactor. */
#define kAIPrefDefaultSnapUIScaleFactor		1

/** @ingroup PreferenceKeys
	Touch Pref - Switch to Touch Workspace on Detaching Keyboard
	The default value is given by \c #kAIPrefDefaultTWSKeyboardDetach.  */
#define	kAIPrefTWSKeyboardDetach ((const char*)"TouchPreferenceUI/TWSKeyboardDetach")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefTWSKeyboardDetach. */
#define kAIPrefDefaultTWSKeyboardDetach		true
/** @ingroup PreferenceKeys
	Touch Pref - Use Precise Cursors
	The default value is given by \c #kAIPrefDefaultPreciseCursors.  */
#define kAIPrefPreciseCursors ((const char*)"TouchPreferenceUI/PreciseCursor")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefPreciseCursors. */
#define kAIPrefDefaultPreciseCursors	true
/** @ingroup PreferenceKeys
Determines whether or not to enable constrain scaling in Shaper in TWS. */
#define kAIPrefShaperConstrainScale			((const char*)"shaper/constrainScaling")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefShaperConstrainScale. */
#define kAIPrefShaperConstrainScaleDefault  false
/** @ingroup PreferenceKeys
	Touch Pref - Soft Message Default Duration
	The default value is given by \c #kAIPrefDefault/SoftMessageDuration.  */
#define kAIPrefSoftMessageDuration ((const char*)"TouchPreferenceUI/SoftMessageDuration")
	/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefSoftMessageDuration. */
#define kAIPrefDefaultSoftMessageDuration (4.0f)

/** @ingroup PreferenceKeys
ExpFeatures Pref - Enable Creative Cloud Charts
The default value is given by \c #kAIPrefDefaultEnableCCCharts.  */
#define kAIPrefEnableCCCharts ((const char*)"ExpFeaturesPreferenceUI/EnableCCCharts")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefEnableCCCharts. */
#define kAIPrefDefaultEnableCCCharts	false

/** @ingroup PreferenceKeys
	Making New Rectangular Area Text Auto Sizable by default */
#define kAIPrefTextBoxAutoSizing ((const char*)"text/autoSizing")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefTextBoxAutoSizing. */
#define kAIPrefTextBoxAutoSizingDefaultValue	false
		
/** @ingroup PreferenceKeys
Determines whether or not to show What's New Dialog */
#define kAIPrefDontShowMissingFontDlg		((const char*)"DontShowMissingFontDialogPreference")
/** @ingroup PreferenceKeys
	The default value for \c #kAIPrefShowMissingFontDlg. */
const bool kAIPrefDontShowMissingFontDlgDefault = false;

/** @ingroup PreferenceKeys
Determines whether or not UIDs are automatically assigned to art objects, in the document being created */
#define kAIPrefAutoAssignUIDsForDocCreated		((const char*)"AutoAssignUIDsForDocCreatedPreference")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefAutoAssignUIDsForDocCreated. */
const bool kAIPrefAutoAssignUIDsForDocCreatedDefault = false;

/** @ingroup PreferenceKeys
Determines whether or not UIDs are automatically assigned to art objects, in the document being opened */
#define kAIPrefAutoAssignUIDsForDocOpened		((const char*)"AutoAssignUIDsForDocOpenedPreference")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefAutoAssignUIDsForDocOpened. */
const bool kAIPrefAutoAssignUIDsForDocOpenedDefault = false;

/** @ingroup PreferenceKeys
Determines whether or not to hide corner widgets based on Angle */
#define kAIPrefHideCornerWidgetBasedOnAngle		((const char*)"liveCorners/hideCornerWidgetBasedOnAngle")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefHideCornerWidgetBasedOnAngle. */
const bool kAIPrefHideCornerWidgetBasedOnAngleDefault = true;

/** @ingroup PreferenceKeys
Sets the Corner Angle Limit for Hiding Corner Widgets */
#define kAIPrefCornerAngleLimit					((const char*)"liveCorners/cornerAngleLimit")

/** @ingroup PreferenceKeys
Determines whether or not to show bounding box */
#define kAIPrefShowBoundingBox					((const char*)"showBoundingBox")


#define kShowRecentFileWSKey					((const char*)"Hello/RecentFileWS")
/** @ingroup PreferenceKeys
The default value for \c #kShowRecentFileWSKey. */
const bool kAIPrefShowRecentFileWSDefault = false;

#define kShowHomeScreenWSKey					((const char*)"Hello/ShowHomeScreenWS")
/** @ingroup PreferenceKeys
The default value for \c #kShowHomeScreenWSKey. */
const bool kAIPrefShowHomeScreenWSDefault = true;

/** @ingroup PreferenceKeys
Determines whether or not to show Tool Guides. Used in AI 19.2 or greater */
#define kAISnappingPrefShowToolGuides			((const char*)"smartGuides/showToolGuides")
/** @ingroup PreferenceKeys
The default value for \c #kAISnappingPrefShowToolGuides. */
const bool kAISnappingPrefShowToolGuidesDefault = false;

/** Preference prefix: Number of Default Recent File  */
#define kRecentFileNumberPrefix nullptr
/** Preference suffix: Number of Default Recent File  */
#define kRecentFileNumberSuffix ((const char *)"RecentFileNumber")
/** Preference default:Number of Default Recent File */
const unsigned int kRecentFileNumberDefault = 20;
/** @ingroup PreferenceKeys
Determines the tolerance for snapping to angles while rotating a live shape. Used in AI 19.2 or greater */
#define kAISnappingPrefAngularTolerance			((const char*)"smartGuides/angularTolerance")
/** @ingroup PreferenceKeys
The default value for \c #kAISnappingPrefAngularTolerance. */
const ai::int32 kAISnappingPrefAngularToleranceDefault = 2;

/** @ingroup PreferenceKeys
Live Shape pref - Determines whether shapes created by Shape Tools(Rectangle, Polygon, Ellipse, Line) are live.
The default value is given by \c #kAIPrefDefaultCreateLiveShapes.  */
#define kAIPrefCreateLiveShapes					((const char*)"LiveShapes/createLiveShapes")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefCreateLiveShapes. */
#define kAIPrefDefaultCreateLiveShapes			TRUE

/** @ingroup PreferenceKeys
Linked files pref - Determines if the UNC(Universal Naming Convention) path needs to be used or the default
path of file needs to be used. Only makes sense for Windows. \c #kAIPrefUseUNCPath.  */
#define kAIPrefUseUNCPath					((const char*)"FilePath/UNCPath")
/** @ingroup PreferenceKeys
The default value for \c #kAIPrefUseUNCPath. */
#define kAIPrefDefaultUseUNCPath			TRUE

/** Preference default:Number of Default Recent Presets */
const unsigned int kRecentPresetsNumberDefault = 20;

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Document.h<|end_filename|>
#ifndef __AI100Document__
#define __AI100Document__

/*
 *        Name:	AI100Document.h
 *     Purpose:	Adobe Illustrator 10.0 Document Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AI120Document.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI100DocumentSuite				kAIDocumentSuite
#define kAIDocumentSuiteVersion7		AIAPI_VERSION(7)
#define kAI100DocumentSuiteVersion		kAIDocumentSuiteVersion7


/*******************************************************************************
 **
 **	Suite
 **
 **/


// Illustrator 10.0 Document suite
typedef struct {

	AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin );
	AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin );
	AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin );
	AIAPI AIErr (*GetDocumentRulerUnits) ( short *units );
	AIAPI AIErr (*SetDocumentRulerUnits) ( short units );
	AIAPI AIErr (*GetDocumentCropBoxGroupHandle) ( AIArtHandle *cropHandle );
	AIAPI AIErr (*GetDocumentCropBox) ( AIRealRect *cropBox );
	AIAPI AIErr (*SetDocumentCropBox) ( AIRealRect *cropBox );
	AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle );
	AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle );
	AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print );
	AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print );
	AIAPI AIErr (*GetDocumentSetup) ( AI120DocumentSetup *setup );
	AIAPI AIErr (*SetDocumentSetup) ( AI120DocumentSetup *setup );
	AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified );
	AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified );
	AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat );
	AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat );
	AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters );
	AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters );

	AIAPI AIErr (*RedrawDocument) ( void );

	AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document );
	

	AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );
	AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );

	AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin );
	
	AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething );

	AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max );
	AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds );
	AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists );

	/* Returns the recorded dictionary associated with the document. Note that dictionaries
		are reference counted. You must call sAIDictionary->Release() when you're
		done with it. */
	AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary );
	AIAPI AIErr (*GetDocumentColorModel) ( short *colorModel);
	AIAPI AIErr (*SetDocumentColorModel) ( short colorModel);
	AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile *rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile );
	AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile );
	AIAPI AIErr (*Copy)		();
	AIAPI AIErr (*Cut)		();
	AIAPI AIErr (*Paste)	();
	
	AIAPI AIErr (*SyncDocument) ( void );
	
	// The following two calls have been deprecated in AI10. The first will always return kDocTargetExplicit
	// for all three targets, while the second call is a no-op.
	AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget );
	AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget );

	/* Returns the dictionary associated with the document for which changes to the
		dictionary and its contents will not be recorded for undo/redo purposes. You
		must call sAIDictionary->Release() when you're done with it.*/
	AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary );
	
	// Returns AI version of the current document.  If unknown, or not an AI file, returns 0.  
	// Version 2 is Illustrator 88.
	AIAPI int (*GetAIVersion) ();

	AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint );
	AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt );

	// New for AI 10

	// Asset Management info
	// Any unwanted parameter can be set to null to not "get" or "set" its state.
	// managed => file has associated server URL
	// checkedOut => if managed, file is checked out and can be edited
	// URL => if managed, URL of server version of file
	// canEdit => if managed, can edit the file even if not checked out
	// fileType => name of plugin used to open document, or last "save as" of document
	AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType);
	AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit);
	AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL);
	// returns a ptr to the xml packet associated with the document XAP data. The format is UTF-8 unicode
	AIAPI AIErr (*GetDocumentXAP)(const char **xap);
	// remove any existing XAP data and assign this xml xap packet to the document. Format must be UTF-8 unicode.
	AIAPI AIErr (*SetDocumentXAP)(const char *xap);

} AI100DocumentSuite;



#include "AIHeaderEnd.h"


#endif


<|start_filename|>js/main.js<|end_filename|>
(function () {
    'use strict';
    
    try {
        // Filters an input to either undefined or a positive number
        ko.extenders.positiveNumeric = function(target, sec) {
            var result = ko.pureComputed({
                read: target,
                write: function(newValue) {
                    var current = target();
                    var newValueAsNum = isNaN(newValue) || newValue === "" ? undefined : Math.abs(parseFloat(+newValue));
                    
                    if (current !== newValueAsNum) {
                        target(newValueAsNum);
                    }
                    else {
                        if (current !== newValue) {
                            target.notifySubscribers(newValueAsNum);
                        }
                    }
                }
            }).extend({ notify: "always" });
            
            result(target);
            return result;
        };
        
        var BlokVm = (function() {
            function BlokVm() {
                this.isErrorStateVisible = ko.observable(true);
                this.title = ko.observable("Not set");
                this.isContainerSettingsVisible = ko.observable(false);
                this.isChildSettingsVisible = ko.observable(false);
                this.isCreateButtonVisible = ko.observable(false);
                this.isLayoutButtonVisible = ko.observable(false);
                this.isAutoLayoutOn = ko.observable(true);

                // Blok settings
                this.flex = ko.observable(undefined).extend({ positiveNumeric: 0 });
                this.alignSelf = ko.observable(undefined);
                this.parentBlokContainerFlexDirection = ko.observable(0);

                // BlokContainer settings
                this.flexDirection = ko.observable(0);
                this.justifyContent = ko.observable(0);
                this.alignItems = ko.observable(0);
                this.flexWrap = ko.observable(0);
            }

            BlokVm.prototype.blokEquals = function(settings) {
                return this.flex() === settings.flex &&
                    this.alignSelf() === settings.alignSelf;
            };

            BlokVm.prototype.blokContainerEquals = function(settings) {
                return this.blokEquals(settings) &&
                    this.flexDirection() === settings.flexDirection &&
                    this.justifyContent() === settings.justifyContent &&
                    this.alignItems() === settings.alignItems &&
                    this.flexWrap() === settings.flexWrap;
            };

            return BlokVm;
        })();

        /** Function container for dealing with Blok JSX API */
        var BlokScripts = (function() {
            var csInterface = new CSInterface();

            // TODO: how does this handle exceptions? We should crash too

            return {
                /** Ask the native plugin to ping back if it's there */
                pingDown: function() {
                    var event = new CSEvent('com.westonthayer.bloks.events.PingDownEvent', 'APPLICATION', 'ILST', 'PingDownEvent');
                    csInterface.dispatchEvent(event);
                },
                /** Register a callback for when the native plugin pings back */
                onPingUp: function(cb) {
                    csInterface.addEventListener("com.westonthayer.bloks.events.PingUpEvent", function(ret) {
                        cb(ret.data);
                    });
                },
                /** Register a callback for when there's an exception from JSX */
                onException: function(cb) {
                    csInterface.addEventListener("com.westonthayer.bloks.events.JsxExceptionRaised", function(ret) {
                        cb(ret.data);
                    });
                },
                /** Register a callback for whenever Illustrator is about to undo an action. Will fire before SELECTION_CHANGED */
                onPreUndo: function(cb) {
                    csInterface.addEventListener("com.westonthayer.bloks.events.PreUndo", function(ret) {
                        cb();
                    });
                },
                /** Register a callback for whenever Illustrator is about to show or hide the rulers. */
                onPreShowHideRulers: function(cb) {
                    csInterface.addEventListener("com.westonthayer.bloks.events.PreShowHideRulers", function(ret) {
                        cb();
                    });
                },
                /** Register a callback for whenever Illustrator's SELECTION_CHANGED event fires (a lot) */
                onSelectionChanged: function(cb) {
                    csInterface.addEventListener("com.westonthayer.bloks.events.SelectionChanged", function(ret) {
                        // Only listen for our plugin's events, we could be hearing others
                        if (ret.extensionId === "com.westonthayer.bloks") {
                            cb();
                        }
                    });
                },
                getActionsFromSelection: function(cb) {                
                    csInterface.evalScript("loader(7).getActionsFromSelection()", function(ret) {
                        var result = JSON.parse(ret);
                        cb(result);
                    });
                },
                createBlokContainerFromSelection: function(settingsStr, cb) {
                    csInterface.evalScript("loader(7).createBlokContainerFromSelection(" + settingsStr + ")", function(ret) {
                        if (cb) {
                            cb();
                        }
                    });
                },
                updateSelectedBlok: function(settingsStr, cb) {
                    csInterface.evalScript("loader(7).updateSelectedBlok(" + settingsStr + ")", function(ret) {
                        if (cb) {
                            cb();
                        }
                    });
                },
                updateSelectedBlokContainer: function(settingsStr, cb) {
                    csInterface.evalScript("loader(7).updateSelectedBlokContainer(" + settingsStr + ")", function(ret) {
                        if (cb) {
                            cb();
                        }
                    });
                },
                checkSelectionForRelayout: function() {
                    csInterface.evalScript("loader(7).checkSelectionForRelayout()");
                },
                relayoutSelection: function() {
                    csInterface.evalScript("loader(7).relayoutSelection()");
                },
                hideSpacers: function() {
                    csInterface.evalScript("loader(7).hideSpacers()");
                },
                showSpacers: function() {
                    csInterface.evalScript("loader(7).showSpacers()");
                }
            };
        })();
        
        
        // Execution starts here
        BlokScripts.onException(function(ret) {
            alert("JSX crashed. FileName: " + ret.fileName + ", Line: " + ret.line + ", Name: " + ret.name + ", Message: " + ret.message);
        });

        themeManager.init();

        var viewModel = new BlokVm();
        ko.applyBindings(viewModel);
        
        // Global which tracks whether a selection changed event is caused by an undo
        var isUndo = false;
        
        // Global which tracks when the last time a ruler was shown/hidden
        var lastRulerTime = new Date();
        
        BlokScripts.onPreUndo(function() {
            isUndo = true;
        });
        
        BlokScripts.onPreShowHideRulers(function() {
            var endTime = new Date();
            var diff = endTime - lastRulerTime;
            lastRulerTime = endTime;
            
            // We allow the user to use <CTRL + R> to trigger a relayout
            // since clicking our UI is inconvenient. Illustrator doesn't let us
            // register for keyboard shortcuts, so we listen instead for the show/hide
            // ruler menu command. Since invoking that command shows the ruler, it's probably
            // typical that you would want to hit <CTRL + R> 2x quickly to just toggle the ruler
            // yet still get the relayout behavior. So, we check to see if it's been "quickly"
            // toggled to avoid the overhead of another layout pass.
            if (diff > 1000) {                
                BlokScripts.relayoutSelection();
            }
        });
        
        function respondToActions(result) {
            // If we ever hear back from the plugin, no more need for
            // initial state to show
            viewModel.isErrorStateVisible(false);
            
            if (result.action === 0) {
                viewModel.title("No Options");
                viewModel.isChildSettingsVisible(false);
                viewModel.isContainerSettingsVisible(false);
                viewModel.isCreateButtonVisible(false);
                viewModel.isLayoutButtonVisible(false);
            }
            else if (result.action === 1) {
                // Container sel
                viewModel.title("Blok Group");

                if (result.blok.isAlsoChild) {
                    viewModel.isChildSettingsVisible(true);
                    viewModel.flex(result.blok.flex);
                    viewModel.alignSelf(result.blok.alignSelf);
                    viewModel.parentBlokContainerFlexDirection(result.blok.parentBlokContainer.flexDirection);
                }
                else {
                    viewModel.flex(undefined);
                    viewModel.alignSelf(undefined);
                    viewModel.isChildSettingsVisible(false);
                }

                viewModel.isContainerSettingsVisible(true);
                viewModel.isCreateButtonVisible(false);
                viewModel.isLayoutButtonVisible(true);

                viewModel.flexDirection(result.blok.flexDirection);
                viewModel.justifyContent(result.blok.justifyContent);
                viewModel.alignItems(result.blok.alignItems);
            }
            else if (result.action === 2) {
                // child sel
                viewModel.title("Blok Item");
                viewModel.isChildSettingsVisible(true);
                viewModel.isContainerSettingsVisible(false);
                viewModel.isCreateButtonVisible(false);
                viewModel.isLayoutButtonVisible(true);

                viewModel.flex(result.blok.flex);
                viewModel.alignSelf(result.blok.alignSelf);
                
                if (result.blok.parentBlokContainer) {
                    viewModel.parentBlokContainerFlexDirection(result.blok.parentBlokContainer.flexDirection);
                }
            }
            else if (result.action === 3) {
                // Create group
                viewModel.title("Blok Group");
                viewModel.isChildSettingsVisible(false);
                viewModel.isContainerSettingsVisible(true);
                viewModel.isCreateButtonVisible(true);
                viewModel.isLayoutButtonVisible(false);
                viewModel.flexDirection(0);
                viewModel.justifyContent(0);
                viewModel.alignItems(0);
            }
            else {
                throw new Error("Unexpected action value: " + result);
            }
        }

        BlokScripts.onSelectionChanged(function() {  
            BlokScripts.getActionsFromSelection(respondToActions);
            
            if (!isUndo && viewModel.isAutoLayoutOn()) {
                BlokScripts.checkSelectionForRelayout();
            }
            
            isUndo = false;
        });

        // On-the-fly updates
        
        function handleBlokPropertyChanged(newValue) {
            BlokScripts.getActionsFromSelection(function(result) {
                if (result.action === 2 && !viewModel.blokEquals(result.blok)) {
                    BlokScripts.updateSelectedBlok(ko.toJSON(viewModel));
                }
                else if (result.action === 1 &&
                         result.blok.isAlsoChild &&
                         !viewModel.blokContainerEquals(result.blok)) {
                    BlokScripts.updateSelectedBlokContainer(ko.toJSON(viewModel));
                }
            });
        }
        
        viewModel.flex.subscribe(handleBlokPropertyChanged);
        viewModel.alignSelf.subscribe(handleBlokPropertyChanged);

        
        function handleBlokContainerPropertyChanged(newValue) {
            BlokScripts.getActionsFromSelection(function(result) {
                if (result.action === 1 && !viewModel.blokContainerEquals(result.blok)) {
                    BlokScripts.updateSelectedBlokContainer(ko.toJSON(viewModel));
                }
            });
        }

        viewModel.flexDirection.subscribe(handleBlokContainerPropertyChanged);
        viewModel.justifyContent.subscribe(handleBlokContainerPropertyChanged);
        viewModel.alignItems.subscribe(handleBlokContainerPropertyChanged);


        // Group creation
        $("#create-btn").click(function() {
            viewModel.isCreateButtonVisible(false);
            
            var settings = {
                flexDirection: viewModel.flexDirection(),
                justifyContent: viewModel.justifyContent(),
                alignItems: viewModel.alignItems(),
                flexWrap: viewModel.flexWrap()
            };
            
            BlokScripts.createBlokContainerFromSelection(JSON.stringify(settings));
        });
        
        // Force a layout
        $("#layout-btn").click(function() {
            BlokScripts.relayoutSelection();
        });
        
        // Easy show/hide of .spacer PageItems
        $("#spacer-hide-btn").click(function() {
            BlokScripts.hideSpacers();
        });
        
        $("#spacer-show-btn").click(function() {
            BlokScripts.showSpacers();
        });



        // Helps with debugging
        /*$("#reload-btn").click(function () {
            location.reload();
        });*/
        
        
        // Make an initial query on first boot to see if the plugin is there
        BlokScripts.onPingUp(function() {
            BlokScripts.getActionsFromSelection(respondToActions);
        });
        
        BlokScripts.pingDown();
    }
    catch (ex) {
        alert("CEP crashed: " + ex.toString());
    }

}());
    


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192IsolationMode.h<|end_filename|>
#ifndef __AI192IsolationMode__
#define __AI192IsolationMode__

/*
 *        Name:	AI192IsolationMode.h
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator 19.2 Isolation Mode Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2006-2016 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIIsolationMode.h"

#include "AIHeaderBegin.h"

/** @file AI192IsolationMode.h */

/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAI192IsolationModeSuite			kAIIsolationModeSuite
#define kAIIsolationModeSuiteVersion4		AIAPI_VERSION(4)
#define kAI192IsolationModeSuiteVersion		kAIIsolationModeSuiteVersion4
#define kAI192IsolationModeVersion			kAI192IsolationModeSuiteVersion



/*******************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	This suite provides functions that handle isolation mode, in which an artwork selection
	is moved onto a special isolation layer for editing, and that isolation layer (and any
	contents) becomes the only layer displayed in the Layers panel or accessible to edits.
	See \c #AILayerListSuite.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAI192IsolationModeSuite and \c #kAI192IsolationModeVersion.
*/
typedef struct {

	/** Enters isolation mode for a specific group or plug-in group. This art becomes
		the isolated art, replacing any art that was previously isolated. In this mode,
		the user can edit only the isolated art.

		While the art is isolated, \c #AIArtSuite::GetArtParent() returns the layer group
		of the temporary isolation layer; use \c #GetIsolatedArtAndParents() instead to
		retrieve the pre-isolation parent.
			@param art The group or plug-in group art object. Can be in the main art tree
				or in an isolated art tree. Cannot be art inside a dictionary or plug-in group.
			@param invisibleFlag  When true, artwork that is not isolated is made invisible.
			    When false, non-isolated artwork is dimmed.
		*/
	AIAPI AIErr (*EnterIsolationMode)(AIArtHandle art, AIBoolean invisibleFlag);

	/** Exits isolation mode and returns to normal editing mode. Any art on the isolation
		layer is reordered to where the art object passed to \c #EnterIsolationMode() was
		originally located in the art tree. (It is therefore valid to delete the
		isolated art or add additional objects before exiting isolation mode.) After
		restoring the parent chain, a \c #kAIIsolationModeChangedNotifier is sent with
		canceled as false.
		See also \c #CancelIsolationMode().
	*/
	AIAPI AIErr (*ExitIsolationMode)(void);

	/** Retrieves the original parent and ancestors of an isolated artwork tree; that is,
		the pre-isolation parent of a group, plugin-group or other art that has been passed
		to \c #EnterIsolationMode().
		(Note that this function does not return an error code.)
			@param isolatedArtParent [out] A buffer in which to return the parent
				art object of the isolated art tree.
			@param parentChain [out] Optional. A buffer in which to return an array of
				0 or more art objects (\c #AIArtHandle) for the ancestors of the
				parent art object.
		*/
	AIAPI void (*GetIsolatedArtAndParents)(AIArtHandle *isolatedArtParent, ai::AutoBuffer<AIArtHandle> *parentChain);


	/** Reports whether isolation mode is in effect.
		(Note that this function returns a boolean value, not an error code.)
			@return True if isolation mode is on, false if it is off.
		*/
	AIAPI ASBoolean (*IsInIsolationMode)(void);

	/** Reports whether artwork is in the isolated layer.
		(Note that this function returns a boolean value, not an error code.)
			@param art The parent art object of the art tree.
			@return True if the artwork is in the isolated layer, false otherwise.
		*/
	AIAPI ASBoolean (*IsIsolatedLayer)(AIArtHandle art);

	/** Reports whether artwork is in a non-isolated layer. Non-isolated art layers
		hold the artwork that is not being edited in isolation mode. Non-isolated artwork
		can be shown in a 50% opacity state in isolation mode, or can be hidden entirely
		when in symbol editing mode or pattern editing mode. The Layers panel uses this
		function to exclude non-isolated layers from the panel list.
		(Note that this function returns a boolean value, not an error code.)
			@param art The parent art object of the art tree.
			@return True if the artwork is in a non-isolated layer, false otherwise.
		*/
	AIAPI ASBoolean (*IsNonIsolatedLayer)(AIArtHandle art);

	/** Reports whether an art tree is a legal target for isolation mode.
		Art that cannot be isolated includes, for example, art that is inside a
		plug-in group or dictionary, text art or guides, art that is locked or hidden,
		template layers, and the temporary isolation layer of an object already in
		isolation mode. If art is null, returns whether it is legal to enter isolation
		mode in general. (Under some conditions it is invalid to enter isolation mode
		on anything, such as when already in mask editing mode.)
			@param art The parent art object of the art tree, or null.
			@return True if the artwork can be isolated or if it is
				already isolated, false otherwise.
		*/
	AIAPI ASBoolean (*CanIsolateArt)(AIArtHandle art);

	/** Reports the type art in Isolation Mode.
			@return The type of isolation Mode, an \c #AIIsolationModeType constant
		*/
	AIAPI AIIsolationModeType (*GetIsolationModeType)();

	/** Identical to \c #ExitIsolationMode(), except that after restoring the parent chain,
		a \c #kAIIsolationModeChangedNotifier message is sent with canceled as true.
		For normal isolation mode, there is no difference in behavior, since even
		when canceled, any changes made in isolation mode are not rolled back.
		For Symbol editing mode and Pattern editing mode, the symbol or pattern is
		ordinarily redefined during handling of the \c #kAIIsolationModeChangedNotifier.
		Canceling causes the redefinition not to occur.
	 */
	AIAPI AIErr (*CancelIsolationMode)(void);
	
} AI192IsolationModeSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentList.h<|end_filename|>
#ifndef __AI180DocumentList__
#define __AI180DocumentList__

/*
 *        Name:	AIDocumentList.h
 *   $Revision: 1 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Document Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file
 * in accordance with the terms of the Adobe license agreement
 * accompanying it. If you have received this file from a source other
 * than Adobe, then your use, modification, or distribution of it
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIDocumentList.h"
#include "AIHeaderBegin.h"

/** @file AI180DocumentList.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI180DocumentListSuite				kAIDocumentListSuite
#define kAI180DocumentListSuiteVersion8		AIAPI_VERSION(8)

// latest version
#define kAI180DocumentListSuiteVersion		kAI180DocumentListSuiteVersion8
#define kAI180DocumentListVersion			kAI180DocumentListSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	These functions enumerate and operate on the list of open Illustrator documents.

	Many functions act on the current document and document view, which is
	usually, but not always, the document and view of the active document window.
	Use \c #Activate() to change the current document. Documents that you create
	or open become current.

	Switching the current document or view commits any modifications that have been made.
	This means that an undo entry is added to the list of undoable operations, any
	deferred notifications are sent, and the document windows are updated.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIDocumentListSuite and \c #kAIDocumentListVersion.
*/
struct AI180DocumentListSuite {

	/** Counts the number of open document windows. Multiple windows can be
		open for a single document, so this is not a count of the number of open
		documents. Use with \c #GetNthDocument() to retrieve documents.
			@param count [out] A buffer in which to return the number of windows.
		*/
	AIAPI AIErr	(*Count)( ai::int32* count );

	/** Retrieves a document by position index in the list of open document windows.
		Use with \c #Count() to iterate through windows.
			@param document	[out] A buffer in which to return the document reference.
			@param lIndex  The 0-based position index, in the range <code>[0..numWindows-1]</code>.
		*/
	AIAPI AIErr	(*GetNthDocument)( AIDocumentHandle* document, ai::int32 lIndex );

	/** Creates a new document and makes it the current document, and opens a window
		for the new document, which becomes the	front most document window.
			@param preset (New in AICS3) The name of a startup preset to
				use when creating the new document. If empty or invalid, the function uses the
				startup template for the color mode specified in the \c parameter overrides.
				Preset names are those that appear in the New Document dialog.
				such as "Mobile", "Print", and so on.
			@param parameter (New in AICS3) The parameters for the new document. These values
				override those in the preset. When a parameter has a \c NULL value here,
				the function uses the value from the preset.In case it is not NULL,It is required to
				initialize all parameters of structure.
			@param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New
				dialog to query user for parameters.
		@param document [out] A buffer in which to return the document reference.
			@note The parameters for this function changed in Illustrator 13 (Creative Suite 3).
	*/
	AIAPI AIErr	(*New)( ai::UnicodeString& preset, AINewDocumentPreset *parameter, ActionDialogStatus dialogStatus, AIDocumentHandle* document );

	/** Opens a document from a file in a new window, and makes the new document and view current.
		If the document is already open, opens a new view for the document,
		and makes that document and view current.
			@param fileSpec The file.
			@param colorMode The color mode for the new document.
			@param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New
				dialog to query user for parameters. Otherwise, allows no user interaction.
			@param forceCopy When true, duplicates the file and names the copy "Untitled",
				regardless of whether it is marked as a template file.
			@param document [out] A buffer in which to return the document reference.
		*/
	AIAPI AIErr	(*Open)( const ai::FilePath &fileSpec, AIColorModel colorMode,
						ActionDialogStatus dialogStatus, AIBoolean forceCopy, AIDocumentHandle* document );

	/** Saves a document. If the document has not been saved before, prompts
		the user for a location and save options.
			@param document The document reference.
		*/
	AIAPI AIErr	(*Save)( AIDocumentHandle document );

	/** Closes a view for a document. If the document has only one open window,
		this closes the document. If the document has been modified since last saved.
		prompts the user to save.  Switches the current document
		to the active document window, regardless of whether it was the current view that
		was closed.
			@param document The document reference.
		*/
	AIAPI AIErr	(*Close)( AIDocumentHandle document );

	/** Closes all open document windows. This is equivalent to calling \c #Close()
		for each open window.
		*/
	AIAPI AIErr	(*CloseAll)();

	/** Activates a window for a document, and makes that document and view current.
			@param document The document reference.
			@param bSetFocus Must be true. If false, the function does nothing.
		*/
	AIAPI AIErr	(*Activate)( AIDocumentHandle document, ASBoolean bSetFocus );

	/** Prints a document.
			@param document The document reference.
			@param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the
				Print dialog to query user for parameters.
		*/
	AIAPI AIErr	(*Print)( AIDocumentHandle document, ActionDialogStatus dialogStatus );

	// New in Illustrator 13.0

	/** Retrieves the preset settings from one of the startup template documents.
			@param preset The preset name. Preset names are those that appear in the
				New Document dialog. such as "Mobile", "Basic RGB", and so on.
			@param param [out] A buffer in which to return the settings.
		*/
	AIAPI AIErr	(*GetPresetSettings)( ai::UnicodeString &preset, AINewDocumentPreset *param );

	/**	Reports the number of recent documents. Use with \c #GetNthRecentDocument()
		to iterate through recent-documents list.
		(Note that this function returns a numeric value, not an error code.)
			@return The number of recent documents in the list.
		*/
	AIAPI ai::int32 (*CountRecentDocuments)();

	/**	Retrieves the location of a document from the recent-documents list.
		Use with \c #CountRecentDocuments() to iterate through recent-document list.
			@param index The 0-based position index of the document in the list.
			@param document [out] The path of the document.
		*/
	AIAPI AIErr (*GetNthRecentDocument)( ai::int32 index, ai::FilePath& document );

	/** Opens a document in the recent-documents list.
			@param index The 0-based position index of the document in the list.
	*/
	AIAPI AIErr (*OpenNthRecentDocument)(ai::int32 index);

	/** Adds a file to the most-recently-used-files list
			@param document The file to add.
	*/
	AIAPI AIErr (*AddToRecentFiles)(const ai::FilePath &document);
};

#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/BloksAIPlugin/BloksAIPluginID.h<|end_filename|>
#ifndef __BloksAIPluginID_H__
#define __BloksAIPluginID_H__

#define kBloksAIPluginName "BloksAIPlugin"

#endif // End BloksAIPluginID.h


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.hpp<|end_filename|>
#pragma once
#ifndef _IAI_ARTBOARDS_
#define _IAI_ARTBOARDS_

/*
* Name: IAIArtboards.hpp
* Author: Started by Pushp
* Date: November, 2008
* Purpose: Adobe Illustrator Artboard Interfaces
*
* ADOBE SYSTEMS INCORPORATED
* Copyright 2009 Adobe Systems Incorporated.
* All rights reserved.
*
* NOTICE:  Adobe permits you to use, modify, and distribute this file
* in accordance with the terms of the Adobe license agreement
* accompanying it. If you have received this file from a source other
* than Adobe, then your use, modification, or distribution of it
* requires the prior written permission of Adobe.
*
*/
#include "AITypes.h"
#include "IAIUnicodeString.h"
class CAIArtboardProperties;
class CAIArtboardList;

/** Constant for maximum number of artboard that can be defined. */
#define kAIMAX_ARTBOARD_LIMIT				100
/** @ingroup Errors
	@see ArtboardProperties */
#define kAICantDeleteLastArtboardErr		'CDLC'
/** @ingroup Errors
	@see ArtboardProperties */
#define kAIExceededMaxArtboardLimitErr		'EMxL'
/** @ingroup Errors
	@see ArtboardProperties */
#define kNotFoundErr		'!FND'

#define kActiveArtboard -1

namespace ai
{
	/** Artboard identifier. */
	typedef ai::int32 ArtboardID;
	/** Artboard object. */
	typedef CAIArtboardProperties* ArtboardRef;
	/** Artboard list object. */
	typedef CAIArtboardList* ArtboardListRef;

	/** The \c ArtboardProperties object encapsulates all the attributes associated with
	an artboard. These are not live objects but a snapshot at any given time.
	To update an object, you must call \c ai::ArtboardList::Update.
	*/
	class ArtboardProperties
	{
	public:
		/** Types of artboard display marks and annotations. */
		typedef enum
		{
			kNone = 0,
			kCenter = 1,
			kCrossHair = 1<<1,
			kSafeAreas = 1<<2
		} DisplayMarkType;

		/** Default constructor */
		ArtboardProperties();

		/** Copy Constructor */
		ArtboardProperties(const ArtboardProperties&);

		/** Destructor */
		~ArtboardProperties();
		/** Assignment operator */
		ArtboardProperties& operator=(const ArtboardProperties&);

		/** Checks for a valid object, Invalid objects return an error on
		every operation.
		@return True if this object is valid. */
		bool IsValid() const
		{
			return fImpl != NULL;
		}

		/** Retrieves the position and bounds of this artboard.
		@param value [out] A buffer in which to return the value.
		*/
		AIErr GetPosition(AIRealRect& value) const;

		/** Modifies the position and bounds of this artboard. Call \c ai::ArtboardList::Update()
		with this object to make the change.
		@param value The new position and bounds value.
		*/
		AIErr SetPosition(AIRealRect value);

		/** Retrieves the pixel aspect ratio of the artboard ruler.
		@param value [out] A buffer in which to return the value.
		*/
		AIErr GetPAR(AIReal& value) const;

		/** Modifies the pixel aspect ratio of the artboard ruler. Call \c ai::ArtboardList::Update()
		with this object to make the change in the artboard
		@param value The new value.
		*/
		AIErr SetPAR(AIReal value);

		/** Reports whether a particular type of annotation is shown or hidden.
		@param mark The type of annotation.
		@param show [out] A buffer in which to return true if the mark is shown, false if hidden.
		*/
		AIErr GetShowDisplayMark(DisplayMarkType mark, bool& show) const;

		/** Shows or hides a particular type of annotation.
		@param mark The type of annotation.
		@param show True to show, false to hide.
		*/
		AIErr SetShowDisplayMark(DisplayMarkType mark,bool show);

		/** Retrieves the name associated with this artboard.
		@param name [out] A buffer in which to return the name.
		*/
		AIErr GetName(ai::UnicodeString& name) const;

		/** Sets the name associated with this artboard.
		@param name The new name.
		*/
		AIErr SetName(const ai::UnicodeString& name);

		/** Retrieves the ruler origin of the artboard.	Ruler origin is relative to left-bottom corner of the artboard
		@param rulerOrigin [out] A buffer in which to return the ruler origin.
		*/
		AIErr GetRulerOrigin(AIRealPoint& rulerOrigin) const;

		/** Sets the ruler origin of the artboard. Ruler origin is relative to left-bottom corner of the artboard
		@param rulerOrigin The new ruler origin.
		*/
		AIErr SetRulerOrigin(const AIRealPoint& rulerOrigin);

		/** Reports whether this artboard has an application-generated name.  This affects the file name of the artboard if it is saved
		as part of an export-to-JPEG operation.
		@param isDefault [out] A buffer in which to return true if the name is generated, false if it has been explicitly set.
		*/
		AIErr IsDefaultName(AIBoolean& isDefault) const;

		/** Internal. Do not use. */
		AIErr SetIsDefaultName(const AIBoolean& isDefault);

	public: // internal use public interface
		ArtboardProperties(const ArtboardRef ref);
		void deleteImpl();
	private:
		friend class ArtboardList;
		ArtboardRef fImpl;
	};

	/** The \c ArtboardList object is the interface to the set of artboards associated
	with a document. It encapsulate all artboard operations.
	*/
	class ArtboardList
	{
	public:
		/* Constructs an ArtboardList object for the current document*/
		ArtboardList();

		/** Destructor */
		~ArtboardList();
		/** Checks for a valid object, Invalid objects return an error on
		every operation.
		@return True if this object is valid.
		*/
		bool IsValid() const
		{
			return fImpl != NULL;
		}

		/** Adds a new artboard to the document and reports its index position in this artboard list.
		@param newArtboard The new artboard's properties.
		@param index [out] A buffer in which to return the 0-based index position of the new artboard.
		@return The error \c #kAIExceededMaxArtboardLimitErr if the number of artboards exceeds  \c #kAIMAX_ARTBOARD_LIMIT.
		*/

		AIErr AddNew(ArtboardProperties& newArtboard, ArtboardID& index);

		/** Inserts a new artboard to the document at the specified location.
		@param artboard The new artboard's properties.
		@param index 0-based index position of the new artboard.
		@return The error \c #kAIExceededMaxArtboardLimitErr if the number of artboards exceeds  \c #kAIMAX_ARTBOARD_LIMIT.
		*/

		AIErr Insert(ArtboardProperties& artboard, ArtboardID& index);

		/** Deletes an artboard from the document list, makes the next one in the list active.
		@param index The 0-based index position of the artboard to delete.
		@return The error \c #kAICantDeleteLastArtboardErr if this is the last artboard in the list.
		*/
		AIErr Delete(ArtboardID index);
		/** Retrieves the number of artboards defined in the artboard list.
		@param count [out] A buffer in which to return the number of artboards.
		*/
		AIErr GetCount(ArtboardID& count) const;

		/** Retrieves the properties of an artboard. Use with \c #GetCount() and \c #Update()
		to modify an artboard without changing which artboard is active in the document.
		@param index The 0-based index position of the artboard in the artboard list..
		@return The artboard properties object. On error returns an invalid object.
		*/
		ArtboardProperties GetArtboardProperties(ArtboardID index);

		/** Updates the properties of an artboard. Use with \c #GetCount() and \c #GetArtboardProperties()
		to modify an artboard without changing which artboard is active in the document.
		@param index The 0-based index position of the artboard in the document list.
		@param artboard The object containing the new artboard properties.
		*/
		AIErr Update(ArtboardID index, const ArtboardProperties& artboard);

		/** Retrieves the index position of the active artboard in the document's list.
		@param index [out] A buffer in which to return the 0-based index, or -1 if there are
		no artboards in the current document.
		*/
		AIErr GetActive(ArtboardID& index) const;

		/** Makes a specific artboard active, and makes it current in the iteration order.
		@param index The 0-based index position of the artboard in the document list.
		*/
		AIErr SetActive(ArtboardID index);

	public: // internal use public interface
		ArtboardList(const ArtboardList&);
		ArtboardList& operator=(const ArtboardList&);
		ArtboardList(ArtboardListRef);
		void deleteImpl();

	private:
		ArtboardListRef fImpl;
	};

	/** The \c ArtboardUtils object is a collection of utility functions for common operations.
	*/
	namespace ArtboardUtils
	{
		/** Retrieves the number of artboards defined in the artboard list of the current document.
		@param count [out] A buffer in which to return the number of artboards.
		*/
		inline AIErr GetCount(ArtboardID& count)
		{
			ArtboardList list;
			return list.GetCount(count);
		}
		/** Retrieves the position and bounds of an artboard.
		@param index The 0-based index position of the artboard in the document list.
		@param rect [out] A buffer in which to return the value.
		*/
		inline AIErr GetPosition(ArtboardID index,AIRealRect& rect)
		{
			ArtboardList list;
			ArtboardProperties artboard(list.GetArtboardProperties(index));
			if(!artboard.IsValid()) return kBadParameterErr;
			return artboard.GetPosition(rect);
		}
		/** Retrieves the position and bounds of the currently active artboard.
		@param rect [out] A buffer in which to return the value.
		*/
		inline AIErr GetActiveArtboardPosition(AIRealRect& rect)
		{
			AIErr error = kNoErr;
			ArtboardList list;
			ArtboardID index;
			error = list.GetActive(index);
			GetPosition(index,rect);
			return error;
		}
		/** Retrieves the index of the currently active artboard.
		@param index [out] A buffer in which to return the value.
		*/
		inline AIErr GetActiveArtboardIndex(ArtboardID& index)
		{
			AIErr error = kNoErr;
			ArtboardList list;
			error = list.GetActive(index);
			return error;
		}
		/** Retrieves the name of the specified artboard.
		@param name [out] A buffer in which to return the name.
		@param isDefault [out] True if the name is the default name.
		@param index [in] The 0-based position index of the artboard, or -1 to get the active artboard.
		*/
		AIErr GetArtboardName(ai::UnicodeString& name,bool& isDefault, ArtboardID index = kActiveArtboard);

		/** Retrieves the index of the artboard with specified name
		@param name [in] The name of the Artboard.
		@param index [out] The artboard index .
		*/
		AIErr GetArtboardIndexByName(const ai::UnicodeString& name, ai::ArtboardID& index);
	}
}

#endif //_IAI_ARTBOARDS_

<|start_filename|>BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.cpp<|end_filename|>
#include "IllustratorSDK.h"
#include "BloksAIPluginSuites.h"

// Suite externs
extern "C"
{
	SPBlocksSuite* sSPBlocks = NULL;
	AIUnicodeStringSuite* sAIUnicodeString = NULL;
	AIStringFormatUtilsSuite* sAIStringFormatUtils = NULL;
}

// Import suites
ImportSuite gImportSuites[] =
{
	kSPBlocksSuite, kSPBlocksSuiteVersion, &sSPBlocks,
	kAIUnicodeStringSuite, kAIUnicodeStringVersion, &sAIUnicodeString,
	kAIStringFormatUtilsSuite, kAIStringFormatUtilsSuiteVersion, &sAIStringFormatUtils,
	nil, 0, nil
};


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150BeautifulStrokes.h<|end_filename|>
#ifndef __AI150BeautifulStrokes__
#define __AI150BeautifulStrokes__

/*
*        Date:	Started 2009
*     Purpose:	Adobe Illustrator Beautiful Strokes suite. This suite lets
*				clients control effects that can be applied to strokes such as
*				art and pattern brushes, arrowheads, and dash adjustments.
*
* ADOBE SYSTEMS INCORPORATED
* Copyright 2009 Adobe Systems Incorporated.
* All rights reserved.
*
* NOTICE:  Adobe permits you to use, modify, and distribute this file
* in accordance with the terms of the Adobe license agreement
* accompanying it. If you have received this file from a source other
* than Adobe, then your use, modification, or distribution of it
* requires the prior written permission of Adobe.
*
*/

#include "AIBeautifulStrokes.h"
#include "AIHeaderBegin.h"

/*******************************************************************************
**
** Constants
**
**/

#define kAIBeautifulStrokesSuiteVersion1	AIAPI_VERSION(1)
#define kAI150BeautifulStrokesSuiteVersion	kAIBeautifulStrokesSuiteVersion1

/*******************************************************************************
**
**	Suite
**
**/

/**	@ingroup Suites
	This suite allows you to control advanced features for stroking paths. Setting are
	kept in a BeautifulStrokes params dictionary, which is contained in an \c #AILiveEffectsParameters
	dictionary, such as one returned by \c #AIPathStyle::GetCurrentPathStyle().  <br>
	One way to use this suite is to create a BeautifulStrokes params dictionary,
	add the stroke settings to the dictionary, then use that dictionary to apply
	the settings to source art. This generates new art in a destination group.
	For example:

	@code
	void Fn(AIArtHandle srcPath, AIArtHandle dstGroup)
	{
		AIDictionaryRef params = 0;
		sAIBeautifulStrokes->CreateParamsDict(NULL, params);
		sAIBeautifulStrokes->SetDashAdjustment(params, true);
		sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL);
		sAIDictionary->Release(params);
	}
	@endcode

	Counted object note: Suite functions that return counted object types such as
	\c #AIDictionarySuite::AIDictionaryRef and \c #AIArraySuite::AIArrayRef increment
	the reference count and the caller must release unneeded references to avoid memory
	leaks, as shown in the examples. Documentation for individual parameters mentions those
	that are reference counted and need to be released. See also \c #AICountedObjectSuite
	and the \c ai::Ref C++ class.

	The example above uses the \c #AIDictionarySuite::Release() directly.
	The following example uses the \c ai::Ref C++ class to manage the counted
	object. (Note that \c #AICountedObjectSuite::Release() is equivalent to
	\c #AIDictionarySuite::Release()):

	@code
	void Fn_Ref(AILiveEffectParameters effectParams)
	{
		ai::Ref<AIDictionaryRef> params;
		sAIBeautifulStrokes->CreateParamsDict(NULL, *(params << ai::Replace));
		sAIBeautifulStrokes->SetDashAdjustment(params, true);
		sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL);
	}
	@endcode

*/

struct AI150BeautifulStrokesSuite
{

	// General parameter management and stroke generation

	/**	Applies settings in a BeautifulStrokes parameters dictionary to the focal stroke on source art
		to generate new stroked art in the output group.

		@param effectParams		An effect parameters dictionary that contains a BeautifulStrokes params
								dictionary in which BeautifulStrokes settings are defined. This can also
								be a BeautifulStrokes params dictionary.
		@param inArt			The art (path) to which the parameters are to be applied.
		@param sourceArt		[optional] The non-styled art (path) possibly containing width anchors that can be
								used to adjust the width profile placement. (See \c #AIBeautifulStrokesSuite::GetPathAdjustedWidthDistances().)
								This parameter is ignored if inArt is not styled art (see \c #AIArtSuite::IsArtStyledArt()),
								since non-styled art will carry its own anchors. But art dictionaries are stripped
								from the input art to live effects. Thus, if \c inArt is the input art to a live effect
								execution for a stroke filter, and the art style being executed was attached to a path,
								then passing \c sourceArt as the non-styled path art object to which that art style was
								attached will allow access to the width anchors. (If there are no vector pre-effects
								before the stroke filter, then \c inArt will generally be a duplicate of \c sourceArt,
								but if there are vector pre-effects, then it may be substantially different.)
								Passing this parameter as null when inArt is styled art will cause any width profile
								in the effectParams to be applied without width anchor adjustment.
		@param outputOnTop		True to place the output art into the output group on top, false to place
								it inside the output group on the bottom.
		@param outGroup			The destination group for the generated output art.
		@param outArt			[optional] A pointer to an AIArtHandle in which to return the AIArtHandle for the generated output art.
	*/
	AIAPI AIErr (*GenerateArt)(ConstAILiveEffectParameters effectParams, AIArtHandle inArt, AIArtHandle sourceArt,
							   AIBoolean outputOnTop, AIArtHandle outGroup, AIArtHandle *outArt);

	/**	Creates a new BeautifulStrokes params dictionary. You must release the dictionary when no longer needed using
		\c #AIDictionarySuite::Release().

		@param effectParams		[optional] A set of LiveEffect parameters. If supplied, the new BeautifulStrokes
								params dictionary is added to this dictionary, or, if a BeautifulStrokes dictionary
								already exists, \c params is set to this existing dictionary.
		@param params			A reference to a new or the existing BeautifulStrokes params dictionary.
								The reference count on this dictionary is incremented on return and
								must be released when no longer needed.

	*/
	AIAPI AIErr (*CreateParamsDict)(AILiveEffectParameters effectParams, AIDictionaryRef &params);

	/**	Retrieves a BeautifulStrokes parameters dictionary from a set of LiveEffect parameters.

		@param effectParams		A set of LiveEffect parameters for an art object.
		@param params			A reference to the BeautifulStrokes params dictionary or
								NULL if one does not exist. The reference count on this
								dictionary is incremented on return and must be released
								when no longer needed.

		@return					No error is returned if the dictionary does not exist.
	*/
	AIAPI AIErr (*GetParamsDict)(ConstAILiveEffectParameters effectParams, AIDictionaryRef &params);

	/**	Reports whether two parameters dictionaries are equivalent.

		@param params1			The first dictionary.
		@param params2			The second dictionary.
		@return					True if equivalent.
	*/
	AIAPI AIBoolean (*Equiv)(ConstAIDictionaryRef params1, ConstAIDictionaryRef params2);

	/**	Accumulates common parameters in a dictionary to be used later with \c #ApplyParams().
		Call repeatedly with different parameter sets to collect the combined BeautifulStrokes
		attributes of multiple objects (or multiple art styles). You can use this to collect
		common attributes of objects that are not necessarily selected, or to ignore some of
		the selected objects, such as finding the combined BeautifulStrokes attributes of
		all the objects on a layer, whether they are selected or not.

		@param effectParams		A set of LiveEffect parameters containing a Beautiful Strokes params dictionary.
		@param accumulator		Common parameters being accumulated.
	*/
	AIAPI AIErr (*AccumulateParams)(ConstAILiveEffectParameters effectParams, AIDictionaryRef accumulator);

	/**	Applies a set of parameters from one dictionary to another.	For keys that exist in both dictionaries,
		the value from the source overwrites the value in the destination.

		@param params	The source dictionary containing a set of parameters to be applied.
						Typically obtained from \c #AIPathStyle::GetCurrentPathStyle(), from an art object or art style.
						If an accumulated dictionary is passed as the source, values that vary (were mixed in the selection)
						do not change value in the target dictionary. This is consistent with the behavior of
						\c #AIPathStyle::SetCurrentPathStyle(). See also \c #AccumulateParams().
		@param target	The target dictionary.
	*/
	AIAPI AIErr (*ApplyParams)(ConstAIDictionaryRef params, AIDictionaryRef target);

	/**	Reports whether a dictionary contains meaningful Beautiful Strokes parameters.
		(Note that this function returns a Boolean value, not an error code.)
		Call on an accumulator to check whether it contains any BeautifulStrokes parameters;
		if not, it can be freed or ignored.  See \c #AccumulateParams().
		Both a used accumulator and a new dictionary contain some bookkeeping entries, so you cannot just
		check for the dictionary being empty of all keys. A new dictionary just created by
		\c #CreateParamsDict() returns false to this call. <br>

		This does not recurse into sub-dictionaries. To test for nested dictionaries,
		call \c #GetParamsDict(), and if it is non-null check the contained dictionary.

		@param paramsDict	Dictionary to be examined.
		@return				True if the dictionary contains Beautiful Strokes parameters.
	*/
	AIAPI AIBoolean (*ContainsParams)(ConstAIDictionaryRef paramsDict);

	/**	Retrieves the BeautifulStrokes params dictionary, if any, associated with the focal stroke of an art object. Optionally
		retrieves the stroke style and other information about the stroke attributes.

		@param art			The art object.
		@param paramDict	[out] A reference in which to return the BeautifulStrokes params dictionary, or null if none.
							The reference count on this dictionary is incremented on return and must be released when
							no longer needed.
		@param strokeStyle	[out][optional] A buffer in which to return the focal stroke style from the paint attributes.
		@param hasBrush		[out][optional] A buffer in which to return true if the focal stroke carries a brush effect.
		@param scaleFactor	[out][optional] A buffer in which to return the combined scale factor that incorporates:
							the object scale factor reported by \c #AIArtStyleSuite::GetArtStyleScaleFactor(),
							the width of the art design on art brushes or the side tile on pattern brushes,
							and the scale factor from the brush options for brushes. <br>
							Multiplying these widths by this factor gives the width that the stroke edges
							preview at, assuming that any brush art fills the brush tile boundaries.<br>
							(Does not include the stroke weight or the width returned by \c #GetWidthAtDistance(), and so on.)
		@param canAccept	[out][optional] A buffer in which to return true if the art object has a style that can accept
							BeautifulStrokes parameters.
							(For CS5, it has a stroke, and the focal stroke is not a Calligraphic or Scatter brush, and is
							not inside/outside aligned.)
	*/
	AIAPI AIErr (*GetArtStrokeParams)(AIArtHandle art, AIDictionaryRef &paramDict,
									  AIStrokeStyle *strokeStyle, AIBoolean *hasBrush,
									  AIReal *scaleFactor, AIBoolean *canAccept);

	/**	Interpolates beautiful stroke parameters between two appearances.

		@param effectParams1	[optional] The effects parameters dictionary of a stroke filter,
								which may (or may not) contain a Beautiful Strokes params dictionary.
		@param effectParams2	[optional] The effects parameters dictionary of a stroke filter
								which may (or may not) contain a Beautiful Strokes params dictionary.
		@param effectParamsOut	The effects parameters dictionary of a stroke filter that represents the results
								of interpolating between effectParams1 and effectParams2.
		@param dist				A number in the range [0-1], where 0 is interpreted as matching effectParams1,
								and 1 is interpreted as matching effectParams2. (Negative values are interpreted
								as if they were 0, and values greater than 1 as if they were 1.)

		If either effectParams1 or effectParams2 contains a Beautiful Strokes parameter dictionary, then those parameters
		will be interpolated, and the results placed in effectParamsOut (which should not be null if either input parameter
		is null.)
	*/
	AIAPI AIErr (*InterpolateParams)(ConstAILiveEffectParameters effectParams1, ConstAILiveEffectParameters effectParams2,
									 AILiveEffectParameters effectParamsOut, AIReal dist);

	// General brush settings

	/**	Sets the option in a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation.

		@param params		The dictionary.
		@param flipAcross	True to set the option, false to clear it.
	*/
	AIAPI AIErr (*SetFlipAcross)(AIDictionaryRef params, AIBoolean flipAcross);

	/**	Retrieves the option from a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation.
		Note that this function returns a Boolean value, not an error code.

		@param params		The dictionary.
		@return				True if the option is set, false if it is clear.
	*/
	AIAPI AIBoolean (*GetFlipAcross)(ConstAIDictionaryRef params);

	/**	Sets the option in a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation.

		@param params		The dictionary.
		@param flipAlong	True to set the option, false to clear it.
	*/
	AIAPI AIErr (*SetFlipAlong)(AIDictionaryRef params, AIBoolean flipAlong);

	/**	Retrieves the option from a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation.
		Note that this function returns a Boolean value, not an error code.

		@param params		The dictionary.
		@return				True if the option is set, false if it is clear.
	*/
	AIAPI AIBoolean (*GetFlipAlong)(ConstAIDictionaryRef params);

	/**	Sets the scale (width) of art applied to path in a Beautiful Strokes dictionary.

		@param params	The dictionary.
		@param scale	Single scale for art not using tablet data.
		@param mnScale	[optional] Minimum scale for art using tablet data.
		@param mxScale	[optional] Maximum scale for art using tablet data.
	*/
	AIAPI AIErr (*SetScale)(AIDictionaryRef params, AIReal scale, const AIReal *mnScale, const AIReal *mxScale);

	/**	Retrieves the scale (width) of art applied to path from a Beautiful Strokes dictionary.

		@param params	The dictionary.
		@param scale	[out] A reference in which to return the single scale for art not using tablet data.
		@param mnScale	[optional] [out] A buffer in which to return the minimum scale for art using tablet data.
		@param mxScale	[optional] [out] A buffer in which to return the maximum scale for art using tablet data.
	*/
	AIAPI AIErr (*GetScale)(ConstAIDictionaryRef params, AIReal &scale, AIReal *mnScale, AIReal *mxScale);

	/**	Set fold adjustment on or off. This adjusts the brush folding across corners or bends.
	*/
	AIAPI AIErr (*SetFoldAdjustment)(AIDictionaryRef params, AIBoolean adjust);

	/**	Retrieves the fold adjustment status from a Beautiful Strokes dictionary.
		This adjusts the folding across corners or bends.
		Note that this function returns a Boolean value, not an error code.

		@param params	The dictionary.
		@param mixed	[optional] [out] A buffer in which to return true if the dictionary represents an accumulation
						returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed.
						By convention, mixed values return false.
		@return			True if the option is set, false if it is clear.
	*/
	AIAPI AIBoolean (*GetFoldAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed);

	// Art Brushes

	/**	Sets the pattern to be applied along path in a Beautiful Strokes dictionary.

		@param params	The dictionary.
		@param art		The brush pattern.
	*/
	AIAPI AIErr (*SetArtPaint)(AIDictionaryRef params, AIPatternHandle art);

	/**	Retrieves the pattern to be applied along path from a Beautiful Strokes dictionary.
		Note that this function returns an object, not an error code.

		@param params	The dictionary.
		@return			The brush pattern.
	*/
	AIAPI AIPatternHandle (*GetArtPaint)(ConstAIDictionaryRef params);

	/**	Sets the stretching option in a Beautiful Strokes dictionary.

		@param params	The dictionary.
		@param stretch	True to stretch tiles non-uniformly along the path, false to scale
						up uniformly for the path length.
	*/
	AIAPI AIErr (*SetStretch)(AIDictionaryRef params, AIBoolean stretch);

	/**	Retrieves the stretching option from a Beautiful Strokes dictionary.
		Note that this function returns a Boolean value, not an error code.

		@param params	The dictionary.
		@return			True if the option is set (stretch tiles non-uniformly along the path),
						false if it is clear (scale up uniformly for the path length).
	*/
	AIAPI AIBoolean (*GetStretch)(ConstAIDictionaryRef params);

	/**	Sets the lengths of non-stretching start and end segments for a segmented brush	in a Beautiful Strokes dictionary.
		Lengths are expressed as absolute values in document points. If both values are zero, the brush is a non-segmented brush.

		@param params				The dictionary.
		@param startSegmentLength	Length of start segment.
		@param endSegmentLength		Length of end segment.
	*/
	AIAPI AIErr (*SetStartEndSegmentLength)(AIDictionaryRef params, AIReal startSegmentLength, AIReal endSegmentLength);

	/**	Retrieves the lengths of non-stretching start and end segments for a segmented brush from a Beautiful Strokes dictionary.
		Lengths are expressed as absolute values in document points.

		@param params				The dictionary.
		@param startSegmentLength	[out] A reference in which to return the start-segment length.
		@param endSegmentLength		[out] A reference in which to return the end-segment length.
	*/
	AIAPI AIErr (*GetStartEndSegmentLength)(ConstAIDictionaryRef params, AIReal &startSegmentLength, AIReal &endSegmentLength);

	// Pattern Brushes

	/**	Sets options for repeating pattern tiles along a path in a Beautiful Strokes dictionary.

		@param params				The dictionary.
		@param	beginArt			Brush pattern tile art to be applied to the beginning of the path. May be NULL.
		@param	endArt				Brush pattern tile art to be applied to the end of the path. May be NULL.
		@param	sideArt				Brush pattern tile art to be applied to the main part of the path.  May be NULL.
		@param	insideCornerArt		Brush pattern tile art to be applied to inside corners of the path.  May be NULL.
		@param	outsideCornerArt	Brush pattern tile art to be applied to outside corners of the path.  May be NULL.
		@param	adjustment			Method to use to apply art along path; see \c #RepeatedArtAdjustment().
		@param	spacing				Relative spacing between tiles; for example, 0.5 sets spacing to half
									the width of the tile. Relevant only when adjustment method is \c #kAddSpace.
	*/
	AIAPI AIErr (*SetArtPatternPaint)(AIDictionaryRef params, AIPatternHandle beginArt, AIPatternHandle endArt,
									  AIPatternHandle sideArt,
									  AIPatternHandle insideCornerArt, AIPatternHandle outsideCornerArt,
									  RepeatedArtAdjustment adjustment, AIReal spacing);

	/**	Retrieves options for repeating pattern tiles along a path from a Beautiful Strokes dictionary.

		@param params			The dictionary.
		@param beginArt			[out] A reference in which to return the brush pattern tile art to be
								applied to the beginning of the path. May be NULL.
		@param endArt			[out] A reference in which to return the brush pattern tile art to be
								applied to the end of the path. May be NULL.
		@param sideArt			[out] A reference in which to return the brush pattern tile art to be
								applied to the main part of the path.  May be NULL.
		@param insideCornerArt	[out] A reference in which to return the brush pattern tile art
								to be applied to inside corners of the path.  May be NULL.
		@param outsideCornerArt	[out] A reference in which to return the brush pattern tile art
								to be applied to outside corners of the path.  May be NULL.
		@param adjustment		[out] A reference in which to return the method to use to apply art along path;
								see \c #RepeatedArtAdjustment().
		@param spacing			[out] A reference in which to return the relative spacing between tiles.
								For example, 0.5 sets spacing to half the width of the tile.
								Relevant only when adjustment method is \c #kAddSpace.
	*/
	AIAPI AIErr (*GetArtPatternPaint)(ConstAIDictionaryRef params, AIPatternHandle &beginArt, AIPatternHandle &endArt,
									  AIPatternHandle &sideArt,
									  AIPatternHandle &insideCornerArt, AIPatternHandle &outsideCornerArt,
									  RepeatedArtAdjustment &adjustment, AIReal &spacing);

	// Dashing

	/**	Sets or clears the dash adjustment option in a Beautiful Strokes dictionary.
		When on, adjusts dashes so a certain fraction of the dash length always appears
		at the ends, corners, and intersections of dashed lines.
		(Note that dash/gap intervals are obtained from the art.)

		@param params	The dictionary.
		@param adjust	True to set the option, false to clear it.
	*/
	AIAPI AIErr (*SetDashAdjustment)(AIDictionaryRef params, AIBoolean adjust);

	/**	Retrieves the dash adjustment status from a Beautiful Strokes dictionary.
		See \c #SetDashAdjustment().
		(Note that this function returns a Boolean value, not an error code.)

		@param params	The dictionary.
		@param mixed	[optional] [out] A buffer in which to return true if the dictionary represents an accumulation
						returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed.
						By convention, mixed values return false.
		@return			True if the option is set, false if it is clear.
	*/
	AIAPI AIBoolean (*GetDashAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed);

	// Arrowheads

	/**	Sets arrowhead-related stroke options in a Beautiful Strokes dictionary.
		The arrowhead symbols can be in a library rather than the current document. If so, they are retargeted to the
		document that the params dictionary is attached to, and placed in the "hidden symbols" of that document;
		that is, they do not appear in the Symbols panel. The symbols are parsed to determine the alignment
		parameters and the default scale.

		Any unpainted closed rectangle in the back of the symbol definition is ignored and stripped from
		the art that is used to determine the "tip" of the arrow and placed on the path. These unpainted
		rectangles are assumed to be only for the purpose of making the symbol thumbnails a uniform size.

		Arrowhead art inside the symbol is assumed to be positioned the way it would be when applied as an
		end arrow to a horizontal open path that started at the left and ended at the right.
		If applied as a start arrow, it is reflected horizontally before it is applied.

		If there is a stroked open straight line in the back of the symbol definition (either above or below
		the bounding rectangle if there is one), then the right endpoint of that line is used to specify the
		truncation point. If it additionally has an internal anchor point, the furthest right such anchor point
		is used to specify the attachment point, otherwise the attachment point is the same as the truncation point.

		The tip is treated as the point along the right edge of the bounding box (after removing the bounding tile,
		if any) which is at the same height as the positioning line. The stroke weight of the positioning line
		is used to determine the default scale of the arrowhead. For example, if the positioning stroke is 2 pts, then
		the arrowhead is scaled 50% when it is applied to a path with a 1 pt stroke, and scaled 150% when it
		is applied to a path with a 3 pt stroke. The begin-scale or end-scale factors are applied additionally.

		If there is no positioning line, the default is to use a 100% default scale; that is, to treat the symbol
		as if it were scaled appropriately for a 1 pt line, and to put both the attachment and truncation points
		in the center of the symbol.

		@param params			The dictionary.
		@param beginSymbol		A pointer to the symbol to apply as the arrowhead at the beginning of the path.
								To not change the existing settings, pass null. To remove the arrowhead,
								pass a pointer to null.
		@param endSymbol		The symbol to apply as the arrowhead at the end of the path, null if none
								To not change the existing settings, pass null. To remove the arrowhead,
								pass a pointer to null.
		@param beginScale		The factor by which to scale the begin arrow by, as a percentage relative
								to the default scale. To not change the existing settings, pass \c #kAIRealUnknown.
		@param endScale			The factor by which to scale the end arrow by, as a percentage relative
								to the default scale. To not change the existing settings, pass \c #kAIRealUnknown.
		@param alignment		The rule for positioning the arrows at the ends of the path.
								To not change the existing settings, pass \c #kUnknownArrowAlignment.
	*/
	AIAPI AIErr (*SetArrowheadOptions)(AIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol,
									   AIReal beginScale, AIReal endScale, ArrowTipAlignment alignment);

	/**	Retrieves arrowhead-related stroke options from a Beautiful Strokes dictionary.
		All pointer arguments are optional and may be null if those options are not being queried.

		@param params			The dictionary to be searched. May be an accumulation of multiple paths, if
								returned from \c #AIPathStyleSuite::GetCurrentPathStyle().
		@param beginSymbol		[out] A buffer in which to return the symbol used as the arrowhead at the beginning of the path, null if none.
		@param endSymbol		[out] A buffer in which to return the symbol used as the arrowhead at the end of the path, null if none.
		@param beginScale		[out] A buffer in which to return the factor to uniformly scale the begin arrow by, as a percentage relative to the default scale.
								Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values.
		@param endScale			[out] A buffer in which to return the factor to scale the end arrow by, as a percentage relative to the default scale
								Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values.
		@param alignment		[out] A buffer in which to return the rule for positioning the arrows at the ends of the path. Must be the same for both ends.
								Returns \c #kUnknownArrowAlignment if the params dict represents an accumulation
								and the selection is mixed (including if some paths have no arrowheads).
		@param mixedBeginArrows	[out] A buffer in which to return true if there are different choices for the begin-symbol in a mixed selection
								(including if some paths have no begin arrow and some do.)
		@param mixedEndArrows	[out] A buffer in which to return true if there are different choices for the end-symbol in a mixed selection
								(including if some paths have no begin arrow and some do.)
	*/
	AIAPI AIErr (*GetArrowheadOptions)(ConstAIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol,
									   AIReal *beginScale, AIReal *endScale, ArrowTipAlignment *alignment,
									   AIBoolean *mixedBeginArrows, AIBoolean *mixedEndArrows);

	// Variable Widths

	/**	Sets the source of stroke width in a Beautiful Strokes dictionary.

		@param params	The dictionary.
		@param source	Source of width information for stroke. If \c #kTabletData, set related values
						with \c #SetWidthTabletDataSource() and \c and #SetScale(), particularly minimum and maximum. <br>
						If \c #kUserProfile, call \c #SetCenteredWidthProfile() to set centered width values or
						\c #SetUncenteredWidthProfile() to set independent left and right width values.
	*/
	AIAPI AIErr (*SetWidthSource)(AIDictionaryRef params, StrokeWidthSource source);

	/**	Retrieves the source of stroke width from a Beautiful Strokes dictionary.
		(Note that this function returns a constant value, not an error code.)

		@param params	The dictionary.
		@return			The width source constant.
	*/
	AIAPI StrokeWidthSource (*GetWidthSource)(ConstAIDictionaryRef params);

	/**	Sets the type of tablet data to use for stroke width in the art passed to \c #GenerateArt(),
		in a Beautiful Strokes dictionary.

		@param params	The dictionary.
		@param dataType	The type of tablet data.
						@see \c #AITabletDataType
	*/
	AIAPI AIErr (*SetWidthTabletDataSource)(AIDictionaryRef params, AITabletDataType dataType);

	/**	Retrieves the tablet-data type option from a Beautiful Strokes dictionary.

		@param params	The dictionary.
		@param dataType	The type of tablet data to use for stroke width in the art passed to \c #GenerateArt().
						@see \c #AITabletDataType
	*/
	AIAPI AIErr (*GetWidthTabletDataSource)(ConstAIDictionaryRef params, AITabletDataType &dataType);

	/**	Sets centered width profile for output art in a Beautiful Strokes dictionary. Pass NULL for both arrays to clear the profile.
		A style cannot carry both an uncentered and centered width profile, so if there is an existing
		centered width profile, this function removes it.

		Other than length, the array values are not examined for validity at the time they are set.
		Instead, they are examined when used, and any invalid entries are ignored.
		A width profile in which all the array entries are used to form the stroke contour
		has the following properties:
			<ul><li>The first distance is 0 </li>
			<li>The last distance is 1</li>
			<li>Every distance value should be no less than the previous distance, and no more than the next one</li>
			<li>There should be no more than two consecutive distance values at the same distance </li></ul>
		When interpreting the width profile:
			<ul><li>If the first distance value is not zero, the function acts as if there was an additional value
			at the beginning of both arrays, with the distance being zero and the width being whatever
			the width is in the first entry in the widths array. </li>
			<li>If any distance value is more than 1, or less than the preceding distance value, or equal
			to both the preceding distance value and the following distance value, the function ignores
			the array entries at that index</li>
			<li>If the last distance value is not 1, the function acts as if there were an additional pair of
			entries with the distance equal to 1, and the width equal to the width at the last valid
			distance entry </li>
		    <li>Negative values are interpreted as if they were 0. Values greater than 1 are allowed, but cause
		    the stroke to be wider at those places than the width shown in the Stroke panel, so should be avoided.

			Note that this differs from the interpretation of widths in the functions such	as \c #SetCenteredWidthAtDistance()
			that take a path object and query or modify the width at specific offsets; these incorporate the stroke weight scaling.
			This is because the functions that manage entire width arrays may be dealing with profiles that are shared across multiple
			paths of different weights or belong to unattached preset dictionaries.</li> </ul>

		@param params	The dictionary.
		@param tVals	An array of \c AIReal values ranging from [0-1] representing fractional distances
						along the path.
		@param widths	An array of \c AIReal values the same size as \c tVals representing the fractional stroke width
						at the corresponding offset in the \c tVals array. Values are fractions of the stroke weight
						as shown in the Stroke panel, in the range [0-1].
		@return The error \c #kBadParameterErr if the arrays are of different lengths, or if one is null and the other is not.
	*/
	AIAPI AIErr (*SetCenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef widths);

	/**	Retrieves the centered width profile for output art from a Beautiful Strokes dictionary.

		@param params		The dictionary.
		@param distances	A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances
							along the path.
		@param widths		A reference in which to return an array of \c AIReal values the same size as \c tVals representing the fractional stroke width
							at the corresponding offset in the \c tVals array.
	*/
	AIAPI AIErr (*GetCenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &distances, AIArrayRef &widths);

	/**	Sets an uncentered width profile for output art in a Beautiful Strokes dictionary, with independent
		left and right width values. Left and right are interpreted by following the path
		from the start point to the end point.
		A path cannot carry both an uncentered and centered width profile, so if there is an existing
		centered width profile, this function removes it.

		@param params		The dictionary.
		@param tVals		An array of \c AIReal values ranging from [0-1] representing fractional distances
							along the path.
		@param leftWidths	An array of \c AIReal the same size as \c tVals representing the width of the left side
							of the stroke at corresponding distances in \c tVals.
		@param rightWidths	An array of \c AIReal the same size as \c tVals representing the width of the right side
							of the stroke at corresponding distances in \c tVals.
	*/
	AIAPI AIErr (*SetUncenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef leftWidths, AIArrayRef rightWidths);

	/**	Retrieves the uncentered width profile for output art from a Beautiful Strokes dictionary.

		@param params		The dictionary.
		@param tVals		A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances
							along the path.
							The reference count on this array is incremented on return and must be released when no longer needed.
		@param leftWidths	A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the left side
							of the stroke at corresponding distances in \c tVals.
							The reference count on this array is incremented on return and must be released when no longer needed.
		@param rightWidths	A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the right side
							of the stroke at corresponding distances in \c tVals.
							The reference count on this array is incremented on return and must be released when no longer needed.
	*/
	AIAPI AIErr (*GetUncenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &tVals, AIArrayRef &leftWidths, AIArrayRef &rightWidths);

	/**	INTENDED FOR FUTURE ENHANCEMENTS - All non-default options are currently ignored.
		Can only be called after setting the width profile with \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile().
		If not present (the usual case), all width markers use default options, which are dependent upon the context. All arrays can be null.
		The defaults are for markers that are concurrent with corner anchor points of the path to be treated as
		tethered corner width markers, and for all other markers to be untethered smooth markers, with the
		default smoothness values.

		To save space, there is a single array of marker options for both centered and uncentered width profiles,
		with different flag values to distinguish when the options are different for the left and right sides
		of the stroke (for example, if it is smooth on the left side but cornered on the right.)
		If an incoming smoothness array exists but the outgoing smoothness array does not exist on that side
		of the path, then the outgoing smoothness is inherited from the incoming smoothness.
		Similarly, if the left smoothness array(s) exist but the right smoothness arrays do not, then
		the right smoothness is inherited from the left smoothness.

		You must only call this function AFTER either \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile();
		it returns /c #kBadParameterErr if any of the arrays are non-null and either there is no width profile,
		or the existing width profile has a different number of markers than the size of the detail arrays.
		No validation is done on the contents of the arrays, other than their lengths.

		@param params					The dictionary.
		@param markerOptions			An array of integers parallel to the t values, interpreted as a bit vector
										of WidthMarkerFlagValues
		@param incomingLeftSmoothness	An array of \c AIReal numbers ranging from [0-1] parallel to the t values,
										ranging from minimally smooth at 0 to maximally smooth at 1.
		@param outgoingLeftSmoothness	An array of \c AIReal numbers ranging from [0-1] parallel to the t values,
										ranging from minimally smooth at 0 to maximally smooth at 1.
		@param incomingRightSmoothness	An array of \c AIReal numbers ranging from [0-1] parallel to the t values,
										ranging from minimally smooth at 0 to maximally smooth at 1.
		@param outgoingRightSmoothness	An array of \c AIReal numbers ranging from [0-1] parallel to the t values,
										ranging from minimally smooth at 0 to maximally smooth at 1.
		@return							The error \c #kBadParameterErr if any of the arrays are non-null
										and either there is no width profile, or the existing width profile
										has a different number of markers than the size of the detail arrays.
	*/
	AIAPI AIErr (*SetWidthProfileDetails)(AIDictionaryRef params, AIArrayRef markerOptions,
										  AIArrayRef incomingLeftSmoothness, AIArrayRef outgoingLeftSmoothness,
										  AIArrayRef incomingRightSmoothness, AIArrayRef outgoingRightSmoothness);

	/**	Retrieves the options for the width profile markers from a Beautiful Strokes dictionary.

		@param params					The dictionary.
		@param markerOptions			A reference in which to return an array of integers parallel to the t values, interpreted as a bit vector of \c #WidthMarkerFlagValues.
										The reference count on this array is incremented on return and must be released when no longer needed.
		@param incomingLeftSmoothness	A reference in which to return an array of \c AIReal numbers parallel to the t values.
										The reference count on this array is incremented on return and must be released when no longer needed.
		@param outgoingLeftSmoothness	A reference in which to return an array of \c AIReal numbers parallel to the t values.
										The reference count on this array is incremented on return and must be released when no longer needed.
		@param incomingRightSmoothness	A reference in which to return an array of \c AIReal numbers parallel to the t values.
										The reference count on this array is incremented on return and must be released when no longer needed.
		@param outgoingRightSmoothness	A reference in which to return an array of \c AIReal numbers parallel to the t values.
										The reference count on this array is incremented on return and must be released when no longer needed.
	*/
	AIAPI AIErr (*GetWidthProfileDetails)(ConstAIDictionaryRef params, AIArrayRef &markerOptions,
										  AIArrayRef &incomingLeftSmoothness, AIArrayRef &outgoingLeftSmoothness,
										  AIArrayRef &incomingRightSmoothness, AIArrayRef &outgoingRightSmoothness);

	/**	If a path has variable widths (either centered or uncentered), retrieves a vector of the values
		from the distance array, after adjustment to shift any anchored width points to the relative
		distance along that path of the path positions they are anchored to.
		<ul><li>If the path has no variable widths, the returned vector is empty.</li>
		<li>If the path has variable widths but no width profile anchors, the returned vector contains
		the same distance values that are in the distance array returned
		by \c #GetCenteredWidthProfile() or \c #GetUncenteredWidthProfile().</li></ul>

		@param path					The path.
		@param adjustedDistances	A reference in which to return the result vector. The reference
									count on this array is incremented on return and must be released
									when no longer needed.
	*/
	AIAPI AIErr (*GetPathAdjustedWidthDistances)(AIArtHandle path, AIArrayRef &adjustedDistances);

	/**	Retrieves the left, right, and combined widths of the focal stroke at a fraction of the distance along a path,
		and reports the source of the widths.
		The widths are analogous to the stroke weights as returned by the \c #AIArtStyle::GetPaintAttributes().
		As such, they include the stroke weight scaling, but do not include the impact of pattern or art brush
		scale options or pattern or art brush tile sizes.

		@param path				[in] The path to be examined for width data.
		@param lengthFraction	[in/out] Upon input, the fraction of the path length at which the width is being queried.
								Upon output, if the width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, the
								possibly snapped position of that mark. To find whether snapping has occurred,
								cache the original length fraction and compare it to the returned value.
		@param tolerance		[in] If positive and the path has a user-specified variable width profile,
								and the input length fraction is within this tolerance of one of the t values in the
								width array, then the length fraction is snapped to that t value. If zero
								or negative, a tolerance of .001 is used.
		@param totalWidth		[out][optional] A buffer in which to return the total width at the given position,
								as obtained from the width source.
		@param leftWidth		[out][optional] A buffer in which to return the stroke width on the left side of the path
								at the given position, as obtained from the width source.
		@param rightWidth		[out][optional] A buffer in which to return the stroke width on the right side of the path
								at the given position, as obtained from the width source.
		@param widthSource		[out][optional] A buffer in which to return the width-source constant. It will be one of kConstantWidth, kTabletData,
								kCenteredProfileMark, kUncenteredProfileMark, kCenteredProfileInterpolation, kUncenteredProfileInterpolation.
		@param markerIndex		[out][optional] A buffer in which to return the marker index. If width source is from a centered
								or uncentered profile, the index into the parallel t and width arrays of the marker.
								For \c #kCenteredProfileMark and \c #kUncenteredProfileMark,
								it is the index of the marker at that location; for \c #kCenteredProfileInterpolation and
								\c #kUncenteredProfileInterpolation, it is the index of the preceding marker.
		@param markerDetails	[in/out][optional] On input, the only meaningful flag values are \c #kIncomingWidthMarker and
								\c #kOutgoingWidthMarker. These specify which of the two markers should be returned in
								the event that there are two markers at exactly the input length fraction. (If snapping
								occurs, then the flags are ignored; the incoming marker is returned when
								it snaps upward, and the outgoing when it snaps downward.) If null
								or if neither or both of those flags are on, and there are two markers
								at exactly the input length fraction, then the larger of the two is returned.
								On output, if  width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, can
								contain one of \c #kIncomingWidthMarker or \c #kOutgoingWidthMarker, and/or \c #kCornerWidthMarker.
	*/
	AIAPI AIErr (*GetWidthsAtDistance)(AIArtHandle path, AIReal &lengthFraction, AIReal tolerance,
									   AIReal *totalWidth, AIReal *leftWidth, AIReal *rightWidth,
									   StrokeWidthSource *widthSource, short *markerIndex, WidthMarkerFlags *markerDetails);

	/**	Sets the total width of the focal stroke at a given fraction of the distance along the path. (If lengthFraction is within
		0.001 of an existing t value in the width profile, modifies the existing width at that t value rather than
		inserting a new one.)
		<ul><li>If there is already a centered width profile, inserts the indicated value into it.</li>
		<li>If there is already an uncentered profile, this is equivalent to setting the left and right widths to half the input width.</li>
		<li>If there is not yet any user specified width profile, creates a centered width profile from the current stroke source
		and then modifies it and sets the stroke-width source to \c #kUserProfile. </li></ul>

		@param path				The path.
		@param lengthFraction	A fraction of the distance along the path	at which to set the width.  If within 0.001 of an existing t value
								in the width profile, modifies the existing width at that t value rather than inserting a new one.
		@param width			The new width.
		@param options			A logical OR of bit flags that determine how to perform the operation.
	*/
	AIAPI AIErr (*SetCenteredWidthAtDistance)(AIArtHandle path, AIReal lengthFraction, AIReal width, WidthMarkerFlags options);

	/**	Sets the left and right widths of the focal stroke at a given fraction of the distance along the given path. (If lengthFraction
		is within 0.001 of an existing t value in the width profile, modifies the existing width at that t value
		rather than inserting a new one.)
		<ul><li>If there is already an uncentered width profile, it inserts the indicated values into it.</li>
		<li>If left and right widths are equal and there is already a centered width profile, inserts their sum into it.</li>
		<li>If left and right widths are unequal and there is not yet an uncentered width profile, or if they are equal
		and there is not yet any width profile, it creates one from the current stroke source and then modifies it
		and sets the stroke-width source to \c #kUserProfile. </li></ul>

		@param path				The path.
		@param lengthFraction	A fraction of the distance along the path	at which to set the width.  If within 0.001 of an existing t value
								in the width profile, modifies the existing width at that t value rather than inserting a new one.
		@param leftWidth		The new left width.
		@param rightWidth		The new right width.
		@param options			A logical OR of bit flags that determine how to perform the operation.
	*/
	AIAPI AIErr (*SetUncenteredWidthsAtDistance)(AIArtHandle path, AIReal lengthFraction,
												 AIReal leftWidth, AIReal rightWidth, WidthMarkerFlags options);

	/**	Moves the width marker at the given index to a new t value. If the given marker is incoming-only or
		outgoing-only due to two markers being at the same t value, both are moved together.
		Only the content of the tValue array changes, so this works for either centered or non-centered widths.

			@param path			The path.
			@param markerIndex	The 0-based index position of the marker to move.
			@param newTValue	[in, out] Fraction of length along whole path to which the marker should be moved.
								In the range [0-1].
			@param options		A logical OR of bit flags that determine how to perform the operation:
				<ul> <li> If \c #kCopyMarker is on, the marker is duplicated and the new copy moved, while the old
				one remains at the prior location. There must always be a marker at 0 and one at 1,
				so any movement of the first or last marker is implicitly a duplication even if this flag is off. </li>
				<li>If \c #kSpreadWidthChanges is on, the other markers on the side that this marker is moving
				away from are spread out proportionally to cover the larger distance, and the other markers
				on the side that this marker is moving towards are compressed proportionally to fit in the
				smaller distance. The scope of the spreading is limited by the selection state and corner
				status of the adjacent anchor points.</li>
				<li>If \c #kSpreadWidthChanges is off and \c #kLimitAtNeighbors is on, and there is another width marker
				between the current t value at the given index and the new t value, then the marker stops
				when it hits the adjacent marker. No error code is returned in this case, but \c newTValue
				is updated to the actual destination. To determine whether it stopped, cache the original
				value and compare with the returned value.
				(Note that this causes the two markers at the same location to become an incoming-only
				outgoing only pair where the width may jump discontinuously.)</li>
				<li>If \c #kSpreadWidthChanges and \c #kLimitAtNeighbors are both off, then the moved marker is allowed
				to jump past other markers as if they were not there.</li>
				</ul>
			@return				The error \c #kBadParameterErr if the path does not have a user width profile or
				if the new t value is not in the range [0-1].
	*/
	AIAPI AIErr (*SlideWidthMarkerToNewT)(AIArtHandle path, short markerIndex, AIReal &newTValue, WidthMarkerFlags options);

	/**	Deletes the width point at the given index position from the given path. The first and last width points cannot be deleted.

			@param path			The path.
			@param markerIndex	The index position of the point to delete.
	*/
	AIAPI AIErr (*DeleteWidthPoint)(AIArtHandle path, short markerIndex);

	/**	Adds, removes, or reindexes width profile anchors as needed before editing a path.
		An editing tool or command calls this before modifying the geometry of a path
		or applying a different art style.

		Modifies anchors at a subset of the same places that cause \c #kSelectorAINotifyEdits
		to be sent to plug-in groups ancestral to the edited path. It is not necessary to send this message
		if the path is being transformed in its entirety in a way that does not change the relative lengths
		of path segments.

		If width anchors already exist at the relevant anchor points, and the numbers of anchor points are
		not changing, does nothing.

		@param path				The path to be edited.
		@param editDescription	The type of edit to be done.
	*/
	AIAPI AIErr (*AdjustWidthAnchorsBeforePathEdit)(AIArtHandle path, const PathEditDescription &editDescription);

	/**	Tests whether a cursor point on a path is within a given tolerance of the region covered by the stroke, and if
		so, reports additional details about what part of the stroke was hit; see  \c #StrokeHitResults.
		For brush strokes, the entire region within the brush design's tile box is considered to be stroked.

		@param path			The path.
		@param cursor		The cursor point.
		@param tolerance	The tolerance value.
		@param hitResults	A buffer in which to return the result.
	*/
	AIAPI AIErr (*StrokeHitTest)(AIArtHandle path, const AIRealPoint &cursor, AIReal tolerance, StrokeHitResults *hitResults);

};

#include "AIHeaderEnd.h"
#endif


<|start_filename|>gulpfile.js<|end_filename|>
var gulp = require("gulp");
var gulpUtil = require("gulp-util");
var through = require("through2");
var source = require('vinyl-source-stream');
var buffer = require("vinyl-buffer");
var browserify = require("browserify");
var tsify = require("tsify");
var shell = require("gulp-shell");
var del = require("del");

gulp.task("build-jsx", function() {
    var b = browserify("jsx/ts/index.ts").plugin(tsify);
    
    return b.bundle()
        .pipe(source("hostscript.jsx"))
        .pipe(buffer())
        .pipe(through.obj(function(file, encoding, callback) {
            if (file.isNull()) {
                this.push(null);
                callback();
                return;
            }

            if (file.isStream()) {
                this.emit("error", new gulpUtil.PluginError("my-modifier", "Streams are not supported!"));
                callback();
                return;
            }

            if (file.isBuffer()) {
                var contents = file.contents.toString("utf-8");
                
                // Assign the self-executing function that Browserify creates
                // to a 'loader' variable so that it can be accessed from
                // the CEP extension. For example, loader(7) gives you access to all
                // the functions that index.ts exports.
                contents = "var loader = " + contents;
                
                // Append some debugging helpers
                contents += "\n\n//loader(7).checkSelectionForRelayout();"
                contents += "\n//loader(7).relayoutSelection();"
                contents += "\n//loader(7).updateSelectedBlokContainer({ flexDirection: 0, justifyContent: 0, alignItems: 0, flexWrap: 0 });"
                contents += "\n//loader(7).createBlokContainerFromSelection({ flexDirection: 0, justifyContent: 0, alignItems: 0, flexWrap: 0 });"
                contents += "\n//loader(7).updateSelectedBlok({ flex: undefined, alignSelf: 0 });"
                
                file.contents = new Buffer(contents);
            }
            
            this.push(file);
            callback();
        }))
        .pipe(gulp.dest("jsx/"));
});

// ZXP building

var pwd = undefined;

try {
    var creds = require("./zxp-tools/certificate-creds.json");
    pwd = creds.password;
}
catch (e) {
    /*if (e.code === "MODULE_NOT_FOUND") {
        throw new Error("./zxp-tools/certificate-creds.json doesn't exist! Please create it. Ex: { password: '<PASSWORD>' }");
    }
    else {
        throw e;
    }*/
}

gulp.task("zxp-html-extension-copy-css", function() {
   return gulp.src(["css/**/*.css"])
       .pipe(gulp.dest("release/com.westonthayer.bloks/css/"));
});

gulp.task("zxp-html-extension-copy-manifest", function() {
   return gulp.src(["CSXS/manifest.xml"])
       .pipe(gulp.dest("release/com.westonthayer.bloks/CSXS/"));
});

gulp.task("zxp-html-extension-copy-icons", function() {
   return gulp.src(["icons/*.png"])
       .pipe(gulp.dest("release/com.westonthayer.bloks/icons/"));
});

gulp.task("zxp-html-extension-copy-js", function() {
   return gulp.src(["js/**/*.js"])
       .pipe(gulp.dest("release/com.westonthayer.bloks/js/"));
});

gulp.task("zxp-html-extension-copy-jsx", function() {
   return gulp.src(["jsx/hostscript.jsx"])
       .pipe(gulp.dest("release/com.westonthayer.bloks/jsx/"));
});

gulp.task("zxp-html-extension-copy-html", function() {
   return gulp.src(["index.html"])
       .pipe(gulp.dest("release/com.westonthayer.bloks/"));
});

gulp.task("zxp-html-extension-sign", [
    "zxp-html-extension-copy-css",
    "zxp-html-extension-copy-manifest",
    "zxp-html-extension-copy-icons",
    "zxp-html-extension-copy-js",
    "zxp-html-extension-copy-jsx",
    "zxp-html-extension-copy-html"
    ],
    shell.task("zxp-tools\\ZXPSignCmd.exe -sign release\\com.westonthayer.bloks release\\com.westonthayer.bloks.zxp zxp-tools\\selfWT.p12 " + pwd + " -tsa https://timestamp.geotrust.com/tsa")
);

gulp.task("zxp-html-extension", ["zxp-html-extension-sign"], function() {
    return del(["release/com.westonthayer.bloks"]);
});

gulp.task("zxp-plugin-mac", function() {
    return gulp.src(["BloksAIPlugin/Mac/release/**/*"])
        .pipe(gulp.dest("release/MAC/"));
});

gulp.task("zxp-plugin-win-64", function() {
    return gulp.src(["BloksAIPlugin/x64/Release/BloksAIPlugin.aip"])
        .pipe(gulp.dest("release/WIN_64/"));
});

gulp.task("zxp-plugin-win-32", function() {
    return gulp.src(["BloksAIPlugin/Release/BloksAIPlugin.aip"])
        .pipe(gulp.dest("release/WIN_32/"));
});

gulp.task("zxp-samples", function() {
    return gulp.src("sample-files/*.ai")
        .pipe(gulp.dest("release/samples/"));
});

gulp.task("zxp",
    [
        "zxp-html-extension",
        "zxp-plugin-mac",
        "zxp-plugin-win-64",
        "zxp-plugin-win-32",
        "zxp-samples"
    ]
);

<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MatchingArt.h<|end_filename|>
#ifndef __AI100MatchingArt__
#define __AI100MatchingArt__

/*
 *        Name:	AIMatchingArt.h
 *   $Revision: 4 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator 10.0 Matching Art Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIMatchingArt.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI100MatchingArtSuite		kAIMatchingArtSuite
#define kAIMatchingArtSuiteVersion4	AIAPI_VERSION(4)
#define kAI100MatchingArtVersion	kAIMatchingArtSuiteVersion4


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct AI100MatchingArtSuite {

	/* Get the art matching the given criteria and on the current layer list. */
	AIAPI AIErr (*GetSelectedArt) ( AIArtHandle ***matches, long *numMatches );
	AIAPI AIErr (*GetMatchingArt) ( AIMatchingArtSpec *specs, short numSpecs,
			AIArtHandle ***matches, long *numMatches );

	// new to Illustrator 9.0
	/* Get the art matching the given criteria and on the given layer list. */
	AIAPI AIErr (*GetSelectedArtFromLayerList) ( AILayerList list, AIArtHandle ***matches,
			long *numMatches );
	AIAPI AIErr (*GetMatchingArtFromLayerList) ( AILayerList list, AIMatchingArtSpec *specs,
			short numSpecs, AIArtHandle ***matches, long *numMatches );

	// new to Illustrator 10.0
	/* Get the art used to determine the current path style, displayed in the color
	   palette. This is a convenience function, since the current path style is now
	   determined not just by the targeted or selected objects, but rather by a combination
	   of both. The art returned may include text runs as well as objects inside of
	   graphs. */
	AIAPI AIErr (*GetArtForCurrentPathStyle) ( AIArtHandle ***matches, long *numMatches );

	// This function can be used to avoid some setup if there is nothing selected
	AIAPI AIBoolean (*IsSomeArtSelected) ( void );
		/* Returns simply whether or not there are some art objects selected, in art editing mode.
			(If you want to know whether there is a text editing selection, call HasTextSelection
			in the AIText suite. IsArtSelected will return false when there is a text editing
			selection and when there is nothing selected at all.
		*/

	// Test searchArt and its descendants if it is a group or other container against the specs.
	// If the kMatchDictionaryArt flag is set, will also search the dictionaries of searchArt
	// and any of its descendants. This is useful for when only certain parts of the artwork
	// are of interest, or when the searchArt is not in the regular artwork, e.g., if it is the
	// definition art of a pattern, brush, or symbol.
	AIAPI AIErr (*GetMatchingArtFromArt) ( AIArtHandle searchArt, AIMatchingArtSpec *specs,
			short numSpecs, AIArtHandle ***matches, long *numMatches );

} AI100MatchingArtSuite;


#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Folders.h<|end_filename|>
#ifndef __AI100Folders__
#define __AI100Folders__

/*
 *        Name:	AI100Folders.h
 *     Purpose:	Adobe Illustrator 10.0 Folders Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIFolders.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAI100FoldersSuite				kAIFoldersSuite
#define kAIFoldersSuiteVersion1			AIAPI_VERSION(1)
#define kAI100FoldersSuiteVersion		kAIFoldersSuiteVersion1


 /*******************************************************************************
 **
 **	Suite
 **
 **/


typedef struct {

	// - version 1 api - 
	AIAPI AIErr (*GetFolderName)(AIFolderType type, char *name); // kMaxPathLength size buffer assumed, folder name only (not path).

} AI100FoldersSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PlanarObject.h<|end_filename|>
#ifndef __AI120PlanarObject__
#define __AI120PlanarObject__

/*
 *        Name:	AI120PlanarObject.h
 *     Purpose:	Adobe Illustrator 12.0 Planar Object Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIPlanarObject.h"

#include "AIHeaderBegin.h"

/** @file AI120PlanarObject.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI120PlanarObjectSuite					kAIPlanarObjectSuite
#define kAIPlanarObjectSuiteVersion1			AIAPI_VERSION(1)
#define kAI120PlanarObjectSuiteVersion			kAIPlanarObjectSuiteVersion1

/*******************************************************************************
 **
 **	Suite
 **
 **/


/** APIs for creating, populating and querying attributes of a Planar Object plugin group. */
typedef struct {

	AIAPI AIPlanarObjectHandle (*NewPlanarObject) ( const AIRealMatrix* matrix, const AIGapOptions* gapOptions );

	AIAPI AIErr (*AddPath) (
			AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments,
			AIArtStyleHandle *leftFill, AIArtStyleHandle *rightFill, AIArtStyleHandle *stroke,
			AIBoolean closed );

	AIAPI AIErr (*AddPathUniform) (
			AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments,
			AIArtStyleHandle leftFill, AIArtStyleHandle rightFill, AIArtStyleHandle stroke,
			AIBoolean closed );

	AIAPI AIErr (*Abandon) ( AIPlanarObjectHandle object );

	AIAPI AIErr (*CreateArt) ( AIPlanarObjectHandle object, short paintOrder, AIArtHandle prep, AIArtHandle *newArt );

	AIAPI AIBoolean (*IsPlanarArtObject) ( AIArtHandle art );

	AIAPI AIErr (*ComplexConversionCanceled) ( AIBoolean fromPlanarMap, ASInt32 pathOrEdgeCount,
											const AIGapOptions* gapOptions, AIBoolean *warningDisplayed /*output*/ );

} AI120PlanarObjectSuite;


#include "AIHeaderEnd.h"


#endif	// __AI120PlanarObject__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Folders.h<|end_filename|>
#ifndef __AI110Folders__
#define __AI110Folders__

/*
 *        Name:	AI110Folders.h
 *   $Revision: 1 $
 *      Author:	 dmaclach
 *        Date:	   
 *     Purpose:	Adobe Illustrator 11.0 Folders Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIFolders.h"

#include "AIHeaderBegin.h"

/** @file AI110Folders.h */

/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAIFoldersSuiteVersion2			AIAPI_VERSION(2)
#define kAI110FoldersSuiteVersion		kAIFoldersSuiteVersion2
#define kAI110FoldersVersion			kAI110FoldersSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/


/**
	The AIFoldersSuite provides APIs that return the locations of the standard
	folders used by Illustrator. The diagram below shows the layout of these folders
	and the corresponding identifiers.

@verbatim

  Local Hierarchy:
  
  	Adobe Illustrator X:						<- kAIRootFolderType
  		Adobe Illustrator X:					<- kAIPackageFolderType
  			Contents:							<- kAIContentsFolderType
  				Windows/MacOSClassic:			<- kAIApplicationFolderType
  					+The Executable
  					+Shared Libraries
  			Help:								<- kAIHelpFolderType
  				+HTML Help Files
  				images:							<- kAIHelpImagesFolderType
  					+Help Graphics
  			Helpers:							<- kAIHelpersFolderType
  				Preview In:						<- kAIPreviewInFolderType
  			Required:							<- kAIRequiredPluginsFolderType
  				+Required Plugins
  				Fonts:							<- kAIRequiredFontsFolderType
  					+Required Fonts
  		Legal:									<- kAILegalFolderType
  			+EULA
  		Plug-ins:								<- kAIPluginsFolderType - Can be changed By User   kAIStartupFileFolderType/kAIRidersFileFolderType both point here as well currently. This may change in the future.
  			Extensions:
  			Illustrator Filters:
  			Illustrator Formats - Other:
  			Illustrator Formats - Standard:
  			Photoshop Effects:					
  			Photoshop Filters:					
  			Photoshop Formats:					
  			Text Filters:						<- kAIHyphenationDictFolderType
  			Dictionaries:						<- kAIDictionariesFolderType/kAIHyphenationDictFolderType/kAISpellingDictFolderType (all three of these currently point at the same folder. This may change in the future. Please choose the one that is most appropriate for your usage.)
  			Tools:								
  			Tsume:								<- kAITsumeFolderType
  		Presets:								<- kAIPresetsFolderType
  			Actions:							<- kAIPresetActionsFolderType
  			Brushes:							<- kAIPresetBrushesFolderType
			Color Books:						<- kAIPresetColorBooksFolderType
  			Gradients:							<- kAIPresetGradientsFolderType
  			Keyboard Shortcuts:					<- kAIPresetKeyboardShortcutsFolderType
  			Patterns:							<- kAIPresetPatternsFolderType
  			Save for Web Settings:				<- kAISettingsFolderType
  				Color Tables:					<- kAIColorTableSettingsFolderType
  					+Color tables
  				Optimize:						<- kAIOptimizeSettingsFolderType
  					+Optimize Settings
  			Scripts:							<- kAIPresetScriptsFolderType
  			Styles:								<- kAIPresetStylesFolderType
  			Swatches:							<- kAIPresetSwatchesFolderType
  				Color Systems:					<- kAIPresetColorSystemsFolderType
  			Symbols:							<- kAIPresetSymbolsFolderType
  			Templates:							<- kAIPresetTemplatesFolderType
  				Blank Documents:				<- kAIPresetBlankDocumentsFolderType
  		Fonts:									<- kAIFontsFolderType
	  		Composite Fonts 					<- kAIFontsCFFolderType
				Temp							<- kAIFontsCFTempFolderType
  			CMaps:								<- kAIFontsCMapsFolderType
  		Sample Files:							<- kAISampleFilesFolderType
  			Graph Designs:						<- kAISampleGraphDesignsFolderType
  			Sample Art:							<- kAISampleArtFolderType
  				SVG:							<- kAISampleSVGFolderType
  				Data-Driven Graphics:			<- kAIDataDrivenGraphicsFolderType
  		Utilities:								<- kAIUtilitiesFolderType
  		
  
  
  System Hierarchies:
  		
  	The diagram below tries to describe the parts of the directory hierarchy of
  	Illustrator 10 that are located under system folders. The locations of such
  	directories are necessarily dependent on the OS. In the diagram a name
  	enclosed in square brackets [...] indicates a system dependent directory.
  	The values for these directories for each system are defined following the
  	diagram.
  
  	[PrimaryScratch]							<- kAIPrimaryScratchFolderType
  		+ primary scratch file location
  	[SecondaryScratch] 							<- kAISecondaryScratchFolderType
  		+ secondary scratch file location
  	[AIPreferences]								<- kAIPreferencesFolderType
  		+ preferences file location
  		+ plugin cache file location
  	[UserSupport]								<- kAIUserSupportFolderType
  		Adobe Illustrator X						<- kAIUserSupportAIFolderType
  			plugins	 							<- kAIUserSupportAIPluginsFolderType
  				+ plugins that are usable by the user who is logged in
  		Fonts									<- kAIUserSupportCommonFontsFolderType
  	[ApplicationSupportCommon]					<- kAIApplicationSupportCommonFolderType
  		Color  									<- kAIApplicationSupportCommonColorFolderType
  			Profiles 							<- kAIApplicationSupportCommonColorProfilesFolderType
  			Settings							<- kAIApplicationSupportCommonColorSettingsFolderType
  		typeSpt									<- kAIApplicationSupportCommonTypeSupportFolderType
  			Kinsoku Sets						<- kAIApplicationSupportCommonKinsokuSetFolderType
  			Mojikume Sets						<- kAIApplicationSupportCommonMojikumeSetFolderType
  		Fonts									<- kAIApplicationSupportCommonFontsFolderType
  			Reqrd								<- kAIApplicationSupportCommonFontsReqrdFolderType
  				Base							<- kAIApplicationSupportCommonFontsReqrdBaseFolderType
  				cmaps							<- kAIApplicationSupportCommonFontsReqrdCMapsFolderType
  		PDFL									<- kAIApplicationSupportCommonPDFLFolderType
  			PDFL5.0 							<- kAIApplicationSupportCommonPDFL5FolderType
  				cmaps 							<- kAIApplicationSupportCommonPDFL5CMapsFolderType
  				fonts							<- kAIApplicationSupportCommonPDFL5FontsFolderType
  		Printspt 								<- kAIApplicationSupportCommonPrintSupportFolderType
  		Workflow 								<- kAIApplicationSupportCommonWorkflowFolderType
  	[MyDocuments]								<- kAIMyDocumentsFolderType
  		 +default documents file location
  	[PPDs]										<- kAIPrinterDescriptionsFolderType
  		+ ppd location
  	[Logs]										<- kAILogsFolderType
  System Dependant Directories:
   
  	W2k/W9x
  	-------
  	PrimaryScratch = System definition of temporary but can be changed by user
  	SecondaryScratch = System definition of temporary but can be changed by user
  	AIPreferences = Documents and Settings\username\Application Data\Adobe\Adobe Illustrator X
  	UserSupport = Documents and Settings\username\Application Data\Adobe
  	ApplicationSupportCommon = Program Files\Common Files\Adobe
  	MyDocuments = Documents and Settings\username\My Documents
  	PPDs = unknown
  	Logs = Documents and Settings\username\Application Data\Adobe\Logs
  
  	WNT
  	---
  	PrimaryScratch = System definition of temporary but can be changed by user
  	SecondaryScratch = System definition of temporary but can be changed by user
  	AIPreferences = \system\profiles\username\Application Data\Adobe\Adobe Illustrator X
  	UserSupport = \system\profiles\username\Application Data\Adobe
  	ApplicationSupportCommon = Program Files\Common Files\Adobe
  	MyDocuments = \system\profiles\username\My Documents
  	PPDs = unknown
    Logs = \system\profiles\username\Application Data\Adobe\Logs
    
  	OSX
  	---
  	PrimaryScratch = System definition of temporary but can be changed by user
  	SecondaryScratch = System definition of temporary but can be changed by user
  	AIPreferences = ~/Library/Preferences/Adobe Illustrator X
  	UserSupport = ~/Library/Application Support/Adobe
  	ApplicationSupportCommon = /Library/Application Support/Adobe
  	MyDocuments = ~/Documents
  	PPDs = Libraries/Printers/PPDs
	Logs = ~/Library/Logs/Adobe Illustrator CS
	
@endverbatim
*/
typedef struct {

	// - version 1 api - 

	/** Get the name of the folder. The name buffer must be of size #kMaxPathLength. Only
		the name of the folder is returned not the full path.*/
	AIAPI AIErr (*GetFolderName)(AIFolderType type, char *name);


} AI110FoldersSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190CSXSExtension.h<|end_filename|>
#ifndef _AI190CSXSExtension_H_
#define _AI190CSXSExtension_H_
/*
*		 Name:	_AICSXSExtension_H_
*        Date:	Started 2011
*     Purpose:	Adobe Illustrator CSXS Extension Header.
*
* ADOBE SYSTEMS INCORPORATED
* Copyright 2009 Adobe Systems Incorporated.
* All rights reserved.
*
* NOTICE:  Adobe permits you to use, modify, and distribute this file
* in accordance with the terms of the Adobe license agreement
* accompanying it. If you have received this file from a source other
* than Adobe, then your use, modification, or distribution of it
* requires the prior written permission of Adobe.
*
*/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#include "AIHeaderBegin.h"

/** @file AICSXSExtension.h */

/*******************************************************************************
**
** Constants
**
**/

#define kAI190CSXSExtensionSuite			"AI CSXS Extension Suite"
#define kAI190CSXSExtensionSuiteVersion	AIAPI_VERSION(3)
#define kAI190CSXSExtensionVersion		kAICSXSExtensionSuiteVersion

#define kAICSXSExtensionUnloadNotifier	"Extension Unloaded Notifier"

/**
Constants for reporting the status of Creative Suite extensions.
See \c #AICSXSExtensionSuite::GetExtensionState().
*/
enum AI190CSXSExtensionState
{
	/** Extension is not registered in Illustrator. */
	kAI190CSXSExtensionNotRegisteredState,
	/** Extension is registered in Illustrator and ready to load. */
	kAI190CSXSExtensionRegisteredState,
	/** Extension is loaded. */
	kAI190CSXSExtensionLoadedState,
	/** Extension is unloaded. */
	kAI190CSXSExtensionUnLoadedState,
	/** Internal use  */
	kAI190CSXSExtensionMaximumState = 0xffff

};

typedef struct AI190CSXSExtensionNotifierMsg
{
	AI190CSXSExtensionState state;
	const char*			 extensionId;
}AI190CSXSExtensionNotifierMsg;

/*******************************************************************************
**
**	Suite
**
**/

/** @ingroup Suites
This suite provides access to information about the status of Creative Suite
extensions that might be loaded into Illustrator.

Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAICSXSExtensionSuite and \c #kAICSXSExtensionVersion.
*/
typedef struct {

	/** Retrieves the current registration and load state of an extension.
	@param extensionId [in] The unique identifier of the extension.
	@param state [out] A buffer in which to return the current state, an \c #AICSXSExtensionState constant value.
	*/
	AIAPI AIErr(*GetExtensionState) (const char* extensionId, ai::int32& state);

	/** Reports whether an extension's main window is currently visible in the UI.
	@param extensionId [in] The unique identifier of the extension.
	@param isVisible [out] True if the extension's main window appears in the UI, false otherwise.
	*/
	AIAPI AIErr(*IsPrimaryStageVisible) (const char* extensionId, AIBoolean& isVisible);

	/** Launches extension of specified extension ID
	@param extensionId [in] The unique identifier of the extension.
	*/
	AIAPI AIErr(*LaunchExtension) (const char* extensionId);

	/** Sends Provided Event To Extension with the provided data
	@param extensionId [in] The unique identifier of the extension.
	@param eventID [in] The unique identifier of the event.
	@param appId [in] The unique identifier of Application.
	@param data [in] data is optional. it can be used to send some data to extension along with the event
	*/
	AIAPI AIErr(*SendEventToExtension) (const char* extensionId, const char* eventID, const char* appId, const char* data);

} AI190CSXSExtensionSuite;

#include "AIHeaderEnd.h"

#endif // _AI190CSXSExtension_H



<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100CharacterEncoding.h<|end_filename|>
#ifndef __AI100CharacterEncoding__
#define __AI100CharacterEncoding__

/*
 *        Name:	AI100CharacterEncoding.h
 *		$Id $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 10.0 Character Encoding Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2001-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AICharacterEncoding.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI100CharacterEncodingSuite				kAICharacterEncodingSuite
#define kAICharacterEncodingSuiteVersion1			AIAPI_VERSION(1)
#define kAI100CharacterEncodingSuiteVersion			kAICharacterEncodingSuiteVersion1


/*******************************************************************************
 **
 **	Suite
 **
 **/


typedef struct _AI100CharacterEncodingSuite {

	// Converts the contents of the source buffer from the source encoding to
	// the destination encoding. srcBuffer is assumed to contain srcLength bytes
	// of data. dstBuffer is assumed to be large enough to contain dstSize bytes
	// and dstLength returns the actual number of bytes of converted data.
	AIAPI AIErr (*ConvertBuffer) (
			const void* srcBuffer, long srcLength, AICharacterEncoding srcEncoding,
			void* dstBuffer, long dstSize, AICharacterEncoding dstEncoding,
			long* dstLength);

} AI100CharacterEncodingSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Runtime.h<|end_filename|>
#ifndef __AI120Runtime__
#define __AI120Runtime__

/*
 *        Name:	AI120Runtime.h
 *     Purpose:	Adobe Illustrator Runtime Environment.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIRuntime.h"

#include "AIHeaderBegin.h"

/** @file AI120Runtime.h */

/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI120RuntimeSuite			kAIRuntimeSuite
#define kAIRuntimeSuiteVersion8		AIAPI_VERSION(8)
#define kAI120RuntimeSuiteVersion	kAIRuntimeSuiteVersion8

/*******************************************************************************
 **
 **	Suite
 **
 **/

struct AI120RuntimeSuite {

	AIAPI AIErr (*GetAppName) ( AIAppName *name );
	AIAPI AIErr (*GetAppFileSpecification) ( ai::FilePath &file );
	AIAPI AIErr (*GetUserName) ( AIUserName *name );
	AIAPI AIErr (*GetUserOrganization) ( AIUserOrganization *organization );
	AIAPI AIErr (*GetUserSerialNumber) ( AIUserSerialNumber *serialNumber );
	AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space );
	AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool );
	AIAPI ASInt32 (*GetAppFreeMem) ( void );
	AIAPI AIErr (*ShowAppAboutBox) ( void );
	AIAPI ASInt32 (*GetSystemVersion) ( void );
	AIAPI AIBoolean (*GetIsSystemMacOSX) ( void );
	AIAPI ASInt32 (*GetAppMajorVersion) ( void );
	AIAPI ASInt32 (*GetAppMinorVersion) ( void );
	AIAPI ASInt32 (*GetAppRevisionVersion) ( void );
	AIAPI AIErr (*GetAppNameUS) ( ai::UnicodeString& name );
	AIAPI AIErr (*GetUserNameUS) ( ai::UnicodeString& name );
	AIAPI AIErr (*GetUserOrganizationUS) ( ai::UnicodeString& organization );
	AIAPI AIErr (*GetDefaultScript) ( AIFaceScript *script);
	AIAPI AIBoolean (*GetIsHonestyBuild) ( void );
	AIAPI AIBoolean (*GetIsProductTryAndDie) ( void );
};


#include "AIHeaderEnd.h"

#endif  // __AI120Runtime__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboardRange.h<|end_filename|>
/*************************************************************************
*
*ADOBE SYSTEMS INCORPORATED
* Copyright 2007 Adobe Systems Incorporated
* All Rights Reserved.
*
*NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the 
*terms of the Adobe license agreement accompanying it.  If you have received this file from a 
*source other than Adobe, then your use, modification, or distribution of it requires the prior 
*written permission of Adobe.
*
**************************************************************************/

#ifndef _AI_ARTBOARD_RANGE_H_
#define _AI_ARTBOARD_RANGE_H_

/*******************************************************************************
**
**	Imports
**
**/
#include "ASTypes.h"
#include "AIPlugin.h"

#include "AIHeaderBegin.h"

/** @file AIArtboardRange.h */

#define kAIArtboardRangeSuite			"AI Artboard Range Suite"
#define kAIArtboardRangeSuiteVersion3		AIAPI_VERSION(3)

/* Latest version */
#define kAIArtboardRangeSuiteVersion		kAIArtboardRangeSuiteVersion3
#define kAIArtboardRangeVersion			kAIArtboardRangeSuiteVersion


/** @ingroup Errors
See \c #AIArtboardRangeSuite */
#define kStdExceptionCaughtError ('SECE')
/** @ingroup Errors
Returned by \c #AIArtboardRangeSuite iteration functions if the end of a
range has been reached. */
#define kEndOfRangeErr			 ('ECRG')


/** Opaque artboard range reference. See \c #AIArtboardRangeSuite */
typedef struct _t_Opaque_ArtboardRange* AIArtboardRangeHandle;
/** Opaque artboard range iteration object. See \c #AIArtboardRangeSuite */
typedef struct _t_Opaque_ArtboardRangeIterator* AIArtboardRangeIterator;

/** @ingroup Suites
This suite allows you to validate a string containing a range of artboard indices and
sequentially iterate over the range. A range of artboards
is typically provided by the user in the Print, Save and Export dialogs.

\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAIArtboardRangeSuite and \c #kAIArtboardRangeSuiteVersion.
*/
typedef struct
{
	/**  Creates an artboard range reference.

	@param allArtboards True to include all defined artboards in the range. False to use a range string.
	@param rangeStr A valid artboard range string. Ignored if \c allArtboards is true.
	@param range [out] A buffer in which to return the new artboard range reference.
	@see \c #ValidateString()
	*/
	AIAPI AIErr (*Create)(ASBoolean allArtboards, ai::UnicodeString *rangeStr, AIArtboardRangeHandle* range);

	/**
	Retrieves the number of artboards in an artboard range.

	@param range An artboard range reference.
	@param count [out] A buffer in which to return the number of artboards.
	*/
	AIAPI AIErr (*GetCount)(AIArtboardRangeHandle range, ASInt32 *count);

	/**
	Creates a bi-directional iterator for an artboard range.

	@param range An artboard range reference.
	@param rangeItr [out] A buffer in which to return the iterator, which initially
	points to the first element of the artboard range.
	@see \c #DisposeIterator()
	*/
	AIAPI AIErr (*Begin)(AIArtboardRangeHandle range, AIArtboardRangeIterator *rangeItr);

	/**
	Retrieves the next element in an artboard range and increments the iterator.

	@param rangeItr The artboard range iterator.
	@param artboardNumber [out] A buffer in which to return the 0-based index of the next artboard.
	@return The error \c #kEndOfRangeErr if the iterator has reached the end of the range.
	*/
	AIAPI AIErr (*Next)(AIArtboardRangeIterator rangeItr, ASInt32 *artboardNumber);

	/**
	Retrieves the previous element in an artboard range and decrements the iterator.

	@param rangeItr The artboard range iterator.
	@param artboardNumber [out] A buffer in which to return the 0-based index of the previous artboard.
	@return The error \c #kEndOfRangeErr if the iterator has reached the beginning of the range.
	*/
	AIAPI AIErr (*Previous)(AIArtboardRangeIterator rangeItr, ASInt32 *artboardNumber);

	/**
	Disposes of an artboard range iterator created by \c #Begin().

	@param rangeItr An artboard range iterator.
	*/
	AIAPI AIErr (*DisposeIterator)(AIArtboardRangeIterator rangeItr);

	/**
	Disposes of an artboard range handle created by \c #Create().

	@param range An artboard range reference.
	*/
	AIAPI AIErr (*Dispose) (AIArtboardRangeHandle);

	/**
	Validates an artboard range string. A valid range string contains a comma-separated
	list of artboard index numbers and index ranges (n-m). The index is 0-based.
	A valid string could be, for example, "1,2,3-5,8".

	@param rangeStr The string containing the artboard range.
	@return The error \c #kBadParameterErr if the range string is invalid.
	*/
	AIAPI AIErr (*ValidateString)(ai::UnicodeString *rangeStr);

	/**
	Reports whether an artboard range includes all defined artboards.
	@param range An artboard range reference.
	@param result [out] A buffer in which to return true if the range includes all artboards, false otherwise.
	@return The error \c #kBadParameterErr if any parameter is NULL.
	*/
	AIAPI AIErr (*IsAllSelected)(AIArtboardRangeHandle range,ASBoolean * result);

	/**
	Removes duplicate crop areas from an artboard range. This call re-sorts the range
	and invalidates all iterators for this range.
	@param range An artboard range reference.
	@return The error \c #kBadParameterErr if any parameter is NULL.
	*/
	AIAPI AIErr (*RemoveDuplicate)(AIArtboardRangeHandle range);

} AIArtboardRangeSuite;

#include "AIHeaderEnd.h"

#endif // _AI_ARTBOARD_RANGE_H_

<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190PaintStyle.h<|end_filename|>
#ifndef __AI190PaintStyle__
#define __AI190PaintStyle__

/*
 *        Name:	AI190PaintStyle.h
 *      Author:	<NAME>
 *        Date:	6/17/96
 *     Purpose:	AI Paint Style Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************
**
**	Imports
**
**/

#ifndef __ASTypes__
#include "ASTypes.h"
#endif

#ifndef __AIColor__
#include "AIColor.h"
#endif

#ifndef __AIPathStyle__
#include "AIPathStyle.h"
#endif

#ifndef __AISwatchList__
#include "AISwatchList.h"
#endif

#include "AIPaintStyle.h"
#include "AIHeaderBegin.h"
/** @file AI190PaintStyle.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI190PaintStyleSuite			kAIPaintStyleSuite
#define kAIPaintStyleSuiteVersion9	AIAPI_VERSION(9)

/* Latest version */
#define kAI190PaintStyleSuiteVersion	kAIPaintStyleSuiteVersion9
#define kAI190PaintStyleVersion		kAI190PaintStyleSuiteVersion


/*******************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	This suite provides functions to examine and operate on the Color and Gradient
	palettes, which display and modify the paint style of the current selection,
	and the Color Editor, which allows a user to choose and edit colors.

 	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIPaintStyleSuite and \c #kAIPaintStyleSuiteVersion.
 */
typedef struct
{
	/** Causes the Color palette to show the stroke color (not fill).
		(Note that this function does not return an error code.)
		*/
	void ASAPI (*SetStrokeActive)();

	/** Reports whether the Color palette shows the stroke color (not fill).
		(Note that this function returns a boolean value, not an error code.)
			@return True if stroke is active.
		*/
	ASBoolean ASAPI (*IsStrokeActive)();

	/** Causes the Color palette to show the fill color (not stroke).
		(Note that this function does not return an error code.)
		*/
	void ASAPI (*SetFillActive)();

	/** Reports whether the Color palette shows the fill color (not stroke).
		(Note that this function returns a boolean value, not an error code.)
			@return True if fill is active.
		*/
	ASBoolean ASAPI (*IsFillActive)();

	/** Sets the fill and stroke states of the current selection to those
		of the default style (usually white for fill and solid
		1-point black for stroke).
		(Note that this function does not return an error code.)
		*/
	void ASAPI (*SetDefaultFillStroke)();

	/** Retrieves the index position of the selected stop the current gradient.
		(Note that this function returns a numeric value, not an error code.)
			@return The 0-based position index, or -1 if a gradient stop is not
				currently being edited.
		*/
	int ASAPI (*GetActiveGradientStopIndex)();

	/** Retrieves the gradient currently shown in the Gradient palette.
			@param color [out] A buffer in which to return the gradient.
		*/
	ASErr ASAPI (*GetCurrentGradient)(AIColor *color);

	/** Retrieves the fill, stroke, or currently active gradient stop
		color currently shown in the Color palette.
			@param color [out] A buffer in which to return the color.
		*/
	ASErr ASAPI (*GetCurrentColor)(AIColor *color);

	/** Invokes the Gradient palette. */
	ASErr ASAPI (*ShowGradientDialog)();

	/** Invokes the Color palette. */
	ASErr ASAPI (*ShowColorDialog)();

	/** If caching is not active, applies a color to the selection, or to the
		active gradient stop.

		If caching is active--that is, between a call to \c #BeginActiveColor()
		and a call to \c #EndActiveColor() --applies the color to proxies (such as the
		color previews in the Tools palette) rather than to the selection or gradient stop.
		(The eyedropper tool uses this during mouse-drag.)
			@param color The new color.
			@param useGradientStop True to replace the color in the
				currently active gradient stop only, false to replace the color
				in the entire selection.
		*/
	ASErr ASAPI (*SetActiveColor)(AIColor *color, ASBoolean useGradientStop);

	/** Starts caching for color application to proxies.
		@see \c #SetActiveColor(), \c #SetAIColor() */
	ASErr ASAPI (*BeginActiveColor)();

	/** Finishes caching for color application to proxies.
		@see \c #SetActiveColor(), \c #SetAIColor() */
	ASErr ASAPI (*EndActiveColor)();

	/** Reports whether the current color in the Color palette is for a stroke or fill.
		(Note that this function returns a boolean value, not an error code.)
			@return True if the color is for a stroke, false if it is for a fill.
		*/
	ASBoolean ASAPI (*IsCurrentColorStroke)();

	/** If caching is not active, applies a stroke or fill color to the current selection,
		using a partial color specification.

		If caching is active--that is, between a call to \c #BeginActiveColor()
 		and a call to \c #EndActiveColor() --applies the color to proxies (such as the
		color previews in the Tools palette) rather than to the selection.
			@param color The color structure containing new color component values.
			@param colorMap A color map that specifies which members of the color structure
				contain valid values.
			@param isStroke True to set the current stroke color, false to set the fill color.
		*/
	ASErr ASAPI (*SetAIColor)(AIColor *color, AIColorMap *colorMap, ASBoolean isStroke);

	/**	Shows a gradient in the Gradient palette.
			@param color The gradient.
		*/
	ASErr ASAPI (*SetCurrentGradient)(AIColor *color);

	/**	Shows a color in the Color palette.
			@param color The color.
		*/
	ASErr ASAPI (*SetCurrentColor)(AIColor *color);

	/** Shows the Color palette if it is hidden, hides the Color palette if it is shown.
		*/
	ASErr ASAPI (*ToggleColorDialog)();

	/** Exchanges the fill and stroke colors for the current selection.
		(Note that this function does not return an error code.)
		*/
	void ASAPI (*SwapFillStroke)();

	/** Invokes the color-chooser dialog and reports the chosen color.
		(Note that this function returns a boolean value, not an error code.)
		@param currentColor specifies the initial color the picker will display.
		When the function returns currentColor will become the color the user picked.
			@return True if the user clicked OK, false of the user clicked Cancel. */
	ASBoolean ASAPI (*DisplayColorPicker)(AIColor *currentColor);

	/** Invokes the Color Picker dialog with options and reports the chosen color.
		(Note that this function returns a boolean value, not an error code.)
			@param currentColor [in/out] On input, the initial color to display.
				On output, the color the user selected.
			@param options Options for initial display. The Color Picker opens in
				the swatch-list view if the initial color exactly matches the color
				in a swatch from the \c #AIColorPickerOptions::swatchList.
			@return True if the user clicked OK in the Color Picker, false if the user clicked Cancel.
		*/
	ASBoolean ASAPI (*DisplayColorPickerWithOptions)(AIColor *currentColor, const AIColorPickerOptions &options );

	/** Changes the stroke alignment on an art.
			@param art [in] The art handle whose stroke alignment is to be changed..
				On output, the color the user selected.
			@param strokeAlignment [in] The requirement alignment type. For possible values please see enum \c #AIStrokeAlignmentType.
			@return kNoErr if successful, error code otherwise.
		*/
	AIErr ASAPI (*SetStrokeAlignment)(AIArtHandle art, ai::uint32 strokeAlignment);

} AI190PaintStyleSuite;



#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Clipboard.h<|end_filename|>
#ifndef __AI192Clipboard__
#define __AI192Clipboard__

/*
 *        Name:	AI192Clipboard.h
 *   $Revision: 1 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Clipboard Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2016 Adobe Systems Incorporated
 * All Rights Reserved.

 * NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the
 * terms of the Adobe license agreement accompanying it.  If you have received this file from a
 * source other than Adobe, then your use, modification, or distribution of it requires the prior
 * written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#include "AIClipboard.h"

#include "AIHeaderBegin.h"

/** @file AIClipboard.h */


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI192ClipboardSuite			"AI Clipboard Suite"
#define kAI192ClipboardSuiteVersion3		AIAPI_VERSION(3)

#define kAI192ClipboardSuiteVersion		kAI192ClipboardSuiteVersion3
#define kAI192ClipboardVersion			kAI192ClipboardSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/

/**	@ingroup Suites
	The clipboard suite enables plug-ins to register new clipboard format handlers.
	The handler's main entry point will then receive messages requesting it to
	copy data to and from the clipboard as needed. The messages have caller
	\c #kCallerAIClipboard. The possible selectors are:

	\li \c #kSelectorAIGoClipboard
	\li \c #kSelectorAICanCopyClipboard
	\li \c #kSelectorAICloneClipboard
	\li \c #kSelectorAIDisposeClipboard


	Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAI192ClipboardSuite and \c #kAI192ClipboardVersion.
*/
typedef struct {

	/** Registers a new clipboard format handler.
			@param self This plug-in.
			@param data The types of clipboard data handled.
			@param options The capabilities of the format handler.
				A logical OR of \c #AIClipboardFormatOptions values.
			@param Clipboard [out] A buffer in which to return the clipboard handler reference.
		*/
	AIAPI AIErr (*AddClipboard) ( SPPluginRef self, AIClipboardData *data,
		ai::int32 options, AIClipboardHandle *Clipboard );
	/** Unregisters a clipboard format handler.
			@param Clipboard The clipboard handler reference.
		*/
	AIAPI AIErr (*RemoveClipboard) (AIClipboardHandle Clipboard);

	/** Retrieves the registered name of a clipboard format handler.
			@param Clipboard The clipboard handler reference.
			@param name [out] A buffer in which to return the name.
		*/
	AIAPI AIErr (*GetClipboardName) (AIClipboardHandle Clipboard, const char* *name);

	/** Retrieves the Windows OLE type of the data handled by the format handler.
			@param Clipboard The clipboard handler reference.
			@param OleType [out] A buffer in which to return the OLE data type.
		*/
	AIAPI AIErr (*GetClipboardOleType) (AIClipboardHandle Clipboard, ai::int32* OleType);

	/** Retrieves the plug-in reference for the plug-in supplying the format handler.
			@param Clipboard The clipboard handler reference.
			@param plugin [out] A buffer in which to return the plug-in reference.
		*/
	AIAPI AIErr (*GetClipboardPlugin) (AIClipboardHandle Clipboard, SPPluginRef *plugin);

	/** Retrieves the Mac OS resource type of the data handled by the format handler.
			@param Clipboard The clipboard handler reference.
			@param uniqueType [out] A buffer in which to return the data resource type.
		*/
	AIAPI AIErr (*GetClipboardType) (AIClipboardHandle Clipboard, DDType *uniqueType);

	/** Retrieves the options describing the capabilities of the format handler.
			@param Clipboard The clipboard handler reference.
			@param options [out] A buffer in which to return the capabilities of the
				format handler. A logical OR of \c #AIClipboardFormatOptions values.
		*/
	AIAPI AIErr (*GetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 *options);

	/** Sets the options describing the capabilities of the format handler.
			@param Clipboard The clipboard handler reference.
			@param options The capabilities of the format handler.
				A logical OR of \c #AIClipboardFormatOptions values.
		*/
	AIAPI AIErr (*SetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 options);

	/** Counts the number of registered clipboard format handlers.  Use with
		\c #GetNthClipboard() to iterate through handlers.
			@param count [out] A buffer in which to return the number of handlers.
		*/
	AIAPI AIErr (*CountClipboards) (ai::int32 *count);

	/** Retrieves a clipboard format handler by position index. Use with
		\c #CountClipboards() to iterate through handlers.
			@param n The index, in the range <code>[0..numHandlers-1]</code> .
			@param Clipboard [out] A buffer in which to return the clipboard handler reference.*/
	AIAPI AIErr (*GetNthClipboard) (ai::int32 n, AIClipboardHandle *Clipboard);

} AI192ClipboardSuite;

#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropArea.h<|end_filename|>
#ifndef _AI_CROP_AREA_H_
#define _AI_CROP_AREA_H_

/*
 *       Name: AICropArea.h
 *  $Revision: 1 $
 *     Author: <NAME>
 *       Date: June, 2006
 *    Purpose: Adobe Illustrator Crop Area Suite
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2006-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************
**
**	Imports
**
**/

#include "ASTypes.h"
#include "AIPlugin.h"

#include "AIHeaderBegin.h"

#define kAICropAreaSuite			"AI Crop Area Suite"
#define kAICropAreaSuiteVersion2		AIAPI_VERSION(2)

/* Latest version */
#define kAICropAreaSuiteVersion		kAICropAreaSuiteVersion2
#define kAICropAreaVersion			kAICropAreaSuiteVersion


/** @file AICropArea.h */

/*******************************************************************************
**
**	Constants
**
**/
#define kAIMAX_CROPAREA_LIMIT				100
#define kAIExceededMaxCropAreaLimitErr		'EMxL'
#define kAICantDeleteLastCropAreaErr		'CDLC'

/** Properties of a crop area. See \c #kAICropAreaSuite */
struct AICropArea
{
	/** The size of the crop area in points in document coordinate system */
	AIRealRect	m_CropAreaRect;
	/** Pixel aspect ratio, used in ruler visualization if the units are pixels */
	AIReal		m_fPAR;
	/** Show center mark */
	AIBoolean	m_bShowCenter;
	/** Show cross hairs */
	AIBoolean	m_bShowCrossHairs;
	/** Show title and action safe areas (for video) */
	AIBoolean	m_bShowSafeAreas;
	
	AICropArea()
	{
		m_fPAR = 1.0f;
		m_bShowCenter = false;
		m_bShowCrossHairs = false;
		m_bShowSafeAreas = false;
	}
};
/** This structure defines a crop area in a document. See \c #kAICropAreaSuite */
typedef AICropArea *AICropAreaPtr;

enum Source{
	kSetActive,
	kUpdate,
	kUndoRedo
};

typedef struct
{
	Source msgSrc;
} AIArtboardMessage;

/*******************************************************************************
 **
 **	Suite
 **
 **/


/** @ingroup Suites
	This suite allows you to activate, access, and modify crop areas in Illustrator documents.
	Illustrator maintains a list of crop areas in a document, and these functions allow
	you to iterate through the list. The active crop area is the one returned by
	\c #AIDocumentSuite::GetDocumentCropBox(), which is displayed with crop marks,
	and which is used when saving or exporting to a file.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAICropAreaSuite and \c #kAICropAreaSuiteVersion.
*/

typedef struct 
{

	/** Retrieves the index position of the active crop area in the document's list.
			@note In some cases this function can mark the document as changed and in need of saving.
			@param index [out] A buffer in which to return the 0-based index, or
				-1 if there are no crop areas in the current document.
		*/
	AIAPI AIErr (* GetActive ) (ASInt32 *index);

	/** Makes a specific crop area active, and makes it current in the iteration order.
		See \c #Next(), and \c #Previous().
			@param index The 0-based index position of the crop area in the document list.
		*/
	AIAPI AIErr (* SetActive ) (ASInt32 index);

	/** Retrieves the properties of a crop area	 Use with \c #GetCount() and \c #Update()
		to modify crop areas without changing which crop area is active in the document.
			@param index The 0-based index position of the crop area in the document list.
			@param properties [out]	A buffer in which to return	the crop-area properties.
		*/
	AIAPI AIErr (* Get ) (ASInt32 index, AICropAreaPtr *properties);

	/** Finds the next crop area in the list after the currently active area, makes it
		active, and retrieves its properties.
		The list is circular; that is, the next one after the last crop area
		is the first one in the list.
			@param properties [out]	A buffer in which to return	the crop-area properties, or
				\c NULL if there are no crop areas in the current document.
		*/
	AIAPI AIErr (* Next ) (AICropAreaPtr *properties);

	/** Finds the previous crop area in the list before the currently active area, makes it
		active, and retrieves its properties.
		The list is circular; that is, the previous one before the first crop area
		is the last one in the list.
			@param properties [out]	A buffer in which to return	the crop-area properties, or
				\c NULL if there are no crop areas in the current document.
		*/
	AIAPI AIErr (* Previous ) (AICropAreaPtr *properties);

	/** Retrieves the number of crop areas defined in the current document.
			@param count [out] A buffer in which to return the number of crop areas.
		*/
	AIAPI AIErr (* GetCount ) (ASInt32 *count);

	/** Deletes a crop area from the document list, makes the next one in the list active,
		and retrieves the properties of the newly active area.
		Last crop area can not be deleted, throws error kAICantDeleteLastCropAreaErr in such case.
			@param index The 0-based index position of the crop area to delete.
			@param properties [out]	 A buffer in which to return the crop-area properties of the
				newly active area, or \c NULL if there are no remaining crop areas in the current document.
		*/
	AIAPI AIErr (* Delete ) (int index, AICropAreaPtr *properties);

	/** Not Implemented returns kNotImplementedErr*/
	AIAPI AIErr (* DeleteAll ) ();

	/** Adds new crop area to the document and returns its index position in the crop-area list.
	    Maximum limit MAX_CROPAREA_LIMIT,throws error kAIExceededMaxCropAreaLimitErr after this limit.
			@param properties The new crop area.
			@param index [out] A buffer in which to return the 0-based index position of the new crop area.
		*/
	AIAPI AIErr (* AddNew ) (AICropAreaPtr properties, ASInt32 *index);

	/** Updates the properties of a crop area. Use with \c #GetCount() and \c #Get()
		to modify crop areas without changing which crop area is active in the document.
			@param index The 0-based index position of the crop area in the document list.
			@param properties The new crop-area definition.
		*/
	AIAPI AIErr (* Update ) (ASInt32 index, AICropAreaPtr properties);

} AICropAreaSuite;

#include "AIHeaderEnd.h"

#endif // _AI_CROP_AREA_H_


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/actions/AI11PDFFormatAction.h<|end_filename|>
#ifndef _AIPDFFORMATACTION_H_
#define _AIPDFFORMATACTION_H_

/*
 *        Name:	AIPDFFormatAction.h
 *   $Revision: 1 $
 *      Author:	<NAME>
 *        Date:	7/24/2002  
 *     Purpose:	Adobe Illustrator 11.0 PDF Action Parameters.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


// -----------------------------------------------------------------------------
//	Types.
// -----------------------------------------------------------------------------

// option set
typedef enum _AIPDFOptionSet 
{ 
	kAIPDFOptionSetCustom  = 0

} AIPDFOptionSet;


typedef enum _AIPDFFlattenStyle
{ 
	kAIPDFFlattenStyleCustom  = 0

} AIPDFFlattenStyle;



// compatibility
typedef enum _AIPDFCompatibility 
{ 
	kAIPDFCompatibility13  = 0x0013, // Acrobat 4, PDF 1.3
	kAIPDFCompatibility14  = 0x0014,  // Acrobat 5, PDF 1.4
	kAIPDFCompatibility15  = 0x0015  // Acrobat 6, PDF 1.5

} AIPDFCompatibility;


// color image compression
typedef enum _AIPDFImageCompression 
{ 
	kAIPDFImageNoCompression = 0,
	kAIPDFImageCompressionAutomaticJPEGMinimum,
	kAIPDFImageCompressionAutomaticJPEGLow,
	kAIPDFImageCompressionAutomaticJPEGMedium,
	kAIPDFImageCompressionAutomaticJPEGHigh,
	kAIPDFImageCompressionAutomaticJPEGMaximum,
	kAIPDFImageCompressionJPEGMinimum,
	kAIPDFImageCompressionJPEGLow,
	kAIPDFImageCompressionJPEGMedium,
	kAIPDFImageCompressionJPEGHigh,
	kAIPDFImageCompressionJPEGMaximum,
	kAIPDFImageCompressionAutomaticJPEG2000Minimum,
	kAIPDFImageCompressionAutomaticJPEG2000Low,
	kAIPDFImageCompressionAutomaticJPEG2000Medium,
	kAIPDFImageCompressionAutomaticJPEG2000High,
	kAIPDFImageCompressionAutomaticJPEG2000Maximum,
	kAIPDFImageCompressionAutomaticJPEG2000Lossless,
	kAIPDFImageCompressionJPEG2000Minimum,
	kAIPDFImageCompressionJPEG2000Low,
	kAIPDFImageCompressionJPEG2000Medium,
	kAIPDFImageCompressionJPEG2000High,
	kAIPDFImageCompressionJPEG2000Maximum,
	kAIPDFImageCompressionJPEG2000Lossless,
	kAIPDFImageCompressionZIP8bit,
	kAIPDFImageCompressionZIP4bit

} AIPDFImageCompression;



// monochrome image compression
typedef enum _AIPDFMonochromeImageCompression 
{ 
	kAIPDFMonochromeImageNoCompression = 0,
	kAIPDFMonochromeImageCompressionCCITTG3,
	kAIPDFMonochromeImageCompressionCCITTG4,
	kAIPDFMonochromeImageCompressionZIP,
	kAIPDFMonochromeImageCompressionRunLength

} AIPDFMonochromeImageCompression;



// downsampling kind
typedef enum _AIPDFDownsampling
{
	kAIPDFNoDownsampling = 1,
	kAIPDFAverageDownsampling,
	kAIPDFSubsampling,
	kAIPDFBicubicsampling

} AIPDFDownsampling;


typedef enum _AIPDFEncryptionLevel
{
	kAIPDF40bitEncryption = 1,
	kAIPDF128bitEncryption 

} AIPDFEncryptionLevel;

typedef enum _AIPDFOverprintOptions
{
	kAIPDFOPPreserve = 1,
	kAIPDFOPDiscard

} AIPDFOverprintOptions;


typedef enum _AIPDFPrinterType
{
	kAIPDFPrintMarksStandard = 1,
	kAIPDFPrintMarksJapanese

} AIPDFPrinterType;

typedef enum _AIPDFPrinterMarkWeight
{
	kAIPDFPrintMarksWeight0125 = 1,
	kAIPDFPrintMarksWeight025,
	kAIPDFPrintMarksWeight05

} AIPDFPrinterMarkWeight;


typedef enum _AIPDFPrintingPermit
{
	kAIPDFPrint128NoneIndex = 1,
	kAIPDFPrint128LowResIndex,
	kAIPDFPrint128HighResIndex,
	kAIPDFPrint40NoneIndex,
	kAIPDFPrint40HighResIndex

} AIPDFPrintingPermit;

typedef enum _AIPDFChangesPermit
{
	kAIPDFChanges128NoneIndex = 1,
	kAIPDFChanges128EditPageIndex,
	kAIPDFChanges128FillFormIndex,
	kAIPDFChanges128CommentIndex,
	kAIPDFChanges128AnyIndex,
	kAIPDFChanges40NoneIndex,
	kAIPDFChanges40CommentIndex,
	kAIPDFChanges40PageLayoutIndex,
	kAIPDFChanges40AnyIndex

} AIPDFChangesPermit;


// -----------------------------------------------------------------------------
// Action: kAIExportDocumentAction
// Purpose: These are additional parameters for export to PDF
// Parameters:
//	The following parameters are standard to the export action 
//	- kAIExportDocumentNameKey, string: the file name to export as.
//	- kAIExportDocumentFormatKey, string:
//			kAIPDFFileFormat to export PDF
//	- kAIExportDocumentExtensionKey, string:
//			kAIPDFFileFormatExtension
// file format and extensions for saving as an uncompressed SVG file.
#define kAIPDFFileFormat									"PDF File Format"
#define kAIPDFFileFormatExtension							"pdf"


const ActionParamKeyID kAIPDFPageIndexKey					= 'page'; // integer, page index
const ActionParamKeyID kAIPDFCropToKey						= 'crop'; // enum, AIPDFCropTo
const ActionParamKeyID kAIPDFPageCountKey					= 'pgct'; // integer, page count

const ActionParamKeyID kAIPDFOptionSetKey					= 'optn'; // integer, option set index.  
const ActionParamKeyID kAIPDFOptionSetNameKey				= 'opnm'; // string, option set entry name

const ActionParamKeyID kAIPDFCompatibilityKey				= 'comp'; // enum AIPDFCompatibility, compatibility
const ActionParamKeyID kAIPDFRoundTripKey					= 'rdtr'; // bool, include round trip information, aka PGF
const ActionParamKeyID kAIPDFGenerateThumbnailsKey			= 'thum'; // bool, generate thumbnails
const ActionParamKeyID kAIPDFViewPDFFileKey					= 'vpdf'; // bool, view PDF file after saving
const ActionParamKeyID kAIPDFFastWebViewKey					= 'fwev'; // bool, optimize for fast web view

const ActionParamKeyID kAIPDFColorImageCompressionKindKey	= 'cknd'; // enum AIPDFImageCompression, color image compression kind
const ActionParamKeyID kAIPDFColorImageTileKey				= 'ctil'; // int, color image tile size
const ActionParamKeyID kAIPDFColorImageResampleKindKey		= 'crsl'; // enum, color image resample kind
const ActionParamKeyID kAIPDFColorImageResolutionKey		= 'cres'; // int, color image resolution (dpi)
const ActionParamKeyID kAIPDFColorImageResampleAboveKey		= 'crab'; // int, resample color image above resolution (dpi)

const ActionParamKeyID kAIPDFGrayscaleImageCompressionKindKey = 'gknd'; // enum AIPDFImageCompression, gray scale image compression kind
const ActionParamKeyID kAIPDFGrayscaleImageTileKey			= 'gtil'; // int, grayscale image tile size
const ActionParamKeyID kAIPDFGrayscaleImageResampleKindKey	= 'grsl'; // enum, grayscale image resample 
const ActionParamKeyID kAIPDFGrayscaleImageResolutionKey 	= 'gres'; // int, grayscale image resolution
const ActionParamKeyID kAIPDFGrayImageResampleAboveKey		= 'grab'; // int, resample grayscale image above resolution (dpi)

const ActionParamKeyID kAIPDFMonochromeImageCompressionKindKey 	= 'mknd'; // enum AIPDFMonochromeImageCompression, monochrome image kind
const ActionParamKeyID kAIPDFMonochromeImageResampleKindKey	= 'mrsl'; // enum, monochrome image resample
const ActionParamKeyID kAIPDFMonochromeImageResolutionKey	= 'mres'; // int, monochrome image resolution
const ActionParamKeyID kAIPDFMonochromeImageResampleAboveKey= 'mrab'; // int, resample monochrome image above resolution (dpi)

const ActionParamKeyID kAIPDFCompressArtKey					= 'cart'; // bool, compress art

const ActionParamKeyID kAIPDFTrimMarksKey					= 'ptrm'; // bool, Trim Marks
const ActionParamKeyID kAIPDFRegMarksKey					= 'preg'; // bool, Registration Marks
const ActionParamKeyID kAIPDFColorBarsKey					= 'pclb'; // bool, Color Bars
const ActionParamKeyID kAIPDFPageInfoKey					= 'ppgi'; // bool, Page Info
const ActionParamKeyID kAIPDFPrinterMarkTypeKey				= 'pmtp'; // enum, printer mark type
const ActionParamKeyID kAIPDFTrimMarkWeightKey				= 'ptmw'; // enum, Trim Marks weight
const ActionParamKeyID kAIPDFOffsetFromArtworkKey			= 'post'; // int, offset from artwork  
const ActionParamKeyID kAIPDFBleedTopKey					= 'btop'; // int, bleed top  
const ActionParamKeyID kAIPDFBleedBottomKey					= 'bbtm'; // int, bleed bottom  
const ActionParamKeyID kAIPDFBleedLeftKey					= 'blft'; // int, bleed left  
const ActionParamKeyID kAIPDFBleedRightKey					= 'brht'; // int, bleed right  
const ActionParamKeyID kAIPDFBleedLinkKey					= 'brht'; // bool, bleed link  

const ActionParamKeyID kAIPDFEmbedICCProfilesKey			= 'emic'; // bool, embed ICC profiles
const ActionParamKeyID kAIPDFEmbedFontsKey					= 'embd'; // bool, embed fonts  **TO BE REMOVED**
const ActionParamKeyID kAIPDFSubsetFontsKey					= 'sbst'; // bool, subset fonts **TO BE REMOVED**
const ActionParamKeyID kAIPDFSubsetFontsRatioKey			= 'rato'; // real, subset fonts ratio

const ActionParamKeyID kAIPDFGenerateAcrobatLayersKey		= 'aclr'; // bool, generate Acrobat layers
const ActionParamKeyID kAIPDFOverprintKey					= 'pvop'; // enum, overprint
const ActionParamKeyID kAIPDFFlatteningStyleKey 			= 'flsy'; // enum, AIPDFFlatteningStyle
const ActionParamKeyID kAIPDFFlatteningStyleNameKey 		= 'flsn'; // string, AIPDFFlatteningStyle

const ActionParamKeyID kAIPDFFlattenMaxResolutionKey		= 'fmax'; // real, flattening style max resolution
const ActionParamKeyID kAIPDFFlattenMinResolutionKey		= 'fmin'; // real, flattening style min resolution
const ActionParamKeyID kAIPDFFlattenVectorBalanceKey		= 'fvba'; // int, flattening style vector balance
const ActionParamKeyID kAIPDFFlattenClipComplexRegionsKey	= 'fccr'; // bool, flattening style clip complex regions
const ActionParamKeyID kAIPDFFlattenOutlineStrokesKey		= 'fosk'; // bool, flattening style outline strokes
const ActionParamKeyID kAIPDFFlattenOutlineTextKey			= 'fotx'; // bool, flattening style outline text
const ActionParamKeyID kAIPDFFlattenPrinterResolutionKey	= 'fprs'; // real, flattening style printer resolution

const ActionParamKeyID kAIPDFUserPasswordRequiredKey		= 'usrq'; // bool, user password 
const ActionParamKeyID kAIPDFUserPasswordKey				= 'usps'; // string, user password 
const ActionParamKeyID kAIPDFMasterPasswordRequiredKey		= 'msrq'; // bool, master password 
const ActionParamKeyID kAIPDFMasterPasswordKey				= 'msps'; // string, master password 

const ActionParamKeyID kAIPDFPrintingPermKey 				= 'pmpr'; // enum, Printing Allowed
const ActionParamKeyID kAIPDFChangesPermKey 				= 'pmch'; // enum, Changes Allowed
			
const ActionParamKeyID kAIPDFEnableCopyKey					= 'ebcp'; // bool, Enable copying  (128-bit) 
const ActionParamKeyID kAIPDFEnableAccessKey				= 'ebac'; // bool, Enable access  (128-bit)  
const ActionParamKeyID kAIPDFEnableCopyAccessKey			= 'ebca'; // bool, Enable copying and access  (40-bit) 
const ActionParamKeyID kAIPDFEnablePlaintextMetaKey			= 'ebpt'; // bool, Enable Plaintext Metadata

const ActionParamKeyID kAIPDFIncludeLinkedFilesKey			= 'link'; // bool, include linked files


#endif //_AIPDFFORMATACTION_H_


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterize.h<|end_filename|>
#ifndef __AIRasterize__
#define __AIRasterize__

/*
 *        Name:	AIRasterize.h
 *   $Revision: 8 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Rasterize Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIArt__
#include "AIArt.h"
#endif

#ifndef __AIArtSet__
#include "AIArtSet.h"
#endif

#ifndef __AIColorConversion__
#include "AIColorConversion.h"
#endif

#ifndef __AIFixedMath__
#include "AIFixedMath.h"
#endif

#ifndef __AIRaster__
#include "AIRaster.h"
#endif


#include "AIHeaderBegin.h"

/** @file AIRasterize.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAIRasterizeSuite				"AI Rasterize Suite"
#define kAIRasterizeSuiteVersion10		AIAPI_VERSION(10)

/* Latest version */
#define kAIRasterizeSuiteVersion		kAIRasterizeSuiteVersion10
#define kAIRasterizeVersion				kAIRasterizeSuiteVersion

/** The default anti-aliasing factor when rasterizing with anti-aliasing. */
#define kAIRasterizeDefaultAntialiasing	2


/** @ingroup DictKeys
	Key for the Live Effect rasterization parameter
	dictionary, stored in the document dictionary. Provides
	default settings for automatic rasterization that is part
	of a Live Effect.*/
#define kAIAutoRasterSettingsKey		"AI Auto Rasterize"
/** @ingroup DictKeys
	Default setting	for automatic rasterization.
	Entry value is an \c #AIRasterizeType. An integer. */
#define kDefaultRasterizeType			"colr"
/**  @ingroup DictKeys
	Default setting for automatic rasterization.
	An integer, a dots-per-inch resolution value.  */
#define kDefaultRasterizeDPI			"dpi."
/**  @ingroup DictKeys
	Default setting for automatic rasterization.
	A boolean, whether to use anti-aliasing. */
#define kDefaultRasterizeAlias			"alis"
/** @ingroup DictKeys
	Default setting	for automatic rasterization.
	A boolean, whether to preserve spot colors. If undefined, consider as false.  */
#define kDefaultRasterizePreserveSpot	"spot"
/**  @ingroup DictKeys
	Default setting for automatic rasterization.
	A boolean, whether to create a mask. */
#define kDefaultRasterizeMask			"mask"
/**  @ingroup DictKeys
	Default setting for automatic rasterization.
	An \c AIReal, a number of document points for padding. */
#define kDefaultRasterizePadding		"padd"


/** If the document does not have auto-rasterize settings specified in the
	document dictionary (see \c #kAIAutoRasterSettingsKey),
	use the values stored in the application preferences under this key. */
#define kRasterizePrefPrefix			"Rasterize/Defaults"


/**	@ingroup Errors
	Returned when attempting to rasterize artwork with settings
	that exceed the maximum width. The maximum width is affected
	by the antialiasing factor and by the color	model of the
	target raster.  See \c #AIRasterizeSuite. */
#define kAIRasterizeTooWideErr			'R2Wd'


/*******************************************************************************
 **
 **	Types
 **
 **/

/** The desired color model and opacity of generated raster art.
	See \c #AIRasterizeSuite. */
enum AIRasterizeType {
	/** RGB no alpha */
	kRasterizeRGB = 0,
	/** CMYK no alpha */
	kRasterizeCMYK,
	/** Grayscale no alpha */
	kRasterizeGrayscale,
	/** opaque bitmap */
	kRasterizeBitmap,
	/** RGB with alpha */
	kRasterizeARGB,
	/** CMYK with alpha */
	kRasterizeACMYK,
	/** Grayscale with alpha */
	kRasterizeAGrayscale,
	/** Bitmap with transparent 0-pixels */
	kRasterizeABitmap,
	/** Separation no alpha */
	kRasterizeSeparation,
	/** Separation with alpha */
	kRasterizeASeparation,
	/** NChannel no alpha */
	kRasterizeNChannel,
	/** NChannel with alpha */
	kRasterizeANChannel
};

/** Options for how to perform rasterization. Bit flags can
	be combined with logical OR. */
enum AIRasterizeOptions {
	/** Clear all options */
	kRasterizeOptionsNone = 0,
	/** When set, incorporates layer attributes (such as opacity and blend mode)
		into the raster result. Otherwise, ignore layers in the input set. */
	kRasterizeOptionsDoLayers = 1,
	/** When set, rasterize against a black background, rather than white. */
	kRasterizeOptionsAgainstBlack = 2,
	/** When set, do not align 72 dpi images to the pixel grid. */
	kRasterizeOptionsDontAlign = 4,
	/** When set, convert text to outlines before rasterizing it. */
	kRasterizeOptionsOutlineText = 8,
	/** When set, do not supersample; preserve type hinting. */
	kRasterizeOptionsHinted = 16,
	/** When set, use the Document Raster Effects Settings resolution. */
	kRasterizeOptionsUseEffectsRes = 32,
	/** When set, use a minimum of 5 tiles when rasterizing with
		anti-alias on (useful for better user feedback on progress bars). */
	kRasterizeOptionsUseMinTiles = 64,
	/** When set, matte transparency with CMYK white. */
	kRasterizeOptionsCMYKWhiteMatting = 128,
	/** When set, rasterize to spot-color raster when a single separation channel is sufficient. */
	kRasterizeOptionsSpotColorRasterOk = 256,
	/** When set, rasterization to NChannel image is allowed. */
	kRasterizeOptionsNChannelOk = 512
};

/** Rasterization settings are collected into a single structure
	describing the type of raster desired, resolution, amount of
	anti-aliasing and other options. */
struct AIRasterizeSettings {
	AIRasterizeSettings () :
		type(kRasterizeGrayscale),
		resolution(0),
		antialiasing(1),
		options(kRasterizeOptionsNone),
		ccoptions(AIColorConvertOptions::kDefault),
		preserveSpotColors(false)
	{
	}
	AIRasterizeSettings ( AIRasterizeType iType,
			AIReal iResolution,
			short iAntialiasing,
			AIRasterizeOptions iOptions,
			AIColorConvertOptions iCcoptions,
			AIBoolean iPreserveSpotColors) :
		type(iType),
		resolution(iResolution),
		antialiasing(iAntialiasing),
		options(iOptions),
		ccoptions(iCcoptions),
		preserveSpotColors(iPreserveSpotColors)
	{
	}
	AIRasterizeSettings (const AIRasterizeSettings& src) :
		type(src.type),
		resolution(src.resolution),
		antialiasing(src.antialiasing),
		options(src.options),
		ccoptions(src.ccoptions),
		preserveSpotColors(src.preserveSpotColors)
	{
	}
	AIRasterizeSettings& operator= (const AIRasterizeSettings& src)
	{
		type = src.type;
		resolution = src.resolution;
		antialiasing = src.antialiasing;
		options = src.options;
		ccoptions = src.ccoptions;
		preserveSpotColors = src.preserveSpotColors;
		return *this;
	}

	/** Color model and bit depth of raster to be produced */
	AIRasterizeType type;
	/** The resolution in dots-per-inch. Use 0 or 72 for 72 dpi */
	AIReal resolution;
	/** The supersampling factor, less than 2 for none, 2 or more
		for anti-aliasing.  */
 	short antialiasing;
	/** Additional options for how rasterization is performed,
		a logical OR of \c #AIRasterizeOptions. */
	AIRasterizeOptions options;
	/** Color conversion options, a logical OR of \c #AIColorConvertOptions. */
	AIColorConvertOptions ccoptions;
	/** When true, preserve spot colors when possible. */
	AIBoolean preserveSpotColors;
};

/** The image resampling method for \c #AIRasterizeSuite::ImageResample(). */
enum AIResamplingType {
	/** Default (anti-aliasing off). Fast, lowest quality */
	kSubsample = 0,
	/** Averaging sample (anti-aliasing on). Slower, better quality */
	kDownsample,
	/** Weighted average sample. Slowest, best quality */
	kBicubicDownsample

};

/** Progress callback function prototype for rasterization. You can supply
	this procedure to display a progress bar during a lengthy operation.
		@param current The index of the current tile being rasterized.
		@param total The total number of tiles to be rasterized.
		@return False to cancel the operation, otherwise true.
	*/
typedef AIAPI AIBoolean (*AIRasterizeProgressProc)(ai::int32 current, ai::int32 total);


/*******************************************************************************
 **
 **	Suite
 **
 **/


/**	@ingroup Suites
	This suite provides functions that allow you to convert any art
	set (see \c #AIArtSetSuite) into a single image, represented by
	a standard raster art object (an art object of type \c #kRasterArt).

	You can specify the bounds of rasterization, the destination color space,
	the image resolution, and whether the image will be anti-aliased.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIRasterizeSuite and \c #kAIRasterizeSuiteVersion.
 */
typedef struct {

/**	Retrieves the bounds for an entire art set.
		@param artSet The art set object.
		@param artBounds [out] A buffer in which to return the bounding rectangle.
		@param honorCropBox When true, and if cropping has been set, \c artBounds
			returns the crop box for the art. If false, or if no crop
			box has been set, \c artBounds returns the entire bounding box.
	*/
	AIAPI AIErr (*ComputeArtBounds) ( AIArtSet artSet,
									  AIRealRect *artBounds,
									  AIBoolean honorCropBox );

/** Creates a raster art object from an art set.
		@param artSet The art set object.
		@param settings Settings that describe the type of raster desired,
			resolution, amount of anti-aliasing and other options.
		@param artBounds The bounding rectangle for the art
			to rasterize, which can be the one returned by \c #ComputeArtBounds().
		@param paintOrder The paint order, relative to the \c prep object,
			for the placement of the new object, an \c #AITypes::AIPaintOrder value.
		@param prep The prepositional art object for the paint order.
		@param raster [out] A buffer in which to return the new raster art object.
		@param progressProc	A callback function that presents a progress dialog
			during a lengthy operation.
	*/
	AIAPI AIErr (*Rasterize) ( AIArtSet artSet,
							   AIRasterizeSettings *settings,
							   AIRealRect *artBounds,
							   short paintOrder,
							   AIArtHandle prepArt,
							   AIArtHandle *raster,
							   AIRasterizeProgressProc progressProc );

/**	Creates a clipping mask from the result of rasterization of an art set.
	The function creates a clip group, places it in a new mask group,
	and returns the mask group. The clip group contains a union of all
	art objects in the art set, and an additional raster art object.
	This is the same as setting "Create Clipping Mask" when using
	the Object > Rasterize menu command.
		@param artSet The art set object. The function disposes of the art
			objects contained in this set, but does not dispose of this variable.
		@param paintOrder The paint order, which determines how the
			new mask group is placed relative to the raster art.
			Must be \c #kPlaceAbove or \c #kPlaceBelow.
		@param rasterArt A raster art object to be included in the clip group.
			The result of a call to \c #Rasterize() on the supplied art set.
		@param maskGroup [out] A buffer in which to return the new mask object.
	*/
	AIAPI AIErr (*CreateMask) ( AIArtSet artSet,
								short paintOrder,
								AIArtHandle rasterArt,
								AIArtHandle *maskGroup );

/**	Creates a raster art object from an art set, adding padding.
	in both the horizontal and vertical dimension.
		@param artSet The art set object.
		@param settings Settings that describe the type of raster desired,
			resolution, amount of anti-aliasing and other options.
			If the setting specify an alpha channel, the padding pixels
			are fully transparent. Otherwise, they are white.
		@param artBounds The bounding rectangle for the art
			to rasterize, which can be the one returned by \c #ComputeArtBounds().
		@param paintOrder The paint order, relative to the \c prep object,
			for the placement of the new object, an \c #AITypes::AIPaintOrder value.
		@param prep The prepositional art object for the paint order.
		@param raster [out] A buffer in which to return the new raster art object.
		@param progressProc	A callback function that presents a progress dialog
			during a lengthy operation.
		@param padding The amount of padding to add to the resulting raster image,
			a number of document points.
	*/
	AIAPI AIErr (*RasterizeWithPadding) ( AIArtSet artSet,
										  AIRasterizeSettings *settings,
										  AIRealRect *artBounds,
										  short paintOrder,
										  AIArtHandle prepArt,
										  AIArtHandle *raster,
										  AIRasterizeProgressProc progressProc,
										  AIReal padding );

/**	Creates a raster art object from all of the art in the current document.
		@param settings Settings that describe the type of raster desired,
			resolution, amount of anti-aliasing and other options.
		@param artBounds The bounding rectangle for the art
			to rasterize, which can be the one returned by \c #ComputeArtBounds().
		@param paintOrder The paint order, relative to the \c prep object,
			for the placement of the new object, an \c #AITypes::AIPaintOrder value.
		@param prep The prepositional art object for the paint order.
		@param raster [out] A buffer in which to return the new raster art object.
		@param progressProc	A callback function that presents a progress dialog
			during a lengthy operation.
		@param options A set of option flags that control how the rasterization is performed.
			A logical OR of \c #AIRasterizeOptions.
	*/
	AIAPI AIErr (*RasterizeDocument) ( AIRasterizeSettings *settings,
							   short paintOrder,
							   AIArtHandle prepArt,
							   AIArtHandle *raster,
							   AIRasterizeProgressProc progressProc,
							   ai::int32 options );

/** Creates a new raster object by downsampling an existing raster object.
		@param rasterArt The raster art object.
		@param flag The type of sampling to perform, trading off speed and quality.
		@param resolution The resolution for the resulting image, in dots-per-inch (dpi) 
			or equivalently displayed as pixels-per-inch (ppi) in the UI.
		@param paintOrder The paint order, relative to the \c prep object,
			for the placement of the new object, an \c #AITypes::AIPaintOrder value.
		@param prep The prepositional art object for the paint order.
		@param newRasterArt [out] A buffer in which to return the new raster art object.
	*/

	AIAPI AIErr (*ImageResample) (AIArtHandle rasterArt,
									const AIResamplingType flag,
									const AIReal resolution,
									const short paintOrder,
									AIArtHandle prepArt,
									AIArtHandle *newRasterArt);

/** Reports whether rasterization can preserve spot colors for an art set.
		@param artSet The art set object.
		@param canPreserveSpotColor [out] A buffer in which to return true
			if spot colors can be preserved.
	*/

	AIAPI AIErr (*CheckSpotColorPreservation) (AIArtSet artSet,
									AIBoolean *canPreserveSpotColor);

} AIRasterizeSuite;

#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Suite.h<|end_filename|>
#ifndef __AI60Suite__
#define __AI60Suite__

/*
 *        Name:	AISuite.h
 *   $Revision: 3 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 6.0 Function Suites.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AI60Plugin__
#include "AI60Plugin.h"
#endif

#ifndef __AI60Basic__
#include "AI60Basic.h"
#endif


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI60SuiteSuite			"AI Suite Suite"
#define kAI60SuiteSuiteVersion	AIAPI_VERSION(3)
#define kAI60SuiteVersion		kAI60SuiteSuiteVersion

#define kLatestInternalVersion	0

#define kSuiteAlreadyExistsErr			'STE='
#define kBadSuiteNameErr				'STNM'
#define kBadSuiteAPIVersionErr			'STAP'
#define kBadSuiteInternalVersionErr		'STIN'


/*******************************************************************************
 **
 **	Types
 **
 **/

typedef struct _t_AISuiteOpaque *AISuiteHandle;


/*******************************************************************************
 **
 ** Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*AcquireSuite) ( char *name, long apiVersion,
				long internalVersion, void **suiteProcs );
	AIAPI AIErr (*ReleaseSuite) ( void *suiteProcs );

	AIAPI AIErr (*AddSuite) ( AIPluginHandle self, char *name, long apiVersion,
				long internalVersion, void *suiteProcs, AISuiteHandle *suite );
	AIAPI AIErr (*GetSuite) ( char *name, long apiVersion,
				long internalVersion, AISuiteHandle *suite );
	AIAPI AIErr (*GetSuiteName) ( AISuiteHandle suite, char **name );
	AIAPI AIErr (*GetSuiteAPIVersion) ( AISuiteHandle suite, long *apiVersion );
	AIAPI AIErr (*GetSuiteInternalVersion) ( AISuiteHandle suite, long *internalVersion );
	AIAPI AIErr (*GetSuiteProcs) ( AISuiteHandle suite, void **suiteProcs );
	AIAPI AIErr (*GetSuiteAcquireCount) ( AISuiteHandle suite, long *acquireCount );
	AIAPI AIErr (*GetSuitePlugin) ( AISuiteHandle suite, AIPluginHandle *plugin );

	AIAPI AIErr (*CountSuites) ( long *count );
	AIAPI AIErr (*GetNthSuite) ( long n, AISuiteHandle *suite );

	AIAPI AIErr (*Undefined) ( void );
	
} AISuiteSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mesh.h<|end_filename|>
#ifndef __AI90Mesh__
#define __AI90Mesh__

/*
 *        Name:	AI90Mesh.h
 *   $Revision: 26 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 9.0 Mesh Object Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIMesh.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI90MeshSuite							kAIMeshSuite
#define kAIMeshSuiteVersion2					AIAPI_VERSION(2)
#define kAI90MeshSuiteVersion					kAIMeshSuiteVersion2


/*******************************************************************************
 **
 **	Suite
 **
 **/


typedef struct {

	AIAPI AIErr (*InitCartesian) (AIArtHandle mesh, long i, long j);
	AIAPI AIErr (*InitPolar) (AIArtHandle mesh, long i, long j);
	AIAPI AIErr (*GetKind) (AIArtHandle mesh, long *kind);
	AIAPI AIErr (*GetSize) (AIArtHandle mesh, long *i, long *j);

	AIAPI AIErr (*NewSelection) (AIArtHandle mesh, AIBoolean all, AIMeshSelection* selection);
	AIAPI AIErr (*GetSelection) (AIArtHandle mesh, AIMeshSelection* selection);
	
	AIAPI AIErr (*GetPatch) (AIArtHandle mesh, long i, long j, AIMeshPatchIterator* patch);
	AIAPI AIErr (*GetStartPatch) (AIArtHandle mesh, AIMeshPatchIterator* patch);

	AIAPI AIErr (*GetNode) (AIArtHandle mesh, long i, long j, AIMeshVertexIterator* vertex);
	AIAPI AIErr (*GetStartVertex) (AIArtHandle mesh, AIMeshVertexIterator* vertex);

	AIAPI AIErr (*GetStartSegment) (AIArtHandle mesh, AIMeshSegmentIterator* segment);

	AIAPI void (*GetColorSpace) (AIArtHandle mesh, AIColorTag* kind, AICustomColorHandle* custom);
	AIAPI AIBoolean (*InvertPoint) (AIArtHandle mesh, AIRealPoint* point, AIReal* u, AIReal* v);
	AIAPI void (*EvalPoint) (AIArtHandle mesh, AIReal u, AIReal v, AIRealPoint* point);
	AIAPI void (*EvalColor) (AIArtHandle mesh, AIReal u, AIReal v, AIColor* color);

	AIAPI AIErr (*Transform) (AIArtHandle mesh, AIRealMatrix* matrix);
	AIAPI AIErr (*MapPoints) (AIArtHandle mesh, AIMeshPointMap f, void* userData);
	AIAPI AIErr (*MapColors) (AIArtHandle mesh, AIMeshColorMap f, void* userData);
	AIAPI void (*QueryColors) (AIArtHandle mesh, AIMeshColorQuery f, void* userData);

	AIAPI AIErr (*InsertU) (AIArtHandle mesh, AIReal u, long* i);
	AIAPI AIErr (*InsertV) (AIArtHandle mesh, AIReal v, long* j);
	AIAPI AIErr (*DeleteGridLines) (AIArtHandle mesh, AIReal u, AIReal v);
	
	AIAPI void (*TrackBegin) (AIArtHandle mesh);
	AIAPI void (*TrackEnd) (AIArtHandle mesh);

	AIAPI AIErr (*EndSelectionChanges) (void);

	AIAPI AIErr (*DropColor) (AIHitRef hit, const AIColor* color);

} AI90MeshSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGeometry.h<|end_filename|>
#ifndef __AIGeometry__
#define __AIGeometry__

/*
 *        Name:	AIGeometry.h
 *     Purpose:	Adobe Illustrator Geometry Suite
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1996-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIArt.h"
#include "AIPathStyle.h"
#include "AIRaster.h"


#include "AIHeaderBegin.h"

/** @file AIGeometry.h */

/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAIGeometrySuite		"AI Geometry Suite"
#define kAIGeometryVersion6		AIAPI_VERSION(6)
#define kAIGeometrySuiteVersion	kAIGeometryVersion6


/** @ingroup Errors */
#define kCancelledErr			kCanceledErr
/** @ingroup Errors */
#define kFormatErr				'FRM!'


/** Types of art objects that can be enumerated to \c #AIGeometryOrganizationProcs.
	These correspond to \c #AIArtType values for objects.
	See \c #AIGeometrySuite
	*/
typedef enum {
	/** Marks the end of an object enumeration. */
	kAIGeometryOrganizeNull = 0,
	/** A path object. */
	kAIGeometryOrganizePath,
	/** A group object. */
	kAIGeometryOrganizeGroup,
	/** A compound object. */
	kAIGeometryOrganizeCompound,
	/** A placed object. */
	kAIGeometryOrganizePlaced,
	/** A raster object. */
	kAIGeometryOrganizeRaster,
	/** A text frame object.
		(As of AI11 the text organization callbacks are called for each text frame.) */
	kAIGeometryOrganizeText,
	/** A text path object.
		(As of AI11 this is called if the text frame has a confining path--that is,
		it is area text or text on a path). */
	kAIGeometryOrganizeTextPath,
	/** A text line object.
		(Obsolete, not invoked by AI11 or later.) */
	kAIGeometryOrganizeTextLine,
	/** A clipping group object. */
	kAIGeometryOrganizeClipGroup,
	/** A mask object.  */
	kAIGeometryOrganizeMask,
	/** A mesh object. */
	kAIGeometryOrganizeMesh,
	/** A symbol object. */
	kAIGeometryOrganizeSymbol,
	/** A foreign object.
		@note AI11 and later.*/
	kAIGeometryOrganizeForeignObject,
	/** A legacy text object.
		@note AI11 and later. */
	kAIGeometryOrganizeLegacyText,
	/** A chart object. */
	kAIGeometryOrganizeChart,
	/** A Plugin Art Object.
		@note AI19.2 and later */
	kAIGeometryOrganizePluginArt,
	/** Internal */
	kAIGeometryOrganizeDummy = 0xFFFFFFFF

} AIGeometryOrganizationType;


/*******************************************************************************
 **
 **	Types
 **
 **/

/** Developer-defined data for geometry callbacks.
	See \c #AIGeometrySuite
*/
typedef void *AIGeometryUserData;

/** Callback prototype for \c #AIGeometryOrganizationProcs. Called before enumeration
	begins for an object of an associated \c #AIGeometryOrganizationType.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param object The art object to be enumerated.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryBeginProc)(AIGeometryUserData userData, AIArtHandle object);

/** Callback prototype for \c #AIGeometryOrganizationProcs. Called after enumeration
	ends or is halted by a 1 result for an object of an associated \c #AIGeometryOrganizationType.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param object The art object that was enumerated.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryEndProc)(AIGeometryUserData userData, AIArtHandle object);

/** Callback prototype for \c #AIGeometryConstructionProcs.	Called to describe paths
	and outlines within a shape.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param p The destination location of the move.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryMoveToProc)(AIGeometryUserData userData, AIRealPoint *p);

/** Callback prototype for \c #AIGeometryConstructionProcs.	Called to describe each
	path or outline within an element of the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param p The destination location of the line draw.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryLineToProc)(AIGeometryUserData userData, AIRealPoint *p);

/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe each
	path or outline within an element of the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param p1 The first curve point.
		@param p2 The second curve point.
		@param p3 The third curve point.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryCurveToProc)(AIGeometryUserData userData, AIRealPoint *p1, AIRealPoint *p2, AIRealPoint *p3);

/** Callback prototype for \c #AIGeometryConstructionProcs.	Called to describe each
	path or outline within an element of the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryClosePathProc)(AIGeometryUserData userData);

/** Callback prototype for \c #AIGeometryPaintingProcs.	Called to describe the fill
	of an element of the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryFillProc)(AIGeometryUserData userData);

/** Callback prototype for \c #AIGeometryPaintingProcs.	Called to describe the strokes
	of an element of the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryStrokeProc)(AIGeometryUserData userData);

/** Callback prototype for \c #AIGeometryPaintingProcs. Called to describe the clipping
	of an element of the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryClipProc)(AIGeometryUserData userData);

/** Callback prototype for \c #AIGeometryPaintingProcs.	Called when an outline
	within the  art tree being iterated is filled with an image.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param raster The image object.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryImageProc)(AIGeometryUserData userData, AIArtHandle raster);

 /** Callback prototype for \c #AIGeometryPaintingProcs. Called when an outline
	within the  art tree being iterated is filled with an image.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param raster The image mask object.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryImageMaskProc)(AIGeometryUserData userData, AIArtHandle raster);

 /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param gray The grayscale value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetGrayProc)(AIGeometryUserData userData, AIReal gray);

/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param cyan The CMYK cyan value.
		@param magenta The CMYK magenta value.
		@param yellow The CMYK yellow value.
		@param black The CMYK black value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetCMYKColorProc)(AIGeometryUserData userData, AIReal cyan, AIReal magenta, AIReal yellow, AIReal black);

/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param red The RGB red value.
		@param green The RGB green value.
		@param blue The RGB blue value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetRGBColorProc)(AIGeometryUserData userData, AIReal red, AIReal green, AIReal blue);

 /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param alpha The alpha channel value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetAlphaProc)(AIGeometryUserData userData, AIReal alpha);

 /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param customColor The custom color.
		@param tint The amount of the color, a percentage in the range [0..1].
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetCustomColorProc)(AIGeometryUserData userData, AICustomColorHandle customColor, AIReal tint);

 /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param gradient The gradient object.
		@param gradientOrigin The origin point.
		@param gradientAngle The angle.
		@param gradientLength The length.
		@param hiliteAngle The highlight angle.
		@param hiliteLength	The highlight length.
		@param matrix The transformation matrix.
		@return 0 for enumeration to continue, 1 to halt enumeration.
		@see \c #AIGradientStyle
	*/
typedef ai::int16 (*AIGeometrySetGradientColorProc)(AIGeometryUserData userData,
												AIGradientHandle gradient,
												AIRealPoint *gradientOrigin,
												AIReal gradientAngle,
												AIReal gradientLength,
												AIReal hiliteAngle,
												AIReal hiliteLength,
												AIRealMatrix *matrix);

/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param pattern The pattern object.
		@param shiftDistance  Pattern style value.
		@param shiftAngle Pattern style value.
		@param scale  Pattern style value.
		@param rotateAngle	Pattern style value.
		@param reflect Pattern style value.
		@param reflectAngle	Pattern style value.
		@param shearAngle Pattern style value.
		@param shearAxis Pattern style value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
		@see \c #AIPatternStyle
	*/
typedef ai::int16 (*AIGeometrySetPatternColorProc)(AIGeometryUserData userData,
											   AIPatternHandle pattern,
											   AIReal shiftDistance,
											   AIReal shiftAngle,
											   AIRealPoint *scale,
											   AIReal rotateAngle,
											   AIBoolean reflect,
											   AIReal reflectAngle,
											   AIReal shearAngle,
											   AIReal shearAxis,
											   AIRealMatrix *matrix);
/** Callback prototype for \c #AIGeometryStateProcs.  Called when an outline
	within the  art tree being iterated is filled with an image.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param alpha The alpha channel value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometryImageCallback)(AIGeometryUserData userData,
										 AIArtHandle raster,
										 AISlice *artSlice,
										 AITile *workTile,
										 AISlice *workSlice);

/** Callback prototype for \c #AIGeometryStateProcs.  Called for the
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param lineWidth The line width value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetLineWidthProc)(AIGeometryUserData userData, AIReal lineWidth);

 /** Callback prototype for \c #AIGeometryStateProcs. Called for the
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param lineCap The line cap value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetLineCapProc)(AIGeometryUserData userData, AILineCap lineCap);

/** Callback prototype for \c #AIGeometryStateProcs. Called for the
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param lineJoin The line join value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetLineJoinProc)(AIGeometryUserData userData, AILineJoin lineJoin);

/** Callback prototype for \c #AIGeometryStateProcs. Called for the
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param miterLimit The miter limit value.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	*/
typedef ai::int16 (*AIGeometrySetMiterLimitProc)(AIGeometryUserData userData, AIReal miterLimit);

/**Callback prototype for \c #AIGeometryStateProcs.	Called for the
	stroke of each element within the art tree being iterated.
	See \c #AIGeometrySuite
		@param userData Developer-defined data.
		@param offset The dash offset value.
		@param length The number of dash values.
		@param array The array of dash values.
		@return 0 for enumeration to continue, 1 to halt enumeration.
	 */
typedef ai::int16 (*AIGeometrySetDashProc)(AIGeometryUserData userData, AIReal offset, ai::int16 length, AIReal array[]);

/** Passed as a pointer to a list of organization types
	with associated begin/end procedures.
	The list is terminated by an entry with an organization type of 0.
	See \c #AIGeometrySuite
*/
typedef struct {

	/** The type of object to which these procedures apply. */
	AIGeometryOrganizationType type;
	/** Procedure called before enumerating an object of this type. */
	AIGeometryBeginProc begin;
	/** Procedure called after enumerating an object of this type. */
	AIGeometryEndProc end;

} AIGeometryOrganizationProcs;

/** Callbacks that get information about how paths are constructed.
	Called for leaf objects.
	See \c #AIGeometrySuite
*/
typedef struct {
	AIGeometryMoveToProc moveTo;
	AIGeometryLineToProc lineTo;
	AIGeometryCurveToProc curveTo;
	AIGeometryClosePathProc closePath;

} AIGeometryConstructionProcs;

/** Callbacks that get information about how objects are painted.
	Called for leaf objects. The interior region of a fill or clip can
	be determined using either the non-zero winding or even-odd rules
	(see the PDF reference manual for a definition). The eofill and
	eoclip call backs indicate even-odd while the others indicate non-
	zero winding.
	See \c #AIGeometrySuite
*/
typedef struct {

	AIGeometryFillProc fill;
	AIGeometryFillProc eofill;
	AIGeometryStrokeProc stroke;
	AIGeometryClipProc clip;
	AIGeometryClipProc eoclip;
	AIGeometryImageProc image;
	AIGeometryImageMaskProc imageMask;

} AIGeometryPaintingProcs;

/** Callbacks that get information about painting options.
	Called for leaf objects.
	See \c #AIGeometrySuite
*/
typedef struct {

	AIGeometrySetGrayProc setWhiteColor;
	AIGeometrySetGrayProc setBlackColor;
	AIGeometrySetGrayProc setGrayColor;
	AIGeometrySetCMYKColorProc setCMYKColor;
	AIGeometrySetRGBColorProc setRGBColor; /* unimplemented */
	AIGeometrySetAlphaProc setAlpha; /* unimplemented */
	AIGeometrySetCustomColorProc setCustomColor;
	AIGeometrySetGradientColorProc setGradientColor;
	AIGeometrySetPatternColorProc setPatternColor;

	AIGeometrySetLineWidthProc setLineWidth;
	AIGeometrySetLineCapProc setLineCap;
	AIGeometrySetLineJoinProc setLineJoin;
	AIGeometrySetMiterLimitProc setMiterLimit;
	AIGeometrySetDashProc setDash;

} AIGeometryStateProcs;


/*******************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	This suite provides an iteration mechanism for collecting information about
	the art objects in the various kinds of	artwork trees.
	It allows you to define a set of callback procedures to work with
	various aspects of artwork, including the placement, style, and color attributes.
	The \c #GeometryIterate() function enumerates the contents of an artwork
	subtree to a set of callback functions that receive various kinds
	of information about each object. You need supply only the callbacks of interest
	to your plug-in.

	All of the object information passed to the callbacks is public information that
	can be accessed directly through SDK functions. You can also define and pass
	arbitrary data to the callbacks, to use together with the object data.

	All callbacks should return 0 to continue processing the next
	artwork element, or nonzero to halt processing. This allows you to prune
	the traversal of the artwork tree.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIGeometrySuite and \c #kAIGeometryVersion.
	*/
typedef struct {

	/** Supplies information to developer-defined callback procedures,
		calling the procedures iteratively for each member of an artwork tree whose
		root is a specified art object.
			@param art The root art object.
			@param organizationProcs For each object in the tree, calls the begin and end procedure
				associated the type before and after enumerating the object.
			@param constructionProcs Contains pointers to callbacks that receive a geometric
				description of each leaf art object.
			@param paintingProcs Contains pointers to callbacks that receive information
				about how each leaf object is painted.
			@param stateProcs Contains pointers to callbacks that receive additional parameters
				to the painting operations.
			@param userData Developer-defined data to be passed to callbacks.
			@param skipArtTypes A logical OR of \c #AIArtUserAttr values for art objects to skip during iteration.
				As an example, pass  kArtHidden | kArtLocked to skip hidden and locked arts
				Pass 0 to skip no arts.
		*/
	ASAPI AIErr (*GeometryIterate) ( AIArtHandle art,
									 AIGeometryOrganizationProcs *organizationProcs,
									 AIGeometryConstructionProcs *constructionProcs,
									 AIGeometryPaintingProcs *paintingProcs,
									 AIGeometryStateProcs *stateProcs,
									 AIGeometryUserData userData,
									 ai::int32 skipArtTypes);

} AIGeometrySuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110MaskFlattener.h<|end_filename|>
#ifndef __AI110MaskFlattener__
#define __AI110MaskFlattener__

/*
 *        Name:	AI110MaskFlattener.h
 *   $Revision: 1 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 11.0 Mask Flattener Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */
/*******************************************************************************
 **
 **	Imports
 **
 **/
#ifndef __AIMaskFlattener__
#include "AIMaskFlattener.h"
#endif


#include "AIHeaderBegin.h"

/** @file AI110MaskFlattener.h */

/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAIMaskFlattenerSuite					"AI Mask Flattener Suite"
#define kAIMaskFlattenerSuiteVersion2			AIAPI_VERSION(2)
#define kAI110MaskFlattenerSuiteVersion			kAIMaskFlattenerSuiteVersion2

/*******************************************************************************
 **
 **	Suite
 **
 **/

/**
	The transparency flattening APIs provide facilities for flattening
	transparent artwork into an equivalent collection of opaque artwork.
 */
typedef struct {

	AIAPI AIErr (*FlattenArt)(AIArtSet artSet, AIFlatteningOptions *options, short paintOrder, AIArtHandle prep);
	AIAPI AIErr (*CreateTemporaryFlatteningLayer)(AILayerHandle *layer);
	AIAPI AIErr (*FlattenDocumentToLayer)(AILayerHandle layer);
	AIAPI AIErr (*RemoveTemporaryFlatteningLayer)();
	AIAPI AIErr (*IsTemporaryFlatteningLayer)(AILayerHandle layer, AIBoolean *flattening);
	AIAPI AIErr (*ReportError)(AIErr error);
	AIAPI AIErr (*CollectDocumentFlatteningInfo)(AIFlatteningInfoReceiver receiver, void* receiverdata);
	
} AI110MaskFlattenerSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropAreaRange.h<|end_filename|>
/*************************************************************************
*
*ADOBE SYSTEMS INCORPORATED
* Copyright 2007 Adobe Systems Incorporated
* All Rights Reserved.
*
*NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the 
*terms of the Adobe license agreement accompanying it.  If you have received this file from a 
*source other than Adobe, then your use, modification, or distribution of it requires the prior 
*written permission of Adobe.
*
**************************************************************************/

#ifndef _AI_CROP_AREA_RANGE_H_
#define _AI_CROP_AREA_RANGE_H_

/*******************************************************************************
**
**	Imports
**
**/
#include "ASTypes.h"
#include "AIPlugin.h"
#include "AIArtboardRange.h"

#include "AIHeaderBegin.h"

#define kAICropAreaRangeSuite			"AI Crop Area Range Suite"
#define kAICropAreaRangeSuiteVersion1		AIAPI_VERSION(1)

/* Latest version */
#define kAICropAreaRangeSuiteVersion		kAICropAreaRangeSuiteVersion1
#define kAICropAreaRangeVersion			kAICropAreaRangeSuiteVersion


/** @file AICropAreaRange.h */
/** @ingroup Suites
This legacy suite allows you to validate and iterate over a crop area range string for Illustrator documents.

DEPRECATED: Don't use this suite in new code. Replacement is AIArtboardRangeSuite.

\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAICropAreaRangeSuite and \c #kAICropAreaRangeSuiteVersion.
*/

typedef AIArtboardRangeHandle AICropAreaRangeHandle;
typedef AIArtboardRangeIterator AICropAreaRangeIterator;

typedef AIArtboardRangeSuite AICropAreaRangeSuite;

#include "AIHeaderEnd.h"

#endif // _AI_CROP_AREA_RANGE_H_

<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Geometry.h<|end_filename|>
#ifndef __AI90Geometry__
#define __AI90Geometry__

/*
 *        Name:	AI90Geometry.h
 *     Purpose:	Adobe Illustrator 9.0 Geometry Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIGeometry.h"


#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI90GeometrySuite			kAIGeometrySuite
#define kAIGeometryVersion2			AIAPI_VERSION(2)
#define kAI90GeometrySuiteVersion	kAIGeometryVersion2



/*******************************************************************************
 **
 **	Types
 **
 **/


typedef struct {

	AIGeometryBeginProc beginPath;
	AIGeometryEndProc endPath;
	AIGeometryBeginProc beginGroup;
	AIGeometryEndProc endGroup;
	AIGeometryBeginProc beginCompoundPath;
	AIGeometryEndProc endCompoundPath;
	AIGeometryBeginProc beginPlacedImage;
	AIGeometryEndProc endPlacedImage;
	AIGeometryBeginProc beginRaster;
	AIGeometryEndProc endRaster;
	AIGeometryBeginProc beginText;
	AIGeometryEndProc endText;
	AIGeometryBeginProc beginTextPath;
	AIGeometryEndProc endTextPath;
	AIGeometryBeginProc beginTextLine;
	AIGeometryEndProc endTextLine;
	AIGeometryBeginProc beginClipGroup;
	AIGeometryEndProc endClipGroup;
	AIGeometryBeginProc beginMask;
	AIGeometryEndProc endMask;
	AIGeometryBeginProc beginMesh;
	AIGeometryEndProc endMesh;

} AI90GeometryOrganizationProcs;


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	ASAPI AIErr (*GeometryIterate) ( AIArtHandle art, 
									 AI90GeometryOrganizationProcs *organizationProcs, 
									 AIGeometryConstructionProcs *constructionProcs, 
									 AIGeometryPaintingProcs *paintingProcs, 
									 AIGeometryStateProcs *stateProcs, 
									 AIGeometryUserData userData );

} AI90GeometrySuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140FXGFileFormat.h<|end_filename|>
#ifndef __AI140FXGFileFormat__
#define __AI140FXGFileFormat__

/*
*        Name:	AIFXGFileFormat.h
*      Author:
*        Date:
*     Purpose:	Adobe Illustrator FXG Suite.
*
* ADOBE SYSTEMS INCORPORATED
* Copyright 2007-2008 Adobe Systems Incorporated.
* All rights reserved.
*
* NOTICE:  Adobe permits you to use, modify, and distribute this file
* in accordance with the terms of the Adobe license agreement
* accompanying it. If you have received this file from a source other
* than Adobe, then your use, modification, or distribution of it
* requires the prior written permission of Adobe.
*
*/


/*******************************************************************************
**
**	Imports
**
**/
#include "AIFXGFileFormat.h"

#include "AIHeaderBegin.h"

/** @file AIFXGFileFormat.h */

/*******************************************************************************
**
** Constants
**
**/

#define kAI140FXGFileFormatSuite				kAIFXGFileFormatSuite
#define kAIFXGFileFormatSuiteVersion1			AIAPI_VERSION(1)
#define kAI140FXGFileFormatSuiteVersion			kAIFXGFileFormatSuiteVersion1
#define kAIFXGFileFormatVersion1				kAIFXGFileFormatSuiteVersion1


/*******************************************************************************
**
**	Types
**
**/

/**
	Streaming interface to be supplied by the client, to be used when calling
	\c #AIFXGFileFormatSuite::ExportFXGToStream()
*/
struct AI140FXGWriteStreamInterface {
	/**
		Callback to client to open an asset.
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param assetType [in] Type of asset See \c AIFXGAssetTypeEnum
		@param assetName		[in/out] Name of asset. Client can change the input name, so that the export plug-in can use the changed name.
		@param mimeType		[in] Mime type of asset
		@param createUnique	[in] True if the client should create a new file instead of overwriting existing one. Client should
								change the asset name accordingly with the new name.
		@return		\c #kCanceledErr if client does not want to receive further write and close calls for this particular open-asset call.
	*/
	AIAPI AIErr		(*BeginAsset)		(AI140FXGWriteStreamInterface* stream, ai::int16 assetType, ai::UnicodeString& assetName, const ai::UnicodeString& mimeType, AIBoolean createUnique);

	/**
		Callback to client to close an opened asset.
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param	assetType	[in]	The asset type to close.
		@return \c #kNoErr on success
	*/
	AIAPI AIErr		(*EndAsset)			(AI140FXGWriteStreamInterface* stream, ai::int16 assetType);

	/**
		Callback to client to set the write position in current stream.
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param pos	[in] The 0-based position to set.
		@return kNoErr on Success
	*/
	AIAPI AIErr		(*SetPos)			(AI140FXGWriteStreamInterface* stream, ai::uint32 pos);

	/**
		Callback to client to write bytes to current stream. (Note that this function returns
		a constant value, not an error code.)
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param buffer [in] A buffer to write to current stream
		@param maxToWrite [in] The maximum number of bytes to write
		@return actual bytes written
	*/
	AIAPI size_t	(*WriteBytes)		(AI140FXGWriteStreamInterface* stream, const ASUInt8* buffer, const size_t  maxToWrite);

	/**
		Callback for client to report whether it supports positionable stream interface.
		(Note that this function returns a constant value, not an error code.)
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@return True if current stream is positionable, false otherwise.
	*/
	AIAPI AIBoolean (*IsPositionable)	(AI140FXGWriteStreamInterface* stream);

	/**
		Callback to report the current position of the current stream. (Note that this function returns
		a constant value, not an error code.)
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@return The current position of current stream.
	*/
	AIAPI ai::uint32	(*GetCurPos)		(AI140FXGWriteStreamInterface* stream);

	/**
		Callback to determine the appropriate expand setting for an art object.
		If client returns \c #kAIFXGExpandArtOptionExpand, it must fill \c expandFlags; see \c #AIExpandSuite::Expand() for flags,
		(Note that this function returns a constant value, not an error code.)
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param art [in]	The art for which an expand setting is needed.
		@param expandFlag [out] The expand flags setting when \c #kAIFXGExpandArtOptionExpand is returned.
		@return One of the values of  \c #AIFXGExpandArtOptionEnum, \c #kAIFXGExpandArtOptionNone for default processing.
	*/
	AIAPI ai::int16		(*GetExpandOptionForArt) (AI140FXGWriteStreamInterface* stream, AIArtHandle art, ai::int32* expandFlags);

	/**
		Callback to report whether client wants private data generation for an art object.
		If not, application private data corresponding to the art is not written.
		 (Note that this function returns a constant value, not an error code.)
		@param stream	[in] The stream pointer which the client has passed to AIFXGFileFormatSuite::ExportFXGToStream
		@param art [in]	The art for which private data should be generated.
		@return True if client wants private data generation for this particular art, false otherwise.
	*/
	AIAPI AIBoolean (*GeneratePrivateDataForArt)(AI140FXGWriteStreamInterface* stream, AIArtHandle art);

	/**
		Callback to retrieve the filepath/name of the current stream
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param pulicID [out] The filepath/name of the current stream. This is used in open-asset calls.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr		(*GetPublicID)		(AI140FXGWriteStreamInterface* stream, ai::UnicodeString& publicID);

	/**
		Callback to retrieve the relative Image folder path, so that the \c BitmapGraphic FXG tag can create the
		proper relative path of the image source. For example, if client returns the path "MyFile.assets/images" and the image file name is MyImage.png,
		the entry in the \c BitmapGrapic tag is source="\@Embed('MyFile.assets/images/MyImage.png')".
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param relImageFolderPath [out] The relative path to the image folder.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr		(*GetRelativeImageFolderPath) (AI140FXGWriteStreamInterface* stream, ai::UnicodeString& relImageFolderPath);

	/**
		Callback to move or copy images in an Artboard-specific folder when a particular artboard is exported.
		@param stream	[in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
		@param imageName [in] The name of the image to be moved or copied.
		@param relImagePath [in] Relative path to image folder where the image should be moved or copied so that the FXG is valid.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr		(*LinkImageIntoAssetFolder)(AI140FXGWriteStreamInterface* stream, const ai::UnicodeString& imageName, const ai::UnicodeString& relImagePath);

	/** Internal */
	AIAPI AIErr		(*DeleteAutoGeneratedImage)(AI140FXGWriteStreamInterface* stream,const ai::UnicodeString& imageName);
}
/**
Stream interface to be passed to \c #AIFXGFileFormatSuite::ExportFXGToStream()
*/
;

/*******************************************************************************
**
**	Suite
**
**/

/** @ingroup Suites
This suite provides functions that allow you to export an AI document or art object to FXG.

\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAIFXGFileFormatSuite and \c #kAIFXGFileFormatVersion.
*/
struct AI140FXGFileFormatSuite{
	/**
		Creates an FXG save-options object with default values. This should be freed when no longer needed,
		using \c #DisposeFXGSaveParams()
		@param fxgSaveParams [out] Save options with default values.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*CreateFXGSaveParams) ( AIFXGFileFormatSaveParams* fxgSaveParams );

	/**
		Destroys the FXG save-options object created with \c #CreateFXGSaveParams()
		@param fxgSaveParams [in] The save-options object.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*DisposeFXGSaveParams) ( AIFXGFileFormatSaveParams fxgSaveParams );

	/**
		Retrieves the current FXG version value from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return The FXG version, an \c #AIFXGVersion value.
	*/
	AIAPI ai::int16 (*GetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the FXG save version value in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param fxgVersion [in] The FXG version, an \c #AIFXGVersion value.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgVersion);

	/**
		Retrieves the current "Preserve AI Editing capabilities" flag value from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return True if AI editing capabilities should be preserved using application private data.
	*/
	AIAPI AIBoolean (*GetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the "Preserve AI Editing capabilities" flag in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param aiEditCap [in] true if editing capabilities should be preserved, false other wise.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiEditCap);

	/**
		Retrieves the current preserve policy for Text from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return  The preserve policy for Text, an \c #AIFXGPreservePolicy value.
	*/
	AIAPI ai::int16 (*GetFXGSaveTextPolicy) (const AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the preserve policy for Text in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param fxgTextPreservePolicy [in] The preserve policy for Text, an \c #AIFXGPreservePolicy value.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveTextPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgTextPreservePolicy);

	/**
		Retrieves the current preserve policy for FXG Filters from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return  The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value.
	*/
	AIAPI ai::int16 (*GetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the preserve policy for FXG Filters in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param fxgFilterPreservePolicy [in] The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgFilterPreservePolicy);

	/**
		Retrieves the current preserve policy for Gradients from an FXG save-options object.
		(Note that this function returns
		a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return The preserve policy for Gradients, an \c #AIFXGPreservePolicy value.
	*/
	AIAPI ai::int16 (*GetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the preserve policy for Gradients in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param fxgFilterPreservePolicy [in] The preserve policy for Gradients, an \c #AIFXGPreservePolicy value.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgGradientPreservePolicy);

	/**
		Retrieves the "Include Symbols" flag from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return True if All Symbols should be written in FXG, whether they are used or not.
	*/
	AIAPI AIBoolean (*GetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the "Include Symbols" flag in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param aiIncludeSymbol [in] True if all symbols should be exported, false if only used symbols should be exported
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeSymbol);

	/**
		Retrieves the "Include XMP" flag from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return True if XMP should be written in FXG,
	*/
	AIAPI AIBoolean (*GetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the "Include Symbols" flag in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param aiIncludeXMP [in] True if XMP  should be exported.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeXMP);

	/**
		Retrieves the rasterize resolution from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param outCustomResolution [out] A custom resolution value if the returned value is \c #kAIFXGResolutionCustom
		@return The rasterize resolution, an \c #AIFXGRasterizeResolution value.
	*/
	AIAPI ai::int16 (*GetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int32* outCustomResolution);

	/**
		Sets the rasterize resolution in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param fxgRasterizeResolution [in] The rasterize resolution, an \c #AIFXGRasterizeResolution value.
		@param customResolution [in] A custom resolution if the resolution value is \c #kAIFXGResolutionCustom
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams,
		ai::int16 fxgRasterizeResolution, ai::int32 customResolution);

	/**
		Retrieves the "Downsample Linked Images" flag from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return True if linked images should be downsampled to 72 ppi, false otherwise.
	*/
	AIAPI AIBoolean (*GetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the "Downsample Linked Images" flag in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param aiDownSampleLinkedImages [in] True if Linked images should be downsampled to 72 ppi, false otherwise.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams,  AIBoolean aiDownSampleLinkedImages);

	/**
		Retrieves the "Clip To Active Artboard" flag from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return True if exported FXG file should be clipped to active artboard, false otherwise.
	*/
	AIAPI AIBoolean (*GetFXGSaveClipToActiveArtboard) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the "Clip To Active Artboard" flag in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param fxgClipToActiveArtboard [in] True if exported FXG file should be clipped to active artboard, false otherwise.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveClipToActiveArtboard) (AIFXGFileFormatSaveParams fxgSaveParams,  AIBoolean fxgClipToActiveArtboard);

	/**
		Retrieves the "WriteImages" flag from an FXG save-options object.
		(Note that this function returns a constant value, not an error code.)
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@return True if images should also be written while exporting FXG. If false, images are not written, which is useful
			when user is interested in only the XML code.
	*/
	AIAPI AIBoolean (*GetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams);

	/**
		Sets the "WriteImages" flag in an FXG save-options object.
		@param fxgSaveParams [in] A save-options object as returned by  \c #CreateFXGSaveParams().
		@param writeImages [in] True if images should be written while exporting FXG, false otherwise.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*SetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean writeImages);

	/**
		Generates FXG to a file.
		@param art [in] Art which you want to export as FXG. Pass NULL to generate FXG for entire document.
		@param filepath [in] The file path for the master document FXG
		@param fxgSaveParams [in] The FXG save options parameters. See \c #AIFXGFileFormatSaveParams
		@param fxgExportFlags [in]  The export flags. See \c #AIFXGExportFlagEnum
		@param artBoardRange [in] If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range.
		@param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*ExportFXGToFile) (AIArtHandle art, const ai::FilePath& filePath, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange, const ai::UnicodeString& customProgressText);

	/**
		Generates FXG to a stream through callbacks.
		@param art [in] The art which you want to export as FXG. Pass NULL to generate FXG for entire document.
		@param streamInterface [in] The stream implemenation with callbacks, See \c #AIFXGWriteStreamInterface
		@param fxgSaveParams [in]  The FXG save options parameters. See \c #AIFXGFileFormatSaveParams
		@param fxgExportFlags [in]  The export flags. See \c #AIFXGExportFlagEnum
		@param artBoardRange [in]  If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range.
		@param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed.
		@return \c #kNoErr on success.
	*/
	AIAPI AIErr (*ExportFXGToStream) (AIArtHandle art, AI140FXGWriteStreamInterface* streamInterface, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange);

} ;


#include "AIHeaderEnd.h"



#endif //__AI140FXGFileFormat__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI5xAPISupport.h<|end_filename|>
/*
 *        Name:	AI5xAPISupport.h
 *   $Revision: 1 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 6.0 Artwork Object Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AI5xAPISupport__
#define __AI5xAPISupport__

#ifndef __AITypes__
#include "AITypes.h"
#endif

#include "AIHeaderBegin.h"



/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI5xAPISupportSuite		"AI 5x API Support Suite"
#define kAI5xAPISupportSuiteVersion	AIAPI_VERSION(2)



/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*Get5xFunctions) ( ISAType architecture, const void **AI5xFunctions);

} AI5xAPISupportSuite;

#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Path.h<|end_filename|>
#ifndef __AI130Path__
#define __AI130Path__

/*
 *        Name:	AIPath.h
 *      $Revision: 14 $
 *        Date:
 *     Purpose:	Adobe Illustrator Path Object Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

 /*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIPath.h"

#include "AIHeaderBegin.h"

/** @file AI130Path.h */


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI130PathSuite				kAIPathSuite
#define kAIPathSuiteVersion7		AIAPI_VERSION(7)
#define kAI130PathSuiteVersion		kAIPathSuiteVersion7
#define kAI130PathVersion			kAI130PathSuiteVersion



/*******************************************************************************
 **
 **	Suite
 **
 **/


/** @ingroup Suites
	This suite provides functions that allow you to examine and manipulate
	\e paths, which are art objects of type \c #kPathArt.

	The shape of a path is defined by one or more path \e segments.
	Every segment of a path corresponds to an \e anchor \e point, which is
	the handle shown when the path is selected. The number of anchor points
	on a path, or \e segment \e count, includes the two at each end.
	A segment is defined by the \c #AIPathSegment structure. Segment
	index numbers begin at zero. A path can have a single anchor point.

	The \e in and \e out points of a segment define the tangent of the curve
	at a point \e p. The in point is not used for the initial and final segments
	of an open path. A segment can be a \e corner point or a \e smooth point.
	For a corner, the in and out points can be anywhere. To make a straight line,
	place the in and out points of each end on their p points.

	A path can be can be \e closed or \e open.
	If a path is open, it is defined only by its segments. If it is closed,
	Illustrator draws a segment between the first and last anchor points,
	which uses the out tangent of the last segment and the in tangent of the first.

	Some paths are also used as \e guides. In all other respects they are paths,
	with the same contents and attributes. Paint attributes are associated with
	a path through a \e path \e style. See the \c #AIPathStyleSuite.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIPathSuite and \c #kAIPathVersion.
*/
typedef struct {

	AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, short *count );

	AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, short count );

	AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment );

	AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment );

	AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment );

	AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, short segNumber, short count );

	AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed );

	AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed );

	AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide );

	AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide );

	AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, short segNumber, short *selected );

	AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, short segNumber, short selected );

	AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path );

	AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area );

	// New for AI8.0:

	AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness );

	AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, short segNumber, AIRealBezier *bezier );

	AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength );

	AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip );

	// New for AI 11

	AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected );

	// New for AI 13

	AIAPI AIErr (*GetKeySegment) (AIArtHandle* path, short* segmentNumber);

	AIAPI AIErr (*CancelKeySegment) (void);

	AIAPI AIBoolean (*IsPath9SliceSplitter)(AIArtHandle path);

} AI130PathSuite;

#include "AIHeaderEnd.h"

#endif		//__AI130Path__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140User.h<|end_filename|>
#ifndef __AI140User__
#define __AI140User__

/*
*        Name: AI140User.h
*   $Revision: 15 $
*      Author:
*        Date:
*     Purpose: Adobe Illustrator User Utilities Suite.
*
* ADOBE SYSTEMS INCORPORATED
* Copyright 1986-2007 Adobe Systems Incorporated.
* All rights reserved.
*
* NOTICE:  Adobe permits you to use, modify, and distribute this file 
* in accordance with the terms of the Adobe license agreement 
* accompanying it. If you have received this file from a source other 
* than Adobe, then your use, modification, or distribution of it 
* requires the prior written permission of Adobe.
*
*/


/*******************************************************************************
**
**	Imports
**
**/

#include "AIUser.h"

#include "AIHeaderBegin.h"

/** @file AI140User.h */


/*******************************************************************************
**
**	Constants
**
**/

// v.14.0
#define kAIUserSuite				"AI User Suite"
#define kAIUserSuiteVersion9		AIAPI_VERSION(9)
#define kAI140UserSuiteVersion			kAIUserSuiteVersion9
#define kAI140UserVersion				kAI140UserSuiteVersion

/*******************************************************************************
**
**	Types
**
**/

/** Information about the kinds of names allowed for a named entity (such as
layers, swatches, and styles). Used to generate a legal name, using
\c #AIUserSuite::NextName() and AIUserSuite::CopyOfName().

The following pseudocode indicates how you can create your own AutoNameGenerator class by publicly inheriting AIAutoNameGenerator
and following the implementation guidelines.

@code
class AutoNameGenerator : public AIAutoNameGenerator {
public:
// Constructor for a name generator. Its supplied with the pluginref in
// case the name generator needs to look in the plugin's resources e.g for
// the default name. The next new name index is supplied since the plugin
// probably needs to store this in its globals so that it can be preserved
// across unload and reload.
AutoNameGenerator (SPPluginRef pluginref, int nextNameIndex)
{
// fill in fDefaultName
GetDefaultName(pluginref);

// initialize the base members
// note kMaxCollectionStringLength accounts for null terminator and maximumLength does not
maximumLength = kMaxCollectionStringLength-1;
uniqueNames = true;
baseName = fDefaultName;
nextNewNameIndex = nextNameIndex;
HasName = sHasName;
}

private:
void GetDefaultName (SPPluginRef pluginref)
{
// Somehow initialize fDefaultName with the default name for the
// collection. The pluginref is probably needed in order to look
// up the name in the plugin resources.
}

AIErr hasName (const ai::UnicodeString &name, AIBoolean &hasit)
{
// Code to answer the question. When comparing 'name' against
// names of objects in the collection it's important to use the
// AIUserSuite::SameName() API. The name generation process does
// not use a simple string comparison.
}

static AIAPI AIErr sHasName (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit)
{
return static_cast<AutoNameGenerator&>(self).hasName(name, hasit);
}

ai::UnicodeString fDefaultName;
};
@endcode
*/

/*******************************************************************************
**
**	Suite
**
**/

/** @ingroup Suites
This suite provides utility functions for working with Illustrator,
including unit conversion utilities and a progress bar.

\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAIUserSuite and \c #kAIUserSuiteVersion.
*/
struct AI140UserSuite {

	/** Reports whether a user has canceled the current operation.
	(Note that this function returns a boolean value, not an error code.)
	@return	True if the user has canceled an operation
	by pressing Command-dot or clicking Cancel or Stop in the
	progress bar.
	*/
	AIAPI AIBoolean (*Cancel) ( void );

	/** Updates the progress bar.
	(Note that this function does not return an error code.)
	@param current A number between 0 and \c max that represents
	how far the operation has progressed.
	@param max The maximum value, representing 100% progress.
	*/
	AIAPI void (*UpdateProgress) ( long current, long max );

	/**	Sets the text message displayed in the progress bar. If not provided,
	the text line is blank.
	(Note that this function does not return an error code.)
	@param text The text message.
	*/
	AIAPI void (*SetProgressText) ( const ai::UnicodeString& text );

	/** Explicitly close the progress bar if one is currently shown.
	(Note that this function does not return an error code.)
	*/
	AIAPI void (*CloseProgress) ( void );

	/**	Converts a number of document points to a Unicode string, using
	the period as a decimal separator.
	(Note that this function does not return an error code.)
	@param value The value to convert.
	@param precision The number of digits to the right of the decimal,
	in the range [0..4].
	@param string [out] A buffer in which to return the converted value, at
	least 12 characters.
	*/
	AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
	using the period as a decimal separator.
	(Note that this function does not return an error code.)
	@param string The string to convert.
	@param value  [out] A buffer in which to return the converted value.
	If the string is not a number, this is set to \c #kAIRealUnknown.
	*/
	AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/**	Converts a number of document points to a Unicode string, using the localized
	international utilities (IU) decimal separator.
	(Note that this function does not return an error code.)
	@param value The value to convert.
	@param precision The number of digits to the right of the decimal,
	in the range [0..4].
	@param string [out] A buffer in which to return the converted value, at
	least 12 characters.
	*/
	AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
	using the localized international utilities (IU) decimal separator.
	(Note that this function does not return an error code.)
	@param string The string to convert.
	@param value  [out] A buffer in which to return the converted value.
	If the string is not a number, this is set to \c #kAIRealUnknown.
	*/
	AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/**	Converts a number of document points to a formatted Unicode string containing
	a number and ruler units, using the localized international utilities (IU)
	decimal separator, and the passed preference for precision. If passed precision value is -1 
	then user preference for precision is used.
	Uses the currently set ruler units, which can be inches, points, or centimeters.
	(Note that this function does not return an error code.)
	@param value The value to convert.
	@param precision The number of digits to the right of the decimal,
	in the range [0..4]. Pass -1 if user preference for precision should be used.
	@param string [out] A buffer in which to return the converted value, at
	least 12 characters.
	*/
	AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, int precision, ai::UnicodeString& string );

	/** Converts a formatted Unicode string containing a number expressed in ruler units
	to an \c #AIReal value in points. The current ruler units for the artwork
	are used as the original units to scale the result, and the user's
	preferences for precision are applied.
	(Note that this function does not return an error code.)
	@param string The string to convert, which uses the localized international utilities (IU)
	decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm".
	If no unit specifier is included, uses the current ruler units.
	@param value [out] A buffer in which to return the converted value.
	If the string is not a number, this is set to \c #kAIRealUnknown.
	*/
	AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/** Retrieves a string representing the current ruler units.
	@param format The format for the result, one of:
	<br> \c #kShortUnits
	<br> \c #kLongSingularUnits
	<br> \c #kLongPluralUnits
	<br> If, for instance, the current unit is inches, the returned string
	would be "in", "inch", or "inches".
	@param string [out] A buffer in which to return the units string, at least 20 characters.
	*/
	AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string );

	/**	Converts an Illustrator units constant value to an \c #ADMUnits constant value.
	For example, the equivalent of \c #kPointsUnits is \c #kADMPointUnits.
	@param aiUnits The value to convert.
	@param admUnits [out] A buffer in which to return the converted value.
	*/
	AIAPI AIErr (*AIUnitsToADMUnits) ( short aiUnits, ADMUnits *admUnits);

	/**	Converts an \c #ADMUnits constant value to an Illustrator units constant value.
	For example, the equivalent of \c #kADMPointUnits is \c #kPointsUnits.
	@param admUnits The value to convert.
	@param aiUnits [out] A buffer in which to return the converted value.
	*/
	AIAPI AIErr (*ADMUnitsToAIUnits) ( ADMUnits admUnits, short *aiUnits);

	/**	Retrieves the base name of a global object, stripping off any additional
	token that was added to make the name unique (by a function such as
	\c #AICustomColorSuite::NewCustomColorName(), for example).
	@param name [in, out] A string in which to pass a unique name and
	return the base name. The string is modified in place.
	*/
	AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name );

	/** Opens the appropriate application to edit a placed or raster object.
	This is equivalent to an option-double-click on the object with the selection tool.
	@param art The placed or raster art object.
	@return \c #kApplicationNotFoundErr error if the application is not found.
	<br> \c #kObjectNotLinkedErr error if the object is not a placed or raster object.
	*/
	AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art );

	/** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state.  Can be useful if
	you have code that has its own message processing.  */
	AIAPI AIErr (*AppIdle) ( void );

	/**	Builds a directory menu.  Available only in Mac OS.  Builds a menu consisting of the specified path as well as all parent directories of that path.
	@param menu	 The platform-specific menu object.
	@param fileSpec	The file object for the directory.
	*/
	AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec);

	/**	Retrieves a directory.  Available only in Mac OS.  Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu.
	@param fileSpec The file object for the directory.
	@param index The 0-based index of the directory.
	*/
	AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, int index);

	/**	Reveals a file in the Finder.  Available only in Mac OS.
	@param fileSpec	 The file object for the file.
	*/
	AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec);

	/** Disables (dims) the cancel or stop button in the progress bar.
	(Note that this function does not return an error code.)
	*/
	AIAPI void (*DisableProgressCancel) ( void );

	/** Reports whether it is safe to allocate memory. Call when a timer
	or other  asynchronous event triggers an action that allocates memory.
	Not needed when handling notifications or user events; the plug-in does not receive
	these when it is not ok to allocate memory.
	(Note that this function returns a boolean value, not an error code.)
	@param True if it is safe to allocate memory. False if it is not safe; in this case,
	reschedule the action and try again later.
	*/
	AIAPI AIBoolean (*OKToAllocateMemory) ( void );

	// New for AI 11
	/** Retrieves the current date and time.
	@param outValue [out] A buffer in which to return the current date-time value.
	*/
	AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue);

	/* Formats a date into a Unicode string.
	@param inValue The date to format, or \c NULL to format the current date-time value.
	@param formatFlag The format to use, one of:
	<br> \c #kAIShortDateFormat
	<br> \c #kAILongDateFormat
	<br> \c #kAIAbbrevDateFormat
	@param dateStringUS [out] A buffer in which to return the formatted date string.
	*/
	AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const int formatFlag, ai::UnicodeString& dateStringUS);

	/* Formats a time into a Unicode string.
	@param inValue The time to format, or \c NULL to format the current date-time value.
	@param formatFlag The format to use, one of:
	<br> \c #kAIShortTimeFormat
	<br> \c #kAILongTimeFormat
	@param dateStringUS [out] A buffer in which to return the formatted time string.
	*/
	AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const int formatFlag, ai::UnicodeString& dateStringUS);

	/** Retrieves the year value from a date-time.
	@param inValue The date-time value, or \c NULL to get the current date-time.
	@param year [out] A buffer in which to return the value.
	*/
	AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year);

	/** Retrieves the month value from a date-time.
	@param inValue The date-time value, or \c NULL to get the current date-time.
	@param year [out] A buffer in which to return the value.
	*/
	AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month);

	/** Retrieves the day value from a date-time.
	@param inValue The date-time value, or \c NULL to get the current date-time.
	@param year [out] A buffer in which to return the value.
	*/
	AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day);

	/** Retrieves the hour value from a date-time.
	@param inValue The date-time value, or \c NULL to get the current date-time.
	@param year [out] A buffer in which to return the value.
	*/
	AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour);

	/** Retrieves the minute value from a date-time.
	@param inValue The date-time value, or \c NULL to get the current date-time.
	@param year [out] A buffer in which to return the value.
	*/
	AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute);

	/** Retrieves the second value from a date-time.
	@param inValue The date-time value, or \c NULL to get the current date-time.
	@param year [out] A buffer in which to return the value.
	*/
	AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second);

	/** Retrieves the day-of-week value from a date-time.
	@param inValue The date-time value, or \c NULL to get the current date-time.
	@param year [out] A buffer in which to return the value.
	*/
	AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek);

	/**	Launches an application, and optionally opens the current document in it.
	@param spFileSpec The file specification for the application's executable.
	@param openDoc True to open the current document in the new application.
	*/
	AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc);

	/** Generates an appropriate name for a named object, such as
	a layer, swatch, or style, according to the naming rules for that
	collection.
	@param set The naming rules.
	@param name [out] An ai::UnicodeString in which to return the generated name.
	*/
	AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name);

	/** Generates an appropriate name for a copy of a named object, such as
	a layer, swatch, or style, according to the naming rules for that
	collection.
	@param set The naming rules.
	@param original	Original name to copy (may be an empty string).
	@param copy [out] An ai::UnicodeString in which to return the generated name.
	*/
	AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString &copy);

	/** Tests for equality of names within a collection of named objects.
	Use in the \c #AIAutoNameGenerator::HasName() callback function
	to test whether an automatically generated name matches a name
	already in the collection.
	@param name1 The first name.
	@param name2 The second name.
	@param same [out] An AIBoolean reference in which to return true if the names
	are the same.
	*/
	AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same);

	/** Not implemented. (Installs a custom progress reporting mechanism.)
	@return \c #kNotImplementedErr.
	*/
	AIAPI AIErr (*PushCustomProgress) (AICustomProgressSuite *suite);

	/**  Not implemented. (Removes the most recently installed custom progress reporting mechanism.)
	@return \c #kNotImplementedErr.
	*/
	AIAPI AIErr (*PopCustomProgress) ();

	/** Opens a platform-specific dialog for saving a file.
	@param title Dialog title.
	@param AIPlatformFileDlgOpts File types to save. Can be \c NULL.
	@param defaultName Default file name to appear in dialog. Can be \c NULL.
	@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
	return the full path of the file chosen by the user.
	*/
	AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for opening a file.
	@param title Dialog title.
	@param AIPlatformFileDlgOpts File types to open. Can be \c NULL.
	@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
	return the full path of the file chosen by the user.
	*/
	AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for choosing a folder.
	@param title Dialog title.
	@param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and
	return the full path of the folder chosen by the user.
	*/
	AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath);

	/** Displays an alert dialog with a warning icon and OK and Cancel buttons.
	@param msg The message to display.
	@param defaultOk True to make the OK button the default, false to make Cancel the default.
	@param dontShowKey A preference key to use with the "Do not show again" checkbox,
	in which to store the user's choice and save it in the application preferences file.
	When \c NULL, the dialog does not include the checkbox.
	@return True if the dialog was dismissed with the OK button,
	false if it was canceled.
	*/
	AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey);

	/** Displays an alert dialog with a warning icon and an OK button.
	@param msg The message to display.
	@param dontShowKey A preference key to use with the "Do not show again" checkbox,
	in which to store the user's choice and save it in the application preferences file.
	When \c NULL, the dialog does not include the checkbox.
	@return Nothing.
	*/
	AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey);
};



#if defined(MAC_ENV) || defined(WIN_ENV)
/**	 @ingroup Suites
This suite provides utilities specific to the Mac OS platform.

\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAIMacUserSuite and \c #kAIMacUserSuiteVersion.
*/
typedef struct {

	/** In Mac OS only, a callback procedure for a platform-specific 
	modal dialog, called in response to a user-interaction event. 
	Pass this function pointer in the \c filterproc parameter to the 
	Mac OS function \c ModalDialog().

	This callback allows you to update the Illustrator document in
	response to events in the modal dialog, which would otherwise prevent
	any activity in the application while the dialog is shown.

	@param theDialog The window object for the dialog.
	@param theEvent A pointer to the event object for the event that triggered the callback.
	@param itemHit [out] Optional. A buffer in which to return the dialog result. 
	Could be 0 (no result, as the event was not consumed), 1 (the OK button was clicked) or 2 (the Cancel button was clicked).
	@return True if the event was consumed, false if it was not.
	*/
	AIAPI AIBoolean (*ModalFilterProc) ( AIWindowRef theDialog, AIEvent *theEvent, short *itemHit );

	/**	Displays a color swatch preview in a platform window, similar to the one
	shown in the Swatch palette.
	@param window The window object.
	@param swatchRect A pointer to the region in which to display the preview,
	in coordinates relative to the window's origin.
	@param colorSpec A pointer to the swatch color.
	*/
	AIAPI AIErr (*PreviewColorSwatch) ( AIWindowRef window, AIRect *swatchRect, AIColor *colorSpec );

} AI140MacUserSuite;
#endif

#include "AIHeaderEnd.h"


#endif


<|start_filename|>css/styles.css<|end_filename|>
/*Your styles*/

.content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
}

.centered-presenter {
    flex-grow: 1;
    display: flex;
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.centered-presenter_label {
    text-align: center;
    margin: 8px 36px;
    font-size: 110%;
}

.error-state > #svg-plugin {
    opacity: 0.8;
}

.settings-container {
    flex-grow: 1;
    margin: 0 6px 6px;
    position: relative;
}

.bottombuttons {
    margin: 12px 6px 4px;
}

.bottombuttons .topcoat-checkbox {
    margin: 6px 0 0 0;
}

.divider {
    border-top: 1px solid rgba(0,0,0,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    margin: 12px 0 0 0;
}

.label {
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

.label--inline {
    display: inline-block;
    margin: 5px 0 0 0;
    vertical-align: top;
}

.label--disabled {
    opacity: 0.6;
}

.label-placeholder-container {
    position: absolute;
    text-align: center;
    left: 0;
    right: 0;
}



/*
Those classes will be edited at runtime with values specified
by the settings of the CC application
*/
.hostFontColor{}
.hostFontFamily{}
.hostFontSize{}

/*font family, color and size*/
.hostFont{}
/*background color*/
.hostBgd{}
/*lighter background color*/
.hostBgdLight{}
/*darker background color*/
.hostBgdDark{}
/*background color and font*/
.hostElt{}


.hostButton{
    border:1px solid;
    border-radius:2px;
    height:20px;
    vertical-align:bottom;
    font-family:inherit;
    color:inherit;
    font-size:inherit;
}

/* Bloks helper for SVG fills */
.hostFill{}
.hostStroke{}

<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MaskFlattener.h<|end_filename|>
#ifndef __AI100MaskFlattener__
#define __AI100MaskFlattener__

/*
 *        Name:	AI100MaskFlattener.h
 *   $Revision: 1 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 10.0 Mask Flattener Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AIMaskFlattener__
#include "AIMaskFlattener.h"
#endif

#include "AIHeaderBegin.h"

/**
	@defgroup AI100MaskFlattenerAPI Transparency Flattening APIs
	
	The transparency flattening APIs provide facilities for flattening
	transparent artwork into an equivalent collection of opaque artwork.

	@{
 */

/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAI100MaskFlattenerSuite				kAIMaskFlattenerSuite
#define kAIMaskFlattenerSuiteVersion1			AIAPI_VERSION(1)
#define kAI100MaskFlattenerSuiteVersion			kAIMaskFlattenerSuiteVersion1

/*******************************************************************************
 **
 **	Constants
 **
 **/


/*******************************************************************************
 **
 **	Types
 **
 **/

/** Linked EPS object -- indicates that a linked EPS was drawn as a part of
	the artwork to be flattened. Provides the handle to the linked EPS object and a
	boolean indicating whether or not the linked EPS interracts with transparency.
	A linked EPS which does not interract with transparency can be passed
	through to a PostScript device for printing purposes. One which does
	interract needs to be parsed into objects for correct printing.
	
	Since a linked EPS is a placed object a receiver will be sent both this
	snippet and the AIFlatteningInfoPlacedArtObject snippet. The order in
	which these will be sent is not guaranteed. In fact all linked EPS
	snippets will usually be sent as a group at the end. */
typedef struct
{
	AIArtHandle object;
	AIBoolean interacts;
} AI100FlatteningInfoLinkedEPSObject;

/** Placed object -- indicates that a placed object was drawn as a part of
	the artwork to be flattened. */
typedef struct
{
	AIArtHandle object;
} AI100FlatteningInfoPlacedArtObject;

/** The information packet sent to an AIFlatteningInfoReceiver. */
typedef struct
{
	/** Indicates the type of information being sent. */
	AIFlatteningInfoType what;
	/** Contains the information. The valid member is determined based on
		the type of information. */
	union
	{
		AI100FlatteningInfoLinkedEPSObject linkedEPSObject;
		AI100FlatteningInfoPlacedArtObject placedArtObject;
	} x;
} AI100FlatteningInfoSnippet;

/** Prototype for a receiver of flattening information. */
typedef AIErr (*AI100FlatteningInfoReceiver) (void* receiverdata, AI100FlatteningInfoSnippet* snippet);


/*******************************************************************************
 **
 **	Suite
 **
 **/

/** AIMaskFlattenerSuite */
typedef struct {

	AIAPI AIErr (*FlattenArt)(AIArtSet artSet, AIFlatteningOptions *options, short paintOrder, AIArtHandle prep);
	AIAPI AIErr (*CreateTemporaryFlatteningLayer)(AILayerHandle *layer);
	AIAPI AIErr (*FlattenDocumentToLayer)(AILayerHandle layer);
	AIAPI AIErr (*RemoveTemporaryFlatteningLayer)();
	AIAPI AIErr (*IsTemporaryFlatteningLayer)(AILayerHandle layer, AIBoolean *flattening);
	AIAPI AIErr (*ReportError)(AIErr error);

	AIAPI AIErr (*CollectDocumentFlatteningInfo)(AI100FlatteningInfoReceiver receiver, void* receiverdata);

} AI100MaskFlattenerSuite;

/**
	@}
 */


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AS120UserInteraction.h<|end_filename|>
#ifndef __AS120UserInteraction__
#define __AS120UserInteraction__

/*
 *        Name:	AS120UserInteraction.h
 *   $Revision: 1 $
 *      Author:	 <NAME>
 *        Date:	   
 *     Purpose:	Adobe Standard User Interaction Suite
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2001-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "ASUserInteraction.h"
#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAS120UserInteractionSuite			"AS User Interaction Suite"
#define kASUserInteractionSuiteVersion1		1
#define kAS120UserInteractionSuiteVersion	kASUserInteractionSuiteVersion1


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	//	The allowable level of interaction for the application (server).  
	//	This property is the maximum level of interaction allowed with regard 
	//	to displaying modal dialogs & alerts.  Value is persistent until 
	//	explicitly changed.  
	//
	//	Will be exposed in application's scripting interface as a property of 
	//	the application.  Could be exposed in application preference dialog.
	//
	//	Default value - kASInteractWithAll
	//
	ASAPI ASInteractionAllowed	(*GetInteractionAllowed) ( void );
	ASAPI ASErr					(*SetInteractionAllowed) ( ASInteractionAllowed allowed );
	

	//	Check to see if it is allowable to interact with the user in the current 
	//	application context.  Value returned is determined by the settings of 
	//	InteractionAllowed and by the current script execution context.
	//
	ASAPI ASBoolean 			(*InteractWithUser) ( void );

} AS120UserInteractionSuite;


#include "AIHeaderEnd.h"

#endif //	__AS120UserInteraction__



<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191ShapeConstruction.h<|end_filename|>
#ifndef __AI191ShapeConstruction__
#define __AI191ShapeConstruction__

/*
 *        Name:	AI191ShapeConstruction.h
 *     Purpose:	Adobe Illustrator utility routines for some basic shapes construction.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1996-2015 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AITypes.h"
#include "AIArt.h"
#include "AIShapeConstruction.h"

#include "AIHeaderBegin.h"

/** @file AI191ShapeConstructionSuite.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI191ShapeConstructionSuite			"AI Shape Construction Suite"
#define kAIShapeConstructionSuiteVersion7		AIAPI_VERSION(7)
#define kAI191ShapeConstructionSuiteVersion		kAIShapeConstructionSuiteVersion7
#define kAI191ShapeConstructionVersion			kAI191ShapeConstructionSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	This suite provides utilities for creating paths whose shapes
	describe a particular geometric figure. All of the utilities take parameters
	that describe the geometric figure and return a new art object. The art object
	is created in the art tree at the current insertion point as returned by
	\c #AIArtSuite::GetInsertionPoint().

	@note The shape suite is supplied by a plug-in, which the user can remove.
	Clients of the shape suite should fail gracefully if it	is not available.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIShapeConstructionSuite and \c #kAIShapeConstructionVersion.
 */
typedef struct {
	/** Creates a path for a rectangle.
			@param fromPoint The upper left point.
			@param toPoint The lower right point.
			@param isCentered True to center the figure.
			@param isReversed True to reverse the figure.
			@param isConstrained True to constrain the figure.
			@param honorConstrainAngle True to constrain the angle.
			@param art [out] A buffer in which to return the new path object.
			@param size [out] A buffer in which to return a point giving the
				horizontal and vertical size of the figure, in document points.
		*/
	AIAPI AIErr (*NewPointPointRect)( AIRealPoint fromPoint, AIRealPoint toPoint,
									  AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained,
									  AIBoolean honorConstrainAngle,
									  AIArtHandle *art, AIRealPoint *size );

	/** Creates a path for a rectangle of a given size.
			@param fromPoint The upper left point.
			@param size A point whose components specify the horizontal and vertical
				size of the figure,	in document points.
			@param isCentered True to center the figure.
			@param isReversed True to reverse the figure.
			@param isConstrained True to constrain the figure.
			@param honorConstrainAngle True to constrain the angle.
			@param art [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewPointSizeRect)( AIRealPoint fromPoint, AIRealPoint size,
									 AIBoolean isCentered, AIBoolean isReversed,
									 AIBoolean honorConstrainAngle,
									 AIArtHandle *art );

	/** Creates a path for an oval from two focus points.
			@param fromPoint The first focus point.
			@param toPoint The second focus point.
			@param isCentered True to center the figure.
			@param isReversed True to reverse the figure.
			@param isConstrained True to constrain the figure.
			@param isCircumscribed True to circumscribe the figure.
			@param honorConstrainAngle True to constrain the angle.
			@param art [out] A buffer in which to return the new path object.
			@param size [out] A buffer in which to return a point giving the
				horizontal and vertical size of the figure, in document points.
		*/
	AIAPI AIErr (*NewPointPointOval)( AIRealPoint fromPoint, AIRealPoint toPoint,
									  AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, AIBoolean isCircumscribed,
									  AIBoolean honorConstrainAngle,
									  AIArtHandle *art, AIRealPoint *size  );

	/** Creates a path for an oval of a given size.
			@param fromPoint The source point.
			@param size A point whose components specify the horizontal and vertical
				size of the figure, in document points.
			@param isCentered True to center the figure.
			@param isReversed True to reverse the figure.
			@param isConstrained True to constrain the figure.
			@param honorConstrainAngle True to constrain the angle.
			@param art [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewPointSizeOval)( AIRealPoint fromPoint, AIRealPoint size,
									 AIBoolean isCentered, AIBoolean isReversed,
									 AIBoolean honorConstrainAngle,
									 AIArtHandle *art );

	/** Creates a path for a rounded rectangle.
			@param fromPoint The upper left point.
			@param toPoint The lower right point.
			@param isCentered True to center the figure.
			@param isReversed True to reverse the figure.
			@param isConstrained True to constrain the figure.
			@param honorConstrainAngle True to constrain the angle.
			@param art [out] A buffer in which to return the new path object.
			@param size [out] A buffer in which to return a point giving the
				horizontal and vertical size of the figure, in document points.
		*/
	AIAPI AIErr (*NewPointPointRoundedRect)( AIRealPoint fromPoint, AIRealPoint toPoint, AIRealPoint radius,
											 AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained,
											 AIBoolean honorConstrainAngle,
											 AIArtHandle *art, AIRealPoint *size  );

	/** Creates a path for a rounded rectangle of a given size.
			@param fromPoint The upper left point.
			@param size A point whose components specify the horizontal and vertical
				size of the figure, in document points.
			@param isCentered True to center the figure.
			@param isReversed True to reverse the figure.
			@param isConstrained True to constrain the figure.
			@param honorConstrainAngle True to constrain the angle.
			@param art [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewPointSizeRoundedRect)( AIRealPoint fromPoint, AIRealPoint size, AIRealPoint radius,
											AIBoolean isCentered, AIBoolean isReversed,
											AIBoolean honorConstrainAngle,
											AIArtHandle *art );

	/** Creates a path for a rectangle from page coordinates for the sides.
			@param top The X coordinate of the top.
			@param left The Y coordinate of the left edge.
			@param bottom The X coordinate of the bottom.
			@param right The Y coordinate of the right edge.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewRect)( AIReal top, AIReal left,
							AIReal bottom, AIReal right,
	                        AIBoolean reversed, AIArtHandle *newArt);

	/** Creates a path for a rectangle of a given size, centered around a point.
			@param centerX The X coordinate of the center.
			@param centerY The Y coordinate of the center.
			@param height The height in document points.
			@param width The width in document points.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewCenteredRect)( AIReal centerX, AIReal centerY,
									AIReal height, AIReal width,
	                                AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for a rounded rectangle from page coordinates for the sides.
			@param top The X coordinate of the top.
			@param left The Y coordinate of the left edge.
			@param bottom The X coordinate of the bottom.
			@param right The Y coordinate of the right edge.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewRoundedRect)( AIReal top, AIReal left,
								   AIReal bottom, AIReal right,
                                   AIReal horizRadius, AIReal vertRadius,
	                               AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for a rounded rectangle of a given size, centered around a point.
			@param centerX The X coordinate of the center.
			@param centerY The Y coordinate of the center.
			@param height The height in document points.
			@param width The width in document points.
			@param horizRadius The horizontal radius of the rounded corners, in document points.
			@param vertRadius The vertical radius of the rounded corners, in document points.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
  	AIAPI AIErr (*NewCenteredRoundedRect)( AIReal centerX, AIReal centerY,
										   AIReal height, AIReal width,
                                           AIReal horizRadius, AIReal vertRadius,
	                                       AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for an oval inscribed within a rectangle,
		from page coordinates for the sides.
			@param top The X coordinate of the top.
			@param left The Y coordinate of the left edge.
			@param bottom The X coordinate of the bottom.
			@param right The Y coordinate of the right edge.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewInscribedOval)( AIReal top, AIReal left,
									 AIReal bottom, AIReal right,
									 AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for an oval circumscribed around a rectangle,
		from page coordinates for the sides.
			@param top The X coordinate of the top.
			@param left The Y coordinate of the left edge.
			@param bottom The X coordinate of the bottom.
			@param right The Y coordinate of the right edge.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewCircumscribedOval)( AIReal top, AIReal left,
										 AIReal bottom, AIReal right,
										 AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for an oval inscribed within a rectangle of a given size,
		centered around a point.
			@param centerX The X coordinate of the center.
			@param centerY The Y coordinate of the center.
			@param height The height in document points.
			@param width The width in document points.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewInscribedCenteredOval)( AIReal centerX, AIReal centerY,
											 AIReal height, AIReal width,
											 AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for an oval circumscribed around a rectangle of a given size,
		centered around a point.
			@param centerX The X coordinate of the center.
			@param centerY The Y coordinate of the center.
			@param height The height in document points.
			@param width The width in document points.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewCircumscribedCenteredOval)( AIReal centerX, AIReal centerY,
												 AIReal height, AIReal width,
												 AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for a regular polygon of a given radius,
		centered around a point.
			@param numSides The number of sides.
			@param centerX The X coordinate of the center.
			@param centerY The Y coordinate of the center.
			@param radius The radius, in document points.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewRegularPolygon)( ai::uint16 numSides,
									  AIReal centerX, AIReal centerY, AIReal radius,
	                                  AIBoolean reversed, AIArtHandle *newArt );
	/** Creates a path for a regular polygon with a given vertex point,
		centered around a point.
			@param numsides The number of sides.
			@param center The center point.
			@param vertex The vertex point.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewRegularPolygonPoint)( ai::uint16 numsides,
										   AIRealPoint center, AIRealPoint vertex,
	                                       AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for an n-pointed star with a given radius,
		centered around a point.
			@param numPoints The number of star points.
			@param centerX The X coordinate of the center.
			@param centerY The Y coordinate of the center.
			@param radius1 The first radius, in document points.
			@param radius2 The second radius, in document points.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewStar)( ai::uint16 numPoints,
							AIReal centerX, AIReal centerY,
							AIReal radius1, AIReal radius2,
							AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for an n-pointed star with a given vertex point and radius ratio,
		centered around a point.
			@param numPoints The number of star points.
			@param center The center point.
			@param vertex The vertex point.
			@param radiusRation The radius ratio.
			@param reversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewStarPoint)( ai::uint16 numPoints,
								 AIRealPoint center, AIRealPoint vertex,
	                             AIReal radiusRatio,
								 AIBoolean reversed, AIArtHandle *newArt );

	/** Creates a path for spiral around a point.
			@param firstArcCenter The center point for the first arc of the spiral.
			@param start The starting point.
			@param decayPercent The decay ration expressed as a percentage.
			@param numQuarterTurns The number of quarter turns.
			@param clockwiseFromOutside True to spiral clockwise.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewSpiral)( AIRealPoint firstArcCenter, AIRealPoint start,
		AIReal decayPercent, ai::int16 numQuarterTurns,
                              AIBoolean clockwiseFromOutside, AIArtHandle *newArt );

	/** Creates a path for elliptical pie around a point.
			@param center The center point for the ellipse of which this pie is a part of.
			@param width The width of the ellipse of which this pie is a part of.
			@param height The height of the ellipse of which this pie is a part of.
			@param rotationAngle The rotation angle of the ellipse of which this pie is a part of.
			@param startAngle absolute start angle of the pie.
			@param endAngle absolute end angle of the pie.
			@param isReversed True to reverse the figure.
			@param newArt [out] A buffer in which to return the new path object.
		*/
	AIAPI AIErr (*NewEllipticalPie)(AIRealPoint center, AIReal width, AIReal height,
									AIReal rotationAngle, AIReal startAngle, AIReal endAngle,
									AIBoolean isReversed, AIArtHandle *newArt);

} AI191ShapeConstructionSuite;


#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.cpp<|end_filename|>
#include "IllustratorSDK.h"
#include "BloksAIPlugin.h"
#include "BloksAIPluginSuites.h"
#include "SDKPlugPlug.h"
#include "AICSXS.h"
#include "AIMenuCommandNotifiers.h"

#define BLOKS_PING_EVENT "com.westonthayer.bloks.events.PingDownEvent"

Plugin* AllocatePlugin(SPPluginRef pluginRef)
{
	return new BloksAIPlugin(pluginRef);
}

void FixupReload(Plugin* plugin)
{
	BloksAIPlugin::FixupVTable((BloksAIPlugin*) plugin);
}

BloksAIPlugin::BloksAIPlugin(SPPluginRef pluginRef) : Plugin(pluginRef)
{
	fRegisterEventNotifierHandle = NULL;
	fRegisterSelectionChangedHandle = NULL;
	fRegisterUndoHandle = NULL;
	fRegisterRulerHandle = NULL;
	strncpy(fPluginName, kBloksAIPluginName, kMaxStringLength);
}

BloksAIPlugin::~BloksAIPlugin()
{
}

ASErr BloksAIPlugin::StartupPlugin(SPInterfaceMessage *message)
{
	ASErr error = kNoErr;
	error = Plugin::StartupPlugin(message);

	if (!error)
	{
		// Keep ourselves in memory to recieve events
		//error = Plugin::LockPlugin(true);
	}

	if (!error)
	{
		// Register to be notified of when we can register for CSXS events
		error = sAINotifier->AddNotifier(
			fPluginRef,
			"Register Event Notify",
			kAICSXSPlugPlugSetupCompleteNotifier,
			&fRegisterEventNotifierHandle
		);
	}

	if (!error)
	{
		// Register for selection changed
		error = sAINotifier->AddNotifier(
			fPluginRef,
			"Bloks",
			kAIArtPropertiesChangedNotifier, // Art properties changed is like SelectionChanged, but more complete
			&fRegisterSelectionChangedHandle);
	}

	if (!error)
	{
		// Register for undo
		error = sAINotifier->AddNotifier(
			fPluginRef,
			"Bloks",
			kAIUndoCommandPreNotifierStr,
			&fRegisterUndoHandle);
	}

	if (!error)
	{
		// Register for show/hide rulers
		error = sAINotifier->AddNotifier(
			fPluginRef,
			"Bloks",
			kAIShowHideRulersCommandPreNotifierStr,
			&fRegisterRulerHandle);
	}

	//sAIUser->MessageAlert(ai::UnicodeString("Hello from BloksAIPlugin!"));

	return error;
}

static void PingEventHandler(const csxs::event::Event* const eventParam, void* const context)
{
	csxs::event::EventErrorCode result = csxs::event::kEventErrorCode_Success;
	SDKPlugPlug plug;
	plug.Load(sAIFolders);

	csxs::event::Event ev = {
		"com.westonthayer.bloks.events.PingUpEvent",
		csxs::event::kEventScope_Application,
		"ILST",
		"com.westonthayer.bloks",
		"pingupevent"
	};

	result = plug.DispatchEvent(&ev);

	plug.Unload();
}

ASErr BloksAIPlugin::ShutdownPlugin(SPInterfaceMessage *message)
{
	ASErr error = kNoErr;

	if (!error)
	{
		// Deregister for our transform event
		csxs::event::EventErrorCode result = csxs::event::kEventErrorCode_Success;
		SDKPlugPlug plug;
		plug.Load(sAIFolders);
		result = plug.RemoveEventListener(BLOKS_PING_EVENT, PingEventHandler, NULL);

		if (result != csxs::event::kEventErrorCode_Success)
		{
			error = 1;
		}

		plug.Unload();
	}

	if (!error)
	{
		// Allow ourselves to leave memory
		//error = Plugin::LockPlugin(false);
	}

	//sAIUser->MessageAlert(ai::UnicodeString("Goodbye from BloksAIPlugin!"));

	if (!error)
	{
		error = Plugin::ShutdownPlugin(message);
	}

	return error;
}

ASErr BloksAIPlugin::Notify(AINotifierMessage* message)
{
	ASErr error = kNoErr;

	if (message->notifier == fRegisterEventNotifierHandle)
	{
		csxs::event::EventErrorCode result = csxs::event::kEventErrorCode_Success;
		SDKPlugPlug plug;
		plug.Load(sAIFolders);
		result = plug.AddEventListener(BLOKS_PING_EVENT, PingEventHandler, NULL);

		if (result != csxs::event::kEventErrorCode_Success)
		{
			error = 1;
		}

		plug.Unload();
	}
	else if (message->notifier == fRegisterSelectionChangedHandle)
	{
		csxs::event::EventErrorCode result = csxs::event::kEventErrorCode_Success;
		SDKPlugPlug plug;
		plug.Load(sAIFolders);

		csxs::event::Event ev = {
			"com.westonthayer.bloks.events.SelectionChanged",
			csxs::event::kEventScope_Application,
			"ILST",
			"com.westonthayer.bloks",
			"selectionchanged"
		};

		result = plug.DispatchEvent(&ev);

		if (result != csxs::event::kEventErrorCode_Success)
		{
			error = 1;
		}

		plug.Unload();
	}
	else if (message->notifier == fRegisterUndoHandle)
	{
		csxs::event::EventErrorCode result = csxs::event::kEventErrorCode_Success;
		SDKPlugPlug plug;
		plug.Load(sAIFolders);

		csxs::event::Event ev = {
			"com.westonthayer.bloks.events.PreUndo",
			csxs::event::kEventScope_Application,
			"ILST",
			"com.westonthayer.bloks",
			"preundo"
		};

		result = plug.DispatchEvent(&ev);

		if (result != csxs::event::kEventErrorCode_Success)
		{
			error = 1;
		}

		plug.Unload();
	}
	else if (message->notifier == fRegisterRulerHandle)
	{
		csxs::event::EventErrorCode result = csxs::event::kEventErrorCode_Success;
		SDKPlugPlug plug;
		plug.Load(sAIFolders);

		csxs::event::Event ev = {
			"com.westonthayer.bloks.events.PreShowHideRulers",
			csxs::event::kEventScope_Application,
			"ILST",
			"com.westonthayer.bloks",
			"preshowhiderulers"
		};

		result = plug.DispatchEvent(&ev);

		if (result != csxs::event::kEventErrorCode_Success)
		{
			error = 1;
		}

		plug.Unload();
	}

	return error;
}


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ArtStyleParser.h<|end_filename|>
#ifndef __AI120ArtStyleParser__
#define __AI120ArtStyleParser__

/*
 *        Name:	AI120ArtStyleParser.h
 *     Purpose:	Adobe Illustrator Art Style Parser Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIArtStyleParser.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI120ArtStyleParserSuite			kAIArtStyleParserSuite
#define kAIArtStyleParserSuiteVersion3		AIAPI_VERSION(3)
#define kAI120ArtStyleParserSuiteVersion	kAIArtStyleParserSuiteVersion3


/*******************************************************************************
 **
 **	Suite
 **
 **/

/* Illustrator 12.0 Art Style Parser Suite */
typedef struct {

	AIAPI AIErr (*NewParser) ( AIStyleParser* parser );
	AIAPI AIErr (*DisposeParser) ( AIStyleParser parser );

	AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle );

	AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle );

	AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser );

	AIAPI ASInt32 (*CountPreEffects) ( AIStyleParser parser );
	AIAPI ASInt32 (*CountPostEffects) ( AIStyleParser parser );
	AIAPI ASInt32 (*CountPaintFields) ( AIStyleParser parser );
	AIAPI ASInt32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField );

	AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect );
	AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect );
	AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField* paintField );
	AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ASInt32 n,
											  AIParserLiveEffect* effect );

	AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField );

	AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect );
	AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect );
	AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField paintField );
	AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ASInt32 n,
												 AIParserLiveEffect effect );

	AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete );
	AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete );
	AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete );
	AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField,
											  AIParserLiveEffect effect, AIBoolean doDelete );

	AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser );
	AIAPI AIErr (*Simplify) ( AIStyleParser parser );

	AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField );
	AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField );

	AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField );
	AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField );

	AIAPI ASInt32 (*GetGroupContentsPosition) ( AIStyleParser parser );
	AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ASInt32 position );

	AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle );

	AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser );

	AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser );
	AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser );
	AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser );

	AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle );
	AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params );
	AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle );
	AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params );
	AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect );

	AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect );

	AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField );
	AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField );
	AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData );
	AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData );
	AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData );
	AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData );
	AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict );
	AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict );
	AIAPI ASInt32 (*GetColorPosn) ( AIParserPaintField paintField );
	AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ASInt32 colorPosn );
	AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField );
	AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle,
											AILiveEffectParameters* params );
	AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle,
											AILiveEffectParameters params );

	AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict );
	AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict );

	// NEW FOR AI10

	AIAPI AIErr (*GetEvenOdd) ( AIParserPaintField paintField, AIBoolean* evenodd );
	AIAPI AIErr (*SetEvenOdd) ( AIParserPaintField paintField, AIBoolean evenodd );

	AIAPI AIErr (*NewPaintFieldFill) ( const AIFillStyle* fill, AIBoolean evenOdd, const AIArtStylePaintData* paintData,
									   AIParserPaintField* paintField );
	AIAPI AIErr (*NewPaintFieldStroke) ( const AIStrokeStyle* stroke, const AIArtStylePaintData* paintData,
										 AIParserPaintField* paintField );
	AIAPI AIErr (*DisposePaintField) ( AIParserPaintField paintField );

	AIAPI AIErr (*NewParserLiveEffect) ( AILiveEffectHandle liveEffectHandle, AILiveEffectParameters params,
										 AIParserLiveEffect* effect );
	AIAPI AIErr (*DisposeParserLiveEffect) ( AIParserLiveEffect effect );


	AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* style );

} AI120ArtStyleParserSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Color.h<|end_filename|>
#ifndef __AI130Color__
#define __AI130Color__

/*
 *        Name:	AI130Color.h
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator 13.0 Color type definitions (not a suite)
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIRealMath__
#include "AIRealMath.h"
#endif

#include "AIHeaderBegin.h"
#include "AIColor.h"

/** @file AI130Color.h */

/*******************************************************************************
 **
 **	Types
 **
 **/

/** Defines a gradient stop. Each stop is place where the color changes in a blend.
	A set of stops defines the gradient \e ramp.
	See \c #AIGradientStyle and \c #AIGradientSuite.
	*/
typedef struct {
	/** The location between two ramp points where there is an equal mix of this
		color and the color of the next stop. This value is a percentage of the
		distance between the two ramp points, between 13 and 87. The midpoint
		for the previous color stop is not considered. */
	AIReal midPoint;
	/** The position on the blend ramp where this color begins, in the range
		[0..100]. The first point does not have to be at 0, but the first
		color begins at 0. Similarly, the last does not have to be at 100. */
	AIReal rampPoint;
	/** The type and specification of the color for the gradient stop;
		a gray color, a process color, an RGB color, or a custom color. */
	AIColor color;
} AI130GradientStop;

#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110ForeignObject.h<|end_filename|>
#ifndef __AI110ForeignObject__
#define __AI110ForeignObject__

/*
 *        Name:	AI110ForeignObject.h
 *     Purpose:
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2002-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************/
// Imports

#ifndef __AIForeignObject__
#include "AIForeignObject.h"
#endif


#include "AIHeaderBegin.h"

/** @file AI110ForeignObject.h */

/*******************************************************************************/
//	Constants

#define kAI110ForeignObjectSuite		kAIForeignObjectSuite
#define kAIForeignObjectSuiteVersion1	AIAPI_VERSION(1)
#define kAI110ForeignObjectSuiteVersion	kAIForeignObjectSuiteVersion1


/*******************************************************************************/
// Suite


/**
	This suite exposes an API for the foreign object. The foreign object is a
	wrapper around imaging constructs supported by PDF and the Adobe Imaging Model
	but not natively in Illustrtor.

	Foreign objects behave like placed objects in that they can be positioned on
	the page, saved, displayed on the screen, and printed.  But they do not respond
	to other Illustrator editing commands. A foreign object may use global resources
	that are used by other artwork elements. For example it may use fonts or spot
	colors.
	
	Illustrator requires that all spot colors used in a document be installed into
	the swatch list. Each spot color must have a unique definition and spot colors
	used by foreign objects are locked against having their definition edited. The
	installation and locking of spot colors needs to be done once the foreign
	object has been created and is known to be a permanent result of an operation
	on the document	as opposed to a temporary object created during an operation.
	For this reason installation of spot colors is done when an editing operation
	is committed. When spot colors are installed their definitions may conflict
	with existing spot colors. If this is the case the user is prompted to resolve
	the conflict.

	See also the AIFOConversionSuite for APIs that expand foreign objects
	to native Illustrator artwork.
*/
typedef struct AI110ForeignObjectSuite {

	/** Create a new Foreign object. See AIArtSuite::NewArt() for the meanings
		of the paintOrder and prep parameters.  */
	AIAPI AIErr (*New) (short paintOrder, AIArtHandle prep, AIArtHandle *newArt);

	/** Test whether a given object is a foreign object */
	AIAPI AIBoolean (*Is) (AIArtHandle art);

	/** Get the bounds of the foreign object (before application of the matrix) */
	AIAPI AIErr (*GetBounds) ( AIArtHandle art, AIRealRect *bounds );

	/** Set the bounds of the foreign object (before application of the matrix) */
	AIAPI AIErr (*SetBounds) ( AIArtHandle art, AIRealRect *bounds );

	/** Get the transformation matrix of the foreign object. */
	AIAPI AIErr (*GetMatrix) (AIArtHandle art, AIRealMatrix *matrix);

	/** Set the transformation matrix of the foreign object. */
	AIAPI AIErr (*SetMatrix) (AIArtHandle art, AIRealMatrix *matrix);
	
	/** Get the foreign object's display port. The display port is an AGM port.
		After creating a foreign object a client will typically obtain the
		display port and draw into it. The drawing commands are recorded by
		the display port and are played back whenever the foreign object is
		rendered. One way to draw into the display port is to set it as the
		portV6 member of the AIDrawArtData structure and use the
		AIDrawArtSuite::DrawArt() API. Clients who have access to the AGM
		interface can also draw directly into the the display list or play it's
		contents to another AGM port. */
	AIAPI AIErr (*GetDisplayPort)(AIArtHandle art, AIDisplayPortHandle *port);

	/** No-op. */
	AIAPI AIErr (*InstallResources)(AIArtHandle art);
	
	/** This API is intended for use by the AIFOConversionSuite implementation
		of the #kAIFOConversionSuppressAttributes flag. It duplicates the input
		object stripping off any attributes that affect the rendering of the
		contents of the object other than the matrix. */
	AIAPI AIErr (*DuplicateForConversion)(AIArtHandle art, short paintOrder, AIArtHandle prep, AIArtHandle* newArt);

} AI110ForeignObjectSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Context.h<|end_filename|>
#ifndef __AI90Context__
#define __AI90Context__

/*
 *        Name:	AI90Context.h
 *   $Revision: 1 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 6.0-9.0 Runtime Context Environment.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AIContext__
#include "AIContext.h"
#endif


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI90AppContextSuite		"AI Context Suite"
#define kAIAppContextSuiteVersion2	AIAPI_VERSION(2)
#define kAI90AppContextVersion		kAIAppContextSuiteVersion2


/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*GetPlatformAppWindow) ( AIWindowRef *appWindow );

	AIAPI AIErr (*PushAppContext) ( SPPluginRef plugin, AIAppContextHandle *appContext );
	AIAPI AIErr (*PopAppContext) ( AIAppContextHandle appContext );

	AIAPI AIErr (*MacGetAppQDGlobal) ( void **appQD );

} AI90AppContextSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUser.h<|end_filename|>
#ifndef __AIUser__
#define __AIUser__

/*
 *        Name: AIUser.h
 *   $Revision: 15 $
 *      Author:
 *        Date:
 *     Purpose: Adobe Illustrator User Utilities Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2016 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file
 * in accordance with the terms of the Adobe license agreement
 * accompanying it. If you have received this file from a source other
 * than Adobe, then your use, modification, or distribution of it
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AIArt__
#include "AIArt.h"
#endif

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIColor__
#include "AIColor.h"
#endif

#ifndef __AIMenu__
#include "AIMenu.h"
#endif

#ifndef __AIFileFormat__
#include "AIFileFormat.h"
#endif

#ifndef __AIDocumentView__
#include "AIDocumentView.h"
#endif

#include "IAIFilePath.hpp"

#include "AIHeaderBegin.h"

/** @file AIUser.h */


/************************************************************************s*******
 **
 **	Constants
 **
 **/

// v.14.0
#define kAIUserSuite				"AI User Suite"
#define kAIUserSuiteVersion13		AIAPI_VERSION(13)
#define kAIUserSuiteVersion			kAIUserSuiteVersion13
#define kAIUserVersion				kAIUserSuiteVersion

#if Macintosh || MSWindows
#define kAIMacUserSuite				"AI Mac User Suite"
#define kAIMacUserSuiteVersion7		AIAPI_VERSION(7)
#define kAIMacUserSuiteVersion		kAIMacUserSuiteVersion7
#define kAIMacUserVersion			kAIMacUserSuiteVersion
#endif

/** Unit formats for \c #AIUserSuite::GetUnitsString().*/
enum {
	/** Short unit format; for example, "in". */
	kShortUnits,
	/** Long singular unit format; for example, "inch". */
	kLongSingularUnits,
	/** Long plural unit format; for example, "inches". */
	kLongPluralUnits
};

/**
	Constants for alert button choices.
	See \c #AIUserSuite.
**/
enum AIAnswer {
	kAIAnswer_No = 0,
	kAIAnswer_Yes,
	kAIAnswer_Cancel,
	kAIAnswer_Invalid =  0xFFFFFFFF
};

/**
	Flag values to determine the stage of input for which
	a validation callback has been called.
	See \c #AIUserSuite::GetInputFromUser() and \c #IsValidInputProc.
**/
enum AIValidationStage
{
	/** Callback invoked on entry of a single character in the text field. */
	kAIValidationStage_interactive = 0,
	/** Callback invoked on dismissal of alert dialog with OK button. */
	kAIValidationStage_onOk = 1
};

/**
	Identifiers for predefined cursors.
	See \c #AIUserSuite::SetCursor()
**/
enum AIPredefinedCursor
{
	kAIIBeamCursorID = -1,
	kAICrossCursorID = -2,
	kAIWaitCursorID = -3,
	kAIArrowCursorID = -4
};

/** @ingroup Errors
See \c #AIUserSuite. */
#define kUnknownUnitsErr		'?UNT'

/** @ingroup Errors
	See \c #AIUserSuite::EditInOriginalApp(). */
#define kApplicationNotFoundErr	'App?'

/** @ingroup Errors
See \c #AIUserSuite::EditInOriginalApp(). */
#define kObjectNotLinkedErr		'!Lnk'


/** Opaque reference to a date-time value. Access with the \c #AIUserSuite. */
typedef ai::uint32 AIUserDateTime;

/** Opaque reference to a resource manager handle. See \c #AIUserSuite::CreateCursorResourceMgr().*/
typedef struct _t_Opaque_AIResourceManagerHandle *AIResourceManagerHandle;

/**	Callback function pointer passed to \c #AIUserSuite::GetInputFromUser().
    Can be called at either of two stages: when the alert dialog OK button is pressed (\c #kAIValidationStage_onOk)
	or when a character of text is entered in the text field (\c #kAIValidationStage_interactive).
    The function must validate the input string, and return true if the string is valid in the context.
    If the string fails validation, return false and set the \c errorStr output parameter to a string
    suitable for display in the alert dialog as a tool tip.
*/
typedef AIBoolean (*IsValidInputProc) (AIValidationStage validationStage, const ai::UnicodeString &input, ai::UnicodeString &errorStr, void *userdata);

/** Global locale format.  Equivalent to the ENGLISH locale. */
#define kAIUniversalLocaleFormat		0x0000
/** Local resource locale format.  Defined by the locale of the current resource chain. */
#define kAIResourceLocaleFormat			0x0001
/** System locale format.  Defined by the current system locale. */
#define kAISystemLocaleFormat			0x0002

/** Short date display format.  An example of a short date is along the lines of "1/1/2007".  The exact form is locale dependent.
	See \c #AIUserSuite::GetDateString()  */
#define kAIShortDateFormat				0x0000
/** Long date display format.   An example of a long date is "Tuesday, March 20, 2007".  The exact form is locale dependent.
	See \c #AIUserSuite::GetDateString()  */
#define kAILongDateFormat				0x0100
/** Abbreviated date display format.  In Windows, equivalent to the short format except in the Japanese locale where it is the long format.
                                      In Mac OS, an abbreviated date is "Tue, Mar 20, 2007".  The exact form is locale dependent.
	See \c #AIUserSuite::GetDateString()  */
#define kAIAbbrevDateFormat				0x0200
/** Short time display format.  An example is "hh:mm".  The exact form is locale dependent.
	See \c #AIUserSuite::GetTimeString() */
#define kAIShortTimeFormat				0x0000
/** Long time display format.  An example is "hh:mm:ss".  the exact form is locale dependent.
	See \c #AIUserSuite::GetTimeString()  */
#define kAILongTimeFormat				0x0100


/*******************************************************************************
 **
 **	Types
 **
 **/

/** Information about the kinds of names allowed for a named entity (such as
	layers, swatches, and styles). Used to generate a legal name, using
	\c #AIUserSuite::NextName() and AIUserSuite::CopyOfName().

	The following pseudocode indicates how you can create your own AutoNameGenerator class by publicly inheriting AIAutoNameGenerator
	and following the implementation guidelines.

@code
	class AutoNameGenerator : public AIAutoNameGenerator {
	public:
		// Constructor for a name generator. Its supplied with the pluginref in
		// case the name generator needs to look in the plugin's resources e.g for
		// the default name. The next new name index is supplied since the plugin
		// probably needs to store this in its globals so that it can be preserved
		// across unload and reload.
		AutoNameGenerator (SPPluginRef pluginref, int nextNameIndex)
		{
			// fill in fDefaultName
			GetDefaultName(pluginref);

			// initialize the base members
			// note kMaxCollectionStringLength accounts for null terminator and maximumLength does not
			maximumLength = kMaxCollectionStringLength-1;
			uniqueNames = true;
			baseName = fDefaultName;
			nextNewNameIndex = nextNameIndex;
			HasName = sHasName;
		}

	private:
		void GetDefaultName (SPPluginRef pluginref)
		{
			// Somehow initialize fDefaultName with the default name for the
			// collection. The pluginref is probably needed in order to look
			// up the name in the plugin resources.
		}

		AIErr hasName (const ai::UnicodeString &name, AIBoolean &hasit)
		{
			// Code to answer the question. When comparing 'name' against
			// names of objects in the collection it's important to use the
			// AIUserSuite::SameName() API. The name generation process does
			// not use a simple string comparison.
		}

		static AIAPI AIErr sHasName (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit)
		{
			return static_cast<AutoNameGenerator&>(self).hasName(name, hasit);
		}

		ai::UnicodeString fDefaultName;
	};
@endcode
*/
struct AIAutoNameGenerator
{

	/** The maximum length for names in the collection, a number of
		\c ASUnicode elements. Excludes the null terminator. */
	ai::int32 maximumLength;

	/** True if names in the collection must be unique. */
	AIBoolean uniqueNames;

	/** A base for generating names, a Unicode-encoded string. */
    ai::UnicodeString baseName;

	/** The index to use for the next new name generated. Name generation
		functions automatically increment the index. */
	ai::int32 nextNewNameIndex;

	/** A callback function to determine whether a given name is already in
		the set. Use \c #AIUserSuite::SameName() to compare names, not simple
		string equality.
			@param self This structure.
			@param name The name to test.
			@param hasit [out] An AIBoolean reference in which to return true if the name is
				already in the collection.
			@return An error to abort name generation; the error code
				is returned to the caller.
		*/
    AIAPI AIErr (*HasName) (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit);
};




/**	These functions manage a collection of file type specifiers
    for dialog functions in \c #AIUserSuite, which show drop-down
    lists for each file type. */
struct AIFileDialogFilters
{
	/** Adds a file-type filter with default pattern (*.*)
	(Note that this function does not return an error code.)
	@param desc		Description of file type.
	*/
	void AddFilter(const ai::UnicodeString &desc);


	/** Adds a file-type filter with a \c UnicodeString pattern.
	(Note that this function does not return an error code.)
	@param desc		Description of file type.
	@param pattern	One or more Windows wildcard patterns to filter
	for the file type, separated with semicolons (;).
	For example, <code>Addfilter("JPEG Files", "*.jpg;*.jpeg");</code>
	*/
	void AddFilter(const ai::UnicodeString &desc, const ai::UnicodeString &pattern);

	/** Retrieves a single string containing type descriptions and patterns.
	(Note that this function returns a string value, not an error code.)
	@return A string containing a series of null-delimited descriptions
	and patterns, terminated by a double-null. For example:
	"first description\0first pattern\0...last description\0last pattern\0\0"
	*/
	const ai::UnicodeString &GetFilter() const;

private:
	ai::UnicodeString filterStr;
};

/**
A structure that describes how the result should be returned by \c #AIUserSuite::EvaluateExpression().
*/
struct AIExpressionOptions
{
	/** The units in which the output value is expressed, one of the distance-measuring
	units from \c #AITypes::AIUnits, or the constant \c #kAINoUnits to indicate an
	absolute value. Other values cause parameter errors.
	*/
	ai::uint32 unit;

	/** The minimum value to which the result is clipped, expressed in the specified units. */
	AIDouble minValue;

	/** The maximum value to which the result is clipped, expressed in the specified units.*/
	AIDouble maxValue;

	/** The previous value of control. Can be any valid value. In case of erroneous or unallowed inStringVal,
	finalValue would be same as old value */
	AIDouble oldValue;

	/** The number of digits after the decimal in the result. */
	ai::uint32 precision;

};

/** @ingroup Suites
	This suite provides utility functions for working with Illustrator,
	including unit conversion utilities and a progress bar.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIUserSuite and \c #kAIUserSuiteVersion.
	*/
struct AIUserSuite {

	/** Reports whether a user has canceled the current operation.
		(Note that this function returns a boolean value, not an error code.)
			@return	True if the user has canceled an operation
				by pressing Command-dot or clicking Cancel or Stop in the
				progress bar.
		*/
	AIAPI AIBoolean (*Cancel) ( void );

	/** Updates the progress bar.
		(Note that this function does not return an error code.)
			@param current A number between 0 and \c max that represents
				how far the operation has progressed.
			@param max The maximum value, representing 100% progress.
		*/
	AIAPI void (*UpdateProgress) ( ai::int32 current, ai::int32 max );

	/**	Sets the text message displayed in the progress bar. If not provided,
		the text line is blank.
		(Note that this function does not return an error code.)
			@param text The text message.
		*/
	AIAPI void (*SetProgressText) ( const ai::UnicodeString& text );

	/** Explicitly close the progress bar if one is currently shown.
		(Note that this function does not return an error code.)
		*/
	AIAPI void (*CloseProgress) ( void );

	/**	Converts a number of document points to a Unicode string, using
		the period as a decimal separator.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4].
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
		using the period as a decimal separator.
		(Note that this function does not return an error code.)
			@param string The string to convert.
			@param value  [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
		*/
	AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value );
	/**	Converts a number of document points to a Unicode string, using the localized
		international utilities (IU) decimal separator.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4].
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
		using the localized international utilities (IU) decimal separator.
		(Note that this function does not return an error code.)
			@param string The string to convert.
			@param value  [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
		*/
	AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/**	Converts a number of document points to a formatted Unicode string containing
		a number and ruler units, using the localized international utilities (IU)
		decimal separator, and the passed preference for precision. If passed precision value is -1
		then user preference for precision is used.
		Uses the currently set ruler units, which can be inches, points, or centimeters.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4]. Pass -1 if user preference for precision should be used.
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, ai::int32 precision, ai::UnicodeString& string );

	/** Converts a formatted Unicode string containing a number expressed in ruler units
		to an \c #AIReal value in points. The current ruler units for the artwork
		are used as the original units to scale the result, and the user's
		preferences for precision are applied.
		(Note that this function does not return an error code.)
			@param string The string to convert, which uses the localized international utilities (IU)
				decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm".
				If no unit specifier is included, uses the current ruler units.
			@param value [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
	  	*/
	AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/** Retrieves a string representing the current ruler units.
			@param format The format for the result, one of:
				<br> \c #kShortUnits
				<br> \c #kLongSingularUnits
				<br> \c #kLongPluralUnits
				<br> If, for instance, the current unit is inches, the returned string
				would be "in", "inch", or "inches".
			@param string [out] A buffer in which to return the units string, at least 20 characters.
		*/
	AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string );

	/**	Retrieves the base name of a global object, stripping off any additional
		token that was added to make the name unique (by a function such as
				\c #AICustomColorSuite::NewCustomColorName(), for example).
			@param name [in, out] A string in which to pass a unique name and
				return the base name. The string is modified in place.
		*/
	AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name );

	/** Opens the appropriate application to edit a placed or raster object.
		This is equivalent to an option-double-click on the object with the selection tool.
			@param art The placed or raster art object.
			@return \c #kApplicationNotFoundErr error if the application is not found.
				<br> \c #kObjectNotLinkedErr error if the object is not a placed or raster object.
		*/
	AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art );

	/** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state.  Can be useful if
	    you have code that has its own message processing.  */
	AIAPI AIErr (*AppIdle) ( void );

	/**	Builds a directory menu.  Available only in Mac OS.  Builds a menu consisting of the specified path as well as all parent directories of that path.
			@param menu	 The platform-specific menu object.
			@param fileSpec	The file object for the directory.
		*/
	AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec);

	/**	Retrieves a directory.  Available only in Mac OS.  Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu.
			@param fileSpec The file object for the directory.
			@param index The 0-based index of the directory.
		*/
	AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, ai::int32 index);

	/**	Reveals a file in the Finder.  Available only in Mac OS.
			@param fileSpec	 The file object for the file.
		*/
	AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec);

	/** Disables (dims) the cancel or stop button in the progress bar.
		(Note that this function does not return an error code.)
		*/
	AIAPI void (*DisableProgressCancel) ( void );

	/** Reports whether it is safe to allocate memory. Call when a timer
		or other  asynchronous event triggers an action that allocates memory.
		Not needed when handling notifications or user events; the plug-in does not receive
		these when it is not ok to allocate memory.
		(Note that this function returns a boolean value, not an error code.)
			@param True if it is safe to allocate memory. False if it is not safe; in this case,
				reschedule the action and try again later.
		*/
	AIAPI AIBoolean (*OKToAllocateMemory) ( void );

	// New for AI 11
	/** Retrieves the current date and time.
			@param outValue [out] A buffer in which to return the current date-time value.
		*/
	AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue);

	/* Formats a date into a Unicode string.
			@param inValue The date to format, or \c NULL to format the current date-time value.
			@param formatFlag The format to use, one of:
				<br> \c #kAIShortDateFormat
				<br> \c #kAILongDateFormat
				<br> \c #kAIAbbrevDateFormat
			@param dateStringUS [out] A buffer in which to return the formatted date string.
		*/
	AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS);

	/* Formats a time into a Unicode string.
			@param inValue The time to format, or \c NULL to format the current date-time value.
			@param formatFlag The format to use, one of:
				<br> \c #kAIShortTimeFormat
				<br> \c #kAILongTimeFormat
			@param dateStringUS [out] A buffer in which to return the formatted time string.
		*/
	AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS);

	/** Retrieves the year value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year);

	/** Retrieves the month value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month);

	/** Retrieves the day value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day);

	/** Retrieves the hour value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour);

	/** Retrieves the minute value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute);

	/** Retrieves the second value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second);

	/** Retrieves the day-of-week value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek);

	/**	Launches an application, and optionally opens the current document in it.
			@param spFileSpec The file specification for the application's executable.
			@param openDoc True to open the current document in the new application.
		*/
	AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc);

	/** Generates an appropriate name for a named object, such as
		a layer, swatch, or style, according to the naming rules for that
		collection.
			@param set The naming rules.
			@param name [out] An ai::UnicodeString in which to return the generated name.
		*/
	AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name);

	/** Generates an appropriate name for a copy of a named object, such as
		a layer, swatch, or style, according to the naming rules for that
		collection.
			@param set The naming rules.
			@param original	Original name to copy (may be an empty string).
			@param copy [out] An ai::UnicodeString in which to return the generated name.
 		*/
    AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString &copy);

	/** Tests for equality of names within a collection of named objects.
		Use in the \c #AIAutoNameGenerator::HasName() callback function
		to test whether an automatically generated name matches a name
		already in the collection.
			@param name1 The first name.
			@param name2 The second name.
			@param same [out] An AIBoolean reference in which to return true if the names
				are the same.
		*/
	AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same);


	/** Opens a platform-specific dialog for saving a file.
     		@param title Dialog title.
			@param AIFileDialogFilters File types to save. Can be \c NULL.
			@param defaultName Default file name to appear in dialog. Can be \c NULL.
			@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
				return the full path of the file chosen by the user.
		*/
	AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for opening a file.
     		@param title Dialog title.
			@param AIFileDialogFilters File types to open. Can be \c NULL.
			@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
				return the full path of the file chosen by the user.
	  */
	AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for choosing a folder.
     		@param title Dialog title.
			@param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and
				return the full path of the folder chosen by the user.
	  */
	AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath);

	/** Displays an alert dialog with a warning icon and OK and Cancel buttons.
			@param msg The message to display.
			@param defaultOk True to make the OK button the default, false to make Cancel the default.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
				in which to store the user's choice and save it in the application preferences file.
				When \c NULL, the dialog does not include the checkbox.
			@return True if the dialog was dismissed with the OK button,
				false if it was canceled.
		*/
	AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey);

	/** Displays an alert dialog with a warning icon and an OK button.
			@param msg The message to display.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
				in which to store the user's choice and save it in the application preferences file.
				When \c NULL, the dialog does not include the checkbox.
			@return Nothing. It does not return AIErr
		*/
	AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey);

	/** Displays an modal alert dialog with a warning icon and an OK button which doesnot get dismissed on ESC key.
			@param msg The message to display.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
			in which to store the user's choice and save it in the application preferences file.
			When \c NULL, the dialog does not include the checkbox.
			@return Nothing. It does not return AIErr
			*/
	AIAPI void (*MessageAlertEx) (const ai::UnicodeString& msg, const char* dontShowKey);

	/** Displays a predefined dialog with a yes/no question.
		The dialog displays text specified with a unicodeString, and
		buttons with default labels Yes, No, and Cancel.
		@param msg The text string.
		@return The \c #AIAnswer constant for the button pressed to dismiss the dialog,
		or \c #kAIAnswer_Invalid in case of error.
		@see \c #ErrorAlert(), \c #MessageAlert(), \c #YesNoAlert()
		*/
	AIAPI AIAnswer (*QuestionAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog with a yes/no question.
		The dialog displays text specified with a unicodeString, and
		buttons with default labels Yes and No.
		@param msg The text string.
		@return The \c #AIAnswer constant for the button pressed to dismiss the dialog,
		or \c #kAIAnswer_Invalid in case of error.
		@see \c #ErrorAlert(), \c #MessageAlert(), \c #QuestionAlert()
		*/
	AIAPI AIAnswer (*YesNoAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog that informs the user that an error occurred.
		The dialog displays text specified with a unicodeString, with the platform-specific
		error icon at the left, and an OK button.
		@param msg The text string.
		@return Nothing.It doesnot return an AIErr
		@see \c #MessageAlert(),  \c #QuestionAlert(), \c #YesNoAlert()
		*/
	AIAPI void (*ErrorAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog with an informational message.
		The dialog displays text specified with a unicodeString, with the
		platform-specific message icon at the left, and an OK button.
		@param msg The text string.
		@return Nothing.It doesnot return an AIErr
		@see \c #ErrorAlert(), \c #QuestionAlert(), \c #YesNoAlert()
		*/
	AIAPI void (*MessageAlert)(const ai::UnicodeString &msg);

	/**	Invokes the platform-specific color picker dialog.
	@param inLocation[int]	The position of the dialog.	 (-1, -1) centers the dialog on the screen.
	@param inColor[in]	The initially selected color value.
	@param outColor	[out] A buffer in which to return the selected color.
	@return True if the user selected a color, false otherwise.
	*/
	AIAPI AIBoolean (*ChooseFromOSColorPicker) (const AIPoint &inLocation,
		const AIRGBColor& inColor, AIRGBColor* outColor);

	/** Evaluates a numeric expression to create a formatted string suitable for display.
	Call, for example, when a numeric edit control loses focus or the user presses "=".
	If the result of evaluation is not a valid numeric value as per options specified, it is recommended that
	the associated control display the last known-good value, or a blank string
	accompanied by a beep or other error indicator.

	@param expr [in] The expression to be evaluated (typically entered by the user
	in the control).
	@param options [in] An \c #AIExpressionOptions structure that determines how
	a numeric result is obtained. Specifies the units for the
	result, a range to which the result is clipped, and the precision.
	@param evaluatedExpr [out] A buffer in which to return the formatted display string.
	@param isChanged [out] A buffer in which to return true if the result of evaluation
	is different from result of user input. Example in case of non numeric input or out of bounds input.
	@param numericValue [out] A buffer in which to return the numeric value, according to the specified options.
	*/
	AIAPI AIErr (*EvaluateExpression)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr,
		AIBoolean & isChanged , AIDouble& numericValue);

	/** Invokes a modal dialog in which the user must input text. The dialog cannot be dismissed
		until text is entered. If default text is provided, however, the user can dismiss the
		dialog without changing that text.

		@param title The title for the dialog
		@param messageText A text message to display above the input field, or NULL to display no message.
		@param label The label for the text field.
		@param ioName [in/out] On input, a default string for the text field. This is replaced by text that
			the user enters, if any.
		@param IsValidInputProc A function pointer to a validation callback that validates the input as typed by the user.
			The first parameter to this call is a \c #AIValidationStage constant that reports whether the call is
			made upon text entry, or upon dismissal of the dialog.
		@param userdata Developer-defined user data to be passed to the validation callback.
		@param maxInputChars The maximum number of characters that user can enter in the text field.
	 */
	AIAPI AIErr (*GetInputFromUser) ( const ai::UnicodeString &title, const ai::UnicodeString* messageText, const ai::UnicodeString &label, ai::UnicodeString& ioField, IsValidInputProc validator, void *userdata, ai::int32 maxInputChars);

	/**  Creates a singleton resource manager instance to be used for cursors.
		Call once for a plugin, after startup is completed.	Destroy the instance on
		application shutdown (not plug-in shutdown).
		@param inRscMgr [out] A buffer in which to return the resource-manager handle.
		@see DisposeCursorResourceMgr()
	*/
	AIAPI AIErr (*CreateCursorResourceMgr)(SPPluginRef, AIResourceManagerHandle* inRscMgr);

	/**  Sets the image to be used for the plug-in's cursor.
		@param cursorID The resource ID of the cursor, or a \c #AIPredefinedCursor
			constant value to use one of the predefined cursors. Cursor images must be
			in PNG format.
		@param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr().
	*/
	AIAPI AIErr (*SetCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr);

	/**  Disposes of the plug-in's singleton resource manager. Call once when
		 \c #kAIApplicationShutdownNotifier is received. Do not call as part of plug-in shutdown.
		@param The resource manager handle, as returned on creation.
	*/
	AIAPI AIErr (*DisposeCursorResourceMgr)(AIResourceManagerHandle);

	/** Reports the current language in use.
	 @param lang [out] A buffer in which to return the language code.
	 */
	AIAPI AIErr (*GetAILanguageCode)(ai::UnicodeString& lang);
    
	/** Reports the maximum scale factor for all the screens in a Mac OS system,
            or the application's UI scale factor in a Windows system.
            @return The scale factor.
    */

	AIAPI AIReal (*GetMaximumScaleFactorOnSystem)();


	/** Reports the ratio of Art Scale factor and View Scale Factor.
		(ArtScaleFactor/ ViewScaleFactor)
    */
	AIAPI AIReal(*GetArtToViewScaleFactor)(AIDocumentViewHandle view);


	/** Launches a folder.
	@param folderPath Path of the folder to launch.
	@return \c #kBadParameterErr if the path object is invalid or references a file rather than a folder.
	*/
	AIAPI AIErr(*LaunchFolder)(ai::FilePath folderPath);

};



/*
	Inline members
*/
	inline void AIFileDialogFilters::AddFilter(const ai::UnicodeString &desc)
	{
		AddFilter(desc, ai::UnicodeString("*"));
	}

	inline void AIFileDialogFilters::AddFilter(const ai::UnicodeString &desc, const ai::UnicodeString &pattern)
	{
		if (!desc.empty() && !pattern.empty())
		{
			const ai::UnicodeString::size_type len = filterStr.length();
			if (len)
				filterStr.erase(len-1);	// erase one null of the previous double null terminators
			filterStr.append(desc);
			filterStr.append(1, 0);
			filterStr.append(pattern);
			filterStr.append(2, 0);
		}
	}

	inline const ai::UnicodeString &AIFileDialogFilters::GetFilter() const
	{
		return filterStr;
	}

#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Symbol.h<|end_filename|>
#ifndef __AI100Symbol__
#define __AI100Symbol__

/*
 *        Name:	AI100Symbol.h
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 10.0 Symbol Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1990-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AISymbol.h"

#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI100SymbolSuite			kAISymbolSuite
#define kAISymbolSuiteVersion1		AIAPI_VERSION(1)
#define kAI100SymbolSuiteVersion	kAISymbolSuiteVersion1


/*******************************************************************************
 **
 **	AISymbol Suite (legacy AI 10 version)
 **
 **/

// This suite is exported by the core, so it should always be available.
typedef struct {

	// Functions for examining and managing the set of symbols
	AIAPI AIErr (*CountSymbolPatterns) ( long *count, ASBoolean includeUnlisted );
	AIAPI AIErr (*GetNthSymbolPattern) ( long n, AIPatternHandle *symbolPattern, ASBoolean includeUnlisted );
												// This is a zero-based index.
												// (See note at bottom for a discussion of listed vs unlisted.)
	AIAPI AIErr (*GetSymbolPatternByName) ( char *name, AIPatternHandle *symbolPattern );
  
	AIAPI AIErr (*GetSymbolByNameFromDocument) ( char* name, AIPatternHandle *symbolPattern,
												   AIDocumentHandle document );
	AIAPI AIErr (*CountSymbolPatternsFromDocument) ( long* count, AIDocumentHandle document );
	AIAPI AIErr (*GetNthSymbolPatternFromDocument) ( long n, AIPatternHandle *symbolPattern,
													 AIDocumentHandle document );

	AIAPI AIErr (*NewSymbolPattern) ( AIPatternHandle *newSymbolPattern, AIArtHandle definitionArt, ASBoolean unlisted );
												// If definitionArt is not null, it will be copied as the
												// defining art. If it is null, then the definition will
												// be an empty group. (We do not bother making a
												// checkerboard pattern like NewPattern does.)
												// (See note at bottom for a discussion of listed vs unlisted.)
	AIAPI AIErr (*NewSymbolPatternFromSel) ( AIPatternHandle *symbolPattern );
												// If something is selected, it will be copied as the
												// defining art. If nothing is selected, then the definition
												// will be an empty group. (You don't get a choice of unlisted
												// on this one - symbols defined from the selected art are assumed
												// to be permanent.)
	AIAPI AIErr (*NewSymbolPatternFromSelGetBounds) ( AIPatternHandle *symbolPattern, AIRealRect *selectionBounds );
												// Like NewSymbolPatternFromSel except that it returns the bounds
												// of the selected art used to define the symbol (which cannot be
												// obtained by calling GetArtBounds on the symbol pattern art after
												// defining it, because like patterns and brush patterns the copied
												// definition art gets moved to a standardized location.) It could
												// be obtained by getting all the selected objects and unioning up
												// their bounds, but since NewSymbolPatternFromSel knows the bounds
												// anyway it is easy to hand it back. This is mainly intended for
												// clients who want to insert an instance of the symbol in place
												// of the selection after it is created.

	AIAPI AIErr (*DeleteSymbolPattern) ( AIPatternHandle symbolPattern );
	AIAPI AIBoolean (*ValidateSymbolPattern) ( AIPatternHandle symbolPattern );
												// Is this symbol still known to the system?
												// (It should never be necessary to use this if you don't
												// hang onto the AIPatternHandle between messages, or if
												// you process the kAIArtSymbolSetChangedNotifier.)

	// Functions for examining and modifying a symbol definition
	AIAPI AIErr (*GetSymbolPatternArt) ( AIPatternHandle pattern, AIArtHandle *art );
												// This 'peeks' at the actual symbol definition.
												// The art returned cannot be edited, just examined or duplicated!!
	AIAPI AIErr (*PasteSymbolPatternArt) ( AIPatternHandle symbolPattern );
												// analogous to GetBrushPattern & GetPattern
												// (I just don't think 'Get' is a very intuitive
												// name for inserting a copy of the defining art
												// into the current layer or insertion group.)
												// Especially since we use GetPatternArt to mean
												// peek at the real definition.
	AIAPI AIErr (*CopySymbolPatternArt) ( AIPatternHandle symbolPattern,
												short paintOrder, AIArtHandle prep, AIArtHandle *newArt );
												// paintOrder, prep and newArt have the same meaning as DuplicateArt
												// in the AIArt suite.
												// The recommended way to get an editable copy of a symbol definition
												// is not to use PasteSymbolPatternArt, but rather to use NewArtEntry
												// from the AIDictionary suite to create a group that isn't in the
												// artwork, insert the definition copy into that, and then delete
												// the dictionary entry. That way you don't modify the art tree
												// and trigger irrelevant synchronization, change notifications, etc.
												// (This is often used by export filters that need to make systematic
												// adjustments to Illustrator art before getting it in an easy-to-export
												// form.)

	AIAPI AIErr (*SetSymbolPatternArt) ( AIPatternHandle symbolPattern, AIArtHandle definitionArt );
												// Copy the definitionArt as the new symbol definition.
												// Any existing instances of the symbol will be updated.   
	AIAPI AIErr (*SetSymbolPatternFromSel) ( AIPatternHandle symbolPattern );
												// Analogous to SetBrushPattern and SetPattern.
												// Again, I just think that 'Set' isn't very intuitive for something
												// that copies the selected art.

	// The functions below use C strings. If you have or want Pascal strings, you can
	// also get and set the name of a symbol using GetPatternName and SetPatternName
	// from AIPattern.h.
	AIAPI AIErr (*GetSymbolPatternName) ( AIPatternHandle symbolPattern, char *name, int bufferSize );
		// If the actual symbol name is too long to fit in the buffer, it will be filled
		// with a truncated form of the name and kNameTooLongErr will be returned.
	AIAPI AIErr (*SetSymbolPatternName) ( AIPatternHandle symbolPattern, char *name );
		// If the name length exceeds kMaxSymbolNameLength then kNameTooLongErr will be returned
		// If the name contains illegal characters, is of zero length, or consists entirely of spaces,
		// then kInvalidNameErr will be returned. In either case, the symbol will retain the original name.
		// If the name is already used for another symbol, then kNameInUseErr will be returned 
	AIAPI AIErr (*GetSymbolPatternDisplayName) ( char *name );
		// strips any hidden characters from the end of a name. The name is modified in place.
	AIAPI AIErr (*SetSymbolPatternBaseName) ( AIPatternHandle symbolPattern, char *name );
		// Like SetSymbolPatternName, except if the given name is already used, the name will be changed
		// by appending numbers until a unique name is generated. (If the name is very long and already
		// in use, then the prefix may be truncated before appending numbers, but this is unlikely to
		// happen since kSymbolMaxNameLength is so large.)

	// Functions for creating, examining and modifying symbol instances (art objects of type kSymbolArt)
	AIAPI AIErr (*NewInstanceCenteredInView) ( AIPatternHandle symbolPattern,
								short paintOrder, AIArtHandle prep, AIArtHandle *newArt );
	AIAPI AIErr (*NewInstanceAtLocation) ( AIPatternHandle symbolPattern, AIRealPoint center,
								short paintOrder, AIArtHandle prep, AIArtHandle *newArt );
	AIAPI AIErr (*NewInstanceWithTransform) ( AIPatternHandle symbolPattern, AIRealMatrix *transform,
								short paintOrder, AIArtHandle prep, AIArtHandle *newArt );

	// You can also use NewArt from the AIArt suite, which is like NewInstanceCenteredInView where
	// the symbolPattern is the first one in the set. (It will return kBadParameterErr if there are
	// no symbols defined in the current document.)

	AIAPI AIErr (*GetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle *symbolPattern );
	AIAPI AIErr (*SetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle symbolPattern );

	// Return the matrix used internally by Illustrator to transform the SymbolPatternArt into an instance
	AIAPI AIErr (*GetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );
	AIAPI AIErr (*SetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );

	// Return the matrix that can be used by a plugin to transform the SymbolPatternArt into an instance
	// (If you are going to be using the TransformArt suite, this is the matrix you want.)
	AIAPI AIErr (*GetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );
	AIAPI AIErr (*SetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform );

	// You can also translate between the two forms of the matrix using AIRealMatrixRealSoft
	// and AIRealMatrixRealHard from the AIHardSoft suite. (Do not use AIRealMatrixHarden and
	// AIRealMatrixSoften, which harden/soften only the tx ty components.) 

	AIAPI AIErr (*InsertExpandedSymbolArt) ( AIArtHandle symbolArt,
												short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt );
												// paintOrder, prep and newArt have the same meaning as DuplicateArt
												// in the AIArt suite.
												// If the instance matrix is a simple placement matrix, then this
												// function is equivalent to BreakLinkToSymbol, see below. If the
												// instance matrix includes a scale, rotation, shear or reflection
												// then it expands any appearances or plugin groups inside the symbol
												// definition, followed by a transformation by the instance matrix.
												// Also if the instance matrix includes a shear or a non-uniform
												// scale, it expands strokes before applying the instance matrix.
												// This routine thus preserves appearance of the instance at the
												// cost of preserving the original editability of the symbol definition.  
												// Does not delete symbolArt.

	// Functions for listing, unlisting and sorting listed symbols
	AIAPI AIBoolean (*IsSymbolPatternListed) ( AIPatternHandle symbolPattern );
	AIAPI AIErr (*MakeSymbolPatternListed) ( AIPatternHandle symbolPattern );
	AIAPI AIErr (*UnlistSymbolPattern) ( AIPatternHandle symbolPattern );

	AIAPI AIErr (*SortListedSymbolPatterns) ( void );
	AIAPI AIErr (*MoveSymbolPatternInList) ( AIPatternHandle symbolPattern, int index );
											// Make the listed symbolPattern have the given index
											// Use -1 to move to end of list

	// Function for examining symbol usage
	AIAPI AIBoolean (*ArtUsesSymbolPattern) ( AIArtHandle art, short searchScope, AIPatternHandle targetSymbol,
											AIPatternHandle *oneFoundSymbol,
											AIPatternHandle ***allFoundSymbols, int *foundCount,
											int *globalObjectUsage);
		/* Check to see whether the given art object uses the targetSymbol.
			searchScope is a bit vector; see the flags defined above

			If the art object is null, then the entire artwork is searched. In this case,
			the kSearchDescendants flag is assumed even if it is not on in the searchScope,
			because it is meaningless to search the whole artwork unless you look inside layer groups.

			The targetSymbol can be null; if so the art is searched for any symbol usage
			If the targetSymbol is not null, then the remaining three parameters are all ignored!

			The oneFoundSymbol pointer can also be null. It is ignored if targetSymbol is not null.
			If targetSymbol is null, and oneFoundSymbol is not null, and the art object uses exactly
				one symbol within the scope searched, then *oneFoundSymbol will be returned as that symbol.
			If it uses multiple symbols, the function returns true but *oneFoundSymbol is returned null.
			If it uses multiple symbols and allFoundSymbols is non-null, then *allFoundSymbols is returned
				as a handle to an array of all those symbols and *foundCount. Like the AIMatchingArt
				suite, the memory is allocated by ArtUsesSymbolPattern, and must be freed by the
				calling plugin using MdMemoryDisposeHandle.
			*oneFoundSymbol is mostly intended for the Symbols palette to decide which symbol to select,
				and if an object uses multiple symbols then nothing is selected. The searchScope in this
				type of usage should not include kSearchNestedSymbolPatterns, because if symbol A's
				definition includes symbol B, and the user selects an instance of symbol A, we want
				to consider symbol A to be selected. But if they select a particle set containing
				instances of both symbol A and symbol B, we want to select neither symbol in the palette. 
			*allFoundSymbols with a null art object is mostly intended for implementing the
				"Select All Unused" command in the Symbols palette.
			*allFoundSymbols with a non-null art object is mostly intended for examining which symbol
				patterns are referenced by a plugin group that puts multiple symbols in its dictionary,
				such as a particle set.

			If globalObjectUsage is not null, we additionally report whether the symbol was found inside
				graph designs or inside other symbols. (This does not affect the searchScope, so if there
				was a non-null input art object, any non-zero return value will mean that it was found
				inside a graph design or symbol that was used in that object.)
		*/

	AIAPI AIErr (*BreakLinkToSymbol) ( AIArtHandle symbolArt,
												short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt );
										// paintOrder, prep and newArt have the same meaning as DuplicateArt
										// in the AIArt suite.
										// Like CopySymbolPatternArt for the symbolArt's symbolPattern
										// followed by a transformation by the instance matrix, but
										// more efficient than using the TransformArt suite since
										// it is all done internally. Also transfers attributes from
										// the symbol instance to the transformed defintion.
										// If the instance matrix is a simple placement matrix, then this
										// function is equivalent to InsertExpandedSymbolArt, see above,
										// since neither function does any deep expansion when the matrix
										// is simple. But this function does not do any internal expansion
										// of strokes, active styles or plugin groups inside the symbol
										// definition even when a rotational or shear transform is applied
										// to the instance. Since transforming an object containing such
										// active elements is not always visually identical to transforming
										// what it "looks like", this routine preserves the full structure
										// and editability of the symbol definition, at the cost of sometimes
										// not preserving the appearance of the instance.  
										// Does not delete symbolArt.

	AIAPI AIErr (*RetargetForCurrentDocument) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern );
		/*	Analogous to functions by the same name in AIArtStyle, AIObjectSet and AIPathStyle.
			Intended primarily for drag-and-drop between library palettes and the main document
			palette.

			This function can be safely used with fill patterns and brush patterns as well as
			with symbol patterns (see the AIPattern and AIBrushPattern suites.) Therefore the
			description below refers to "patterns". This should be taken to mean a symbol pattern
			if passed a symbol pattern, a fill pattern if passed a fill pattern, etc.

			The function was not needed for fill patterns because they are usually retargetted
			indirectly using the AIPathStyle suite, and it was not needed for brush patterns
			because they are usually retargetted indirectly using the AIObjectSet suite. But
			there is no corresponding data structure that wraps around a symbol pattern in
			a palette.

			If the srcPattern is in the current document, just returns it back.
			If the srcPattern is not in the current document, but there is already a pattern
			   in the current document with the same name and the same definition, returns the
			   handle to that pattern.
			If the srcPattern is not in the current document and there is no pattern with the
			   same name and definition, then it creates a new pattern in the current document
			   with the same definition art, and a name based on the srcPattern's name (possibly
			   appending numbers if the srcPattern's name is assigned to a pattern in the current
			   document with a different definition.) All other global objects (colors, patterns,
			   brushes, styles, etc.) used indirectly in the definition are similarly retargetted,
			   using an existing object if one matches and creating a new one otherwise.

			For purposes of determining sameness, a listed symbol never matches an unlisted one,
			even if they otherwise have the same name and definition.
		*/

} AI100SymbolSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/common/includes/SDKAboutPluginsHelper.h<|end_filename|>
//========================================================================================
//  
//  $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/SDKAboutPluginsHelper.h $
//
//  $Revision: #1 $
//
//  Copyright 1987 Adobe Systems Incorporated. All rights reserved.
//  
//  NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance 
//  with the terms of the Adobe license agreement accompanying it.  If you have received
//  this file from a source other than Adobe, then your use, modification, or 
//  distribution of it requires the prior written permission of Adobe.
//  
//========================================================================================

#ifndef __SDKAboutPluginsHelper_H__
#define __SDKAboutPluginsHelper_H__

/** Helps plug-ins that want to display company contact information and copyright in
	an about box. Each third party company creates an about plug-ins menu group under 
	Illustrator's about group (see kAboutMenuGroup). A separate menu item is added 
	under the company's about plug-ins menu group:
	<pre>
		About MyCompany Plug-ins	>	MyPlugin1Name...
									>	MyPlugin2Name...
	</pre>

	For example, SDK sample plug-ins add the "About SDK Plug-ins" menu group. On the
	Macintosh the group is displayed under the Illustrator menu:
	<pre>
		Illustrator	>	About SDK Plug-ins	>	TextTest...
											>	Tutorial...
	</pre>

	On Windows the group is displayed under the Help menu:
	<pre>
		Help	>	About SDK Plug-ins	>	TextTest...
										>	Tutorial...
	</pre>

	When a menu item is used the plug-in receives a menu message and displays
	plug-in specific information containing contact details and copyright.

	To reduce coupling with plug-ins that want to use this helper
	the suites it requires are acquired and released locally by this
	class. That way there's no stuff for client code to set up before
	using the helper.

	@see kAboutMenuGroup
	@see AIMenuSuite, ADMBasicSuite10
*/
class SDKAboutPluginsHelper {
public:

	/**	Constructor - no special initialization in here.
	*/
	SDKAboutPluginsHelper();

	/**	Destructor - no special termination in here.
	*/
	virtual ~SDKAboutPluginsHelper();

	/** Adds a menu group for the given company under Illustrator's about group
		(if the group does not already exist) and adds a menu item for the given plug-in.
		@param message IN startup message.
		@param companyMenuGroupName IN identifier for your company's about plug-ins menu group.
		@param companyName IN name of your company's about plug-ins menu group for display.
		@param pluginName IN name of your plug-in for display.
		@param menuItemHandle OUT passed in the call back when the menu item is used.
		@return kNoErr on success, other AIErr otherwise.
	*/
	AIErr AddAboutPluginsMenuItem(SPInterfaceMessage* message, 
										 const char* companyMenuGroupName, 
										 const ai::UnicodeString& companyName, 
										 const char* pluginName, 
										 AIMenuItemHandle* menuItemHandle);

	/** Pops about box for the plug-in.
		@see ADMBasicSuite10::MessageAlert
		@param message menu message (kCallerAIMenu / kSelectorAIGoMenuItem) the plug-in is responding to.
		@param title window title for the about box.
		@param description information about the plug-in.
	*/
	void PopAboutBox(AIMenuMessage* message, const char* title, const char* description);

private:
	/** Checks whether the given group name already exists.
		@param targetGroupName IN group name to check.
		@param groupAlreadyMade OUT true if group exists, false otherwise.
		@return kNoErr on success, other AIErr otherwise.
	*/
	AIErr GroupExists(const char* targetGroupName, bool& groupAlreadyMade);

private:
	/** Menu suite.
	*/
	AIMenuSuite*			fAIMenu;

	/** UIUtils suite.
	*/
	AIUserSuite* fAIUser;
};

#endif // __SDKAboutPluginsHelper_H__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mask.h<|end_filename|>
#ifndef __AI90Mask__
#define __AI90Mask__

/*
 *        Name:	AI90Mask.h
 *   $Revision: 2 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 9.0 Mask Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIMask.h"


#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAI90BlendStyleSuite			"AI Blend Style Suite"
#define kAIBlendStyleSuiteVersion1		AIAPI_VERSION(1)
#define kAI90BlendStyleVersion			kAIBlendStyleSuiteVersion1

#define kAI90MaskSuite					"AI Mask Suite"
#define kAIMaskSuiteVersion1			AIAPI_VERSION(2)
#define kAI90MaskVersion				kAIMaskSuiteVersion1



/*******************************************************************************
 **
 **	Types
 **
 **/


/*******************************************************************************
 **
 **	Suite
 **
 **/


/* The blend style suite allows manipulation of the compositing attributes
	of object styles. */
typedef struct {
	
	/* The following methods are a short hand for getting the object's style
		and then modifying the opacity applied by the style to the object as
		a whole. */
	AIAPI AIBlendingMode (*GetBlendingMode) (AIArtHandle art);
	AIAPI AIErr (*SetBlendingMode) (AIArtHandle art, AIBlendingMode mode);
	
	AIAPI AIReal (*GetOpacity) (AIArtHandle art);
	AIAPI AIErr (*SetOpacity) (AIArtHandle art, AIReal opacity);
	
	AIAPI AIBoolean (*GetIsolated) (AIArtHandle art);
	AIAPI AIErr (*SetIsolated) (AIArtHandle art, AIBoolean isolated);
	
	AIAPI AIKnockout (*GetKnockout) (AIArtHandle art);
	AIAPI AIKnockout (*GetInheritedKnockout) (AIArtHandle art); // always explicitly on or off.
	AIAPI AIErr (*SetKnockout) (AIArtHandle art, AIKnockout knockout);
	
	AIAPI AIBoolean (*GetAlphaIsShape) (AIArtHandle art);
	AIAPI AIErr (*SetAlphaIsShape) (AIArtHandle art, AIBoolean alphaIsShape);
	
	/* Copy the compositing attributes applied globally by the style applied
		to the source object to the destination object.*/
	AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination);

	/* Manipulate the attributes applied to the object via a dictionary. See
		the definitions above for the names of the appropriate keys. These
		methods are a short hand for first getting the object's style and
		then using the Get/SetStyleAttrs methods. */
	AIAPI AIErr (*GetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs);
	AIAPI AIErr (*SetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs);

	/* Manipulate the attributes applied by the style via a dictionary. See
		the definitions above for the names of the appropriate keys. */
	AIAPI AIErr (*GetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs);
	AIAPI AIErr (*SetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs,
								  AIArtStyleHandle* newStyle);

	/* Manipulate the attributes applied by a specific filter element of an
		active style via a dictionary. See the definitions above for the names
		of the appropriate keys. * /
	AIAPI AIErr (*GetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef style);
	AIAPI AIErr (*SetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef attrs);*/
	
	/* Get and set the transparency attributes for the current selection in the document */
	AIAPI AIErr (*GetCurrentTransparency) (AIDictionaryRef styleAttrs,
										   AIDictionaryRef fillAttrs,
										   AIDictionaryRef strokeAttrs);
	AIAPI AIErr (*SetCurrentTransparency) (AIDictionaryRef styleAttrs,
										   AIDictionaryRef fillAttrs,
										   AIDictionaryRef strokeAttrs);
	
	AIAPI AIErr (*GetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs);
	AIAPI AIErr (*GetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs);
	AIAPI AIErr (*SetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs,
											 AIArtStyleHandle* newStyle);
	AIAPI AIErr (*SetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs,
											   AIArtStyleHandle* newStyle );

} AI90BlendStyleSuite;


typedef struct {

	/* Masks are reference counted. Call Release once you are done with
		a mask to free its memory. */
	AIAPI ASInt32 (*AddRef) (AIMaskRef mask);
	AIAPI ASInt32 (*Release) (AIMaskRef mask);

	/* GetMask obtains the mask associated with an object if any. */
	AIAPI AIErr (*GetMask) (AIArtHandle object, AIMaskRef* mask);

	/* Create a mask for an object if it doesn't already have one. The
		art of the newly created mask is an empty group object. */
	AIAPI AIErr (*CreateMask) (AIArtHandle object);

	/* Delete the mask associated with an object. */
	AIAPI AIErr (*DeleteMask) (AIArtHandle object);

	/* The link state controls whether the mask is linked to the object.
		When the mask is linked certain actions on the object automatically
		apply to the mask. For example, rotating the object will also
		rotate the mask. */
	AIAPI AIBoolean (*GetLinked) (AIMaskRef mask);
	AIAPI AIErr (*SetLinked) (AIMaskRef mask, AIBoolean linked);

	/* The disabled state controls whether the mask is ignored for rendering
		purposes. */
	AIAPI AIBoolean (*GetDisabled) (AIMaskRef mask);
	AIAPI AIErr (*SetDisabled) (AIMaskRef mask, AIBoolean disabled);

	/* The inverted state controls whether the opacity of the mask is
		inverted before being applied. */
	AIAPI AIBoolean (*GetInverted) (AIMaskRef mask);
	AIAPI AIErr (*SetInverted) (AIMaskRef mask, AIBoolean inverted);

	/* Copy the mask and the link status. */
	AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination);

	/* GetArt returns the handle to the mask art which will be NULL if there
		is none. */
	AIAPI AIArtHandle (*GetArt) (AIMaskRef mask);

	/* Methods to query and manipulate whether the mask art is being edited. */
	AIAPI AIBoolean (*IsEditingArt) (AIMaskRef mask);
	AIAPI AIErr (*SetEditingArt) (AIMaskRef mask, AIBoolean isedit);

	/* If "mask" is a group object which is the mask art for some other object
		then on return "masked" will be the masked object. If not then
		"masked" will be nil on return. */
	AIAPI AIErr (*GetMaskedArt) (AIArtHandle mask, AIArtHandle* masked);

} AI90MaskSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPanel.h<|end_filename|>
/*************************************************************************
*
*ADOBE SYSTEMS INCORPORATED
* Copyright 2010 Adobe Systems Incorporated
* All Rights Reserved.
*
*NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the 
*terms of the Adobe license agreement accompanying it.  If you have received this file from a 
*source other than Adobe, then your use, modification, or distribution of it requires the prior 
*written permission of Adobe.
*
**************************************************************************/

#ifndef __AIPANEL_H__
#define __AIPANEL_H__

#include "AITypes.h"
#include "IAIUnicodeString.h"
#include "IAIAutoBuffer.h"
/** @file AIPanel.h */

/*******************************************************************************
**
**	Constants
**
**/

#define kAIPanelSuite					"AI Panel Suite"
#define kAIPanelSuiteVersion2			AIAPI_VERSION(2)
#define kAIPanelSuiteVersion			kAIPanelSuiteVersion2
#define kAIPanelVersion					kAIPanelSuiteVersion


#define kAIPanelFlyoutMenuSuite				"AI Panel Flyout Menu Suite"
#define kAIPanelFlyoutMenuSuiteVersion2		AIAPI_VERSION(2)
#define kAIPanelFlyoutMenuSuiteVersion		kAIPanelFlyoutMenuSuiteVersion2
#define kAIPanelFlyoutMenuVersion			kAIPanelFlyoutMenuSuiteVersion

/*******************************************************************************
**
** Types
**
**/
#ifdef WIN_ENV
	typedef HWND AIPanelPlatformWindow;
#elif MAC_ENV
    #ifdef __OBJC__
	@class NSView;
	typedef NSView*	AIPanelPlatformWindow;
    #else
    typedef void*	AIPanelPlatformWindow;
    #endif
#else
#error unknown configuration
#endif

/** An opaque reference to a panel. See \c #AIPanelSuite. */
typedef struct _opaque_AIPanel* AIPanelRef;

/** An opaque reference to a panel flyout menu. See \c #AIPanelFlyoutMenuSuite. */
typedef struct _opaque_AIPanelFlyoutMenu* AIPanelFlyoutMenuRef;

/** Constants for the glyphs that mark a menu item as selected.
    See \c #AIPanelFlyoutMenuSuite. */
enum {
	kAIPanelFlyoutMenuItemMark_NONE,
	kAIPanelFlyoutMenuItemMark_CHECK,
	kAIPanelFlyoutMenuItemMark_BULLET,
	kAIPanelFlyoutMenuItemMark_DASH
};

/** The glyph that marks a menu item as selected.
    See \c #AIPanelFlyoutMenuSuite. */
typedef ai::uint32 AIPanelFlyoutMenuItemMark;

/** A developer-defined data object that can be associated with a panel.
    See \c #AIPanelSuite. */
typedef void* AIPanelUserData;

/** Prototype of a function that is called before a panel's flyout menu is made visible.
        @param inPanel The panel object.
    	@see \c #AIPanelFlyoutMenuSuite.
*/
typedef void AIAPI (*AIPanelFlyoutMenuPreVisibilityProc)(AIPanelRef inPanel);

/** Prototype of a function that is called after a panel's flyout menu has been shown.
	@param inPanel		The panel object.
	@param itemID		The selected item ID. Zero value of itemID means user cancelled the menu without selecting any item.
    @see \c #AIPanelFlyoutMenuSuite.
*/
typedef void AIAPI (*AIPanelFlyoutMenuProc)(AIPanelRef inPanel, ai::uint32 itemID);

/** Prototype of a function that is called after the visibility of a panel is changed.
	@param inPanel		The panel object.
	@param isVisible	The new visibility of the panel
    @see \c #AIPanelSuite.
*/
typedef void AIAPI (*AIPanelVisibilityChangedNotifyProc)(AIPanelRef inPanel, AIBoolean isVisible);

/** Prototype of a function that is called after the size of a panel is changed.
	@param inPanel		The panel object.
    @see \c #AIPanelSuite.
*/
typedef void AIAPI (*AIPanelSizeChangedNotifyProc)(AIPanelRef inPanel);

/** Prototype of a function that is called after the state of a panel is changed.
	@param inPanel		The panel object.
	@param newState		The new panel state
    @see \c #AIPanelSuite.
*/
typedef void AIAPI (*AIPanelStateChangedNotifyProc)(AIPanelRef inPanel, ai::int16 newState);

/** Prototype of a function that is called after a panel is closed by clicking on the close button.
	@param inPanel		The panel object.
    @see \c #AIPanelSuite.
*/
typedef void AIAPI (*AIPanelClosedNotifyProc)(AIPanelRef inPanel);


/************************************************************************/
/// Error Values return by the suite
/************************************************************************/
/** @ingroup Errors
    @see \c #AIPanelSuite.
	*/
#define kAIInvalidPanelRef			'INVD'



/*******************************************************************************
**
**	Suite
**
**/

/**	@ingroup Suites
Provides functions for creating and managing panels.

\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAIPanelSuite	and \c #kAIPanelSuiteVersion.
*/

struct AIPanelSuite{

	/** Creates a new panel.
	@param inPluginRef		The plug-in that is creating the panel.
	@param inID				A unique identifier for the new panel.
	@param inTitle			The title of the panel.
	@param inStateCount 	The number of host layouts for the panel; must be at least 1.
	@param inMinSize		Minimum size of the panel.
	@param isResizable		True to make the panel resizable.
	@param inFlyoutMenu		The flyout menu for the panel, or NULL to hide the flyout icon.
	@param inUserData		Developer-defined data to be associated with the panel.
	@param outPanel			[out] A buffer in which to return the new panel object.
 	*/
	AIAPI AIErr	(*Create)(SPPluginRef inPluginRef, const ai::UnicodeString& inID, const ai::UnicodeString& inTitle,
							ai::int16 inStateCount, const AISize& inMinSize, AIBoolean isResizable,
							AIPanelFlyoutMenuRef inFlyoutMenu, AIPanelUserData inUserData, AIPanelRef& outPanel);


	/** Deletes a panel object.
	This must be called when the plug-in receives \c #kAIApplicationShutdownNotifier.
	@param inPanel			The panel object.
 	**/
	AIAPI AIErr	(*Destroy)(AIPanelRef inPanel);


	/** Retrieves the platform-specific window/view used for the panel.
	@param inPanel			The panel object.
	@param outPlatformWindow The platform specific window/view of the panel
    **/
	AIAPI AIErr (*GetPlatformWindow)(AIPanelRef inPanel, AIPanelPlatformWindow& outPlatformWindow);


	/** Shows or hides the panel. If the panel is part of a tab group,
	 the whole group is affected
	@param inPanel			The panel object.
	@param inShow			True to make panel visible, false to hide it
	  **/
	AIAPI AIErr	(*Show)(AIPanelRef inPanel, AIBoolean inShow);



	/** Reports the effective visibility of a panel.
	If the panel is part of a tabbed group but is not the frontmost tab,
	it is not considered visible.
	@param inPanel			The panel object.
	@param outIsShown		[out] A buffer in which to return true of the panel
							is effectively visible, false otherwise.
	  **/
	AIAPI AIErr (*IsShown)(AIPanelRef inPanel, AIBoolean& outIsShown);


	/**  Retrieves developer-defined data from a panel.
	@param inPanel			The panel object.
	@param outUserData		[out] A buffer in which to return developer-defined data
							associated with the panel.
	  **/
	AIAPI AIErr	(*GetUserData)(AIPanelRef inPanel, AIPanelUserData& outUserData);


	/** Associates developer-defined data with a panel, which can be used
	in developer-defined callbacks.
	@param inPanel			The panel object.
	@param inUserData		The developer-defined data.
	 **/
	AIAPI AIErr	(*SetUserData)(AIPanelRef inPanel, AIPanelUserData inUserData);


	/** Sets a panel title.
	@param inPanel			The panel object.
	@param inTitle			The new title of the panel
	 **/
	AIAPI AIErr	(*SetTitle)(AIPanelRef inPanel, const ai::UnicodeString& inTitle);


	/** Retrieves the panel title.
	@param inPanel			The panel object.
	@param outTitle			[out] A buffer in which to return the title string.
	  **/
	AIAPI AIErr	(*GetTitle)(AIPanelRef inPanel, ai::UnicodeString& outTitle);


	/** Sets the icon to be used when a panel is collapsed. Only PNG icons can be used.
    @param inPanel			The panel object.
    @param inPNGData		The PNG resource data for the icon.
    @param inDataSize		The size of the resource data in bytes.
    @param inPNGDarkData	The PNG resource data for an alternate icon, to be used in "dark" mode.
    @param inDarkDataSize	The size of the alternate resource data in bytes.
    */
	AIAPI AIErr	(*SetIcon)(AIPanelRef inPanel, const ai::AutoBuffer<const ai::uint8*>& inPNGData, const ai::AutoBuffer<ai::uint32>& inDataSize,
							const ai::AutoBuffer<const ai::uint8*>& inPNGDarkData, const ai::AutoBuffer<ai::uint32>& inDarkDataSize);


    /** Sets the icon to be used when a panel is collapsed, using an existing resource.
    Only PNG icons can be used.
    @param inPanel			The panel object.
    @param iconResId		The resource identifier of a PNG icon.
    @param darkIconcResId	The resource identifier of an alternate PNG icon for "dark" mode.
    **/
	AIAPI AIErr	(*SetIconResourceID)(AIPanelRef inPanel, const ai::AutoBuffer<ai::uint32>& iconResId, const ai::AutoBuffer<ai::uint32>& darkIconResId);

	/** Retrieves the inner dimensions of the current panel, which excludes the frame, title, and any
		platform-specific decorations.
	@param inPanel			The panel object.
	@param outSize			[out] A buffer in which to return the size value.
	  **/
	AIAPI AIErr	(*GetSize)(AIPanelRef inPanel, AISize& outSize);


	/** Sets the minimum size for a panel's inner dimensions.
	@param inPanel			The panel object.
	@param inMinimumSize	The size value.
	  **/
	AIAPI AIErr	(*SetMinimumSize)(AIPanelRef inPanel, const AISize& inMinimumSize);


	/** Retrieves the minimum minimum size for a panel's inner dimensions.
	@param inPanel			The panel object.
	@param outMinimumSize	[out] A buffer in which to return the size value.
	 **/
	AIAPI AIErr	(*GetMinimumSize)(AIPanelRef inPanel, AISize& outMinimumSize);


	/**  Sets the maximum size for a panel's inner dimensions.
	@param inPanel			The panel object.
	@param inMaximumSize	The size value.
	 **/
	AIAPI AIErr	(*SetMaximumSize)(AIPanelRef inPanel, const AISize& inMaximumSize);


	/**  Retrieves the maximum size for a panel's inner dimensions.
	@param inPanel			The panel object.
	@param outMaximumSize	[out] A buffer in which to return the size value.
	  **/
	AIAPI AIErr	(*GetMaximumSize)(AIPanelRef inPanel, AISize& outMaximumSize);


	/** Sets both the constrained and unconstrained preferred sizes
	    for a panel's inner dimensions.
		The constrained size is used when a dialog is frame docked.
		The unconstrained size is used when the dialog is floating.

	@param inPanel			The panel object.
	@param inPreferredSize	The new preferred size value.
	 **/
	AIAPI AIErr	(*SetPreferredSizes)(AIPanelRef inPanel, const AISize& inPreferredSize);


	/** Sets all sizes at once for a panel's inner dimensions.
	@param inPanel							The panel object.
	@param inMinimumSize					Minimum panel size.
	@param inPreferredUnconstrainedSize		Preferred unconstrained panel size.		.
	@param inPreferredConstrainedSize		Preferred constrained panel size.
	@param inMaximumSize					Maximum panel size.
	@return error **/
	AIAPI AIErr	(*SetSizes)(AIPanelRef inPanel, const AISize& inMinimumSize, const AISize& inPreferredUnconstrainedSize,
							const AISize& inPreferredConstrainedSize, const AISize& inMaximumSize);


	/** For non-resizable panels, sets the minimum, maximum,
	preferred unconstrained and preferred constrained sizes
	for a panel's inner dimensions to a single size value.
	For resizable panels, sets only the preferred unconstrained and
	constrained sizes to the given size.
	@param inPanel			The panel object.
	@param inSize			The new size value.
	 **/
	AIAPI AIErr	(*SetSize)(AIPanelRef inPanel, const AISize& inSize);


	/** Retrieves the preferred constrained size for a panel's inner dimensions.
	The constrained size is used when a dialog is frame docked.
	@param inPanel							The panel object.
	@param outPreferredConstrainedSize		[out] A buffer in which to return the size value.
	 **/
	AIAPI AIErr (*GetPreferredConstrainedSize)(AIPanelRef inPanel, AISize& outPreferredConstrainedSize);


	/** Retrieves the preferred unconstrained size for a panel's inner dimensions.
	The unconstrained size is used when the dialog is floating.
	@param inPanel							The panel object.
	@param outPreferredUnconstrainedSize	[out] A buffer in which to return the size value.
	**/
	AIAPI AIErr (*GetPreferredUnconstrainedSize)(AIPanelRef inPanel, AISize& outPreferredUnconstrainedSize);


	/** Sets the current state of a panel.
	@param inPanel			The panel object.
	@param inCurrentState	The new current state, must be at least 1.
	 **/
	AIAPI AIErr	(*SetCurrentState)(AIPanelRef inPanel, ai::int16 inCurrentState);


	/** Retrieves the current state of a panel
	@param inPanel			The panel object.
	@param outCurrentState	[out] A buffer in which to return the state value.
	 **/
	AIAPI AIErr	(*GetCurrentState)(AIPanelRef inPanel, ai::int16& outCurrentState);


	/** Modifies the state count of a panel.
	@param inPanel			The panel object.
	@param inStateCount		The new state count. Must be at least 1.
	**/
	AIAPI AIErr	(*SetStateCount)(AIPanelRef inPanel, ai::int16 inStateCount);


	/** Retrieves the state count of a panel
	@param inPanel			The panel object.
	@param outStateCount	[out] A buffer in which to return the state-count value.
	 **/
	AIAPI AIErr	(*GetStateCount)(AIPanelRef inPanel, ai::int16& outStateCount);


	/** Sets the vertical step size to use when a resizable panel is resized.
	The panel height is constrained to be its minimum height plus a multiple
	of the vertical step size. By default, this is 1, making the panel sizable to any height.

	@param inPanel			The panel object.
	@param inStepSize		The new step size.
	  **/
	AIAPI AIErr	(*SetVerticalStepSize)(AIPanelRef inPanel, AIReal inStepSize);


	/** Retrieves the vertical step size for a panel
	@param inPanel			The panel object.
	@param outStepSize		[out] A buffer in which to return the size value.
	  **/
	AIAPI AIErr	(*GetVerticalStepSize)(AIPanelRef inPanel, AIReal& outStepSize);


	/** Sets the flyout menu for a panel.
		@param inPanel			The panel object.
		@param inFlyoutMenu		The new menu, or NULL to hide the menu icon.
		@see \c #AIPanelFlyoutMenuSuite.
	  **/
	AIAPI AIErr	(*SetFlyoutMenu)(AIPanelRef inPanel, AIPanelFlyoutMenuRef inFlyoutMenu);


	/** Retrieves the flyout menu for a panel.
		@param inPanel			The panel object.
		@param outFlyoutMenu	[out] A buffer in which to return the flyout menu object.
		@see \c #AIPanelFlyoutMenuSuite.
	 **/
	AIAPI AIErr	(*GetFlyoutMenu)(AIPanelRef inPanel, AIPanelFlyoutMenuRef& outFlyoutMenu);


	/** Reports the minimized state of a panel.
	When a panel is minimized its content area is  not visible, and the panel
	view has a visible height of 0.
	@param inPanel			The panel object.
	@param outIsMinimized	[out] A buffer in which to return true if the panel is minimized,
						false otherwise.
	 **/
	AIAPI AIErr (*IsMinimized)(AIPanelRef inPanel, AIBoolean& outIsMinimized);


	/** Modifies the minimized state of the panel.
	@param inPanel			The panel object.
	@param inIsMinimized	True to minimize the panel, false to return it to the
							unminimized state.
	 **/
	AIAPI AIErr (*ChangeIsMinimized)(AIPanelRef inPanel, AIBoolean inIsMinimized);


	/** Moves a panel to a specific screen location.
	Has no effect if the panel is docked. If the panel is part of a tab group,
	 the whole tab group is moved to the new location.
	@param inPanel			The panel object.
	@param inPoint			The new position in global screen coordinates.
	  **/
	AIAPI AIErr	(*Move)(AIPanelRef inPanel, AIPoint inPoint);


	/** Sets a callback procedure to be called before the flyout menu for a panel is shown.
	@param inPanel						The panel object.
	@param inFlyoutMenuPreVisProc		The new callback procedure.
	 **/
	AIAPI AIErr (*SetFlyoutMenuPreVisibilityProc)(AIPanelRef inPanel, AIPanelFlyoutMenuPreVisibilityProc inFlyoutMenuPreVisProc);


	/** Sets a callback procedure to be called after the flyout menu for a panel has been shown.
	@param inPanel						The panel object.
	@param	inFlyoutMenuPostVisProc		The new callback procedure.
	**/
	AIAPI AIErr (*SetFlyoutMenuProc)(AIPanelRef inPanel, AIPanelFlyoutMenuProc inFlyoutMenuProc);


	/** Sets a callback procedure to be called when the visibility of a panel is changed.
	@param inPanel							The panel object.
	@param inVisibilityChangedNotifyProc	The new callback procedure.
	 **/
	AIAPI AIErr (*SetVisibilityChangedNotifyProc)(AIPanelRef inPanel, AIPanelVisibilityChangedNotifyProc inVisibilityChangedNotifyProc);


	/** Sets a callback procedure to be called when the size of a panel is changed.
	@param inPanel						The panel object.
	@param inSizeChangedNotifyProc		The new callback procedure.
	 **/
	AIAPI AIErr (*SetSizeChangedNotifyProc)(AIPanelRef inPanel, AIPanelSizeChangedNotifyProc inSizeChangedNotifyProc);


	/** Sets a callback procedure to be called when the state of a panel is changed.
	@param inPanel						The panel object.
	@param inStateChangedNotifyProc		The new callback procedure.
	**/
	AIAPI AIErr (*SetStateChangedNotifyProc)(AIPanelRef inPanel, AIPanelStateChangedNotifyProc inStateChangedNotifyProc);


	/** Set a callback procedure to be called when a panel is closed by clicking the close button.
	@param inPanel						The panel object.
	@param inPanelClosedNotifyProc		The new callback procedure.
	 **/
	AIAPI AIErr (*SetClosedNotifyProc)(AIPanelRef inPanel, AIPanelClosedNotifyProc inPanelClosedNotifyProc);
};




/*******************************************************************************
**
**	Suite
**
**/

/**	@ingroup Suites
Provides functions for creating and managing panel flyout menus.

\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
\c #kAIPanelFlyoutMenuSuite	and \c #kAIPanelFlyoutMenuSuiteVersion.
*/

struct AIPanelFlyoutMenuSuite{

	/** Creates a new panel flyout menu or submenu.
	@param outFlyOutMenu		[out] A buffer in which to return the new panel flyout menu object.

	*/
	AIAPI AIErr	(*Create)(AIPanelFlyoutMenuRef& outFlyOutMenu);


	/**  Deletes a panel flyout menu object.
	This must be called when the plug-in receives \c #kAIApplicationShutdownNotifier.
	@param inFlyOutMenu			The panel flyout menu object.
	*/
	AIAPI AIErr	(*Destroy)(AIPanelFlyoutMenuRef inFlyOutMenu);


	/** Retrieves the number of items in a flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param outSize				[out] A buffer in which to return the number of items.
	*/
	AIAPI AIErr	(*Size)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32& outSize);


	/** Inserts a new item at the end of a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inNewItemID			The unique non-zero identifier for the new item.
	@param inItemText			The display text for the new item.
	*/
	AIAPI AIErr	(*AppendItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inNewItemID, const ai::UnicodeString& inItemText);


	/** Inserts a separator in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inNewItemID			The unique non-zero identifier for the new separator.
	*/
	AIAPI AIErr	(*AppendSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inNewItemID);


	/** Inserts a new item at a specific relative position in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inBeforeItemID		The ID of an existing item before which to insert the new item.
	@param inNewItemID			The unique non-zero identifier for the new item.
	@param inItemText			TThe display text for the new item.
	*/
	AIAPI AIErr	(*InsertItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inBeforeItemID, ai::uint32 inNewItemID, const ai::UnicodeString& inItemText);


	/** Inserts a separator at a specific relative position in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inAfterID			The ID of an exsiting item after which to insert the separator,
								or -1 to append the separator to the end of the menu.
	@param inNewItemID			The unique non-zero identifier for the new separator.
	*/
	AIAPI AIErr	(*InsertSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inBeforeItemID, ai::uint32 inNewItemID);


	/** Removes an item or separator from a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item or separator.
	*/
	AIAPI AIErr	(*RemoveItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID);


	/** Enables or disables an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param inEnabled			True to enable or false to disable the item.
	*/
	AIAPI AIErr	(*SetItemEnabled)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIBoolean inEnabled);


	/** Retrieves the enabled status of an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param outEnabled			[out] A buffer in which to return true if the item is enabled, false otherwise.
	*/
	AIAPI AIErr	(*GetItemEnabled)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIBoolean& outEnabled);


	/** Sets a mark on an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param inItemMark			The mark type constant. Can be check, bullet, dash, or none.
	*/
	AIAPI AIErr	(*SetItemMark)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuItemMark inItemMark);


	/** Retrieves the type of mark on an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param outItemMark			[out] A buffer in which to return the type constant (check, bullet, dash, or none).
	*/
	AIAPI AIErr	(*GetItemMark)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuItemMark& outItemMark);


	/** Sets the display text for an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param inItemText			The new text string.
	*/
	AIAPI AIErr	(*SetItemText)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, const ai::UnicodeString& inItemText);


	/** Retrieves the display text for an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param outItemText			[out] A buffer in which to return the text string.
	*/
	AIAPI AIErr	(*GetItemText)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, ai::UnicodeString& outItemText);


	/** Reports whether an item in a panel flyout menu is a separator.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemIndex			The 0-based index of the item.
	@param outIsItemSeparator	[out] A buffer in which to return true if the item is a separator, false otherwise.
	@return	error
	*/
	AIAPI AIErr	(*IsItemSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, AIBoolean& outIsItemSeparator);


	/** Associates a submenu with an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param inSubMenu			A panel flyout menu object.
	*/
	AIAPI AIErr	(*SetItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuRef inSubMenu);


	/** Retrieves the submenu associated with an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	@param outSubMenu			[out] A buffer in which to return the submenu object.
	*/
	AIAPI AIErr	(*GetItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuRef& outSubMenu);


	/** Removes any submenu associated with an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemID				The unique identifier of the item.
	*/
	AIAPI AIErr	(*DetachItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID);

	/** Sets the unique identifier of an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemIndex			The 0-based index of the item.
	@param inNewItemID			The new unique non-zero item ID.
	*/
	AIAPI AIErr	(*SetItemID)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, ai::uint32 inNewItemID);

	/** Retrieves the unique identifier of an item in a panel flyout menu.
	@param inFlyOutMenu			The panel flyout menu object.
	@param inItemIndex			The 0-based index of the item.
	@param outItemID			[out] A buffer in which to return the ID
	*/
	AIAPI AIErr	(*GetItemID)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, ai::uint32& outItemID);
};


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContext.h<|end_filename|>
#ifndef __AIContext__
#define __AIContext__

/*
 *        Name:	AIContext.h
 *   $Revision: 2 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Runtime Context Environment.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIDocument__
#include "AIDocument.h"
#endif

#ifndef __SPPlugins__
#include "SPPlugs.h"
#endif


#include "AIHeaderBegin.h"

/** @file AIContext.h */


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAIAppContextSuite			"AI Context Suite"
#define kAIAppContextSuiteVersion	AIAPI_VERSION(7)
#define kAIAppContextVersion		kAIAppContextSuiteVersion

enum AIAppContextKind
{
	kAIAppContextStandardKind		= 0,
	kAIAppContextUndoRedoKind		= 1,
	kAIAppContextBetaUpdateKind	= 2
};

/*******************************************************************************
 **
 **	Types
 **
 **/

/** Opaque reference to the application context. It is never dereferenced. */
typedef struct _t_AIAppContextOpaque *AIAppContextHandle;

/** Opaque reference to an application context stack. It is never dereferenced. */
typedef struct _t_AISuspendedAppContextOpaque *AISuspendedAppContext;

/** Opaque reference to an application context stack. It is never dereferenced. */
typedef struct _t_AIAppMenuContextOpaque *AIAppMenuContext;

/*******************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	Use these functions to manage the application context. The application
	context does two things:

	\li It establishes the current document and view. Most SDK
	functions do not take a document or a view as a parameter, but
	use the current document or view as defined by the application context.

	\li It establishes the scope of a single undoable operation. All the
	changes that occur during a single application context are grouped
	together into a single operation, which can then be undone and redone.

	Most plug-ins will not need to use these functions because Illustrator
	manages the context. In rare situations, however, a plug-in may need
	to make changes to the context. For example, if a plug-in can
	be called directly by the operating system, Illustrator will not have
	established the context. If the plug-in wants to make SDK calls
	in response, it should use \c #PushAppContext() and \c #PopAppContext().

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIAppContextSuite and \c #kAIAppContextVersion.
	*/
typedef struct {

	/** Retrieves the parent application window in Windows.
		Does nothing in Mac OS.
			@param appWindow [out] A buffer in which to return the window reference.
		*/
	AIAPI AIErr (*GetPlatformAppWindow) ( AIWindowRef *appWindow );

	/** Stores an application context for the calling plug-in.
			@param plugin This plug-in.
			@param appContext [out] A buffer in which to return the application
				context reference. Pass this to \c #PopAppContext() upon completion
				of the context-sensitive procedure.

		*/
	AIAPI AIErr (*PushAppContext) ( SPPluginRef plugin, AIAppContextHandle *appContext );

	/** Restores the previous application context.
			@param appContext The application context reference, as returned by
				\c #PushAppContext().
		*/
	AIAPI AIErr (*PopAppContext) ( AIAppContextHandle appContext );

	/** @deprecated No longer needed. */
	AIAPI AIErr (*MacGetAppQDGlobal) ( void **appQD );

	/** Suspends the current application context stack. This is equivalent to popping
		all current open contexts,  except that they can later be restored all at once
		by \c #ResumeAppContext(). Use before an operation that may change the current document.
			@param appContext [out] A buffer in which to return the application
				context stack reference. Pass this to \c #ResumeAppContext() upon completion
				of the context-sensitive procedure.
		*/
	AIAPI AIErr (*SuspendAppContext) ( AISuspendedAppContext* appContext );

	/** Resumes the application context stack for the document of
		the frontmost window. This might be a different document from the one
		at the time the context stack was suspended.
			@param appContext The application context stack reference, as returned by
				\c #SuspendAppContext().
		*/
	AIAPI AIErr (*ResumeAppContext) ( AISuspendedAppContext appContext, AIDocumentHandle document );

	/** Allows or disallows plug-ins to operate on artwork within locked and/or hidden
	    parent contexts. The call modifies the allow-changes state of the current context. The
		state persists until you specifically reset it, or until the context is popped.
	   	This allows you to make modifications without having to save, set, and restore
		visibility and locked attributes on the whole parent chain.
			@param allowAllChanges True to allow changes, false to disallow changes.
			@param previousState [out] A buffer in which to return true if changes were previously allowed,
				false if they were not.
		*/
	AIAPI AIErr (*AllowAllChanges) ( ASBoolean allowAllChanges, ASBoolean *previousState );

	/** Allows or disallows use of the progress bar for the current context.
	@param showProgress True to show the progress bar, false to hide it.
	*/
	AIAPI AIErr (*AllowProgress)(bool showProgress);
	
	/** Retrieves the main menu application handle in Windows.
	Does nothing in Mac OS.
	@param appMenu [out] A buffer in which to return the menu reference.
	*/
	AIAPI AIErr (*GetPlatformAppMenu) ( AIAppMenuContext *appMenu );

	/** Sets the ContextKind for current context.
		@param kind The Context kind can either be <br>
				\c kAIAppContextStandardKind, \c kAIAppContextUndoRedoKind, \c kAIAppContextBetaUpdateKind 
				which are mutually exclusive. See \c enum AIAppContextKind
	*/
	AIAPI AIErr (*SetAppContextKind) (AIAppContextKind kind );


	/** Synchronize the current global context and then draws.
	*/
	AIAPI AIErr (*SyncAndDraw) ();

	/** Get Ruler width for the current document.
	**
	** Returns width of the vertical ruler and height of the horizontal ruler
	** Returns 0 if rulers are hidden
	*/
	AIAPI AIErr (*GetRulerWidthOffsetOnActiveDocument) (AIRect *horzRulerBounds, AIRect *vertRulerBounds, AIRect *cntrRulerBounds);


} AIAppContextSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Menu.h<|end_filename|>
#ifndef __AI90Menu__
#define __AI90Menu__

/*
 *        Name:	AI90Menu.h
 *   $Revision: 10 $
 *      Author:	 
 *        Date:	   
 *     Purpose: Adobe Illustrator Menu Suites from before AI 10	
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIPlugin__
#include "AIPlugin.h"
#endif

#ifndef __ASHelp__
#include "ASHelp.h"
#endif

#ifndef __AIMenu__
#include "AIMenu.h"
#endif


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI90MenuSuite		"AI Menu Suite"
#define kAIMenuVersion5		AIAPI_VERSION(5)	// For AI7
#define kAIMenuVersion6		AIAPI_VERSION(6)	// For AI9



/*******************************************************************************
 **
 **	Suite
 **
 **/

// version 5
typedef struct {

	AIAPI AIErr (*AddMenuItem) ( SPPluginRef self, const char *name,
				AIPlatformAddMenuItemData *data, AIMenuItemOption options,
				AIMenuItemHandle *menuItem );

	AIAPI AIErr (*GetMenuItemName) ( AIMenuItemHandle menuItem, const char** name );
	AIAPI AIErr (*GetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption *options );
	AIAPI AIErr (*SetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption options );
	AIAPI AIErr (*GetMenuItemPlugin) ( AIMenuItemHandle menuItem,
				SPPluginRef *plugin );

	AIAPI AIErr (*CountMenuItems) ( long *count );
	AIAPI AIErr (*GetNthMenuItem) ( long n, AIMenuItemHandle *menuItem );

	AIAPI AIErr (*GetPlatformMenuItem) ( AIMenuItemHandle menuItem,
				AIPlatformMenuItem *platformMenuItem );

	AIAPI AIErr (*UpdateMenuItemAutomatically) ( AIMenuItemHandle menuItem,
				long action,
				long ifObjectIsInArtwork, long ifObjectIsNotInArtwork,
				long ifObjectIsSelected, long ifObjectIsNotSelected,
				long ifIsTrue, long ifIsNotTrue );
	AIAPI AIErr (*GetUpdateFlags)( long *inArtwork, long *isSelected, long *isTrue );
	/*-------------------------------------------------------------------------------------------*/
		
	AIAPI AIErr (*EnableItem) ( AIMenuItemHandle menuItem);
	AIAPI AIErr (*DisableItem) ( AIMenuItemHandle menuItem);
	AIAPI AIErr (*GetItemText) ( AIMenuItemHandle menuItem, char* itemCString );	// Get menuItem text. Different from GetMenuItemName() where the itemName doesn't got localized.
																					// where the length of itemCString is 256.

	AIAPI AIErr (*SetItemText) ( AIMenuItemHandle menuItem, const char* itemCString );	// Set menuItem text.
	AIAPI AIErr (*CheckItem) ( AIMenuItemHandle menuItem, AIBoolean bCheckIt );

	/* NOTE: SetItemIcon: On MSWindows: MAKEINTRESOURCE(iconSelector + 256) is the
		the bitmap resource ID for the menuItem.
		NOTE (2): SetItemIcon() will pass in the hInstance for the bitmap.
	*/
	AIAPI AIErr (*SetItemIcon) ( AIMenuItemHandle menuItem, short iconSelector );

	AIAPI AIErr (*GetItemMenuGroup) ( AIMenuItemHandle menuItem, AIMenuGroup *group );
	AIAPI AIErr (*AddMenuGroup) ( const char *name, AIMenuGroupOption options, const char *nearGroup,
				AIMenuGroup *group );
	AIAPI AIErr (*AddMenuGroupAsSubMenu) ( const char *name, AIMenuGroupOption options, AIMenuItemHandle menuItem, AIMenuGroup *group);
	AIAPI AIErr (*GetMenuGroupName) ( AIMenuGroup group, const char **name );
	AIAPI AIErr (*GetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption *options );
	AIAPI AIErr (*SetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption options );
	AIAPI AIErr (*GetMenuGroupRange) ( AIMenuGroup group, AIPlatformMenuHandle *theMenu,
				short *firstItem, short *numItems );
	AIAPI AIErr (*CountMenuGroups) ( long *count );
	AIAPI AIErr (*GetNthMenuGroup) ( long n, AIMenuGroup *group );

	AIAPI AIErr (*GetItemCmd) ( AIMenuItemHandle menuItem, short *cmdChar, short *modifiers );
	AIAPI AIErr (*SetItemCmd) ( AIMenuItemHandle menuItem, char cmdChar, short modifiers );

	// Currently supports function keys 1-15 (note: 1-based)
	AIAPI AIErr (*GetItemFunctionKey) ( AIMenuItemHandle menuItem, short *fkey, short *modifiers );
	AIAPI AIErr (*SetItemFunctionKey) ( AIMenuItemHandle menuItem, short fkey, short modifiers );
	
	AIAPI AIErr (*GetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID *helpID );
	AIAPI AIErr (*SetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID helpID );
	
} AIMenuSuite5;


// version 6
typedef struct {

	AIAPI AIErr (*AddMenuItem) ( SPPluginRef self, const char *name,
				AIPlatformAddMenuItemData *data, AIMenuItemOption options,
				AIMenuItemHandle *menuItem );

	AIAPI AIErr (*GetMenuItemName) ( AIMenuItemHandle menuItem, const char **name );
	AIAPI AIErr (*GetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption *options );
	AIAPI AIErr (*SetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption options );
	AIAPI AIErr (*GetMenuItemPlugin) ( AIMenuItemHandle menuItem,
				SPPluginRef *plugin );

	AIAPI AIErr (*CountMenuItems) ( long *count );
	AIAPI AIErr (*GetNthMenuItem) ( long n, AIMenuItemHandle *menuItem );

	AIAPI AIErr (*GetPlatformMenuItem) ( AIMenuItemHandle menuItem,
				AIPlatformMenuItem *platformMenuItem );

	AIAPI AIErr (*UpdateMenuItemAutomatically) ( AIMenuItemHandle menuItem,
				long action,
				long ifObjectIsInArtwork, long ifObjectIsNotInArtwork,
				long ifObjectIsSelected, long ifObjectIsNotSelected,
				long ifIsTrue, long ifIsNotTrue );
	AIAPI AIErr (*GetUpdateFlags)( long *inArtwork, long *isSelected, long *isTrue );
	/*-------------------------------------------------------------------------------------------*/
		
	AIAPI AIErr (*EnableItem) ( AIMenuItemHandle menuItem);
	AIAPI AIErr (*DisableItem) ( AIMenuItemHandle menuItem);
	AIAPI AIErr (*GetItemText) ( AIMenuItemHandle menuItem, char* itemCString );	// Get menuItem text. Different from GetMenuItemName() where the itemName doesn't got localized.
																					// where the length of itemCString is 256.

	AIAPI AIErr (*SetItemText) ( AIMenuItemHandle menuItem, const char* itemCString );	// Set menuItem text.
	AIAPI AIErr (*CheckItem) ( AIMenuItemHandle menuItem, AIBoolean bCheckIt );

	/* NOTE: SetItemIcon: On MSWindows: MAKEINTRESOURCE(iconSelector + 256) is the
		the bitmap resource ID for the menuItem.
		NOTE (2): SetItemIcon() will pass in the hInstance for the bitmap.
	*/
	AIAPI AIErr (*SetItemIcon) ( AIMenuItemHandle menuItem, short iconSelector );

	AIAPI AIErr (*GetItemMenuGroup) ( AIMenuItemHandle menuItem, AIMenuGroup *group );
	AIAPI AIErr (*AddMenuGroup) ( const char *name, AIMenuGroupOption options, const char *nearGroup,
				AIMenuGroup *group );
	AIAPI AIErr (*AddMenuGroupAsSubMenu) ( const char *name, AIMenuGroupOption options, AIMenuItemHandle menuItem, AIMenuGroup *group);
	AIAPI AIErr (*GetMenuGroupName) ( AIMenuGroup group, const char **name );
	AIAPI AIErr (*GetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption *options );
	AIAPI AIErr (*SetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption options );
	AIAPI AIErr (*GetMenuGroupRange) ( AIMenuGroup group, AIPlatformMenuHandle *theMenu,
				short *firstItem, short *numItems );
	AIAPI AIErr (*CountMenuGroups) ( long *count );
	AIAPI AIErr (*GetNthMenuGroup) ( long n, AIMenuGroup *group );

	AIAPI AIErr (*GetItemCmd) ( AIMenuItemHandle menuItem, short *cmdChar, short *modifiers );
	AIAPI AIErr (*SetItemCmd) ( AIMenuItemHandle menuItem, char cmdChar, short modifiers );

	// Currently supports function keys 1-15 (note: 1-based)
	AIAPI AIErr (*GetItemFunctionKey) ( AIMenuItemHandle menuItem, short *fkey, short *modifiers );
	AIAPI AIErr (*SetItemFunctionKey) ( AIMenuItemHandle menuItem, short fkey, short modifiers );
	
	AIAPI AIErr (*GetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID *helpID );
	AIAPI AIErr (*SetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID helpID );
	
	// new for version 6
			
	AIAPI AIErr (*IsItemEnabled) ( AIMenuItemHandle menuItem, ASBoolean *bEnabled);
	AIAPI AIErr (*IsItemChecked) ( AIMenuItemHandle menuItem, AIBoolean *bCheckIt );
	
} AIMenuSuite6;


#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170User.h<|end_filename|>
#ifndef __AI170User__
#define __AI170User__

//========================================================================================
//  
//  ADOBE CONFIDENTIAL
//   
//  $File: $
// 
//  Owner: 
//  
//  $Author: <NAME>
//  
//  $DateTime: $
//  
//  $Revision: $
//  
//  $Change: $
//  
//  Copyright 2012 Adobe Systems Incorporated
//  All Rights Reserved.
//  
//  NOTICE:  All information contained herein is, and remains
//  the property of Adobe Systems Incorporated and its suppliers,
//  if any.  The intellectual and technical concepts contained
//  herein are proprietary to Adobe Systems Incorporated and its
//  suppliers and are protected by trade secret or copyright law.
//  Dissemination of this information or reproduction of this material
//  is strictly forbidden unless prior written permission is obtained
//  from Adobe Systems Incorporated.
//  
//========================================================================================

#ifndef __AIArt__
#include "AIArt.h"
#endif

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIColor__
#include "AIColor.h"
#endif

#ifndef __AIMenu__
#include "AIMenu.h"
#endif

#ifndef __AIFileFormat__
#include "AIFileFormat.h"
#endif

#include "IAIFilePath.hpp"
#include "AIUser.h"
#include "AIHeaderBegin.h"

/** @file AI170User.h */


/*******************************************************************************
 **
 **	Constants
 **
 **/

// v.14.0
#define kAI170UserSuite					kAIUserSuite
#define kAIUserSuiteVersion11			AIAPI_VERSION(11)
#define kAI170UserSuiteVersion			kAIUserSuiteVersion11
#define kAI170UserVersion				kAI170UserSuiteVersion


/*******************************************************************************
 **
 **	Types
 **
 **/

/** Information about the kinds of names allowed for a named entity (such as
	layers, swatches, and styles). Used to generate a legal name, using
	\c #AIUserSuite::NextName() and AIUserSuite::CopyOfName().

	The following pseudocode indicates how you can create your own AutoNameGenerator class by publicly inheriting AIAutoNameGenerator
	and following the implementation guidelines.

@code
	class AutoNameGenerator : public AIAutoNameGenerator {
	public:
		// Constructor for a name generator. Its supplied with the pluginref in
		// case the name generator needs to look in the plugin's resources e.g for
		// the default name. The next new name index is supplied since the plugin
		// probably needs to store this in its globals so that it can be preserved
		// across unload and reload.
		AutoNameGenerator (SPPluginRef pluginref, int nextNameIndex)
		{
			// fill in fDefaultName
			GetDefaultName(pluginref);

			// initialize the base members
			// note kMaxCollectionStringLength accounts for null terminator and maximumLength does not
			maximumLength = kMaxCollectionStringLength-1;
			uniqueNames = true;
			baseName = fDefaultName;
			nextNewNameIndex = nextNameIndex;
			HasName = sHasName;
		}

	private:
		void GetDefaultName (SPPluginRef pluginref)
		{
			// Somehow initialize fDefaultName with the default name for the
			// collection. The pluginref is probably needed in order to look
			// up the name in the plugin resources.
		}

		AIErr hasName (const ai::UnicodeString &name, AIBoolean &hasit)
		{
			// Code to answer the question. When comparing 'name' against
			// names of objects in the collection it's important to use the
			// AIUserSuite::SameName() API. The name generation process does
			// not use a simple string comparison.
		}

		static AIAPI AIErr sHasName (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit)
		{
			return static_cast<AutoNameGenerator&>(self).hasName(name, hasit);
		}

		ai::UnicodeString fDefaultName;
	};
@endcode
*/
/*******************************************************************************
 **
 **	Suite
 **
 **/


 // To be removed. These comments here in case it isn't.
/** Internal. */
struct AICustomProgressSuite {
	/** Internal.
		Reports whether a user has canceled the current operation.
		Call this function in your main loop as often as you can afford.
		If it returns true your plug-in should stop, clean up as necessary,
		and exit, returning the constant \c #kCanceledErr. You can use
		\c #AIUndoSuite::UndoChanges() to remove any changes the operation
		has made to the artwork.
		(Note that this function returns a boolean value, not an error code.)
			@param data A pointer to developer-defined data.
			@return	True if the user has canceled an operation
				by pressing Command-dot or clicking Cancel or Stop in the
				progress bar.
		*/
	AIAPI AIBoolean (*Cancel) ( void *data );

	/** Internal.
		Updates the progress bar.
		(Note that this function does not return an error code.)
			@param data A pointer to developer-defined data.
			@param current A number between 0 and \c max that represents
				how far the operation has progressed. For example, if the
				operation will change fifty objects, call after each object
				with the current object number for \c current and 50 for \c max. .
			@param max The maximum value. This can be 100 to show a percentage,
				or the total number of objects the operation will create or modify,
				or, for example, a value such as the total number of points
				on a figure the operation will draw.
		*/
	AIAPI void (*UpdateProgress) ( void *data, ai::int32 current, ai::int32 max );

	/**	Internal.
		Sets the text message displayed in the progress bar. If not provided,
		the text line is blank.
		(Note that this function does not return an error code.)
			@param data A pointer to developer-defined data.
			@param text The text message.
		*/
	AIAPI void (*SetProgressText) ( void *data, const char *text );

	/** Internal.
		Explicitly close the progress bar if one is currently shown.
 		Illustrator automatically closes the progress bar when your
 		plug-in finishes. Use this function if you want to dismiss
 		it sooner; for example, if you terminate an operation early
 		because of some error condition.
		(Note that this function does not return an error code.)
			@param data A pointer to developer-defined data.
		*/
	AIAPI void (*CloseProgress) ( void *data );

	/** Internal.
		Disables (dims) the cancel or stop button in the progress bar.
		(Note that this function does not return an error code.)
			@param data A pointer to developer-defined data.
		*/
	AIAPI void (*DisableProgressCancel) ( void *data );

	/** A pointer to developer-defined data for progress bars. */
	void *data; // user data.
};



/** @ingroup Suites
	This suite provides utility functions for working with Illustrator,
	including unit conversion utilities and a progress bar.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIUserSuite and \c #kAIUserSuiteVersion.
	*/
struct AI170UserSuite {

	/** Reports whether a user has canceled the current operation.
		(Note that this function returns a boolean value, not an error code.)
			@return	True if the user has canceled an operation
				by pressing Command-dot or clicking Cancel or Stop in the
				progress bar.
		*/
	AIAPI AIBoolean (*Cancel) ( void );

	/** Updates the progress bar.
		(Note that this function does not return an error code.)
			@param current A number between 0 and \c max that represents
				how far the operation has progressed.
			@param max The maximum value, representing 100% progress.
		*/
	AIAPI void (*UpdateProgress) ( ai::int32 current, ai::int32 max );

	/**	Sets the text message displayed in the progress bar. If not provided,
		the text line is blank.
		(Note that this function does not return an error code.)
			@param text The text message.
		*/
	AIAPI void (*SetProgressText) ( const ai::UnicodeString& text );

	/** Explicitly close the progress bar if one is currently shown.
		(Note that this function does not return an error code.)
		*/
	AIAPI void (*CloseProgress) ( void );

	/**	Converts a number of document points to a Unicode string, using
		the period as a decimal separator.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4].
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
		using the period as a decimal separator.
		(Note that this function does not return an error code.)
			@param string The string to convert.
			@param value  [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
		*/
	AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value );
	/**	Converts a number of document points to a Unicode string, using the localized
		international utilities (IU) decimal separator.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4].
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string );

	/**	Converts a Unicode string containing a number to an \c #AIReal value,
		using the localized international utilities (IU) decimal separator.
		(Note that this function does not return an error code.)
			@param string The string to convert.
			@param value  [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
		*/
	AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/**	Converts a number of document points to a formatted Unicode string containing
		a number and ruler units, using the localized international utilities (IU)
		decimal separator, and the passed preference for precision. If passed precision value is -1
		then user preference for precision is used.
		Uses the currently set ruler units, which can be inches, points, or centimeters.
		(Note that this function does not return an error code.)
			@param value The value to convert.
			@param precision The number of digits to the right of the decimal,
				in the range [0..4]. Pass -1 if user preference for precision should be used.
			@param string [out] A buffer in which to return the converted value, at
				least 12 characters.
		*/
	AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, ai::int32 precision, ai::UnicodeString& string );

	/** Converts a formatted Unicode string containing a number expressed in ruler units
		to an \c #AIReal value in points. The current ruler units for the artwork
		are used as the original units to scale the result, and the user's
		preferences for precision are applied.
		(Note that this function does not return an error code.)
			@param string The string to convert, which uses the localized international utilities (IU)
				decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm".
				If no unit specifier is included, uses the current ruler units.
			@param value [out] A buffer in which to return the converted value.
				If the string is not a number, this is set to \c #kAIRealUnknown.
	  	*/
	AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value );

	/** Retrieves a string representing the current ruler units.
			@param format The format for the result, one of:
				<br> \c #kShortUnits
				<br> \c #kLongSingularUnits
				<br> \c #kLongPluralUnits
				<br> If, for instance, the current unit is inches, the returned string
				would be "in", "inch", or "inches".
			@param string [out] A buffer in which to return the units string, at least 20 characters.
		*/
	AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string );

	/**	Retrieves the base name of a global object, stripping off any additional
		token that was added to make the name unique (by a function such as
				\c #AICustomColorSuite::NewCustomColorName(), for example).
			@param name [in, out] A string in which to pass a unique name and
				return the base name. The string is modified in place.
		*/
	AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name );

	/** Opens the appropriate application to edit a placed or raster object.
		This is equivalent to an option-double-click on the object with the selection tool.
			@param art The placed or raster art object.
			@return \c #kApplicationNotFoundErr error if the application is not found.
				<br> \c #kObjectNotLinkedErr error if the object is not a placed or raster object.
		*/
	AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art );

	/** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state.  Can be useful if
	    you have code that has its own message processing.  */
	AIAPI AIErr (*AppIdle) ( void );

	/**	Builds a directory menu.  Available only in Mac OS.  Builds a menu consisting of the specified path as well as all parent directories of that path.
			@param menu	 The platform-specific menu object.
			@param fileSpec	The file object for the directory.
		*/
	AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec);

	/**	Retrieves a directory.  Available only in Mac OS.  Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu.
			@param fileSpec The file object for the directory.
			@param index The 0-based index of the directory.
		*/
	AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, ai::int32 index);

	/**	Reveals a file in the Finder.  Available only in Mac OS.
			@param fileSpec	 The file object for the file.
		*/
	AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec);

	/** Disables (dims) the cancel or stop button in the progress bar.
		(Note that this function does not return an error code.)
		*/
	AIAPI void (*DisableProgressCancel) ( void );

	/** Reports whether it is safe to allocate memory. Call when a timer
		or other  asynchronous event triggers an action that allocates memory.
		Not needed when handling notifications or user events; the plug-in does not receive
		these when it is not ok to allocate memory.
		(Note that this function returns a boolean value, not an error code.)
			@param True if it is safe to allocate memory. False if it is not safe; in this case,
				reschedule the action and try again later.
		*/
	AIAPI AIBoolean (*OKToAllocateMemory) ( void );

	// New for AI 11
	/** Retrieves the current date and time.
			@param outValue [out] A buffer in which to return the current date-time value.
		*/
	AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue);

	/* Formats a date into a Unicode string.
			@param inValue The date to format, or \c NULL to format the current date-time value.
			@param formatFlag The format to use, one of:
				<br> \c #kAIShortDateFormat
				<br> \c #kAILongDateFormat
				<br> \c #kAIAbbrevDateFormat
			@param dateStringUS [out] A buffer in which to return the formatted date string.
		*/
	AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS);

	/* Formats a time into a Unicode string.
			@param inValue The time to format, or \c NULL to format the current date-time value.
			@param formatFlag The format to use, one of:
				<br> \c #kAIShortTimeFormat
				<br> \c #kAILongTimeFormat
			@param dateStringUS [out] A buffer in which to return the formatted time string.
		*/
	AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS);

	/** Retrieves the year value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year);

	/** Retrieves the month value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month);

	/** Retrieves the day value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day);

	/** Retrieves the hour value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour);

	/** Retrieves the minute value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute);

	/** Retrieves the second value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second);

	/** Retrieves the day-of-week value from a date-time.
			@param inValue The date-time value, or \c NULL to get the current date-time.
			@param year [out] A buffer in which to return the value.
		*/
	AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek);

	/**	Launches an application, and optionally opens the current document in it.
			@param spFileSpec The file specification for the application's executable.
			@param openDoc True to open the current document in the new application.
		*/
	AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc);

	/** Generates an appropriate name for a named object, such as
		a layer, swatch, or style, according to the naming rules for that
		collection.
			@param set The naming rules.
			@param name [out] An ai::UnicodeString in which to return the generated name.
		*/
	AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name);

	/** Generates an appropriate name for a copy of a named object, such as
		a layer, swatch, or style, according to the naming rules for that
		collection.
			@param set The naming rules.
			@param original	Original name to copy (may be an empty string).
			@param copy [out] An ai::UnicodeString in which to return the generated name.
 		*/
    AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString &copy);

	/** Tests for equality of names within a collection of named objects.
		Use in the \c #AIAutoNameGenerator::HasName() callback function
		to test whether an automatically generated name matches a name
		already in the collection.
			@param name1 The first name.
			@param name2 The second name.
			@param same [out] An AIBoolean reference in which to return true if the names
				are the same.
		*/
	AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same);

	/** Not implemented. (Installs a custom progress reporting mechanism.)
			@return \c #kNotImplementedErr.
	  */
	AIAPI AIErr (*PushCustomProgress) (AICustomProgressSuite *suite);

	/**  Not implemented. (Removes the most recently installed custom progress reporting mechanism.)
			@return \c #kNotImplementedErr.
	  */
	AIAPI AIErr (*PopCustomProgress) ();

	/** Opens a platform-specific dialog for saving a file.
     		@param title Dialog title.
			@param AIFileDialogFilters File types to save. Can be \c NULL.
			@param defaultName Default file name to appear in dialog. Can be \c NULL.
			@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
				return the full path of the file chosen by the user.
		*/
	AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for opening a file.
     		@param title Dialog title.
			@param AIFileDialogFilters File types to open. Can be \c NULL.
			@param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and
				return the full path of the file chosen by the user.
	  */
	AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath);

	/** Opens a platform-specific dialog for choosing a folder.
     		@param title Dialog title.
			@param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and
				return the full path of the folder chosen by the user.
	  */
	AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath);

	/** Displays an alert dialog with a warning icon and OK and Cancel buttons.
			@param msg The message to display.
			@param defaultOk True to make the OK button the default, false to make Cancel the default.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
				in which to store the user's choice and save it in the application preferences file.
				When \c NULL, the dialog does not include the checkbox.
			@return True if the dialog was dismissed with the OK button,
				false if it was canceled.
		*/
	AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey);

	/** Displays an alert dialog with a warning icon and an OK button.
			@param msg The message to display.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
				in which to store the user's choice and save it in the application preferences file.
				When \c NULL, the dialog does not include the checkbox.
			@return Nothing. It does not return AIErr
		*/
	AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey);

	/** Displays an modal alert dialog with a warning icon and an OK button which doesnot get dismissed on ESC key.
			@param msg The message to display.
			@param dontShowKey A preference key to use with the "Do not show again" checkbox,
			in which to store the user's choice and save it in the application preferences file.
			When \c NULL, the dialog does not include the checkbox.
			@return Nothing. It does not return AIErr
			*/
	AIAPI void (*MessageAlertEx) (const ai::UnicodeString& msg, const char* dontShowKey);

	/** Displays a predefined dialog with a yes/no question.
		The dialog displays text specified with a unicodeString, and
		buttons with default labels Yes, No, and Cancel.
		@param msg The text string.
		@return The \c #AIAnswer constant for the button pressed to dismiss the dialog,
		or \c #kAIAnswer_Invalid in case of error.
		@see \c #ErrorAlert(), \c #MessageAlert(), \c #YesNoAlert()
		*/
	AIAPI AIAnswer (*QuestionAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog with a yes/no question.
		The dialog displays text specified with a unicodeString, and
		buttons with default labels Yes and No.
		@param msg The text string.
		@return The \c #AIAnswer constant for the button pressed to dismiss the dialog,
		or \c #kAIAnswer_Invalid in case of error.
		@see \c #ErrorAlert(), \c #MessageAlert(), \c #QuestionAlert()
		*/
	AIAPI AIAnswer (*YesNoAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog that informs the user that an error occurred.
		The dialog displays text specified with a unicodeString, with the platform-specific
		error icon at the left, and an OK button.
		@param msg The text string.
		@return Nothing.It doesnot return an AIErr
		@see \c #MessageAlert(),  \c #QuestionAlert(), \c #YesNoAlert()
		*/
	AIAPI void (*ErrorAlert)(const ai::UnicodeString &msg);

	/** Displays a predefined dialog with an informational message.
		The dialog displays text specified with a unicodeString, with the
		platform-specific message icon at the left, and an OK button.
		@param msg The text string.
		@return Nothing.It doesnot return an AIErr
		@see \c #ErrorAlert(), \c #QuestionAlert(), \c #YesNoAlert()
		*/
	AIAPI void (*MessageAlert)(const ai::UnicodeString &msg);

	/**	Invokes the platform-specific color picker dialog.
	@param inLocation[int]	The position of the dialog.	 (-1, -1) centers the dialog on the screen.
	@param inColor[in]	The initially selected color value.
	@param outColor	[out] A buffer in which to return the selected color.
	@return True if the user selected a color, false otherwise.
	*/
	AIAPI AIBoolean (*ChooseFromOSColorPicker) (const AIPoint &inLocation,
		const AIRGBColor& inColor, AIRGBColor* outColor);

	/** Evaluates a numeric expression to create a formatted string suitable for display.
	Call, for example, when a numeric edit control loses focus or the user presses "=".
	If the result of evaluation is not a valid numeric value as per options specified, it is recommended that
	the associated control display the last known-good value, or a blank string
	accompanied by a beep or other error indicator.

	@param expr [in] The expression to be evaluated (typically entered by the user
	in the control).
	@param options [in] An \c #AIExpressionOptions structure that determines how
	a numeric result is obtained. Specifies the units for the
	result, a range to which the result is clipped, and the precision.
	@param evaluatedExpr [out] A buffer in which to return the formatted display string.
	@param isChanged [out] A buffer in which to return true if the result of evaluation
	is different from result of user input. Example in case of non numeric input or out of bounds input.
	@param numericValue [out] A buffer in which to return the numeric value, according to the specified options.
	*/
	AIAPI AIErr (*EvaluateExpression)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr,
		AIBoolean & isChanged , AIDouble& numericValue);

	/** Invokes a modal dialog in which the user must input text. The dialog cannot be dismissed
		until text is entered. If default text is provided, however, the user can dismiss the
		dialog without changing that text.

		@param title The title for the dialog
		@param messageText A text message to display above the input field, or NULL to display no message.
		@param label The label for the text field.
		@param ioName [in/out] On input, a default string for the text field. This is replaced by text that
			the user enters, if any.
		@param IsValidInputProc A function pointer to a validation callback that validates the input as typed by the user.
			The first parameter to this call is a \c #AIValidationStage constant that reports whether the call is
			made upon text entry, or upon dismissal of the dialog.
		@param userdata Developer-defined user data to be passed to the validation callback.
		@param maxInputChars The maximum number of characters that user can enter in the text field.
	 */
	AIAPI AIErr (*GetInputFromUser) ( const ai::UnicodeString &title, const ai::UnicodeString* messageText, const ai::UnicodeString &label, ai::UnicodeString& ioField, IsValidInputProc validator, void *userdata, ai::int32 maxInputChars);

	/**  Creates a singleton resource manager instance to be used for cursors.
		Call once for a plugin, after startup is completed.	Destroy the instance on
		application shutdown (not plug-in shutdown).
		@param inRscMgr [out] A buffer in which to return the resource-manager handle.
		@see DisposeCursorResourceMgr()
	*/
	AIAPI AIErr (*CreateCursorResourceMgr)(SPPluginRef, AIResourceManagerHandle* inRscMgr);

	/**  Sets the image to be used for the plug-in's cursor.
		@param cursorID The resource ID of the cursor, or a \c #AIPredefinedCursor
			constant value to use one of the predefined cursors. Cursor images must be
			in PNG format.
		@param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr().
	*/
	AIAPI AIErr (*SetCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr);

	/**  Disposes of the plug-in's singleton resource manager. Call once when
		 \c #kAIApplicationShutdownNotifier is received. Do not call as part of plug-in shutdown.
		@param The resource manager handle, as returned on creation.
	*/
	AIAPI AIErr (*DisposeCursorResourceMgr)(AIResourceManagerHandle);

	/** Reports the current language in use.
	 @param lang [out] A buffer in which to return the language code.
	 */
	AIAPI AIErr (*GetAILanguageCode)(ai::UnicodeString& lang);
    
	/** Returns the maximum scale factor for all the screens on a system
		Always returns 1.0 in case of windows machine.
	 */
	AIAPI AIReal (*GetMaximumScaleFactorOnSystem)();

};



#if defined(MAC_ENV) || defined(WIN_ENV)
/**	 @ingroup Suites
	This suite provides utilities specific to the Mac OS platform.

  	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIMacUserSuite and \c #kAIMacUserSuiteVersion.
	*/
typedef struct {

	/** In Mac OS only, a callback procedure for a platform-specific
		modal dialog, called in response to a user-interaction event.
		Pass this function pointer in the \c filterproc parameter to the
		Mac OS function \c ModalDialog().

		This callback allows you to update the Illustrator document in
		response to events in the modal dialog, which would otherwise prevent
		any activity in the application while the dialog is shown.

			@param theDialog The window object for the dialog.
			@param theEvent A pointer to the event object for the event that triggered the callback.
			@param itemHit [out] Optional. A buffer in which to return the dialog result.
				Could be 0 (no result, as the event was not consumed), 1 (the OK button was clicked) or 2 (the Cancel button was clicked).
			@return True if the event was consumed, false if it was not.
		*/
	AIAPI AIBoolean (*ModalFilterProc) ( AIWindowRef theDialog, AIEvent *theEvent, short *itemHit );

	/**	Displays a color swatch preview in a platform window, similar to the one
		shown in the Swatch palette.
			@param window The window object.
			@param swatchRect A pointer to the region in which to display the preview,
				in coordinates relative to the window's origin.
			@param colorSpec A pointer to the swatch color.
		*/
	AIAPI AIErr (*PreviewColorSwatch) ( AIWindowRef window, AIRect *swatchRect, AIColor *colorSpec );

} AIMacUserSuite;
#endif


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Property.h<|end_filename|>
#ifndef __AI60Property__
#define __AI60Property__

/*
 *        Name:	AIProperty.h
 *   $Revision: 2 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 6.0 Plug-in Property Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AI60Plugin__
#include "AI60Plugin.h"
#endif


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kSelectorAI60AcquireProperty	"AI Acquire Property"
#define kSelectorAI60ReleaseProperty	"AI Release Property"


/*******************************************************************************
 **
 ** Types
 **
 **/

typedef struct {

	AIPluginData d;

	long vendorID;
	long propertyKey;
	long propertyID;

	void *property;
	long refCon;
	AIBoolean cacheable;

} AIPropertyMessage;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>jsx/ts/shim/myshims.js<|end_filename|>
Array.prototype.forEach = function(cb) {
    for (var i = 0; i < this.length; i++) {
        cb(this[i]);
    }
};

<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100User.h<|end_filename|>
#ifndef __AI100User__
#define __AI100User__

/*
 *        Name: AI100User.h
 *     Purpose: Adobe Illustrator 10.0 User Utilities Suite.	
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIUser.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI100UserSuite				kAIUserSuite
#define kAIUserSuiteVersion5		AIAPI_VERSION(5)
#define kAI100UserSuiteVersion		kAIUserSuiteVersion5

#define kAIUserSuiteVersion4		AIAPI_VERSION(4)


/*******************************************************************************
 **
 **	Suite
 **
 **/


typedef struct {

	AIAPI AIBoolean (*Cancel) ( void );
	AIAPI void (*UpdateProgress) ( long current, long max );
	AIAPI void (*SetProgressText) ( const char *text );
	AIAPI void (*CloseProgress) ( void );
	AIAPI void (*AIRealToString) ( AIReal value, short precision, unsigned char *string );
	AIAPI void (*StringToAIReal) ( unsigned char *string, AIReal *value );
	AIAPI void (*IUAIRealToString) ( AIReal value, short precision, unsigned char *string );
	AIAPI void (*IUStringToAIReal) ( unsigned char *string, AIReal *value );
	AIAPI void (*IUAIRealToStringUnits) ( AIReal value, unsigned char *string );
	AIAPI void (*IUStringUnitsToAIReal) ( unsigned char *string, AIReal *value );
	AIAPI AIErr (*GetUnitsString) ( short format, unsigned char *string );

	AIAPI AIErr (*AIUnitsToADMUnits) ( short aiUnits, ADMUnits *admUnits);
	AIAPI AIErr (*ADMUnitsToAIUnits) ( ADMUnits admUnits, short *aiUnits);
	AIAPI AIErr (*GetGlobalObjectDisplayName) ( char *name ); //name is modified in place
	
	/*Open the appropriate app to edit the object.  This is only meaningful for
	  Placed and Raster objects, and is equivalent to the user option-double-clicking
	  on the object with the selection tool.  See errors above.*/
	AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art );

	AIAPI AIErr (*AppIdle) ( void );

	AIAPI void (*DisableProgressCancel) ( void );

} AIUserSuite4;


typedef struct {

	AIAPI AIBoolean (*Cancel) ( void );
	AIAPI void (*UpdateProgress) ( long current, long max );
	AIAPI void (*SetProgressText) ( const char *text );
	AIAPI void (*CloseProgress) ( void );
	AIAPI void (*AIRealToString) ( AIReal value, short precision, unsigned char *string );
	AIAPI void (*StringToAIReal) ( unsigned char *string, AIReal *value );
	AIAPI void (*IUAIRealToString) ( AIReal value, short precision, unsigned char *string );
	AIAPI void (*IUStringToAIReal) ( unsigned char *string, AIReal *value );
	AIAPI void (*IUAIRealToStringUnits) ( AIReal value, unsigned char *string );
	AIAPI void (*IUStringUnitsToAIReal) ( unsigned char *string, AIReal *value );
	AIAPI AIErr (*GetUnitsString) ( short format, unsigned char *string );

	AIAPI AIErr (*AIUnitsToADMUnits) ( short aiUnits, ADMUnits *admUnits);
	AIAPI AIErr (*ADMUnitsToAIUnits) ( ADMUnits admUnits, short *aiUnits);
	AIAPI AIErr (*GetGlobalObjectDisplayName) ( char *name ); //name is modified in place
	
	/*Open the appropriate app to edit the object.  This is only meaningful for
	  Placed and Raster objects, and is equivalent to the user option-double-clicking
	  on the object with the selection tool.  See errors above.*/
	AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art );

	AIAPI AIErr (*AppIdle) ( void );

	AIAPI void (*DisableProgressCancel) ( void );

	// This method should be called by plugins when a timer or other asynchronous event
	// like updating triggers some action that may  allocate memory.  If it returns false,
	// the plugin should reschedule the action and try again later.  It is not necessary to
	// call this when handling notifications or user events; the plugin should never receive
	// these when it's not ok to allocate memory.
	AIAPI AIBoolean (*OKToAllocateMemory) ( void );

} AI100UserSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDrawArt.h<|end_filename|>
#ifndef __AIDrawArt__
#define __AIDrawArt__

/*
 *        Name:	AIDrawArt.h
 *   $Revision: $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator Draw Art Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file
 * in accordance with the terms of the Adobe license agreement
 * accompanying it. If you have received this file from a source other
 * than Adobe, then your use, modification, or distribution of it
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIArt__
#include "AIArt.h"
#endif

#ifndef __AIColor__
#include "AIColor.h"
#endif

#ifndef __AIColorConversion__
#include "AIColorConversion.h"
#endif

#ifndef __AIRaster__
#include "AIRaster.h"
#endif

#include "AIAGMTypes.h"

#include "AIHeaderBegin.h"

/** @file AIDrawArt.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAIDrawArtSuite				"AI Draw Art Suite"
#define kAIDrawArtSuiteVersion11		AIAPI_VERSION(11)
#define kAIDrawArtSuiteVersion		kAIDrawArtSuiteVersion11
#define kAIDrawArtVersion			kAIDrawArtSuiteVersion


/** Flag bits for \c #AIDrawArtFlags. */
enum AIDrawArtFlagBitPos {
	/** When set, draws for preview mode, otherwise draws in outline mode. */
	kAIDrawArtPreviewBit						= 0,
	/** Obsolete. */
	kAIDrawArtPreviewImagesBit					= 1,
	/** When set, draws dimmed images if \c #kAIDrawArtPreviewBit is set.
		Dimmed images have colors shifted toward white. */
	kAIDrawArtPreviewDimmedImagesBit			= 2,
	/** Obsolete. */
	kAIDrawArtPreviewPatternsBit				= 3,
	/** Obsolete.  */
	kAIDrawArtSelectObjectsBit					= 4,
	/** When set, draws guides.  */
	kAIDrawArtShowGuidesBit						= 5,
	/** (Not recommended.) When set, if drawing a single art object of type
		\c #kPlacedArt or \c #kRasterArt, the transformation
		applied to the object is set to identity before drawing.
		A better way to achieve the same effect is to use
		\c #AIDrawArtSuite::DrawThumbnail().
 	*/
	kAIDrawArtIgnoreArtTransformBit				= 6,
	/** Obsolete.  */
	kAIDrawArtPreviewCropBit					= 7,
	/** When set, a lengthy drawing operation can be interrupted
		in response to user activity.  If previewing is interrupted,
		\c #AIDrawArtSuite::DrawArt() returns \c #kDrawArtInterruptedErr
		and the \c interruptedArt member of the \c #AIDrawArtData is
		set to the object where drawing stopped.
	*/
	kAIDrawArtPreviewInterrupt					= 8,
	/** When set, continues an interrupted drawing operation from the
		point at which it was stopped. */
	kAIDrawArtPreviewContinue					= 9,
	/** (Not recommended.) When set, ignores dashes on strokes when
		drawing. */
	kAIDrawArtIgnoreDashedLines					= 10,
	/** Obsolete.  */
	kAIDrawArtDontColorCalibration				= 11,
	/** When set, the artwork is in an isolated transparency group that uses the
		document color space. A plug-in that draws into a dialog or palette must
		isolate the artwork to ensure that transparency blending is in the document
		color space. */
	kAIDrawArtIsolate							= 12,
	/** When set, ignores the transparency aspects (blend mode, opacity, and opacity mask)
		of the object being drawn. Does not ignore knockout and alpha in shape setting.
		If the object is an image, does not ignore the opacity of pixels. */
	kAIDrawArtIgnoreTopLevelTransparency		= 13,
	/** When set, modifies the color as if the image were printed
		on colored paper. The paper color is specified in the transparency
		panel of the document setup dialog. In that panel there are two color
		swatches that normally define the colors for the transparency grid.
		The topmost swatch also defines the color that is used when simulating
		colored paper. 	 */
	kAIDrawArtSimulateColoredPaper				= 14,
	/** When set, any overprint specification on objects is ignored,
		so that colors do not overprint. */
	kAIDrawArtIgnoreOverprint					= 15,
	/** When set, placed EPS files are drawn by  parsing and rendering their
		PostScript contents instead of drawing their low resolution image proxies.
		The result is the same as turning off the preference "Use Low Resolution
		Proxy for Linked EPS".  */
	kAIDrawArtPlayEPS							= 16,
	/** When set, color conversion uses a faster but possibly less accurate
		algorithm. Use for interactive display but not for rasterization. */
	kAIDrawArtFastColorTransform				= 17,
	/** When set, disposes of cached patterns and regenerates them when rendering.
		Converting patterns into a renderable form for display takes time, so
		Illustrator normally caches the converted results. However, the results
		of conversion can depend on current application or document settings, such as
		the color settings and document profile.  */
	kAIDrawArtDontCachePatterns					= 18,
	/** When set, draws the specified object regardless of whether it is hidden.  */
	kAIDrawArtIgnoreTopLevelInvisibility		= 19,
	/** When set, the initial state (that is, the state of the topmost object)
		for inherited knockout states is assumed to be on, rather than the default state of off.
		To use this flag, you must start a knockout transparency group before calling
		\c #AIDrawArtSuite::DrawArt(). */
	kAIDrawArtKnockoutAlreadyOn					= 20,
	/** Not used. */
	kAIDrawArtRunInBackground					= 21,
	/** When set, does not attempt to continue an interrupted render.
		Allows for more interruptability. */
	kAIDrawArtPreviewCannotContinue				= 22,
	/** When set, draws the object only if it is a clipping object,
		in order to establish a clip in the target port.
	 	By default, a clipping object passed to AIDrawArtSuite::DrawArt()
	 	is not drawn. */
	kAIDrawArtClipOnly							= 23,
	/** When set, draws to OPP port, simulating the appearance of spot colors.
		As with #kAIDrawArtIsolate, this isolates any blending modes
		from the backdrop.
		If the objects drawn should not be isolated from one another.
		and if multiple calls to \c #AIDrawArtSuite::DrawArt() are required,
		use \c #AIDrawArtSuite::BeginDrawArt().
		The spot plates needed are determined from the artwork
		that is to be drawn. */
	kAIDrawArtOPP								= 24,
	/** When set, ingnores overprint attribute applied to white objects.
		This works only for process colors and document model CMYK.
	*/
	kAISuppressWhiteOP							= 25
};

/** Flag masks for #AIDrawArtFlags. See #AIDrawArtFlagBitPos. */
enum AIDrawArtFlagsValue {
	kAIDrawArtPreviewMask						= (1 << kAIDrawArtPreviewBit),
	kAIDrawArtPreviewImagesMask					= (1 << kAIDrawArtPreviewImagesBit),
	kAIDrawArtPreviewDimmedImagesMask			= (1 << kAIDrawArtPreviewDimmedImagesBit),
	kAIDrawArtPreviewImageOrDimImageMask		= (kAIDrawArtPreviewImagesMask | kAIDrawArtPreviewDimmedImagesMask),
	kAIDrawArtPreviewPatternsMask				= (1 << kAIDrawArtPreviewPatternsBit),
	kAIDrawArtSelectObjectsMask					= (1 << kAIDrawArtSelectObjectsBit),
	kAIDrawArtShowGuidesMask					= (1 << kAIDrawArtShowGuidesBit),
	kAIDrawArtIgnoreArtTransformMask			= (1 << kAIDrawArtIgnoreArtTransformBit),
	kAIDrawArtPreviewCropMask					= (1 << kAIDrawArtPreviewCropBit),
	kAIDrawArtPreviewInterruptMask				= (1 << kAIDrawArtPreviewInterrupt),
	kAIDrawArtPreviewContinueMask				= (1 << kAIDrawArtPreviewContinue),
	kAIDrawArtIgnoreDashedLinesMask				= (1 << kAIDrawArtIgnoreDashedLines),
	kAIDrawArtDontColorCalibrationMask			= (1 << kAIDrawArtDontColorCalibration),
	kAIDrawArtIsolateMask						= (1 << kAIDrawArtIsolate),
	kAIDrawArtIgnoreTopLevelTransparencyMask	= (1 << kAIDrawArtIgnoreTopLevelTransparency),
	kAIDrawArtSimulateColoredPaperMask			= (1 << kAIDrawArtSimulateColoredPaper),
	kAIDrawArtIgnoreOverprintMask				= (1 << kAIDrawArtIgnoreOverprint),
	kAIDrawArtPlayEPSMask						= (1 << kAIDrawArtPlayEPS),
	kAIDrawArtFastColorTransformMask			= (1 << kAIDrawArtFastColorTransform),
	kAIDrawArtDontCachePatternsMask				= (1 << kAIDrawArtDontCachePatterns),
	kAIDrawArtIgnoreTopLevelInvisibilityMask	= (1 << kAIDrawArtIgnoreTopLevelInvisibility),
	kAIDrawArtKnockoutAlreadyOnMask				= (1 << kAIDrawArtKnockoutAlreadyOn),
	kAIDrawArtRunInBackgroundMask				= (1 << kAIDrawArtRunInBackground),
	kAIDrawArtPreviewCannotContinueMask			= (1 << kAIDrawArtPreviewCannotContinue),
	kAIDrawArtClipOnlyMask						= (1 << kAIDrawArtClipOnly),
	kAIDrawArtOPPMask							= (1 << kAIDrawArtOPP),
	kAISuppressWhiteOPMask						= (1 << kAISuppressWhiteOP)
};


/** Values for \c #AIDrawArtOutputType, specified in the \c type field
	of \c #AIDrawArtData structure. <br>Indicates the type of port
	that is specified as \c output, using an \c #AIDrawArtOutputUnion structure. */
enum AIDrawArtOutputTypeValue {
	kAIDrawArtUnknownOutput						= 0,
	/** Draw destination is a Mac OS GWorld in the \c gWorld member.
	 This type is no longer supported and returns error*/
	kAIDrawArtGWorldOutput						= 1,
	/** Draw destination is an \c AGMPort* in the \c port member.*/
	kAIDrawArtAGMPortOutput						= 2,
	/** Draw destination is an \c AGMPort* in the \c portV6 member. */
	kAIDrawArtAGMPortOutputV6					= 3,
	/** Draw destination is an \c AIStructuredPort* in the \c structPort member */
	kAIDrawArtStructuredPortOutput				= 4
};

/** Values for #AIDrawColorStyle */
enum AIDrawColorStyleValue {
	/** Fill style */
	kAIDrawColorStyleFill						= 0,
	/** Frame style */
	kAIDrawColorStyleFrame						= 1
};


/** Values for #AIDrawColorOptions */
enum AIDrawColorOptionsValue {
	/** Draw gradients as linear, even if they are radial. */
	kAIDrawArtGradientForceLinear				= (1 << 0),
	/** Do not convert colors to the document color model prior to drawing them.
		This allows drawing of out of gamut RGB colors when the current document
		color space is CMYK. */
	kAIDrawColorNoDocCsConversion				= (1 << 1)
};


/** @ingroup Errors */
#define	kUnknownDrawArtErr					'DHUH'
/** @ingroup Errors */
#define KUnknownDrawArtOutputTypeErr		'DOUT'
/** @ingroup Errors */
#define	kBadDrawArtPreviewMatrixErr			'DMTX'
/** @ingroup Errors */
#define kDrawArtInterruptedErr				'DITR'


/*******************************************************************************
 **
 **	Types
 **
 **/

/** See \c #AIDrawArtFlagsValue for possible values. */
typedef ai::uint32 AIDrawArtFlags;
/** See \c #AIDrawArtOutputTypeValue for possible values. */
typedef ai::int32 AIDrawArtOutputType;

/** Information needed for drawing into a GWorld in Mac OS. */
typedef struct AIDrawArtGWorld {
	void *worldPointer;
} AIDrawArtGWorld;

/** Information needed for drawing into an AGM port. */
typedef struct AIDrawArtAGMPort {
	AIAGMPort *port;
	AIRect portBounds;
} AIDrawArtAGMPort;

/**  Information needed for drawing into an AGM version 6 port. */
typedef struct AIDrawArtAGMPortV6 {
	void *port;
	AIRect portBounds;
} AIDrawArtAGMPortV6;

/** The possible output targets for drawing art. */
typedef union {

	AIDrawArtGWorld gWorld;
	AIDrawArtAGMPort port;
	AIDrawArtAGMPortV6 portV6;
	struct AIStructuredPort* structPort;
} AIDrawArtOutputUnion;

/** Drawing data, defines an art object to be drawn, the object it is
	to be drawn into and parameters affecting how it is to be
	drawn. See \c #AIDrawArtSuite::DrawArt(), \c #AIDrawArtSuite::BeginDrawArt() */
typedef struct AIDrawArtData {
	/** The version of \c #AIDrawArtSuite in use, a \c #kAIDrawArtVersion value. */
	ai::int16 version;
	/** Flags that modify drawing behavior, a logical OR of
		\c #AIDrawArtFlagBitPos values. */
	AIDrawArtFlags flags;
	/** The type of port that is the destination for the draw operation. */
	AIDrawArtOutputType type;
	/** The point in the source artwork coordinates that is mapped to (0,0) in
	 	the destination port.*/
	AIRealPoint origin;
	/** The transformation matrix to be applied after placement
		at the origin. */
	AIRealMatrix matrix;
	/** The art object to be drawn. */
	AIArtHandle art;
	/** The destination clipping bounds. */
	AIRealRect destClipRect;
	/** When true, \c destClipRect is erased before the art is drawn. */
 	AIBoolean eraseDestClipRect;
	/** The art object that was being drawn when the operation was
		interrupted. See \c #kAIDrawArtPreviewInterrupt and \c #kAIDrawArtPreviewContinue. */
	AIArtHandle interruptedArt;
	 /** The greeking threshold. If the point size of text,
	 	after transformation to the coordinate system of the
		destination port, is smaller than this value, the text
		is greeked. Use -1 to indicate no greeking. */
	AIReal greekThreshold;
	/** Not used */
	AIExtendedRGBColorRec selectionColor;
	/** The port that is the destination for the draw operation.*/
	AIDrawArtOutputUnion output;
	/** When true, draw only art overlapping \c #srcClipRect on the port */
	AIBoolean doSrcClip;
	/** If doSrcClip is true. Draw only art having an overlap between srcClipRect
		and visual bound of the art.*/
	AIRealRect srcClipRect;
public:
	/** Default constructor. It initialize only doSrcClip.Rest of the initialization to be done by client*/
	AIDrawArtData():doSrcClip(false) // This ensures no porting effort for the change
	{
	}
} AIDrawArtData;


/** See #AIDrawColorStyleValue for possible values. */
typedef ai::int32 AIDrawColorStyle;
/** See #AIDrawColorOptionsValue for possible values. */
typedef ai::int32 AIDrawColorOptions;

/** Structure defining a color to be drawn, the object it is
	to be drawn into and parameters affecting how it is to be
	drawn. */
typedef struct AIDrawColorData {
	AIDrawArtOutputType type;

	AIDrawColorStyle style;
	AIDrawColorOptions options;
	AIColor color;
	AIRealRect rect;
	AIReal width;							// when style is frame

	union {
		AIDrawArtGWorld gWorld;
		AIDrawArtAGMPort port;
		AIDrawArtAGMPortV6 portV6;
	} output;
} AIDrawColorData;


/*******************************************************************************
 **
 **	Suite
 **
 **/

/**	@ingroup Suites
	These functions draw Illustrator artwork to an \e output \e port
	(drawing surface). The port can be a screen window, or it can be
	an offscreen drawing surface used to rasterize artwork.

	The many drawing options are controlled by values in an \c #AIDrawArtData
	structure and related option structures \c #AIColorConvertOptions and
	\c #AIDrawArtFlags.

	When drawing to a port whose color space does  not match the
	document color space, bracket a sequence of calls
	to \c #DrawArt() with calls to.\c #BeginDrawArt() and \c #EndDrawArt().
	Examples are drawing a CMYK document to an RGB window,
	or an RGB document to a window with a different profile.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIDrawArtSuite and \c #kAIDrawArtVersion.
 */
typedef struct {

	/** Draws artwork as specified
			@param data A pointer to the structure that specifies an art object
				to be drawn, the object it is to be drawn into, and
				parameters affecting how it is to be drawn.
			@param options An \c #AIColorConvertOptions object that sets
				the appropriate black preservation value--that is, whether
				a CMYK to RGB/Gray color transformation maps CMYK 0,0,0,1
				to the darkest black:
					\li By default, the operation uses the standard conversion,
						which never uses black preservation.
					\li For export, the operation uses the black-preservation setting
						that is currently configured in the print and export preferences.
					\li For preview, the operation uses the black-preservation setting
						that is currently configured in the screen-display preferences.
	*/
	AIAPI AIErr (*DrawArt)(AIDrawArtData *data, const AIColorConvertOptions& options );

	/** Establishes a temporary drawing surface whose color space matches the
		document space. Must be paired with a call to \c #EndDrawArt() at the end
		of a sequence of calls \c #DrawArt().
			@param data A pointer to the structure that specifies an art object
				to be drawn, the object it is to be drawn into, and
				parameters affecting how it is to be drawn. Can be \c NULL.
			@param options An \c #AIColorConvertOptions object; see \c #DrawArt().
			@param flags A set of options that modify drawing behavior, a logical
				OR of \c #AIDrawArtFlagBitPos values.
				@note If you set the \c #kAIDrawArtOPP flag to draw to an OPP port,
					the "begin" call temporarily changes the target port in the \c data
					structure. The call to \c #EndDrawArt() restores the
					original port. In this case, the set of spot colors needed for the
					OPP port are determined from the art object specified in \c data, or
					from the entire document if no art object is specified.

		*/
	AIAPI AIErr (*BeginDrawArt)(AIDrawArtData * data, const AIColorConvertOptions& options, AIDrawArtFlags flags );

	/** Copies the contents of the temporary drawing surface to the final destination.
			@param data A pointer to the drawing data structure that was passed to
				the corresponding call to \c #BeginDrawArt().
			@param options The \c #AIColorConvertOptions object that was passed to
				the corresponding call to \c #BeginDrawArt().
		*/
	AIAPI AIErr (*EndDrawArt)(AIDrawArtData *data, const AIColorConvertOptions& options );

	/** Draws a color swatch. Color swatches are always assumed to be drawn for the
		purpose of screen display.
			@param data A pointer to the structure that specifies an art object
				to be drawn, the object it is to be drawn into, and
				parameters affecting how it is to be drawn.
		*/
	AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data );

	/** Draws the highlighting annotations for an art object. Call only in the response
		to an annotator's Draw Annotations message.
			@param art The art object.
			@param color The highlight color.
			@param lineWidth The stroke width.
	*/
	AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color, float lineWidth );

	/** Draws a thumbnail of an art object to the AGM port. Thumbnails are always assumed
		to be drawn for the purpose of screen display. No transformations are applied, and
		the image is drawn to fit into the destination rectangle.
			@param art The art object, of type \c #kRasterArt or \c #kPlacedArt.
			@param port A pointer to the AGM port.
			@param dstrect The destination rectangle, a bounding box for the thumbnail image.
		*/
	AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect );

	/** Creates an AGM port for an image of given dimensions.
			@param width Width of the image.
			@param height Height of the image.
			@param outRport [out] A buffer in which to return the new raster port.
		*/
	AIAPI AIErr	(*CreateImagePort) (ai::uint32 width, ai::uint32 height, AIAGMPort **outRport);

	/** Retrieves the pixel data corresponding to the image created through \c #CreateImagePort().
		This is the read-only pixel data owned by the implementation;
		the caller should not allocate memory for the data. This pixel data
		is valid until you call \c #DestroyImagePort() (see example).
		Data of a particular pixel is in the form of ARGB (alpha, red, green and blue). The total length of pixel data
		is equal to 4 * width * height.

		@code
			//Example on how to call this method.
			size_t length = 0;
			const ai::uint8* pixelData = NULL;
			AIErr error = sAIDrawArt->GetImagePixelData(rport, &pixelData, &length, NULL, NULL);
		@endcode

			@param rport A pointer to the AGM port.
			@param outPixedData [out] A buffer in which to return a pointer to the pixel data bytes.
			@param outLength [out] A buffer in which to return the length of the pixel data in bytes.
			@param outWidth [out] A buffer in which to return the width of the image, or NULL if this information is not required.
			@param outHeight [out] A buffer in which to return the height of the image, or NULL if this information is not required.
		*/
	AIAPI AIErr	(*GetImagePixelData) (AIAGMPort *rport, const ai::uint8** outPixedData, size_t* outLength, ai::uint32* outWidth, ai::uint32* outHeight);

	/** Destroys the supplied AIAGMPort.
			@param rport A pointer to the AGM port.
		*/
	AIAPI AIErr	(*DestroyImagePort) (AIAGMPort *rport);

} AIDrawArtSuite;


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h<|end_filename|>
#ifndef __BloksAIPlugin_h__
#define __BloksAIPlugin_h__

#include "Plugin.hpp"
#include "BloksAIPluginID.h"

/**	Creates a new BloksAIPlugin.
@param pluginRef IN unique reference to this plugin.
@return pointer to new BloksAIPlugin.
*/
Plugin* AllocatePlugin(SPPluginRef pluginRef);

/**	Reloads the BloksAIPlugin class state when the plugin is
reloaded by the application.
@param plugin IN pointer to plugin being reloaded.
*/
void FixupReload(Plugin* plugin);

/**	Hooks BloksAIPlugin up as an Illustrator plug-in.
@ingroup BloksAIPlugin
*/
class BloksAIPlugin : public Plugin
{
public:
	/** Constructor.
	@param pluginRef IN reference to this plugin.
	*/
	BloksAIPlugin(SPPluginRef pluginRef);

	/** Destructor.
	*/
	virtual ~BloksAIPlugin();

	/**	Restores state of BloksAIPlugin during reload.
	*/
	FIXUP_VTABLE_EX(BloksAIPlugin, Plugin); // override

	/**	Initializes the plugin.
	@param message IN message sent by the plugin manager.
	@return kNoErr on success, other ASErr otherwise.
	*/
	ASErr StartupPlugin(SPInterfaceMessage * message); // override

	/**	Removes the plugin.
	@param message IN message sent by the plugin manager.
	@return kNoErr on success, other ASErr otherwise.
	*/
	ASErr ShutdownPlugin(SPInterfaceMessage * message); // override

protected:
	virtual ASErr Notify(AINotifierMessage* message); // override

private:
	AINotifierHandle fRegisterEventNotifierHandle;
	AINotifierHandle fRegisterSelectionChangedHandle;
	AINotifierHandle fRegisterUndoHandle;
	AINotifierHandle fRegisterRulerHandle;
};

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentView.h<|end_filename|>
#ifndef __AI180DocumentView__
#define __AI180DocumentView__

/*
 *     Name:	AI180DocumentView.h
 *     Purpose:	Adobe Illustrator Document View Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2008 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIRealMath__
#include "AIRealMath.h"
#endif

#ifndef __AIDocument__
#include "AIDocument.h"
#endif

#include "AIDocumentView.h"

#include "AIHeaderBegin.h"

/** @file AI180DocumentView.h */

/*******************************************************************************
 **
 **	Constants
 **
 **/

#define kAI180DocumentViewSuite				kAIDocumentViewSuite
#define kAI180DocumentViewSuiteVersion12	AIAPI_VERSION(12)

// latest version
#define kAI180DocumentViewSuiteVersion		kAI180DocumentViewSuiteVersion12
#define kAI180DocumentViewVersion			kAI180DocumentViewSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/


/** @ingroup Suites
	Use these functions to get and set properties of a document view,
	including the bounds, center, zoom, and screen mode.

	To operate on the current view, you can usually pass \c NULL for
	the \c view parameter. To get a view reference for the current
	view, pass 0 to \c #AIDocumentViewSuite::GetNthDocumentView().

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIDocumentViewSuite and \c #kAIDocumentViewVersion.
*/
struct AI180DocumentViewSuite {

	/** Retrieves the bounds of a document view in artwork coordinates (that is,
		the portion of the artboard that is visible in the window).
			@param view The view reference, or \c NULL for the current view.
			@param bounds [out] A buffer in which to return the bounding box.
		*/
	AIAPI AIErr (*GetDocumentViewBounds) ( AIDocumentViewHandle view, AIRealRect *bounds );

	/** Retrieves the center of a document view in artwork coordinates (that is, the
		point of the artboard that maps to the center of the window).
			@param view The view reference, or \c NULL for the current view.
			@param center [out] A buffer in which to return the center point.
		*/
	AIAPI AIErr (*GetDocumentViewCenter) ( AIDocumentViewHandle view, AIRealPoint *center );

	/** Sets the point of the artboard that maps to the center of the window for a view.
			@param view The view reference, or \c NULL for the current view.
			@param center The new center point.
		*/
	AIAPI AIErr (*SetDocumentViewCenter) ( AIDocumentViewHandle view, const AIRealPoint *center );

	/** Retrieves the zoom factor for a view. This is the scale factor from artwork
		coordinates to window coordinates.
			@param view The view reference, or \c NULL for the current view.
			@param zoom [out] A buffer in which to return the zoom factor, a percentage
				value where 1 is 100% (actual size), 0.5 is 50% and 2 is 200%.
		*/
	AIAPI AIErr (*GetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal *zoom );

	/** Sets the scale factor from artwork coordinates to window coordinates for a view.
		The scale factor is silently clamped to lie between the minimum and maximum values
		supported (currently between 1/32 and 64). After adjusting the zoom, the document view
		center remains unchanged.
				@param view The view reference, or \c NULL for the current view.
				@param zoom The new zoom factor, a percentage value where
					1 is 100% (actual size), 0.5 is 50% and 2 is 200%.
		*/
	AIAPI AIErr (*SetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal zoom );

	/** Converts a point from artwork coordinates to view (window) coordinates. The resulting
		view coordinate is rounded to the nearest pixel.
			@param view The view reference, or \c NULL for the current view.
			@param artworkPoint The point to convert, in artwork coordinates.
			@param viewPoint [out] A buffer in which to return the converted point, in window coordinates.
			@see \c #FixedArtworkPointToViewPoint() (does not round)
		*/
	AIAPI AIErr (*ArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIPoint *viewPoint );

	/** Converts a point from view coordinates to artwork coordinates.
			@param view The view reference, or \c NULL for the current view.
			@param viewPoint The point to convert, in window pixel coordinates.
			@param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates.
			@see \c #FixedViewPointToArtworkPoint() (takes floating-point coordinate values)
		 */
	AIAPI AIErr (*ViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIPoint *viewPoint, AIRealPoint *artworkPoint );

	/** Gets the number of open views for the current document. Use with
		\c #GetNthDocumentView() to iterate through views.
			@param count [out] A buffer in which to return the number of views.
		*/
	AIAPI AIErr (*CountDocumentViews)( ai::int32 *count );

	/** Retrieves a document view for the current document by position index. Use with
		\c #CountDocumentViews() to iterate through views.
			@param n The index, in the range <code>[1..numViews]</code>, or 0 to get the current view.
			@param view [out] A buffer in which to return the view reference.
		*/
	AIAPI AIErr (*GetNthDocumentView)( ai::int32 n, AIDocumentViewHandle *view );

	/** Converts a point from artwork coordinates to view (window) coordinates. Does \e not round
		the result.
			@param view The view reference, or \c NULL for the current view.
		 	@param artworkPoint The point to convert, in artwork coordinates.
		 	@param viewPoint [out] A buffer in which to return the converted point, in window coordinates.
			@see \c #ArtworkPointToViewPoint() (rounds result to nearest pixel)
		*/
	AIAPI AIErr (*FixedArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIRealPoint *viewPoint );

	/** Converts a point from view coordinates to artwork coordinates.
			@param view The view reference, or \c NULL for the current view.
			@param viewPoint The point to convert, in window floating-point coordinates.
			@param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates.
			@see \c #ViewPointToArtworkPoint() (takes pixel coordinate values)
		*/
	AIAPI AIErr (*FixedViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIRealPoint *viewPoint, AIRealPoint *artworkPoint );

	/** Sets the screen mode of a view. In the UI, the screen mode is
		selected with icons at the bottom of the Tool palette.
			 @param view The view reference, or \c NULL for the current view.
			 @param mode The new screen mode.
		*/
	AIAPI AIErr (*SetScreenMode) ( AIDocumentViewHandle view, AIScreenMode mode );

	/** Retrieves the screen mode of a view. In the UI, the screen mode is
		shown by icons at the bottom of the Tool palette.
			 @param view The view reference, or \c NULL for the current view.
			 @param mode [out] A buffer in which to return the screen mode.
		*/
	AIAPI AIErr (*GetScreenMode) ( AIDocumentViewHandle view, AIScreenMode *mode );

	/** Retrieves the page tiling information that describes how the artwork is printed
		onto one or more pages.
			 @param pageTiling [out] A buffer in which to return the tiling information.
		*/
	AIAPI AIErr (*GetPageTiling) ( AIPageTiling *pageTiling );

	/** Reports whether there is a visible template layer.
			 @param view The view reference, or \c NULL for the current view.
			 @param visible [out] A buffer in which to return true if the template layer is shown.
		*/
	AIAPI AIErr (*GetTemplateVisible) ( AIDocumentViewHandle view, AIBoolean *visible );

	/** Scrolls a document window.
			 @param view The view reference, or \c NULL for the current view.
			 @param delta The vector by which to scroll, a horizontal and vertical
			 	distance in points.
		*/
	AIAPI AIErr (*DocumentViewScrollDelta)( AIDocumentViewHandle view, AIRealPoint *delta);

	/** Retrieves a rectangle that encloses (at least) the portions of the viewed
		document that have been changed and so need to be redrawn. This rectangle is reset to
		be empty each time the \c #kAIDocumentViewInvalidRectChangedNotifier is sent.
			@param view The view reference, or \c NULL for the current view.
			@param invalidRect [out] A buffer in which to return the invalid area, in artwork coordinates.
		*/
	AIAPI AIErr (*GetDocumentViewInvalidRect)( AIDocumentViewHandle view, AIRealRect *invalidRect );

	/** Sets the invalid rectangle for a view. This is the area that encloses
		(at least) the portions of the viewed document that have been changed
		and so need to be redrawn in the given view.
			@param view The view reference, or \c NULL for the current view.
			@param invalidRect The new area, in artwork coordinates.
			@see \c #GetDocumentViewInvalidRect(), \c #SetDocumentViewInvalidDocumentRect()
		*/
	AIAPI AIErr (*SetDocumentViewInvalidRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect );

	/** Retrieves the display mode for a view.
			@param view	The view reference, or \c NULL for the current view.
			@param style [out] A buffer in which to return the style, a logical OR of these bit flags:<br>
				\c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk
		*/
	AIAPI AIErr (*GetDocumentViewStyle)( AIDocumentViewHandle view,  ai::int16 *style );

	/** Sets the invalid rectangle for all views of a viewed document. This is the area
		that encloses (at least) the portions of the viewed document that have been
		changed and so need to be redrawn in all views of that document.
			@param view The view reference, or \c NULL for the current view.
			@param invalidRect The new area, in artwork coordinates.
			@see \c #SetDocumentViewInvalidRect()
		*/
	AIAPI AIErr (*SetDocumentViewInvalidDocumentRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect );

	/** Reports whether page tiling is shown for the current view. Each view has its own setting.
			@param show [out] A buffer in which to return true if page tiling is shown.
		*/
	AIAPI AIErr (*GetShowPageTiling) ( AIBoolean *show );

	/** Sets the page tiling mode for the current view. Each view has its own setting.
			@param show True to turn page tiling on, false to turn it off.
		*/
	AIAPI AIErr (*SetShowPageTiling) ( AIBoolean show );

	/** Retrieves grid options for a view.
			@param view The view reference, or \c NULL for the current view.
			@param show [out] A buffer in which to return true if the grid is visible.
			@param snap [out] A buffer in which to return true if the snap-to-grid is on.
		*/
	AIAPI AIErr (*GetGridOptions) ( AIDocumentViewHandle view, AIBoolean* show, AIBoolean* snap );

	/**  Sets grid options for a view
			@param view The view reference, or \c NULL for the current view.
	 		@param show True to make the grid visible, false to hide it.
			@param snap True to turn snap-to-grid on, false to turn it off.
		*/
	AIAPI AIErr (*SetGridOptions) ( AIDocumentViewHandle view, AIBoolean show, AIBoolean snap );

	/** Reports whether the transparency grid is shown in a view.
			@param view The view reference, or \c NULL for the current view.
			@param show [out] A buffer in which to return true if the transparency grid is visible.
		*/
	AIAPI AIErr (*GetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean* show );

	/** Sets whether the transparency grid is shown in the view.
			@param view The view reference, or \c NULL for the current view.
	 		@param show True to make the transparency grid visible, false to hide it.
		*/
	AIAPI AIErr (*SetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean show );

	/** Retrieves the document displayed in a view.
			@param view The view reference, or \c NULL for the current view.
			@param document [out] A buffer in which to return the document reference.
		*/
	AIAPI AIErr (*GetDocumentViewDocument) ( AIDocumentViewHandle view, AIDocumentHandle *document );

	/** Forces all document views to not be obscured by the Control palette.
		*/
	AIAPI AIErr (*ForceDocumentViewsOnScreen) ( void );

	/** Retrieves the visibility state of the guides.
			@param view The view reference, or \c NULL for the current view.
			@param show [out] A buffer in which to return true if the guides are visible.
		*/
	AIAPI AIErr (*GetShowGuides) ( AIDocumentViewHandle view, AIBoolean* show );

	/** Sets the visibility state of the guides.
			@param view The view reference, or \c NULL for the current view.
	 		@param show True to make the guides visible, false to hide them.
		*/
	AIAPI AIErr (*SetShowGuides) ( AIDocumentViewHandle view, AIBoolean show );

 	/** Retrieves the visibility state of the edges of the selection.
 			@param view The view reference, or \c NULL for the current view.
 			@param show True to make the edges visible, false to hide them.
 		*/
 	AIAPI AIErr (*GetShowEdges) ( AIDocumentViewHandle view, AIBoolean* show );

 	/** Sets the visibility state of the edges of the selection.
 			@param view The view reference, or \c NULL for the current view.
 			@param show True to make the edges visible, false to hide them.
 		*/
 	AIAPI AIErr (*SetShowEdges) ( AIDocumentViewHandle view, AIBoolean show );

	/** Captures the contents of the view window (excluding scrollbars, etc.) to
		a TIFF file. Artboards are centered in window before capture.
 			@param view			The view reference, or \c NULL for the current view.
			@param saveFilename	Full path and name of TIFF file to create.
			@param windowSize	Size to set window before capture. Will restore
								original window size before returning.	
		*/
	AIAPI AIErr (*SaveImage) ( AIDocumentViewHandle view, const ai::UnicodeString &saveFilename, 
		const AIPoint &windowSize );

	/** Determines the current state of video rulers if they are visible or not.
			@param view			The view reference, or \c NULL for the current view.
			@param visible		True if the artboard rulers are visible, false otherwise.
		*/
	AIAPI AIErr (*IsArtboardRulerVisible) ( const AIDocumentViewHandle view, AIBoolean *visible );

	/** Sets the video rulers visibility on or off.
			@param view			The view reference, or \c NULL for the current view.
			@param visible		True if artboard ruler visibility is to be turned on, false otherwise.
		*/
	AIAPI AIErr (*SetArtboardRulerVisible) ( const AIDocumentViewHandle view, const AIBoolean visible );
	
	/** Returns the number plates in the plate set for the view.  The plate set is only relevant for OPP
		view mode.
			@param view					The view reference, or \c NULL for the current view.
			@param count [out]			The number of plates.
		*/
	AIAPI AIErr (*CountOPPPlates) ( AIDocumentViewHandle view, ai::int32& count );

	/** Get an identifier for the nth plate in the view's plate set.
			@param view					The view reference, or \c NULL for the current view.
			@param plate [out]			The plate identifier.
		*/
	AIAPI AIErr (*GetNthOPPPlate) ( AIDocumentViewHandle view, ai::int32 n, ai::ColorSpace& plate );

	/** Get the visibility state for \c plate in the current view's plate state.  Visibility is only
		recognized for OPP view mode.
			@param view					The view reference, or \c NULL for the current view.
			@param plate				Identifier for the plate to get the state of.
			@param isOn [out]			The current visibility state of \c plate.
		*/
	AIAPI AIErr (*GetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, AIBoolean& isOn );

	/** Set the visibility state for \c plate in the current view's plate state.  Visibility is only
		recognized for OPP view mode.  Invalid \c plate identifiers are ignored.
			@param view					The view reference, or \c NULL for the current view.
			@param plate				Identifier for the plate to get the state of.
			@param isOn					The new visibility state of \c plate.
		*/
	AIAPI AIErr (*SetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, const AIBoolean isOn );

	/** Sets the display mode for a view.  Currently these flags are mostly mutually exclusive. \c #kVsInk
		only makes sense combined with \c #kVsPreview. \c #kVsArtwork, \c #kVsPreview, and \c #kVsRaster are 
		mutually exclusive.
			@param view	The view reference, or \c NULL for the current view.
			@param style A logical OR of these bit flags:<br>
				\c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk
			@param mask A logical OR of the same bit values as style indicating which 
				bits from style to change.
		*/
	AIAPI AIErr (*SetDocumentViewStyle)( AIDocumentViewHandle view,  ai::int16 style, ai::int16 mask );

	/** Determines whether the rulers are shown in Artboard co-ordinates.
	@param view			The view reference, or \c NULL for the current view.
	@param isYes		True if the rulers are shown in Artboard co-ordinates, false otherwise.
	*/
	AIAPI AIErr (*IsRulerInArtboardCoordinates)( const AIDocumentViewHandle view, ASBoolean *isYes );

	/** Sets the rulers to use Artboard co-ordinates.
	@param view			The view reference, or \c NULL for the current view.
	@param state		True if the rulers are shown in Artboard co-ordinates, false otherwise.
	*/
	AIAPI AIErr (*UseArtboardCoordinatesInRuler) ( const AIDocumentViewHandle view, const ASBoolean state );
};


#include "AIHeaderEnd.h"


#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192FileFormat.h<|end_filename|>
#ifndef __AI192FileFormat__
#define __AI192FileFormat__

/*
 *        Name:	AI192FileFormat.h
 *   $Revision: 25 $
 *      Author:
 *        Date:
 *     Purpose:	Adobe Illustrator File Format Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2014 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/
#include "AIFileFormat.h"

#include "AIHeaderBegin.h"

/** @file AI192FileFormat.h */


/*******************************************************************************
 **
 ** Constants
 **
 **/
#define kAI192FileFormatSuite				"AI File Format Suite"
#define kAI192FileFormatSuiteVersion13		AIAPI_VERSION(13)
#define kAI192FileFormatSuiteVersion		kAI192FileFormatSuiteVersion13
#define kAI192FileFormatVersion				kAI192FileFormatSuiteVersion


/*******************************************************************************
 **
 **	Suite
 **
 **/

/**	@ingroup Suites
	This suite provides functions for creating and managing file-format plug-ins,
	which extend the number of file formats that Illustrator can read and write.

	Reading a format can be transparent to the user; when a file of the
	defined type is selected in the Open dialog, your file format plug-in
	creates artwork in the Illustrator document. If there is a plug-in that writes
	a file format, that format appears in the Save As dialog as an option for the user
	to select. If it is selected, the plug-in walks the artwork tree and writes out
	information on the artwork in the appropriate manner. If your plug-in needs more
	parameters for either reading or writing, it defines a modal dialog to interact
	with the user.

	Plug-ins tell Illustrator about the file formats they
	support by specifying platform file information: the type (such as \c 'ART3')
	in Mac OS, or the extension (such as \c '.AI') in Windows. Plug-ins also indicate
	what read/write capabilities they support.

	One plug-in can register multiple formats. Illustrator handles some parts of the
	file I/O process, and the plug-in does the rest.

	A file-format plug-in receives message actions telling it to:

	\li Check if a file can be read, The Check selector is sent only to plug-ins
		that can read files. It extends the simple type checking done by the  Open dialog.
	\li Ask for parameters.  This selector can be ignored if the plug-in does not need
		user input.
	\li Go. In response, your plug-in executes the read or write operation.

	If a file format plug-in can read, files of its registered file type appear
	in the file list of the Open dialog. In addition to screening by file type,
	Illustrator sends a selector giving a plug-in a chance to check that the
	file can be read. This is useful in the case of text files or files from a
	different file system. If more than one format matches the type, Illustrator
	determines which plug-in should actually open the file, asking the user if necessary.

	If a file format plug-in supports both reading and writing, when reading it should
	store any information about the file needed to write the file back to disk. It can
	store data (for example, the pixel depth of an EPS preview) in the plug-ins globals,
	or in a parameter block. The reference to a block should be attached to the document
	using \c #AIDocumentSuite::SetDocumentFileFormatParameters(). Illustrator keeps this
	parameter-block reference with the document. The plug-in can retrieve it when the
	document is being saved.

	When the user does a Save, by default Illustrator uses the same file format that was
	used to read the file. If the file format does not support writing, the Save As
	dialog appears to let the user choose the save format. All file format plug-ins
	that support saving appear in the format menu of this dialog.

	If you need information from the user to open or save a file, you can present a
	dialog when the ask-for-parameters message is received. When saving files, this
	will be after the Save As dialog has appeared. Your plug-in should save the
	information it collects, keeping it with the document to use for later saves.

	When the go message is received, file formats that read files typically parse
	the input file and create Illustrator artwork using API calls. File formats for
	saving Illustrator artwork traverse the artwork database and write out all
	pertinent information.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAI192FileFormatSuite and \c #kAI192FileFormatVersion.

*/
struct AI192FileFormatSuite {

	/** Adds a file format to the standard file dialog.
		Call during startup to install a plug-in file format.
			@param self	A reference to this plug-in, which adds the format.
			@param name	The unique name of the new file format. You can use
				your company name with a descriptor to make it unique.
				Not displayed or localized.
			@param data	Information about the file format.
			@param options File format operations that this plug-in supports.
				A logical OR of these \c #AIFileFormatOptions values:
				\verbatim
kFileFormatRead
kFileFormatImportArt
kFileFormatExport
kFileFormatExportSelection
kFileFormatPlaceArt
kFileFormatImportStyles
kFileFormatSuppliesPrintRecordOption
kFileFormatIsDefaultOption
kFileFormatConvertTemplate
kFileFormatLinkArt
kFileFormatWrite
kFileFormatNoAutoCheckFormat
kFileFormatSkipStartupObjectsOption
kFileFormatHasExtendedData
kFileFormatSuppressUI
kFileFormatCheckAlways
\endverbatim
			@param fileFormat [out] A buffer in which to return  the handle of
				the new plug-in file format. If you install multiple file formats,
				store this reference in the plug-ins \c globals record, so that your
				plug-in can use it to determine which file format command is to be processed.
				@param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values:                        
				\verbatim
				kNoExtendedOptions
				kSaveMultiArtboards
				kFileFormatPlaceInTouch
				\endverbatim


			@see \c #AddFileFormatEx()
	*/
	AIAPI AIErr (*AddFileFormat) ( SPPluginRef self, const char *name,
				PlatformAddFileFormatData *data, ai::int32 options, AIFileFormatHandle *fileFormat ,  ai::int32 extendedOptions);

	/** Retrieves the name of a file format.
			@param fileFormat The file format.
			@param name [out] A buffer in which to return the name string, as
				passed to \c #AddFileFormat(). Do not modify this string.
		*/
	AIAPI AIErr (*GetFileFormatName) ( AIFileFormatHandle fileFormat, char **name );

	/** Retrieves the option flags of a file format.
			@param fileFormat The file format.
			@param options [out] A buffer in which to return the options, a logical OR of
				\c #AIFileFormatOptions values
		*/
	AIAPI AIErr (*GetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 *options );

	/** Sets the option flags of a file format, which specify what file operations can be handled.
			 @param fileFormat The file format.
			 @param options The options, a logical OR of \c #AIFileFormatOptions values
	*/
	AIAPI AIErr (*SetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 options );

	/** Retrieves a reference to the plug-in that installed a file format,
		to be passed to \c #AIPluginSuite functions.
			@param fileFormat The file format.
			@param plugin [out] A buffer in which to return the plug-in reference.
		*/
	AIAPI AIErr (*GetFileFormatPlugin) ( AIFileFormatHandle fileFormat,
				SPPluginRef *plugin );

	/** Gets the number of installed plug-in file formats.
		Use with \c #GetNthFileFormat() to iterate through all plug-in formats.
			@param count [out] A buffer in which to return the number of formats.
		*/
	AIAPI AIErr (*CountFileFormats) ( ai::int32 *count );

	/** Retrieves a plug-in file format reference by position index.
		Use with \c #CountFileFormats() to iterate through all installed formats.
			@param n The index, in the range <code>[1..numFormats]</code>.
			@param fileFormat [out] A buffer in which to return the file format reference.

		*/
	AIAPI AIErr (*GetNthFileFormat) ( ai::int32 n, AIFileFormatHandle *fileFormat );

	/** Retrieves the file extension for a plug-in file format.
			@param fileFormat The file format.
			@param extension [out] A buffer in which to return the file extension string.
		*/
	AIAPI AIErr (*GetFileFormatExtension) ( AIFileFormatHandle fileFormat, char *extension );

	/** Adds a plug-in file format. This extended version allows you to specify
		a list of Mac OS file types. Call during startup to install a plug-in file format.
			@param self	A reference to this plug-in, which adds the format.
			@param name	The unique name of the new file format. You can use
				your company name with a descriptor to make it unique.
				Not displayed or localized.
			@param dataEx	Information about the file format. This extended version
				uses a data structure with additional fields that allow you to
				specify a list of Mac OS file types. Use \c #SetFileFormatFilter()
				to specify a creator/type pair as the file filter.
			@param options File format operations that this plug-in supports.
				A logical OR of \c #AIFileFormatOptions values.
				When the format is called with a Go selector,
				one of these flags is set in the \c option field to indicate the
				requested operation.
			@param fileFormat [out] A buffer in which to return  the handle of
				the new plug-in file format. If you install multiple file formats,
				store this reference in the plug-ins \c globals record, so that your
				plug-in can use it to determine which file format command is to be processed.
				@param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values:                        
				\verbatim
				kNoExtendedOptions
				kSaveMultiArtboards
				kFileFormatPlaceInTouch
				\endverbatim
				
			@see \c #AddFileFormat(), \c #SetFileFormatFilter()
		*/
	AIAPI AIErr (*AddFileFormatEx) ( SPPluginRef self, const char *name,
				PlatformAddFileFormatExData *dataEx, ai::int32 options, AIFileFormatHandle *fileFormat, ai::int32 extendedOptions );

	/** Retrieves the localizable display name of a plug-in file format.
			@param fileFormat The file format.
			@param szTitle [out] A buffer in which to return the display name.
		*/
	AIAPI AIErr (*GetFileFormatTitle) ( AIFileFormatHandle fileFormat, char *szTitle );

	/** Retrieves the Mac OS file types for a plug-in file format.
			@param fileFormat The file format.
			@param maxNumTypes [in, out] A buffer in which to specify the maximum number
				and return the actual number of values in \c typeList.
			@param typeList [out] A buffer in which to return the 4-character Mac OS type codes.
			@see \c #GetFileFormatCreatorType()	to get the full Mac OS file information.
		*/
	AIAPI AIErr (*GetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumTypes, ai::int32 *typeList );

	/** Associates a file format with a file type filter. File types are specified by (creator, type)
		pairs in Mac OS, and by filename extensions in Windows.
		@note This function extends the \c #AddFileFormat() and \c #AddFileFormatEx() functions
		by allowing filters based on (creator, type) pairs in Mac OS, rather than simple type values.
			@param fileFormat The file format.
			@param numPairs In Mac OS, the number of (creator, type) pairs specified in \c pairList.
				Ignored in Windows.
			@param pairList In Mac OS, a pointer to an array of (creator, type) pairs. These can use
				the Mac OS wild-card value '****' for creator or type. Ignored in Windows.
			@param extensions In Windows, a comma-delimited list of DOS-style extensions that
				are filtered in the Open dialog, or appended to the file name in the
				Saves As dialog. For example, \c "ai,eps".
		*/
	AIAPI AIErr (*SetFileFormatFilter) ( AIFileFormatHandle fileFormat, ai::int32 numPairs, AICreatorTypePair *pairList, const char* extensions );

	/** Retrieves the file type filter for a file format, as specified by (creator, type)
		pairs for Mac OS.
			@param fileFormat The file format.
			@param maxNumTypes [in, out] A buffer in which to specify the maximum number
				and return the actual number of (creator, type) pairs specified in \c pairList.
			@param pairList [out] A buffer in which to return the array of (creator, type) pairs.
		*/
	AIAPI AIErr (*GetFileFormatCreatorType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumPairs, AICreatorTypePair *pairList );

	/** Invokes the File > Save dialog, allowing you to filter the available file formats.
			@param options Limits available file formats to those that support these
				write operations. A logical OR of write operation constants:<br>
				\c #kFileFormatExport<<br>
				\c #kFileFormatWrite
			@param dlgTitle	The title for the Save dialog.
			@param fileSpec	[in, out] A buffer in which to pass the initial file specification
				and return the user-chosen specification.
			@param fileFormat [out] A buffer in which to return the user-chosen file format.
			@param good	[out] A buffer in which to return true if the user clicked Save,
				or false if the user clicked Cancel.
	  */
	AIAPI AIErr (*PutFile) (ai::int32 options, const unsigned char *dlgTitle, ai::FilePath &fileSpec, AIFileFormatHandle *fileFormat, AIBoolean *good );

	/** Sets the priority of a file format. which determines the order in which Illustrator
		searches through formats in deciding which one to use to open a file. The first format
		found that handles a file type is used to open the file.
			@param fileFormat The file format.
			@param priority The new priority, an \c #AIFileFormatPriority value,
		*/
	AIAPI AIErr (*SetFileFormatPriority) ( AIFileFormatHandle fileFormat, ai::int32 priority );

	/** Finds all plug-in file formats that can perform a specified operation for a file.
			@param options The operation, a \c #AIFileFormatOptions value.
			@param file	The file.
			@param maxMatches The maximum number of formats to return.
			@param matchingFormats [out] An array of size \c maxMatches in which to return the matching file formats.
			@param numMatches [out] A buffer in which to return the number of matching file formats found.
		*/
	AIAPI AIErr (*FindMatchingFileFormats) ( ai::int32 options, const ai::FilePath &file, ai::int32 maxMatches, AIFileFormatHandle matchingFormats[], ai::int32* numMatches );

	/** Obsolete */
	AIAPI AIErr (*ResolveImportConflicts) ();

	/** Reports the version of Illustrator in which a raster file
		format, for example the JPEG file format plug-in, was converted from
		using raster art to using placed art in order to perform a place link
		operation. The information is needed so that Illustrator knows when it
		should convert placed linked art back to raster art when saving to a
		legacy file format. For example, if the JPEG file format used raster art
		in version 10 and started using placed art in version 11 then
		Illustrator must convert placed linked JPEG images back to raster art
		when saving to a version 10 or earlier Illustrator file.
		(Note that this function returns a version value, not an error code.)
			@param fileFormat The file format.
			@return The Illustrator version. The default version is 0,
				meaning that placed objects are not converted on export.
			@see \c #SetFirstVersionUsingPlacedArt() to set the version.
		*/
	AIAPI AIVersion (*GetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat);

	/** Sets the version of Illustrator in which a raster file
		format was converted from using raster art to using placed art
		in order to perform a place link operation.
			@param fileFormat The file format.
			@param The Illustrator version value. The default version is 0,
				meaning that placed objects are not converted on export.
			@see \c #GetFirstVersionUsingPlacedArt().
		*/
	AIAPI AIErr (*SetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat, AIVersion version);

	/** Retrieves the Illustrator startup profile type from the XMP metadata embedded in a file.
			@param file  The file path.
			@param docStartupProfile [out] A buffer in which to return the Illustrator
				startup profile constant.  If the information is not in the metadata,
				or if the file does not contain XMP metadata, this is \c #kAIStartupProfileUnknown.
			@return  The error \c #kBadParameterErr if file is empty or does not exist.
		*/
	AIAPI AIErr (*GetFileStartupProfileType) (const ai::FilePath &file, AIDocumentStartupProfile *docStartupProfile);

	/** Retrieves the Illustrator default document profile from the startup-profile type.
			@param docStartupProfile The startup profile type.
			@param profile [out] A buffer in which to return the file-path object for the default document profile.
			@return	The error \c #kCantHappenErr if the file does not exists. <br>
					The error \c #kBadParameterErr if the startup profile is invalid,
	*/
	AIAPI AIErr (*GetStartupFileOfType) (const AIDocumentStartupProfile docStartupProfile, ai::FilePath &profile);

	/** Retrieves the extended option flags of a file format.
		@param fileFormat The file format.
		@param extendedOptions [out] A buffer in which to return the extended options
		\c #AIFFExtendedOptions values
			\verbatim
			kNoExtendedOptions
			kSaveMultiArtboards
			kFileFormatPlaceInTouch
			\endverbatim
	*/
	AIAPI AIErr (*GetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 *extendedOptions );

	/** Sets the extended option flags of a file format, which specify what file operations can be handled.
		@param fileFormat The file format.
		@param extendedOptions File format operations that this plug-in supports. A logical OR of these 
		\c #AIFFExtendedOptions values:                        
			\verbatim
			kNoExtendedOptions
			kSaveMultiArtboards
			kFileFormatPlaceInTouch
			\endverbatim
	*/
	AIAPI AIErr (*SetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 extendedOptions);
} ;

#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAGMTypes.h<|end_filename|>
#ifndef _AIAGMTYPES_H_
#define _AIAGMTYPES_H_

#include "AITypes.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _t_AIAGMColrSpace AIAGMColorSpace;
typedef int AIAGMColorSpaceFamily;
typedef struct _t_AIAGMRasterPort AIAGMRasterPort;
typedef struct _t_AIAGMDisplayListPort AIAGMDisplayListPort;
typedef struct _t_AGMBIBPort AIAGMBIBPort; // (aka AGMPort*) can safely pass AIAGMBIBPort across library boundaries.
typedef struct _t_AGMBIBColorSpace AIAGMBIBColorSpace; // (aka AGMColorSpace*) can safely pass AIAGMBIBColorSpace across library boundaries.
typedef struct _t_AIAGMPort AIAGMPort;
typedef AIAGMPort* AIAGMPortPtr;
/** @deprecated Deprecated with the move to CoolType 5. Use \c #AICTText instead. */
typedef struct _t_AIAGMTextRecord AIAGMTextRecord;
typedef struct _t_AICTText AICTText;
typedef struct _t_AIAGMColorConvertOptions AIAGMColorConvertOptions;

/** AGM comment callback procedure template. */
typedef void (*AIAGMCommentProcPtr)( const AIAGMPort* dstPort, ASInt32 comment,
											 void* commentData, ASUInt32 dataLength );

/** AGM option constants. */
typedef enum {
	kAIAGMOptionsGet,
	kAIAGMOptionsSet,
	kAIAGMOptionsEnable,
	kAIAGMOptionsDisable,
	_MAX_AIAGMOptionsOp = 0x40000000  /* force 32 bit enum */
} AIAGMOptionsOp;

/** AGM text option constants. */
enum {
	kAIAGMOptionNone = 0,
	kAIAGMOptionAAText = 1,
	kAIAGMOptionAAGraphics = 2,
	kAIAGMOptionOverscanImage = 4,
	kAIAGMOptionTextAsPaths = 8,
	kAIAGMOptionResampleImage = 0x10,
	kAIAGMOptionHintGlyphLocations = 0x40,
	kAIAGMOptionAANoSubPixelWidths = 0x80,
	kAIAGMOptionEnableOverprint = 0x100,
	kAIAGMOptionAAImages = 0x10000,
	kAIAGMOptionLinearizeAAOnly = 0x2000,
	kAIAGMOptionAATextPreview = 0x8000,
	kAIAGMOptionUnhintedText = 0x40000,
	kAIAGMOptionOverscannedText = 0x80000,
	kAIAGMOptionIllustratorPixelPerfectDrawing = 0x200000
};

// Keep these synchronized with enum AGMBlendingMode!
/** AGM blending option constants. */
enum AIAGMBlendingMode {
	kAIAGMBlendNormal,
	kAIAGMBlendMultiply,
	kAIAGMBlendScreen,
	kAIAGMBlendDifference,
	kAIAGMBlendDarken,
	kAIAGMBlendLighten,
	kAIAGMBlendColorDodge,
	kAIAGMBlendColorBurn,
	kAIAGMBlendExclusion,
	kAIAGMBlendHardLight,
	kAIAGMBlendOverlay,
	kAIAGMBlendSoftLight,
	kAIAGMBlendHue,
	kAIAGMBlendSaturation,
	kAIAGMBlendColor,
	kAIAGMBlendLuminosity,
	kAIAGMNumBlendingModes,
	_MAX_AIAGMBlendingMode = 0x40000000   /* force 32 bit enum */
};

/** Color table structure. */
struct AIAGMColorTab	{
	/** The number of colors in the table. */
	ai::int32	numColors;
	/** Pointer to the color data. */
	void*	theColors;
};

/** Rectangle structure. */
struct AIAGMInt16Rect {
	/** Left edge.  */
	ai::int16	xMin;
	/** Bottom edge. */
	ai::int16	yMin;
	/** Right edge. */
	ai::int16	xMax;
	/** Top edge. */
	ai::int16	yMax;
}
;

/** Image record structure.*/
struct AIAGMImageRecord	{
	/** Bounding box of the image. */
	AIAGMInt16Rect	bounds;
	/** Pointer to the image data. */
	void*			baseAddr;
	/** Width of the image in bytes. The number of bytes
	varies with the bits-per-pixel of the color space. */
	ai::int32			byteWidth;
	/** Color space. */
	ai::int16			colorSpace;
	/** Number of bits per pixel. */
	ai::int16			bitsPerPixel;
	/** Decode array.  */
	AIFloat*		decodeArray;
	/** Color table. */
	AIAGMColorTab	colorTab;
};


#ifdef __cplusplus
}
#endif

#endif // _AIAGMTYPES_H_


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90PluginGroup.h<|end_filename|>
#ifndef __AI90PluginGroup__
#define __AI90PluginGroup__

/*
 *        Name:	AI90PluginGroup.h
 *     Purpose:	Adobe Illustrator 9.0 Plugin Group Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1995-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIPluginGroup.h"


#include "AIHeaderBegin.h"


/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI90PluginGroupSuite			"AI Plugin Group Suite"
#define kAI90PluginGroupSuiteVersion	AIAPI_VERSION(2)
#define kAI90PluginGroupVersion			kAI90PluginGroupSuiteVersion




/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct {

	AIAPI AIErr (*AddAIPluginGroup) ( SPPluginRef self, char *name, AIAddPluginGroupData *data, long options, AIPluginGroupHandle *entry );
	AIAPI AIErr (*UseAIPluginGroup) ( AIArtHandle art, AIPluginGroupHandle entry );

	AIAPI AIErr (*GetAIPluginGroupName) ( AIPluginGroupHandle entry, char **name );
	AIAPI AIErr (*GetAIPluginGroupVersion) ( AIPluginGroupHandle entry, long *major, long *minor );
	AIAPI AIErr (*GetAIPluginGroupDescription) ( AIPluginGroupHandle entry, char **desc );
	AIAPI AIErr (*GetAIPluginGroupOptions) ( AIPluginGroupHandle entry, long *options );
	AIAPI AIErr (*GetAIPluginGroupPlugin) ( AIPluginGroupHandle entry, SPPluginRef *plugin );

	AIAPI AIErr (*CountAIPluginGroups) ( long *count );
	AIAPI AIErr (*GetNthAIPluginGroup) ( long index, AIPluginGroupHandle *entry );

	AIAPI AIErr (*GetPluginArtName) ( AIArtHandle art, char **name );
	AIAPI AIErr (*SetPluginArtName) ( AIArtHandle art, char *name );
	AIAPI AIErr (*GetPluginArtVersion) ( AIArtHandle art, long *major, long *minor );
	AIAPI AIErr (*SetPluginArtVersion) ( AIArtHandle art, long major, long minor );
	AIAPI AIErr (*GetPluginArtPluginGroup) ( AIArtHandle art,  AIPluginGroupHandle *entry );
	AIAPI AIErr (*SetPluginArtPluginGroup) ( AIArtHandle art );
	AIAPI AIErr (*GetPluginArtEditArt) ( AIArtHandle art, AIArtHandle *editArt );
	AIAPI AIErr (*SetPluginArtEditArt) ( AIArtHandle art, AIArtHandle editArt );
	AIAPI AIErr (*GetPluginArtResultArt) ( AIArtHandle art, AIArtHandle *resultArt  );
	AIAPI AIErr (*SetPluginArtResultArt) ( AIArtHandle art, AIArtHandle resultArt  );
	
	AIAPI AIErr (*GetPluginArtDataCount) ( AIArtHandle art, unsigned long *count );
	AIAPI AIErr (*SetPluginArtDataCount) ( AIArtHandle art, unsigned long count );
	AIAPI AIErr (*GetPluginArtDataRange) ( AIArtHandle art, void *data, unsigned long index, unsigned long count );
	AIAPI AIErr (*SetPluginArtDataRange) ( AIArtHandle art, void *data, unsigned long index, unsigned long count );

	AIAPI AIErr (*MarkPluginArtDirty) ( AIArtHandle art );	// say that an AIUpdateArt notification is needed
	AIAPI AIErr (*MarkPluginArtClean) ( AIArtHandle art );	// say that one isn't

} AI90PluginGroupSuite;

/* Note on MarkPluginArtDirty and MarkPluginArtClean:

	Ordinarily, AIPluginGroup takes care of detecting when a PluginGroup object needs
	to have the resultArt rebuilt. (An AI Update message is sent once when the object
	is first created, and thereafter whenever the group's data or any object in the
	editGroup has been edited outside of the AI Update message handling itself.) 
	But occasionally the default rules are inadequate.

	Some objects may have external dependencies not detectable by the suite support,
	such as referencing a pattern or other global object, an artwork attribute such
	as the page size, etc. Such plugins will usually detect relevant changes via other
	notifications, and for ease of implementation, may wish to trigger the update by
	calling MarkPluginArtDirty.
	
	Conversely, it is often the case that in processing a menu command, tool action,
	etc., a PluginGroup object will first modify the editArt contents and/or the
	object's data, and then rebuild the resultArt. The modifications to the editArt
	or data will mark the plugin object dirty, causing a redundant update if the
	resultArt has already been synced. Calling MarkPluginArtClean will prevent this.
*/

#include "AIHeaderEnd.h"

#endif



<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PathStyle.h<|end_filename|>
#ifndef __AI120PathStyle__
#define __AI120PathStyle__

/*
 *        Name:	AI120PathStyle.h
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator Path Style Suite for AI 12
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AIPathStyle.h"

#ifndef __AI70Color__
#include "AI70Color.h"
#endif

#include "AIHeaderBegin.h"



/*******************************************************************************
 **
 **	Suite name and version
 **
 **/

#define kAI120PathStyleSuite			kAIPathStyleSuite
#define kAIPathStyleSuiteVersion8		AIAPI_VERSION(8)
#define kAI120PathStyleSuiteVersion		kAIPathStyleSuiteVersion8
#define kAI120PathStyleVersion			kAI120PathStyleSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/

/** A path style describes the paint information for an object, including stroke
	and fill. Use the Path Style Suite to access or set path style information for
	paths.
*/
typedef struct {

	/** Retrieves the path style used to fill and/or stroke the object. The object
		must be of type kPathArt, kMeshArt, or kRasterArt. All other types return
		kBadParameterErr. */
	AIAPI AIErr (*GetPathStyle) ( AIArtHandle path, AIPathStyle *style );
	/** Sets the path style used to fill and/or stroke the object. The object
		must be of type kPathArt, kMeshArt, or kRasterArt. All other types return
		kBadParameterErr. */
	AIAPI AIErr (*SetPathStyle) ( AIArtHandle path, AIPathStyle *style );
	
	
	/** Get the common attributes of the current selected objects. Note that this
		API returns a partial style. */
	AIAPI AIErr (*GetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap* stylemap );
	
	/** Apply the path style to any currently selected and paint-targetted objects.
		If a targetted object has an active style, the path style will be merged
		in to the focal fill and stroke filters. Any effects and non-focal fills
		and strokes will be unmodified. Use SetCurrentPathStyleForceSimple instead
		if you want to blow away any active styles. (The reason we didn't just add
		another parameter was so as not to have to bump the suite version number.) */ 
	AIAPI AIErr (*SetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap* stylemap );

	/** Use this function to import the styles contained in the specified file. The
		styles are imported into a new document whose handle is returned. The styles
		can then be accessed through their respective APIs. For example the art
		style can be obtained through the AIArtStyleSuite and the swatches can be
		obtained through the AISwatchListSuite. */
	AIAPI AIErr (*ImportStyles) ( const ai::FilePath &source, AIDocumentHandle *newdoc );

	/** Do not use this function unless you desperately need to import mixed color space
		styles.  AI artwork does not allow mixed color space as of version 12, so using
		this function may cause serious damage on your artwork.  The intention of function
		is allowing mixed color space in Swatch Libraries.  AIPathStyleSuite::ImportStyles()
		does not work for this purpose because it always forces converting mixed color styles
		to a single color space. */
	AIAPI AIErr (*ImportStylesMixedColorSpace) ( const ai::FilePath &source, AIDocumentHandle *newdoc );

	/** Apply the AIColor to the object.  This does what is generally wanted when you've
		got an AIColor and you've got an object, and you want the object painted with the
		color. It handles setting the gradient vector to the default, enumerates groups,
		does the right thing on compound paths, etc. (If, for example, you have an object
		that's stroked with a dashed line and you pass in a new color with the onStroke
		parameter true, the old dash pattern will be retained. If the object didn't have
		a stroke before, the current paint style is looked at. If the current paint style
		also doesn't have a stroke, a sensible default is used.)

		The art object can be any type except kUnknownArt, kPlacedArt, or kMysteryPathArt.

		Since the routine enumerates container objects, for efficiency care should be taken
		that you do not call SetObjectAIColor on both a container and its children.
	*/
	AIAPI AIErr (*SetObjectAIColor) ( AIArtHandle art, AIColor *color, AIBoolean onStroke );

	/** Simple routine to convert from AIColor to AI70Color. */
	AIAPI AIErr	(*AIColorToAI70Color) ( AIColor *from, AI70Color *to);
	/** Simple routine to convert from AI70Color to AIColor. */
	AIAPI AIErr	(*AI70ColorToAIColor) ( AI70Color *from, AIColor *to);

	/** Determines whether the path style makes use of the supplied color in its fill
		or stroke and returns an indicator of how it is used. A style map may optionally
		be supplied for a partial style. If matchTint is false the tint percentage for
		spot and global process colors is not considered. If lookForIndirectUsage is
		true and the path style is a pattern then its definition is searched for a
		match. */
	AIAPI AIErr (*PathStyleUsesAIColor) ( AIPathStyle *pathStyle,
											AIPathStyleMap *psMap,
											AIColor *color,
											AIBoolean matchTint,
											AIBoolean lookForIndirectUsage,
											AIColorUsedHow *usage );

	/**	A routine which takes an AIColor and applies it to an AIPathStyle, doing what
		is generally wanted when people ask "why is it such a pain to simply set the
		color of an object?"  

		The path style map parameter is optional.

		If the newColor is a gradient or pattern, only the global object handle is
		relevant - the vector and transform fields are ignored. When the old pathStyle
		is already of the same kind, the existing vector and transform are used; if
		it is not, then default values are used. If newColor is a spot color, though,
		the tint is used. This is because this API is mainly intended for the use of
		the Swatches palette. Swatches contain tint info for spot colors, but they
		do not record gradient vector (even relative vector) or pattern transform data.

		If matchColor is non-null, then the onStroke parameter is ignored, and the
		newColor is applied to the fill and/or the stroke, whichever of them has the
		same color as matchColor. The matching is exact, including color space. This
		will never assign paint to an unpainted stroke or fill unless the matchColor
		is kNoneColor.

		If matchColor is null, then the newColor is applied to the stroke if onStroke
		is true, or to the fill if onStroke is false. (To apply to both, you must
		call this twice.)

		When it can't gather things from the pathStyle (which is assumed to be the "old"
		color of the object in question), it first looks at the current paint style and
		if that's not helpful, uses some reasonable (to me) defaults.  Search for the
		text "DEFAULT" below to find those if you want to muck with them. Defaults
		are only necessary when changing from one kind of color to another (e.g.,
		from a solid to a pattern or gradient) or when assigning color to a fill
		or stroke that was previously unpainted.

		The destination arthandle is used for the case where it needs to figure out the
		gradient vector based on the object's bounds. In the case where the object is
		part of a compound path, the bounds are calculated from the entire compound
		group.

		If whatChanged is non-null, returns in *whatChanged an AIColorUsedHow value
		indicating what part of the pathStyle (fill and/or stroke) was changed. (It is
		not necessary to do a SetPathStyle on the object if the old path style is the
		same as the new one.)
	*/
	AIAPI AIErr (*ApplyAIColorToPathStyle) ( AIPathStyle *pathStyle,
											AIPathStyleMap	*psMap,	// can be null
											AIColor			*newColor,
											AIColor			*matchColor,
											AIBoolean		onStroke,
											AIBoolean		useOldTint,
											AIArtHandle		destination,
											AIColorUsedHow	*whatChanged );

	/** Examine the art object, which can be any type, for usage of the targetColor,
		and return a vector of AIColorUsedHow values in *usage.

		If lookForIndirectUsage is true, it returns whether the art object would
		cause the color to be considered "in use" on the swatch palette. This
		includes usage inside patterns, gradients, and graph designs.

		If lookForIndirectUsage is false, the scan will not look inside of patterns,
		gradients, or graph designs. It will still look inside the graph style change
		records of graph objects.
	*/
	AIAPI AIErr (*ObjectUsesAIColor) ( AIArtHandle art,
										AIColor *targetColor,
										AIBoolean matchTint,
										AIBoolean lookForIndirectUsage,
										AIColorUsedHow *usage );

	/** For any direct usage of the oldColor in the art object, do a SetObjectAIColor to the
		newColor. "Direct" usage means the color of a stroke or fill, including inside graph
		path style change records. It does not cover colors used *inside* gradients, patterns,
		or graph designs that are attached to the object. (Indirect usages inside patterns
		and gradients are to be replaced by defining a new pattern or gradient, then calling
		ReplaceObjectAIColor with the oldColor and newColor being the pattern or gradient
		that was redefined. Indirect usage inside graph designs are similar, except that
		one doesn't call ReplaceObjectAIColor because a graph design isn't a color.)
		
		New for AI9:  if art is nil, replaces all usages in the current document

		If useOldTint is true, and both oldColor and newColor are custom colors, then
		the tint from the oldColor is used, otherwise the tint from the newColor is used.

		Sets *madeReplacement to true if it found oldColor and made a replacement, and
		to false if it didn't.

		The art object can any type except kPlacedArt, including those which are reported
		as kMysteryPathArt (paths inside text paths and graphs), and those which are
		reported as kUnknownArt, such as graphs and layer masks. (Since kPlacedArt is a
		reference to an external file, colors cannot be replaced inside of it.)
	*/
	AIAPI AIErr (*ReplaceObjectAIColor) ( AIArtHandle art,
											AIColor *oldColor, AIColor *newColor,
											AIBoolean useOldTint,
											AIBoolean *madeReplacement /* can be NULL */ );

	/** Get the default path style that tools should use when creating new objects other
		than text objects. */
	AIAPI AIErr (*GetInitialPathStyle) ( AIPathStyle *style );
	/** Set the default path style that tools should use when creating new objects other
		than text objects. */
	AIAPI AIErr (*SetInitialPathStyle) ( AIPathStyle *style );
	/** Get the default path style that tools should use when creating text objects. */
	AIAPI AIErr (*GetInitialTextStyle) ( AIPathStyle *style );
	/** Set the default path style that tools should use when creating text objects. */
	AIAPI AIErr (*SetInitialTextStyle) ( AIPathStyle *style );
	
	/** Take an AIColor structure and make sure that everything in it is appropriate for the
		current artwork, creating replacements if necessary.  For example, if you get a
		pattern from drag&drop, the pattern may not be in the current artwork.  (Usually it
		will be in the clipboard artwork).  This would replace it with an equivalent pattern
		that is in the current artwork. */
	AIAPI AIErr (*RetargetForCurrentDoc) ( AIColor *color) ;

	/** Like SetCurrentPathStyle, except that when a selected object has an active style,
		it will merge the input style values only with the paint attributes, and give
		the object that simple style. Both of the input pointers can be nil to replace
		all selected active styles with the simple style corresponding to their focal
		fill and/or stroke filters.
	*/
	AIAPI AIErr (*SetCurrentPathStyleForceSimple) ( AIPathStyle *style, AIPathStyleMap* stylemap );

	/** Like SetPathStyle, except that when a selected object has an active style,
		it will merge the input style values only with the paint attributes, and give
		the object that simple style. The input style can be nil to replace an active
		style with the simple style corresponding to its focal fill and/or stroke filters.
	*/
	AIAPI AIErr (*SetPathStyleForceSimple) ( AIArtHandle path, AIPathStyle *style );
	
	/** Interpolate the path style.  If percent is 0, styleOut is style0; if percent
		is 1, styleOut is style1. (Despite the misleading param name, percent is
		not a percentage but a value from 0 to 1.) See also the AIPathInterpolateSuite. */
	AIAPI AIErr (*InterpolatePathStyle) ( AIPathStyle *style0, AIPathStyle *style1,
		AIPathStyle *styleOut, AIReal percent);

	/** Interpolate just the AIColor. If color kinds are incompatible (e.g., two patterns),
		colorOut is always returned as color0. See also the AIPathInterpolateSuite. */ 
	AIAPI AIErr (*InterpolateAIColor) ( AIColor *color0, AIColor *color1, AIColor *colorOut,
										AIReal fraction );

	// New for AI12: 

	/** Sets the syncInitialPathStyle state

		When syncInitialPathStyle is TRUE, the initial path style is 
		synchronized with the current path style, and the UI in the swatches palette,
		color palette, and toolbox report the current path style. This synchronization
		happens when the selection changes and when GetCurrentPathStyle/SetCurrentPathStyle
		or GetInitialPathStyle/SetInitialPathStyle are called. syncInitialPathStyle is
		true the majority of the time.
		
		When syncInitialPathStyle is FALSE, the initial path style and the current path style
		become independant. In this mode GetCurrentPathStyle/SetCurrentPathStyle does not 
		affect the initial path style and GetInitialPathStyle/SetInitialPathStyle does not affect
		the current path style and the current selection. The UI in the swatches palette,
		color palette, and toolbox also report the initial path style rather than the current
		path style.

		Why this is useful:
		Sometimes a tool may want to maintain a "tool path style" that is not modified when
		the selection changes. This	allows the user to have a selection, choose
		a specific tool and color, and not have the color apply to the current
		selection. Such behavior is useful for the paintbucket tool, for example. To get
		this behavior the tool should set the syncState to true 
		and use GetInitialPathStyle/SetInitialPathStyle in place of
		GetCurrentPathStyle/SetCurrentPathStyle while the tool is selected. */
	AIAPI AIErr (*SetSyncInitialPathStyle) ( AIBoolean syncInitialPathStyle );
	/** Gets the syncInitialPathStyle state */
	AIAPI AIBoolean (*GetSyncInitialPathStyle)();

} AI120PathStyleSuite;


#include "AIHeaderEnd.h"

#endif


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ImageOptimization.h<|end_filename|>
#ifndef __AI140ImageOptimization__
#define __AI140ImageOptimization__

/*
 *	Name:	AI140ImageOptimization.h
 *	Purpose:	Adobe Illustrator Image Optimization Suite
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */

/********************************************************************************
 **
 **	Imports
 **
 **/

#ifndef __AITypes__
#include "AITypes.h"
#endif

#ifndef __AIDataFilter__
#include "AIDataFilter.h"
#endif

#ifndef __ASTypes__
#include "ASTypes.h"
#endif

#include "AIRasterize.h"

#include "AIHeaderBegin.h"

/** @file AIImageOptimization.h */

/********************************************************************************
 **
 **	Constants
 **
 **/

#define kAIImageOptSuiteVersion4		AIAPI_VERSION(4)
#define kAI140ImageOptSuiteVersion		kAIImageOptSuiteVersion4
#define kAI140ImageOptVersion			kAI140ImageOptSuiteVersion


/********************************************************************************
**
**	Types
**
**/

struct AI140ImageOptPNGParams {
	/** Version 1 parameters */
	AIImageOptPNGParams versionOneSuiteParams;
	/** When true, antialias text when rasterizing. */
	AIBool8 antialias;
	/** A cropping box for the art. If empty or degenerate, do not crop. */
	AIRealRect cropBox;
	/** When true, rasterize against a transparent background,
	applying no matte color. */
	AIBool8 backgroundIsTransparent;
	/** When background is not transparent, rasterize against this
	matte color. */
	AIRGBColor matteColor;

#ifdef __cplusplus
	/** Constructor for PNG parameters (version 2). */
	AI140ImageOptPNGParams()
		:
	versionOneSuiteParams(),
		antialias(false),	// no text antialiasing
		cropBox(),
		backgroundIsTransparent(true),	// no matte color applied
		matteColor()
	{
		cropBox.top = 0.0; cropBox.left = 0.0; cropBox.bottom = 0.0; cropBox.right = 0.0;
		matteColor.red = 0; matteColor.green = 0; matteColor.blue = 0;
	};
#endif
};

/********************************************************************************
 **
 **	Suite
 **
 **/

/** @ingroup Suites
	These functions allow you to rasterize an art object and
	stream the resulting raster to a data filter in various image formats.
	@see \c #AIDataFilterSuite.

	\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants
		\c #kAIImageOptSuite and \c #kAIImageOptVersion.
	*/
typedef struct {

	// AIImageOptSuiteVersion1 functions
	/** Rasterize art to GIF format.
			@param aiArt The art object or art tree root.
			@param aiDataFilter The data filter to which to send the resulting raster data.
			@param params How to perform the rasterization.
		*/
	AIAPI AIErr (*AsGIF)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptGIFParams& params);

	/**  Rasterize art to JPEG format.
			@param aiArt The art object or art tree root.
			@param aiDataFilter The data filter to which to send the resulting raster data.
			@param params How to perform the rasterization.
		*/
	AIAPI AIErr (*AsJPEG)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptJPEGParams& params);

	/**  Rasterize art to PNG24 format.
			@param aiArt The art object or art tree root.
			@param aiDataFilter The data filter to which to send the resulting raster data.
			@param params How to perform the rasterization.
		*/
	AIAPI AIErr (*AsPNG)(				// as PNG24
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptPNGParams& params);

	/**  Rasterize art to ZLIB format.
			@param aiArt The art object or art tree root.
			@param aiDataFilter The data filter to which to send the resulting raster data.
			@param params How to perform the rasterization.
		*/
	AIAPI AIErr (*AsZLIB)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptZLIBParams& params);

	// AIImageOptSuiteVersion2 functions

	/**  Rasterize art to PNG24 format. This differs from \c #AsPNG() in that it
		takes additional parameters and allows you to show a progress bar
		for a lengthy operation.
			@param aiArt The art object or art tree root.
			@param aiDataFilter The data filter to which to send the resulting raster data.
			@param params How to perform the rasterization.
			@param progressProc The procedure to call periodically during a lengthy operation,
				to provide the current progress status and allow the user to cancel.
		*/
	AIAPI AIErr (*MakePNG24)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AI140ImageOptPNGParams& params,
		AIRasterizeProgressProc progressProc);


	// AIImageOptSuiteVersion3 functions

	/** Creates a color palette for art.
			@param raster The art object.
			@param options The type of palette to create, automatic or custom.
			@param palette [out] A buffer in which to return the palette object.
		*/
	AIAPI AIErr (*CreatePalette) (AIArtHandle raster, const AIPaletteOptions *options, AIColorPaletteHandle *palette);

	/**	Frees the memory associated with a palette object when it is no longer
		needed.
			@param palette The palette object. Upon return, this reference is
				no longer valid.
		*/
	AIAPI AIErr (*DisposePalette) (AIColorPaletteHandle palette);

	/**	Retrieves a color from a color palette.
			@param palette The palette object.
			@param index The position index of the color.
			@param color [out] A buffer in which to return the color object.
		*/
	AIAPI AIErr (*GetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color);

	/**	Sets a color in a color palette.
			@param palette The palette object.
			@param index The position index of the color.
			@param color The color object.
		*/
	AIAPI AIErr (*SetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color);

	/** Creates an inverse color palette.
			@param palette The palette object.
			@param inverse [out] A buffer in which to return the inverse palette object.
			*/
	AIAPI AIErr (*CreateInversePalette) (AIColorPaletteHandle palette, AIInverseColorPaletteHandle *inverse);

	/**	Frees the memory associated with an inverse palette object when it is
		 no longer needed.
			@param inverse The inverse palette object. Upon return, this reference is
				no longer valid.
		*/
	AIAPI AIErr (*DisposeInversePalette) (AIInverseColorPaletteHandle inverse);

	/**	Retrieves the closest match to a color from an inverse color palette.
			@param palette The inverse palette object.
			@param color A pointer to the color object to match.
			@param index [out] A buffer in which to return the 0-based position
				index of the closest matching color.
		*/
	AIAPI AIErr (*GetPaletteIndex) (AIInverseColorPaletteHandle inverse, const AIPaletteColor *color, ai::int32 *index);

	/** Creates a color palette by posterizing the colors in a list.
			@param colorList The list of colors to be posterized, an array of color objects.
			@param colorListCount The number of color objects in the list.
			@param reduceColorCount The maximum number of colors the resulting palette should contain.
			@param palette [out] A buffer in which to return the palette object.
		*/
	AIAPI AIErr (*CreateReducedPalette) ( AIPaletteColor *colorList, int colorListCount, int reduceColorCount, AIColorPaletteHandle *palette  );
}
AI140ImageOptSuite;


#include "AIHeaderEnd.h"

#endif	// __AIImageOptimization__


<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Placed.h<|end_filename|>
#ifndef __AI90Placed__
#define __AI90Placed__

/*
 *        Name:	AI90Placed.h
 *   $Revision: 24 $
 *      Author:	 
 *        Date:	   
 *     Purpose:	Adobe Illustrator 9.0 Placed Object Suite.
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */


/*******************************************************************************
 **
 **	Imports
 **
 **/

#include "AI110Placed.h"

#include "AIHeaderBegin.h"

/*******************************************************************************
 **
 ** Constants
 **
 **/

#define kAI90PlacedSuite			"AI Placed Suite"
#define kAIPlacedSuiteVersion4	AIAPI_VERSION(4)
#define kAI90PlacedSuiteVersion	kAIPlacedSuiteVersion4
#define kAI90PlacedVersion		kAI90PlacedSuiteVersion

/*******************************************************************************
 **
 **	Suite
 **
 **/

typedef struct AI90PlacedSuite {

	AIAPI AIErr (*GetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix );
	AIAPI AIErr (*SetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix );
	AIAPI AIErr (*GetPlacedBoundingBox) ( AIArtHandle placed, AIRealRect *bbox );
	AIAPI AIErr (*SetPlacedObject) ( AIArtHandle placed, AIArtHandle *group );
	AIAPI AIErr (*CountPlacedCustomColors) ( AIArtHandle art, long *count );
	AIAPI AIErr (*GetNthPlacedCustomColorName) ( AIArtHandle art, long num, char *name, int maxlen );
	AIAPI AIErr (*MakePlacedObjectNative) ( AIArtHandle placed, AIArtHandle *native );
	AIAPI AIErr (*GetPlacedType) ( AIArtHandle placed, short *pPlacedType );
	AIAPI AIErr (*GetPlacedChild) ( AIArtHandle placed, AIArtHandle *group );
	AIAPI AIErr (*ExecPlaceRequest)( AI110PlaceRequestData *pPlaceRequestData );
	AIAPI AIErr (*GetPlacedFilePathFromArt)( AIArtHandle placed, char *pszPath, int iMaxLen );
	AIAPI AIErr (*ConcatPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *concat );

} AI90PlacedSuite;


#include "AIHeaderEnd.h"


#endif



<|start_filename|>BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ImageOptimization.h<|end_filename|>
#ifndef __AI120ImageOptimization__
#define __AI120ImageOptimization__

/*
 *	Name:	AI120ImageOptimization.h
 *	Purpose:	Adobe Illustrator 12.0 Image Optimization Suite
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 1986-2007 Adobe Systems Incorporated.
 * All rights reserved.
 *
 * NOTICE:  Adobe permits you to use, modify, and distribute this file 
 * in accordance with the terms of the Adobe license agreement 
 * accompanying it. If you have received this file from a source other 
 * than Adobe, then your use, modification, or distribution of it 
 * requires the prior written permission of Adobe.
 *
 */



/*******************************************************************************
**
**	Imports
**
**/
#include "AIImageOptimization.h"

#include "AIHeaderBegin.h"

/** @file AI120ImageOptimization.h */

/*******************************************************************************
**
**	Constants
**
**/
#define kAIImageOptSuiteVersion1 AIAPI_VERSION(1)
#define kAIImageOptSuiteVersion2 AIAPI_VERSION(2)
#define kAIImageOptSuiteVersion3 AIAPI_VERSION(3)

/*******************************************************************************
**
**	Suite
**
**/


// version 3
typedef struct {

	AIAPI AIErr (*AsGIF)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptGIFParams& params);

	AIAPI AIErr (*AsJPEG)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptJPEGParams& params);

	AIAPI AIErr (*AsPNG)(				
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptPNGParams& params);

	AIAPI AIErr (*AsZLIB)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AIImageOptZLIBParams& params);

	AIAPI AIErr (*MakePNG24)(
		AIArtHandle aiArt,
		AIDataFilter* aiDataFilter,
		AI140ImageOptPNGParams& params,
		AIRasterizeProgressProc progressProc);

	AIAPI AIErr (*CreatePalette) (AIArtHandle raster, const AIPaletteOptions *options, AIColorPaletteHandle *palette);
	AIAPI AIErr (*DisposePalette) (AIColorPaletteHandle palette);

	AIAPI AIErr (*GetPaletteColor) (AIColorPaletteHandle palette, long index, AIPaletteColor *color);
	AIAPI AIErr (*SetPaletteColor) (AIColorPaletteHandle palette, long index, AIPaletteColor *color);

	AIAPI AIErr (*CreateInversePalette) (AIColorPaletteHandle palette, AIInverseColorPaletteHandle *inverse);
	AIAPI AIErr (*DisposeInversePalette) (AIInverseColorPaletteHandle inverse);

	AIAPI AIErr (*GetPaletteIndex) (AIInverseColorPaletteHandle inverse, const AIPaletteColor *color, long *index);

}
AI120ImageOptSuite;


#include "AIHeaderEnd.h"

#endif	// __AI120ImageOptimization__
