objc2_avf_audio/generated/
AVMusicEvents.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct AVMusicEvent;
19);
20
21unsafe impl NSObjectProtocol for AVMusicEvent {}
22
23impl AVMusicEvent {
24 extern_methods!();
25}
26
27impl AVMusicEvent {
29 extern_methods!(
30 #[unsafe(method(init))]
31 #[unsafe(method_family = init)]
32 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
33
34 #[unsafe(method(new))]
35 #[unsafe(method_family = new)]
36 pub unsafe fn new() -> Retained<Self>;
37 );
38}
39
40extern_class!(
41 #[unsafe(super(AVMusicEvent, NSObject))]
56 #[derive(Debug, PartialEq, Eq, Hash)]
57 pub struct AVMIDINoteEvent;
58);
59
60unsafe impl NSObjectProtocol for AVMIDINoteEvent {}
61
62impl AVMIDINoteEvent {
63 extern_methods!(
64 #[cfg(feature = "AVAudioTypes")]
65 #[unsafe(method(initWithChannel:key:velocity:duration:))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn initWithChannel_key_velocity_duration(
77 this: Allocated<Self>,
78 channel: u32,
79 key_num: u32,
80 velocity: u32,
81 duration: AVMusicTimeStamp,
82 ) -> Retained<Self>;
83
84 #[unsafe(method(channel))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn channel(&self) -> u32;
88
89 #[unsafe(method(setChannel:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setChannel(&self, channel: u32);
93
94 #[unsafe(method(key))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn key(&self) -> u32;
98
99 #[unsafe(method(setKey:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setKey(&self, key: u32);
103
104 #[unsafe(method(velocity))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn velocity(&self) -> u32;
108
109 #[unsafe(method(setVelocity:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn setVelocity(&self, velocity: u32);
113
114 #[cfg(feature = "AVAudioTypes")]
115 #[unsafe(method(duration))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn duration(&self) -> AVMusicTimeStamp;
119
120 #[cfg(feature = "AVAudioTypes")]
121 #[unsafe(method(setDuration:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn setDuration(&self, duration: AVMusicTimeStamp);
125 );
126}
127
128impl AVMIDINoteEvent {
130 extern_methods!(
131 #[unsafe(method(init))]
132 #[unsafe(method_family = init)]
133 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
134
135 #[unsafe(method(new))]
136 #[unsafe(method_family = new)]
137 pub unsafe fn new() -> Retained<Self>;
138 );
139}
140
141extern_class!(
142 #[unsafe(super(AVMusicEvent, NSObject))]
146 #[derive(Debug, PartialEq, Eq, Hash)]
147 pub struct AVMIDIChannelEvent;
148);
149
150unsafe impl NSObjectProtocol for AVMIDIChannelEvent {}
151
152impl AVMIDIChannelEvent {
153 extern_methods!(
154 #[unsafe(method(channel))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn channel(&self) -> u32;
158
159 #[unsafe(method(setChannel:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn setChannel(&self, channel: u32);
163 );
164}
165
166impl AVMIDIChannelEvent {
168 extern_methods!(
169 #[unsafe(method(init))]
170 #[unsafe(method_family = init)]
171 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
172
173 #[unsafe(method(new))]
174 #[unsafe(method_family = new)]
175 pub unsafe fn new() -> Retained<Self>;
176 );
177}
178
179#[repr(transparent)]
184#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
185pub struct AVMIDIControlChangeMessageType(pub NSInteger);
186impl AVMIDIControlChangeMessageType {
187 #[doc(alias = "AVMIDIControlChangeMessageTypeBankSelect")]
188 pub const BankSelect: Self = Self(0);
189 #[doc(alias = "AVMIDIControlChangeMessageTypeModWheel")]
190 pub const ModWheel: Self = Self(1);
191 #[doc(alias = "AVMIDIControlChangeMessageTypeBreath")]
192 pub const Breath: Self = Self(2);
193 #[doc(alias = "AVMIDIControlChangeMessageTypeFoot")]
194 pub const Foot: Self = Self(4);
195 #[doc(alias = "AVMIDIControlChangeMessageTypePortamentoTime")]
196 pub const PortamentoTime: Self = Self(5);
197 #[doc(alias = "AVMIDIControlChangeMessageTypeDataEntry")]
198 pub const DataEntry: Self = Self(6);
199 #[doc(alias = "AVMIDIControlChangeMessageTypeVolume")]
200 pub const Volume: Self = Self(7);
201 #[doc(alias = "AVMIDIControlChangeMessageTypeBalance")]
202 pub const Balance: Self = Self(8);
203 #[doc(alias = "AVMIDIControlChangeMessageTypePan")]
204 pub const Pan: Self = Self(10);
205 #[doc(alias = "AVMIDIControlChangeMessageTypeExpression")]
206 pub const Expression: Self = Self(11);
207 #[doc(alias = "AVMIDIControlChangeMessageTypeSustain")]
208 pub const Sustain: Self = Self(64);
209 #[doc(alias = "AVMIDIControlChangeMessageTypePortamento")]
210 pub const Portamento: Self = Self(65);
211 #[doc(alias = "AVMIDIControlChangeMessageTypeSostenuto")]
212 pub const Sostenuto: Self = Self(66);
213 #[doc(alias = "AVMIDIControlChangeMessageTypeSoft")]
214 pub const Soft: Self = Self(67);
215 #[doc(alias = "AVMIDIControlChangeMessageTypeLegatoPedal")]
216 pub const LegatoPedal: Self = Self(68);
217 #[doc(alias = "AVMIDIControlChangeMessageTypeHold2Pedal")]
218 pub const Hold2Pedal: Self = Self(69);
219 #[doc(alias = "AVMIDIControlChangeMessageTypeFilterResonance")]
220 pub const FilterResonance: Self = Self(71);
221 #[doc(alias = "AVMIDIControlChangeMessageTypeReleaseTime")]
222 pub const ReleaseTime: Self = Self(72);
223 #[doc(alias = "AVMIDIControlChangeMessageTypeAttackTime")]
224 pub const AttackTime: Self = Self(73);
225 #[doc(alias = "AVMIDIControlChangeMessageTypeBrightness")]
226 pub const Brightness: Self = Self(74);
227 #[doc(alias = "AVMIDIControlChangeMessageTypeDecayTime")]
228 pub const DecayTime: Self = Self(75);
229 #[doc(alias = "AVMIDIControlChangeMessageTypeVibratoRate")]
230 pub const VibratoRate: Self = Self(76);
231 #[doc(alias = "AVMIDIControlChangeMessageTypeVibratoDepth")]
232 pub const VibratoDepth: Self = Self(77);
233 #[doc(alias = "AVMIDIControlChangeMessageTypeVibratoDelay")]
234 pub const VibratoDelay: Self = Self(78);
235 #[doc(alias = "AVMIDIControlChangeMessageTypeReverbLevel")]
236 pub const ReverbLevel: Self = Self(91);
237 #[doc(alias = "AVMIDIControlChangeMessageTypeChorusLevel")]
238 pub const ChorusLevel: Self = Self(93);
239 #[doc(alias = "AVMIDIControlChangeMessageTypeRPN_LSB")]
240 pub const RPN_LSB: Self = Self(100);
241 #[doc(alias = "AVMIDIControlChangeMessageTypeRPN_MSB")]
242 pub const RPN_MSB: Self = Self(101);
243 #[doc(alias = "AVMIDIControlChangeMessageTypeAllSoundOff")]
244 pub const AllSoundOff: Self = Self(120);
245 #[doc(alias = "AVMIDIControlChangeMessageTypeResetAllControllers")]
246 pub const ResetAllControllers: Self = Self(121);
247 #[doc(alias = "AVMIDIControlChangeMessageTypeAllNotesOff")]
248 pub const AllNotesOff: Self = Self(123);
249 #[doc(alias = "AVMIDIControlChangeMessageTypeOmniModeOff")]
250 pub const OmniModeOff: Self = Self(124);
251 #[doc(alias = "AVMIDIControlChangeMessageTypeOmniModeOn")]
252 pub const OmniModeOn: Self = Self(125);
253 #[doc(alias = "AVMIDIControlChangeMessageTypeMonoModeOn")]
254 pub const MonoModeOn: Self = Self(126);
255 #[doc(alias = "AVMIDIControlChangeMessageTypeMonoModeOff")]
256 pub const MonoModeOff: Self = Self(127);
257}
258
259unsafe impl Encode for AVMIDIControlChangeMessageType {
260 const ENCODING: Encoding = NSInteger::ENCODING;
261}
262
263unsafe impl RefEncode for AVMIDIControlChangeMessageType {
264 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
265}
266
267extern_class!(
268 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
272 #[derive(Debug, PartialEq, Eq, Hash)]
273 pub struct AVMIDIControlChangeEvent;
274);
275
276unsafe impl NSObjectProtocol for AVMIDIControlChangeEvent {}
277
278impl AVMIDIControlChangeEvent {
279 extern_methods!(
280 #[unsafe(method(initWithChannel:messageType:value:))]
288 #[unsafe(method_family = init)]
289 pub unsafe fn initWithChannel_messageType_value(
290 this: Allocated<Self>,
291 channel: u32,
292 message_type: AVMIDIControlChangeMessageType,
293 value: u32,
294 ) -> Retained<Self>;
295
296 #[unsafe(method(messageType))]
298 #[unsafe(method_family = none)]
299 pub unsafe fn messageType(&self) -> AVMIDIControlChangeMessageType;
300
301 #[unsafe(method(value))]
303 #[unsafe(method_family = none)]
304 pub unsafe fn value(&self) -> u32;
305 );
306}
307
308impl AVMIDIControlChangeEvent {
310 extern_methods!(
311 #[unsafe(method(init))]
312 #[unsafe(method_family = init)]
313 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
314
315 #[unsafe(method(new))]
316 #[unsafe(method_family = new)]
317 pub unsafe fn new() -> Retained<Self>;
318 );
319}
320
321extern_class!(
322 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
326 #[derive(Debug, PartialEq, Eq, Hash)]
327 pub struct AVMIDIPolyPressureEvent;
328);
329
330unsafe impl NSObjectProtocol for AVMIDIPolyPressureEvent {}
331
332impl AVMIDIPolyPressureEvent {
333 extern_methods!(
334 #[unsafe(method(initWithChannel:key:pressure:))]
342 #[unsafe(method_family = init)]
343 pub unsafe fn initWithChannel_key_pressure(
344 this: Allocated<Self>,
345 channel: u32,
346 key: u32,
347 pressure: u32,
348 ) -> Retained<Self>;
349
350 #[unsafe(method(key))]
352 #[unsafe(method_family = none)]
353 pub unsafe fn key(&self) -> u32;
354
355 #[unsafe(method(setKey:))]
357 #[unsafe(method_family = none)]
358 pub unsafe fn setKey(&self, key: u32);
359
360 #[unsafe(method(pressure))]
362 #[unsafe(method_family = none)]
363 pub unsafe fn pressure(&self) -> u32;
364
365 #[unsafe(method(setPressure:))]
367 #[unsafe(method_family = none)]
368 pub unsafe fn setPressure(&self, pressure: u32);
369 );
370}
371
372impl AVMIDIPolyPressureEvent {
374 extern_methods!(
375 #[unsafe(method(init))]
376 #[unsafe(method_family = init)]
377 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
378
379 #[unsafe(method(new))]
380 #[unsafe(method_family = new)]
381 pub unsafe fn new() -> Retained<Self>;
382 );
383}
384
385extern_class!(
386 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
392 #[derive(Debug, PartialEq, Eq, Hash)]
393 pub struct AVMIDIProgramChangeEvent;
394);
395
396unsafe impl NSObjectProtocol for AVMIDIProgramChangeEvent {}
397
398impl AVMIDIProgramChangeEvent {
399 extern_methods!(
400 #[unsafe(method(initWithChannel:programNumber:))]
409 #[unsafe(method_family = init)]
410 pub unsafe fn initWithChannel_programNumber(
411 this: Allocated<Self>,
412 channel: u32,
413 program_number: u32,
414 ) -> Retained<Self>;
415
416 #[unsafe(method(programNumber))]
418 #[unsafe(method_family = none)]
419 pub unsafe fn programNumber(&self) -> u32;
420
421 #[unsafe(method(setProgramNumber:))]
423 #[unsafe(method_family = none)]
424 pub unsafe fn setProgramNumber(&self, program_number: u32);
425 );
426}
427
428impl AVMIDIProgramChangeEvent {
430 extern_methods!(
431 #[unsafe(method(init))]
432 #[unsafe(method_family = init)]
433 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
434
435 #[unsafe(method(new))]
436 #[unsafe(method_family = new)]
437 pub unsafe fn new() -> Retained<Self>;
438 );
439}
440
441extern_class!(
442 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
449 #[derive(Debug, PartialEq, Eq, Hash)]
450 pub struct AVMIDIChannelPressureEvent;
451);
452
453unsafe impl NSObjectProtocol for AVMIDIChannelPressureEvent {}
454
455impl AVMIDIChannelPressureEvent {
456 extern_methods!(
457 #[unsafe(method(initWithChannel:pressure:))]
463 #[unsafe(method_family = init)]
464 pub unsafe fn initWithChannel_pressure(
465 this: Allocated<Self>,
466 channel: u32,
467 pressure: u32,
468 ) -> Retained<Self>;
469
470 #[unsafe(method(pressure))]
472 #[unsafe(method_family = none)]
473 pub unsafe fn pressure(&self) -> u32;
474
475 #[unsafe(method(setPressure:))]
477 #[unsafe(method_family = none)]
478 pub unsafe fn setPressure(&self, pressure: u32);
479 );
480}
481
482impl AVMIDIChannelPressureEvent {
484 extern_methods!(
485 #[unsafe(method(init))]
486 #[unsafe(method_family = init)]
487 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
488
489 #[unsafe(method(new))]
490 #[unsafe(method_family = new)]
491 pub unsafe fn new() -> Retained<Self>;
492 );
493}
494
495extern_class!(
496 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
503 #[derive(Debug, PartialEq, Eq, Hash)]
504 pub struct AVMIDIPitchBendEvent;
505);
506
507unsafe impl NSObjectProtocol for AVMIDIPitchBendEvent {}
508
509impl AVMIDIPitchBendEvent {
510 extern_methods!(
511 #[unsafe(method(initWithChannel:value:))]
517 #[unsafe(method_family = init)]
518 pub unsafe fn initWithChannel_value(
519 this: Allocated<Self>,
520 channel: u32,
521 value: u32,
522 ) -> Retained<Self>;
523
524 #[unsafe(method(value))]
526 #[unsafe(method_family = none)]
527 pub unsafe fn value(&self) -> u32;
528
529 #[unsafe(method(setValue:))]
531 #[unsafe(method_family = none)]
532 pub unsafe fn setValue(&self, value: u32);
533 );
534}
535
536impl AVMIDIPitchBendEvent {
538 extern_methods!(
539 #[unsafe(method(init))]
540 #[unsafe(method_family = init)]
541 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
542
543 #[unsafe(method(new))]
544 #[unsafe(method_family = new)]
545 pub unsafe fn new() -> Retained<Self>;
546 );
547}
548
549extern_class!(
550 #[unsafe(super(AVMusicEvent, NSObject))]
556 #[derive(Debug, PartialEq, Eq, Hash)]
557 pub struct AVMIDISysexEvent;
558);
559
560unsafe impl NSObjectProtocol for AVMIDISysexEvent {}
561
562impl AVMIDISysexEvent {
563 extern_methods!(
564 #[unsafe(method(initWithData:))]
568 #[unsafe(method_family = init)]
569 pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Retained<Self>;
570
571 #[unsafe(method(sizeInBytes))]
573 #[unsafe(method_family = none)]
574 pub unsafe fn sizeInBytes(&self) -> u32;
575 );
576}
577
578impl AVMIDISysexEvent {
580 extern_methods!(
581 #[unsafe(method(init))]
582 #[unsafe(method_family = init)]
583 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
584
585 #[unsafe(method(new))]
586 #[unsafe(method_family = new)]
587 pub unsafe fn new() -> Retained<Self>;
588 );
589}
590
591#[repr(transparent)]
596#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
597pub struct AVMIDIMetaEventType(pub NSInteger);
598impl AVMIDIMetaEventType {
599 #[doc(alias = "AVMIDIMetaEventTypeSequenceNumber")]
600 pub const SequenceNumber: Self = Self(0x00);
601 #[doc(alias = "AVMIDIMetaEventTypeText")]
602 pub const Text: Self = Self(0x01);
603 #[doc(alias = "AVMIDIMetaEventTypeCopyright")]
604 pub const Copyright: Self = Self(0x02);
605 #[doc(alias = "AVMIDIMetaEventTypeTrackName")]
606 pub const TrackName: Self = Self(0x03);
607 #[doc(alias = "AVMIDIMetaEventTypeInstrument")]
608 pub const Instrument: Self = Self(0x04);
609 #[doc(alias = "AVMIDIMetaEventTypeLyric")]
610 pub const Lyric: Self = Self(0x05);
611 #[doc(alias = "AVMIDIMetaEventTypeMarker")]
612 pub const Marker: Self = Self(0x06);
613 #[doc(alias = "AVMIDIMetaEventTypeCuePoint")]
614 pub const CuePoint: Self = Self(0x07);
615 #[doc(alias = "AVMIDIMetaEventTypeMidiChannel")]
616 pub const MidiChannel: Self = Self(0x20);
617 #[doc(alias = "AVMIDIMetaEventTypeMidiPort")]
618 pub const MidiPort: Self = Self(0x21);
619 #[doc(alias = "AVMIDIMetaEventTypeEndOfTrack")]
620 pub const EndOfTrack: Self = Self(0x2f);
621 #[doc(alias = "AVMIDIMetaEventTypeTempo")]
622 pub const Tempo: Self = Self(0x51);
623 #[doc(alias = "AVMIDIMetaEventTypeSmpteOffset")]
624 pub const SmpteOffset: Self = Self(0x54);
625 #[doc(alias = "AVMIDIMetaEventTypeTimeSignature")]
626 pub const TimeSignature: Self = Self(0x58);
627 #[doc(alias = "AVMIDIMetaEventTypeKeySignature")]
628 pub const KeySignature: Self = Self(0x59);
629 #[doc(alias = "AVMIDIMetaEventTypeProprietaryEvent")]
630 pub const ProprietaryEvent: Self = Self(0x7f);
631}
632
633unsafe impl Encode for AVMIDIMetaEventType {
634 const ENCODING: Encoding = NSInteger::ENCODING;
635}
636
637unsafe impl RefEncode for AVMIDIMetaEventType {
638 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
639}
640
641extern_class!(
642 #[unsafe(super(AVMusicEvent, NSObject))]
653 #[derive(Debug, PartialEq, Eq, Hash)]
654 pub struct AVMIDIMetaEvent;
655);
656
657unsafe impl NSObjectProtocol for AVMIDIMetaEvent {}
658
659impl AVMIDIMetaEvent {
660 extern_methods!(
661 #[unsafe(method(initWithType:data:))]
667 #[unsafe(method_family = init)]
668 pub unsafe fn initWithType_data(
669 this: Allocated<Self>,
670 r#type: AVMIDIMetaEventType,
671 data: &NSData,
672 ) -> Retained<Self>;
673
674 #[unsafe(method(type))]
676 #[unsafe(method_family = none)]
677 pub unsafe fn r#type(&self) -> AVMIDIMetaEventType;
678 );
679}
680
681impl AVMIDIMetaEvent {
683 extern_methods!(
684 #[unsafe(method(init))]
685 #[unsafe(method_family = init)]
686 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
687
688 #[unsafe(method(new))]
689 #[unsafe(method_family = new)]
690 pub unsafe fn new() -> Retained<Self>;
691 );
692}
693
694extern_class!(
695 #[unsafe(super(AVMusicEvent, NSObject))]
704 #[derive(Debug, PartialEq, Eq, Hash)]
705 pub struct AVMusicUserEvent;
706);
707
708unsafe impl NSObjectProtocol for AVMusicUserEvent {}
709
710impl AVMusicUserEvent {
711 extern_methods!(
712 #[unsafe(method(initWithData:))]
716 #[unsafe(method_family = init)]
717 pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Retained<Self>;
718
719 #[unsafe(method(sizeInBytes))]
721 #[unsafe(method_family = none)]
722 pub unsafe fn sizeInBytes(&self) -> u32;
723 );
724}
725
726impl AVMusicUserEvent {
728 extern_methods!(
729 #[unsafe(method(init))]
730 #[unsafe(method_family = init)]
731 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
732
733 #[unsafe(method(new))]
734 #[unsafe(method_family = new)]
735 pub unsafe fn new() -> Retained<Self>;
736 );
737}
738
739extern "C" {
740 pub static AVExtendedNoteOnEventDefaultInstrument: u32;
746}
747
748extern_class!(
749 #[unsafe(super(AVMusicEvent, NSObject))]
758 #[derive(Debug, PartialEq, Eq, Hash)]
759 pub struct AVExtendedNoteOnEvent;
760);
761
762unsafe impl NSObjectProtocol for AVExtendedNoteOnEvent {}
763
764impl AVExtendedNoteOnEvent {
765 extern_methods!(
766 #[cfg(feature = "AVAudioTypes")]
767 #[unsafe(method(initWithMIDINote:velocity:groupID:duration:))]
779 #[unsafe(method_family = init)]
780 pub unsafe fn initWithMIDINote_velocity_groupID_duration(
781 this: Allocated<Self>,
782 midi_note: c_float,
783 velocity: c_float,
784 group_id: u32,
785 duration: AVMusicTimeStamp,
786 ) -> Retained<Self>;
787
788 #[cfg(feature = "AVAudioTypes")]
789 #[unsafe(method(initWithMIDINote:velocity:instrumentID:groupID:duration:))]
795 #[unsafe(method_family = init)]
796 pub unsafe fn initWithMIDINote_velocity_instrumentID_groupID_duration(
797 this: Allocated<Self>,
798 midi_note: c_float,
799 velocity: c_float,
800 instrument_id: u32,
801 group_id: u32,
802 duration: AVMusicTimeStamp,
803 ) -> Retained<Self>;
804
805 #[unsafe(method(midiNote))]
809 #[unsafe(method_family = none)]
810 pub unsafe fn midiNote(&self) -> c_float;
811
812 #[unsafe(method(setMidiNote:))]
814 #[unsafe(method_family = none)]
815 pub unsafe fn setMidiNote(&self, midi_note: c_float);
816
817 #[unsafe(method(velocity))]
821 #[unsafe(method_family = none)]
822 pub unsafe fn velocity(&self) -> c_float;
823
824 #[unsafe(method(setVelocity:))]
826 #[unsafe(method_family = none)]
827 pub unsafe fn setVelocity(&self, velocity: c_float);
828
829 #[unsafe(method(instrumentID))]
831 #[unsafe(method_family = none)]
832 pub unsafe fn instrumentID(&self) -> u32;
833
834 #[unsafe(method(setInstrumentID:))]
836 #[unsafe(method_family = none)]
837 pub unsafe fn setInstrumentID(&self, instrument_id: u32);
838
839 #[unsafe(method(groupID))]
843 #[unsafe(method_family = none)]
844 pub unsafe fn groupID(&self) -> u32;
845
846 #[unsafe(method(setGroupID:))]
848 #[unsafe(method_family = none)]
849 pub unsafe fn setGroupID(&self, group_id: u32);
850
851 #[cfg(feature = "AVAudioTypes")]
852 #[unsafe(method(duration))]
854 #[unsafe(method_family = none)]
855 pub unsafe fn duration(&self) -> AVMusicTimeStamp;
856
857 #[cfg(feature = "AVAudioTypes")]
858 #[unsafe(method(setDuration:))]
860 #[unsafe(method_family = none)]
861 pub unsafe fn setDuration(&self, duration: AVMusicTimeStamp);
862 );
863}
864
865impl AVExtendedNoteOnEvent {
867 extern_methods!(
868 #[unsafe(method(init))]
869 #[unsafe(method_family = init)]
870 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
871
872 #[unsafe(method(new))]
873 #[unsafe(method_family = new)]
874 pub unsafe fn new() -> Retained<Self>;
875 );
876}
877
878extern_class!(
879 #[unsafe(super(AVMusicEvent, NSObject))]
891 #[derive(Debug, PartialEq, Eq, Hash)]
892 pub struct AVParameterEvent;
893);
894
895unsafe impl NSObjectProtocol for AVParameterEvent {}
896
897impl AVParameterEvent {
898 extern_methods!(
899 #[unsafe(method(initWithParameterID:scope:element:value:))]
909 #[unsafe(method_family = init)]
910 pub unsafe fn initWithParameterID_scope_element_value(
911 this: Allocated<Self>,
912 parameter_id: u32,
913 scope: u32,
914 element: u32,
915 value: c_float,
916 ) -> Retained<Self>;
917
918 #[unsafe(method(parameterID))]
920 #[unsafe(method_family = none)]
921 pub unsafe fn parameterID(&self) -> u32;
922
923 #[unsafe(method(setParameterID:))]
925 #[unsafe(method_family = none)]
926 pub unsafe fn setParameterID(&self, parameter_id: u32);
927
928 #[unsafe(method(scope))]
930 #[unsafe(method_family = none)]
931 pub unsafe fn scope(&self) -> u32;
932
933 #[unsafe(method(setScope:))]
935 #[unsafe(method_family = none)]
936 pub unsafe fn setScope(&self, scope: u32);
937
938 #[unsafe(method(element))]
940 #[unsafe(method_family = none)]
941 pub unsafe fn element(&self) -> u32;
942
943 #[unsafe(method(setElement:))]
945 #[unsafe(method_family = none)]
946 pub unsafe fn setElement(&self, element: u32);
947
948 #[unsafe(method(value))]
950 #[unsafe(method_family = none)]
951 pub unsafe fn value(&self) -> c_float;
952
953 #[unsafe(method(setValue:))]
955 #[unsafe(method_family = none)]
956 pub unsafe fn setValue(&self, value: c_float);
957 );
958}
959
960impl AVParameterEvent {
962 extern_methods!(
963 #[unsafe(method(init))]
964 #[unsafe(method_family = init)]
965 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
966
967 #[unsafe(method(new))]
968 #[unsafe(method_family = new)]
969 pub unsafe fn new() -> Retained<Self>;
970 );
971}
972
973extern_class!(
974 #[unsafe(super(AVMusicEvent, NSObject))]
981 #[derive(Debug, PartialEq, Eq, Hash)]
982 pub struct AVAUPresetEvent;
983);
984
985unsafe impl NSObjectProtocol for AVAUPresetEvent {}
986
987impl AVAUPresetEvent {
988 extern_methods!(
989 #[unsafe(method(initWithScope:element:dictionary:))]
1001 #[unsafe(method_family = init)]
1002 pub unsafe fn initWithScope_element_dictionary(
1003 this: Allocated<Self>,
1004 scope: u32,
1005 element: u32,
1006 preset_dictionary: &NSDictionary,
1007 ) -> Retained<Self>;
1008
1009 #[unsafe(method(scope))]
1011 #[unsafe(method_family = none)]
1012 pub unsafe fn scope(&self) -> u32;
1013
1014 #[unsafe(method(setScope:))]
1016 #[unsafe(method_family = none)]
1017 pub unsafe fn setScope(&self, scope: u32);
1018
1019 #[unsafe(method(element))]
1021 #[unsafe(method_family = none)]
1022 pub unsafe fn element(&self) -> u32;
1023
1024 #[unsafe(method(setElement:))]
1026 #[unsafe(method_family = none)]
1027 pub unsafe fn setElement(&self, element: u32);
1028
1029 #[unsafe(method(presetDictionary))]
1031 #[unsafe(method_family = none)]
1032 pub unsafe fn presetDictionary(&self) -> Retained<NSDictionary>;
1033 );
1034}
1035
1036impl AVAUPresetEvent {
1038 extern_methods!(
1039 #[unsafe(method(init))]
1040 #[unsafe(method_family = init)]
1041 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1042
1043 #[unsafe(method(new))]
1044 #[unsafe(method_family = new)]
1045 pub unsafe fn new() -> Retained<Self>;
1046 );
1047}
1048
1049extern_class!(
1050 #[unsafe(super(AVMusicEvent, NSObject))]
1057 #[derive(Debug, PartialEq, Eq, Hash)]
1058 pub struct AVExtendedTempoEvent;
1059);
1060
1061unsafe impl NSObjectProtocol for AVExtendedTempoEvent {}
1062
1063impl AVExtendedTempoEvent {
1064 extern_methods!(
1065 #[unsafe(method(initWithTempo:))]
1070 #[unsafe(method_family = init)]
1071 pub unsafe fn initWithTempo(this: Allocated<Self>, tempo: c_double) -> Retained<Self>;
1072
1073 #[unsafe(method(tempo))]
1075 #[unsafe(method_family = none)]
1076 pub unsafe fn tempo(&self) -> c_double;
1077
1078 #[unsafe(method(setTempo:))]
1080 #[unsafe(method_family = none)]
1081 pub unsafe fn setTempo(&self, tempo: c_double);
1082 );
1083}
1084
1085impl AVExtendedTempoEvent {
1087 extern_methods!(
1088 #[unsafe(method(init))]
1089 #[unsafe(method_family = init)]
1090 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1091
1092 #[unsafe(method(new))]
1093 #[unsafe(method_family = new)]
1094 pub unsafe fn new() -> Retained<Self>;
1095 );
1096}