SCFilter in ScreenCaptureKit has 5 methods to select the capture target.
Only one method initWithDesktopIndependentWindow:
accepts one SCWindow
as its capture target.
The other four methods target one SCDisplay
and extra SCRunningApplication
or SCWindow
combinations to filter out items by their criteria.
Compared to the old API to capture windows or displays snapshots:
CGImageRef CGWindowListCreateImage(CGRect screenBounds, CGWindowListOption listOption, CGWindowID windowID, CGWindowImageOption imageOption);
CGImageRef CGWindowListCreateImageFromArray(CGRect screenBounds, CFArrayRef windowArray, CGWindowImageOption imageOption);
The second method accepts an array of CGWindowID
, so the result is a composite image formed from these windows.
Will Apple provide a substitute in SCFilter
for this method in the future?