pub struct SCContentFilterBuilder { /* private fields */ }Expand description
Builder for creating SCContentFilter instances
§Examples
use screencapturekit::prelude::*;
let content = SCShareableContent::get()?;
let display = &content.displays()[0];
// Capture entire display
let filter = SCContentFilter::builder()
.display(display)
.exclude_windows(&[])
.build();
// Capture with specific windows excluded
let window = &content.windows()[0];
let filter = SCContentFilter::builder()
.display(display)
.exclude_windows(&[window])
.build();
// Capture specific window
let filter = SCContentFilter::builder()
.window(window)
.build();Implementations§
Source§impl SCContentFilterBuilder
impl SCContentFilterBuilder
Sourcepub fn exclude_windows(self, windows: &[&SCWindow]) -> Self
pub fn exclude_windows(self, windows: &[&SCWindow]) -> Self
Exclude specific windows from the display capture
Sourcepub fn include_windows(self, windows: &[&SCWindow]) -> Self
pub fn include_windows(self, windows: &[&SCWindow]) -> Self
Include only specific windows in the display capture
Sourcepub fn include_applications(
self,
applications: &[&SCRunningApplication],
excepting_windows: &[&SCWindow],
) -> Self
pub fn include_applications( self, applications: &[&SCRunningApplication], excepting_windows: &[&SCWindow], ) -> Self
Include specific applications and optionally except certain windows
Sourcepub fn content_rect(self, rect: Rect) -> Self
pub fn content_rect(self, rect: Rect) -> Self
Set the content rectangle (macOS 14.2+)
Sourcepub fn build(self) -> SCContentFilter
pub fn build(self) -> SCContentFilter
Build the content filter
Auto Trait Implementations§
impl Freeze for SCContentFilterBuilder
impl RefUnwindSafe for SCContentFilterBuilder
impl Send for SCContentFilterBuilder
impl Sync for SCContentFilterBuilder
impl Unpin for SCContentFilterBuilder
impl UnwindSafe for SCContentFilterBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more