CGWindow.pas 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. { CoreGraphics - CGWindow.h
  2. Copyright (c) 2006-2008 Apple Inc.
  3. All rights reserved. }
  4. { Pascal Translation: Jonas Maebe, <[email protected]>, October 2009 }
  5. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  6. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, August 2015 }
  7. {
  8. Modified for use with Free Pascal
  9. Version 308
  10. Please report any bugs to <[email protected]>
  11. }
  12. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  13. {$mode macpas}
  14. {$modeswitch cblocks}
  15. {$packenum 1}
  16. {$macro on}
  17. {$inline on}
  18. {$calling mwpascal}
  19. unit CGWindow;
  20. interface
  21. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  22. {$setc GAP_INTERFACES_VERSION := $0308}
  23. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  24. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  25. {$endc}
  26. {$ifc defined CPUPOWERPC and defined CPUI386}
  27. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  28. {$endc}
  29. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  30. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  31. {$endc}
  32. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  33. {$setc __ppc__ := 1}
  34. {$elsec}
  35. {$setc __ppc__ := 0}
  36. {$endc}
  37. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  38. {$setc __ppc64__ := 1}
  39. {$elsec}
  40. {$setc __ppc64__ := 0}
  41. {$endc}
  42. {$ifc not defined __i386__ and defined CPUI386}
  43. {$setc __i386__ := 1}
  44. {$elsec}
  45. {$setc __i386__ := 0}
  46. {$endc}
  47. {$ifc not defined __x86_64__ and defined CPUX86_64}
  48. {$setc __x86_64__ := 1}
  49. {$elsec}
  50. {$setc __x86_64__ := 0}
  51. {$endc}
  52. {$ifc not defined __arm__ and defined CPUARM}
  53. {$setc __arm__ := 1}
  54. {$elsec}
  55. {$setc __arm__ := 0}
  56. {$endc}
  57. {$ifc not defined __arm64__ and defined CPUAARCH64}
  58. {$setc __arm64__ := 1}
  59. {$elsec}
  60. {$setc __arm64__ := 0}
  61. {$endc}
  62. {$ifc defined cpu64}
  63. {$setc __LP64__ := 1}
  64. {$elsec}
  65. {$setc __LP64__ := 0}
  66. {$endc}
  67. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  68. {$error Conflicting definitions for __ppc__ and __i386__}
  69. {$endc}
  70. {$ifc defined __ppc__ and __ppc__}
  71. {$setc TARGET_CPU_PPC := TRUE}
  72. {$setc TARGET_CPU_PPC64 := FALSE}
  73. {$setc TARGET_CPU_X86 := FALSE}
  74. {$setc TARGET_CPU_X86_64 := FALSE}
  75. {$setc TARGET_CPU_ARM := FALSE}
  76. {$setc TARGET_CPU_ARM64 := FALSE}
  77. {$setc TARGET_OS_MAC := TRUE}
  78. {$setc TARGET_OS_IPHONE := FALSE}
  79. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  80. {$setc TARGET_OS_EMBEDDED := FALSE}
  81. {$elifc defined __ppc64__ and __ppc64__}
  82. {$setc TARGET_CPU_PPC := FALSE}
  83. {$setc TARGET_CPU_PPC64 := TRUE}
  84. {$setc TARGET_CPU_X86 := FALSE}
  85. {$setc TARGET_CPU_X86_64 := FALSE}
  86. {$setc TARGET_CPU_ARM := FALSE}
  87. {$setc TARGET_CPU_ARM64 := FALSE}
  88. {$setc TARGET_OS_MAC := TRUE}
  89. {$setc TARGET_OS_IPHONE := FALSE}
  90. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  91. {$setc TARGET_OS_EMBEDDED := FALSE}
  92. {$elifc defined __i386__ and __i386__}
  93. {$setc TARGET_CPU_PPC := FALSE}
  94. {$setc TARGET_CPU_PPC64 := FALSE}
  95. {$setc TARGET_CPU_X86 := TRUE}
  96. {$setc TARGET_CPU_X86_64 := FALSE}
  97. {$setc TARGET_CPU_ARM := FALSE}
  98. {$setc TARGET_CPU_ARM64 := FALSE}
  99. {$ifc defined iphonesim}
  100. {$setc TARGET_OS_MAC := FALSE}
  101. {$setc TARGET_OS_IPHONE := TRUE}
  102. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  103. {$elsec}
  104. {$setc TARGET_OS_MAC := TRUE}
  105. {$setc TARGET_OS_IPHONE := FALSE}
  106. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  107. {$endc}
  108. {$setc TARGET_OS_EMBEDDED := FALSE}
  109. {$elifc defined __x86_64__ and __x86_64__}
  110. {$setc TARGET_CPU_PPC := FALSE}
  111. {$setc TARGET_CPU_PPC64 := FALSE}
  112. {$setc TARGET_CPU_X86 := FALSE}
  113. {$setc TARGET_CPU_X86_64 := TRUE}
  114. {$setc TARGET_CPU_ARM := FALSE}
  115. {$setc TARGET_CPU_ARM64 := FALSE}
  116. {$ifc defined iphonesim}
  117. {$setc TARGET_OS_MAC := FALSE}
  118. {$setc TARGET_OS_IPHONE := TRUE}
  119. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  120. {$elsec}
  121. {$setc TARGET_OS_MAC := TRUE}
  122. {$setc TARGET_OS_IPHONE := FALSE}
  123. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  124. {$endc}
  125. {$setc TARGET_OS_EMBEDDED := FALSE}
  126. {$elifc defined __arm__ and __arm__}
  127. {$setc TARGET_CPU_PPC := FALSE}
  128. {$setc TARGET_CPU_PPC64 := FALSE}
  129. {$setc TARGET_CPU_X86 := FALSE}
  130. {$setc TARGET_CPU_X86_64 := FALSE}
  131. {$setc TARGET_CPU_ARM := TRUE}
  132. {$setc TARGET_CPU_ARM64 := FALSE}
  133. {$setc TARGET_OS_MAC := FALSE}
  134. {$setc TARGET_OS_IPHONE := TRUE}
  135. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  136. {$setc TARGET_OS_EMBEDDED := TRUE}
  137. {$elifc defined __arm64__ and __arm64__}
  138. {$setc TARGET_CPU_PPC := FALSE}
  139. {$setc TARGET_CPU_PPC64 := FALSE}
  140. {$setc TARGET_CPU_X86 := FALSE}
  141. {$setc TARGET_CPU_X86_64 := FALSE}
  142. {$setc TARGET_CPU_ARM := FALSE}
  143. {$setc TARGET_CPU_ARM64 := TRUE}
  144. {$ifc defined ios}
  145. {$setc TARGET_OS_MAC := FALSE}
  146. {$setc TARGET_OS_IPHONE := TRUE}
  147. {$setc TARGET_OS_EMBEDDED := TRUE}
  148. {$elsec}
  149. {$setc TARGET_OS_MAC := TRUE}
  150. {$setc TARGET_OS_IPHONE := FALSE}
  151. {$setc TARGET_OS_EMBEDDED := FALSE}
  152. {$endc}
  153. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  154. {$elsec}
  155. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  156. {$endc}
  157. {$ifc defined __LP64__ and __LP64__ }
  158. {$setc TARGET_CPU_64 := TRUE}
  159. {$elsec}
  160. {$setc TARGET_CPU_64 := FALSE}
  161. {$endc}
  162. {$ifc defined FPC_BIG_ENDIAN}
  163. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  164. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  165. {$elifc defined FPC_LITTLE_ENDIAN}
  166. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  167. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  168. {$elsec}
  169. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  170. {$endc}
  171. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  172. {$setc CALL_NOT_IN_CARBON := FALSE}
  173. {$setc OLDROUTINENAMES := FALSE}
  174. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  175. {$setc OPAQUE_UPP_TYPES := TRUE}
  176. {$setc OTCARBONAPPLICATION := TRUE}
  177. {$setc OTKERNEL := FALSE}
  178. {$setc PM_USE_SESSION_APIS := TRUE}
  179. {$setc TARGET_API_MAC_CARBON := TRUE}
  180. {$setc TARGET_API_MAC_OS8 := FALSE}
  181. {$setc TARGET_API_MAC_OSX := TRUE}
  182. {$setc TARGET_CARBON := TRUE}
  183. {$setc TARGET_CPU_68K := FALSE}
  184. {$setc TARGET_CPU_MIPS := FALSE}
  185. {$setc TARGET_CPU_SPARC := FALSE}
  186. {$setc TARGET_OS_UNIX := FALSE}
  187. {$setc TARGET_OS_WIN32 := FALSE}
  188. {$setc TARGET_RT_MAC_68881 := FALSE}
  189. {$setc TARGET_RT_MAC_CFM := FALSE}
  190. {$setc TARGET_RT_MAC_MACHO := TRUE}
  191. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  192. {$setc TYPE_BOOL := FALSE}
  193. {$setc TYPE_EXTENDED := FALSE}
  194. {$setc TYPE_LONGLONG := TRUE}
  195. uses MacTypes,CGBase,CGGeometry,CGImage,CFBase,CFDictionary,CFArray,CFNumber;
  196. {$endc} {not MACOSALLINCLUDE}
  197. {$ALIGN POWER}
  198. { The CGWindowID contains a unique value within the user session
  199. representing a window }
  200. type
  201. CGWindowID = UInt32;
  202. { Options for use with these APIs. }
  203. type
  204. CGWindowListOption = UInt32;
  205. CGWindowImageOption = UInt32;
  206. { Values used for `CGWindowSharingType'. }
  207. const
  208. kCGWindowSharingNone = 0;
  209. kCGWindowSharingReadOnly = 1;
  210. kCGWindowSharingReadWrite = 2;
  211. type
  212. CGWindowSharingType = UInt32;
  213. { Values used for `CGWindowBackingType'. }
  214. const
  215. kCGBackingStoreRetained = 0;
  216. kCGBackingStoreNonretained = 1;
  217. kCGBackingStoreBuffered = 2;
  218. type
  219. CGWindowBackingType = UInt32;
  220. { A value which is never the window ID of any window. }
  221. const
  222. kCGNullWindowID = CGWindowID(0);
  223. {$ifc TARGET_OS_MAC}
  224. { Keys for window dictionaries. }
  225. { The window ID, a unique value within the user session representing the
  226. window. The value of this key is a CFNumber 32-bit signed integer
  227. value. }
  228. var kCGWindowNumber: CFStringRef; external name '_kCGWindowNumber'; (* attribute const *)
  229. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  230. { The backing store type of the window, one of `kCGBackingStoreRetained',
  231. `kCGBackingStoreNonretained', or `kCGBackingStoreBuffered'. The value of
  232. this key is a CFNumber 32-bit signed integer value. }
  233. var kCGWindowStoreType: CFStringRef; external name '_kCGWindowStoreType'; (* attribute const *)
  234. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  235. { The window layer number of the window. The value of this key is a
  236. CFNumber 32-bit signed integer value. }
  237. var kCGWindowLayer: CFStringRef; external name '_kCGWindowLayer'; (* attribute const *)
  238. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  239. { The bounds of the window in screen space, with the origin at the
  240. upper-left corner of the main display. The value of this key is a
  241. CFDictionary; use `CGRectMakeWithDictionaryRepresentation' to obtain the
  242. bounds as a CGRect value. }
  243. var kCGWindowBounds: CFStringRef; external name '_kCGWindowBounds'; (* attribute const *)
  244. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  245. { The sharing state of the window, one of `kCGWindowSharingNone',
  246. `kCGWindowSharingReadOnly', or `kCGWindowSharingReadWrite'. The value of
  247. this key is a CFNumber 32-bit signed integer value. }
  248. var kCGWindowSharingState: CFStringRef; external name '_kCGWindowSharingState'; (* attribute const *)
  249. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  250. { The alpha fade of the window. The value of this key is a CFNumber
  251. floating-point value. The value 1.0 is normal (opaque); the value 0.0 is
  252. fully transparent (invisible). }
  253. var kCGWindowAlpha: CFStringRef; external name '_kCGWindowAlpha'; (* attribute const *)
  254. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  255. { The process ID of the process that owns the window. The value of this key
  256. is a CFNumber 32-bit signed integer value. }
  257. var kCGWindowOwnerPID: CFStringRef; external name '_kCGWindowOwnerPID'; (* attribute const *)
  258. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  259. { An estimate of the memory in bytes currently used by the window and its
  260. supporting data structures. The value of this key is a CFNumber 64-bit
  261. signed integer value. }
  262. var kCGWindowMemoryUsage: CFStringRef; external name '_kCGWindowMemoryUsage'; (* attribute const *)
  263. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  264. { Optional keys for window dictionaries. }
  265. { If present, the workspace ID of the workspace associated with the window.
  266. The value of this key is a CFNumber 32-bit signed integer value. }
  267. var kCGWindowWorkspace: CFStringRef; external name '_kCGWindowWorkspace'; (* attribute const *)
  268. (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  269. { If present, the name of the application process which owns the window.
  270. The value of this key is a CFString. }
  271. var kCGWindowOwnerName: CFStringRef; external name '_kCGWindowOwnerName'; (* attribute const *)
  272. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  273. { If present, the name of the window. The value of this key is a
  274. CFString. }
  275. var kCGWindowName: CFStringRef; external name '_kCGWindowName'; (* attribute const *)
  276. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  277. { If present, true if the window is ordered on screen, false otherwise. If
  278. the key is not present, then the window is not ordered on screen. The
  279. value of this key is a CFBoolean. }
  280. var kCGWindowIsOnscreen: CFStringRef; external name '_kCGWindowIsOnscreen'; (* attribute const *)
  281. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  282. { If present, true if the window backing store is in video memory, false
  283. otherwise. If the key is not present, then the window backing store is in
  284. main memory. The value of this key is a CFBoolean. }
  285. var kCGWindowBackingLocationVideoMemory: CFStringRef; external name '_kCGWindowBackingLocationVideoMemory'; (* attribute const *)
  286. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  287. {$endc} {TARGET_OS_MAC}
  288. { Flags for CGWindowListOption values. These may be ORed together. }
  289. const
  290. { List all windows in this user session, including both on- and
  291. off-screen windows. The parameter `relativeToWindow' should be
  292. `kCGNullWindowID'. }
  293. kCGWindowListOptionAll = 0;
  294. { List all on-screen windows in this user session, ordered from front to
  295. back. The parameter `relativeToWindow' should be `kCGNullWindowID'. }
  296. kCGWindowListOptionOnScreenOnly = 1 shl 0;
  297. { List all on-screen windows above the window specified by
  298. `relativeToWindow', ordered from front to back. }
  299. kCGWindowListOptionOnScreenAboveWindow = 1 shl 1;
  300. { List all on-screen windows below the window specified by
  301. `relativeToWindow', ordered from front to back. }
  302. kCGWindowListOptionOnScreenBelowWindow = 1 shl 2;
  303. { Include the window specified by `relativeToWindow' in any list,
  304. effectively creating `at-or-above' or `at-or-below' lists. }
  305. kCGWindowListOptionIncludingWindow = 1 shl 3;
  306. { Exclude any windows from the list that are elements of the desktop. }
  307. kCGWindowListExcludeDesktopElements = 1 shl 4;
  308. {$ifc TARGET_OS_MAC}
  309. { Return an array of window dictionaries for windows within the user
  310. session.
  311. This function returns NULL if the caller is not running within a Quartz
  312. GUI session or the window server is disabled. You should release the
  313. array when you are finished using it. }
  314. function CGWindowListCopyWindowInfo( option: CGWindowListOption; relativeToWindow: CGWindowID ): CFArrayRef; external name '_CGWindowListCopyWindowInfo';
  315. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  316. { Return an array of CGWindowID values for windows within the user session.
  317. This function returns NULL if the caller is not running within a Quartz
  318. GUI session or the window server is disabled. You should release the
  319. array when you are finished using it. }
  320. function CGWindowListCreate( option: CGWindowListOption; relativeToWindow: CGWindowID ): CFArrayRef; external name '_CGWindowListCreate';
  321. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  322. { Return an array of window dictionaries, each corresponding to a window ID
  323. specified in `windowArray'.
  324. This function returns NULL if the caller is not running within a Quartz
  325. GUI session or the window server is disabled. You should release the
  326. array when you are finished using it. }
  327. function CGWindowListCreateDescriptionFromArray( windowArray: CFArrayRef ): CFArrayRef; external name '_CGWindowListCreateDescriptionFromArray';
  328. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  329. {$endc} {TARGET_OS_MAC}
  330. { Flags for CGWindowImageOption values. These may be ORed together. }
  331. const
  332. { If `CGRectNull' is passed as the screen bounds, then then bounds
  333. computation includes window frame ornamentation, such as a shadow. }
  334. kCGWindowImageDefault = 0;
  335. { If `CGRectNull' is passed as the screen bounds, then then bounds
  336. computation excludes window frame ornamentation, such as a shadow. }
  337. kCGWindowImageBoundsIgnoreFraming = 1 shl 0;
  338. { Force the created image to be opaque. Empty areas are white }
  339. kCGWindowImageShouldBeOpaque = 1 shl 1;
  340. { Only draw the windows' shadows, not the windows themselves. }
  341. kCGWindowImageOnlyShadows = 1 shl 2;
  342. { Return the best image resolution. The screen size may be
  343. different than the returned image size. }
  344. kCGWindowImageBestResolution = 1 shl 3;
  345. { Return the nominal image resolution. The screen size
  346. equals the returned image size. }
  347. kCGWindowImageNominalResolution = 1 shl 4;
  348. {$ifc TARGET_OS_MAC}
  349. { Create an image containing a composite of the specified set of windows
  350. contained within a rectangular area. The set of windows is specified
  351. using options from `CGWindowListOption', along with an optional
  352. additional window ID.
  353. The windows list options are:
  354. --- kCGWindowListOptionAll, kCGWindowListOptionOnScreenOnly: Use all
  355. on-screen windows in this user session to construct the image. The
  356. parameter `windowID' should be `kCGNullWindowID'.
  357. --- kCGWindowListOptionOnScreenAboveWindow: Use all on-screen windows in
  358. this user session above the window specified by `windowID', ordered from
  359. front to back, to construct the image. To include the window specified by
  360. `windowID', add the flag `kCGWindowListOptionIncludingWindow'.
  361. --- kCGWindowListOptionOnScreenBelowWindow: Use all on-screen windows in
  362. this user session below the window specified by `windowID', ordered from
  363. front to back, to construct the image. To include the window specified by
  364. `windowID', add the flag `kCGWindowListOptionIncludingWindow'.
  365. --- kCGWindowListOptionIncludingWindow: Use only the window specified by
  366. `windowID' to construct the image.
  367. The parameter `screenBounds' specifies the rectangle in screen space
  368. (origin at the upper-left; y-value increasing downward). Setting
  369. `screenBounds' to `CGRectInfinite' will include all the windows on the
  370. entire desktop. Setting `screenBounds' to `CGRectNull' will use the
  371. bounding box of the specified windows as the screen space rectangle.
  372. The parameter `imageOptions' allows you to specify whether the window
  373. frame ornamentation, such as a shadow or similar effect, should be
  374. included or excluded in the bounds calculation when `CGRectNull' is
  375. specified for the window bounds.
  376. If no windows meet the specified criteria, or the windows can't be read,
  377. then a transparent black image will be returned.
  378. Any on-screen window with sharing type `kCGWindowSharingNone' will not
  379. be included in the image.
  380. This function returns NULL if the caller is not running within a Quartz
  381. GUI session or the window server is disabled. }
  382. function CGWindowListCreateImage( screenBounds: CGRect; listOption: CGWindowListOption; windowID: CGWindowID; imageOption: CGWindowImageOption ): CGImageRef; external name '_CGWindowListCreateImage';
  383. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  384. { Create an image containing a composite of the specified set of windows
  385. contained within a rectangular area à la `CGWindowListCreateImage'. The
  386. set of windows is specified by `windowArray', an array of window IDs. }
  387. function CGWindowListCreateImageFromArray( screenBounds: CGRect; windowArray: CFArrayRef; imageOption: CGWindowImageOption ): CGImageRef; external name '_CGWindowListCreateImageFromArray';
  388. (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
  389. {$endc} {TARGET_OS_MAC}
  390. { A CFNumberRef encoding appropriate for use with a CGWindowID. }
  391. const
  392. kCGWindowIDCFNumberType = kCFNumberSInt32Type;
  393. { CFNumberRef encoding appropriate for use with CGWindowSharingType }
  394. const
  395. kCGWindowSharingCFNumberType = kCFNumberSInt32Type;
  396. { CFNumberRef encoding appropriate for use with CGWindowBackingType }
  397. const
  398. kCGWindowBackingCFNumberType = kCFNumberSInt32Type;
  399. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  400. end.
  401. {$endc} {not MACOSALLINCLUDE}