pub unsafe extern "C-unwind" fn MIDIDeviceAddEntity(
device: MIDIDeviceRef,
name: &CFString,
embedded: bool,
num_source_endpoints: c_ulong,
num_destination_endpoints: c_ulong,
new_entity: NonNull<MIDIEntityRef>,
) -> i32๐Deprecated
Available on crate features
MIDIServices and MIDISetup and objc2-core-foundation only.Expand description
Drivers call this function to specify one of the entities that comprise a device.
Non-drivers may call this function as of CoreMIDI 1.1 to add entities to external devices.
Parameter device: The device to which an entity is to be added.
Parameter name: The name of the new entity.
Parameter embedded: True if this entity is inside the device, false if the
entity simply consists of external connectors to which
other devices can be attached.
Parameter numSourceEndpoints: The number of source endpoints the entity has.
Parameter numDestinationEndpoints: The number of destination endpoints the entity has.
Parameter newEntity: On successful return, points to the newly-created entity.
Returns: An OSStatus result code.
ยงSafety
new_entity must be a valid pointer.