#ifndef AEREGISTRY_H
#define AEREGISTRY_H



#ifndef CORESERVICES_H
#include <CoreServices/CoreServices.h>
#endif

#ifndef APPLEEVENTS_H
#include <AE/AppleEvents.h>
#endif


#include <HYS/AE/AERegistry.h>
#include <AvailabilityMacros.h>

#if PRAGMA_ONCE
#pragma once
#endif



/*kCaretPosition

enum {
   kCaretPosition = 1,
   kRawText = 2,
   kSelectedRawText = 3,
   kConvertedText = 4,
   kSelectedConvertedText = 5,
   kBlockFillText = 6,
   kOutlineText = 7,
   kSelectedText = 8
};
Version Notes

Starting in Mac OS X v10.4, use the constants defined in “kTSMHiliteCaretPosition” in place of these constants.*/

enum {
   kCaretPosition = 1,
   kRawText = 2,
   kSelectedRawText = 3,
   kConvertedText = 4,
   kSelectedConvertedText = 5,
   kBlockFillText = 6,
   kOutlineText = 7,
   kSelectedText = 8
};

/*kAEQDNotOr

enum {
   kAEQDNotOr = 'ntor',
   kAEQDNotXor = 'nxor',
   kAEQDOr = 'or  ',
   kAEQDSubOver = 'subo',
   kAEQDSubPin = 'subp',
   kAEQDSupplementalSuite = 'qdsp',
   kAEQDXor = 'xor ',
   kAEQuickdrawSuite = 'qdrw',
   kAEQuitAll = 'quia',
   kAERedo = 'redo',
   kAERegular = 'regl',
   kAEReplace = 'rplc',
   kAERequiredSuite = 'reqd',
   kAERestart = 'rest',
   kAERevealSelection = 'srev',
   kAERevert = 'rvrt',
   kAERightJustified = 'rght',
   kAESave = 'save',
   kAESelect = 'slct',
   kAESetData = 'setd'
};*/

enum {
   kAEQDNotOr = 'ntor',
   kAEQDNotXor = 'nxor',
   kAEQDOr = 'or  ',
   kAEQDSubOver = 'subo',
   kAEQDSubPin = 'subp',
   kAEQDSupplementalSuite = 'qdsp',
   kAEQDXor = 'xor ',
   kAEQuickdrawSuite = 'qdrw',
   kAEQuitAll = 'quia',
   kAERedo = 'redo',
   kAERegular = 'regl',
   kAEReplace = 'rplc',
   kAERequiredSuite = 'reqd',
   kAERestart = 'rest',
   kAERevealSelection = 'srev',
   kAERevert = 'rvrt',
   kAERightJustified = 'rght',
   kAESave = 'save',
   kAESelect = 'slct',
   kAESetData = 'setd'
};


/*typeFinderWindow

enum {
   typeFinderWindow = 'fwin',
   typeFixedPoint = 'fpnt',
   typeFixedRectangle = 'frct',
   typeGraphicLine = 'glin',
   typeGraphicText = 'cgtx',
   typeGroupedGraphic = 'cpic',
   typeInsertionLoc = 'insl',
   typeIntlText = 'itxt',
   typeIntlWritingCode = 'intl',
   typeLongDateTime = 'ldt ',
   typeISO8601DateTime = 'isot',
   typeLongFixed = 'lfxd',
   typeLongFixedPoint = 'lfpt',
   typeLongFixedRectangle = 'lfrc',
   typeLongPoint = 'lpnt',
   typeLongRectangle = 'lrct',
   typeMachineLoc = 'mLoc',
   typeOval = 'covl',
   typeParamInfo = 'pmin',
   typePict = 'PICT'
};
Constants
typeIntlText

For important information, see the Version Notes section of the typeUnicodeText enum.

Available in Mac OS X v10.0 and later.*/
enum {
   typeFinderWindow = 'fwin',
   typeFixedPoint = 'fpnt',
   typeFixedRectangle = 'frct',
   typeGraphicLine = 'glin',
   typeGraphicText = 'cgtx',
   typeGroupedGraphic = 'cpic',
   typeInsertionLoc = 'insl',
   typeIntlText = 'itxt',
   typeIntlWritingCode = 'intl',
   typeLongDateTime = 'ldt ',
   typeISO8601DateTime = 'isot',
   typeLongFixed = 'lfxd',
   typeLongFixedPoint = 'lfpt',
   typeLongFixedRectangle = 'lfrc',
   typeLongPoint = 'lpnt',
   typeLongRectangle = 'lrct',
   typeMachineLoc = 'mLoc',
   typeOval = 'covl',
   typeParamInfo = 'pmin',
   typePict = 'PICT'
};


