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

[AppKit/UIKit] Share the implementation of more enums between AppKit and UIKit. #12175

Merged
merged 3 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 0 additions & 9 deletions src/AppKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1423,15 +1423,6 @@ public enum NSTextStorageEditedFlags : ulong {
}
#endif

[Mac (10,11)]
[Native]
[Flags]
public enum NSTextStorageEditActions : ulong
{
Attributes = (1 << 0),
Characters = (1 << 1)
}

[Native]
public enum NSPrinterTableStatus : ulong {
Ok, NotFound, Error
Expand Down
6 changes: 0 additions & 6 deletions src/AppKit/XEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@

namespace AppKit {

[Native]
public enum NSTextLayoutOrientation : long {
Horizontal,
Vertical
}

[Native]
public enum NSPrintRenderingQuality : long {
Best,
Expand Down
23 changes: 0 additions & 23 deletions src/UIKit/UIEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1297,22 +1297,6 @@ public enum UINavigationControllerOperation : long {
None, Push, Pop
}

// NSInteger -> NSLayoutManager.h
[Native]
[NoWatch]
public enum NSTextLayoutOrientation : long {
Horizontal, Vertical
}

// NSUInteger -> NSTextStorage.h
[Native]
[Flags]
[NoWatch]
public enum NSTextStorageEditActions : ulong {
Attributes = 1,
Characters = 2
}

// NSInteger -> UIActivity.h
[Native]
[NoTV][NoWatch]
Expand Down Expand Up @@ -2313,13 +2297,6 @@ public enum UIImageSymbolWeight : long
Black,
}

[Mac (10,15), iOS (13,0), TV (13,0)]
[Native]
public enum NSTextScalingType : long {
Standard = 0,
iOS,
}

[iOS (13,0), TV (13,0), NoWatch]
[Native]
public enum UISceneActivationState : long {
Expand Down
8 changes: 0 additions & 8 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26278,14 +26278,6 @@ interface NSWindowTabGroup
void Remove (NSWindow window);
}

[Mac (10,15)]
[Native]
public enum NSTextScalingType : long
{
Standard = 0,
iOS,
}

[Mac (10,15)]
[BaseType (typeof(NSTouchBarItem))]
[DisableDefaultCtor]
Expand Down
28 changes: 28 additions & 0 deletions src/xkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,34 @@ public enum NSRectAlignment : long
TopTrailing,
}

[Mac (10,15), iOS (13,0), TV (13,0)]
[MacCatalyst (13,0)]
[Native]
public enum NSTextScalingType : long
{
Standard = 0,
iOS,
}

// NSInteger -> NSLayoutManager.h
[Native]
[NoWatch]
[MacCatalyst (13,0)]
public enum NSTextLayoutOrientation : long {
Horizontal,
Vertical,
}

// NSUInteger -> NSTextStorage.h
[Mac (10,11)]
[Native]
[Flags]
[NoWatch]
public enum NSTextStorageEditActions : ulong {
Attributes = 1,
Characters = 2,
}

[NoWatch] // Header is not present in watchOS SDK.
[iOS (7,0)]
[DesignatedDefaultCtor]
Expand Down