/packages/univint/src/ASRegistry.pas

https://github.com/slibre/freepascal · Pascal · 476 lines · 251 code · 37 blank · 188 comment · 0 complexity · 51c568d41b9731122a04888adde9d076 MD5 · raw file

  1. {
  2. File: OpenScripting/ASRegistry.h
  3. Contains: AppleScript Registry constants.
  4. Version: OSA-148~28
  5. Copyright: © 1991-2008 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Gorazd Krosl <gorazd_1957@yahoo.ca>, October 2009 }
  11. { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 308
  15. Please report any bugs to <gpc@microbizz.nl>
  16. }
  17. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  18. {$mode macpas}
  19. {$packenum 1}
  20. {$macro on}
  21. {$inline on}
  22. {$calling mwpascal}
  23. unit ASRegistry;
  24. interface
  25. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  26. {$setc GAP_INTERFACES_VERSION := $0308}
  27. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  28. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  29. {$endc}
  30. {$ifc defined CPUPOWERPC and defined CPUI386}
  31. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  32. {$endc}
  33. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  34. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  35. {$endc}
  36. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  37. {$setc __ppc__ := 1}
  38. {$elsec}
  39. {$setc __ppc__ := 0}
  40. {$endc}
  41. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  42. {$setc __ppc64__ := 1}
  43. {$elsec}
  44. {$setc __ppc64__ := 0}
  45. {$endc}
  46. {$ifc not defined __i386__ and defined CPUI386}
  47. {$setc __i386__ := 1}
  48. {$elsec}
  49. {$setc __i386__ := 0}
  50. {$endc}
  51. {$ifc not defined __x86_64__ and defined CPUX86_64}
  52. {$setc __x86_64__ := 1}
  53. {$elsec}
  54. {$setc __x86_64__ := 0}
  55. {$endc}
  56. {$ifc not defined __arm__ and defined CPUARM}
  57. {$setc __arm__ := 1}
  58. {$elsec}
  59. {$setc __arm__ := 0}
  60. {$endc}
  61. {$ifc defined cpu64}
  62. {$setc __LP64__ := 1}
  63. {$elsec}
  64. {$setc __LP64__ := 0}
  65. {$endc}
  66. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  67. {$error Conflicting definitions for __ppc__ and __i386__}
  68. {$endc}
  69. {$ifc defined __ppc__ and __ppc__}
  70. {$setc TARGET_CPU_PPC := TRUE}
  71. {$setc TARGET_CPU_PPC64 := FALSE}
  72. {$setc TARGET_CPU_X86 := FALSE}
  73. {$setc TARGET_CPU_X86_64 := FALSE}
  74. {$setc TARGET_CPU_ARM := FALSE}
  75. {$setc TARGET_OS_MAC := TRUE}
  76. {$setc TARGET_OS_IPHONE := FALSE}
  77. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  78. {$setc TARGET_OS_EMBEDDED := FALSE}
  79. {$elifc defined __ppc64__ and __ppc64__}
  80. {$setc TARGET_CPU_PPC := FALSE}
  81. {$setc TARGET_CPU_PPC64 := TRUE}
  82. {$setc TARGET_CPU_X86 := FALSE}
  83. {$setc TARGET_CPU_X86_64 := FALSE}
  84. {$setc TARGET_CPU_ARM := FALSE}
  85. {$setc TARGET_OS_MAC := TRUE}
  86. {$setc TARGET_OS_IPHONE := FALSE}
  87. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  88. {$setc TARGET_OS_EMBEDDED := FALSE}
  89. {$elifc defined __i386__ and __i386__}
  90. {$setc TARGET_CPU_PPC := FALSE}
  91. {$setc TARGET_CPU_PPC64 := FALSE}
  92. {$setc TARGET_CPU_X86 := TRUE}
  93. {$setc TARGET_CPU_X86_64 := FALSE}
  94. {$setc TARGET_CPU_ARM := FALSE}
  95. {$ifc defined(iphonesim)}
  96. {$setc TARGET_OS_MAC := FALSE}
  97. {$setc TARGET_OS_IPHONE := TRUE}
  98. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  99. {$elsec}
  100. {$setc TARGET_OS_MAC := TRUE}
  101. {$setc TARGET_OS_IPHONE := FALSE}
  102. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  103. {$endc}
  104. {$setc TARGET_OS_EMBEDDED := FALSE}
  105. {$elifc defined __x86_64__ and __x86_64__}
  106. {$setc TARGET_CPU_PPC := FALSE}
  107. {$setc TARGET_CPU_PPC64 := FALSE}
  108. {$setc TARGET_CPU_X86 := FALSE}
  109. {$setc TARGET_CPU_X86_64 := TRUE}
  110. {$setc TARGET_CPU_ARM := FALSE}
  111. {$setc TARGET_OS_MAC := TRUE}
  112. {$setc TARGET_OS_IPHONE := FALSE}
  113. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  114. {$setc TARGET_OS_EMBEDDED := FALSE}
  115. {$elifc defined __arm__ and __arm__}
  116. {$setc TARGET_CPU_PPC := FALSE}
  117. {$setc TARGET_CPU_PPC64 := FALSE}
  118. {$setc TARGET_CPU_X86 := FALSE}
  119. {$setc TARGET_CPU_X86_64 := FALSE}
  120. {$setc TARGET_CPU_ARM := TRUE}
  121. { will require compiler define when/if other Apple devices with ARM cpus ship }
  122. {$setc TARGET_OS_MAC := FALSE}
  123. {$setc TARGET_OS_IPHONE := TRUE}
  124. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  125. {$setc TARGET_OS_EMBEDDED := TRUE}
  126. {$elsec}
  127. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  128. {$endc}
  129. {$ifc defined __LP64__ and __LP64__ }
  130. {$setc TARGET_CPU_64 := TRUE}
  131. {$elsec}
  132. {$setc TARGET_CPU_64 := FALSE}
  133. {$endc}
  134. {$ifc defined FPC_BIG_ENDIAN}
  135. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  136. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  137. {$elifc defined FPC_LITTLE_ENDIAN}
  138. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  139. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  140. {$elsec}
  141. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  142. {$endc}
  143. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  144. {$setc CALL_NOT_IN_CARBON := FALSE}
  145. {$setc OLDROUTINENAMES := FALSE}
  146. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  147. {$setc OPAQUE_UPP_TYPES := TRUE}
  148. {$setc OTCARBONAPPLICATION := TRUE}
  149. {$setc OTKERNEL := FALSE}
  150. {$setc PM_USE_SESSION_APIS := TRUE}
  151. {$setc TARGET_API_MAC_CARBON := TRUE}
  152. {$setc TARGET_API_MAC_OS8 := FALSE}
  153. {$setc TARGET_API_MAC_OSX := TRUE}
  154. {$setc TARGET_CARBON := TRUE}
  155. {$setc TARGET_CPU_68K := FALSE}
  156. {$setc TARGET_CPU_MIPS := FALSE}
  157. {$setc TARGET_CPU_SPARC := FALSE}
  158. {$setc TARGET_OS_UNIX := FALSE}
  159. {$setc TARGET_OS_WIN32 := FALSE}
  160. {$setc TARGET_RT_MAC_68881 := FALSE}
  161. {$setc TARGET_RT_MAC_CFM := FALSE}
  162. {$setc TARGET_RT_MAC_MACHO := TRUE}
  163. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  164. {$setc TYPE_BOOL := FALSE}
  165. {$setc TYPE_EXTENDED := FALSE}
  166. {$setc TYPE_LONGLONG := TRUE}
  167. uses MacTypes,AERegistry,AEDataModel,AEObjects;
  168. {$endc} {not MACOSALLINCLUDE}
  169. {$ifc TARGET_OS_MAC}
  170. {$ALIGN POWER}
  171. const
  172. keyAETarget = FourCharCode('targ');
  173. keySubjectAttr = FourCharCode('subj'); { Magic 'returning' parameter: }
  174. keyASReturning = FourCharCode('Krtn'); { AppleScript Specific Codes: }
  175. kASAppleScriptSuite = FourCharCode('ascr');
  176. kASScriptEditorSuite = FourCharCode('ToyS');
  177. kASTypeNamesSuite = FourCharCode('tpnm'); { dynamic terminologies }
  178. typeAETE = FourCharCode('aete');
  179. typeAEUT = FourCharCode('aeut');
  180. kGetAETE = FourCharCode('gdte');
  181. kGetAEUT = FourCharCode('gdut');
  182. kUpdateAEUT = FourCharCode('udut');
  183. kUpdateAETE = FourCharCode('udte');
  184. kCleanUpAEUT = FourCharCode('cdut');
  185. kASComment = FourCharCode('cmnt');
  186. kASLaunchEvent = FourCharCode('noop');
  187. keyScszResource = FourCharCode('scsz');
  188. typeScszResource = FourCharCode('scsz'); { subroutine calls }
  189. kASSubroutineEvent = FourCharCode('psbr');
  190. keyASSubroutineName = FourCharCode('snam');
  191. kASPrepositionalSubroutine = FourCharCode('psbr');
  192. keyASPositionalArgs = FourCharCode('parg');
  193. const
  194. { Add this parameter to a Get Data result if your app handled the 'as' parameter }
  195. keyAppHandledCoercion = FourCharCode('idas');
  196. const
  197. { Miscellaneous AppleScript commands }
  198. kASStartLogEvent = FourCharCode('log1');
  199. kASStopLogEvent = FourCharCode('log0');
  200. kASCommentEvent = FourCharCode('cmnt');
  201. { Operator Events: }
  202. const
  203. { Binary: }
  204. kASAdd = FourCharCode('+ ');
  205. kASSubtract = FourCharCode('- ');
  206. kASMultiply = FourCharCode('* ');
  207. kASDivide = FourCharCode('/ ');
  208. kASQuotient = FourCharCode('div ');
  209. kASRemainder = FourCharCode('mod ');
  210. kASPower = FourCharCode('^ ');
  211. kASEqual = kAEEquals;
  212. kASNotEqual = $AD202020;
  213. kASGreaterThan = kAEGreaterThan;
  214. kASGreaterThanOrEqual = kAEGreaterThanEquals;
  215. kASLessThan = kAELessThan;
  216. kASLessThanOrEqual = kAELessThanEquals;
  217. kASComesBefore = FourCharCode('cbfr');
  218. kASComesAfter = FourCharCode('cafr');
  219. kASConcatenate = FourCharCode('ccat');
  220. kASStartsWith = kAEBeginsWith;
  221. kASEndsWith = kAEEndsWith;
  222. kASContains = kAEContains;
  223. const
  224. kASAnd = kAEAND;
  225. kASOr = kAEOR; { Unary: }
  226. kASNot = kAENOT;
  227. kASNegate = FourCharCode('neg ');
  228. keyASArg = FourCharCode('arg ');
  229. const
  230. { event code for the 'error' statement }
  231. kASErrorEventCode = FourCharCode('err ');
  232. kOSAErrorArgs = FourCharCode('erra');
  233. keyAEErrorObject = FourCharCode('erob'); { Properties: }
  234. pLength = FourCharCode('leng');
  235. pReverse = FourCharCode('rvse');
  236. pRest = FourCharCode('rest');
  237. pInherits = FourCharCode('c@#^');
  238. pProperties = FourCharCode('pALL'); { User-Defined Record Fields: }
  239. keyASUserRecordFields = FourCharCode('usrf');
  240. typeUserRecordFields = typeAEList;
  241. { Prepositions: }
  242. const
  243. keyASPrepositionAt = FourCharCode('at ');
  244. keyASPrepositionIn = FourCharCode('in ');
  245. keyASPrepositionFrom = FourCharCode('from');
  246. keyASPrepositionFor = FourCharCode('for ');
  247. keyASPrepositionTo = FourCharCode('to ');
  248. keyASPrepositionThru = FourCharCode('thru');
  249. keyASPrepositionThrough = FourCharCode('thgh');
  250. keyASPrepositionBy = FourCharCode('by ');
  251. keyASPrepositionOn = FourCharCode('on ');
  252. keyASPrepositionInto = FourCharCode('into');
  253. keyASPrepositionOnto = FourCharCode('onto');
  254. keyASPrepositionBetween = FourCharCode('btwn');
  255. keyASPrepositionAgainst = FourCharCode('agst');
  256. keyASPrepositionOutOf = FourCharCode('outo');
  257. keyASPrepositionInsteadOf = FourCharCode('isto');
  258. keyASPrepositionAsideFrom = FourCharCode('asdf');
  259. keyASPrepositionAround = FourCharCode('arnd');
  260. keyASPrepositionBeside = FourCharCode('bsid');
  261. keyASPrepositionBeneath = FourCharCode('bnth');
  262. keyASPrepositionUnder = FourCharCode('undr');
  263. const
  264. keyASPrepositionOver = FourCharCode('over');
  265. keyASPrepositionAbove = FourCharCode('abve');
  266. keyASPrepositionBelow = FourCharCode('belw');
  267. keyASPrepositionApartFrom = FourCharCode('aprt');
  268. keyASPrepositionGiven = FourCharCode('givn');
  269. keyASPrepositionWith = FourCharCode('with');
  270. keyASPrepositionWithout = FourCharCode('wout');
  271. keyASPrepositionAbout = FourCharCode('abou');
  272. keyASPrepositionSince = FourCharCode('snce');
  273. keyASPrepositionUntil = FourCharCode('till');
  274. const
  275. { Terminology & Dialect things: }
  276. kDialectBundleResType = FourCharCode('Dbdl'); { AppleScript Classes and Enums: }
  277. cConstant = typeEnumerated;
  278. cClassIdentifier = pClass;
  279. cObjectBeingExamined = typeObjectBeingExamined;
  280. cList = typeAEList;
  281. cSmallReal = typeIEEE32BitFloatingPoint;
  282. cReal = typeIEEE64BitFloatingPoint;
  283. cRecord = typeAERecord;
  284. cReference = cObjectSpecifier;
  285. cUndefined = FourCharCode('undf');
  286. cMissingValue = FourCharCode('msng');
  287. cSymbol = FourCharCode('symb');
  288. cLinkedList = FourCharCode('llst');
  289. cVector = FourCharCode('vect');
  290. cEventIdentifier = FourCharCode('evnt');
  291. cKeyIdentifier = FourCharCode('kyid');
  292. cUserIdentifier = FourCharCode('uid ');
  293. cPreposition = FourCharCode('prep');
  294. cKeyForm = enumKeyForm;
  295. cScript = FourCharCode('scpt');
  296. cHandler = FourCharCode('hand');
  297. cProcedure = FourCharCode('proc');
  298. const
  299. cHandleBreakpoint = FourCharCode('brak');
  300. const
  301. cClosure = FourCharCode('clsr');
  302. cRawData = FourCharCode('rdat');
  303. cStringClass = typeChar;
  304. cNumber = FourCharCode('nmbr');
  305. cListElement = FourCharCode('celm');
  306. cListOrRecord = FourCharCode('lr ');
  307. cListOrString = FourCharCode('ls ');
  308. cListRecordOrString = FourCharCode('lrs ');
  309. cNumberOrString = FourCharCode('ns ');
  310. cNumberOrDateTime = FourCharCode('nd ');
  311. cNumberDateTimeOrString = FourCharCode('nds ');
  312. cAliasOrString = FourCharCode('sf ');
  313. cSeconds = FourCharCode('scnd');
  314. typeSound = FourCharCode('snd ');
  315. enumBooleanValues = FourCharCode('boov'); { Use this instead of typeBoolean to avoid with/without conversion }
  316. kAETrue = typeTrue;
  317. kAEFalse = typeFalse;
  318. enumMiscValues = FourCharCode('misc');
  319. kASCurrentApplication = FourCharCode('cura'); { User-defined property ospecs: }
  320. formUserPropertyID = FourCharCode('usrp');
  321. const
  322. cString = cStringClass; { old name for cStringClass - can't be used in .r files}
  323. const
  324. { Global properties: }
  325. pASIt = FourCharCode('it ');
  326. pASMe = FourCharCode('me ');
  327. pASResult = FourCharCode('rslt');
  328. pASSpace = FourCharCode('spac');
  329. pASReturn = FourCharCode('ret ');
  330. pASTab = FourCharCode('tab ');
  331. pASPi = FourCharCode('pi ');
  332. pASParent = FourCharCode('pare');
  333. kASInitializeEventCode = FourCharCode('init');
  334. pASPrintLength = FourCharCode('prln');
  335. pASPrintDepth = FourCharCode('prdp');
  336. pASTopLevelScript = FourCharCode('ascr');
  337. const
  338. { Considerations }
  339. kAECase = FourCharCode('case');
  340. kAEDiacritic = FourCharCode('diac');
  341. kAEWhiteSpace = FourCharCode('whit');
  342. kAEHyphens = FourCharCode('hyph');
  343. kAEExpansion = FourCharCode('expa');
  344. kAEPunctuation = FourCharCode('punc');
  345. kAEZenkakuHankaku = FourCharCode('zkhk');
  346. kAESmallKana = FourCharCode('skna');
  347. kAEKataHiragana = FourCharCode('hika');
  348. kASConsiderReplies = FourCharCode('rmte');
  349. kASNumericStrings = FourCharCode('nume');
  350. enumConsiderations = FourCharCode('cons');
  351. { Considerations bit masks }
  352. const
  353. kAECaseConsiderMask = $00000001;
  354. kAEDiacriticConsiderMask = $00000002;
  355. kAEWhiteSpaceConsiderMask = $00000004;
  356. kAEHyphensConsiderMask = $00000008;
  357. kAEExpansionConsiderMask = $00000010;
  358. kAEPunctuationConsiderMask = $00000020;
  359. kASConsiderRepliesConsiderMask = $00000040;
  360. kASNumericStringsConsiderMask = $00000080;
  361. kAECaseIgnoreMask = $00010000;
  362. kAEDiacriticIgnoreMask = $00020000;
  363. kAEWhiteSpaceIgnoreMask = $00040000;
  364. kAEHyphensIgnoreMask = $00080000;
  365. kAEExpansionIgnoreMask = $00100000;
  366. kAEPunctuationIgnoreMask = $00200000;
  367. kASConsiderRepliesIgnoreMask = $00400000;
  368. kASNumericStringsIgnoreMask = $00800000;
  369. enumConsidsAndIgnores = FourCharCode('csig');
  370. const
  371. cCoercion = FourCharCode('coec');
  372. cCoerceUpperCase = FourCharCode('txup');
  373. cCoerceLowerCase = FourCharCode('txlo');
  374. cCoerceRemoveDiacriticals = FourCharCode('txdc');
  375. cCoerceRemovePunctuation = FourCharCode('txpc');
  376. cCoerceRemoveHyphens = FourCharCode('txhy');
  377. cCoerceOneByteToTwoByte = FourCharCode('txex');
  378. cCoerceRemoveWhiteSpace = FourCharCode('txws');
  379. cCoerceSmallKana = FourCharCode('txsk');
  380. cCoerceZenkakuhankaku = FourCharCode('txze');
  381. cCoerceKataHiragana = FourCharCode('txkh'); { Lorax things: }
  382. cZone = FourCharCode('zone');
  383. cMachine = FourCharCode('mach');
  384. cAddress = FourCharCode('addr');
  385. cRunningAddress = FourCharCode('radd');
  386. cStorage = FourCharCode('stor');
  387. const
  388. { DateTime things: }
  389. pASWeekday = FourCharCode('wkdy');
  390. pASMonth = FourCharCode('mnth');
  391. pASDay = FourCharCode('day ');
  392. pASYear = FourCharCode('year');
  393. pASTime = FourCharCode('time');
  394. pASDateString = FourCharCode('dstr');
  395. pASTimeString = FourCharCode('tstr'); { Months }
  396. cMonth = pASMonth;
  397. cJanuary = FourCharCode('jan ');
  398. cFebruary = FourCharCode('feb ');
  399. cMarch = FourCharCode('mar ');
  400. cApril = FourCharCode('apr ');
  401. cMay = FourCharCode('may ');
  402. cJune = FourCharCode('jun ');
  403. cJuly = FourCharCode('jul ');
  404. cAugust = FourCharCode('aug ');
  405. cSeptember = FourCharCode('sep ');
  406. cOctober = FourCharCode('oct ');
  407. cNovember = FourCharCode('nov ');
  408. cDecember = FourCharCode('dec ');
  409. const
  410. { Weekdays }
  411. cWeekday = pASWeekday;
  412. cSunday = FourCharCode('sun ');
  413. cMonday = FourCharCode('mon ');
  414. cTuesday = FourCharCode('tue ');
  415. cWednesday = FourCharCode('wed ');
  416. cThursday = FourCharCode('thu ');
  417. cFriday = FourCharCode('fri ');
  418. cSaturday = FourCharCode('sat '); { AS 1.1 Globals: }
  419. pASQuote = FourCharCode('quot');
  420. pASSeconds = FourCharCode('secs');
  421. pASMinutes = FourCharCode('min ');
  422. pASHours = FourCharCode('hour');
  423. pASDays = FourCharCode('days');
  424. pASWeeks = FourCharCode('week'); { Writing Code things: }
  425. cWritingCodeInfo = FourCharCode('citl');
  426. pScriptCode = FourCharCode('pscd');
  427. pLangCode = FourCharCode('plcd'); { Magic Tell and End Tell events for logging: }
  428. kASMagicTellEvent = FourCharCode('tell');
  429. kASMagicEndTellEvent = FourCharCode('tend');
  430. {$endc} {TARGET_OS_MAC}
  431. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  432. end.
  433. {$endc} {not MACOSALLINCLUDE}