/*TextRange

struct TextRange {
   long fStart;
   long fEnd;
   short fHiliteStyle;
};
typedef struct TextRange TextRange;
Availability
Available in Mac OS X v10.0 and later.*/

struct TextRange {
   long fStart;
   long fEnd;
   short fHiliteStyle;
};
typedef struct TextRange TextRange;



/*kTextServiceClass

enum {
   kTextServiceClass = 'tsvc',
   kUpdateActiveInputArea = 'updt',
   kShowHideInputWindow = 'shiw',
   kPos2Offset = 'p2st',
   kOffset2Pos = 'st2p',
   kUnicodeNotFromInputMethod = 'unim',
   kGetSelectedText = 'gtxt',
   keyAETSMDocumentRefcon = 'refc',
   keyAEServerInstance = 'srvi',
   keyAETheData = 'kdat',
   keyAEFixLength = 'fixl',
   keyAEUpdateRange = 'udng',
   keyAECurrentPoint = 'cpos',
   keyAEBufferSize = 'buff',
   keyAEMoveView = 'mvvw',
   keyAENextBody = 'nxbd',
   keyAETSMScriptTag = 'sclg',
   keyAETSMTextFont = 'ktxf',
   keyAETSMTextFMFont = 'ktxm',
   keyAETSMTextPointSize = 'ktps',
   keyAETSMEventRecord = 'tevt',
   keyAETSMEventRef = 'tevr',
   keyAETextServiceEncoding = 'tsen',
   keyAETextServiceMacEncoding = 'tmen',
   keyAETSMGlyphInfoArray = 'tgia',
   typeTextRange = 'txrn',
   typeComponentInstance = 'cmpi',
   typeOffsetArray = 'ofay',
   typeTextRangeArray = 'tray',
   typeLowLevelEventRecord = 'evtr',
   typeGlyphInfoArray = 'glia',
   typeEventRef = 'evrf',
   typeText = 'TEXT'
};*/

enum {
   kTextServiceClass = 'tsvc',
   kUpdateActiveInputArea = 'updt',
   kShowHideInputWindow = 'shiw',
   kPos2Offset = 'p2st',
   kOffset2Pos = 'st2p',
   kUnicodeNotFromInputMethod = 'unim',
   kGetSelectedText = 'gtxt',
   keyAETSMDocumentRefcon = 'refc',
   keyAEServerInstance = 'srvi',
   keyAETheData = 'kdat',
   keyAEFixLength = 'fixl',
   keyAEUpdateRange = 'udng',
   keyAECurrentPoint = 'cpos',
   keyAEBufferSize = 'buff',
   keyAEMoveView = 'mvvw',
   keyAENextBody = 'nxbd',
   keyAETSMScriptTag = 'sclg',
   keyAETSMTextFont = 'ktxf',
   keyAETSMTextFMFont = 'ktxm',
   keyAETSMTextPointSize = 'ktps',
   keyAETSMEventRecord = 'tevt',
   keyAETSMEventRef = 'tevr',
   keyAETextServiceEncoding = 'tsen',
   keyAETextServiceMacEncoding = 'tmen',
   keyAETSMGlyphInfoArray = 'tgia',
   typeTextRange = 'txrn',
   typeComponentInstance = 'cmpi',
   typeOffsetArray = 'ofay',
   typeTextRangeArray = 'tray',
   typeLowLevelEventRecord = 'evtr',
   typeGlyphInfoArray = 'glia',
   typeEventRef = 'evrf',
   typeText = 'TEXT'
};



