Skip to content

Commit cdd1160

Browse files
dalexsotoCopilot
andauthored
[AVKit] Update bindings to Xcode 26.4 Release Candidate (#24945)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 14bdefb commit cdd1160

11 files changed

Lines changed: 112 additions & 33 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#nullable enable
2+
3+
#if !TVOS
4+
namespace AVKit {
5+
[SupportedOSPlatform ("ios26.4")]
6+
[SupportedOSPlatform ("macos26.4")]
7+
[SupportedOSPlatform ("maccatalyst26.4")]
8+
[UnsupportedOSPlatform ("tvos")]
9+
[StructLayout (LayoutKind.Sequential)]
10+
public struct AVLegibleMediaOptionsMenuState {
11+
#if !COREBUILD
12+
byte enabled;
13+
14+
public bool Enabled {
15+
get => enabled != 0;
16+
set => enabled = value.AsByte ();
17+
}
18+
19+
nint reason;
20+
21+
public AVLegibleMediaOptionsMenuStateChangeReason Reason {
22+
get => (AVLegibleMediaOptionsMenuStateChangeReason) (long) reason;
23+
set => reason = (nint) (long) value;
24+
}
25+
#endif
26+
}
27+
}
28+
#endif

src/AVKit/Enums.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,20 @@ public enum AVRoutePickerViewButtonState : long {
6565
ActiveHighlighted,
6666
}
6767

68+
[NoTV, Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
69+
[Native]
70+
public enum AVLegibleMediaOptionsMenuStateChangeReason : long {
71+
None = 0,
72+
LanguageMismatch,
73+
}
74+
75+
[Flags]
76+
[NoTV, Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
77+
[Native]
78+
public enum AVLegibleMediaOptionsMenuContents : long {
79+
Legible = 1L << 0,
80+
CaptionAppearance = 1L << 1,
81+
All = Legible | CaptionAppearance,
82+
}
83+
6884
}

src/avkit.cs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@
3131
using UIViewController = Foundation.NSObject;
3232
using UIWindow = Foundation.NSObject;
3333
using UIAction = Foundation.NSObject;
34+
using UIMenu = Foundation.NSObject;
3435
using UIMenuElement = Foundation.NSObject;
3536
#endif // !MONOMAC
3637

3738
#if TVOS
3839
using AVCustomRoutingController = Foundation.NSObject;
3940
using AVCustomRoutingEvent = Foundation.NSObject;
4041
using AVCustomRoutingActionItem = Foundation.NSObject;
42+
using AVLegibleMediaOptionsMenuState = Foundation.NSObject;
4143
#else
4244
using AVRouting;
4345
#endif
@@ -1388,4 +1390,46 @@ public enum AVDisplayDynamicRange : long {
13881390
ConstrainedHigh = 2,
13891391
High = 3,
13901392
}
1393+
1394+
interface IAVLegibleMediaOptionsMenuControllerDelegate { }
1395+
1396+
[NoTV, Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
1397+
[BaseType (typeof (NSObject))]
1398+
[DisableDefaultCtor]
1399+
interface AVLegibleMediaOptionsMenuController {
1400+
[Export ("initWithPlayer:")]
1401+
[DesignatedInitializer]
1402+
NativeHandle Constructor (AVPlayer player);
1403+
1404+
[Export ("menuWithContents:")]
1405+
[return: NullAllowed]
1406+
UIMenu BuildMenu (AVLegibleMediaOptionsMenuContents contents);
1407+
1408+
[Export ("player", ArgumentSemantic.Assign)]
1409+
AVPlayer Player { get; set; }
1410+
1411+
[Wrap ("WeakDelegate")]
1412+
[NullAllowed]
1413+
IAVLegibleMediaOptionsMenuControllerDelegate Delegate { get; set; }
1414+
1415+
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
1416+
NSObject WeakDelegate { get; set; }
1417+
1418+
[Export ("menuState")]
1419+
AVLegibleMediaOptionsMenuState MenuState { get; }
1420+
}
1421+
1422+
[NoTV, Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
1423+
[Protocol (BackwardsCompatibleCodeGeneration = false), Model]
1424+
[BaseType (typeof (NSObject))]
1425+
interface AVLegibleMediaOptionsMenuControllerDelegate {
1426+
[Export ("legibleMenuController:didChangeMenuState:")]
1427+
void DidChangeMenuState (AVLegibleMediaOptionsMenuController menuController, AVLegibleMediaOptionsMenuState state);
1428+
1429+
[Export ("legibleMenuController:didRequestCaptionPreviewForProfileID:")]
1430+
void DidRequestCaptionPreviewForProfileId (AVLegibleMediaOptionsMenuController menuController, string profileId);
1431+
1432+
[Export ("legibleMenuControllerDidRequestStoppingSubtitleCaptionPreview:")]
1433+
void DidRequestStoppingSubtitleCaptionPreview (AVLegibleMediaOptionsMenuController menuController);
1434+
}
13911435
}

src/frameworks.sources

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ AVFOUNDATION_SOURCES = \
282282

283283
# AVKit
284284

285+
AVKIT_CORE_SOURCES = \
286+
AVKit/AVLegibleMediaOptionsMenuState.cs \
287+
285288
AVKIT_API_SOURCES = \
286289
AVKit/Enums.cs \
287290

tests/cecil-tests/Documentation.KnownFailures.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,6 +1664,11 @@ F:AVKit.AVKitError.ContentDisallowedByPasscode
16641664
F:AVKit.AVKitError.ContentDisallowedByProfile
16651665
F:AVKit.AVKitError.ContentRatingUnknown
16661666
F:AVKit.AVKitError.RecordingFailed
1667+
F:AVKit.AVLegibleMediaOptionsMenuContents.All
1668+
F:AVKit.AVLegibleMediaOptionsMenuContents.CaptionAppearance
1669+
F:AVKit.AVLegibleMediaOptionsMenuContents.Legible
1670+
F:AVKit.AVLegibleMediaOptionsMenuStateChangeReason.LanguageMismatch
1671+
F:AVKit.AVLegibleMediaOptionsMenuStateChangeReason.None
16671672
F:AVKit.AVRoutePickerViewButtonState.Active
16681673
F:AVKit.AVRoutePickerViewButtonState.ActiveHighlighted
16691674
F:AVKit.AVRoutePickerViewButtonState.Normal
@@ -9721,6 +9726,7 @@ M:AVKit.AVCustomRoutingControllerDelegate.DidSelectItem(AVRouting.AVCustomRoutin
97219726
M:AVKit.AVCustomRoutingControllerDelegate.EventDidTimeOut(AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingEvent)
97229727
M:AVKit.AVCustomRoutingControllerDelegate.HandleEvent(AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingEvent,AVKit.AVCustomRoutingControllerDelegateCompletionHandler)
97239728
M:AVKit.AVInputPickerInteraction.Dispose(System.Boolean)
9729+
M:AVKit.AVLegibleMediaOptionsMenuController.Dispose(System.Boolean)
97249730
M:AVKit.AVPictureInPictureController.Dispose(System.Boolean)
97259731
M:AVKit.AVPictureInPictureControllerContentSource.Dispose(System.Boolean)
97269732
M:AVKit.AVPictureInPictureSampleBufferPlaybackDelegate_Extensions.ShouldProhibitBackgroundAudioPlayback(AVKit.IAVPictureInPictureSampleBufferPlaybackDelegate,AVKit.AVPictureInPictureController)
@@ -9774,6 +9780,9 @@ M:AVKit.IAVInputPickerInteractionDelegate.DidEndDismissing(AVKit.AVInputPickerIn
97749780
M:AVKit.IAVInputPickerInteractionDelegate.DidEndPresenting(AVKit.AVInputPickerInteraction)
97759781
M:AVKit.IAVInputPickerInteractionDelegate.WillBeginDismissing(AVKit.AVInputPickerInteraction)
97769782
M:AVKit.IAVInputPickerInteractionDelegate.WillBeginPresenting(AVKit.AVInputPickerInteraction)
9783+
M:AVKit.IAVLegibleMediaOptionsMenuControllerDelegate.DidChangeMenuState(AVKit.AVLegibleMediaOptionsMenuController,AVKit.AVLegibleMediaOptionsMenuState)
9784+
M:AVKit.IAVLegibleMediaOptionsMenuControllerDelegate.DidRequestCaptionPreviewForProfileId(AVKit.AVLegibleMediaOptionsMenuController,System.String)
9785+
M:AVKit.IAVLegibleMediaOptionsMenuControllerDelegate.DidRequestStoppingSubtitleCaptionPreview(AVKit.AVLegibleMediaOptionsMenuController)
97779786
M:AVKit.IAVPictureInPictureSampleBufferPlaybackDelegate.DidTransitionToRenderSize(AVKit.AVPictureInPictureController,CoreMedia.CMVideoDimensions)
97789787
M:AVKit.IAVPictureInPictureSampleBufferPlaybackDelegate.GetTimeRange(AVKit.AVPictureInPictureController)
97799788
M:AVKit.IAVPictureInPictureSampleBufferPlaybackDelegate.IsPlaybackPaused(AVKit.AVPictureInPictureController)
@@ -20536,6 +20545,9 @@ P:AVKit.AVDisplayManager.DisplayCriteriaMatchingEnabled
2053620545
P:AVKit.AVDisplayManager.DisplayModeSwitchInProgress
2053720546
P:AVKit.AVInputPickerInteraction.Delegate
2053820547
P:AVKit.AVInputPickerInteraction.Presented
20548+
P:AVKit.AVLegibleMediaOptionsMenuController.Delegate
20549+
P:AVKit.AVLegibleMediaOptionsMenuState.Enabled
20550+
P:AVKit.AVLegibleMediaOptionsMenuState.Reason
2053920551
P:AVKit.AVPictureInPictureControllerContentSource.SampleBufferPlaybackDelegate
2054020552
P:AVKit.AVPlayerView.Delegate
2054120553
P:AVKit.AVPlayerView.PictureInPictureDelegate
@@ -28429,6 +28441,9 @@ T:AVKit.AVCaptureViewControlsStyle
2842928441
T:AVKit.AVCustomRoutingControllerDelegateCompletionHandler
2843028442
T:AVKit.AVDisplayDynamicRange
2843128443
T:AVKit.AVKitMetadataIdentifier
28444+
T:AVKit.AVLegibleMediaOptionsMenuContents
28445+
T:AVKit.AVLegibleMediaOptionsMenuState
28446+
T:AVKit.AVLegibleMediaOptionsMenuStateChangeReason
2843228447
T:AVKit.AVPlayerViewTrimResult
2843328448
T:AVKit.AVRoutePickerViewButtonState
2843428449
T:AVKit.AVRoutePickerViewButtonStyle
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Causes segfault so clearly not allowed
2+
!missing-null-allowed! 'System.Void AVKit.AVLegibleMediaOptionsMenuController::.ctor(AVFoundation.AVPlayer)' is missing an [NullAllowed] on parameter #0

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

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Causes segfault so clearly not allowed
2+
!missing-null-allowed! 'System.Void AVKit.AVLegibleMediaOptionsMenuController::.ctor(AVFoundation.AVPlayer)' is missing an [NullAllowed] on parameter #0

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

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Causes segfault so clearly not allowed
2+
!missing-null-allowed! 'System.Void AVKit.AVLegibleMediaOptionsMenuController::.ctor(AVFoundation.AVPlayer)' is missing an [NullAllowed] on parameter #0

0 commit comments

Comments
 (0)