CoreImage.pas 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. {$mode delphi}
  2. {$modeswitch objectivec1}
  3. {$modeswitch cvar}
  4. {$packrecords c}
  5. {$ifdef COCOAALL}
  6. {$fatal "CoreImage can't be used because -dCOCOAALL has been declared."}
  7. {$endif}
  8. {$macro on}
  9. {$define instancetype := id}
  10. {$ifndef LOADED_AVAILABILITY_MACROS}
  11. {$define LOADED_AVAILABILITY_MACROS}
  12. // System Versions MacOSX SDK
  13. {$define MAC_OS_X_VERSION_10_0 := 1000}
  14. {$define MAC_OS_X_VERSION_10_1 := 1010}
  15. {$define MAC_OS_X_VERSION_10_2 := 1020}
  16. {$define MAC_OS_X_VERSION_10_3 := 1030}
  17. {$define MAC_OS_X_VERSION_10_4 := 1040}
  18. {$define MAC_OS_X_VERSION_10_5 := 1050}
  19. {$define MAC_OS_X_VERSION_10_6 := 1060}
  20. {$define MAC_OS_X_VERSION_10_7 := 1070}
  21. {$define MAC_OS_X_VERSION_10_8 := 1080}
  22. {$define MAC_OS_X_VERSION_10_9 := 1090}
  23. {$define MAC_OS_X_VERSION_10_10 := 101000}
  24. {$define MAC_OS_X_VERSION_LATEST := MAC_OS_X_VERSION_10_10}
  25. // System Versions iPhoneOS SDK
  26. {$define __MAC_10_0 := 1000}
  27. {$define __MAC_10_1 := 1010}
  28. {$define __MAC_10_2 := 1020}
  29. {$define __MAC_10_3 := 1030}
  30. {$define __MAC_10_4 := 1040}
  31. {$define __MAC_10_5 := 1050}
  32. {$define __MAC_10_6 := 1060}
  33. {$define __MAC_10_7 := 1070}
  34. {$define __MAC_10_8 := 1080}
  35. {$define __MAC_10_9 := 1090}
  36. {$define __MAC_10_10 := 1100}
  37. {$define __MAC_NA := 9999}
  38. {$define __IPHONE_2_0 := 20000}
  39. {$define __IPHONE_2_1 := 20100}
  40. {$define __IPHONE_2_2 := 20200}
  41. {$define __IPHONE_3_0 := 30000}
  42. {$define __IPHONE_3_1 := 30100}
  43. {$define __IPHONE_3_2 := 30200}
  44. {$define __IPHONE_4_0 := 40000}
  45. {$define __IPHONE_4_1 := 40100}
  46. {$define __IPHONE_4_2 := 40200}
  47. {$define __IPHONE_4_3 := 40300}
  48. {$define __IPHONE_5_0 := 50000}
  49. {$define __IPHONE_6_0 := 60000}
  50. {$define __IPHONE_7_0 := 70000}
  51. {$define __IPHONE_8_0 := 80000}
  52. {$define __IPHONE_NA := 99999}
  53. {$define __IPHONE_LATEST := __IPHONE_8_0}
  54. // Target Conditionals
  55. {$if defined(CPUPOWERPC32)}
  56. {$define TARGET_CPU_PPC}
  57. {$undef TARGET_CPU_PPC64}
  58. {$undef TARGET_CPU_X86}
  59. {$undef TARGET_CPU_X86_64}
  60. {$undef TARGET_CPU_ARM}
  61. {$define TARGET_OS_MAC}
  62. {$undef TARGET_OS_IPHONE}
  63. {$undef TARGET_IPHONE_SIMULATOR}
  64. {$undef TARGET_RT_64_BIT}
  65. {$elseif defined(CPUPOWERPC64)}
  66. {$undef TARGET_CPU_PPC}
  67. {$define TARGET_CPU_PPC64}
  68. {$undef TARGET_CPU_X86}
  69. {$undef TARGET_CPU_X86_64}
  70. {$undef TARGET_CPU_ARM}
  71. {$define TARGET_OS_MAC}
  72. {$undef TARGET_OS_IPHONE}
  73. {$undef TARGET_IPHONE_SIMULATOR}
  74. {$define TARGET_RT_64_BIT}
  75. {$elseif defined(CPUI386)}
  76. {$undef TARGET_CPU_PPC}
  77. {$undef TARGET_CPU_PPC64}
  78. {$define TARGET_CPU_X86}
  79. {$undef TARGET_CPU_X86_64}
  80. {$undef TARGET_CPU_ARM}
  81. {$undef TARGET_RT_64_BIT}
  82. {$if defined(IPHONESIM)}
  83. {$undef TARGET_OS_MAC}
  84. {$define TARGET_OS_IPHONE}
  85. {$define TARGET_IPHONE_SIMULATOR}
  86. {$else}
  87. {$define TARGET_OS_MAC}
  88. {$undef TARGET_OS_IPHONE}
  89. {$undef TARGET_IPHONE_SIMULATOR}
  90. {$endif}
  91. {$elseif defined(CPUX86_64)}
  92. {$undef TARGET_CPU_PPC}
  93. {$undef TARGET_CPU_PPC64}
  94. {$undef TARGET_CPU_X86}
  95. {$define TARGET_CPU_X86_64}
  96. {$undef TARGET_CPU_ARM}
  97. {$define TARGET_OS_MAC}
  98. {$undef TARGET_OS_IPHONE}
  99. {$undef TARGET_IPHONE_SIMULATOR}
  100. {$define TARGET_RT_64_BIT}
  101. {$elseif defined(CPUARM)}
  102. {$undef TARGET_CPU_PPC}
  103. {$undef TARGET_CPU_PPC64}
  104. {$undef TARGET_CPU_X86}
  105. {$undef TARGET_CPU_X86_64}
  106. {$define TARGET_CPU_ARM}
  107. {$undef TARGET_OS_MAC}
  108. {$define TARGET_OS_IPHONE}
  109. {$undef TARGET_IPHONE_SIMULATOR}
  110. {$undef TARGET_RT_64_BIT}
  111. {$endif}
  112. {$ifdef CPU64}
  113. {$define TARGET_CPU_64}
  114. {$define TARGET_RT_64_BIT}
  115. {$else}
  116. {$undef TARGET_CPU_64}
  117. {$undef TARGET_RT_64_BIT}
  118. {$endif}
  119. {$if defined(FPC_BIG_ENDIAN)}
  120. {$define TARGET_RT_BIG_ENDIAN}
  121. {$undef TARGET_RT_LITTLE_ENDIAN}
  122. {$elseif defined(FPC_LITTLE_ENDIAN)}
  123. {$define TARGET_RT_LITTLE_ENDIAN}
  124. {$undef TARGET_RT_BIG_ENDIAN}
  125. {$endif}
  126. {$undef DEPLOYMENT_TARGET_EMBEDDED}
  127. {$undef DEPLOYMENT_TARGET_WINDOWS}
  128. {$define TARGET_API_MAC_CARBON}
  129. {$undef TARGET_API_MAC_OS8}
  130. {$define TARGET_API_MAC_OSX}
  131. {$define TARGET_CARBON}
  132. {$undef TARGET_CPU_68K}
  133. {$undef TARGET_CPU_MIPS}
  134. {$undef TARGET_CPU_SPARC}
  135. {$undef TARGET_CPU_ALPHA}
  136. {$undef TARGET_OS_UNIX}
  137. {$undef TARGET_OS_WIN32}
  138. {$undef TARGET_OS_EMBEDDED}
  139. {$undef TARGET_RT_MAC_68881}
  140. {$undef TARGET_RT_MAC_CFM}
  141. {$define TARGET_RT_MAC_MACHO}
  142. {$undef __OBJC2__}
  143. {$undef __BLOCKS__}
  144. {$undef NS_BLOCKS_AVAILABLE}
  145. {$undef NS_BUILD_32_LIKE_64}
  146. {$undef NS_NONATOMIC_IOSONLY}
  147. {$define ACCESSOR_CALLS_ARE_FUNCTIONS}
  148. {$undef CALL_NOT_IN_CARBON}
  149. {$undef OLDROUTINENAMES}
  150. {$define OPAQUE_TOOLBOX_STRUCTS}
  151. {$define OPAQUE_UPP_TYPES}
  152. {$define OTCARBONAPPLICATION}
  153. {$undef OTKERNEL}
  154. {$define PM_USE_SESSION_APIS}
  155. {$define TYPED_FUNCTION_POINTERS}
  156. {$undef TYPE_BOOL}
  157. {$undef TYPE_EXTENDED}
  158. {$define TYPE_LONGLONG}
  159. {$ifdef CPU64}
  160. {$define __LP64__}
  161. {$else}
  162. {$undef __LP64__}
  163. {$endif}
  164. // Mac OS X Version Requirements
  165. {$if defined(TARGET_CPU_PPC64) or defined(TARGET_CPU_X86) or defined(TARGET_CPU_X86_64)}
  166. {$define MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_10_4}
  167. {$elseif defined(TARGET_CPU_ARM)}
  168. {$define MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_10_5}
  169. {$else}
  170. {$define MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_10_1}
  171. {$endif}
  172. {$define MAC_OS_X_VERSION_MAX_ALLOWED := MAC_OS_X_VERSION_LATEST}
  173. // iOS Version Requirements
  174. {$define __IPHONE_OS_VERSION_MAX_ALLOWED := __IPHONE_LATEST}
  175. {$define __IPHONE_OS_VERSION_MIN_REQUIRED := __IPHONE_2_0}
  176. // Mac OS X compiled for iOS
  177. {$define __MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_MIN_REQUIRED}
  178. {$define __MAC_OS_X_VERSION_MAX_ALLOWED := MAC_OS_X_VERSION_LATEST}
  179. {$endif}
  180. unit CoreImage;
  181. interface
  182. // CoreImage.framework is linked from QuartzCore.framework
  183. {$linkframework QuartzCore}
  184. uses
  185. {$ifdef COCOAALL}
  186. {$ifdef MACOSALL}
  187. DefinedClassesFoundation, DefinedClassesCoreImage, CoreVideo, CocoaAll, CTypes, MacOSAll;
  188. {$else}
  189. DefinedClassesFoundation, DefinedClassesCoreImage, CoreVideo, CTypes, MacTypes, MacOSXPosix, CoreFoundation, CocoaAll, AEDataModel, IconsCore, IOSurfaceAPI, SecBase, SecTrust, MacGL, CGLTypes, CFBase, CFArray, CFBag, CFCharacterSet, CFData, CFDate, CFDictionary, CFNumber, CFPropertyList, CFSet, CFString, CFStringEncodingExt, CFTimeZone, CFTree, CFURL, CFXMLNode, CFXMLParser, CFMachPort, CFMessagePort, CFRunLoop, CFSocket, CFBinaryHeap, CFBitVector, CFBundle, CFByteOrders, CFPlugIn, CFPreferences, CFURLAccess, CFUUID, CFLocale, CFStream, CFDateFormatter, CFNumberFormatter, CFCalendar, CFUserNotification, CFNotificationCenter, CFAttributedString, CFNetworkErrorss, CGBase, CGAffineTransforms, CGBitmapContext, CGColor, CGColorSpace, CGContext, CGDataConsumer, CGDataProvider, CGDirectDisplay, CGDirectPalette, CGDisplayConfiguration, CGDisplayFades, CGErrors, CGEvent, CGEventSource, CGEventTypes, CGFont, CGFunction, CGGLContext, CGGeometry, CGImage, CGLayer, CGPDFArray, CGPDFContentStream, CGPDFContext, CGPDFDictionary, CGPDFDocument, CGPDFObject, CGPDFOperatorTable, CGPDFPage, CGPDFScanner, CGPDFStream, CGPDFString, CGPSConverter, CGPath, CGPattern, CGRemoteOperation, CGSession, CGShading, CGWindowLevels, CVBase, CVImageBuffer;
  190. {$endif}
  191. {$else}
  192. {$ifdef MACOSALL}
  193. DefinedClassesFoundation, DefinedClassesCoreImage, Foundation, CoreVideo, CTypes, MacOSAll;
  194. {$else}
  195. DefinedClassesFoundation, DefinedClassesCoreImage, Foundation, CoreVideo, CTypes, MacTypes, MacOSXPosix, CoreFoundation, AEDataModel, IconsCore, IOSurfaceAPI, SecBase, SecTrust, MacGL, CGLTypes, CFBase, CFArray, CFBag, CFCharacterSet, CFData, CFDate, CFDictionary, CFNumber, CFPropertyList, CFSet, CFString, CFStringEncodingExt, CFTimeZone, CFTree, CFURL, CFXMLNode, CFXMLParser, CFMachPort, CFMessagePort, CFRunLoop, CFSocket, CFBinaryHeap, CFBitVector, CFBundle, CFByteOrders, CFPlugIn, CFPreferences, CFURLAccess, CFUUID, CFLocale, CFStream, CFDateFormatter, CFNumberFormatter, CFCalendar, CFUserNotification, CFNotificationCenter, CFAttributedString, CFNetworkErrorss, CGBase, CGAffineTransforms, CGBitmapContext, CGColor, CGColorSpace, CGContext, CGDataConsumer, CGDataProvider, CGDirectDisplay, CGDirectPalette, CGDisplayConfiguration, CGDisplayFades, CGErrors, CGEvent, CGEventSource, CGEventTypes, CGFont, CGFunction, CGGLContext, CGGeometry, CGImage, CGLayer, CGPDFArray, CGPDFContentStream, CGPDFContext, CGPDFDictionary, CGPDFDocument, CGPDFObject, CGPDFOperatorTable, CGPDFPage, CGPDFScanner, CGPDFStream, CGPDFString, CGPSConverter, CGPath, CGPattern, CGRemoteOperation, CGSession, CGShading, CGWindowLevels, CVBase, CVImageBuffer;
  196. {$endif}
  197. {$endif}
  198. {$define INTERFACE}
  199. {$define CGFLOAT_DEFINED}
  200. {$define NSINTEGER_DEFINED}
  201. type
  202. OpaqueRecord = record end;
  203. OpaqueCBlock = pointer;
  204. OpaqueType = ^SInt32;
  205. objc_protocol = protocol;
  206. idPtr = ^id;
  207. SELPtr = ^SEL;
  208. va_list_rec = OpaqueRecord;
  209. va_list = ^va_list_rec;
  210. {$include UndefinedTypes.inc}
  211. {$include coreimage/UndefinedTypes.inc}
  212. {$define TYPES}
  213. {$include coreimage/Sources.inc}
  214. {$undef TYPES}
  215. {$define RECORDS}
  216. {$include coreimage/Sources.inc}
  217. {$undef RECORDS}
  218. {$define PROTOCOLS}
  219. {$include coreimage/Sources.inc}
  220. {$undef PROTOCOLS}
  221. {$define CLASSES}
  222. {$include coreimage/Sources.inc}
  223. {$undef CLASSES}
  224. {$define FUNCTIONS}
  225. {$include coreimage/Sources.inc}
  226. {$undef FUNCTIONS}
  227. {$define EXTERNAL_SYMBOLS}
  228. {$include coreimage/Sources.inc}
  229. {$undef EXTERNAL_SYMBOLS}
  230. {$include coreimage/InlineFunctions.inc}
  231. {$undef INTERFACE}
  232. implementation
  233. {$define IMPLEMENTATION}
  234. {$include coreimage/InlineFunctions.inc}
  235. {$undef IMPLEMENTATION}
  236. end.