/*typePixelMap

enum {
   typePixelMap = 'cpix',
   typePixMapMinus = 'tpmm',
   typePolygon = 'cpgn',
   typePropInfo = 'pinf',
   typePtr = 'ptr ',
   typeQDPoint = 'QDpt',
   typeQDRegion = 'Qrgn',
   typeRectangle = 'crec',
   typeRGB16 = 'tr16',
   typeRGB96 = 'tr96',
   typeRGBColor = 'cRGB',
   typeRotation = 'trot',
   typeRoundedRectangle = 'crrc',
   typeRow = 'crow',
   typeScrapStyles = 'styl',
   typeScript = 'scpt',
   typeStyledText = 'STXT',
   typeSuiteInfo = 'suin',
   typeTable = 'ctbl',
   typeTextStyles = 'tsty'
};
Constants
typeStyledText

Text that includes style information.

Styled text is stored as a record, in which the styles have the key 'ksty' and the plain text is has the key 'ktxt'. You can use this information to extract plain text from styled text without coercion.

However, getting rid of the style information, with or without coercion, may corrupt the text, since the styles imply what encoding to use. In fact, use of typeText and typeStyledText are not recommended, starting with Mac OS X, because they are not safe with international characters—you should use one of the Unicode text types instead.

For important information, see the Version Notes section of the typeUnicodeText enum.

Available in Mac OS X v10.0 and later.*/
enum {
   typePixelMap = 'cpix',
   typePixMapMinus = 'tpmm',
   typePolygon = 'cpgn',
   typePropInfo = 'pinf',
   typePtr = 'ptr ',
   typeQDPoint = 'QDpt',
   typeQDRegion = 'Qrgn',
   typeRectangle = 'crec',
   typeRGB16 = 'tr16',
   typeRGB96 = 'tr96',
   typeRGBColor = 'cRGB',
   typeRotation = 'trot',
   typeRoundedRectangle = 'crrc',
   typeRow = 'crow',
   typeScrapStyles = 'styl',
   typeScript = 'scpt',
   typeStyledText = 'STXT',
   typeSuiteInfo = 'suin',
   typeTable = 'ctbl',
   typeTextStyles = 'tsty'
};


/*typeAEText

enum {
   typeAEText = 'tTXT',
   typeArc = 'carc',
   typeBest = 'best',
   typeCell = 'ccel',
   typeClassInfo = 'gcli',
   typeColorTable = 'clrt',
   typeColumn = 'ccol',
   typeDashStyle = 'tdas',
   typeData = 'tdta',
   typeDrawingArea = 'cdrw',
   typeElemInfo = 'elin',
   typeEnumeration = 'enum',
   typeEPS = 'EPS ',
   typeEventInfo = 'evin'
};*/
enum {
   typeAEText = 'tTXT',
   typeArc = 'carc',
   typeBest = 'best',
   typeCell = 'ccel',
   typeClassInfo = 'gcli',
   typeColorTable = 'clrt',
   typeColumn = 'ccol',
   typeDashStyle = 'tdas',
   typeData = 'tdta',
   typeDrawingArea = 'cdrw',
   typeElemInfo = 'elin',
   typeEnumeration = 'enum',
   typeEPS = 'EPS ',
   typeEventInfo = 'evin'
};


/*cInsertionLoc

enum {
   cInsertionLoc = 'insl',
   cInsertionPoint = 'cins',
   cIntlText = 'itxt',
   cIntlWritingCode = 'intl',
   cItem = 'citm',
   cLine = 'clin',
   cLongDateTime = 'ldt ',
   cLongFixed = 'lfxd',
   cLongFixedPoint = 'lfpt',
   cLongFixedRectangle = 'lfrc',
   cLongInteger = 'long',
   cLongPoint = 'lpnt',
   cLongRectangle = 'lrct',
   cMachineLoc = 'mLoc',
   cMenu = 'cmnu',
   cMenuItem = 'cmen',
   cObject = 'cobj',
   cObjectSpecifier = 'obj ',
   cOpenableObject = 'coob',
   cOval = 'covl'
};*/
enum {
   cInsertionLoc = 'insl',
   cInsertionPoint = 'cins',
   cIntlText = 'itxt',
   cIntlWritingCode = 'intl',
   cItem = 'citm',
   cLine = 'clin',
   cLongDateTime = 'ldt ',
   cLongFixed = 'lfxd',
   cLongFixedPoint = 'lfpt',
   cLongFixedRectangle = 'lfrc',
   cLongInteger = 'long',
   cLongPoint = 'lpnt',
   cLongRectangle = 'lrct',
   cMachineLoc = 'mLoc',
   cMenu = 'cmnu',
   cMenuItem = 'cmen',
   cObject = 'cobj',
   cObjectSpecifier = 'obj ',
   cOpenableObject = 'coob',
   cOval = 'covl'
};


