Skip to content

Commit

Permalink
[CarPlay] Propagate constructors to derived classes. Fixes #15169.
Browse files Browse the repository at this point in the history
In Objective-C constructors are automatically visible in derived classes as
well, but we need to replicate such constructors explicitly in derived
classes.

Fixes #15169.
  • Loading branch information
rolfbjarne committed Jun 1, 2022
1 parent 6a60c25 commit 3c5b04e
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions src/carplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,9 @@ interface CPNowPlayingImageButton
[Export ("initWithImage:handler:")]
NativeHandle Constructor (UIImage image, [NullAllowed] Action<CPNowPlayingButton> handler);

[Export ("initWithHandler:")]
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);

[NullAllowed, Export ("image", ArgumentSemantic.Strong)]
UIImage Image { get; }
}
Expand Down Expand Up @@ -1926,23 +1929,38 @@ interface CPContactMessageButton

[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (CPNowPlayingButton))]
interface CPNowPlayingShuffleButton {}
interface CPNowPlayingShuffleButton {
[Export ("initWithHandler:")]
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (CPNowPlayingButton))]
interface CPNowPlayingAddToLibraryButton {}
interface CPNowPlayingAddToLibraryButton {
[Export ("initWithHandler:")]
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (CPNowPlayingButton))]
interface CPNowPlayingMoreButton {}
interface CPNowPlayingMoreButton {
[Export ("initWithHandler:")]
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (CPNowPlayingButton))]
interface CPNowPlayingPlaybackRateButton {}
interface CPNowPlayingPlaybackRateButton {
[Export ("initWithHandler:")]
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (CPNowPlayingButton))]
interface CPNowPlayingRepeatButton {}
interface CPNowPlayingRepeatButton {
[Export ("initWithHandler:")]
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
}

interface ICPListTemplateItem { }

Expand Down

0 comments on commit 3c5b04e

Please sign in to comment.