Skip to content
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
2 changes: 1 addition & 1 deletion src/CoreMidi/MidiBluetoothDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace CoreMidi {
[SupportedOSPlatform ("tvos16.0")]
[SupportedOSPlatform ("macos13.0")]
#else
[iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)]
[iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)]
#endif // NET
public partial class MidiBluetoothDriver {
[DllImport (Constants.CoreMidiLibrary)]
Expand Down
2 changes: 1 addition & 1 deletion src/CoreMidi/MidiCIDeviceIdentification.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !TVOS
#if !TVOS && !WATCH
#nullable enable

using System;
Expand Down
2 changes: 1 addition & 1 deletion src/CoreMidi/MidiCompat.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !TVOS
#if !TVOS && !WATCH
#if !NET

using System;
Expand Down
2 changes: 1 addition & 1 deletion src/CoreMidi/MidiServices.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !TVOS
#if !TVOS && !WATCH
//
// MidiServices.cs: Implementation of the MidiObject base class and its derivates
//
Expand Down
2 changes: 1 addition & 1 deletion src/CoreMidi/MidiThruConnection.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !TVOS
#if !TVOS && !WATCH
//
// MidiThruConnection.cs
//
Expand Down
2 changes: 1 addition & 1 deletion src/CoreMidi/MidiThruConnectionParams.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !TVOS
#if !TVOS && !WATCH
//
// MidiThruConnectionParams.cs: A C# wrapper around MidiThruConnectionParamsStruct
//
Expand Down
2 changes: 1 addition & 1 deletion src/bgen/Caches/TypeCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public TypeCache (MetadataLoadContext universe, Frameworks frameworks, PlatformN
CVPixelBuffer = ConditionalLookup (platformAssembly, "CoreVideo", "CVPixelBuffer");
CVPixelBufferPool = ConditionalLookup (platformAssembly, "CoreVideo", "CVPixelBufferPool");
}
if (frameworks.HaveCoreMidi && frameworks.CurrentPlatform != PlatformName.TvOS) // the struct is not present on tvos
if (frameworks.HaveCoreMidi && frameworks.CurrentPlatform != PlatformName.TvOS && frameworks.CurrentPlatform != PlatformName.WatchOS) // the struct is not present on tvos
MidiEndpoint = ConditionalLookup (platformAssembly, "CoreMidi", "MidiEndpoint");
if (frameworks.HaveMapKit)
MKCoordinateSpan = ConditionalLookup (platformAssembly, "MapKit", "MKCoordinateSpan", true /* isn't in XM/Classic */);
Expand Down
7 changes: 3 additions & 4 deletions src/build/generator-frameworks.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ partial class Frameworks {
"CoreLocation",
"CoreLocationUI",
"CoreMedia",
"CoreMIDI",
"CoreMidi",
"CoreML",
"CoreMotion",
"CoreNFC",
Expand Down Expand Up @@ -297,6 +297,7 @@ partial class Frameworks {
"CoreGraphics",
"CoreLocation",
"CoreMedia",
"CoreMidi",
"CoreML",
"CoreMotion",
"CoreText",
Expand Down Expand Up @@ -458,7 +459,7 @@ partial class Frameworks {
"CoreLocation",
"CoreLocationUI",
"CoreMedia",
"CoreMIDI",
"CoreMidi",
"CoreML",
"CoreMotion",
"CoreNFC",
Expand Down Expand Up @@ -592,7 +593,6 @@ partial class Frameworks {
bool? _CoreLocationUI;
bool? _CoreMedia;
bool? _CoreMidi;
bool? _CoreMIDI;
bool? _CoreML;
bool? _CoreMotion;
bool? _CoreNFC;
Expand Down Expand Up @@ -758,7 +758,6 @@ partial class Frameworks {
public bool HaveCoreLocationUI { get { if (!_CoreLocationUI.HasValue) _CoreLocationUI = GetValue ("CoreLocationUI"); return _CoreLocationUI.Value; } }
public bool HaveCoreMedia { get { if (!_CoreMedia.HasValue) _CoreMedia = GetValue ("CoreMedia"); return _CoreMedia.Value; } }
public bool HaveCoreMidi { get { if (!_CoreMidi.HasValue) _CoreMidi = GetValue ("CoreMidi"); return _CoreMidi.Value; } }
public bool HaveCoreMIDI { get { if (!_CoreMIDI.HasValue) _CoreMIDI = GetValue ("CoreMIDI"); return _CoreMIDI.Value; } }
public bool HaveCoreML { get { if (!_CoreML.HasValue) _CoreML = GetValue ("CoreML"); return _CoreML.Value; } }
public bool HaveCoreMotion { get { if (!_CoreMotion.HasValue) _CoreMotion = GetValue ("CoreMotion"); return _CoreMotion.Value; } }
public bool HaveCoreNFC { get { if (!_CoreNFC.HasValue) _CoreNFC = GetValue ("CoreNFC"); return _CoreNFC.Value; } }
Expand Down
30 changes: 15 additions & 15 deletions src/coremidi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
using NativeHandle = System.IntPtr;
#endif

#if TVOS
#if TVOS || WATCH
using MidiEndpoint = System.Object;
using MidiCIDeviceIdentification = System.Object;
using MidiCIDeviceIdentification_Blittable = System.Object;
Expand All @@ -57,15 +57,15 @@ public enum MidiNetworkConnectionPolicy : ulong {
Anyone,
}

[Mac (11, 0), iOS (14, 0), TV (15, 0)]
[Mac (11, 0), iOS (14, 0), TV (15, 0), Watch (8, 0)]
[MacCatalyst (14, 0)]
[NativeName ("MIDIProtocolID")]
public enum MidiProtocolId {
Protocol_1_0 = 1,
Protocol_2_0 = 2,
}

[Mac (11, 0), iOS (14, 0), TV (15, 0)]
[Mac (11, 0), iOS (14, 0), TV (15, 0), Watch (8, 0)]
[MacCatalyst (14, 0)]
[NativeName ("MIDICVStatus")]
public enum MidiCVStatus : uint {
Expand All @@ -87,7 +87,7 @@ public enum MidiCVStatus : uint {
PerNoteMgmt = 15,
}

[Mac (11, 0), iOS (14, 0), TV (15, 0)]
[Mac (11, 0), iOS (14, 0), TV (15, 0), Watch (8, 0)]
[MacCatalyst (14, 0)]
[NativeName ("MIDIMessageType")]
public enum MidiMessageType : uint {
Expand All @@ -100,7 +100,7 @@ public enum MidiMessageType : uint {
UnknownF = 15,
}

[Mac (11, 0), iOS (14, 0), TV (15, 0)]
[Mac (11, 0), iOS (14, 0), TV (15, 0), Watch (8, 0)]
[MacCatalyst (14, 0)]
[NativeName ("MIDISysExStatus")]
public enum MidiSysExStatus : uint {
Expand All @@ -112,7 +112,7 @@ public enum MidiSysExStatus : uint {
MixedDataSetPayload = 9,
}

[Mac (11, 0), iOS (14, 0), TV (15, 0)]
[Mac (11, 0), iOS (14, 0), TV (15, 0), Watch (8, 0)]
[MacCatalyst (14, 0)]
[NativeName ("MIDISystemStatus")]
public enum MidiSystemStatus : uint {
Expand All @@ -130,7 +130,7 @@ public enum MidiSystemStatus : uint {
SystemReset = 255,
}

[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)]
[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)]
[NativeName ("MIDINoteAttribute")]
public enum MidiNoteAttribute : byte {
None = 0,
Expand All @@ -139,22 +139,22 @@ public enum MidiNoteAttribute : byte {
Pitch = 3,
}

[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)]
[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)]
[NativeName ("MIDIPerNoteManagementOptions")]
[Flags]
public enum MidiPerNoteManagementOptions : byte {
Reset = 1 << 0,
Detach = 1 << 1,
}

[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)]
[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)]
[NativeName ("MIDIProgramChangeOptions")]
[Flags]
public enum MidiProgramChangeOptions : byte {
BankValid = 1 << 0,
}

[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)]
[iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)]
[NativeName ("MIDIUtilityStatus")]
public enum MidiUtilityStatus : uint {
Noop = 0,
Expand Down Expand Up @@ -432,7 +432,7 @@ interface MidiCISession {
MidiCIProfileSpecificDataHandler ProfileSpecificDataHandler { get; set; }
}

[Mac (11, 0), iOS (14, 0), NoTV]
[Mac (11, 0), iOS (14, 0), NoTV, NoWatch]
[MacCatalyst (14, 0)]
[BaseType (typeof (NSObject), Name = "MIDICIDeviceInfo")]
[DisableDefaultCtor]
Expand Down Expand Up @@ -464,7 +464,7 @@ interface MidiCIDeviceInfo : NSSecureCoding {
NativeHandle Constructor (MidiEndpoint midiDestination, NSData manufacturer, NSData family, NSData modelNumber, NSData revisionLevel);
}

[Mac (11, 0), iOS (14, 0), NoTV]
[Mac (11, 0), iOS (14, 0), NoTV, NoWatch]
[MacCatalyst (14, 0)]
[BaseType (typeof (NSObject), Name = "MIDICIDiscoveredNode")]
[DisableDefaultCtor]
Expand Down Expand Up @@ -492,7 +492,7 @@ interface MidiCIDiscoveredNode : NSSecureCoding {

delegate void MidiCIDiscoveryResponseDelegate (MidiCIDiscoveredNode [] discoveredNodes);

[Mac (11, 0), iOS (14, 0), NoTV]
[Mac (11, 0), iOS (14, 0), NoTV, NoWatch]
[MacCatalyst (14, 0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "MIDICIDiscoveryManager")]
Expand All @@ -507,7 +507,7 @@ interface MidiCIDiscoveryManager {

interface IMidiCIProfileResponderDelegate { }

[Mac (11, 0), iOS (14, 0), NoTV]
[Mac (11, 0), iOS (14, 0), NoTV, NoWatch]
[MacCatalyst (14, 0)]
#if NET
[Protocol, Model]
Expand All @@ -531,7 +531,7 @@ interface MidiCIProfileResponderDelegate {
void HandleData (MidiCIProfile profile, byte channel, NSData inData);
}

[Mac (11, 0), iOS (14, 0), NoTV]
[Mac (11, 0), iOS (14, 0), NoTV, NoWatch]
[MacCatalyst (14, 0)]
[BaseType (typeof (NSObject), Name = "MIDICIResponder")]
[DisableDefaultCtor]
Expand Down
5 changes: 1 addition & 4 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ COMMON_FRAMEWORKS = \
CoreFoundation \
CoreMedia \
CoreML \
CoreMidi \
CoreVideo \
Compression \
DeviceCheck \
Expand Down Expand Up @@ -2054,7 +2055,6 @@ MACOS_FRAMEWORKS = \
CoreGraphics \
CoreImage \
CoreLocation \
CoreMidi \
CoreMotion \
CoreServices \
CoreSpotlight \
Expand Down Expand Up @@ -2172,7 +2172,6 @@ IOS_FRAMEWORKS = \
CoreImage \
CoreLocation \
CoreLocationUI \
CoreMIDI \
CoreMotion \
CoreNFC \
CoreSpotlight \
Expand Down Expand Up @@ -2301,7 +2300,6 @@ TVOS_FRAMEWORKS = \
CoreHaptics \
CoreImage \
CoreLocation \
CoreMidi \
CoreSpotlight \
CoreText \
ExternalAccessory \
Expand Down Expand Up @@ -2375,7 +2373,6 @@ MACCATALYST_FRAMEWORKS = \
CoreImage \
CoreLocation \
CoreLocationUI \
CoreMIDI \
CoreMotion \
CoreNFC \
CoreSpotlight \
Expand Down
1 change: 1 addition & 0 deletions src/rsp/watchos-defines.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
-d:HAS_COREGRAPHICS
-d:HAS_CORELOCATION
-d:HAS_COREMEDIA
-d:HAS_COREMIDI
-d:HAS_COREML
-d:HAS_COREMOTION
-d:HAS_CORETEXT
Expand Down
12 changes: 0 additions & 12 deletions tests/xtro-sharpie/watchOS-CoreMIDI.ignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# CoreMIDI not supported for watch in Xcode14
!missing-enum! MIDICVStatus not bound
!missing-enum! MIDIMessageType not bound
!missing-enum! MIDINetworkConnectionPolicy not bound
!missing-enum! MIDINoteAttribute not bound
!missing-enum! MIDINotificationMessageID not bound
!missing-enum! MIDIObjectType not bound
!missing-enum! MIDIPerNoteManagementOptions not bound
!missing-enum! MIDIProgramChangeOptions not bound
!missing-enum! MIDIProtocolID not bound
!missing-enum! MIDISysExStatus not bound
!missing-enum! MIDISystemStatus not bound
!missing-enum! MIDITransformControlType not bound
!missing-enum! MIDITransformType not bound
!missing-enum! MIDIUtilityStatus not bound
!missing-pinvoke! MIDIBluetoothDriverActivateAllConnections is not bound
!missing-pinvoke! MIDIBluetoothDriverDisconnect is not bound
1 change: 1 addition & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build)
#if !NET
{ "Chip", "CHIP", new Version (8, 0), NotAvailableInSimulator /* no headers in beta 2 */ },
#endif
{ "CoreMidi", "CoreMIDI", 8,0 },
{ "NearbyInteraction", "NearbyInteraction", 8,0 },
{ "OSLog", "OSLog", 8,0 },
{ "ShazamKit", "ShazamKit", new Version (8, 0), NotAvailableInSimulator},
Expand Down