Skip to content

Commit 9b37cdd

Browse files
authored
[AVKit] Update to Xcode 26 beta 1-5. (#23541)
1 parent af65a95 commit 9b37cdd

File tree

7 files changed

+126
-32
lines changed

7 files changed

+126
-32
lines changed

src/AVKit/AVCaptureEventSound.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Foundation;
2+
using ObjCRuntime;
3+
4+
namespace AVKit {
5+
#if __IOS__ && !__MACCATALYST__
6+
public partial class AVCaptureEventSound {
7+
/// <summary>Create a new <see cref="AVCaptureEventSound" /> instance for the specified <paramref name="url" />.</summary>
8+
/// <param name="url">The url for a local file from within the app bundle.</param>
9+
/// <param name="error">The error in case of failure.</param>
10+
/// <returns>A new <see cref="AVCaptureEventSound" /> instance if successful, otherwise <paramref name="error" /> will be an error for the failure.</returns>
11+
public static AVCaptureEventSound? Create (NSUrl url, out NSError? error)
12+
{
13+
var rv = new AVCaptureEventSound (NSObjectFlag.Empty);
14+
rv.InitializeHandle (rv._InitWithUrl (url, out error), "initWithURL:error:", false);
15+
if (rv.Handle == NativeHandle.Zero) {
16+
rv.Dispose ();
17+
return null;
18+
}
19+
return rv;
20+
}
21+
}
22+
#endif // __IOS__ && !__MACCATALYST__
23+
}

src/avkit.cs

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,16 @@ interface AVPlayerViewController {
437437
[iOS (17, 0), MacCatalyst (18, 0), NoTV, NoMac]
438438
[Export ("toggleLookupAction")]
439439
UIAction ToggleLookupAction { get; }
440+
441+
[MacCatalyst (26, 0), NoMac, NoTV, iOS (26, 0)]
442+
[Export ("preferredDisplayDynamicRange", ArgumentSemantic.Assign)]
443+
AVDisplayDynamicRange PreferredDisplayDynamicRange { get; set; }
444+
445+
446+
[TV (26, 0), MacCatalyst (26, 0), NoMac, iOS (26, 0)]
447+
[Static]
448+
[Export ("mediaCharacteristicsForSupportedCustomMediaSelectionSchemes")]
449+
string [] MediaCharacteristicsForSupportedCustomMediaSelectionSchemes { get; }
440450
}
441451

442452
/// <summary>Interface representing the required methods (if any) of the protocol <see cref="AVKit.AVPlayerViewControllerDelegate" />.</summary>
@@ -779,6 +789,10 @@ interface AVPlayerView {
779789
[Mac (14, 0)]
780790
[Export ("videoFrameAnalysisTypes")]
781791
AVVideoFrameAnalysisType VideoFrameAnalysisTypes { get; set; }
792+
793+
[Mac (26, 0)]
794+
[Export ("preferredDisplayDynamicRange", ArgumentSemantic.Assign)]
795+
AVDisplayDynamicRange PreferredDisplayDynamicRange { get; set; }
782796
}
783797

784798
interface IAVPlayerViewPictureInPictureDelegate { }
@@ -1257,6 +1271,14 @@ interface AVPlaybackSpeed {
12571271
interface AVCaptureEvent {
12581272
[Export ("phase")]
12591273
AVCaptureEventPhase Phase { get; }
1274+
1275+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
1276+
[Export ("playSound:")]
1277+
bool PlaySound (AVCaptureEventSound sound);
1278+
1279+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
1280+
[Export ("shouldPlaySound")]
1281+
bool ShouldPlaySound { get; }
12601282
}
12611283

12621284
[iOS (17, 2), NoMac, MacCatalyst (17, 2), NoTV]
@@ -1279,6 +1301,11 @@ interface AVCaptureEventInteraction : UIInteraction {
12791301

12801302
[Export ("enabled")]
12811303
bool Enabled { [Bind ("isEnabled")] get; set; }
1304+
1305+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
1306+
[Static]
1307+
[Export ("defaultCaptureSoundDisabled")]
1308+
bool DefaultCaptureSoundDisabled { get; set; }
12821309
}
12831310

12841311
[TV (17, 0), NoMac, NoiOS, NoMacCatalyst]
@@ -1313,4 +1340,79 @@ interface AVContinuityDevicePickerViewControllerDelegate {
13131340
void DidEndPresenting (AVContinuityDevicePickerViewController pickerViewController);
13141341
}
13151342
interface IAVContinuityDevicePickerViewControllerDelegate { }
1343+
1344+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
1345+
[BaseType (typeof (NSObject))]
1346+
[DisableDefaultCtor]
1347+
interface AVCaptureEventSound {
1348+
[Export ("initWithURL:error:")]
1349+
[Internal]
1350+
NativeHandle _InitWithUrl (NSUrl url, [NullAllowed] out NSError error);
1351+
1352+
[Static]
1353+
[Export ("cameraShutterSound")]
1354+
AVCaptureEventSound CameraShutterSound { get; }
1355+
1356+
[Static]
1357+
[Export ("beginVideoRecordingSound")]
1358+
AVCaptureEventSound BeginVideoRecordingSound { get; }
1359+
1360+
[Static]
1361+
[Export ("endVideoRecordingSound")]
1362+
AVCaptureEventSound EndVideoRecordingSound { get; }
1363+
}
1364+
1365+
interface IAVInputPickerInteractionDelegate { }
1366+
1367+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
1368+
[Protocol (BackwardsCompatibleCodeGeneration = false), Model]
1369+
[BaseType (typeof (NSObject))]
1370+
interface AVInputPickerInteractionDelegate {
1371+
[Export ("inputPickerInteractionWillBeginPresenting:")]
1372+
void WillBeginPresenting (AVInputPickerInteraction inputPickerInteraction);
1373+
1374+
[Export ("inputPickerInteractionDidEndPresenting:")]
1375+
void DidEndPresenting (AVInputPickerInteraction inputPickerInteraction);
1376+
1377+
[Export ("inputPickerInteractionWillBeginDismissing:")]
1378+
void WillBeginDismissing (AVInputPickerInteraction inputPickerInteraction);
1379+
1380+
[Export ("inputPickerInteractionDidEndDismissing:")]
1381+
void DidEndDismissing (AVInputPickerInteraction inputPickerInteraction);
1382+
}
1383+
1384+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
1385+
[BaseType (typeof (NSObject))]
1386+
interface AVInputPickerInteraction : UIInteraction {
1387+
[Wrap ("WeakDelegate")]
1388+
[NullAllowed]
1389+
IAVInputPickerInteractionDelegate Delegate { get; set; }
1390+
1391+
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
1392+
NSObject WeakDelegate { get; set; }
1393+
1394+
[Export ("presented")]
1395+
bool Presented { [Bind ("isPresented")] get; }
1396+
1397+
[Export ("audioSession", ArgumentSemantic.Strong)]
1398+
AVAudioSession AudioSession { get; set; }
1399+
1400+
[Export ("present")]
1401+
void Present ();
1402+
1403+
[Export ("dismiss")]
1404+
void Dismiss ();
1405+
1406+
[Export ("initWithAudioSession:")]
1407+
NativeHandle Constructor ([NullAllowed] AVAudioSession audioSession);
1408+
}
1409+
1410+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
1411+
[Native]
1412+
public enum AVDisplayDynamicRange : long {
1413+
Automatic = 0,
1414+
Standard = 1,
1415+
ConstrainedHigh = 2,
1416+
High = 3,
1417+
}
13161418
}

src/frameworks.sources

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ AVKIT_API_SOURCES = \
287287
AVKit/Enums.cs \
288288

289289
AVKIT_SOURCES = \
290+
AVKit/AVCaptureEventSound.cs \
290291
AVKit/AVPlayerViewController.cs \
291292

292293
# AVRouting

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.todo

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/iOS-AVKit.todo

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/macOS-AVKit.todo

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVKit.todo

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)