/*keyAEPropData

enum {
   keyAEPropData = 'prdt',
   keyAEProperties = 'qpro',
   keyAEProperty = 'kprp',
   keyAEPropFlags = 'prfg',
   keyAEPropID = 'prop',
   keyAEProtection = 'ppro',
   keyAERenderAs = 'kren',
   keyAERequestedType = 'rtyp',
   keyAEResult = '----',
   keyAEResultInfo = 'rsin',
   keyAERotation = 'prot',
   keyAERotPoint = 'krtp',
   keyAERowList = 'krls',
   keyAESaveOptions = 'savo',
   keyAEScale = 'pscl',
   keyAEScriptTag = 'psct',
   keyAESearchText = 'stxt',
   keyAEShowWhere = 'show',
   keyAEStartAngle = 'pang',
   keyAEStartPoint = 'pstp',
   keyAEStyles = 'ksty'
};
Constants
keyAESearchText

Identifies an optional parameter to the open documents Apple event, described in “Event ID Constants”. The parameter contains the search text from the Spotlight search that identified the documents to be opened. The application should make a reasonable effort to display an occurrence of the search text in each opened document—for example by scrolling the text into view.

For more information, see “Handling Apple Events Sent by the Mac OS” in “Responding to Apple Events” in Apple Events Programming Guide.

Available in Mac OS X v10.4 and later.
Version Notes

The constant keyAESearchText is available starting in Mac OS X v10.4.*/
enum {
   keyAEPropData = 'prdt',
   keyAEProperties = 'qpro',
   keyAEProperty = 'kprp',
   keyAEPropFlags = 'prfg',
   keyAEPropID = 'prop',
   keyAEProtection = 'ppro',
   keyAERenderAs = 'kren',
   keyAERequestedType = 'rtyp',
   keyAEResult = '----',
   keyAEResultInfo = 'rsin',
   keyAERotation = 'prot',
   keyAERotPoint = 'krtp',
   keyAERowList = 'krls',
   keyAESaveOptions = 'savo',
   keyAEScale = 'pscl',
   keyAEScriptTag = 'psct',
   keyAESearchText = 'stxt',
   keyAEShowWhere = 'show',
   keyAEStartAngle = 'pang',
   keyAEStartPoint = 'pstp',
   keyAEStyles = 'ksty'
};

/*keyAEKeyword

enum {
   keyAEKeyword = 'kywd',
   keyAELevel = 'levl',
   keyAELineArrow = 'arro',
   keyAEName = 'pnam',
   keyAENewElementLoc = 'pnel',
   keyAEObject = 'kobj',
   keyAEObjectClass = 'kocl',
   keyAEOffStyles = 'ofst',
   keyAEOnStyles = 'onst',
   keyAEParameters = 'prms',
   keyAEParamFlags = 'pmfg',
   keyAEPenColor = 'ppcl',
   keyAEPenPattern = 'pppa',
   keyAEPenWidth = 'ppwd',
   keyAEPixelDepth = 'pdpt',
   keyAEPixMapMinus = 'kpmm',
   keyAEPMTable = 'kpmt',
   keyAEPointList = 'ptlt',
   keyAEPointSize = 'ptsz',
   keyAEPosition = 'kpos'
};*/
enum {
   keyAEKeyword = 'kywd',
   keyAELevel = 'levl',
   keyAELineArrow = 'arro',
   keyAEName = 'pnam',
   keyAENewElementLoc = 'pnel',
   keyAEObject = 'kobj',
   keyAEObjectClass = 'kocl',
   keyAEOffStyles = 'ofst',
   keyAEOnStyles = 'onst',
   keyAEParameters = 'prms',
   keyAEParamFlags = 'pmfg',
   keyAEPenColor = 'ppcl',
   keyAEPenPattern = 'pppa',
   keyAEPenWidth = 'ppwd',
   keyAEPixelDepth = 'pdpt',
   keyAEPixMapMinus = 'kpmm',
   keyAEPMTable = 'kpmt',
   keyAEPointList = 'ptlt',
   keyAEPointSize = 'ptsz',
   keyAEPosition = 'kpos'
};

