pub struct SCContentFilter(/* private fields */);Expand description
Content filter for ScreenCaptureKit streams
Defines what content to capture (displays, windows, or applications).
§Examples
use screencapturekit::shareable_content::SCShareableContent;
use screencapturekit::stream::content_filter::SCContentFilter;
let content = SCShareableContent::get()?;
let display = &content.displays()[0];
// Capture entire display
let filter = SCContentFilter::builder()
.display(display)
.exclude_windows(&[])
.build();
// Or capture a specific window
let window = &content.windows()[0];
let filter = SCContentFilter::builder()
.window(window)
.build();Implementations§
Source§impl SCContentFilter
impl SCContentFilter
Sourcepub fn builder() -> SCContentFilterBuilder
pub fn builder() -> SCContentFilterBuilder
Creates a content filter builder
§Examples
use screencapturekit::prelude::*;
let content = SCShareableContent::get()?;
let display = &content.displays()[0];
let filter = SCContentFilter::builder()
.display(display)
.exclude_windows(&[])
.build();Sourcepub fn build() -> SCContentFilterBuilder
👎Deprecated since 1.0.0: Use builder() instead
pub fn build() -> SCContentFilterBuilder
builder() insteadCreates a new content filter builder (deprecated alias)
Sourcepub fn set_content_rect(self, rect: Rect) -> Self
pub fn set_content_rect(self, rect: Rect) -> Self
Sets the content rectangle for this filter (macOS 14.2+)
Specifies the rectangle within the content filter to capture.
Sourcepub fn get_content_rect(&self) -> Rect
pub fn get_content_rect(&self) -> Rect
Gets the content rectangle for this filter (macOS 14.2+)
Trait Implementations§
Source§impl Clone for SCContentFilter
impl Clone for SCContentFilter
Source§impl Debug for SCContentFilter
impl Debug for SCContentFilter
Source§impl Default for SCContentFilter
impl Default for SCContentFilter
Source§impl Display for SCContentFilter
impl Display for SCContentFilter
Source§impl Drop for SCContentFilter
impl Drop for SCContentFilter
Source§impl Hash for SCContentFilter
impl Hash for SCContentFilter
Source§impl PartialEq for SCContentFilter
impl PartialEq for SCContentFilter
impl Eq for SCContentFilter
impl Send for SCContentFilter
impl Sync for SCContentFilter
Auto Trait Implementations§
impl Freeze for SCContentFilter
impl RefUnwindSafe for SCContentFilter
impl Unpin for SCContentFilter
impl UnwindSafe for SCContentFilter
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