CoreImage.pas 9.0 KB

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