init(display:including:exceptingWindows:)
Creates a filter that captures a display, including only windows of the specified apps.
Declaration
init(display: SCDisplay, including applications: [SCRunningApplication], exceptingWindows: [SCWindow])Parameters
- display:
A display to capture.
- applications:
An array of apps with windows to capture.
- exceptingWindows:
An array of windows that are exceptions to the previous rules.
Discussion
The initializer arguments provide a three-stage filter that gives you fine-grained control over the output:
Specify a display to capture. If you don’t specify additional filter criteria, the stream includes all content for a display.
Specify one or more apps to capture only the windows that they own.
Specify one or more windows that are exceptions to the previous rules. If the previous rules include a window, specifying it as an exception excludes it from the output. Likewise, if the previous rules exclude a window, specifying it as an exception includes it in the output.