rust_macios/
kernel.rs

1//! Develop kernel-resident device drivers and kernel extensions.
2#![allow(non_camel_case_types)]
3use libc::{
4    c_char, c_double, c_float, c_int, c_longlong, c_schar, c_short, c_uchar, c_uint, c_ulong,
5    c_ulonglong, c_ushort, c_void,
6};
7
8/* Kernel Data Types */
9
10pub type AVIDType = UInt32;
11pub type AbsoluteTime = UInt64;
12pub type BDFeatures = UInt32;
13pub type BDMediaType = UInt32;
14pub type Boolean = bool;
15pub type Byte = c_uchar;
16pub type Bytef = Byte;
17pub type BytePtr = *mut UInt8;
18pub type CSRNodeUniqueID = UInt64;
19pub type DepthMode = UInt16;
20pub type DisplayIDType = AVIDType;
21pub type DriverDescVersion = UInt32;
22pub type Duration = SInt32;
23pub type ExtendedSenseCode = UInt8;
24pub type Fixed = UInt32;
25pub type FixedPtr = *mut Fixed;
26pub type Float32 = c_float;
27pub type Float64 = c_double;
28pub type FourCharCode = c_uint;
29pub type Fract = UInt32;
30pub type FractPtr = *mut Fract;
31pub type GammaTableID = UInt32;
32pub type Handle = *mut Ptr;
33pub type LogicalAddress = *mut c_void;
34pub type MasterMuteUpdate = fn() -> bool;
35pub type MasterVolumeUpdate = fn() -> UInt16;
36#[deprecated]
37pub type OptionBits = UInt32;
38pub type PBVersion = UInt32;
39pub type Ptr = *mut c_char;
40pub type RawSenseCode = UInt8;
41pub type RegCStrEntryName = char;
42pub type RegCStrEntryNameBuf = [char; 48];
43pub type RegCStrEntryNamePtr = *mut char;
44pub type RegCStrPathName = char;
45pub type RegEntryIterationOp = RegIterationOp;
46pub type RegEntryModifiers = RegModifiers;
47pub type RegIterationOp = UInt32;
48pub type RegModifiers = UInt32;
49pub type RegPathNameSize = UInt32;
50pub type RegPropertyModifiers = RegModifiers;
51pub type RegPropertyName = char;
52pub type RegPropertyNameBuf = [char; 32];
53pub type RegPropertyNamePtr = *mut char;
54pub type RegPropertyValue = *mut c_void;
55pub type RegPropertyValueSize = UInt32;
56pub type ResType = FourCharCode;
57pub type ResTypePtr = ResType;
58pub type SInt = c_int;
59pub type SInt16 = c_short;
60pub type SInt32 = c_int;
61pub type SInt64 = c_longlong;
62pub type SInt8 = c_schar;
63pub type ServiceCount = UInt32;
64pub type SignedByte = c_schar;
65pub type Str31 = [char; 32];
66pub type TransmissionPower = SInt8;
67pub type UInt = c_uint;
68pub type UInt16 = c_ushort;
69pub type UInt32 = c_uint;
70pub type UInt32Ptr = *mut UInt32;
71pub type UInt64 = c_ulonglong;
72pub type UInt8 = c_uchar;
73pub type UNDKey = *mut char;
74pub type UNDLabel = *mut char;
75pub type UNDMessage = *mut char;
76pub type UNDPath = *mut char;
77pub type UniChar = u16;
78pub type VOID = c_void;
79pub type VideoDeviceType = UInt32;
80pub type WK_word = c_uint;
81pub type size_t = libc::size_t;
82pub type uint = c_uint;
83pub type uInt = c_uint;
84pub type uIntf = uInt;
85pub type uLong = c_ulong;
86pub type uLongf = uLong;
87pub type u_char = c_uchar;
88pub type u_int = c_uint;
89pub type u_int16_t = c_ushort;
90pub type u_int32_t = c_uint;
91pub type u_int64_t = c_ulonglong;
92pub type u_int8_t = u_char;
93pub type u_long = c_ulong;
94pub type u_quad_t = u_int64_t;
95pub type u_short = c_ushort;
96pub type uint16_t = u_int16_t;
97pub type uint32_t = u_int32_t;
98pub type uint64_t = u_int64_t;
99pub type uint8_t = u_int8_t;
100pub type uint_fast16_t = uint16_t;
101pub type uint_fast32_t = uint32_t;
102pub type uint_fast64_t = uint64_t;
103pub type uint_fast8_t = uint8_t;
104pub type uint_least16_t = uint16_t;
105pub type uint_least32_t = uint32_t;
106pub type uint_least64_t = uint64_t;
107pub type uint_least8_t = uint8_t;
108pub type uintmax_t = c_ulong;
109pub type uintptr_t = c_ulong;