1pub type UInt8 = ::std::os::raw::c_uchar;
4pub type UInt16 = ::std::os::raw::c_ushort;
5pub type UInt32 = ::std::os::raw::c_uint;
6pub type SInt32 = ::std::os::raw::c_int;
7pub type UInt64 = ::std::os::raw::c_ulonglong;
8pub type OSStatus = SInt32;
9pub type ByteCount = ::std::os::raw::c_ulong;
10pub type ItemCount = ::std::os::raw::c_ulong;
11pub type Boolean = ::std::os::raw::c_uchar;
12pub type Byte = UInt8;
13pub const kMIDIInvalidClient: _bindgen_ty_64 = -10830;
14pub const kMIDIInvalidPort: _bindgen_ty_64 = -10831;
15pub const kMIDIWrongEndpointType: _bindgen_ty_64 = -10832;
16pub const kMIDINoConnection: _bindgen_ty_64 = -10833;
17pub const kMIDIUnknownEndpoint: _bindgen_ty_64 = -10834;
18pub const kMIDIUnknownProperty: _bindgen_ty_64 = -10835;
19pub const kMIDIWrongPropertyType: _bindgen_ty_64 = -10836;
20pub const kMIDINoCurrentSetup: _bindgen_ty_64 = -10837;
21pub const kMIDIMessageSendErr: _bindgen_ty_64 = -10838;
22pub const kMIDIServerStartErr: _bindgen_ty_64 = -10839;
23pub const kMIDISetupFormatErr: _bindgen_ty_64 = -10840;
24pub const kMIDIWrongThread: _bindgen_ty_64 = -10841;
25pub const kMIDIObjectNotFound: _bindgen_ty_64 = -10842;
26pub const kMIDIIDNotUnique: _bindgen_ty_64 = -10843;
27pub const kMIDINotPermitted: _bindgen_ty_64 = -10844;
28pub const kMIDIUnknownError: _bindgen_ty_64 = -10845;
29pub type _bindgen_ty_64 = ::std::os::raw::c_int;
30pub type MIDIObjectRef = UInt32;
31pub type MIDIClientRef = MIDIObjectRef;
32pub type MIDIPortRef = MIDIObjectRef;
33pub type MIDIDeviceRef = MIDIObjectRef;
34pub type MIDIEntityRef = MIDIObjectRef;
35pub type MIDIEndpointRef = MIDIObjectRef;
36pub type MIDITimeStamp = UInt64;
37pub type MIDIObjectType = SInt32;
38pub const kMIDIObjectType_Other: _bindgen_ty_65 = -1;
39pub const kMIDIObjectType_Device: _bindgen_ty_65 = 0;
40pub const kMIDIObjectType_Entity: _bindgen_ty_65 = 1;
41pub const kMIDIObjectType_Source: _bindgen_ty_65 = 2;
42pub const kMIDIObjectType_Destination: _bindgen_ty_65 = 3;
43pub const kMIDIObjectType_ExternalDevice: _bindgen_ty_65 = 16;
44pub const kMIDIObjectType_ExternalEntity: _bindgen_ty_65 = 17;
45pub const kMIDIObjectType_ExternalSource: _bindgen_ty_65 = 18;
46pub const kMIDIObjectType_ExternalDestination: _bindgen_ty_65 = 19;
47pub type _bindgen_ty_65 = ::std::os::raw::c_int;
48pub const kMIDIObjectType_ExternalMask: MIDIObjectType = 16;
49pub type MIDIUniqueID = SInt32;
50pub const kMIDIInvalidUniqueID: _bindgen_ty_66 = 0;
51pub type _bindgen_ty_66 = ::std::os::raw::c_uint;
52pub type MIDIProtocolID = SInt32;
53pub const kMIDIProtocol_1_0: _bindgen_ty_67 = 1;
54pub const kMIDIProtocol_2_0: _bindgen_ty_67 = 2;
55pub type _bindgen_ty_67 = ::std::os::raw::c_uint;
56pub type MIDINotifyProc = ::std::option::Option<
57 unsafe extern "C" fn(message: *const MIDINotification, refCon: *mut ::std::os::raw::c_void),
58>;
59pub type MIDINotifyBlock = *mut ::std::os::raw::c_void;
60pub type MIDIReceiveBlock = *mut ::std::os::raw::c_void;
61pub type MIDIReadProc = ::std::option::Option<
62 unsafe extern "C" fn(
63 pktlist: *const MIDIPacketList,
64 readProcRefCon: *mut ::std::os::raw::c_void,
65 srcConnRefCon: *mut ::std::os::raw::c_void,
66 ),
67>;
68pub type MIDIReadBlock = *mut ::std::os::raw::c_void;
69pub type MIDICompletionProc =
70 ::std::option::Option<unsafe extern "C" fn(request: *mut MIDISysexSendRequest)>;
71pub type MIDICompletionProcUMP =
72 ::std::option::Option<unsafe extern "C" fn(request: *mut MIDISysexSendRequestUMP)>;
73#[repr(C, packed(4))]
74pub struct MIDIEventPacket {
75 pub timeStamp: MIDITimeStamp,
76 pub wordCount: UInt32,
77 pub words: [UInt32; 64usize],
78}
79#[test]
80fn bindgen_test_layout_MIDIEventPacket() {
81 const UNINIT: ::std::mem::MaybeUninit<MIDIEventPacket> = ::std::mem::MaybeUninit::uninit();
82 let ptr = UNINIT.as_ptr();
83 assert_eq!(
84 ::std::mem::size_of::<MIDIEventPacket>(),
85 268usize,
86 concat!("Size of: ", stringify!(MIDIEventPacket))
87 );
88 assert_eq!(
89 ::std::mem::align_of::<MIDIEventPacket>(),
90 4usize,
91 concat!("Alignment of ", stringify!(MIDIEventPacket))
92 );
93 assert_eq!(
94 unsafe { ::std::ptr::addr_of!((*ptr).timeStamp) as usize - ptr as usize },
95 0usize,
96 concat!(
97 "Offset of field: ",
98 stringify!(MIDIEventPacket),
99 "::",
100 stringify!(timeStamp)
101 )
102 );
103 assert_eq!(
104 unsafe { ::std::ptr::addr_of!((*ptr).wordCount) as usize - ptr as usize },
105 8usize,
106 concat!(
107 "Offset of field: ",
108 stringify!(MIDIEventPacket),
109 "::",
110 stringify!(wordCount)
111 )
112 );
113 assert_eq!(
114 unsafe { ::std::ptr::addr_of!((*ptr).words) as usize - ptr as usize },
115 12usize,
116 concat!(
117 "Offset of field: ",
118 stringify!(MIDIEventPacket),
119 "::",
120 stringify!(words)
121 )
122 );
123}
124#[repr(C)]
125pub struct MIDIEventList {
126 pub protocol: MIDIProtocolID,
127 pub numPackets: UInt32,
128 pub packet: [MIDIEventPacket; 1usize],
129}
130#[test]
131fn bindgen_test_layout_MIDIEventList() {
132 const UNINIT: ::std::mem::MaybeUninit<MIDIEventList> = ::std::mem::MaybeUninit::uninit();
133 let ptr = UNINIT.as_ptr();
134 assert_eq!(
135 ::std::mem::size_of::<MIDIEventList>(),
136 276usize,
137 concat!("Size of: ", stringify!(MIDIEventList))
138 );
139 assert_eq!(
140 ::std::mem::align_of::<MIDIEventList>(),
141 4usize,
142 concat!("Alignment of ", stringify!(MIDIEventList))
143 );
144 assert_eq!(
145 unsafe { ::std::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
146 0usize,
147 concat!(
148 "Offset of field: ",
149 stringify!(MIDIEventList),
150 "::",
151 stringify!(protocol)
152 )
153 );
154 assert_eq!(
155 unsafe { ::std::ptr::addr_of!((*ptr).numPackets) as usize - ptr as usize },
156 4usize,
157 concat!(
158 "Offset of field: ",
159 stringify!(MIDIEventList),
160 "::",
161 stringify!(numPackets)
162 )
163 );
164 assert_eq!(
165 unsafe { ::std::ptr::addr_of!((*ptr).packet) as usize - ptr as usize },
166 8usize,
167 concat!(
168 "Offset of field: ",
169 stringify!(MIDIEventList),
170 "::",
171 stringify!(packet)
172 )
173 );
174}
175#[repr(C, packed(4))]
176pub struct MIDIPacket {
177 pub timeStamp: MIDITimeStamp,
178 pub length: UInt16,
179 pub data: [Byte; 256usize],
180}
181#[test]
182fn bindgen_test_layout_MIDIPacket() {
183 const UNINIT: ::std::mem::MaybeUninit<MIDIPacket> = ::std::mem::MaybeUninit::uninit();
184 let ptr = UNINIT.as_ptr();
185 assert_eq!(
186 ::std::mem::size_of::<MIDIPacket>(),
187 268usize,
188 concat!("Size of: ", stringify!(MIDIPacket))
189 );
190 assert_eq!(
191 ::std::mem::align_of::<MIDIPacket>(),
192 4usize,
193 concat!("Alignment of ", stringify!(MIDIPacket))
194 );
195 assert_eq!(
196 unsafe { ::std::ptr::addr_of!((*ptr).timeStamp) as usize - ptr as usize },
197 0usize,
198 concat!(
199 "Offset of field: ",
200 stringify!(MIDIPacket),
201 "::",
202 stringify!(timeStamp)
203 )
204 );
205 assert_eq!(
206 unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
207 8usize,
208 concat!(
209 "Offset of field: ",
210 stringify!(MIDIPacket),
211 "::",
212 stringify!(length)
213 )
214 );
215 assert_eq!(
216 unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
217 10usize,
218 concat!(
219 "Offset of field: ",
220 stringify!(MIDIPacket),
221 "::",
222 stringify!(data)
223 )
224 );
225}
226#[repr(C)]
227pub struct MIDIPacketList {
228 pub numPackets: UInt32,
229 pub packet: [MIDIPacket; 1usize],
230}
231#[test]
232fn bindgen_test_layout_MIDIPacketList() {
233 const UNINIT: ::std::mem::MaybeUninit<MIDIPacketList> = ::std::mem::MaybeUninit::uninit();
234 let ptr = UNINIT.as_ptr();
235 assert_eq!(
236 ::std::mem::size_of::<MIDIPacketList>(),
237 272usize,
238 concat!("Size of: ", stringify!(MIDIPacketList))
239 );
240 assert_eq!(
241 ::std::mem::align_of::<MIDIPacketList>(),
242 4usize,
243 concat!("Alignment of ", stringify!(MIDIPacketList))
244 );
245 assert_eq!(
246 unsafe { ::std::ptr::addr_of!((*ptr).numPackets) as usize - ptr as usize },
247 0usize,
248 concat!(
249 "Offset of field: ",
250 stringify!(MIDIPacketList),
251 "::",
252 stringify!(numPackets)
253 )
254 );
255 assert_eq!(
256 unsafe { ::std::ptr::addr_of!((*ptr).packet) as usize - ptr as usize },
257 4usize,
258 concat!(
259 "Offset of field: ",
260 stringify!(MIDIPacketList),
261 "::",
262 stringify!(packet)
263 )
264 );
265}
266#[repr(C)]
267#[derive(Debug, Copy, Clone)]
268pub struct MIDISysexSendRequest {
269 pub destination: MIDIEndpointRef,
270 pub data: *const Byte,
271 pub bytesToSend: UInt32,
272 pub complete: Boolean,
273 pub reserved: [Byte; 3usize],
274 pub completionProc: MIDICompletionProc,
275 pub completionRefCon: *mut ::std::os::raw::c_void,
276}
277#[test]
278fn bindgen_test_layout_MIDISysexSendRequest() {
279 const UNINIT: ::std::mem::MaybeUninit<MIDISysexSendRequest> = ::std::mem::MaybeUninit::uninit();
280 let ptr = UNINIT.as_ptr();
281 assert_eq!(
282 ::std::mem::size_of::<MIDISysexSendRequest>(),
283 40usize,
284 concat!("Size of: ", stringify!(MIDISysexSendRequest))
285 );
286 assert_eq!(
287 ::std::mem::align_of::<MIDISysexSendRequest>(),
288 8usize,
289 concat!("Alignment of ", stringify!(MIDISysexSendRequest))
290 );
291 assert_eq!(
292 unsafe { ::std::ptr::addr_of!((*ptr).destination) as usize - ptr as usize },
293 0usize,
294 concat!(
295 "Offset of field: ",
296 stringify!(MIDISysexSendRequest),
297 "::",
298 stringify!(destination)
299 )
300 );
301 assert_eq!(
302 unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
303 8usize,
304 concat!(
305 "Offset of field: ",
306 stringify!(MIDISysexSendRequest),
307 "::",
308 stringify!(data)
309 )
310 );
311 assert_eq!(
312 unsafe { ::std::ptr::addr_of!((*ptr).bytesToSend) as usize - ptr as usize },
313 16usize,
314 concat!(
315 "Offset of field: ",
316 stringify!(MIDISysexSendRequest),
317 "::",
318 stringify!(bytesToSend)
319 )
320 );
321 assert_eq!(
322 unsafe { ::std::ptr::addr_of!((*ptr).complete) as usize - ptr as usize },
323 20usize,
324 concat!(
325 "Offset of field: ",
326 stringify!(MIDISysexSendRequest),
327 "::",
328 stringify!(complete)
329 )
330 );
331 assert_eq!(
332 unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
333 21usize,
334 concat!(
335 "Offset of field: ",
336 stringify!(MIDISysexSendRequest),
337 "::",
338 stringify!(reserved)
339 )
340 );
341 assert_eq!(
342 unsafe { ::std::ptr::addr_of!((*ptr).completionProc) as usize - ptr as usize },
343 24usize,
344 concat!(
345 "Offset of field: ",
346 stringify!(MIDISysexSendRequest),
347 "::",
348 stringify!(completionProc)
349 )
350 );
351 assert_eq!(
352 unsafe { ::std::ptr::addr_of!((*ptr).completionRefCon) as usize - ptr as usize },
353 32usize,
354 concat!(
355 "Offset of field: ",
356 stringify!(MIDISysexSendRequest),
357 "::",
358 stringify!(completionRefCon)
359 )
360 );
361}
362#[repr(C)]
363#[derive(Debug, Copy, Clone)]
364pub struct MIDISysexSendRequestUMP {
365 pub destination: MIDIEndpointRef,
366 pub words: *mut UInt32,
367 pub wordsToSend: UInt32,
368 pub complete: Boolean,
369 pub completionProc: MIDICompletionProcUMP,
370 pub completionRefCon: *mut ::std::os::raw::c_void,
371}
372#[test]
373fn bindgen_test_layout_MIDISysexSendRequestUMP() {
374 const UNINIT: ::std::mem::MaybeUninit<MIDISysexSendRequestUMP> =
375 ::std::mem::MaybeUninit::uninit();
376 let ptr = UNINIT.as_ptr();
377 assert_eq!(
378 ::std::mem::size_of::<MIDISysexSendRequestUMP>(),
379 40usize,
380 concat!("Size of: ", stringify!(MIDISysexSendRequestUMP))
381 );
382 assert_eq!(
383 ::std::mem::align_of::<MIDISysexSendRequestUMP>(),
384 8usize,
385 concat!("Alignment of ", stringify!(MIDISysexSendRequestUMP))
386 );
387 assert_eq!(
388 unsafe { ::std::ptr::addr_of!((*ptr).destination) as usize - ptr as usize },
389 0usize,
390 concat!(
391 "Offset of field: ",
392 stringify!(MIDISysexSendRequestUMP),
393 "::",
394 stringify!(destination)
395 )
396 );
397 assert_eq!(
398 unsafe { ::std::ptr::addr_of!((*ptr).words) as usize - ptr as usize },
399 8usize,
400 concat!(
401 "Offset of field: ",
402 stringify!(MIDISysexSendRequestUMP),
403 "::",
404 stringify!(words)
405 )
406 );
407 assert_eq!(
408 unsafe { ::std::ptr::addr_of!((*ptr).wordsToSend) as usize - ptr as usize },
409 16usize,
410 concat!(
411 "Offset of field: ",
412 stringify!(MIDISysexSendRequestUMP),
413 "::",
414 stringify!(wordsToSend)
415 )
416 );
417 assert_eq!(
418 unsafe { ::std::ptr::addr_of!((*ptr).complete) as usize - ptr as usize },
419 20usize,
420 concat!(
421 "Offset of field: ",
422 stringify!(MIDISysexSendRequestUMP),
423 "::",
424 stringify!(complete)
425 )
426 );
427 assert_eq!(
428 unsafe { ::std::ptr::addr_of!((*ptr).completionProc) as usize - ptr as usize },
429 24usize,
430 concat!(
431 "Offset of field: ",
432 stringify!(MIDISysexSendRequestUMP),
433 "::",
434 stringify!(completionProc)
435 )
436 );
437 assert_eq!(
438 unsafe { ::std::ptr::addr_of!((*ptr).completionRefCon) as usize - ptr as usize },
439 32usize,
440 concat!(
441 "Offset of field: ",
442 stringify!(MIDISysexSendRequestUMP),
443 "::",
444 stringify!(completionRefCon)
445 )
446 );
447}
448pub type MIDINotificationMessageID = SInt32;
449pub const kMIDIMsgSetupChanged: _bindgen_ty_68 = 1;
450pub const kMIDIMsgObjectAdded: _bindgen_ty_68 = 2;
451pub const kMIDIMsgObjectRemoved: _bindgen_ty_68 = 3;
452pub const kMIDIMsgPropertyChanged: _bindgen_ty_68 = 4;
453pub const kMIDIMsgThruConnectionsChanged: _bindgen_ty_68 = 5;
454pub const kMIDIMsgSerialPortOwnerChanged: _bindgen_ty_68 = 6;
455pub const kMIDIMsgIOError: _bindgen_ty_68 = 7;
456pub const kMIDIMsgInternalStart: _bindgen_ty_68 = 4096;
457pub type _bindgen_ty_68 = ::std::os::raw::c_uint;
458#[repr(C)]
459#[derive(Debug, Copy, Clone)]
460pub struct MIDINotification {
461 pub messageID: MIDINotificationMessageID,
462 pub messageSize: UInt32,
463}
464#[test]
465fn bindgen_test_layout_MIDINotification() {
466 const UNINIT: ::std::mem::MaybeUninit<MIDINotification> = ::std::mem::MaybeUninit::uninit();
467 let ptr = UNINIT.as_ptr();
468 assert_eq!(
469 ::std::mem::size_of::<MIDINotification>(),
470 8usize,
471 concat!("Size of: ", stringify!(MIDINotification))
472 );
473 assert_eq!(
474 ::std::mem::align_of::<MIDINotification>(),
475 4usize,
476 concat!("Alignment of ", stringify!(MIDINotification))
477 );
478 assert_eq!(
479 unsafe { ::std::ptr::addr_of!((*ptr).messageID) as usize - ptr as usize },
480 0usize,
481 concat!(
482 "Offset of field: ",
483 stringify!(MIDINotification),
484 "::",
485 stringify!(messageID)
486 )
487 );
488 assert_eq!(
489 unsafe { ::std::ptr::addr_of!((*ptr).messageSize) as usize - ptr as usize },
490 4usize,
491 concat!(
492 "Offset of field: ",
493 stringify!(MIDINotification),
494 "::",
495 stringify!(messageSize)
496 )
497 );
498}
499#[repr(C)]
500#[derive(Debug, Copy, Clone)]
501pub struct MIDIObjectAddRemoveNotification {
502 pub messageID: MIDINotificationMessageID,
503 pub messageSize: UInt32,
504 pub parent: MIDIObjectRef,
505 pub parentType: MIDIObjectType,
506 pub child: MIDIObjectRef,
507 pub childType: MIDIObjectType,
508}
509#[test]
510fn bindgen_test_layout_MIDIObjectAddRemoveNotification() {
511 const UNINIT: ::std::mem::MaybeUninit<MIDIObjectAddRemoveNotification> =
512 ::std::mem::MaybeUninit::uninit();
513 let ptr = UNINIT.as_ptr();
514 assert_eq!(
515 ::std::mem::size_of::<MIDIObjectAddRemoveNotification>(),
516 24usize,
517 concat!("Size of: ", stringify!(MIDIObjectAddRemoveNotification))
518 );
519 assert_eq!(
520 ::std::mem::align_of::<MIDIObjectAddRemoveNotification>(),
521 4usize,
522 concat!("Alignment of ", stringify!(MIDIObjectAddRemoveNotification))
523 );
524 assert_eq!(
525 unsafe { ::std::ptr::addr_of!((*ptr).messageID) as usize - ptr as usize },
526 0usize,
527 concat!(
528 "Offset of field: ",
529 stringify!(MIDIObjectAddRemoveNotification),
530 "::",
531 stringify!(messageID)
532 )
533 );
534 assert_eq!(
535 unsafe { ::std::ptr::addr_of!((*ptr).messageSize) as usize - ptr as usize },
536 4usize,
537 concat!(
538 "Offset of field: ",
539 stringify!(MIDIObjectAddRemoveNotification),
540 "::",
541 stringify!(messageSize)
542 )
543 );
544 assert_eq!(
545 unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize },
546 8usize,
547 concat!(
548 "Offset of field: ",
549 stringify!(MIDIObjectAddRemoveNotification),
550 "::",
551 stringify!(parent)
552 )
553 );
554 assert_eq!(
555 unsafe { ::std::ptr::addr_of!((*ptr).parentType) as usize - ptr as usize },
556 12usize,
557 concat!(
558 "Offset of field: ",
559 stringify!(MIDIObjectAddRemoveNotification),
560 "::",
561 stringify!(parentType)
562 )
563 );
564 assert_eq!(
565 unsafe { ::std::ptr::addr_of!((*ptr).child) as usize - ptr as usize },
566 16usize,
567 concat!(
568 "Offset of field: ",
569 stringify!(MIDIObjectAddRemoveNotification),
570 "::",
571 stringify!(child)
572 )
573 );
574 assert_eq!(
575 unsafe { ::std::ptr::addr_of!((*ptr).childType) as usize - ptr as usize },
576 20usize,
577 concat!(
578 "Offset of field: ",
579 stringify!(MIDIObjectAddRemoveNotification),
580 "::",
581 stringify!(childType)
582 )
583 );
584}
585#[repr(C)]
586pub struct MIDIObjectPropertyChangeNotification {
587 pub messageID: MIDINotificationMessageID,
588 pub messageSize: UInt32,
589 pub object: MIDIObjectRef,
590 pub objectType: MIDIObjectType,
591 pub propertyName: CFStringRef,
592}
593#[test]
594fn bindgen_test_layout_MIDIObjectPropertyChangeNotification() {
595 const UNINIT: ::std::mem::MaybeUninit<MIDIObjectPropertyChangeNotification> =
596 ::std::mem::MaybeUninit::uninit();
597 let ptr = UNINIT.as_ptr();
598 assert_eq!(
599 ::std::mem::size_of::<MIDIObjectPropertyChangeNotification>(),
600 24usize,
601 concat!(
602 "Size of: ",
603 stringify!(MIDIObjectPropertyChangeNotification)
604 )
605 );
606 assert_eq!(
607 ::std::mem::align_of::<MIDIObjectPropertyChangeNotification>(),
608 8usize,
609 concat!(
610 "Alignment of ",
611 stringify!(MIDIObjectPropertyChangeNotification)
612 )
613 );
614 assert_eq!(
615 unsafe { ::std::ptr::addr_of!((*ptr).messageID) as usize - ptr as usize },
616 0usize,
617 concat!(
618 "Offset of field: ",
619 stringify!(MIDIObjectPropertyChangeNotification),
620 "::",
621 stringify!(messageID)
622 )
623 );
624 assert_eq!(
625 unsafe { ::std::ptr::addr_of!((*ptr).messageSize) as usize - ptr as usize },
626 4usize,
627 concat!(
628 "Offset of field: ",
629 stringify!(MIDIObjectPropertyChangeNotification),
630 "::",
631 stringify!(messageSize)
632 )
633 );
634 assert_eq!(
635 unsafe { ::std::ptr::addr_of!((*ptr).object) as usize - ptr as usize },
636 8usize,
637 concat!(
638 "Offset of field: ",
639 stringify!(MIDIObjectPropertyChangeNotification),
640 "::",
641 stringify!(object)
642 )
643 );
644 assert_eq!(
645 unsafe { ::std::ptr::addr_of!((*ptr).objectType) as usize - ptr as usize },
646 12usize,
647 concat!(
648 "Offset of field: ",
649 stringify!(MIDIObjectPropertyChangeNotification),
650 "::",
651 stringify!(objectType)
652 )
653 );
654 assert_eq!(
655 unsafe { ::std::ptr::addr_of!((*ptr).propertyName) as usize - ptr as usize },
656 16usize,
657 concat!(
658 "Offset of field: ",
659 stringify!(MIDIObjectPropertyChangeNotification),
660 "::",
661 stringify!(propertyName)
662 )
663 );
664}
665#[repr(C)]
666#[derive(Debug, Copy, Clone)]
667pub struct MIDIIOErrorNotification {
668 pub messageID: MIDINotificationMessageID,
669 pub messageSize: UInt32,
670 pub driverDevice: MIDIDeviceRef,
671 pub errorCode: OSStatus,
672}
673#[test]
674fn bindgen_test_layout_MIDIIOErrorNotification() {
675 const UNINIT: ::std::mem::MaybeUninit<MIDIIOErrorNotification> =
676 ::std::mem::MaybeUninit::uninit();
677 let ptr = UNINIT.as_ptr();
678 assert_eq!(
679 ::std::mem::size_of::<MIDIIOErrorNotification>(),
680 16usize,
681 concat!("Size of: ", stringify!(MIDIIOErrorNotification))
682 );
683 assert_eq!(
684 ::std::mem::align_of::<MIDIIOErrorNotification>(),
685 4usize,
686 concat!("Alignment of ", stringify!(MIDIIOErrorNotification))
687 );
688 assert_eq!(
689 unsafe { ::std::ptr::addr_of!((*ptr).messageID) as usize - ptr as usize },
690 0usize,
691 concat!(
692 "Offset of field: ",
693 stringify!(MIDIIOErrorNotification),
694 "::",
695 stringify!(messageID)
696 )
697 );
698 assert_eq!(
699 unsafe { ::std::ptr::addr_of!((*ptr).messageSize) as usize - ptr as usize },
700 4usize,
701 concat!(
702 "Offset of field: ",
703 stringify!(MIDIIOErrorNotification),
704 "::",
705 stringify!(messageSize)
706 )
707 );
708 assert_eq!(
709 unsafe { ::std::ptr::addr_of!((*ptr).driverDevice) as usize - ptr as usize },
710 8usize,
711 concat!(
712 "Offset of field: ",
713 stringify!(MIDIIOErrorNotification),
714 "::",
715 stringify!(driverDevice)
716 )
717 );
718 assert_eq!(
719 unsafe { ::std::ptr::addr_of!((*ptr).errorCode) as usize - ptr as usize },
720 12usize,
721 concat!(
722 "Offset of field: ",
723 stringify!(MIDIIOErrorNotification),
724 "::",
725 stringify!(errorCode)
726 )
727 );
728}
729extern "C" {
730 pub static kMIDIPropertyName: CFStringRef;
731}
732extern "C" {
733 pub static kMIDIPropertyManufacturer: CFStringRef;
734}
735extern "C" {
736 pub static kMIDIPropertyModel: CFStringRef;
737}
738extern "C" {
739 pub static kMIDIPropertyUniqueID: CFStringRef;
740}
741extern "C" {
742 pub static kMIDIPropertyDeviceID: CFStringRef;
743}
744extern "C" {
745 pub static kMIDIPropertyReceiveChannels: CFStringRef;
746}
747extern "C" {
748 pub static kMIDIPropertyTransmitChannels: CFStringRef;
749}
750extern "C" {
751 pub static kMIDIPropertyMaxSysExSpeed: CFStringRef;
752}
753extern "C" {
754 pub static kMIDIPropertyAdvanceScheduleTimeMuSec: CFStringRef;
755}
756extern "C" {
757 pub static kMIDIPropertyIsEmbeddedEntity: CFStringRef;
758}
759extern "C" {
760 pub static kMIDIPropertyIsBroadcast: CFStringRef;
761}
762extern "C" {
763 pub static kMIDIPropertySingleRealtimeEntity: CFStringRef;
764}
765extern "C" {
766 pub static kMIDIPropertyConnectionUniqueID: CFStringRef;
767}
768extern "C" {
769 pub static kMIDIPropertyOffline: CFStringRef;
770}
771extern "C" {
772 pub static kMIDIPropertyPrivate: CFStringRef;
773}
774extern "C" {
775 pub static kMIDIPropertyDriverOwner: CFStringRef;
776}
777extern "C" {
778 pub static kMIDIPropertyFactoryPatchNameFile: CFStringRef;
779}
780extern "C" {
781 pub static kMIDIPropertyUserPatchNameFile: CFStringRef;
782}
783extern "C" {
784 pub static kMIDIPropertyNameConfiguration: CFStringRef;
785}
786extern "C" {
787 pub static kMIDIPropertyNameConfigurationDictionary: CFStringRef;
788}
789extern "C" {
790 pub static kMIDIPropertyImage: CFStringRef;
791}
792extern "C" {
793 pub static kMIDIPropertyDriverVersion: CFStringRef;
794}
795extern "C" {
796 pub static kMIDIPropertySupportsGeneralMIDI: CFStringRef;
797}
798extern "C" {
799 pub static kMIDIPropertySupportsMMC: CFStringRef;
800}
801extern "C" {
802 pub static kMIDIPropertyCanRoute: CFStringRef;
803}
804extern "C" {
805 pub static kMIDIPropertyReceivesClock: CFStringRef;
806}
807extern "C" {
808 pub static kMIDIPropertyReceivesMTC: CFStringRef;
809}
810extern "C" {
811 pub static kMIDIPropertyReceivesNotes: CFStringRef;
812}
813extern "C" {
814 pub static kMIDIPropertyReceivesProgramChanges: CFStringRef;
815}
816extern "C" {
817 pub static kMIDIPropertyReceivesBankSelectMSB: CFStringRef;
818}
819extern "C" {
820 pub static kMIDIPropertyReceivesBankSelectLSB: CFStringRef;
821}
822extern "C" {
823 pub static kMIDIPropertyTransmitsClock: CFStringRef;
824}
825extern "C" {
826 pub static kMIDIPropertyTransmitsMTC: CFStringRef;
827}
828extern "C" {
829 pub static kMIDIPropertyTransmitsNotes: CFStringRef;
830}
831extern "C" {
832 pub static kMIDIPropertyTransmitsProgramChanges: CFStringRef;
833}
834extern "C" {
835 pub static kMIDIPropertyTransmitsBankSelectMSB: CFStringRef;
836}
837extern "C" {
838 pub static kMIDIPropertyTransmitsBankSelectLSB: CFStringRef;
839}
840extern "C" {
841 pub static kMIDIPropertyPanDisruptsStereo: CFStringRef;
842}
843extern "C" {
844 pub static kMIDIPropertyIsSampler: CFStringRef;
845}
846extern "C" {
847 pub static kMIDIPropertyIsDrumMachine: CFStringRef;
848}
849extern "C" {
850 pub static kMIDIPropertyIsMixer: CFStringRef;
851}
852extern "C" {
853 pub static kMIDIPropertyIsEffectUnit: CFStringRef;
854}
855extern "C" {
856 pub static kMIDIPropertyMaxReceiveChannels: CFStringRef;
857}
858extern "C" {
859 pub static kMIDIPropertyMaxTransmitChannels: CFStringRef;
860}
861extern "C" {
862 pub static kMIDIPropertyDriverDeviceEditorApp: CFStringRef;
863}
864extern "C" {
865 pub static kMIDIPropertySupportsShowControl: CFStringRef;
866}
867extern "C" {
868 pub static kMIDIPropertyDisplayName: CFStringRef;
869}
870extern "C" {
871 pub static kMIDIPropertyProtocolID: CFStringRef;
872}
873extern "C" {
874 pub static kMIDIPropertyUMPActiveGroupBitmap: CFStringRef;
875}
876extern "C" {
877 pub static kMIDIPropertyUMPCanTransmitGroupless: CFStringRef;
878}
879extern "C" {
880 pub static kMIDIPropertyAssociatedEndpoint: CFStringRef;
881}
882extern "C" {
883 pub fn MIDIClientCreate(
884 name: CFStringRef,
885 notifyProc: MIDINotifyProc,
886 notifyRefCon: *mut ::std::os::raw::c_void,
887 outClient: *mut MIDIClientRef,
888 ) -> OSStatus;
889}
890extern "C" {
891 pub fn MIDIClientCreateWithBlock(
892 name: CFStringRef,
893 outClient: *mut MIDIClientRef,
894 notifyBlock: MIDINotifyBlock,
895 ) -> OSStatus;
896}
897extern "C" {
898 pub fn MIDIClientDispose(client: MIDIClientRef) -> OSStatus;
899}
900extern "C" {
901 pub fn MIDIInputPortCreateWithProtocol(
902 client: MIDIClientRef,
903 portName: CFStringRef,
904 protocol: MIDIProtocolID,
905 outPort: *mut MIDIPortRef,
906 receiveBlock: MIDIReceiveBlock,
907 ) -> OSStatus;
908}
909extern "C" {
910 pub fn MIDIInputPortCreate(
911 client: MIDIClientRef,
912 portName: CFStringRef,
913 readProc: MIDIReadProc,
914 refCon: *mut ::std::os::raw::c_void,
915 outPort: *mut MIDIPortRef,
916 ) -> OSStatus;
917}
918extern "C" {
919 pub fn MIDIInputPortCreateWithBlock(
920 client: MIDIClientRef,
921 portName: CFStringRef,
922 outPort: *mut MIDIPortRef,
923 readBlock: MIDIReadBlock,
924 ) -> OSStatus;
925}
926extern "C" {
927 pub fn MIDIOutputPortCreate(
928 client: MIDIClientRef,
929 portName: CFStringRef,
930 outPort: *mut MIDIPortRef,
931 ) -> OSStatus;
932}
933extern "C" {
934 pub fn MIDIPortDispose(port: MIDIPortRef) -> OSStatus;
935}
936extern "C" {
937 pub fn MIDIPortConnectSource(
938 port: MIDIPortRef,
939 source: MIDIEndpointRef,
940 connRefCon: *mut ::std::os::raw::c_void,
941 ) -> OSStatus;
942}
943extern "C" {
944 pub fn MIDIPortDisconnectSource(port: MIDIPortRef, source: MIDIEndpointRef) -> OSStatus;
945}
946extern "C" {
947 pub fn MIDIGetNumberOfDevices() -> ItemCount;
948}
949extern "C" {
950 pub fn MIDIGetDevice(deviceIndex0: ItemCount) -> MIDIDeviceRef;
951}
952extern "C" {
953 pub fn MIDIDeviceGetNumberOfEntities(device: MIDIDeviceRef) -> ItemCount;
954}
955extern "C" {
956 pub fn MIDIDeviceGetEntity(device: MIDIDeviceRef, entityIndex0: ItemCount) -> MIDIEntityRef;
957}
958extern "C" {
959 pub fn MIDIEntityGetNumberOfSources(entity: MIDIEntityRef) -> ItemCount;
960}
961extern "C" {
962 pub fn MIDIEntityGetSource(entity: MIDIEntityRef, sourceIndex0: ItemCount) -> MIDIEndpointRef;
963}
964extern "C" {
965 pub fn MIDIEntityGetNumberOfDestinations(entity: MIDIEntityRef) -> ItemCount;
966}
967extern "C" {
968 pub fn MIDIEntityGetDestination(
969 entity: MIDIEntityRef,
970 destIndex0: ItemCount,
971 ) -> MIDIEndpointRef;
972}
973extern "C" {
974 pub fn MIDIEntityGetDevice(inEntity: MIDIEntityRef, outDevice: *mut MIDIDeviceRef) -> OSStatus;
975}
976extern "C" {
977 pub fn MIDIGetNumberOfSources() -> ItemCount;
978}
979extern "C" {
980 pub fn MIDIGetSource(sourceIndex0: ItemCount) -> MIDIEndpointRef;
981}
982extern "C" {
983 pub fn MIDIGetNumberOfDestinations() -> ItemCount;
984}
985extern "C" {
986 pub fn MIDIGetDestination(destIndex0: ItemCount) -> MIDIEndpointRef;
987}
988extern "C" {
989 pub fn MIDIEndpointGetEntity(
990 inEndpoint: MIDIEndpointRef,
991 outEntity: *mut MIDIEntityRef,
992 ) -> OSStatus;
993}
994extern "C" {
995 pub fn MIDIDestinationCreateWithProtocol(
996 client: MIDIClientRef,
997 name: CFStringRef,
998 protocol: MIDIProtocolID,
999 outDest: *mut MIDIEndpointRef,
1000 readBlock: MIDIReceiveBlock,
1001 ) -> OSStatus;
1002}
1003extern "C" {
1004 pub fn MIDIDestinationCreate(
1005 client: MIDIClientRef,
1006 name: CFStringRef,
1007 readProc: MIDIReadProc,
1008 refCon: *mut ::std::os::raw::c_void,
1009 outDest: *mut MIDIEndpointRef,
1010 ) -> OSStatus;
1011}
1012extern "C" {
1013 pub fn MIDIDestinationCreateWithBlock(
1014 client: MIDIClientRef,
1015 name: CFStringRef,
1016 outDest: *mut MIDIEndpointRef,
1017 readBlock: MIDIReadBlock,
1018 ) -> OSStatus;
1019}
1020extern "C" {
1021 pub fn MIDISourceCreateWithProtocol(
1022 client: MIDIClientRef,
1023 name: CFStringRef,
1024 protocol: MIDIProtocolID,
1025 outSrc: *mut MIDIEndpointRef,
1026 ) -> OSStatus;
1027}
1028extern "C" {
1029 pub fn MIDISourceCreate(
1030 client: MIDIClientRef,
1031 name: CFStringRef,
1032 outSrc: *mut MIDIEndpointRef,
1033 ) -> OSStatus;
1034}
1035extern "C" {
1036 pub fn MIDIEndpointDispose(endpt: MIDIEndpointRef) -> OSStatus;
1037}
1038extern "C" {
1039 pub fn MIDIGetNumberOfExternalDevices() -> ItemCount;
1040}
1041extern "C" {
1042 pub fn MIDIGetExternalDevice(deviceIndex0: ItemCount) -> MIDIDeviceRef;
1043}
1044extern "C" {
1045 pub fn MIDIObjectGetIntegerProperty(
1046 obj: MIDIObjectRef,
1047 propertyID: CFStringRef,
1048 outValue: *mut SInt32,
1049 ) -> OSStatus;
1050}
1051extern "C" {
1052 pub fn MIDIObjectSetIntegerProperty(
1053 obj: MIDIObjectRef,
1054 propertyID: CFStringRef,
1055 value: SInt32,
1056 ) -> OSStatus;
1057}
1058extern "C" {
1059 pub fn MIDIObjectGetStringProperty(
1060 obj: MIDIObjectRef,
1061 propertyID: CFStringRef,
1062 str_: *mut CFStringRef,
1063 ) -> OSStatus;
1064}
1065extern "C" {
1066 pub fn MIDIObjectSetStringProperty(
1067 obj: MIDIObjectRef,
1068 propertyID: CFStringRef,
1069 str_: CFStringRef,
1070 ) -> OSStatus;
1071}
1072extern "C" {
1073 pub fn MIDIObjectGetDataProperty(
1074 obj: MIDIObjectRef,
1075 propertyID: CFStringRef,
1076 outData: *mut CFDataRef,
1077 ) -> OSStatus;
1078}
1079extern "C" {
1080 pub fn MIDIObjectSetDataProperty(
1081 obj: MIDIObjectRef,
1082 propertyID: CFStringRef,
1083 data: CFDataRef,
1084 ) -> OSStatus;
1085}
1086extern "C" {
1087 pub fn MIDIObjectGetDictionaryProperty(
1088 obj: MIDIObjectRef,
1089 propertyID: CFStringRef,
1090 outDict: *mut CFDictionaryRef,
1091 ) -> OSStatus;
1092}
1093extern "C" {
1094 pub fn MIDIObjectSetDictionaryProperty(
1095 obj: MIDIObjectRef,
1096 propertyID: CFStringRef,
1097 dict: CFDictionaryRef,
1098 ) -> OSStatus;
1099}
1100extern "C" {
1101 pub fn MIDIObjectGetProperties(
1102 obj: MIDIObjectRef,
1103 outProperties: *mut CFPropertyListRef,
1104 deep: Boolean,
1105 ) -> OSStatus;
1106}
1107extern "C" {
1108 pub fn MIDIObjectRemoveProperty(obj: MIDIObjectRef, propertyID: CFStringRef) -> OSStatus;
1109}
1110extern "C" {
1111 pub fn MIDIObjectFindByUniqueID(
1112 inUniqueID: MIDIUniqueID,
1113 outObject: *mut MIDIObjectRef,
1114 outObjectType: *mut MIDIObjectType,
1115 ) -> OSStatus;
1116}
1117extern "C" {
1118 pub fn MIDISendEventList(
1119 port: MIDIPortRef,
1120 dest: MIDIEndpointRef,
1121 evtlist: *const MIDIEventList,
1122 ) -> OSStatus;
1123}
1124extern "C" {
1125 pub fn MIDISend(
1126 port: MIDIPortRef,
1127 dest: MIDIEndpointRef,
1128 pktlist: *const MIDIPacketList,
1129 ) -> OSStatus;
1130}
1131extern "C" {
1132 pub fn MIDISendSysex(request: *mut MIDISysexSendRequest) -> OSStatus;
1133}
1134extern "C" {
1135 pub fn MIDISendUMPSysex(umpRequest: *mut MIDISysexSendRequestUMP) -> OSStatus;
1136}
1137extern "C" {
1138 pub fn MIDISendUMPSysex8(umpRequest: *mut MIDISysexSendRequestUMP) -> OSStatus;
1139}
1140extern "C" {
1141 pub fn MIDIEventPacketSysexBytesForGroup(
1142 pkt: *const MIDIEventPacket,
1143 groupIndex: UInt8,
1144 outData: *mut CFDataRef,
1145 ) -> OSStatus;
1146}
1147extern "C" {
1148 pub fn MIDIReceivedEventList(src: MIDIEndpointRef, evtlist: *const MIDIEventList) -> OSStatus;
1149}
1150extern "C" {
1151 pub fn MIDIReceived(src: MIDIEndpointRef, pktlist: *const MIDIPacketList) -> OSStatus;
1152}
1153extern "C" {
1154 pub fn MIDIFlushOutput(dest: MIDIEndpointRef) -> OSStatus;
1155}
1156extern "C" {
1157 pub fn MIDIRestart() -> OSStatus;
1158}
1159extern "C" {
1160 pub fn MIDIEventListInit(
1161 evtlist: *mut MIDIEventList,
1162 protocol: MIDIProtocolID,
1163 ) -> *mut MIDIEventPacket;
1164}
1165extern "C" {
1166 pub fn MIDIEventListAdd(
1167 evtlist: *mut MIDIEventList,
1168 listSize: ByteCount,
1169 curPacket: *mut MIDIEventPacket,
1170 time: MIDITimeStamp,
1171 wordCount: ByteCount,
1172 words: *const UInt32,
1173 ) -> *mut MIDIEventPacket;
1174}
1175extern "C" {
1176 pub fn MIDIPacketListInit(pktlist: *mut MIDIPacketList) -> *mut MIDIPacket;
1177}
1178extern "C" {
1179 pub fn MIDIPacketListAdd(
1180 pktlist: *mut MIDIPacketList,
1181 listSize: ByteCount,
1182 curPacket: *mut MIDIPacket,
1183 time: MIDITimeStamp,
1184 nData: ByteCount,
1185 data: *const Byte,
1186 ) -> *mut MIDIPacket;
1187}