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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
/* automatically generated by rust-bindgen */

pub type UInt8 = ::std::os::raw::c_uchar;
pub type UInt16 = ::std::os::raw::c_ushort;
pub type UInt32 = ::std::os::raw::c_uint;
pub type SInt32 = ::std::os::raw::c_int;
pub type UInt64 = ::std::os::raw::c_ulonglong;
pub type OSStatus = SInt32;
pub type ByteCount = ::std::os::raw::c_ulong;
pub type ItemCount = ::std::os::raw::c_ulong;
pub type Boolean = ::std::os::raw::c_uchar;
pub type Byte = UInt8;
pub const kMIDIInvalidClient: _bindgen_ty_64 = -10830;
pub const kMIDIInvalidPort: _bindgen_ty_64 = -10831;
pub const kMIDIWrongEndpointType: _bindgen_ty_64 = -10832;
pub const kMIDINoConnection: _bindgen_ty_64 = -10833;
pub const kMIDIUnknownEndpoint: _bindgen_ty_64 = -10834;
pub const kMIDIUnknownProperty: _bindgen_ty_64 = -10835;
pub const kMIDIWrongPropertyType: _bindgen_ty_64 = -10836;
pub const kMIDINoCurrentSetup: _bindgen_ty_64 = -10837;
pub const kMIDIMessageSendErr: _bindgen_ty_64 = -10838;
pub const kMIDIServerStartErr: _bindgen_ty_64 = -10839;
pub const kMIDISetupFormatErr: _bindgen_ty_64 = -10840;
pub const kMIDIWrongThread: _bindgen_ty_64 = -10841;
pub const kMIDIObjectNotFound: _bindgen_ty_64 = -10842;
pub const kMIDIIDNotUnique: _bindgen_ty_64 = -10843;
pub const kMIDINotPermitted: _bindgen_ty_64 = -10844;
pub type _bindgen_ty_64 = ::std::os::raw::c_int;
pub type MIDIObjectRef = UInt32;
pub type MIDIClientRef = MIDIObjectRef;
pub type MIDIPortRef = MIDIObjectRef;
pub type MIDIDeviceRef = MIDIObjectRef;
pub type MIDIEntityRef = MIDIObjectRef;
pub type MIDIEndpointRef = MIDIObjectRef;
pub type MIDITimeStamp = UInt64;
pub type MIDIObjectType = SInt32;
pub const kMIDIObjectType_Other: _bindgen_ty_65 = -1;
pub const kMIDIObjectType_Device: _bindgen_ty_65 = 0;
pub const kMIDIObjectType_Entity: _bindgen_ty_65 = 1;
pub const kMIDIObjectType_Source: _bindgen_ty_65 = 2;
pub const kMIDIObjectType_Destination: _bindgen_ty_65 = 3;
pub const kMIDIObjectType_ExternalDevice: _bindgen_ty_65 = 16;
pub const kMIDIObjectType_ExternalEntity: _bindgen_ty_65 = 17;
pub const kMIDIObjectType_ExternalSource: _bindgen_ty_65 = 18;
pub const kMIDIObjectType_ExternalDestination: _bindgen_ty_65 = 19;
pub type _bindgen_ty_65 = ::std::os::raw::c_int;
pub const kMIDIObjectType_ExternalMask: MIDIObjectType = 16;
pub type MIDIUniqueID = SInt32;
pub const kMIDIInvalidUniqueID: _bindgen_ty_66 = 0;
pub type _bindgen_ty_66 = ::std::os::raw::c_uint;
#[repr(C)]
#[repr(packed)]
//#[repr(pack(4))] would be correct, see https://github.com/rust-lang/rust/issues/33158
pub struct MIDIPacketList {
    pub numPackets: UInt32,
    pub packet: [MIDIPacket; 1usize],
}
#[test]
fn bindgen_test_layout_MIDIPacketList() {
    assert_eq!(::std::mem::size_of::<MIDIPacketList>() , 272usize , concat ! (
               "Size of: " , stringify ! ( MIDIPacketList ) ));
    assert_eq! (::std::mem::align_of::<MIDIPacketList>() , 4usize , concat ! (
                "Alignment of " , stringify ! ( MIDIPacketList ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIPacketList ) ) . numPackets as *
                const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIPacketList ) , "::"
                , stringify ! ( numPackets ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIPacketList ) ) . packet as * const _
                as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIPacketList ) , "::"
                , stringify ! ( packet ) ));
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct MIDISysexSendRequest {
    pub destination: MIDIEndpointRef,
    pub data: *const Byte,
    pub bytesToSend: UInt32,
    pub complete: Boolean,
    pub reserved: [Byte; 3usize],
    pub completionProc: MIDICompletionProc,
    pub completionRefCon: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_MIDISysexSendRequest() {
    assert_eq!(::std::mem::size_of::<MIDISysexSendRequest>() , 40usize ,
               concat ! ( "Size of: " , stringify ! ( MIDISysexSendRequest )
               ));
    assert_eq! (::std::mem::align_of::<MIDISysexSendRequest>() , 8usize ,
                concat ! (
                "Alignment of " , stringify ! ( MIDISysexSendRequest ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDISysexSendRequest ) ) . destination as
                * const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDISysexSendRequest )
                , "::" , stringify ! ( destination ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDISysexSendRequest ) ) . data as *
                const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDISysexSendRequest )
                , "::" , stringify ! ( data ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDISysexSendRequest ) ) . bytesToSend as
                * const _ as usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDISysexSendRequest )
                , "::" , stringify ! ( bytesToSend ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDISysexSendRequest ) ) . complete as *
                const _ as usize } , 20usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDISysexSendRequest )
                , "::" , stringify ! ( complete ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDISysexSendRequest ) ) . reserved as *
                const _ as usize } , 21usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDISysexSendRequest )
                , "::" , stringify ! ( reserved ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDISysexSendRequest ) ) . completionProc
                as * const _ as usize } , 24usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDISysexSendRequest )
                , "::" , stringify ! ( completionProc ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDISysexSendRequest ) ) .
                completionRefCon as * const _ as usize } , 32usize , concat !
                (
                "Alignment of field: " , stringify ! ( MIDISysexSendRequest )
                , "::" , stringify ! ( completionRefCon ) ));
}
impl Clone for MIDISysexSendRequest {
    fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct MIDINotification {
    pub messageID: MIDINotificationMessageID,
    pub messageSize: UInt32,
}
#[test]
fn bindgen_test_layout_MIDINotification() {
    assert_eq!(::std::mem::size_of::<MIDINotification>() , 8usize , concat ! (
               "Size of: " , stringify ! ( MIDINotification ) ));
    assert_eq! (::std::mem::align_of::<MIDINotification>() , 4usize , concat !
                ( "Alignment of " , stringify ! ( MIDINotification ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDINotification ) ) . messageID as *
                const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDINotification ) ,
                "::" , stringify ! ( messageID ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDINotification ) ) . messageSize as *
                const _ as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDINotification ) ,
                "::" , stringify ! ( messageSize ) ));
}
impl Clone for MIDINotification {
    fn clone(&self) -> Self { *self }
}
pub type MIDINotifyProc =
    ::std::option::Option<unsafe extern "C" fn(message:
                                                   *const MIDINotification,
                                               refCon:
                                                   *mut ::std::os::raw::c_void)>;
