From c6efb26432f255486f6c59a72f66325723be1099 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 16 Dec 2021 07:40:58 +0100 Subject: [PATCH] [AppKit] Make sure NSFunctionKey doesn't come into Mac Catalyst in .NET. (#13582) If NSFunctionKey isn't in Mac Catalyst in legacy Xamarin, it shouldn't be in .NET either, so adjust the conditional logic accordingly. Also make the NSFunctionKey enum a non-native enum in .NET, like it's in the headers. --- src/AppKit/Enums.cs | 3 ++- tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index d139d85e14..dd120de50a 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -674,8 +674,9 @@ namespace AppKit { UpArrow = 0x7E } -#if !XAMCORE_4_0 + // This is an untyped enum in AppKit's NSEvent.h [NoMacCatalyst] +#if !NET [Native] public enum NSFunctionKey : ulong { #else diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore index f8e3f1810c..01ff5bce98 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore @@ -283,7 +283,6 @@ !unknown-native-enum! NSComposite bound !unknown-native-enum! NSEventModifierMask bound !unknown-native-enum! NSFontPanelMode bound -!unknown-native-enum! NSFunctionKey bound !unknown-native-enum! NSImageScale bound !unknown-native-enum! NSMenuProperty bound !unknown-native-enum! NSPanelButtonType bound