1616using Foundation ;
1717using CoreFoundation ;
1818using CoreMedia ;
19+ using UniformTypeIdentifiers ;
1920
2021namespace ScreenCaptureKit {
2122
23+ [ Mac ( 26 , 0 ) , MacCatalyst ( 26 , 0 ) ]
24+ [ Native ]
25+ public enum SCScreenshotDisplayIntent : long {
26+ Canonical ,
27+ Local ,
28+ }
29+
30+ [ Mac ( 26 , 0 ) , MacCatalyst ( 26 , 0 ) ]
31+ [ Native ]
32+ public enum SCScreenshotDynamicRange : long {
33+ Sdr ,
34+ Hdr ,
35+ SdrAndHdr ,
36+ }
37+
38+ [ Mac ( 26 , 0 ) , MacCatalyst ( 26 , 0 ) ]
39+ [ BaseType ( typeof ( NSObject ) ) ]
40+ interface SCScreenshotConfiguration {
41+ [ Export ( "width" ) ]
42+ nint Width { get ; set ; }
43+
44+ [ Export ( "height" ) ]
45+ nint Height { get ; set ; }
46+
47+ [ Export ( "showsCursor" ) ]
48+ bool ShowsCursor { get ; set ; }
49+
50+ [ Export ( "sourceRect" , ArgumentSemantic . Assign ) ]
51+ CGRect SourceRect { get ; set ; }
52+
53+ [ Export ( "destinationRect" , ArgumentSemantic . Assign ) ]
54+ CGRect DestinationRect { get ; set ; }
55+
56+ [ Export ( "ignoreShadows" ) ]
57+ bool IgnoreShadows { get ; set ; }
58+
59+ [ Export ( "ignoreClipping" ) ]
60+ bool IgnoreClipping { get ; set ; }
61+
62+ [ Export ( "includeChildWindows" ) ]
63+ bool IncludeChildWindows { get ; set ; }
64+
65+ [ Export ( "displayIntent" , ArgumentSemantic . Assign ) ]
66+ SCScreenshotDisplayIntent DisplayIntent { get ; set ; }
67+
68+ [ Export ( "dynamicRange" , ArgumentSemantic . Assign ) ]
69+ SCScreenshotDynamicRange DynamicRange { get ; set ; }
70+
71+ [ Export ( "contentType" , ArgumentSemantic . Assign ) ]
72+ UTType ContentType { get ; set ; }
73+
74+ [ NullAllowed , Export ( "fileURL" , ArgumentSemantic . Strong ) ]
75+ NSUrl FileUrl { get ; set ; }
76+
77+ [ Static ]
78+ [ Export ( "supportedContentTypes" ) ]
79+ UTType [ ] SupportedContentTypes { get ; }
80+ }
81+
82+ [ Mac ( 26 , 0 ) , MacCatalyst ( 26 , 0 ) ]
83+ [ BaseType ( typeof ( NSObject ) ) ]
84+ interface SCScreenshotOutput {
85+ [ NullAllowed , Export ( "sdrImage" , ArgumentSemantic . Strong ) ]
86+ CGImage SdrImage { get ; set ; }
87+
88+ [ NullAllowed , Export ( "hdrImage" , ArgumentSemantic . Strong ) ]
89+ CGImage HdrImage { get ; set ; }
90+
91+ [ NullAllowed , Export ( "fileURL" , ArgumentSemantic . Assign ) ]
92+ NSUrl FileUrl { get ; set ; }
93+ }
94+
2295 [ NoiOS , NoTV , Mac ( 12 , 3 ) , MacCatalyst ( 18 , 2 ) ]
2396 [ ErrorDomain ( "SCStreamErrorDomain" ) ]
2497 [ Native ]
@@ -125,6 +198,8 @@ public enum SCStreamConfigurationPreset : long {
125198 CaptureHdrStreamCanonicalDisplay ,
126199 CaptureHdrScreenshotLocalDisplay ,
127200 CaptureHdrScreenshotCanonicalDisplay ,
201+ [ MacCatalyst ( 26 , 0 ) , Mac ( 26 , 0 ) ]
202+ CaptureHdrRecordingPreservedSdrHdr10 ,
128203 }
129204
130205 [ NoiOS , NoTV , Mac ( 12 , 3 ) , MacCatalyst ( 18 , 2 ) ]
@@ -643,6 +718,7 @@ interface SCShareableContentInfo {
643718 }
644719
645720 delegate void SCScreenshotManagerCaptureImageCallback ( [ NullAllowed ] CGImage image , [ NullAllowed ] NSError error ) ;
721+ delegate void SCScreenshotManagerCaptureScreenshotCallback ( [ NullAllowed ] SCScreenshotOutput output , [ NullAllowed ] NSError error ) ;
646722
647723 [ NoiOS , NoTV , Mac ( 14 , 0 ) , MacCatalyst ( 18 , 2 ) ]
648724 [ BaseType ( typeof ( NSObject ) ) ]
@@ -663,6 +739,18 @@ interface SCScreenshotManager {
663739 [ Export ( "captureImageInRect:completionHandler:" ) ]
664740 [ Async ]
665741 void CaptureImage ( CGRect rect , [ NullAllowed ] SCScreenshotManagerCaptureImageCallback completionHandler ) ;
742+
743+ [ Async ]
744+ [ MacCatalyst ( 26 , 0 ) , Mac ( 26 , 0 ) ]
745+ [ Static ]
746+ [ Export ( "captureScreenshotWithFilter:configuration:completionHandler:" ) ]
747+ void CaptureScreenshot ( SCContentFilter contentFilter , SCScreenshotConfiguration config , [ NullAllowed ] SCScreenshotManagerCaptureScreenshotCallback completionHandler ) ;
748+
749+ [ Async ]
750+ [ MacCatalyst ( 26 , 0 ) , Mac ( 26 , 0 ) ]
751+ [ Static ]
752+ [ Export ( "captureScreenshotWithRect:configuration:completionHandler:" ) ]
753+ void CaptureScreenshot ( CGRect rect , SCScreenshotConfiguration config , [ NullAllowed ] SCScreenshotManagerCaptureScreenshotCallback completionHandler ) ;
666754 }
667755
668756 [ Mac ( 15 , 0 ) , NoiOS , NoTV , MacCatalyst ( 18 , 2 ) ]
0 commit comments