AEPackObject.pas 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. {
  2. File: AE/AEPackObject.h
  3. Contains: AppleEvents object packing Interfaces.
  4. Version: AppleEvents-496~1
  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: Jonas Maebe, <[email protected]>, October 2009 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. unit AEPackObject;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  25. {$setc GAP_INTERFACES_VERSION := $0308}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  41. {$setc __ppc64__ := 1}
  42. {$elsec}
  43. {$setc __ppc64__ := 0}
  44. {$endc}
  45. {$ifc not defined __i386__ and defined CPUI386}
  46. {$setc __i386__ := 1}
  47. {$elsec}
  48. {$setc __i386__ := 0}
  49. {$endc}
  50. {$ifc not defined __x86_64__ and defined CPUX86_64}
  51. {$setc __x86_64__ := 1}
  52. {$elsec}
  53. {$setc __x86_64__ := 0}
  54. {$endc}
  55. {$ifc not defined __arm__ and defined CPUARM}
  56. {$setc __arm__ := 1}
  57. {$elsec}
  58. {$setc __arm__ := 0}
  59. {$endc}
  60. {$ifc defined cpu64}
  61. {$setc __LP64__ := 1}
  62. {$elsec}
  63. {$setc __LP64__ := 0}
  64. {$endc}
  65. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  66. {$error Conflicting definitions for __ppc__ and __i386__}
  67. {$endc}
  68. {$ifc defined __ppc__ and __ppc__}
  69. {$setc TARGET_CPU_PPC := TRUE}
  70. {$setc TARGET_CPU_PPC64 := FALSE}
  71. {$setc TARGET_CPU_X86 := FALSE}
  72. {$setc TARGET_CPU_X86_64 := FALSE}
  73. {$setc TARGET_CPU_ARM := FALSE}
  74. {$setc TARGET_OS_MAC := TRUE}
  75. {$setc TARGET_OS_IPHONE := FALSE}
  76. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  77. {$elifc defined __ppc64__ and __ppc64__}
  78. {$setc TARGET_CPU_PPC := FALSE}
  79. {$setc TARGET_CPU_PPC64 := TRUE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$elifc defined __i386__ and __i386__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := FALSE}
  89. {$setc TARGET_CPU_X86 := TRUE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$ifc defined(iphonesim)}
  93. {$setc TARGET_OS_MAC := FALSE}
  94. {$setc TARGET_OS_IPHONE := TRUE}
  95. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  96. {$elsec}
  97. {$setc TARGET_OS_MAC := TRUE}
  98. {$setc TARGET_OS_IPHONE := FALSE}
  99. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  100. {$endc}
  101. {$elifc defined __x86_64__ and __x86_64__}
  102. {$setc TARGET_CPU_PPC := FALSE}
  103. {$setc TARGET_CPU_PPC64 := FALSE}
  104. {$setc TARGET_CPU_X86 := FALSE}
  105. {$setc TARGET_CPU_X86_64 := TRUE}
  106. {$setc TARGET_CPU_ARM := FALSE}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$elifc defined __arm__ and __arm__}
  111. {$setc TARGET_CPU_PPC := FALSE}
  112. {$setc TARGET_CPU_PPC64 := FALSE}
  113. {$setc TARGET_CPU_X86 := FALSE}
  114. {$setc TARGET_CPU_X86_64 := FALSE}
  115. {$setc TARGET_CPU_ARM := TRUE}
  116. { will require compiler define when/if other Apple devices with ARM cpus ship }
  117. {$setc TARGET_OS_MAC := FALSE}
  118. {$setc TARGET_OS_IPHONE := TRUE}
  119. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  120. {$elsec}
  121. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  122. {$endc}
  123. {$ifc defined __LP64__ and __LP64__ }
  124. {$setc TARGET_CPU_64 := TRUE}
  125. {$elsec}
  126. {$setc TARGET_CPU_64 := FALSE}
  127. {$endc}
  128. {$ifc defined FPC_BIG_ENDIAN}
  129. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  130. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  131. {$elifc defined FPC_LITTLE_ENDIAN}
  132. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  133. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  134. {$elsec}
  135. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  136. {$endc}
  137. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  138. {$setc CALL_NOT_IN_CARBON := FALSE}
  139. {$setc OLDROUTINENAMES := FALSE}
  140. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  141. {$setc OPAQUE_UPP_TYPES := TRUE}
  142. {$setc OTCARBONAPPLICATION := TRUE}
  143. {$setc OTKERNEL := FALSE}
  144. {$setc PM_USE_SESSION_APIS := TRUE}
  145. {$setc TARGET_API_MAC_CARBON := TRUE}
  146. {$setc TARGET_API_MAC_OS8 := FALSE}
  147. {$setc TARGET_API_MAC_OSX := TRUE}
  148. {$setc TARGET_CARBON := TRUE}
  149. {$setc TARGET_CPU_68K := FALSE}
  150. {$setc TARGET_CPU_MIPS := FALSE}
  151. {$setc TARGET_CPU_SPARC := FALSE}
  152. {$setc TARGET_OS_UNIX := FALSE}
  153. {$setc TARGET_OS_WIN32 := FALSE}
  154. {$setc TARGET_RT_MAC_68881 := FALSE}
  155. {$setc TARGET_RT_MAC_CFM := FALSE}
  156. {$setc TARGET_RT_MAC_MACHO := TRUE}
  157. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  158. {$setc TYPE_BOOL := FALSE}
  159. {$setc TYPE_EXTENDED := FALSE}
  160. {$setc TYPE_LONGLONG := TRUE}
  161. uses MacTypes,AEDataModel,AppleEvents;
  162. {$endc} {not MACOSALLINCLUDE}
  163. {$ifc TARGET_OS_MAC}
  164. {$ALIGN POWER}
  165. { These are the object packing routines. }
  166. {
  167. * CreateOffsetDescriptor()
  168. *
  169. * Mac OS X threading:
  170. * Thread safe since version 10.2
  171. *
  172. * Availability:
  173. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  174. * CarbonLib: in CarbonLib 1.0 and later
  175. * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
  176. }
  177. function CreateOffsetDescriptor( theOffset: SIGNEDLONG; var theDescriptor: AEDesc ): OSErr; external name '_CreateOffsetDescriptor';
  178. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  179. {
  180. * CreateCompDescriptor()
  181. *
  182. * Mac OS X threading:
  183. * Thread safe since version 10.2
  184. *
  185. * Availability:
  186. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  187. * CarbonLib: in CarbonLib 1.0 and later
  188. * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
  189. }
  190. function CreateCompDescriptor( comparisonOperator: DescType; var operand1: AEDesc; var operand2: AEDesc; disposeInputs: Boolean; var theDescriptor: AEDesc ): OSErr; external name '_CreateCompDescriptor';
  191. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  192. {
  193. * CreateLogicalDescriptor()
  194. *
  195. * Mac OS X threading:
  196. * Thread safe since version 10.2
  197. *
  198. * Availability:
  199. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  200. * CarbonLib: in CarbonLib 1.0 and later
  201. * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
  202. }
  203. function CreateLogicalDescriptor( var theLogicalTerms: AEDescList; theLogicOperator: DescType; disposeInputs: Boolean; var theDescriptor: AEDesc ): OSErr; external name '_CreateLogicalDescriptor';
  204. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  205. {
  206. * CreateObjSpecifier()
  207. *
  208. * Mac OS X threading:
  209. * Thread safe since version 10.2
  210. *
  211. * Availability:
  212. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  213. * CarbonLib: in CarbonLib 1.0 and later
  214. * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
  215. }
  216. function CreateObjSpecifier( desiredClass: DescType; var theContainer: AEDesc; keyForm: DescType; var keyData: AEDesc; disposeInputs: Boolean; var objSpecifier: AEDesc ): OSErr; external name '_CreateObjSpecifier';
  217. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  218. {
  219. * CreateRangeDescriptor()
  220. *
  221. * Mac OS X threading:
  222. * Thread safe since version 10.2
  223. *
  224. * Availability:
  225. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  226. * CarbonLib: in CarbonLib 1.0 and later
  227. * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
  228. }
  229. function CreateRangeDescriptor( var rangeStart: AEDesc; var rangeStop: AEDesc; disposeInputs: Boolean; var theDescriptor: AEDesc ): OSErr; external name '_CreateRangeDescriptor';
  230. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  231. {$endc} {TARGET_OS_MAC}
  232. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  233. end.
  234. {$endc} {not MACOSALLINCLUDE}