pub type MIDINotifyBlock = *mut ::std::os::raw::c_void;
pub type MIDIReadProc =
    ::std::option::Option<unsafe extern "C" fn(pktlist: *const MIDIPacketList,
                                               readProcRefCon:
                                                   *mut ::std::os::raw::c_void,
                                               srcConnRefCon:
                                                   *mut ::std::os::raw::c_void)>;
pub type MIDIReadBlock = *mut ::std::os::raw::c_void;
pub type MIDICompletionProc =
    ::std::option::Option<unsafe extern "C" fn(request:
                                                   *mut MIDISysexSendRequest)>;
#[repr(C)]
#[repr(packed)]
//#[repr(pack(4))] would be correct, see https://github.com/rust-lang/rust/issues/33158
pub struct MIDIPacket {
    pub timeStamp: MIDITimeStamp,
    pub length: UInt16,
    pub data: [Byte; 256usize],
    pub __padding: [Byte; 2usize]
}
#[test]
fn bindgen_test_layout_MIDIPacket() {
    assert_eq!(::std::mem::size_of::<MIDIPacket>() , 268usize , concat ! (
               "Size of: " , stringify ! ( MIDIPacket ) ));
    assert_eq! (::std::mem::align_of::<MIDIPacket>() , 4usize , concat ! (
                "Alignment of " , stringify ! ( MIDIPacket ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIPacket ) ) . timeStamp as * const _
                as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIPacket ) , "::" ,
                stringify ! ( timeStamp ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIPacket ) ) . length as * const _ as
                usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIPacket ) , "::" ,
                stringify ! ( length ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIPacket ) ) . data as * const _ as
                usize } , 10usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIPacket ) , "::" ,
                stringify ! ( data ) ));
}
pub type MIDINotificationMessageID = SInt32;
pub const kMIDIMsgSetupChanged: _bindgen_ty_67 = 1;
pub const kMIDIMsgObjectAdded: _bindgen_ty_67 = 2;
pub const kMIDIMsgObjectRemoved: _bindgen_ty_67 = 3;
pub const kMIDIMsgPropertyChanged: _bindgen_ty_67 = 4;
pub const kMIDIMsgThruConnectionsChanged: _bindgen_ty_67 = 5;
pub const kMIDIMsgSerialPortOwnerChanged: _bindgen_ty_67 = 6;
pub const kMIDIMsgIOError: _bindgen_ty_67 = 7;
pub type _bindgen_ty_67 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct MIDIObjectAddRemoveNotification {
    pub messageID: MIDINotificationMessageID,
    pub messageSize: UInt32,
    pub parent: MIDIObjectRef,
    pub parentType: MIDIObjectType,
    pub child: MIDIObjectRef,
    pub childType: MIDIObjectType,
}
#[test]
fn bindgen_test_layout_MIDIObjectAddRemoveNotification() {
    assert_eq!(::std::mem::size_of::<MIDIObjectAddRemoveNotification>() ,
               24usize , concat ! (
               "Size of: " , stringify ! ( MIDIObjectAddRemoveNotification )
               ));
    assert_eq! (::std::mem::align_of::<MIDIObjectAddRemoveNotification>() ,
                4usize , concat ! (
                "Alignment of " , stringify ! (
                MIDIObjectAddRemoveNotification ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectAddRemoveNotification ) ) .
                messageID as * const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectAddRemoveNotification ) , "::" , stringify ! (
                messageID ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectAddRemoveNotification ) ) .
                messageSize as * const _ as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectAddRemoveNotification ) , "::" , stringify ! (
                messageSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectAddRemoveNotification ) ) .
                parent as * const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectAddRemoveNotification ) , "::" , stringify ! (
                parent ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectAddRemoveNotification ) ) .
                parentType as * const _ as usize } , 12usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectAddRemoveNotification ) , "::" , stringify ! (
                parentType ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectAddRemoveNotification ) ) .
                child as * const _ as usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectAddRemoveNotification ) , "::" , stringify ! ( child
                ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectAddRemoveNotification ) ) .
                childType as * const _ as usize } , 20usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectAddRemoveNotification ) , "::" , stringify ! (
                childType ) ));
}
impl Clone for MIDIObjectAddRemoveNotification {
    fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct MIDIObjectPropertyChangeNotification {
    pub messageID: MIDINotificationMessageID,
    pub messageSize: UInt32,
    pub object: MIDIObjectRef,
    pub objectType: MIDIObjectType,
    pub propertyName: CFStringRef,
}
#[test]
fn bindgen_test_layout_MIDIObjectPropertyChangeNotification() {
    assert_eq!(::std::mem::size_of::<MIDIObjectPropertyChangeNotification>() ,
               24usize , concat ! (
               "Size of: " , stringify ! (
               MIDIObjectPropertyChangeNotification ) ));
    assert_eq! (::std::mem::align_of::<MIDIObjectPropertyChangeNotification>()
                , 8usize , concat ! (
                "Alignment of " , stringify ! (
                MIDIObjectPropertyChangeNotification ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectPropertyChangeNotification ) )
                . messageID as * const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectPropertyChangeNotification ) , "::" , stringify ! (
                messageID ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectPropertyChangeNotification ) )
                . messageSize as * const _ as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectPropertyChangeNotification ) , "::" , stringify ! (
                messageSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectPropertyChangeNotification ) )
                . object as * const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectPropertyChangeNotification ) , "::" , stringify ! (
                object ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectPropertyChangeNotification ) )
                . objectType as * const _ as usize } , 12usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectPropertyChangeNotification ) , "::" , stringify ! (
                objectType ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIObjectPropertyChangeNotification ) )
                . propertyName as * const _ as usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! (
                MIDIObjectPropertyChangeNotification ) , "::" , stringify ! (
                propertyName ) ));
}
impl Clone for MIDIObjectPropertyChangeNotification {
    fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct MIDIIOErrorNotification {
    pub messageID: MIDINotificationMessageID,
    pub messageSize: UInt32,
    pub driverDevice: MIDIDeviceRef,
    pub errorCode: OSStatus,
}
#[test]
fn bindgen_test_layout_MIDIIOErrorNotification() {
    assert_eq!(::std::mem::size_of::<MIDIIOErrorNotification>() , 16usize ,
               concat ! (
               "Size of: " , stringify ! ( MIDIIOErrorNotification ) ));
    assert_eq! (::std::mem::align_of::<MIDIIOErrorNotification>() , 4usize ,
                concat ! (
                "Alignment of " , stringify ! ( MIDIIOErrorNotification ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIIOErrorNotification ) ) . messageID
                as * const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIIOErrorNotification
                ) , "::" , stringify ! ( messageID ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIIOErrorNotification ) ) . messageSize
                as * const _ as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIIOErrorNotification
                ) , "::" , stringify ! ( messageSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIIOErrorNotification ) ) .
                driverDevice as * const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIIOErrorNotification
                ) , "::" , stringify ! ( driverDevice ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const MIDIIOErrorNotification ) ) . errorCode
                as * const _ as usize } , 12usize , concat ! (
                "Alignment of field: " , stringify ! ( MIDIIOErrorNotification
                ) , "::" , stringify ! ( errorCode ) ));
}
impl Clone for MIDIIOErrorNotification {
    fn clone(&self) -> Self { *self }
}
extern "C" {
    #[link_name = "kMIDIPropertyName"]
    pub static kMIDIPropertyName: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyManufacturer"]
    pub static kMIDIPropertyManufacturer: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyModel"]
    pub static kMIDIPropertyModel: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyUniqueID"]
    pub static kMIDIPropertyUniqueID: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyDeviceID"]
    pub static kMIDIPropertyDeviceID: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyReceiveChannels"]
    pub static kMIDIPropertyReceiveChannels: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyTransmitChannels"]
    pub static kMIDIPropertyTransmitChannels: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyMaxSysExSpeed"]
    pub static kMIDIPropertyMaxSysExSpeed: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyAdvanceScheduleTimeMuSec"]
    pub static kMIDIPropertyAdvanceScheduleTimeMuSec: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyIsEmbeddedEntity"]
    pub static kMIDIPropertyIsEmbeddedEntity: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyIsBroadcast"]
    pub static kMIDIPropertyIsBroadcast: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertySingleRealtimeEntity"]
    pub static kMIDIPropertySingleRealtimeEntity: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyConnectionUniqueID"]
    pub static kMIDIPropertyConnectionUniqueID: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyOffline"]
    pub static kMIDIPropertyOffline: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyPrivate"]
    pub static kMIDIPropertyPrivate: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyDriverOwner"]
    pub static kMIDIPropertyDriverOwner: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyFactoryPatchNameFile"]
    pub static kMIDIPropertyFactoryPatchNameFile: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyUserPatchNameFile"]
    pub static kMIDIPropertyUserPatchNameFile: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyNameConfiguration"]
    pub static kMIDIPropertyNameConfiguration: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyImage"]
    pub static kMIDIPropertyImage: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyDriverVersion"]
    pub static kMIDIPropertyDriverVersion: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertySupportsGeneralMIDI"]
    pub static kMIDIPropertySupportsGeneralMIDI: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertySupportsMMC"]
    pub static kMIDIPropertySupportsMMC: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyCanRoute"]
    pub static kMIDIPropertyCanRoute: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyReceivesClock"]
    pub static kMIDIPropertyReceivesClock: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyReceivesMTC"]
    pub static kMIDIPropertyReceivesMTC: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyReceivesNotes"]
    pub static kMIDIPropertyReceivesNotes: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyReceivesProgramChanges"]
    pub static kMIDIPropertyReceivesProgramChanges: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyReceivesBankSelectMSB"]
    pub static kMIDIPropertyReceivesBankSelectMSB: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyReceivesBankSelectLSB"]
    pub static kMIDIPropertyReceivesBankSelectLSB: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyTransmitsClock"]
    pub static kMIDIPropertyTransmitsClock: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyTransmitsMTC"]
    pub static kMIDIPropertyTransmitsMTC: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyTransmitsNotes"]
    pub static kMIDIPropertyTransmitsNotes: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyTransmitsProgramChanges"]
    pub static kMIDIPropertyTransmitsProgramChanges: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyTransmitsBankSelectMSB"]
    pub static kMIDIPropertyTransmitsBankSelectMSB: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyTransmitsBankSelectLSB"]
    pub static kMIDIPropertyTransmitsBankSelectLSB: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyPanDisruptsStereo"]
    pub static kMIDIPropertyPanDisruptsStereo: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyIsSampler"]
    pub static kMIDIPropertyIsSampler: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyIsDrumMachine"]
    pub static kMIDIPropertyIsDrumMachine: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyIsMixer"]
    pub static kMIDIPropertyIsMixer: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyIsEffectUnit"]
    pub static kMIDIPropertyIsEffectUnit: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyMaxReceiveChannels"]
    pub static kMIDIPropertyMaxReceiveChannels: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyMaxTransmitChannels"]
    pub static kMIDIPropertyMaxTransmitChannels: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyDriverDeviceEditorApp"]
    pub static kMIDIPropertyDriverDeviceEditorApp: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertySupportsShowControl"]
    pub static kMIDIPropertySupportsShowControl: CFStringRef;
}
extern "C" {
    #[link_name = "kMIDIPropertyDisplayName"]
    pub static kMIDIPropertyDisplayName: CFStringRef;
}
extern "C" {
    pub fn MIDIClientCreate(name: CFStringRef, notifyProc: MIDINotifyProc,
                            notifyRefCon: *mut ::std::os::raw::c_void,
                            outClient: *mut MIDIClientRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIClientCreateWithBlock(name: CFStringRef,
                                     outClient: *mut MIDIClientRef,
                                     notifyBlock: MIDINotifyBlock)
     -> OSStatus;
}
extern "C" {
    pub fn MIDIClientDispose(client: MIDIClientRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIInputPortCreate(client: MIDIClientRef, portName: CFStringRef,
                               readProc: MIDIReadProc,
                               refCon: *mut ::std::os::raw::c_void,
                               outPort: *mut MIDIPortRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIInputPortCreateWithBlock(client: MIDIClientRef,
                                        portName: CFStringRef,
                                        outPort: *mut MIDIPortRef,
                                        readBlock: MIDIReadBlock) -> OSStatus;
}
extern "C" {
    pub fn MIDIOutputPortCreate(client: MIDIClientRef, portName: CFStringRef,
                                outPort: *mut MIDIPortRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIPortDispose(port: MIDIPortRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIPortConnectSource(port: MIDIPortRef, source: MIDIEndpointRef,
                                 connRefCon: *mut ::std::os::raw::c_void)
     -> OSStatus;
}
extern "C" {
    pub fn MIDIPortDisconnectSource(port: MIDIPortRef,
                                    source: MIDIEndpointRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIGetNumberOfDevices() -> ItemCount;
}
extern "C" {
    pub fn MIDIGetDevice(deviceIndex0: ItemCount) -> MIDIDeviceRef;
}
extern "C" {
    pub fn MIDIDeviceGetNumberOfEntities(device: MIDIDeviceRef) -> ItemCount;
}
extern "C" {
    pub fn MIDIDeviceGetEntity(device: MIDIDeviceRef, entityIndex0: ItemCount)
     -> MIDIEntityRef;
}
extern "C" {
    pub fn MIDIEntityGetNumberOfSources(entity: MIDIEntityRef) -> ItemCount;
}
extern "C" {
    pub fn MIDIEntityGetSource(entity: MIDIEntityRef, sourceIndex0: ItemCount)
     -> MIDIEndpointRef;
}
extern "C" {
    pub fn MIDIEntityGetNumberOfDestinations(entity: MIDIEntityRef)
     -> ItemCount;
}
extern "C" {
    pub fn MIDIEntityGetDestination(entity: MIDIEntityRef,
                                    destIndex0: ItemCount) -> MIDIEndpointRef;
}
extern "C" {
    pub fn MIDIEntityGetDevice(inEntity: MIDIEntityRef,
                               outDevice: *mut MIDIDeviceRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIGetNumberOfSources() -> ItemCount;
}
extern "C" {
    pub fn MIDIGetSource(sourceIndex0: ItemCount) -> MIDIEndpointRef;
}
extern "C" {
    pub fn MIDIGetNumberOfDestinations() -> ItemCount;
}
extern "C" {
    pub fn MIDIGetDestination(destIndex0: ItemCount) -> MIDIEndpointRef;
}
extern "C" {
    pub fn MIDIEndpointGetEntity(inEndpoint: MIDIEndpointRef,
                                 outEntity: *mut MIDIEntityRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIDestinationCreate(client: MIDIClientRef, name: CFStringRef,
                                 readProc: MIDIReadProc,
                                 refCon: *mut ::std::os::raw::c_void,
                                 outDest: *mut MIDIEndpointRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIDestinationCreateWithBlock(client: MIDIClientRef,
                                          name: CFStringRef,
                                          outDest: *mut MIDIEndpointRef,
                                          readBlock: MIDIReadBlock)
     -> OSStatus;
}
extern "C" {
    pub fn MIDISourceCreate(client: MIDIClientRef, name: CFStringRef,
                            outSrc: *mut MIDIEndpointRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIEndpointDispose(endpt: MIDIEndpointRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIGetNumberOfExternalDevices() -> ItemCount;
}
extern "C" {
    pub fn MIDIGetExternalDevice(deviceIndex0: ItemCount) -> MIDIDeviceRef;
}
extern "C" {
    pub fn MIDIObjectGetIntegerProperty(obj: MIDIObjectRef,
                                        propertyID: CFStringRef,
                                        outValue: *mut SInt32) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectSetIntegerProperty(obj: MIDIObjectRef,
                                        propertyID: CFStringRef,
                                        value: SInt32) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectGetStringProperty(obj: MIDIObjectRef,
                                       propertyID: CFStringRef,
                                       str: *mut CFStringRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectSetStringProperty(obj: MIDIObjectRef,
                                       propertyID: CFStringRef,
                                       str: CFStringRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectGetDataProperty(obj: MIDIObjectRef,
                                     propertyID: CFStringRef,
                                     outData: *mut CFDataRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectSetDataProperty(obj: MIDIObjectRef,
                                     propertyID: CFStringRef, data: CFDataRef)
     -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectGetDictionaryProperty(obj: MIDIObjectRef,
                                           propertyID: CFStringRef,
                                           outDict: *mut CFDictionaryRef)
     -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectSetDictionaryProperty(obj: MIDIObjectRef,
                                           propertyID: CFStringRef,
                                           dict: CFDictionaryRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectGetProperties(obj: MIDIObjectRef,
                                   outProperties: *mut CFPropertyListRef,
                                   deep: Boolean) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectRemoveProperty(obj: MIDIObjectRef,
                                    propertyID: CFStringRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIObjectFindByUniqueID(inUniqueID: MIDIUniqueID,
                                    outObject: *mut MIDIObjectRef,
                                    outObjectType: *mut MIDIObjectType)
     -> OSStatus;
}
extern "C" {
    pub fn MIDISend(port: MIDIPortRef, dest: MIDIEndpointRef,
                    pktlist: *const MIDIPacketList) -> OSStatus;
}
extern "C" {
    pub fn MIDISendSysex(request: *mut MIDISysexSendRequest) -> OSStatus;
}
extern "C" {
    pub fn MIDIReceived(src: MIDIEndpointRef, pktlist: *const MIDIPacketList)
     -> OSStatus;
}
extern "C" {
    pub fn MIDIFlushOutput(dest: MIDIEndpointRef) -> OSStatus;
}
extern "C" {
    pub fn MIDIRestart() -> OSStatus;
}
extern "C" {
    pub fn MIDIPacketListInit(pktlist: *mut MIDIPacketList)
     -> *mut MIDIPacket;
}
extern "C" {
    pub fn MIDIPacketListAdd(pktlist: *mut MIDIPacketList,
                             listSize: ByteCount, curPacket: *mut MIDIPacket,
                             time: MIDITimeStamp, nData: ByteCount,
                             data: *const Byte) -> *mut MIDIPacket;
}