Front-end
Mac
Mac
  • README
  • ScreenCaptureKit
    • API
      • SCShareableContent
        • [检索共享内容]Retrieving shareable content
        • [共享内容对象]Inspecting shareable content
        • [类型方法]Type Methods
      • Content capture[内容捕获]
        • SCStream[流]
        • SCStreamConfiguration
        • SCContentFilter
        • CSStreamDeleagate
        • SCScreenshotmanger
      • output processing [输出程序]
        • SCStreamOutput
        • SCStreamOutputType
        • SCStreamFrameInfo
        • SCFrameStatus
      • system content-sharing picker[系统内容共享选择器]
        • SCContentSharingPicker
        • SCContentSharingPickerConfiguration
        • SCContentSharingPickerMode
        • SCContentSharingPickerObserver
      • Stream errors
        • SCStreamError
  • Project
    • cut studio
  • issue
    • issue
  • 额外工具
    • Create-dmg
Powered by GitBook
On this page
  1. ScreenCaptureKit
  2. API
  3. Content capture[内容捕获]

SCContentFilter


// 是对shareContent的filter,从而影响捕获的流
@available(macOS 12.3, *)
open class SCContentFilter : NSObject {

//  《1》Creating a filter 创建一个过滤器 ,通过配置shareContent的内容创建
    public init(desktopIndependentWindow window: SCWindow)
    public init(display: SCDisplay, excludingWindows excluded: [SCWindow])
    public init(display: SCDisplay, including includedWindows: [SCWindow])
    public init(display: SCDisplay, including applications: [SCRunningApplication], exceptingWindows: [SCWindow])
    public init(display: SCDisplay, excludingApplications applications: [SCRunningApplication], exceptingWindows: [SCWindow])

// 《2》Filter properties 过滤器的属性
    open var pointPixelScale: Float { get } // 带你像素因子
    open var contentRect: CGRect { get } // 内容的位置大小
    @available(macOS, introduced: 14.0, deprecated: 14.2, message: "Use style instead")
    open var streamType: SCStreamType { get } // 流的类型
    //  流类型
    public enum SCStreamType : Int, @unchecked Sendable {
        case window = 0
        case display = 1
    }

    open var style: SCShareableContentStyle { get } //共享内容的样式

//  《3》Instance Properties 实例属性
//  包括菜单栏是否捕获。 这个属性对桌面独立的过滤器不影响
//  对于使用initWithDisplay:excluding 方法创建的,默认是YES。 display的excluding包括desktop和dock
//  对于使用initWithDisplay:including 方法创建的,默认是NO,display的including不包括desktop和dock
    @available(macOS 14.2, *)
    open var includeMenuBar: Bool
}
PreviousSCStreamConfigurationNextCSStreamDeleagate

Last updated 1 year ago