/*kAEDoObjectsExist

enum {
   kAEDoObjectsExist = 'doex',
   kAEDoScript = 'dosc',
   kAEDrag = 'drag',
   kAEDuplicateSelection = 'sdup',
   kAEEditGraphic = 'edit',
   kAEEmptyTrash = 'empt',
   kAEEnd = 'end ',
   kAEEndsWith = 'ends',
   kAEEndTransaction = 'endt',
   kAEEquals = '=   ',
   kAEExpanded = 'pexp',
   kAEFast = 'fast',
   kAEFinderEvents = 'FNDR',
   kAEFormulaProtect = 'fpro',
   kAEFullyJustified = 'full',
   kAEGetClassInfo = 'qobj',
   kAEGetData = 'getd',
   kAEGetDataSize = 'dsiz',
   kAEGetEventInfo = 'gtei',
   kAEGetInfoSelection = 'sinf'
};
Constants
kAEEndsWith

The value of operand1 ends with the value of operand2 (for example, the string "operand" ends with the string "and").

Available in Mac OS X v10.0 and later.
kAEEquals

The value of operand1 is equal to the value of operand2

Available in Mac OS X v10.0 and later.
kAEFinderEvents

An event that the Finder accepts.

Available in Mac OS X v10.0 and later.*/
enum {
   kAEDoObjectsExist = 'doex',
   kAEDoScript = 'dosc',
   kAEDrag = 'drag',
   kAEDuplicateSelection = 'sdup',
   kAEEditGraphic = 'edit',
   kAEEmptyTrash = 'empt',
   kAEEnd = 'end ',
   kAEEndsWith = 'ends',
   kAEEndTransaction = 'endt',
   kAEEquals = '=   ',
   kAEExpanded = 'pexp',
   kAEFast = 'fast',
   kAEFinderEvents = 'FNDR',
   kAEFormulaProtect = 'fpro',
   kAEFullyJustified = 'full',
   kAEGetClassInfo = 'qobj',
   kAEGetData = 'getd',
   kAEGetDataSize = 'dsiz',
   kAEGetEventInfo = 'gtei',
   kAEGetInfoSelection = 'sinf'
};

/*Comparison Operator Constants

Specify a comparison operation to perform on two operands.

enum {
   kAEAsk = 'ask ',
   kAEBefore = 'befo',
   kAEBeginning = 'bgng',
   kAEBeginsWith = 'bgwt',
   kAEBeginTransaction = 'begi',
   kAEBold = 'bold',
   kAECaseSensEquals = 'cseq',
   kAECentered = 'cent',
   kAEChangeView = 'view',
   kAEClone = 'clon',
   kAEClose = 'clos',
   kAECondensed = 'cond',
   kAEContains = 'cont',
   kAECopy = 'copy',
   kAECoreSuite = 'core',
   kAECountElements = 'cnte',
   kAECreateElement = 'crel',
   kAECreatePublisher = 'cpub',
   kAECut = 'cut ',
   kAEDelete = 'delo'
};
Constants
kAEBeginsWith

The value of operand1 begins with the value of operand2 (for example, the string "operand" begins with the string "opera").

Available in Mac OS X v10.0 and later.
kAEContains

The value of operand1 contains the value of operand2 (for example, the string "operand" contains the string "era").

Available in Mac OS X v10.0 and later.
kAECoreSuite

An Apple event in the Standard Suite.

Available in Mac OS X v10.0 and later.
Discussion

When you call the CreateCompDescriptor function, you pass one of these comparison operators in the comparisonOperator parameter. The CreateCompDescriptor function creates a comparison descriptor that specifies how to compare one or more Apple event objects with either another Apple event object or a descriptor.

The actual comparison of the two operands is performed by the object comparison function provided by the client application—see OSLCompareProcPtr. The way a comparison operator is interpreted is up to each application.

For related information, see “Constants for Object Specifiers, Positions, and Logical and Comparison Operations”.*/
enum {
   kAEAsk = 'ask ',
   kAEBefore = 'befo',
   kAEBeginning = 'bgng',
   kAEBeginsWith = 'bgwt',
   kAEBeginTransaction = 'begi',
   kAEBold = 'bold',
   kAECaseSensEquals = 'cseq',
   kAECentered = 'cent',
   kAEChangeView = 'view',
   kAEClone = 'clon',
   kAEClose = 'clos',
   kAECondensed = 'cond',
   kAEContains = 'cont',
   kAECopy = 'copy',
   kAECoreSuite = 'core',
   kAECountElements = 'cnte',
   kAECreateElement = 'crel',
   kAECreatePublisher = 'cpub',
   kAECut = 'cut ',
   kAEDelete = 'delo'
};


