Debian Codegraph @

third_party/rust/coremidi-sys/src/generated.rs

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