ASRegistry.pas 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. {
  2. File: ASRegistry.p
  3. Contains: AppleScript Registry constants.
  4. Version: Technology: AppleScript 1.3
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1991-2002 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit ASRegistry;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,AERegistry,AEObjects;
  92. {$ALIGN MAC68K}
  93. const
  94. keyAETarget = $74617267 (* 'targ' *);
  95. keySubjectAttr = $7375626A (* 'subj' *); { Magic 'returning' parameter: }
  96. keyASReturning = $4B72746E (* 'Krtn' *); { AppleScript Specific Codes: }
  97. kASAppleScriptSuite = $61736372 (* 'ascr' *);
  98. kASScriptEditorSuite = $546F7953 (* 'ToyS' *);
  99. kASTypeNamesSuite = $74706E6D (* 'tpnm' *); { dynamic terminologies }
  100. typeAETE = $61657465 (* 'aete' *);
  101. typeAEUT = $61657574 (* 'aeut' *);
  102. kGetAETE = $67647465 (* 'gdte' *);
  103. kGetAEUT = $67647574 (* 'gdut' *);
  104. kUpdateAEUT = $75647574 (* 'udut' *);
  105. kUpdateAETE = $75647465 (* 'udte' *);
  106. kCleanUpAEUT = $63647574 (* 'cdut' *);
  107. kASComment = $636D6E74 (* 'cmnt' *);
  108. kASLaunchEvent = $6E6F6F70 (* 'noop' *);
  109. keyScszResource = $7363737A (* 'scsz' *);
  110. typeScszResource = $7363737A (* 'scsz' *); { subroutine calls }
  111. kASSubroutineEvent = $70736272 (* 'psbr' *);
  112. keyASSubroutineName = $736E616D (* 'snam' *);
  113. kASPrepositionalSubroutine = $70736272 (* 'psbr' *);
  114. keyASPositionalArgs = $70617267 (* 'parg' *);
  115. { Add this parameter to a Get Data result if your app handled the 'as' parameter }
  116. keyAppHandledCoercion = $69646173 (* 'idas' *);
  117. { Miscellaneous AppleScript commands }
  118. kASStartLogEvent = $6C6F6731 (* 'log1' *);
  119. kASStopLogEvent = $6C6F6730 (* 'log0' *);
  120. kASCommentEvent = $636D6E74 (* 'cmnt' *);
  121. { Operator Events: }
  122. { Binary: }
  123. kASAdd = $2B202020 (* '+ ' *);
  124. kASSubtract = $2D202020 (* '- ' *);
  125. kASMultiply = $2A202020 (* '* ' *);
  126. kASDivide = $2F202020 (* '/ ' *);
  127. kASQuotient = $64697620 (* 'div ' *);
  128. kASRemainder = $6D6F6420 (* 'mod ' *);
  129. kASPower = $5E202020 (* '^ ' *);
  130. kASEqual = $3D202020 (* '= ' *);
  131. kASNotEqual = $E289A020 (* '­ ' *);
  132. kASGreaterThan = $3E202020 (* '> ' *);
  133. kASGreaterThanOrEqual = $3E3D2020 (* '>= ' *);
  134. kASLessThan = $3C202020 (* '< ' *);
  135. kASLessThanOrEqual = $3C3D2020 (* '<= ' *);
  136. kASComesBefore = $63626672 (* 'cbfr' *);
  137. kASComesAfter = $63616672 (* 'cafr' *);
  138. kASConcatenate = $63636174 (* 'ccat' *);
  139. kASStartsWith = $62677774 (* 'bgwt' *);
  140. kASEndsWith = $656E6473 (* 'ends' *);
  141. kASContains = $636F6E74 (* 'cont' *);
  142. kASAnd = $414E4420 (* 'AND ' *);
  143. kASOr = $4F522020 (* 'OR ' *); { Unary: }
  144. kASNot = $4E4F5420 (* 'NOT ' *);
  145. kASNegate = $6E656720 (* 'neg ' *);
  146. keyASArg = $61726720 (* 'arg ' *);
  147. { event code for the 'error' statement }
  148. kASErrorEventCode = $65727220 (* 'err ' *);
  149. kOSAErrorArgs = $65727261 (* 'erra' *);
  150. keyAEErrorObject = $65726F62 (* 'erob' *); { Properties: }
  151. pLength = $6C656E67 (* 'leng' *);
  152. pReverse = $72767365 (* 'rvse' *);
  153. pRest = $72657374 (* 'rest' *);
  154. pInherits = $6340235E (* 'c@#^' *);
  155. pProperties = $70414C4C (* 'pALL' *); { User-Defined Record Fields: }
  156. keyASUserRecordFields = $75737266 (* 'usrf' *);
  157. typeUserRecordFields = $6C697374 (* 'list' *);
  158. { Prepositions: }
  159. keyASPrepositionAt = $61742020 (* 'at ' *);
  160. keyASPrepositionIn = $696E2020 (* 'in ' *);
  161. keyASPrepositionFrom = $66726F6D (* 'from' *);
  162. keyASPrepositionFor = $666F7220 (* 'for ' *);
  163. keyASPrepositionTo = $746F2020 (* 'to ' *);
  164. keyASPrepositionThru = $74687275 (* 'thru' *);
  165. keyASPrepositionThrough = $74686768 (* 'thgh' *);
  166. keyASPrepositionBy = $62792020 (* 'by ' *);
  167. keyASPrepositionOn = $6F6E2020 (* 'on ' *);
  168. keyASPrepositionInto = $696E746F (* 'into' *);
  169. keyASPrepositionOnto = $6F6E746F (* 'onto' *);
  170. keyASPrepositionBetween = $6274776E (* 'btwn' *);
  171. keyASPrepositionAgainst = $61677374 (* 'agst' *);
  172. keyASPrepositionOutOf = $6F75746F (* 'outo' *);
  173. keyASPrepositionInsteadOf = $6973746F (* 'isto' *);
  174. keyASPrepositionAsideFrom = $61736466 (* 'asdf' *);
  175. keyASPrepositionAround = $61726E64 (* 'arnd' *);
  176. keyASPrepositionBeside = $62736964 (* 'bsid' *);
  177. keyASPrepositionBeneath = $626E7468 (* 'bnth' *);
  178. keyASPrepositionUnder = $756E6472 (* 'undr' *);
  179. keyASPrepositionOver = $6F766572 (* 'over' *);
  180. keyASPrepositionAbove = $61627665 (* 'abve' *);
  181. keyASPrepositionBelow = $62656C77 (* 'belw' *);
  182. keyASPrepositionApartFrom = $61707274 (* 'aprt' *);
  183. keyASPrepositionGiven = $6769766E (* 'givn' *);
  184. keyASPrepositionWith = $77697468 (* 'with' *);
  185. keyASPrepositionWithout = $776F7574 (* 'wout' *);
  186. keyASPrepositionAbout = $61626F75 (* 'abou' *);
  187. keyASPrepositionSince = $736E6365 (* 'snce' *);
  188. keyASPrepositionUntil = $74696C6C (* 'till' *);
  189. { Terminology & Dialect things: }
  190. kDialectBundleResType = $4462646C (* 'Dbdl' *); { AppleScript Classes and Enums: }
  191. cConstant = $656E756D (* 'enum' *);
  192. cClassIdentifier = $70636C73 (* 'pcls' *);
  193. cObjectBeingExamined = $65786D6E (* 'exmn' *);
  194. cList = $6C697374 (* 'list' *);
  195. cSmallReal = $73696E67 (* 'sing' *);
  196. cReal = $646F7562 (* 'doub' *);
  197. cRecord = $7265636F (* 'reco' *);
  198. cReference = $6F626A20 (* 'obj ' *);
  199. cUndefined = $756E6466 (* 'undf' *);
  200. cMissingValue = $6D736E67 (* 'msng' *);
  201. cSymbol = $73796D62 (* 'symb' *);
  202. cLinkedList = $6C6C7374 (* 'llst' *);
  203. cVector = $76656374 (* 'vect' *);
  204. cEventIdentifier = $65766E74 (* 'evnt' *);
  205. cKeyIdentifier = $6B796964 (* 'kyid' *);
  206. cUserIdentifier = $75696420 (* 'uid ' *);
  207. cPreposition = $70726570 (* 'prep' *);
  208. cKeyForm = $6B66726D (* 'kfrm' *);
  209. cScript = $73637074 (* 'scpt' *);
  210. cHandler = $68616E64 (* 'hand' *);
  211. cProcedure = $70726F63 (* 'proc' *);
  212. cHandleBreakpoint = $6272616B (* 'brak' *);
  213. cClosure = $636C7372 (* 'clsr' *);
  214. cRawData = $72646174 (* 'rdat' *);
  215. cStringClass = $54455854 (* 'TEXT' *);
  216. cNumber = $6E6D6272 (* 'nmbr' *);
  217. cListElement = $63656C6D (* 'celm' *);
  218. cListOrRecord = $6C722020 (* 'lr ' *);
  219. cListOrString = $6C732020 (* 'ls ' *);
  220. cListRecordOrString = $6C727320 (* 'lrs ' *);
  221. cNumberOrString = $6E732020 (* 'ns ' *);
  222. cNumberOrDateTime = $6E642020 (* 'nd ' *);
  223. cNumberDateTimeOrString = $6E647320 (* 'nds ' *);
  224. cAliasOrString = $73662020 (* 'sf ' *);
  225. cSeconds = $73636E64 (* 'scnd' *);
  226. typeSound = $736E6420 (* 'snd ' *);
  227. enumBooleanValues = $626F6F76 (* 'boov' *); { Use this instead of typeBoolean to avoid with/without conversion }
  228. kAETrue = $74727565 (* 'true' *);
  229. kAEFalse = $66616C73 (* 'fals' *);
  230. enumMiscValues = $6D697363 (* 'misc' *);
  231. kASCurrentApplication = $63757261 (* 'cura' *); { User-defined property ospecs: }
  232. formUserPropertyID = $75737270 (* 'usrp' *);
  233. // cString = $54455854 (* 'TEXT' *); { old name for cStringClass - can't be used in .r files }
  234. { Global properties: }
  235. pASIt = $69742020 (* 'it ' *);
  236. pASMe = $6D652020 (* 'me ' *);
  237. pASResult = $72736C74 (* 'rslt' *);
  238. pASSpace = $73706163 (* 'spac' *);
  239. pASReturn = $72657420 (* 'ret ' *);
  240. pASTab = $74616220 (* 'tab ' *);
  241. pASPi = $70692020 (* 'pi ' *);
  242. pASParent = $70617265 (* 'pare' *);
  243. kASInitializeEventCode = $696E6974 (* 'init' *);
  244. pASPrintLength = $70726C6E (* 'prln' *);
  245. pASPrintDepth = $70726470 (* 'prdp' *);
  246. pASTopLevelScript = $61736372 (* 'ascr' *);
  247. { Considerations }
  248. kAECase = $63617365 (* 'case' *);
  249. kAEDiacritic = $64696163 (* 'diac' *);
  250. kAEWhiteSpace = $77686974 (* 'whit' *);
  251. kAEHyphens = $68797068 (* 'hyph' *);
  252. kAEExpansion = $65787061 (* 'expa' *);
  253. kAEPunctuation = $70756E63 (* 'punc' *);
  254. kAEZenkakuHankaku = $7A6B686B (* 'zkhk' *);
  255. kAESmallKana = $736B6E61 (* 'skna' *);
  256. kAEKataHiragana = $68696B61 (* 'hika' *);
  257. kASConsiderReplies = $726D7465 (* 'rmte' *);
  258. enumConsiderations = $636F6E73 (* 'cons' *);
  259. { Considerations bit masks }
  260. kAECaseConsiderMask = $00000001;
  261. kAEDiacriticConsiderMask = $00000002;
  262. kAEWhiteSpaceConsiderMask = $00000004;
  263. kAEHyphensConsiderMask = $00000008;
  264. kAEExpansionConsiderMask = $00000010;
  265. kAEPunctuationConsiderMask = $00000020;
  266. kASConsiderRepliesConsiderMask = $00000040;
  267. kAECaseIgnoreMask = $00010000;
  268. kAEDiacriticIgnoreMask = $00020000;
  269. kAEWhiteSpaceIgnoreMask = $00040000;
  270. kAEHyphensIgnoreMask = $00080000;
  271. kAEExpansionIgnoreMask = $00100000;
  272. kAEPunctuationIgnoreMask = $00200000;
  273. kASConsiderRepliesIgnoreMask = $00400000;
  274. enumConsidsAndIgnores = $63736967 (* 'csig' *);
  275. cCoercion = $636F6563 (* 'coec' *);
  276. cCoerceUpperCase = $74787570 (* 'txup' *);
  277. cCoerceLowerCase = $74786C6F (* 'txlo' *);
  278. cCoerceRemoveDiacriticals = $74786463 (* 'txdc' *);
  279. cCoerceRemovePunctuation = $74787063 (* 'txpc' *);
  280. cCoerceRemoveHyphens = $74786879 (* 'txhy' *);
  281. cCoerceOneByteToTwoByte = $74786578 (* 'txex' *);
  282. cCoerceRemoveWhiteSpace = $74787773 (* 'txws' *);
  283. cCoerceSmallKana = $7478736B (* 'txsk' *);
  284. cCoerceZenkakuhankaku = $74787A65 (* 'txze' *);
  285. cCoerceKataHiragana = $74786B68 (* 'txkh' *); { Lorax things: }
  286. cZone = $7A6F6E65 (* 'zone' *);
  287. cMachine = $6D616368 (* 'mach' *);
  288. cAddress = $61646472 (* 'addr' *);
  289. cRunningAddress = $72616464 (* 'radd' *);
  290. cStorage = $73746F72 (* 'stor' *);
  291. { DateTime things: }
  292. pASWeekday = $776B6479 (* 'wkdy' *);
  293. pASMonth = $6D6E7468 (* 'mnth' *);
  294. pASDay = $64617920 (* 'day ' *);
  295. pASYear = $79656172 (* 'year' *);
  296. pASTime = $74696D65 (* 'time' *);
  297. pASDateString = $64737472 (* 'dstr' *);
  298. pASTimeString = $74737472 (* 'tstr' *); { Months }
  299. cMonth = $6D6E7468 (* 'mnth' *);
  300. cJanuary = $6A616E20 (* 'jan ' *);
  301. cFebruary = $66656220 (* 'feb ' *);
  302. cMarch = $6D617220 (* 'mar ' *);
  303. cApril = $61707220 (* 'apr ' *);
  304. cMay = $6D617920 (* 'may ' *);
  305. cJune = $6A756E20 (* 'jun ' *);
  306. cJuly = $6A756C20 (* 'jul ' *);
  307. cAugust = $61756720 (* 'aug ' *);
  308. cSeptember = $73657020 (* 'sep ' *);
  309. cOctober = $6F637420 (* 'oct ' *);
  310. cNovember = $6E6F7620 (* 'nov ' *);
  311. cDecember = $64656320 (* 'dec ' *);
  312. { Weekdays }
  313. cWeekday = $776B6479 (* 'wkdy' *);
  314. cSunday = $73756E20 (* 'sun ' *);
  315. cMonday = $6D6F6E20 (* 'mon ' *);
  316. cTuesday = $74756520 (* 'tue ' *);
  317. cWednesday = $77656420 (* 'wed ' *);
  318. cThursday = $74687520 (* 'thu ' *);
  319. cFriday = $66726920 (* 'fri ' *);
  320. cSaturday = $73617420 (* 'sat ' *); { AS 1.1 Globals: }
  321. pASQuote = $71756F74 (* 'quot' *);
  322. pASSeconds = $73656373 (* 'secs' *);
  323. pASMinutes = $6D696E20 (* 'min ' *);
  324. pASHours = $686F7572 (* 'hour' *);
  325. pASDays = $64617973 (* 'days' *);
  326. pASWeeks = $7765656B (* 'week' *); { Writing Code things: }
  327. cWritingCodeInfo = $6369746C (* 'citl' *);
  328. pScriptCode = $70736364 (* 'pscd' *);
  329. pLangCode = $706C6364 (* 'plcd' *); { Magic Tell and End Tell events for logging: }
  330. kASMagicTellEvent = $74656C6C (* 'tell' *);
  331. kASMagicEndTellEvent = $74656E64 (* 'tend' *);
  332. {$ALIGN MAC68K}
  333. end.