/*kASErrorEventCode

enum {
   kASErrorEventCode = 'err ',
   kOSAErrorArgs = 'erra',
   keyAEErrorObject = 'erob',
   pLength = 'leng',
   pReverse = 'rvse',
   pRest = 'rest',
   pInherits = 'c@#^',
   pProperties = 'pALL',
   keyASUserRecordFields = 'usrf',
   typeUserRecordFields = typeAEList
};*/
enum {
   kASErrorEventCode = 'err ',
   kOSAErrorArgs = 'erra',
   keyAEErrorObject = 'erob',
   pLength = 'leng',
   pReverse = 'rvse',
   pRest = 'rest',
   pInherits = 'c@#^',
   pProperties = 'pALL',
   keyASUserRecordFields = 'usrf',
   typeUserRecordFields = typeAEList
};
/*keyAEDoScale

enum {
   keyAEDoScale = 'ksca',
   keyAEDoTranslate = 'ktra',
   keyAEEditionFileLoc = 'eloc',
   keyAEElements = 'elms',
   keyAEEndPoint = 'pend',
   keyAEEventClass = 'evcl',
   keyAEEventID = 'evti',
   keyAEFile = 'kfil',
   keyAEFileType = 'fltp',
   keyAEFillColor = 'flcl',
   keyAEFillPattern = 'flpt',
   keyAEFlipHorizontal = 'kfho',
   keyAEFlipVertical = 'kfvt',
   keyAEFont = 'font',
   keyAEFormula = 'pfor',
   keyAEGraphicObjects = 'gobs',
   keyAEID = 'ID  ',
   keyAEImageQuality = 'gqua',
   keyAEInsertHere = 'insh',
   keyAEKeyForms = 'keyf'
};
AERegistry.h*/

enum {
   keyAEDoScale = 'ksca',
   keyAEDoTranslate = 'ktra',
   keyAEEditionFileLoc = 'eloc',
   keyAEElements = 'elms',
   keyAEEndPoint = 'pend',
   keyAEEventClass = 'evcl',
   keyAEEventID = 'evti',
   keyAEFile = 'kfil',
   keyAEFileType = 'fltp',
   keyAEFillColor = 'flcl',
   keyAEFillPattern = 'flpt',
   keyAEFlipHorizontal = 'kfho',
   keyAEFlipVertical = 'kfvt',
   keyAEFont = 'font',
   keyAEFormula = 'pfor',
   keyAEGraphicObjects = 'gobs',
   keyAEID = 'ID  ',
   keyAEImageQuality = 'gqua',
   keyAEInsertHere = 'insh',
   keyAEKeyForms = 'keyf'
};

/*TextRangeArray

struct TextRangeArray {
   short fNumOfRanges;
   TextRange fRange[1];
};
typedef struct TextRangeArray TextRangeArray;
Availability
Available in Mac OS X v10.0 and later.*/
struct TextRangeArray {
   short fNumOfRanges;
   TextRange fRange[1];
};
typedef struct TextRangeArray TextRangeArray;


#ifdef __cplusplus
}
#endif

#endif