Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UIKit] Add support for Xcode 14 up to beta 5. #15694

Merged
merged 16 commits into from
Aug 27, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/AppKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1637,13 +1637,6 @@ public enum NSTextTableLayoutAlgorithm : ulong {
Automatic, Fixed
}

[NoMacCatalyst]
[Flags]
[Native]
public enum NSTextListOptions : ulong {
PrependEnclosingMarker = 1
}

[NoMacCatalyst]
[Flags]
public enum NSFontSymbolicTraits : int { // uint32_t NSFontSymbolicTraits
Expand Down
35 changes: 34 additions & 1 deletion src/UIKit/UIEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,10 @@ public enum UIDataDetectorType : ulong {
FlightNumber = 1 << 5,
[iOS (10,0)]
LookupSuggestion = 1 << 6,
[NoWatch, NoTV, iOS (16,0), MacCatalyst (16,0)]
Money = 1uL << 7,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor - either use 1 << 7 here to be consistent with all the others or change the others to be 1uL << n. I would personally do the former since the backing type is ulong so the uL is redundant.

[NoWatch, NoTV, iOS (16,0), MacCatalyst (16,0)]
PhysicalValue = 1uL << 8,

None = 0,
All = UInt64.MaxValue
Expand Down Expand Up @@ -894,6 +898,9 @@ public enum UIModalPresentationStyle : long {
OverCurrentContext,
[NoTV]
Popover,
[Deprecated (PlatformName.iOS, 16, 0)]
[Deprecated (PlatformName.TvOS, 16, 0)]
[Deprecated (PlatformName.MacCatalyst, 16, 0)]
BlurOverFullScreen,
}

Expand Down Expand Up @@ -1375,7 +1382,12 @@ public enum UIKeyModifierFlags : long {
[Native]
[NoWatch]
public enum UIScrollViewKeyboardDismissMode : long {
None, OnDrag, Interactive
None,
OnDrag,
Interactive,
OnDragWithAccessory,
rolfbjarne marked this conversation as resolved.
Show resolved Hide resolved
tj-devel709 marked this conversation as resolved.
Show resolved Hide resolved
[TV (16,0), iOS (16,0), MacCatalyst (16,0)]
InteractiveWithAccessory,
}

// NSInteger -> UIWebView.h
Expand Down Expand Up @@ -1686,6 +1698,14 @@ public enum UIFontWeight {
Black,
}

[Watch (9,0), TV (16,0), iOS (16, 0), MacCatalyst (16,0)]
public enum UIFontWidth {
Condensed,
Standard,
Expanded,
Compressed,
}

[NoWatch]
[iOS (9,0)]
[Native]
Expand Down Expand Up @@ -2270,6 +2290,8 @@ public enum UISceneErrorCode : long
{
MultipleScenesNotSupported,
RequestDenied,
GeometryRequestUnsupported = 100,
GeometryRequestDenied
rolfbjarne marked this conversation as resolved.
Show resolved Hide resolved
tj-devel709 marked this conversation as resolved.
Show resolved Hide resolved
}

[Watch (6,0), TV (13,0), iOS (13,0)]
Expand Down Expand Up @@ -2322,6 +2344,8 @@ public enum UIMenuElementAttributes : ulong {
Disabled = 1uL << 0,
Destructive = 1uL << 1,
Hidden = 1uL << 2,
[TV (16,0), iOS (16,0), MacCatalyst (16,0)]
KeepsMenuPresented = 1uL << 3,
}

[Flags]
Expand Down Expand Up @@ -2354,6 +2378,10 @@ public enum UIWindowSceneSessionRole {
[Field ("CPTemplateApplicationSceneSessionRoleApplication", "CarPlay")]
#endif
CarTemplateApplication,

[TV (16,0), iOS (16, 0), MacCatalyst (16,0)]
[Field ("UIWindowSceneSessionRoleExternalDisplayNonInteractive")]
ExternalDisplayNonInteractive,
}

[iOS (13,0), TV (13,0), NoWatch]
Expand Down Expand Up @@ -2455,6 +2483,11 @@ public enum UIMenuIdentifier {
[MacCatalyst (14,0)]
[Field ("UIMenuOpenRecent")]
OpenRecent,

[TV (16,0), iOS (16, 0), MacCatalyst (16,0)]
[Field ("UIMenuDocument")]
Document,

}

[iOS (13,0), TV (13,0), Watch (6,0)]
Expand Down
109 changes: 0 additions & 109 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18961,115 +18961,6 @@ partial interface NSTextInputContext {
string LocalizedNameForInputSource (string inputSourceIdentifier);
}

[NoMacCatalyst]
[BaseType (typeof (NSObject))]
interface NSTextList : NSCoding, NSCopying, NSSecureCoding {
[Export ("initWithMarkerFormat:options:")]
#if NET
NativeHandle Constructor ([BindAs (typeof (NSTextListMarkerFormats))] NSString format, NSTextListOptions mask);
#else
NativeHandle Constructor (string format, NSTextListOptions mask);
#endif

#if !NET
[Wrap ("this (format.GetConstant(), mask)")]
NativeHandle Constructor (NSTextListMarkerFormats format, NSTextListOptions mask);
#endif

#if NET
[BindAs (typeof (NSTextListMarkerFormats))]
#endif
[Export ("markerFormat")]
#if NET
NSString MarkerFormat { get; }
#else
string MarkerFormat { get; }
#endif

[Export ("listOptions")]
NSTextListOptions ListOptions { get; }

[Export ("markerForItemNumber:")]
string GetMarker (nint itemNum);

//Detected properties
[Export ("startingItemNumber")]
nint StartingItemNumber { get; set; }

}

[NoMacCatalyst]
enum NSTextListMarkerFormats
{
[Mac (10, 13)]
[Field ("NSTextListMarkerBox")]
Box,

[Mac (10, 13)]
[Field ("NSTextListMarkerCheck")]
Check,

[Mac (10, 13)]
[Field ("NSTextListMarkerCircle")]
Circle,

[Mac (10, 13)]
[Field ("NSTextListMarkerDiamond")]
Diamond,

[Mac (10, 13)]
[Field ("NSTextListMarkerDisc")]
Disc,

[Mac (10, 13)]
[Field ("NSTextListMarkerHyphen")]
Hyphen,

[Mac (10, 13)]
[Field ("NSTextListMarkerSquare")]
Square,

[Mac (10, 13)]
[Field ("NSTextListMarkerLowercaseHexadecimal")]
LowercaseHexadecimal,

[Mac (10, 13)]
[Field ("NSTextListMarkerUppercaseHexadecimal")]
UppercaseHexadecimal,

[Mac (10, 13)]
[Field ("NSTextListMarkerOctal")]
Octal,

[Mac (10, 13)]
[Field ("NSTextListMarkerLowercaseAlpha")]
LowercaseAlpha,

[Mac (10, 13)]
[Field ("NSTextListMarkerUppercaseAlpha")]
UppercaseAlpha,

[Mac (10, 13)]
[Field ("NSTextListMarkerLowercaseLatin")]
LowercaseLatin,

[Mac (10, 13)]
[Field ("NSTextListMarkerUppercaseLatin")]
UppercaseLatin,

[Mac (10, 13)]
[Field ("NSTextListMarkerLowercaseRoman")]
LowercaseRoman,

[Mac (10, 13)]
[Field ("NSTextListMarkerUppercaseRoman")]
UppercaseRoman,

[Mac (10, 13)]
[Field ("NSTextListMarkerDecimal")]
Decimal,
}

[NoMacCatalyst]
[BaseType (typeof (NSTextBlock))]
[DisableDefaultCtor]
Expand Down
2 changes: 1 addition & 1 deletion src/generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ public TrampolineInfo MakeTrampoline (Type t)
}

var rt = mi.ReturnType;
var rts = IsNativeEnum (rt) ? "var" : rt.ToString ();
var rts = IsNativeEnum (rt) ? "var" : RenderType (rt);
var trampoline_name = MakeTrampolineName (t);
var ti = new TrampolineInfo (userDelegate: FormatType (null, t),
delegateName: "D" + trampoline_name,
Expand Down
Loading