CGDirectDisplay.pas 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. { CoreGraphics - CGDirectDisplay.h
  2. Copyright (c) 2000-2011 Apple Inc.
  3. All rights reserved. }
  4. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  5. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  6. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  7. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, August 2015 }
  8. {
  9. Modified for use with Free Pascal
  10. Version 308
  11. Please report any bugs to <[email protected]>
  12. }
  13. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  14. {$mode macpas}
  15. {$modeswitch cblocks}
  16. {$packenum 1}
  17. {$macro on}
  18. {$inline on}
  19. {$calling mwpascal}
  20. {$IFNDEF FPC_DOTTEDUNITS}
  21. unit CGDirectDisplay;
  22. {$ENDIF FPC_DOTTEDUNITS}
  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 not defined __arm64__ and defined CPUAARCH64}
  61. {$setc __arm64__ := 1}
  62. {$elsec}
  63. {$setc __arm64__ := 0}
  64. {$endc}
  65. {$ifc defined cpu64}
  66. {$setc __LP64__ := 1}
  67. {$elsec}
  68. {$setc __LP64__ := 0}
  69. {$endc}
  70. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  71. {$error Conflicting definitions for __ppc__ and __i386__}
  72. {$endc}
  73. {$ifc defined __ppc__ and __ppc__}
  74. {$setc TARGET_CPU_PPC := TRUE}
  75. {$setc TARGET_CPU_PPC64 := FALSE}
  76. {$setc TARGET_CPU_X86 := FALSE}
  77. {$setc TARGET_CPU_X86_64 := FALSE}
  78. {$setc TARGET_CPU_ARM := FALSE}
  79. {$setc TARGET_CPU_ARM64 := FALSE}
  80. {$setc TARGET_OS_MAC := TRUE}
  81. {$setc TARGET_OS_IPHONE := FALSE}
  82. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  83. {$setc TARGET_OS_EMBEDDED := FALSE}
  84. {$elifc defined __ppc64__ and __ppc64__}
  85. {$setc TARGET_CPU_PPC := FALSE}
  86. {$setc TARGET_CPU_PPC64 := TRUE}
  87. {$setc TARGET_CPU_X86 := FALSE}
  88. {$setc TARGET_CPU_X86_64 := FALSE}
  89. {$setc TARGET_CPU_ARM := FALSE}
  90. {$setc TARGET_CPU_ARM64 := FALSE}
  91. {$setc TARGET_OS_MAC := TRUE}
  92. {$setc TARGET_OS_IPHONE := FALSE}
  93. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  94. {$setc TARGET_OS_EMBEDDED := FALSE}
  95. {$elifc defined __i386__ and __i386__}
  96. {$setc TARGET_CPU_PPC := FALSE}
  97. {$setc TARGET_CPU_PPC64 := FALSE}
  98. {$setc TARGET_CPU_X86 := TRUE}
  99. {$setc TARGET_CPU_X86_64 := FALSE}
  100. {$setc TARGET_CPU_ARM := FALSE}
  101. {$setc TARGET_CPU_ARM64 := FALSE}
  102. {$ifc defined iphonesim}
  103. {$setc TARGET_OS_MAC := FALSE}
  104. {$setc TARGET_OS_IPHONE := TRUE}
  105. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  106. {$elsec}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$endc}
  111. {$setc TARGET_OS_EMBEDDED := FALSE}
  112. {$elifc defined __x86_64__ and __x86_64__}
  113. {$setc TARGET_CPU_PPC := FALSE}
  114. {$setc TARGET_CPU_PPC64 := FALSE}
  115. {$setc TARGET_CPU_X86 := FALSE}
  116. {$setc TARGET_CPU_X86_64 := TRUE}
  117. {$setc TARGET_CPU_ARM := FALSE}
  118. {$setc TARGET_CPU_ARM64 := FALSE}
  119. {$ifc defined iphonesim}
  120. {$setc TARGET_OS_MAC := FALSE}
  121. {$setc TARGET_OS_IPHONE := TRUE}
  122. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  123. {$elsec}
  124. {$setc TARGET_OS_MAC := TRUE}
  125. {$setc TARGET_OS_IPHONE := FALSE}
  126. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  127. {$endc}
  128. {$setc TARGET_OS_EMBEDDED := FALSE}
  129. {$elifc defined __arm__ and __arm__}
  130. {$setc TARGET_CPU_PPC := FALSE}
  131. {$setc TARGET_CPU_PPC64 := FALSE}
  132. {$setc TARGET_CPU_X86 := FALSE}
  133. {$setc TARGET_CPU_X86_64 := FALSE}
  134. {$setc TARGET_CPU_ARM := TRUE}
  135. {$setc TARGET_CPU_ARM64 := FALSE}
  136. {$setc TARGET_OS_MAC := FALSE}
  137. {$setc TARGET_OS_IPHONE := TRUE}
  138. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  139. {$setc TARGET_OS_EMBEDDED := TRUE}
  140. {$elifc defined __arm64__ and __arm64__}
  141. {$setc TARGET_CPU_PPC := FALSE}
  142. {$setc TARGET_CPU_PPC64 := FALSE}
  143. {$setc TARGET_CPU_X86 := FALSE}
  144. {$setc TARGET_CPU_X86_64 := FALSE}
  145. {$setc TARGET_CPU_ARM := FALSE}
  146. {$setc TARGET_CPU_ARM64 := TRUE}
  147. {$ifc defined ios}
  148. {$setc TARGET_OS_MAC := FALSE}
  149. {$setc TARGET_OS_IPHONE := TRUE}
  150. {$setc TARGET_OS_EMBEDDED := TRUE}
  151. {$elsec}
  152. {$setc TARGET_OS_MAC := TRUE}
  153. {$setc TARGET_OS_IPHONE := FALSE}
  154. {$setc TARGET_OS_EMBEDDED := FALSE}
  155. {$endc}
  156. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  157. {$elsec}
  158. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  159. {$endc}
  160. {$ifc defined __LP64__ and __LP64__ }
  161. {$setc TARGET_CPU_64 := TRUE}
  162. {$elsec}
  163. {$setc TARGET_CPU_64 := FALSE}
  164. {$endc}
  165. {$ifc defined FPC_BIG_ENDIAN}
  166. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  167. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  168. {$elifc defined FPC_LITTLE_ENDIAN}
  169. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  170. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  171. {$elsec}
  172. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  173. {$endc}
  174. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  175. {$setc CALL_NOT_IN_CARBON := FALSE}
  176. {$setc OLDROUTINENAMES := FALSE}
  177. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  178. {$setc OPAQUE_UPP_TYPES := TRUE}
  179. {$setc OTCARBONAPPLICATION := TRUE}
  180. {$setc OTKERNEL := FALSE}
  181. {$setc PM_USE_SESSION_APIS := TRUE}
  182. {$setc TARGET_API_MAC_CARBON := TRUE}
  183. {$setc TARGET_API_MAC_OS8 := FALSE}
  184. {$setc TARGET_API_MAC_OSX := TRUE}
  185. {$setc TARGET_CARBON := TRUE}
  186. {$setc TARGET_CPU_68K := FALSE}
  187. {$setc TARGET_CPU_MIPS := FALSE}
  188. {$setc TARGET_CPU_SPARC := FALSE}
  189. {$setc TARGET_OS_UNIX := FALSE}
  190. {$setc TARGET_OS_WIN32 := FALSE}
  191. {$setc TARGET_RT_MAC_68881 := FALSE}
  192. {$setc TARGET_RT_MAC_CFM := FALSE}
  193. {$setc TARGET_RT_MAC_MACHO := TRUE}
  194. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  195. {$setc TYPE_BOOL := FALSE}
  196. {$setc TYPE_EXTENDED := FALSE}
  197. {$setc TYPE_LONGLONG := TRUE}
  198. {$IFDEF FPC_DOTTEDUNITS}
  199. uses MacOsApi.MacTypes,MacOsApi.CFBase,MacOsApi.CFArray,MacOsApi.CFDictionary,MacOsApi.CGContext,MacOsApi.CGBase,MacOsApi.CGGeometry,MacOsApi.CGErrors,MacOsApi.CGImage;
  200. {$ELSE FPC_DOTTEDUNITS}
  201. uses MacTypes,CFBase,CFArray,CFDictionary,CGContext,CGBase,CGGeometry,CGErrors,CGImage;
  202. {$ENDIF FPC_DOTTEDUNITS}
  203. {$endc} {not MACOSALLINCLUDE}
  204. {$ALIGN POWER}
  205. type
  206. CGDirectDisplayID = UInt32;
  207. CGDirectDisplayIDPtr = ^CGDirectDisplayID; { when a var xx:CGDirectDisplayID parameter can be nil, it is changed to xx: CGDirectDisplayIDPtr }
  208. CGOpenGLDisplayMask = UInt32;
  209. CGRefreshRate = Float64;
  210. type
  211. CGDirectPaletteRef = ^OpaqueCGDirectPaletteRef; { an opaque type }
  212. OpaqueCGDirectPaletteRef = record end;
  213. CGDirectPaletteRefPtr = ^CGDirectPaletteRef; { when a var xx:CGDirectPaletteRef parameter can be nil, it is changed to xx: CGDirectPaletteRefPtr }
  214. type
  215. CGDisplayModeRef = ^OpaqueCGDisplayModeRef; { an opaque type }
  216. OpaqueCGDisplayModeRef = record end;
  217. CGDisplayModeRefPtr = ^CGDisplayModeRef;
  218. const
  219. kCGNullDirectDisplay = CGDirectDisplayID(0);
  220. {$ifc TARGET_OS_MAC}
  221. {GPC-FPC-ONLY-START}
  222. function kCGDirectMainDisplay: CGDirectDisplayID; external name '_CGMainDisplayID';
  223. {GPC-FPC-ONLY-END}
  224. { Return the display ID of the current main display. }
  225. function CGMainDisplayID: CGDirectDisplayID; external name '_CGMainDisplayID';
  226. (* CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_NA) *)
  227. { Mechanisms used to find screen IDs.
  228. The following functions take an array length (`maxDisplays') and array of
  229. pointers to CGDirectDisplayIDs (`displays'). The array is filled in with
  230. the displays meeting the specified criteria; no more than `maxDisplays'.
  231. will be stored in `displays'. The number of displays meeting the criteria
  232. is returned in `matchingDisplayCount'.
  233. If the `displays' array is NULL, only the number of displays meeting the
  234. specified criteria is returned in `matchingDisplayCount'. }
  235. function CGGetDisplaysWithPoint( point: CGPoint; maxDisplays: UInt32; displays: CGDirectDisplayIDPtr; var matchingDisplayCount: UInt32 ): CGError; external name '_CGGetDisplaysWithPoint';
  236. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  237. function CGGetDisplaysWithRect( rect: CGRect; maxDisplays: UInt32; displays: CGDirectDisplayIDPtr; var matchingDisplayCount: UInt32 ): CGError; external name '_CGGetDisplaysWithRect';
  238. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  239. function CGGetDisplaysWithOpenGLDisplayMask( mask: CGOpenGLDisplayMask; maxDisplays: UInt32; displays: CGDirectDisplayIDPtr; var matchingDisplayCount: UInt32 ): CGError; external name '_CGGetDisplaysWithOpenGLDisplayMask';
  240. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  241. { Return a list of active displays.
  242. If `activeDisplays' is NULL, then `maxDisplays' is ignored, and
  243. `displayCount' is set to the number of displays. Otherwise, the list of
  244. active displays is stored in `activeDisplays'; no more than `maxDisplays'
  245. will be stored in `activeDisplays'.
  246. The first display returned in the list is the main display (the one with
  247. the menu bar). When mirroring, this will be the largest drawable display
  248. in the mirror set, or, if all displays are the same size, the one with
  249. the deepest pixel depth. }
  250. function CGGetActiveDisplayList( maxDisplays: UInt32; activeDisplays: CGDirectDisplayIDPtr; var displayCount: UInt32 ): CGError; external name '_CGGetActiveDisplayList';
  251. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  252. { Return a list of online displays.
  253. If `onlineDisplays' is NULL, then `maxDisplays' is ignored, and
  254. `displayCount' is set to the number of displays. Otherwise, the list of
  255. online displays is stored in `onlineDisplays'; no more than `maxDisplays'
  256. will be stored in `onlineDisplays'.
  257. With hardware mirroring, a display may be online but not necessarily
  258. active or drawable. Programs which manipulate display settings such as
  259. the palette or gamma tables need access to all displays in use, including
  260. hardware mirrors which are not drawable. }
  261. function CGGetOnlineDisplayList( maxDisplays: UInt32; onlineDisplays: CGDirectDisplayIDPtr; var displayCount: UInt32 ): CGError; external name '_CGGetOnlineDisplayList';
  262. (* CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_NA) *)
  263. { Return the OpenGL display mask for `display', or 0 if `display' is an
  264. invalid display. }
  265. function CGDisplayIDToOpenGLDisplayMask( display: CGDirectDisplayID ): CGOpenGLDisplayMask; external name '_CGDisplayIDToOpenGLDisplayMask';
  266. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  267. { Return the display for the OpenGL display mask `mask', or
  268. `kCGNullDirectDisplay' if the bits set dont't match a display. A mask
  269. with multiple bits set returns an arbitrary match. }
  270. function CGOpenGLDisplayMaskToDisplayID( mask: CGOpenGLDisplayMask ): CGDirectDisplayID; external name '_CGOpenGLDisplayMaskToDisplayID';
  271. (* CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_NA) *)
  272. { Return the screen size and screen origin of `display' in global
  273. coordinates, or `CGRectZero' if `display' is invalid. }
  274. function CGDisplayBounds( display: CGDirectDisplayID ): CGRect; external name '_CGDisplayBounds';
  275. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  276. { Return the width in pixels of `display'. }
  277. function CGDisplayPixelsWide( display: CGDirectDisplayID ): size_t; external name '_CGDisplayPixelsWide';
  278. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  279. { Return the height in pixels of `display'. }
  280. function CGDisplayPixelsHigh( display: CGDirectDisplayID ): size_t; external name '_CGDisplayPixelsHigh';
  281. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  282. { Return an array of all modes for the specified display, or NULL if
  283. `display' is invalid. The "options" field is reserved for future
  284. expansion; pass NULL for now. }
  285. function CGDisplayCopyAllDisplayModes( display: CGDirectDisplayID; options: CFDictionaryRef ): CFArrayRef; external name '_CGDisplayCopyAllDisplayModes';
  286. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  287. var kCGDisplayShowDuplicateLowResolutionModes: CFStringRef; external name '_kCGDisplayShowDuplicateLowResolutionModes'; (* attribute const *)
  288. (* CG_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA) *)
  289. { Return the current mode of the specified display, or NULL if `display'
  290. is invalid. }
  291. function CGDisplayCopyDisplayMode( display: CGDirectDisplayID ): CGDisplayModeRef; external name '_CGDisplayCopyDisplayMode';
  292. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  293. { Switch the display mode of `display' to `mode'. The "options" field is
  294. reserved for future expansion; pass NULL for now.
  295. The selected display mode persists for the life of the program, and
  296. automatically reverts to the permanent setting when the program
  297. terminates.
  298. When changing display modes of displays in a mirroring set, other
  299. displays in the mirroring set will be set to a display mode capable of
  300. mirroring the bounds of the largest display being explicitly set.
  301. Note that after switching, display parameters and addresses may change. }
  302. function CGDisplaySetDisplayMode( display: CGDirectDisplayID; mode: CGDisplayModeRef; options: CFDictionaryRef ): CGError; external name '_CGDisplaySetDisplayMode';
  303. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  304. { Return the width in points of the specified display mode. }
  305. function CGDisplayModeGetWidth( mode: CGDisplayModeRef ): size_t; external name '_CGDisplayModeGetWidth';
  306. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  307. { Return the height in points of the specified display mode. }
  308. function CGDisplayModeGetHeight( mode: CGDisplayModeRef ): size_t; external name '_CGDisplayModeGetHeight';
  309. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  310. { Return a string representing the pixel encoding of the specified display
  311. mode, expressed as a CFString containing an IOKit graphics mode. }
  312. function CGDisplayModeCopyPixelEncoding( mode: CGDisplayModeRef ): CFStringRef; external name '_CGDisplayModeCopyPixelEncoding';
  313. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  314. { Return the refresh rate of the specified display mode. }
  315. function CGDisplayModeGetRefreshRate( mode: CGDisplayModeRef ): Float64; external name '_CGDisplayModeGetRefreshRate';
  316. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  317. { Return the IOKit flags of the specified display mode. }
  318. function CGDisplayModeGetIOFlags( mode: CGDisplayModeRef ): UInt32; external name '_CGDisplayModeGetIOFlags';
  319. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  320. { Return the IOKit display mode ID of the specified display mode. }
  321. function CGDisplayModeGetIODisplayModeID( mode: CGDisplayModeRef ): SInt32; external name '_CGDisplayModeGetIODisplayModeID';
  322. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  323. { Return true if the specified mode is usable for displaying the
  324. desktop GUI; false otherwise. }
  325. function CGDisplayModeIsUsableForDesktopGUI( mode: CGDisplayModeRef ): CBool; external name '_CGDisplayModeIsUsableForDesktopGUI';
  326. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  327. { Return the CFTypeID for CGDisplayModeRefs. }
  328. function CGDisplayModeGetTypeID: CFTypeID; external name '_CGDisplayModeGetTypeID';
  329. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  330. { Equivalent to `CFRetain(mode)', except it doesn't crash (as CFRetain
  331. does) if `mode' is NULL. }
  332. function CGDisplayModeRetain( mode: CGDisplayModeRef ): CGDisplayModeRef; external name '_CGDisplayModeRetain';
  333. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  334. { Equivalent to `CFRelease(mode)', except it doesn't crash (as CFRelease
  335. does) if `mode' is NULL. }
  336. procedure CGDisplayModeRelease( mode: CGDisplayModeRef ); external name '_CGDisplayModeRelease';
  337. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  338. { Return the width in pixels of the specified display mode. }
  339. function CGDisplayModeGetPixelWidth( mode: CGDisplayModeRef ): size_t; external name '_CGDisplayModeGetPixelWidth';
  340. (* CG_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA) *)
  341. { Return the height in pixels of the specified display mode. }
  342. function CGDisplayModeGetPixelHeight( mode: CGDisplayModeRef ): size_t; external name '_CGDisplayModeGetPixelHeight';
  343. (* CG_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA) *)
  344. { Set the gamma function for `display' by specifying the coefficients of
  345. the gamma transfer function.
  346. Gamma values must be greater than 0. Minimum values must be in the
  347. interval [0, 1). Maximum values must be in the interval (0, 1]. Out of
  348. range values or maximum values greater than or equal to minimum values
  349. return `kCGErrorRangeCheck'.
  350. Values are computed by sampling a function for a range of indexes from 0
  351. to 1:
  352. value = Min + ((Max - Min) * pow(index, Gamma))
  353. The resulting values are converted to a machine-specific format and
  354. loaded into display hardware. }
  355. type
  356. CGGammaValue = Float32;
  357. CGGammaValuePtr = ^CGGammaValue;
  358. function CGSetDisplayTransferByFormula( display: CGDirectDisplayID; redMin: CGGammaValue; redMax: CGGammaValue; redGamma: CGGammaValue; greenMin: CGGammaValue; greenMax: CGGammaValue; greenGamma: CGGammaValue; blueMin: CGGammaValue; blueMax: CGGammaValue; blueGamma: CGGammaValue ): CGError; external name '_CGSetDisplayTransferByFormula';
  359. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  360. { Return the coefficients of the gamma transfer function for `display'. }
  361. function CGGetDisplayTransferByFormula( display: CGDirectDisplayID; var redMin: CGGammaValue; var redMax: CGGammaValue; var redGamma: CGGammaValue; var greenMin: CGGammaValue; var greenMax: CGGammaValue; var greenGamma: CGGammaValue; var blueMin: CGGammaValue; var blueMax: CGGammaValue; var blueGamma: CGGammaValue ): CGError; external name '_CGGetDisplayTransferByFormula';
  362. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  363. { Return the capacity, or number of entries, in the gamma table for
  364. `display', or 0 if 'display' is invalid. }
  365. function CGDisplayGammaTableCapacity( display: CGDirectDisplayID ): UInt32; external name '_CGDisplayGammaTableCapacity';
  366. (* CG_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_NA) *)
  367. { Set the gamma function for `display' by specifying the values in the RGB
  368. gamma tables.
  369. Values within each table should be in the interval [0, 1] The same table
  370. may be passed in for red, green, and blue channels. The number of entries
  371. in the tables is specified by `tableSize'. The tables are interpolated as
  372. needed to generate the number of samples needed by the display hardware. }
  373. function CGSetDisplayTransferByTable( display: CGDirectDisplayID; tableSize: UInt32; {const var} redTable: CGGammaValuePtr; {const var} greenTable: CGGammaValuePtr; {const var} blueTable: CGGammaValuePtr ): CGError; external name '_CGSetDisplayTransferByTable';
  374. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  375. { Return the RGB gamma table values for `display'.
  376. The number of entries in each array is specified by `capacity'; no more
  377. than `capacity' entries will be written to each table. The number of
  378. entries written is stored in `sampleCount'. }
  379. function CGGetDisplayTransferByTable( display: CGDirectDisplayID; capacity: UInt32; redTable: CGGammaValuePtr; greenTable: CGGammaValuePtr; blueTable: CGGammaValuePtr; var sampleCount: UInt32 ): CGError; external name '_CGGetDisplayTransferByTable';
  380. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  381. { Set the gamma function for `display' by specifying the values in the RGB
  382. gamma tables as bytes.
  383. Values within each table should be in the interval [0, 255] The same
  384. table may be passed in for red, green, and blue channels. The number of
  385. entries in the tables is specified by `tableSize'. The tables are
  386. interpolated as needed to generate the number of samples needed by the
  387. display hardware. }
  388. function CGSetDisplayTransferByByteTable( display: CGDirectDisplayID; tableSize: UInt32; redTable: {const} UInt8Ptr; greenTable: {const} UInt8Ptr; blueTable: {const} UInt8Ptr ): CGError; external name '_CGSetDisplayTransferByByteTable';
  389. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  390. { Restore the gamma tables of all system displays to the values in the
  391. user's ColorSync display profile. }
  392. procedure CGDisplayRestoreColorSyncSettings; external name '_CGDisplayRestoreColorSyncSettings';
  393. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  394. { Options used with `CGDisplayCaptureWithOptions' and
  395. `CGCaptureAllDisplaysWithOptions'. }
  396. const
  397. kCGCaptureNoOptions = 0; { Default behavior. }
  398. kCGCaptureNoFill = 1 shl 0; { Disables fill with black on capture. }
  399. type
  400. CGCaptureOptions = UInt32;
  401. { Return true if `display' is captured; false otherwise. }
  402. function CGDisplayIsCaptured( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsCaptured';
  403. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_9, __IPHONE_NA, __IPHONE_NA) *)
  404. { Capture `display' for exclusive use by an application. }
  405. function CGDisplayCapture( display: CGDirectDisplayID ): CGError; external name '_CGDisplayCapture';
  406. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  407. { Capture `display' for exclusive use by an application, using the options
  408. specified by `options'. }
  409. function CGDisplayCaptureWithOptions( display: CGDirectDisplayID; options: CGCaptureOptions ): CGError; external name '_CGDisplayCaptureWithOptions';
  410. (* CG_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_NA) *)
  411. { Release the captured display `display'. }
  412. function CGDisplayRelease( display: CGDirectDisplayID ): CGError; external name '_CGDisplayRelease';
  413. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  414. { Capture all displays. This operation provides an immersive environment
  415. for an appplication, and prevents other applications from trying to
  416. adjust to display changes. }
  417. function CGCaptureAllDisplays: CGError; external name '_CGCaptureAllDisplays';
  418. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  419. { Capture all displays, using the options specified by `options'. This
  420. operation provides an immersive environment for an appplication, and
  421. prevents other applications from trying to adjust to display changes. }
  422. function CGCaptureAllDisplaysWithOptions( options: CGCaptureOptions ): CGError; external name '_CGCaptureAllDisplaysWithOptions';
  423. (* CG_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_NA) *)
  424. { Release all captured displays and restore the display modes to the user's
  425. preferences. May be used in conjunction with `CGDisplayCapture' or
  426. `CGCaptureAllDisplays'. }
  427. function CGReleaseAllDisplays: CGError; external name '_CGReleaseAllDisplays';
  428. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  429. { Returns window ID of the shield window for the captured display `display',
  430. or NULL if the display is not not shielded. }
  431. function CGShieldingWindowID( display: CGDirectDisplayID ): UInt32; external name '_CGShieldingWindowID';
  432. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  433. { Returns the window level of the shield window for the captured display
  434. `display'. }
  435. function CGShieldingWindowLevel: SInt32; external name '_CGShieldingWindowLevel';
  436. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  437. { Return an image containing the contents of the display identified by
  438. `displayID'. }
  439. function CGDisplayCreateImage( displayID: CGDirectDisplayID ): CGImageRef; external name '_CGDisplayCreateImage';
  440. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  441. { Return an image containing the contents of the rectangle `rect',
  442. specified in display space, of the display identified by `displayID'. The
  443. actual rectangle used is the rectangle returned from
  444. `CGRectIntegral(rect)'. }
  445. function CGDisplayCreateImageForRect( display: CGDirectDisplayID; rect: CGRect ): CGImageRef; external name '_CGDisplayCreateImageForRect';
  446. (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
  447. { Hide the mouse cursor and increment the hide cursor count. The `display'
  448. parameter is ignored. }
  449. function CGDisplayHideCursor( display: CGDirectDisplayID ): CGError; external name '_CGDisplayHideCursor';
  450. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  451. { Decrement the hide cursor count; show the cursor if the hide cursor count
  452. is zero. The `display' parameter is ignored. }
  453. function CGDisplayShowCursor( display: CGDirectDisplayID ): CGError; external name '_CGDisplayShowCursor';
  454. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  455. { Move the mouse cursor to the specified point relative to the origin (the
  456. upper-left corner) of `display'. No events are generated as a result of
  457. the move. Points that lie outside the desktop are clipped to the
  458. desktop. }
  459. function CGDisplayMoveCursorToPoint( display: CGDirectDisplayID; point: CGPoint ): CGError; external name '_CGDisplayMoveCursorToPoint';
  460. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  461. { Return the mouse position change since with the last mouse move event
  462. received by the application. }
  463. procedure CGGetLastMouseDelta( var deltaX: SInt32; var deltaY: SInt32 ); external name '_CGGetLastMouseDelta';
  464. (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
  465. { Return a CGContext suitable for drawing to the captured display
  466. `display', or NULL if `display' has not been captured. The context is
  467. owned by the device and should not be released by the caller.
  468. The context remains valid while the display is captured and while the
  469. display configuration is unchanged. Releasing the captured display or
  470. reconfiguring the display invalidates the drawing context.
  471. The determine when the display configuration is changing, use
  472. `CGDisplayRegisterReconfigurationCallback'. }
  473. function CGDisplayGetDrawingContext( display: CGDirectDisplayID ): CGContextRef; external name '_CGDisplayGetDrawingContext';
  474. (* CG_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_NA) *)
  475. {
  476. Keys used in mode dictionaries. Source C strings shown won't change.
  477. Some CFM environments cannot import data variables, and so
  478. the definitions are provided directly.
  479. These keys are used only within the scope of the mode dictionaries,
  480. so further uniquing, as by prefix, of the source string is not needed.
  481. }
  482. { These are deprecated; don't use them. }
  483. {$ifc USE_CFSTR_CONSTANT_MACROS}
  484. {$definec kCGDisplayWidth CFSTRP('Width')}
  485. {$endc}
  486. {$ifc USE_CFSTR_CONSTANT_MACROS}
  487. {$definec kCGDisplayHeight CFSTRP('Height')}
  488. {$endc}
  489. {$ifc USE_CFSTR_CONSTANT_MACROS}
  490. {$definec kCGDisplayMode CFSTRP('Mode')}
  491. {$endc}
  492. {$ifc USE_CFSTR_CONSTANT_MACROS}
  493. {$definec kCGDisplayBitsPerPixel CFSTRP('BitsPerPixel')}
  494. {$endc}
  495. {$ifc USE_CFSTR_CONSTANT_MACROS}
  496. {$definec kCGDisplayBitsPerSample CFSTRP('BitsPerSample')}
  497. {$endc}
  498. {$ifc USE_CFSTR_CONSTANT_MACROS}
  499. {$definec kCGDisplaySamplesPerPixel CFSTRP('SamplesPerPixel')}
  500. {$endc}
  501. {$ifc USE_CFSTR_CONSTANT_MACROS}
  502. {$definec kCGDisplayRefreshRate CFSTRP('RefreshRate')}
  503. {$endc}
  504. {$ifc USE_CFSTR_CONSTANT_MACROS}
  505. {$definec kCGDisplayModeUsableForDesktopGUI CFSTRP('UsableForDesktopGUI')}
  506. {$endc}
  507. {$ifc USE_CFSTR_CONSTANT_MACROS}
  508. {$definec kCGDisplayIOFlags CFSTRP('IOFlags')}
  509. {$endc}
  510. {$ifc USE_CFSTR_CONSTANT_MACROS}
  511. {$definec kCGDisplayBytesPerRow CFSTRP('kCGDisplayBytesPerRow')}
  512. {$endc}
  513. {$ifc USE_CFSTR_CONSTANT_MACROS}
  514. {$definec kCGIODisplayModeID CFSTRP('IODisplayModeID')}
  515. {$endc}
  516. {
  517. * Keys to describe optional properties of display modes.
  518. *
  519. * The key will only be present if the property applies,
  520. * and will be associated with a value of kCFBooleanTrue.
  521. * Keys not relevant to a particular display mode will not
  522. * appear in the mode dictionary.
  523. *
  524. * These strings must remain unchanged in future releases, of course.
  525. }
  526. { These are deprecated; don't use them. }
  527. { Set if display mode doesn't need a confirmation dialog to be set }
  528. {$ifc USE_CFSTR_CONSTANT_MACROS}
  529. {$definec kCGDisplayModeIsSafeForHardware CFSTRP('kCGDisplayModeIsSafeForHardware')}
  530. {$endc}
  531. { The following keys reflect interesting bits of the IOKit display mode flags }
  532. {$ifc USE_CFSTR_CONSTANT_MACROS}
  533. {$definec kCGDisplayModeIsInterlaced CFSTRP('kCGDisplayModeIsInterlaced')}
  534. {$endc}
  535. {$ifc USE_CFSTR_CONSTANT_MACROS}
  536. {$definec kCGDisplayModeIsStretched CFSTRP('kCGDisplayModeIsStretched')}
  537. {$endc}
  538. {$ifc USE_CFSTR_CONSTANT_MACROS}
  539. {$definec kCGDisplayModeIsTelevisionOutput CFSTRP('kCGDisplayModeIsTelevisionOutput')}
  540. {$endc}
  541. { These types are deprecated; don't use them. }
  542. type
  543. CGDisplayCount = UInt32;
  544. CGDisplayErr = CGError;
  545. CGBeamPosition = UInt32;
  546. CGByteValue = UInt8;
  547. CGDisplayCoord = SInt32;
  548. type
  549. CGMouseDelta = SInt32;
  550. CGTableCount = UInt32;
  551. const
  552. CGDisplayNoErr=kCGErrorSuccess;
  553. { These functions are deprecated; do not use them. }
  554. { Move the mouse cursor to the specified point relative to the origin (the
  555. upper-left corner) of `display'. No events are generated as a result of
  556. the move. Points that lie outside the desktop are clipped to the
  557. desktop. }
  558. { Use `CGDisplayCreateImage' instead. }
  559. function CGDisplayBaseAddress( display: CGDirectDisplayID ): UnivPtr; external name '_CGDisplayBaseAddress';
  560. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6,__IPHONE_NA, __IPHONE_NA) *)
  561. {
  562. * return address for X,Y in global coordinates;
  563. * (0,0) represents the upper left corner of the main display.
  564. * returns NULL for an invalid display or out of bounds coordinates
  565. * If the display has not been captured, the returned address may refer
  566. * to read-only memory.
  567. }
  568. { Use `CGDisplayCreateImageForRect' instead. }
  569. function CGDisplayAddressForPosition( display: CGDirectDisplayID; x: CGDisplayCoord; y: CGDisplayCoord ): UnivPtr; external name '_CGDisplayAddressForPosition';
  570. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  571. {
  572. * Display mode selection
  573. * Display modes are represented as CFDictionaries
  574. * All dictionaries and arrays returned via these mechanisms are
  575. * owned by the framework and should not be released. The framework
  576. * will not release them out from under your application.
  577. *
  578. * Values associated with the following keys are CFNumber types.
  579. * With CFNumberGetValue(), use kCFNumberLongType for best results.
  580. * kCGDisplayRefreshRate encodes a double value, so to get the fractional
  581. * refresh rate use kCFNumberDoubleType.
  582. }
  583. { Use `CGDisplayCreateImage' or `CGDisplayCreateImageForRect' instead. }
  584. function CGDisplayBytesPerRow( display: CGDirectDisplayID ): size_t; external name '_CGDisplayBytesPerRow';
  585. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  586. {
  587. * Return a CFArray of CFDictionaries describing all display modes.
  588. * Returns NULL if the display is invalid.
  589. }
  590. { Use the CGDisplayMode APIs instead. }
  591. function CGDisplayAvailableModes( display: CGDirectDisplayID ): CFArrayRef; external name '_CGDisplayAvailableModes';
  592. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  593. { Use the CGDisplayMode APIs instead. }
  594. function CGDisplayBestModeForParameters( display: CGDirectDisplayID; bitsPerPixel: size_t; width: size_t; height: size_t; var exactMatch: boolean_t ): CFDictionaryRef; external name '_CGDisplayBestModeForParameters';
  595. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  596. { Use the CGDisplayMode APIs instead. }
  597. function CGDisplayBestModeForParametersAndRefreshRate( display: CGDirectDisplayID; bitsPerPixel: size_t; width: size_t; height: size_t; refreshRate: CGRefreshRate; var exactMatch: boolean_t ): CFDictionaryRef; external name '_CGDisplayBestModeForParametersAndRefreshRate';
  598. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  599. { Use the CGDisplayMode APIs instead. }
  600. function CGDisplayBestModeForParametersAndRefreshRateWithProperty( display: CGDirectDisplayID; bitsPerPixel: size_t; width: size_t; height: size_t; refreshRate: CGRefreshRate; property: CFStringRef; var exactMatch: boolean_t ): CFDictionaryRef; external name '_CGDisplayBestModeForParametersAndRefreshRateWithProperty';
  601. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  602. {
  603. * Return a CFDictionary describing the current display mode.
  604. * Returns NULL if display is invalid.
  605. }
  606. { Use the CGDisplayMode APIs instead. }
  607. function CGDisplayCurrentMode( display: CGDirectDisplayID ): CFDictionaryRef; external name '_CGDisplayCurrentMode';
  608. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  609. {
  610. * Switch display mode. Note that after switching,
  611. * display parameters and addresses may change.
  612. * The selected display mode persists for the life of the program, and automatically
  613. * reverts to the permanent setting made by Preferences when the program terminates.
  614. * The mode dictionary passed in must be a dictionary vended by other CGDirectDisplay
  615. * APIs such as CGDisplayBestModeForParameters() and CGDisplayAvailableModes().
  616. *
  617. * The mode dictionary passed in must be a dictionary vended by other CGDirectDisplay
  618. * APIs such as CGDisplayBestModeForParameters() and CGDisplayAvailableModes().
  619. *
  620. * When changing display modes of displays in a mirroring set, other displays in
  621. * the mirroring set will be set to a display mode capable of mirroring the bounds
  622. * of the largest display being explicitly set.
  623. }
  624. { Use the CGDisplayMode APIs instead. }
  625. function CGDisplaySwitchToMode( display: CGDirectDisplayID; mode: CFDictionaryRef ): CGError; external name '_CGDisplaySwitchToMode';
  626. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  627. { Query parameters for current mode }
  628. { Use the CGDisplayMode APIs instead. }
  629. function CGDisplayBitsPerPixel( display: CGDirectDisplayID ): size_t; external name '_CGDisplayBitsPerPixel';
  630. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  631. { Use the CGDisplayMode APIs instead. }
  632. function CGDisplayBitsPerSample( display: CGDirectDisplayID ): size_t; external name '_CGDisplayBitsPerSample';
  633. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  634. { Use the CGDisplayMode APIs instead. }
  635. function CGDisplaySamplesPerPixel( display: CGDirectDisplayID ): size_t; external name '_CGDisplaySamplesPerPixel';
  636. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
  637. function CGDisplayCanSetPalette( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayCanSetPalette';
  638. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
  639. function CGDisplaySetPalette( display: CGDirectDisplayID; palette: CGDirectPaletteRef ): CGError; external name '_CGDisplaySetPalette';
  640. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
  641. function CGDisplayWaitForBeamPositionOutsideLines( display: CGDirectDisplayID; upperScanLine: UInt32; lowerScanLine: UInt32 ): CGError; external name '_CGDisplayWaitForBeamPositionOutsideLines';
  642. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
  643. function CGDisplayBeamPosition( display: CGDirectDisplayID ): UInt32; external name '_CGDisplayBeamPosition';
  644. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
  645. {$endc}
  646. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  647. end.
  648. {$endc} {not MACOSALLINCLUDE}