1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;
use crate::*;
#[cfg(feature = "objc2")]
extern_class!(
/// An object representing a Function Block.
///
///
/// A Function Block encapsulates one or more UMP groups with a single function, allowing
/// agents communicating with that UMP Endpoint to route and process UMP traffic
/// properly. Unless the owning MIDIUMPEndpoint has a static Function Block configuration,
/// any Function Block metadata may change in response to a configuration change in the
/// owning UMP endpoint.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpfunctionblock?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct MIDIUMPFunctionBlock;
);
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for MIDIUMPFunctionBlock {}
);
#[cfg(feature = "objc2")]
impl MIDIUMPFunctionBlock {
extern_methods!(
#[cfg(feature = "objc2-foundation")]
/// A string containing the Function Block's name.
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[cfg(all(feature = "MIDIMessages", feature = "MIDIUMPCI"))]
/// The device-unique ID for this Function Block.
#[unsafe(method(functionBlockID))]
#[unsafe(method_family = none)]
pub unsafe fn functionBlockID(&self) -> MIDIUMPFunctionBlockID;
#[cfg(feature = "MIDIMessages")]
/// The direction of the Function Block: input, output, or bidirectional.
#[unsafe(method(direction))]
#[unsafe(method_family = none)]
pub unsafe fn direction(&self) -> MIDIUMPFunctionBlockDirection;
#[cfg(feature = "MIDIMessages")]
/// The first Group spanned by this Function Block.
#[unsafe(method(firstGroup))]
#[unsafe(method_family = none)]
pub unsafe fn firstGroup(&self) -> MIDIUMPGroupNumber;
#[cfg(feature = "MIDIMessages")]
/// The total number of groups spanned by this Function Block.
#[unsafe(method(totalGroupsSpanned))]
#[unsafe(method_family = none)]
pub unsafe fn totalGroupsSpanned(&self) -> MIDIUInteger7;
/// The maximum number of simultaneous Sysex8 streams.
#[unsafe(method(maxSysEx8Streams))]
#[unsafe(method_family = none)]
pub unsafe fn maxSysEx8Streams(&self) -> u8;
#[cfg(feature = "MIDIMessages")]
/// MIDI 1.0 speed information.
#[unsafe(method(MIDI1Info))]
#[unsafe(method_family = none)]
pub unsafe fn MIDI1Info(&self) -> MIDIUMPFunctionBlockMIDI1Info;
#[cfg(feature = "MIDIMessages")]
/// A hint for UI about the primary usage of this Function Block.
#[unsafe(method(UIHint))]
#[unsafe(method_family = none)]
pub unsafe fn UIHint(&self) -> MIDIUMPFunctionBlockUIHint;
#[cfg(feature = "MIDIUMPEndpoint")]
/// The UMP Endpoint to which this Function Block is registered.
///
///
/// If the function block does not belong to an endpoint this property will be nil.
#[unsafe(method(UMPEndpoint))]
#[unsafe(method_family = none)]
pub unsafe fn UMPEndpoint(&self) -> Option<Retained<MIDIUMPEndpoint>>;
#[cfg(feature = "MIDICIDevice")]
/// Retrieve the MIDICIDevice class interface if the Function Block supports MIDI-CI.
///
///
/// If a Function Block was created as a MIDICIDevice object, this property will
/// provide an in-place MIDICIDevice interface that may be used with MIDI-CI API. If the
/// device was not created as a MIDICIDevice, this method returns nil.
#[unsafe(method(midiCIDevice))]
#[unsafe(method_family = none)]
pub unsafe fn midiCIDevice(&self) -> Option<Retained<MIDICIDevice>>;
/// The enable state of this Function Block.
#[unsafe(method(isEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isEnabled(&self) -> bool;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
#[cfg(feature = "objc2")]
impl MIDIUMPFunctionBlock {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}