Skip to content

Commit

Permalink
[AppKit/UIKit] Share the implementation of more enums between AppKit …
Browse files Browse the repository at this point in the history
…and UIKit. (#12175)

* [AppKit/UIKit] Merge the definitions of NSTextLayoutOrientation.

* [AppKit/UIKit] Merge the definitions of NSTextScalingType.

* [AppKit/UIKit] Merge the definitions of NSTextStorageEditActions.
  • Loading branch information
rolfbjarne authored Jul 22, 2021
1 parent 23d3fa5 commit 4060387
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 46 deletions.
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

1 comment on commit 4060387

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on Build (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent
[AppKit/UIKit] Share the implementation of more enums between AppKit and UIKit. (#12175)

Please sign in to comment.