objc2_io_kit/generated/graphics.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6use core::ptr::NonNull;
7#[cfg(feature = "objc2")]
8use objc2::__framework_prelude::*;
9use objc2_core_foundation::*;
10
11use crate::*;
12
13/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioacceleratorclassname?language=objc)
14pub const kIOAcceleratorClassName: &CStr =
15 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelerator\0") };
16/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kcurrentgraphicsinterfaceversion?language=objc)
17pub const kCurrentGraphicsInterfaceVersion: c_uint = 1;
18/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kcurrentgraphicsinterfacerevision?language=objc)
19pub const kCurrentGraphicsInterfaceRevision: c_uint = 2;
20/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioacceltypeskey?language=objc)
21pub const kIOAccelTypesKey: &CStr =
22 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelTypes\0") };
23/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelindexkey?language=objc)
24pub const kIOAccelIndexKey: &CStr =
25 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelIndex\0") };
26/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelrevisionkey?language=objc)
27pub const kIOAccelRevisionKey: &CStr =
28 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelRevision\0") };
29/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io1bitindexedpixels?language=objc)
30pub const IO1BitIndexedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"P\0") };
31/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io2bitindexedpixels?language=objc)
32pub const IO2BitIndexedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"PP\0") };
33/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io4bitindexedpixels?language=objc)
34pub const IO4BitIndexedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"PPPP\0") };
35/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io8bitindexedpixels?language=objc)
36pub const IO8BitIndexedPixels: &CStr =
37 unsafe { CStr::from_bytes_with_nul_unchecked(b"PPPPPPPP\0") };
38/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io16bitdirectpixels?language=objc)
39pub const IO16BitDirectPixels: &CStr =
40 unsafe { CStr::from_bytes_with_nul_unchecked(b"-RRRRRGGGGGBBBBB\0") };
41/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io32bitdirectpixels?language=objc)
42pub const IO32BitDirectPixels: &CStr =
43 unsafe { CStr::from_bytes_with_nul_unchecked(b"--------RRRRRRRRGGGGGGGGBBBBBBBB\0") };
44/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio30bitdirectpixels?language=objc)
45pub const kIO30BitDirectPixels: &CStr =
46 unsafe { CStr::from_bytes_with_nul_unchecked(b"--RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB\0") };
47/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio64bitdirectpixels?language=objc)
48pub const kIO64BitDirectPixels: &CStr =
49 unsafe { CStr::from_bytes_with_nul_unchecked(b"-16R16G16B16\0") };
50/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16bitfloatpixels?language=objc)
51pub const kIO16BitFloatPixels: &CStr =
52 unsafe { CStr::from_bytes_with_nul_unchecked(b"-16FR16FG16FB16\0") };
53/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32bitfloatpixels?language=objc)
54pub const kIO32BitFloatPixels: &CStr =
55 unsafe { CStr::from_bytes_with_nul_unchecked(b"-32FR32FG32FB32\0") };
56/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioyuv422pixels?language=objc)
57pub const IOYUV422Pixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Y4U2V2\0") };
58/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io8bitoverlaypixels?language=objc)
59pub const IO8BitOverlayPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"O8\0") };
60/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iopagedpixels?language=objc)
61pub const IOPagedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Page1\0") };
62/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io_sampletypealpha?language=objc)
63pub const IO_SampleTypeAlpha: c_uint = b'A' as _;
64/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io_sampletypeskip?language=objc)
65pub const IO_SampleTypeSkip: c_uint = b'-' as _;
66/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsetgammasyncnotspecified?language=objc)
67pub const kIOFBSetGammaSyncNotSpecified: c_int = -1;
68/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsetgammasyncnosync?language=objc)
69pub const kIOFBSetGammaSyncNoSync: c_uint = 0;
70/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsetgammasyncverticalblanksync?language=objc)
71pub const kIOFBSetGammaSyncVerticalBlankSync: c_uint = 1;
72/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayattributeskey?language=objc)
73pub const kIODisplayAttributesKey: &CStr =
74 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayAttributes\0") };
75/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsunderscankey?language=objc)
76pub const kIODisplaySupportsUnderscanKey: &CStr =
77 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsUnderscan\0") };
78/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsbasicaudiokey?language=objc)
79pub const kIODisplaySupportsBasicAudioKey: &CStr =
80 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsBasicAudio\0") };
81/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsycbcr444key?language=objc)
82pub const kIODisplaySupportsYCbCr444Key: &CStr =
83 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsYCbCr444\0") };
84/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsycbcr422key?language=objc)
85pub const kIODisplaySupportsYCbCr422Key: &CStr =
86 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsYCbCr422\0") };
87/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayselectedcolormodekey?language=objc)
88pub const kIODisplaySelectedColorModeKey: &CStr =
89 unsafe { CStr::from_bytes_with_nul_unchecked(b"cmod\0") };
90/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioframebufferinfokey?language=objc)
91pub const kIOFramebufferInfoKey: &CStr =
92 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFramebufferInformation\0") };
93/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbwidthkey?language=objc)
94pub const kIOFBWidthKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBWidth\0") };
95/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbheightkey?language=objc)
96pub const kIOFBHeightKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBHeight\0") };
97/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbrefreshratekey?language=objc)
98pub const kIOFBRefreshRateKey: &CStr =
99 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBRefreshRate\0") };
100/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbflagskey?language=objc)
101pub const kIOFBFlagsKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBFlags\0") };
102/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbytesperrowkey?language=objc)
103pub const kIOFBBytesPerRowKey: &CStr =
104 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBytesPerRow\0") };
105/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbytesperplanekey?language=objc)
106pub const kIOFBBytesPerPlaneKey: &CStr =
107 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBytesPerPlane\0") };
108/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitsperpixelkey?language=objc)
109pub const kIOFBBitsPerPixelKey: &CStr =
110 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBitsPerPixel\0") };
111/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcomponentcountkey?language=objc)
112pub const kIOFBComponentCountKey: &CStr =
113 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBComponentCount\0") };
114/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitspercomponentkey?language=objc)
115pub const kIOFBBitsPerComponentKey: &CStr =
116 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBitsPerComponent\0") };
117/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdetailedtimingskey?language=objc)
118pub const kIOFBDetailedTimingsKey: &CStr =
119 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBDetailedTimings\0") };
120/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbtimingrangekey?language=objc)
121pub const kIOFBTimingRangeKey: &CStr =
122 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBTimingRange\0") };
123/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbscalerinfokey?language=objc)
124pub const kIOFBScalerInfoKey: &CStr =
125 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBScalerInfo\0") };
126/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursorinfokey?language=objc)
127pub const kIOFBCursorInfoKey: &CStr =
128 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBCursorInfo\0") };
129/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdmidongleromkey?language=objc)
130pub const kIOFBHDMIDongleROMKey: &CStr =
131 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBHDMIDongleROM\0") };
132/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhostaccessflagskey?language=objc)
133pub const kIOFBHostAccessFlagsKey: &CStr =
134 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBHostAccessFlags\0") };
135/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmemorysizekey?language=objc)
136pub const kIOFBMemorySizeKey: &CStr =
137 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBMemorySize\0") };
138/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbneedsrefreshkey?language=objc)
139pub const kIOFBNeedsRefreshKey: &CStr =
140 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBNeedsRefresh\0") };
141/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbprobeoptionskey?language=objc)
142pub const kIOFBProbeOptionsKey: &CStr =
143 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBProbeOptions\0") };
144/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbgammawidthkey?language=objc)
145pub const kIOFBGammaWidthKey: &CStr =
146 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBGammaWidth\0") };
147/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbgammacountkey?language=objc)
148pub const kIOFBGammaCountKey: &CStr =
149 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBGammaCount\0") };
150/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbclutdeferkey?language=objc)
151pub const kIOFBCLUTDeferKey: &CStr =
152 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBCLUTDefer\0") };
153/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayportconfigurationdatakey?language=objc)
154pub const kIOFBDisplayPortConfigurationDataKey: &CStr =
155 unsafe { CStr::from_bytes_with_nul_unchecked(b"dpcd-registers\0") };
156/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernatepreviewactivekey?language=objc)
157pub const kIOHibernatePreviewActiveKey: &CStr =
158 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOHibernatePreviewActive\0") };
159/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernateefigfxstatuskey?language=objc)
160pub const kIOHibernateEFIGfxStatusKey: &CStr =
161 unsafe { CStr::from_bytes_with_nul_unchecked(b"IOHibernateEFIGfxStatus\0") };
162/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypekey?language=objc)
163pub const kIOFBAVSignalTypeKey: &CStr =
164 unsafe { CStr::from_bytes_with_nul_unchecked(b"av-signal-type\0") };
165/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbconfigkey?language=objc)
166pub const kIOFBConfigKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBConfig\0") };
167/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodeskey?language=objc)
168pub const kIOFBModesKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBModes\0") };
169/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodeidkey?language=objc)
170pub const kIOFBModeIDKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"ID\0") };
171/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodedmkey?language=objc)
172pub const kIOFBModeDMKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"DM\0") };
173/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodetmkey?language=objc)
174pub const kIOFBModeTMKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"TM\0") };
175/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodeaidkey?language=objc)
176pub const kIOFBModeAIDKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"AID\0") };
177/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodedfkey?language=objc)
178pub const kIOFBModeDFKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"DF\0") };
179/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodepikey?language=objc)
180pub const kIOFBModePIKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"PI\0") };
181/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayedidkey?language=objc)
182pub const kIODisplayEDIDKey: &CStr =
183 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayEDID\0") };
184/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayedidoriginalkey?language=objc)
185pub const kIODisplayEDIDOriginalKey: &CStr =
186 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayEDIDOriginal\0") };
187/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaylocationkey?language=objc)
188pub const kIODisplayLocationKey: &CStr =
189 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayLocation\0") };
190/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayconnectflagskey?language=objc)
191pub const kIODisplayConnectFlagsKey: &CStr =
192 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayConnectFlags\0") };
193/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayhasbacklightkey?language=objc)
194pub const kIODisplayHasBacklightKey: &CStr =
195 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayHasBacklight\0") };
196/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayisdigitalkey?language=objc)
197pub const kIODisplayIsDigitalKey: &CStr =
198 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayIsDigital\0") };
199/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybundlekey?language=objc)
200pub const kDisplayBundleKey: &CStr =
201 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBundle\0") };
202/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kappledisplaytypekey?language=objc)
203pub const kAppleDisplayTypeKey: &CStr =
204 unsafe { CStr::from_bytes_with_nul_unchecked(b"AppleDisplayType\0") };
205/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kapplesensekey?language=objc)
206pub const kAppleSenseKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"AppleSense\0") };
207/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymccsversionkey?language=objc)
208pub const kIODisplayMCCSVersionKey: &CStr =
209 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayMCCSVersion\0") };
210/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytechnologytypekey?language=objc)
211pub const kIODisplayTechnologyTypeKey: &CStr =
212 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayTechnologyType\0") };
213/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayusagetimekey?language=objc)
214pub const kIODisplayUsageTimeKey: &CStr =
215 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayUsageTime\0") };
216/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayfirmwarelevelkey?language=objc)
217pub const kIODisplayFirmwareLevelKey: &CStr =
218 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayFirmwareLevel\0") };
219/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayvendorid?language=objc)
220pub const kDisplayVendorID: &CStr =
221 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayVendorID\0") };
222/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayproductid?language=objc)
223pub const kDisplayProductID: &CStr =
224 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayProductID\0") };
225/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayserialnumber?language=objc)
226pub const kDisplaySerialNumber: &CStr =
227 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySerialNumber\0") };
228/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayserialstring?language=objc)
229pub const kDisplaySerialString: &CStr =
230 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySerialString\0") };
231/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayweekofmanufacture?language=objc)
232pub const kDisplayWeekOfManufacture: &CStr =
233 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWeekManufacture\0") };
234/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayyearofmanufacture?language=objc)
235pub const kDisplayYearOfManufacture: &CStr =
236 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayYearManufacture\0") };
237/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayproductname?language=objc)
238pub const kDisplayProductName: &CStr =
239 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayProductName\0") };
240/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaywhitepointx?language=objc)
241pub const kDisplayWhitePointX: &CStr =
242 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWhitePointX\0") };
243/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaywhitepointy?language=objc)
244pub const kDisplayWhitePointY: &CStr =
245 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWhitePointY\0") };
246/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayredpointx?language=objc)
247pub const kDisplayRedPointX: &CStr =
248 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayRedPointX\0") };
249/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayredpointy?language=objc)
250pub const kDisplayRedPointY: &CStr =
251 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayRedPointY\0") };
252/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygreenpointx?language=objc)
253pub const kDisplayGreenPointX: &CStr =
254 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGreenPointX\0") };
255/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygreenpointy?language=objc)
256pub const kDisplayGreenPointY: &CStr =
257 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGreenPointY\0") };
258/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybluepointx?language=objc)
259pub const kDisplayBluePointX: &CStr =
260 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBluePointX\0") };
261/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybluepointy?language=objc)
262pub const kDisplayBluePointY: &CStr =
263 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBluePointY\0") };
264/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaywhitegamma?language=objc)
265pub const kDisplayWhiteGamma: &CStr =
266 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWhiteGamma\0") };
267/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayredgamma?language=objc)
268pub const kDisplayRedGamma: &CStr =
269 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayRedGamma\0") };
270/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygreengamma?language=objc)
271pub const kDisplayGreenGamma: &CStr =
272 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGreenGamma\0") };
273/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybluegamma?language=objc)
274pub const kDisplayBlueGamma: &CStr =
275 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBlueGamma\0") };
276/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammachannels?language=objc)
277pub const kDisplayGammaChannels: &CStr =
278 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaChannels\0") };
279/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammaentrycount?language=objc)
280pub const kDisplayGammaEntryCount: &CStr =
281 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaEntryCount\0") };
282/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammaentrysize?language=objc)
283pub const kDisplayGammaEntrySize: &CStr =
284 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaEntrySize\0") };
285/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammatable?language=objc)
286pub const kDisplayGammaTable: &CStr =
287 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaTable\0") };
288/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybrightnessaffectsgamma?language=objc)
289pub const kDisplayBrightnessAffectsGamma: &CStr =
290 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBrightnessAffectsGamma\0") };
291/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayviewangleaffectsgamma?language=objc)
292pub const kDisplayViewAngleAffectsGamma: &CStr =
293 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayViewAngleAffectsGamma\0") };
294/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaycsprofile?language=objc)
295pub const kDisplayCSProfile: &CStr =
296 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayCSProfile\0") };
297/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayhorizontalimagesize?language=objc)
298pub const kDisplayHorizontalImageSize: &CStr =
299 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayHorizontalImageSize\0") };
300/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayverticalimagesize?language=objc)
301pub const kDisplayVerticalImageSize: &CStr =
302 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayVerticalImageSize\0") };
303/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayfixedpixelformat?language=objc)
304pub const kDisplayFixedPixelFormat: &CStr =
305 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayFixedPixelFormat\0") };
306/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayout?language=objc)
307pub const kDisplaySubPixelLayout: &CStr =
308 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySubPixelLayout\0") };
309/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfiguration?language=objc)
310pub const kDisplaySubPixelConfiguration: &CStr =
311 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySubPixelConfiguration\0") };
312/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshape?language=objc)
313pub const kDisplaySubPixelShape: &CStr =
314 unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySubPixelShape\0") };
315/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayoverridematchingkey?language=objc)
316pub const kIODisplayOverrideMatchingKey: &CStr =
317 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayOverrideMatching\0") };
318/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparameterskey?language=objc)
319pub const kIODisplayParametersKey: &CStr =
320 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayParameters\0") };
321/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayguidkey?language=objc)
322pub const kIODisplayGUIDKey: &CStr =
323 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayGUID\0") };
324/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayvaluekey?language=objc)
325pub const kIODisplayValueKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"value\0") };
326/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayminvaluekey?language=objc)
327pub const kIODisplayMinValueKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"min\0") };
328/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymaxvaluekey?language=objc)
329pub const kIODisplayMaxValueKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"max\0") };
330/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybrightnessprobekey?language=objc)
331pub const kIODisplayBrightnessProbeKey: &CStr =
332 unsafe { CStr::from_bytes_with_nul_unchecked(b"brightness-probe\0") };
333/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaylinearbrightnessprobekey?language=objc)
334pub const kIODisplayLinearBrightnessProbeKey: &CStr =
335 unsafe { CStr::from_bytes_with_nul_unchecked(b"linear-brightness-probe\0") };
336/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybrightnesskey?language=objc)
337pub const kIODisplayBrightnessKey: &CStr =
338 unsafe { CStr::from_bytes_with_nul_unchecked(b"brightness\0") };
339/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaylinearbrightnesskey?language=objc)
340pub const kIODisplayLinearBrightnessKey: &CStr =
341 unsafe { CStr::from_bytes_with_nul_unchecked(b"linear-brightness\0") };
342/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayusablelinearbrightnesskey?language=objc)
343pub const kIODisplayUsableLinearBrightnessKey: &CStr =
344 unsafe { CStr::from_bytes_with_nul_unchecked(b"usable-linear-brightness\0") };
345/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybrightnessfadekey?language=objc)
346pub const kIODisplayBrightnessFadeKey: &CStr =
347 unsafe { CStr::from_bytes_with_nul_unchecked(b"brightness-fade\0") };
348/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycontrastkey?language=objc)
349pub const kIODisplayContrastKey: &CStr =
350 unsafe { CStr::from_bytes_with_nul_unchecked(b"contrast\0") };
351/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayhorizontalpositionkey?language=objc)
352pub const kIODisplayHorizontalPositionKey: &CStr =
353 unsafe { CStr::from_bytes_with_nul_unchecked(b"horizontal-position\0") };
354/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayhorizontalsizekey?language=objc)
355pub const kIODisplayHorizontalSizeKey: &CStr =
356 unsafe { CStr::from_bytes_with_nul_unchecked(b"horizontal-size\0") };
357/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayverticalpositionkey?language=objc)
358pub const kIODisplayVerticalPositionKey: &CStr =
359 unsafe { CStr::from_bytes_with_nul_unchecked(b"vertical-position\0") };
360/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayverticalsizekey?language=objc)
361pub const kIODisplayVerticalSizeKey: &CStr =
362 unsafe { CStr::from_bytes_with_nul_unchecked(b"vertical-size\0") };
363/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytrapezoidkey?language=objc)
364pub const kIODisplayTrapezoidKey: &CStr =
365 unsafe { CStr::from_bytes_with_nul_unchecked(b"trapezoid\0") };
366/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypincushionkey?language=objc)
367pub const kIODisplayPincushionKey: &CStr =
368 unsafe { CStr::from_bytes_with_nul_unchecked(b"pincushion\0") };
369/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparallelogramkey?language=objc)
370pub const kIODisplayParallelogramKey: &CStr =
371 unsafe { CStr::from_bytes_with_nul_unchecked(b"parallelogram\0") };
372/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrotationkey?language=objc)
373pub const kIODisplayRotationKey: &CStr =
374 unsafe { CStr::from_bytes_with_nul_unchecked(b"rotation\0") };
375/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytheatremodekey?language=objc)
376pub const kIODisplayTheatreModeKey: &CStr =
377 unsafe { CStr::from_bytes_with_nul_unchecked(b"theatre-mode\0") };
378/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytheatremodewindowkey?language=objc)
379pub const kIODisplayTheatreModeWindowKey: &CStr =
380 unsafe { CStr::from_bytes_with_nul_unchecked(b"theatre-mode-window\0") };
381/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayoverscankey?language=objc)
382pub const kIODisplayOverscanKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"oscn\0") };
383/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayvideobestkey?language=objc)
384pub const kIODisplayVideoBestKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"vbst\0") };
385/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayspeakervolumekey?language=objc)
386pub const kIODisplaySpeakerVolumeKey: &CStr =
387 unsafe { CStr::from_bytes_with_nul_unchecked(b"speaker-volume\0") };
388/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayspeakerselectkey?language=objc)
389pub const kIODisplaySpeakerSelectKey: &CStr =
390 unsafe { CStr::from_bytes_with_nul_unchecked(b"speaker-select\0") };
391/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymicrophonevolumekey?language=objc)
392pub const kIODisplayMicrophoneVolumeKey: &CStr =
393 unsafe { CStr::from_bytes_with_nul_unchecked(b"microphone-volume\0") };
394/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayambientlightsensorkey?language=objc)
395pub const kIODisplayAmbientLightSensorKey: &CStr =
396 unsafe { CStr::from_bytes_with_nul_unchecked(b"ambient-light-sensor\0") };
397/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiomuteandscreenblankkey?language=objc)
398pub const kIODisplayAudioMuteAndScreenBlankKey: &CStr =
399 unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-mute-and-screen-blank\0") };
400/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiotreblekey?language=objc)
401pub const kIODisplayAudioTrebleKey: &CStr =
402 unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-treble\0") };
403/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiobasskey?language=objc)
404pub const kIODisplayAudioBassKey: &CStr =
405 unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-bass\0") };
406/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiobalancelrkey?language=objc)
407pub const kIODisplayAudioBalanceLRKey: &CStr =
408 unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-balance-LR\0") };
409/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudioprocessormodekey?language=objc)
410pub const kIODisplayAudioProcessorModeKey: &CStr =
411 unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-processor-mode\0") };
412/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowermodekey?language=objc)
413pub const kIODisplayPowerModeKey: &CStr =
414 unsafe { CStr::from_bytes_with_nul_unchecked(b"power-mode\0") };
415/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymanufacturerspecifickey?language=objc)
416pub const kIODisplayManufacturerSpecificKey: &CStr =
417 unsafe { CStr::from_bytes_with_nul_unchecked(b"manufacturer-specific\0") };
418/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstatekey?language=objc)
419pub const kIODisplayPowerStateKey: &CStr =
420 unsafe { CStr::from_bytes_with_nul_unchecked(b"dsyp\0") };
421/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycontrolleridkey?language=objc)
422pub const kIODisplayControllerIDKey: &CStr =
423 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayControllerID\0") };
424/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycapabilitystringkey?language=objc)
425pub const kIODisplayCapabilityStringKey: &CStr =
426 unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayCapabilityString\0") };
427/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayredgammascalekey?language=objc)
428pub const kIODisplayRedGammaScaleKey: &CStr =
429 unsafe { CStr::from_bytes_with_nul_unchecked(b"rgsc\0") };
430/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaygreengammascalekey?language=objc)
431pub const kIODisplayGreenGammaScaleKey: &CStr =
432 unsafe { CStr::from_bytes_with_nul_unchecked(b"ggsc\0") };
433/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybluegammascalekey?language=objc)
434pub const kIODisplayBlueGammaScaleKey: &CStr =
435 unsafe { CStr::from_bytes_with_nul_unchecked(b"bgsc\0") };
436/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaygammascalekey?language=objc)
437pub const kIODisplayGammaScaleKey: &CStr =
438 unsafe { CStr::from_bytes_with_nul_unchecked(b"gsc \0") };
439/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparameterscommitkey?language=objc)
440pub const kIODisplayParametersCommitKey: &CStr =
441 unsafe { CStr::from_bytes_with_nul_unchecked(b"commit\0") };
442/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparametersdefaultkey?language=objc)
443pub const kIODisplayParametersDefaultKey: &CStr =
444 unsafe { CStr::from_bytes_with_nul_unchecked(b"defaults\0") };
445/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparametersflushkey?language=objc)
446pub const kIODisplayParametersFlushKey: &CStr =
447 unsafe { CStr::from_bytes_with_nul_unchecked(b"flush\0") };
448/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioacceleratorclienttypes?language=objc)
449#[repr(transparent)]
450#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
451pub struct eIOAcceleratorClientTypes(pub c_uint);
452impl eIOAcceleratorClientTypes {
453 #[doc(alias = "kIOAccelSurfaceClientType")]
454 pub const IOAccelSurfaceClientType: Self = Self(0);
455 #[doc(alias = "kIOAccelNumClientTypes")]
456 pub const IOAccelNumClientTypes: Self = Self(1);
457 #[doc(alias = "kIOAccelSurface2ClientType")]
458 pub const IOAccelSurface2ClientType: Self = Self(0x20);
459}
460
461#[cfg(feature = "objc2")]
462unsafe impl Encode for eIOAcceleratorClientTypes {
463 const ENCODING: Encoding = c_uint::ENCODING;
464}
465
466#[cfg(feature = "objc2")]
467unsafe impl RefEncode for eIOAcceleratorClientTypes {
468 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
469}
470
471/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelbounds?language=objc)
472#[repr(C)]
473#[derive(Clone, Copy, Debug, PartialEq)]
474pub struct IOAccelBounds {
475 pub x: i16,
476 pub y: i16,
477 pub w: i16,
478 pub h: i16,
479}
480
481#[cfg(feature = "objc2")]
482unsafe impl Encode for IOAccelBounds {
483 const ENCODING: Encoding = Encoding::Struct(
484 "?",
485 &[
486 <i16>::ENCODING,
487 <i16>::ENCODING,
488 <i16>::ENCODING,
489 <i16>::ENCODING,
490 ],
491 );
492}
493
494#[cfg(feature = "objc2")]
495unsafe impl RefEncode for IOAccelBounds {
496 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
497}
498
499/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsize?language=objc)
500#[repr(C)]
501#[derive(Clone, Copy, Debug, PartialEq)]
502pub struct IOAccelSize {
503 pub w: i16,
504 pub h: i16,
505}
506
507#[cfg(feature = "objc2")]
508unsafe impl Encode for IOAccelSize {
509 const ENCODING: Encoding = Encoding::Struct("?", &[<i16>::ENCODING, <i16>::ENCODING]);
510}
511
512#[cfg(feature = "objc2")]
513unsafe impl RefEncode for IOAccelSize {
514 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
515}
516
517/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelvolatilesurface?language=objc)
518pub const kIOAccelVolatileSurface: c_uint = 0x00000001;
519
520/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsurfaceinformation?language=objc)
521#[cfg(feature = "libc")]
522#[repr(C)]
523#[derive(Clone, Copy, Debug, PartialEq)]
524pub struct IOAccelSurfaceInformation {
525 pub address: [libc::mach_vm_address_t; 4],
526 pub rowBytes: u32,
527 pub width: u32,
528 pub height: u32,
529 pub pixelFormat: u32,
530 pub flags: IOOptionBits,
531 pub colorTemperature: [IOFixed; 4],
532 pub typeDependent: [u32; 4],
533}
534
535#[cfg(all(feature = "libc", feature = "objc2"))]
536unsafe impl Encode for IOAccelSurfaceInformation {
537 const ENCODING: Encoding = Encoding::Struct(
538 "?",
539 &[
540 <[libc::mach_vm_address_t; 4]>::ENCODING,
541 <u32>::ENCODING,
542 <u32>::ENCODING,
543 <u32>::ENCODING,
544 <u32>::ENCODING,
545 <IOOptionBits>::ENCODING,
546 <[IOFixed; 4]>::ENCODING,
547 <[u32; 4]>::ENCODING,
548 ],
549 );
550}
551
552#[cfg(all(feature = "libc", feature = "objc2"))]
553unsafe impl RefEncode for IOAccelSurfaceInformation {
554 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
555}
556
557/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsurfacereaddata?language=objc)
558#[cfg(feature = "libc")]
559#[repr(C)]
560#[derive(Clone, Copy, Debug, PartialEq)]
561pub struct IOAccelSurfaceReadData {
562 pub x: i32,
563 pub y: i32,
564 pub w: i32,
565 pub h: i32,
566 pub client_addr: libc::mach_vm_address_t,
567 pub client_row_bytes: u32,
568}
569
570#[cfg(all(feature = "libc", feature = "objc2"))]
571unsafe impl Encode for IOAccelSurfaceReadData {
572 const ENCODING: Encoding = Encoding::Struct(
573 "?",
574 &[
575 <i32>::ENCODING,
576 <i32>::ENCODING,
577 <i32>::ENCODING,
578 <i32>::ENCODING,
579 <libc::mach_vm_address_t>::ENCODING,
580 <u32>::ENCODING,
581 ],
582 );
583}
584
585#[cfg(all(feature = "libc", feature = "objc2"))]
586unsafe impl RefEncode for IOAccelSurfaceReadData {
587 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
588}
589
590/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsurfacescaling?language=objc)
591#[repr(C)]
592#[derive(Clone, Copy, Debug, PartialEq)]
593pub struct IOAccelSurfaceScaling {
594 pub buffer: IOAccelBounds,
595 pub source: IOAccelSize,
596 pub reserved: [u32; 8],
597}
598
599#[cfg(feature = "objc2")]
600unsafe impl Encode for IOAccelSurfaceScaling {
601 const ENCODING: Encoding = Encoding::Struct(
602 "?",
603 &[
604 <IOAccelBounds>::ENCODING,
605 <IOAccelSize>::ENCODING,
606 <[u32; 8]>::ENCODING,
607 ],
608 );
609}
610
611#[cfg(feature = "objc2")]
612unsafe impl RefEncode for IOAccelSurfaceScaling {
613 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
614}
615
616/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelid?language=objc)
617pub type IOAccelID = i32;
618
619/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelprivateid?language=objc)
620pub const kIOAccelPrivateID: c_uint = 0x00000001;
621
622/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioacceldeviceregion?language=objc)
623#[repr(C)]
624#[derive(Clone, Copy, Debug, PartialEq)]
625pub struct IOAccelDeviceRegion {
626 pub num_rects: u32,
627 pub bounds: IOAccelBounds,
628 pub rect: [IOAccelBounds; 0],
629}
630
631#[cfg(feature = "objc2")]
632unsafe impl Encode for IOAccelDeviceRegion {
633 const ENCODING: Encoding = Encoding::Struct(
634 "?",
635 &[
636 <u32>::ENCODING,
637 <IOAccelBounds>::ENCODING,
638 <[IOAccelBounds; 0]>::ENCODING,
639 ],
640 );
641}
642
643#[cfg(feature = "objc2")]
644unsafe impl RefEncode for IOAccelDeviceRegion {
645 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
646}
647
648/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacememorytypes?language=objc)
649#[repr(transparent)]
650#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
651pub struct eIOAccelSurfaceMemoryTypes(pub c_uint);
652impl eIOAccelSurfaceMemoryTypes {
653 #[doc(alias = "kIOAccelNumSurfaceMemoryTypes")]
654 pub const IOAccelNumSurfaceMemoryTypes: Self = Self(0);
655}
656
657#[cfg(feature = "objc2")]
658unsafe impl Encode for eIOAccelSurfaceMemoryTypes {
659 const ENCODING: Encoding = c_uint::ENCODING;
660}
661
662#[cfg(feature = "objc2")]
663unsafe impl RefEncode for eIOAccelSurfaceMemoryTypes {
664 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
665}
666
667/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacemethods?language=objc)
668#[repr(transparent)]
669#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
670pub struct eIOAccelSurfaceMethods(pub c_uint);
671impl eIOAccelSurfaceMethods {
672 #[doc(alias = "kIOAccelSurfaceReadLockOptions")]
673 pub const IOAccelSurfaceReadLockOptions: Self = Self(0);
674 #[doc(alias = "kIOAccelSurfaceReadUnlockOptions")]
675 pub const IOAccelSurfaceReadUnlockOptions: Self = Self(1);
676 #[doc(alias = "kIOAccelSurfaceGetState")]
677 pub const IOAccelSurfaceGetState: Self = Self(2);
678 #[doc(alias = "kIOAccelSurfaceWriteLockOptions")]
679 pub const IOAccelSurfaceWriteLockOptions: Self = Self(3);
680 #[doc(alias = "kIOAccelSurfaceWriteUnlockOptions")]
681 pub const IOAccelSurfaceWriteUnlockOptions: Self = Self(4);
682 #[doc(alias = "kIOAccelSurfaceRead")]
683 pub const IOAccelSurfaceRead: Self = Self(5);
684 #[doc(alias = "kIOAccelSurfaceSetShapeBacking")]
685 pub const IOAccelSurfaceSetShapeBacking: Self = Self(6);
686 #[doc(alias = "kIOAccelSurfaceSetIDMode")]
687 pub const IOAccelSurfaceSetIDMode: Self = Self(7);
688 #[doc(alias = "kIOAccelSurfaceSetScale")]
689 pub const IOAccelSurfaceSetScale: Self = Self(8);
690 #[doc(alias = "kIOAccelSurfaceSetShape")]
691 pub const IOAccelSurfaceSetShape: Self = Self(9);
692 #[doc(alias = "kIOAccelSurfaceFlush")]
693 pub const IOAccelSurfaceFlush: Self = Self(10);
694 #[doc(alias = "kIOAccelSurfaceQueryLock")]
695 pub const IOAccelSurfaceQueryLock: Self = Self(11);
696 #[doc(alias = "kIOAccelSurfaceReadLock")]
697 pub const IOAccelSurfaceReadLock: Self = Self(12);
698 #[doc(alias = "kIOAccelSurfaceReadUnlock")]
699 pub const IOAccelSurfaceReadUnlock: Self = Self(13);
700 #[doc(alias = "kIOAccelSurfaceWriteLock")]
701 pub const IOAccelSurfaceWriteLock: Self = Self(14);
702 #[doc(alias = "kIOAccelSurfaceWriteUnlock")]
703 pub const IOAccelSurfaceWriteUnlock: Self = Self(15);
704 #[doc(alias = "kIOAccelSurfaceControl")]
705 pub const IOAccelSurfaceControl: Self = Self(16);
706 #[doc(alias = "kIOAccelSurfaceSetShapeBackingAndLength")]
707 pub const IOAccelSurfaceSetShapeBackingAndLength: Self = Self(17);
708 #[doc(alias = "kIOAccelNumSurfaceMethods")]
709 pub const IOAccelNumSurfaceMethods: Self = Self(18);
710}
711
712#[cfg(feature = "objc2")]
713unsafe impl Encode for eIOAccelSurfaceMethods {
714 const ENCODING: Encoding = c_uint::ENCODING;
715}
716
717#[cfg(feature = "objc2")]
718unsafe impl RefEncode for eIOAccelSurfaceMethods {
719 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
720}
721
722/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacemodebits?language=objc)
723#[repr(transparent)]
724#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
725pub struct eIOAccelSurfaceModeBits(pub c_uint);
726impl eIOAccelSurfaceModeBits {
727 #[doc(alias = "kIOAccelSurfaceModeColorDepth1555")]
728 pub const IOAccelSurfaceModeColorDepth1555: Self = Self(0x00000003);
729 #[doc(alias = "kIOAccelSurfaceModeColorDepth8888")]
730 pub const IOAccelSurfaceModeColorDepth8888: Self = Self(0x00000004);
731 #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV")]
732 pub const IOAccelSurfaceModeColorDepthYUV: Self = Self(0x00000006);
733 #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV9")]
734 pub const IOAccelSurfaceModeColorDepthYUV9: Self = Self(0x00000007);
735 #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV12")]
736 pub const IOAccelSurfaceModeColorDepthYUV12: Self = Self(0x00000008);
737 #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV2")]
738 pub const IOAccelSurfaceModeColorDepthYUV2: Self = Self(0x00000009);
739 #[doc(alias = "kIOAccelSurfaceModeColorDepthBGRA32")]
740 pub const IOAccelSurfaceModeColorDepthBGRA32: Self = Self(0x0000000A);
741 #[doc(alias = "kIOAccelSurfaceModeColorDepth2101010")]
742 pub const IOAccelSurfaceModeColorDepth2101010: Self = Self(0x0000000F);
743 #[doc(alias = "kIOAccelSurfaceModeColorDepthBits")]
744 pub const IOAccelSurfaceModeColorDepthBits: Self = Self(0x0000000F);
745 #[doc(alias = "kIOAccelSurfaceModeStereoBit")]
746 pub const IOAccelSurfaceModeStereoBit: Self = Self(0x00000010);
747 #[doc(alias = "kIOAccelSurfaceModeWindowedBit")]
748 pub const IOAccelSurfaceModeWindowedBit: Self = Self(0x00000020);
749 #[doc(alias = "kIOAccelSurfaceModeSurface2")]
750 pub const IOAccelSurfaceModeSurface2: Self = Self(0x00004000);
751 #[doc(alias = "kIOAccelSurfaceModeBeamSync")]
752 pub const IOAccelSurfaceModeBeamSync: Self = Self(0x00008000);
753}
754
755#[cfg(feature = "objc2")]
756unsafe impl Encode for eIOAccelSurfaceModeBits {
757 const ENCODING: Encoding = c_uint::ENCODING;
758}
759
760#[cfg(feature = "objc2")]
761unsafe impl RefEncode for eIOAccelSurfaceModeBits {
762 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
763}
764
765/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfaceshapebits?language=objc)
766#[repr(transparent)]
767#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
768pub struct eIOAccelSurfaceShapeBits(pub c_uint);
769impl eIOAccelSurfaceShapeBits {
770 #[doc(alias = "kIOAccelSurfaceShapeNone")]
771 pub const IOAccelSurfaceShapeNone: Self = Self(0x00000000);
772 #[doc(alias = "kIOAccelSurfaceShapeNonBlockingBit")]
773 pub const IOAccelSurfaceShapeNonBlockingBit: Self = Self(0x00000001);
774 #[doc(alias = "kIOAccelSurfaceShapeNonSimpleBit")]
775 pub const IOAccelSurfaceShapeNonSimpleBit: Self = Self(0x00000002);
776 #[doc(alias = "kIOAccelSurfaceShapeIdentityScaleBit")]
777 pub const IOAccelSurfaceShapeIdentityScaleBit: Self = Self(0x00000004);
778 #[doc(alias = "kIOAccelSurfaceShapeFrameSyncBit")]
779 pub const IOAccelSurfaceShapeFrameSyncBit: Self = Self(0x00000008);
780 #[doc(alias = "kIOAccelSurfaceShapeBeamSyncBit")]
781 pub const IOAccelSurfaceShapeBeamSyncBit: Self = Self(0x00000010);
782 #[doc(alias = "kIOAccelSurfaceShapeStaleBackingBit")]
783 pub const IOAccelSurfaceShapeStaleBackingBit: Self = Self(0x00000020);
784 #[doc(alias = "kIOAccelSurfaceShapeAssemblyBit")]
785 pub const IOAccelSurfaceShapeAssemblyBit: Self = Self(0x00000040);
786 #[doc(alias = "kIOAccelSurfaceShapeWaitEnabledBit")]
787 pub const IOAccelSurfaceShapeWaitEnabledBit: Self = Self(0x00000080);
788 #[doc(alias = "kIOAccelSurfaceShapeBlockingBit")]
789 pub const IOAccelSurfaceShapeBlockingBit: Self =
790 Self(eIOAccelSurfaceShapeBits::IOAccelSurfaceShapeNonBlockingBit.0);
791}
792
793#[cfg(feature = "objc2")]
794unsafe impl Encode for eIOAccelSurfaceShapeBits {
795 const ENCODING: Encoding = c_uint::ENCODING;
796}
797
798#[cfg(feature = "objc2")]
799unsafe impl RefEncode for eIOAccelSurfaceShapeBits {
800 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
801}
802
803/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacestatebits?language=objc)
804#[repr(transparent)]
805#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
806pub struct eIOAccelSurfaceStateBits(pub c_uint);
807impl eIOAccelSurfaceStateBits {
808 #[doc(alias = "kIOAccelSurfaceStateNone")]
809 pub const IOAccelSurfaceStateNone: Self = Self(0x00000000);
810 #[doc(alias = "kIOAccelSurfaceStateIdleBit")]
811 pub const IOAccelSurfaceStateIdleBit: Self = Self(0x00000001);
812}
813
814#[cfg(feature = "objc2")]
815unsafe impl Encode for eIOAccelSurfaceStateBits {
816 const ENCODING: Encoding = c_uint::ENCODING;
817}
818
819#[cfg(feature = "objc2")]
820unsafe impl RefEncode for eIOAccelSurfaceStateBits {
821 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
822}
823
824/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacescalebits?language=objc)
825#[repr(transparent)]
826#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
827pub struct eIOAccelSurfaceScaleBits(pub c_uint);
828impl eIOAccelSurfaceScaleBits {
829 #[doc(alias = "kIOAccelSurfaceBeamSyncSwaps")]
830 pub const IOAccelSurfaceBeamSyncSwaps: Self = Self(0x00000001);
831 #[doc(alias = "kIOAccelSurfaceFixedSource")]
832 pub const IOAccelSurfaceFixedSource: Self = Self(0x00000002);
833 #[doc(alias = "kIOAccelSurfaceFiltering")]
834 pub const IOAccelSurfaceFiltering: Self = Self(0x000000f0);
835 #[doc(alias = "kIOAccelSurfaceFilterDefault")]
836 pub const IOAccelSurfaceFilterDefault: Self = Self(0x00000000);
837 #[doc(alias = "kIOAccelSurfaceFilterNone")]
838 pub const IOAccelSurfaceFilterNone: Self = Self(0x00000010);
839 #[doc(alias = "kIOAccelSurfaceFilterLinear")]
840 pub const IOAccelSurfaceFilterLinear: Self = Self(0x00000020);
841}
842
843#[cfg(feature = "objc2")]
844unsafe impl Encode for eIOAccelSurfaceScaleBits {
845 const ENCODING: Encoding = c_uint::ENCODING;
846}
847
848#[cfg(feature = "objc2")]
849unsafe impl RefEncode for eIOAccelSurfaceScaleBits {
850 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
851}
852
853/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacelockbits?language=objc)
854#[repr(transparent)]
855#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
856pub struct eIOAccelSurfaceLockBits(pub c_uint);
857impl eIOAccelSurfaceLockBits {
858 #[doc(alias = "kIOAccelSurfaceLockInBacking")]
859 pub const IOAccelSurfaceLockInBacking: Self = Self(0);
860 #[doc(alias = "kIOAccelSurfaceLockInAccel")]
861 pub const IOAccelSurfaceLockInAccel: Self = Self(1);
862 #[doc(alias = "kIOAccelSurfaceLockInDontCare")]
863 pub const IOAccelSurfaceLockInDontCare: Self = Self(2);
864 #[doc(alias = "kIOAccelSurfaceLockInMask")]
865 pub const IOAccelSurfaceLockInMask: Self = Self(0x00000003);
866}
867
868#[cfg(feature = "objc2")]
869unsafe impl Encode for eIOAccelSurfaceLockBits {
870 const ENCODING: Encoding = c_uint::ENCODING;
871}
872
873#[cfg(feature = "objc2")]
874unsafe impl RefEncode for eIOAccelSurfaceLockBits {
875 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
876}
877
878/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofourcharcode?language=objc)
879pub type IOFourCharCode = u32;
880
881/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcompletiontoken?language=objc)
882pub type IOBlitCompletionToken = i32;
883
884/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblittype?language=objc)
885pub type IOBlitType = u32;
886
887/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeverbmask?language=objc)
888pub const kIOBlitTypeVerbMask: c_uint = 0x000000ff;
889/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittyperects?language=objc)
890pub const kIOBlitTypeRects: c_uint = 0;
891/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypecopyrects?language=objc)
892pub const kIOBlitTypeCopyRects: c_uint = 1;
893/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypelines?language=objc)
894pub const kIOBlitTypeLines: c_uint = 2;
895/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypescanlines?language=objc)
896pub const kIOBlitTypeScanlines: c_uint = 3;
897/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypecopyregion?language=objc)
898pub const kIOBlitTypeCopyRegion: c_uint = 4;
899/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypemovecursor?language=objc)
900pub const kIOBlitTypeMoveCursor: c_uint = 5;
901/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeshowcursor?language=objc)
902pub const kIOBlitTypeShowCursor: c_uint = 6;
903/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypehidecursor?language=objc)
904pub const kIOBlitTypeHideCursor: c_uint = 7;
905/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypemonoexpand?language=objc)
906pub const kIOBlitTypeMonoExpand: c_uint = 0x00000100;
907/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypecolorspaceconvert?language=objc)
908pub const kIOBlitTypeColorSpaceConvert: c_uint = 0x00000200;
909/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypescale?language=objc)
910pub const kIOBlitTypeScale: c_uint = 0x00000400;
911/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypesourcekeycolormodemask?language=objc)
912pub const kIOBlitTypeSourceKeyColorModeMask: c_uint = 0x00003000;
913/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypedestkeycolormodemask?language=objc)
914pub const kIOBlitTypeDestKeyColorModeMask: c_uint = 0x0000c000;
915/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypesourcekeycolorequal?language=objc)
916pub const kIOBlitTypeSourceKeyColorEqual: c_uint = 0x00001000;
917/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypesourcekeycolornotequal?language=objc)
918pub const kIOBlitTypeSourceKeyColorNotEqual: c_uint = 0x00002000;
919/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypedestkeycolorequal?language=objc)
920pub const kIOBlitTypeDestKeyColorEqual: c_uint = 0x00004000;
921/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypedestkeycolornotequal?language=objc)
922pub const kIOBlitTypeDestKeyColorNotEqual: c_uint = 0x00008000;
923/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationmask?language=objc)
924pub const kIOBlitTypeOperationMask: c_uint = 0x0fff0000;
925/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationshift?language=objc)
926pub const kIOBlitTypeOperationShift: c_uint = 16;
927/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationtypemask?language=objc)
928pub const kIOBlitTypeOperationTypeMask: c_uint = 0x0f000000;
929/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationtype0?language=objc)
930pub const kIOBlitTypeOperationType0: c_uint = 0x00000000;
931/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitcopyoperation?language=objc)
932pub const kIOBlitCopyOperation: c_uint = 0x00000000 | kIOBlitTypeOperationType0;
933/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitoroperation?language=objc)
934pub const kIOBlitOrOperation: c_uint = 0x00010000 | kIOBlitTypeOperationType0;
935/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitxoroperation?language=objc)
936pub const kIOBlitXorOperation: c_uint = 0x00020000 | kIOBlitTypeOperationType0;
937/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitblendoperation?language=objc)
938pub const kIOBlitBlendOperation: c_uint = 0x00030000 | kIOBlitTypeOperationType0;
939/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblithighlightoperation?language=objc)
940pub const kIOBlitHighlightOperation: c_uint = 0x00040000 | kIOBlitTypeOperationType0;
941
942/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsourcetype?language=objc)
943pub type IOBlitSourceType = u32;
944
945/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcedefault?language=objc)
946pub const kIOBlitSourceDefault: c_uint = 0x00000000;
947/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceframebuffer?language=objc)
948pub const kIOBlitSourceFramebuffer: c_uint = 0x00001000;
949/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcememory?language=objc)
950pub const kIOBlitSourceMemory: c_uint = 0x00002000;
951/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceoolmemory?language=objc)
952pub const kIOBlitSourceOOLMemory: c_uint = 0x00003000;
953/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcepattern?language=objc)
954pub const kIOBlitSourcePattern: c_uint = 0x00004000;
955/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceoolpattern?language=objc)
956pub const kIOBlitSourceOOLPattern: c_uint = 0x00005000;
957/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcesolid?language=objc)
958pub const kIOBlitSourceSolid: c_uint = 0x00006000;
959/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcecgssurface?language=objc)
960pub const kIOBlitSourceCGSSurface: c_uint = 0x00007000;
961/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceissame?language=objc)
962pub const kIOBlitSourceIsSame: c_uint = 0x80000000;
963
964/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsourcedesttype?language=objc)
965pub type IOBlitSourceDestType = IOBlitSourceType;
966
967/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitdestframebuffer?language=objc)
968pub const kIOBlitDestFramebuffer: c_uint = 0x00000001;
969
970/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitoperationstruct?language=objc)
971#[repr(C)]
972#[derive(Clone, Copy, Debug, PartialEq)]
973pub struct IOBlitOperationStruct {
974 pub color0: u32,
975 pub color1: u32,
976 pub offsetX: i32,
977 pub offsetY: i32,
978 pub sourceKeyColor: u32,
979 pub destKeyColor: u32,
980 pub specific: [u32; 16],
981}
982
983#[cfg(feature = "objc2")]
984unsafe impl Encode for IOBlitOperationStruct {
985 const ENCODING: Encoding = Encoding::Struct(
986 "IOBlitOperationStruct",
987 &[
988 <u32>::ENCODING,
989 <u32>::ENCODING,
990 <i32>::ENCODING,
991 <i32>::ENCODING,
992 <u32>::ENCODING,
993 <u32>::ENCODING,
994 <[u32; 16]>::ENCODING,
995 ],
996 );
997}
998
999#[cfg(feature = "objc2")]
1000unsafe impl RefEncode for IOBlitOperationStruct {
1001 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1002}
1003
1004/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitoperation?language=objc)
1005pub type IOBlitOperation = IOBlitOperationStruct;
1006
1007/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectanglestruct?language=objc)
1008#[repr(C)]
1009#[derive(Clone, Copy, Debug, PartialEq)]
1010pub struct IOBlitRectangleStruct {
1011 pub x: i32,
1012 pub y: i32,
1013 pub width: i32,
1014 pub height: i32,
1015}
1016
1017#[cfg(feature = "objc2")]
1018unsafe impl Encode for IOBlitRectangleStruct {
1019 const ENCODING: Encoding = Encoding::Struct(
1020 "IOBlitRectangleStruct",
1021 &[
1022 <i32>::ENCODING,
1023 <i32>::ENCODING,
1024 <i32>::ENCODING,
1025 <i32>::ENCODING,
1026 ],
1027 );
1028}
1029
1030#[cfg(feature = "objc2")]
1031unsafe impl RefEncode for IOBlitRectangleStruct {
1032 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1033}
1034
1035/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectangle?language=objc)
1036pub type IOBlitRectangle = IOBlitRectangleStruct;
1037
1038/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectanglesstruct?language=objc)
1039#[repr(C)]
1040#[derive(Clone, Copy, Debug, PartialEq)]
1041pub struct IOBlitRectanglesStruct {
1042 pub operation: IOBlitOperation,
1043 pub count: IOItemCount,
1044 pub rects: [IOBlitRectangle; 1],
1045}
1046
1047#[cfg(feature = "objc2")]
1048unsafe impl Encode for IOBlitRectanglesStruct {
1049 const ENCODING: Encoding = Encoding::Struct(
1050 "IOBlitRectanglesStruct",
1051 &[
1052 <IOBlitOperation>::ENCODING,
1053 <IOItemCount>::ENCODING,
1054 <[IOBlitRectangle; 1]>::ENCODING,
1055 ],
1056 );
1057}
1058
1059#[cfg(feature = "objc2")]
1060unsafe impl RefEncode for IOBlitRectanglesStruct {
1061 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1062}
1063
1064/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectangles?language=objc)
1065pub type IOBlitRectangles = IOBlitRectanglesStruct;
1066
1067/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectanglestruct?language=objc)
1068#[repr(C)]
1069#[derive(Clone, Copy, Debug, PartialEq)]
1070pub struct IOBlitCopyRectangleStruct {
1071 pub sourceX: i32,
1072 pub sourceY: i32,
1073 pub x: i32,
1074 pub y: i32,
1075 pub width: i32,
1076 pub height: i32,
1077}
1078
1079#[cfg(feature = "objc2")]
1080unsafe impl Encode for IOBlitCopyRectangleStruct {
1081 const ENCODING: Encoding = Encoding::Struct(
1082 "IOBlitCopyRectangleStruct",
1083 &[
1084 <i32>::ENCODING,
1085 <i32>::ENCODING,
1086 <i32>::ENCODING,
1087 <i32>::ENCODING,
1088 <i32>::ENCODING,
1089 <i32>::ENCODING,
1090 ],
1091 );
1092}
1093
1094#[cfg(feature = "objc2")]
1095unsafe impl RefEncode for IOBlitCopyRectangleStruct {
1096 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1097}
1098
1099/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectangle?language=objc)
1100pub type IOBlitCopyRectangle = IOBlitCopyRectangleStruct;
1101
1102/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectanglesstruct?language=objc)
1103#[repr(C)]
1104#[derive(Clone, Copy, Debug, PartialEq)]
1105pub struct IOBlitCopyRectanglesStruct {
1106 pub operation: IOBlitOperation,
1107 pub count: IOItemCount,
1108 pub rects: [IOBlitCopyRectangle; 1],
1109}
1110
1111#[cfg(feature = "objc2")]
1112unsafe impl Encode for IOBlitCopyRectanglesStruct {
1113 const ENCODING: Encoding = Encoding::Struct(
1114 "IOBlitCopyRectanglesStruct",
1115 &[
1116 <IOBlitOperation>::ENCODING,
1117 <IOItemCount>::ENCODING,
1118 <[IOBlitCopyRectangle; 1]>::ENCODING,
1119 ],
1120 );
1121}
1122
1123#[cfg(feature = "objc2")]
1124unsafe impl RefEncode for IOBlitCopyRectanglesStruct {
1125 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1126}
1127
1128/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectangles?language=objc)
1129pub type IOBlitCopyRectangles = IOBlitCopyRectanglesStruct;
1130
1131/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyregionstruct?language=objc)
1132#[repr(C)]
1133#[derive(Clone, Copy, Debug, PartialEq)]
1134pub struct IOBlitCopyRegionStruct {
1135 pub operation: IOBlitOperation,
1136 pub deltaX: i32,
1137 pub deltaY: i32,
1138 pub region: *mut IOAccelDeviceRegion,
1139}
1140
1141#[cfg(feature = "objc2")]
1142unsafe impl Encode for IOBlitCopyRegionStruct {
1143 const ENCODING: Encoding = Encoding::Struct(
1144 "IOBlitCopyRegionStruct",
1145 &[
1146 <IOBlitOperation>::ENCODING,
1147 <i32>::ENCODING,
1148 <i32>::ENCODING,
1149 <*mut IOAccelDeviceRegion>::ENCODING,
1150 ],
1151 );
1152}
1153
1154#[cfg(feature = "objc2")]
1155unsafe impl RefEncode for IOBlitCopyRegionStruct {
1156 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1157}
1158
1159/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyregion?language=objc)
1160pub type IOBlitCopyRegion = IOBlitCopyRegionStruct;
1161
1162/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitvertexstruct?language=objc)
1163#[repr(C)]
1164#[derive(Clone, Copy, Debug, PartialEq)]
1165pub struct IOBlitVertexStruct {
1166 pub x: i32,
1167 pub y: i32,
1168}
1169
1170#[cfg(feature = "objc2")]
1171unsafe impl Encode for IOBlitVertexStruct {
1172 const ENCODING: Encoding =
1173 Encoding::Struct("IOBlitVertexStruct", &[<i32>::ENCODING, <i32>::ENCODING]);
1174}
1175
1176#[cfg(feature = "objc2")]
1177unsafe impl RefEncode for IOBlitVertexStruct {
1178 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1179}
1180
1181/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitvertex?language=objc)
1182pub type IOBlitVertex = IOBlitVertexStruct;
1183
1184/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitverticesstruct?language=objc)
1185#[repr(C)]
1186#[derive(Clone, Copy, Debug, PartialEq)]
1187pub struct IOBlitVerticesStruct {
1188 pub operation: IOBlitOperation,
1189 pub count: IOItemCount,
1190 pub vertices: [IOBlitVertex; 2],
1191}
1192
1193#[cfg(feature = "objc2")]
1194unsafe impl Encode for IOBlitVerticesStruct {
1195 const ENCODING: Encoding = Encoding::Struct(
1196 "IOBlitVerticesStruct",
1197 &[
1198 <IOBlitOperation>::ENCODING,
1199 <IOItemCount>::ENCODING,
1200 <[IOBlitVertex; 2]>::ENCODING,
1201 ],
1202 );
1203}
1204
1205#[cfg(feature = "objc2")]
1206unsafe impl RefEncode for IOBlitVerticesStruct {
1207 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1208}
1209
1210/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitvertices?language=objc)
1211pub type IOBlitVertices = IOBlitVerticesStruct;
1212
1213/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitscanlinesstruct?language=objc)
1214#[repr(C)]
1215#[derive(Clone, Copy, Debug, PartialEq)]
1216pub struct IOBlitScanlinesStruct {
1217 pub operation: IOBlitOperation,
1218 pub count: IOItemCount,
1219 pub y: i32,
1220 pub height: i32,
1221 pub x: [i32; 2],
1222}
1223
1224#[cfg(feature = "objc2")]
1225unsafe impl Encode for IOBlitScanlinesStruct {
1226 const ENCODING: Encoding = Encoding::Struct(
1227 "IOBlitScanlinesStruct",
1228 &[
1229 <IOBlitOperation>::ENCODING,
1230 <IOItemCount>::ENCODING,
1231 <i32>::ENCODING,
1232 <i32>::ENCODING,
1233 <[i32; 2]>::ENCODING,
1234 ],
1235 );
1236}
1237
1238#[cfg(feature = "objc2")]
1239unsafe impl RefEncode for IOBlitScanlinesStruct {
1240 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1241}
1242
1243/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitscanlines?language=objc)
1244pub type IOBlitScanlines = IOBlitScanlinesStruct;
1245
1246/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcursorstruct?language=objc)
1247#[repr(C)]
1248#[derive(Clone, Copy, Debug, PartialEq)]
1249pub struct IOBlitCursorStruct {
1250 pub operation: IOBlitOperation,
1251 pub rect: IOBlitRectangle,
1252}
1253
1254#[cfg(feature = "objc2")]
1255unsafe impl Encode for IOBlitCursorStruct {
1256 const ENCODING: Encoding = Encoding::Struct(
1257 "IOBlitCursorStruct",
1258 &[<IOBlitOperation>::ENCODING, <IOBlitRectangle>::ENCODING],
1259 );
1260}
1261
1262#[cfg(feature = "objc2")]
1263unsafe impl RefEncode for IOBlitCursorStruct {
1264 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1265}
1266
1267/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcursor?language=objc)
1268pub type IOBlitCursor = IOBlitCursorStruct;
1269
1270/// [Apple's documentation](https://developer.apple.com/documentation/iokit/_ioblitmemory?language=objc)
1271#[repr(C)]
1272#[derive(Debug)]
1273pub struct _IOBlitMemory {
1274 inner: [u8; 0],
1275 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
1276}
1277
1278#[cfg(feature = "objc2")]
1279unsafe impl RefEncode for _IOBlitMemory {
1280 const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("_IOBlitMemory", &[]));
1281}
1282
1283/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitmemoryref?language=objc)
1284pub type IOBlitMemoryRef = *mut _IOBlitMemory;
1285
1286/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio1monochromepixelformat?language=objc)
1287pub const kIO1MonochromePixelFormat: c_uint = 0x00000001;
1288/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio2indexedpixelformat?language=objc)
1289pub const kIO2IndexedPixelFormat: c_uint = 0x00000002;
1290/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio4indexedpixelformat?language=objc)
1291pub const kIO4IndexedPixelFormat: c_uint = 0x00000004;
1292/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio8indexedpixelformat?language=objc)
1293pub const kIO8IndexedPixelFormat: c_uint = 0x00000008;
1294/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16be555pixelformat?language=objc)
1295pub const kIO16BE555PixelFormat: c_uint = 0x00000010;
1296/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio24rgbpixelformat?language=objc)
1297pub const kIO24RGBPixelFormat: c_uint = 0x00000018;
1298/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32argbpixelformat?language=objc)
1299pub const kIO32ARGBPixelFormat: c_uint = 0x00000020;
1300/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio1indexedgraypixelformat?language=objc)
1301pub const kIO1IndexedGrayPixelFormat: c_uint = 0x00000021;
1302/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio2indexedgraypixelformat?language=objc)
1303pub const kIO2IndexedGrayPixelFormat: c_uint = 0x00000022;
1304/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio4indexedgraypixelformat?language=objc)
1305pub const kIO4IndexedGrayPixelFormat: c_uint = 0x00000024;
1306/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio8indexedgraypixelformat?language=objc)
1307pub const kIO8IndexedGrayPixelFormat: c_uint = 0x00000028;
1308
1309/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le555pixelformat?language=objc)
1310pub const kIO16LE555PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x4c353535);
1311/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le5551pixelformat?language=objc)
1312pub const kIO16LE5551PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x35353531);
1313/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16be565pixelformat?language=objc)
1314pub const kIO16BE565PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42353635);
1315/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le565pixelformat?language=objc)
1316pub const kIO16LE565PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x4c353635);
1317/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio24bgrpixelformat?language=objc)
1318pub const kIO24BGRPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x32344247);
1319/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32bgrapixelformat?language=objc)
1320pub const kIO32BGRAPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42475241);
1321/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32abgrpixelformat?language=objc)
1322pub const kIO32ABGRPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x41424752);
1323/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32rgbapixelformat?language=objc)
1324pub const kIO32RGBAPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x52474241);
1325/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuvspixelformat?language=objc)
1326pub const kIOYUVSPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x79757673);
1327/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuvupixelformat?language=objc)
1328pub const kIOYUVUPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x79757675);
1329/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyvu9pixelformat?language=objc)
1330pub const kIOYVU9PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59565539);
1331/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuv411pixelformat?language=objc)
1332pub const kIOYUV411PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59343131);
1333/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyvyu422pixelformat?language=objc)
1334pub const kIOYVYU422PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59565955);
1335/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiouyvy422pixelformat?language=objc)
1336pub const kIOUYVY422PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x55595659);
1337/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuv211pixelformat?language=objc)
1338pub const kIOYUV211PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59323131);
1339/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio2vuypixelformat?language=objc)
1340pub const kIO2vuyPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x32767579);
1341
1342/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le4444pixelformat?language=objc)
1343pub const kIO16LE4444PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x4c343434);
1344/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16be4444pixelformat?language=objc)
1345pub const kIO16BE4444PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42343434);
1346/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio64bgrapixelformat?language=objc)
1347pub const kIO64BGRAPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42313649);
1348/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio64rgbafloatpixelformat?language=objc)
1349pub const kIO64RGBAFloatPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42313646);
1350/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio128rgbafloatpixelformat?language=objc)
1351pub const kIO128RGBAFloatPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42333246);
1352
1353/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitmemoryrequireshostflush?language=objc)
1354pub const kIOBlitMemoryRequiresHostFlush: c_uint = 0x00000001;
1355
1356/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsurfacestruct_memory?language=objc)
1357#[repr(C)]
1358#[derive(Clone, Copy)]
1359pub union IOBlitSurfaceStruct_memory {
1360 pub bytes: *mut u8,
1361 pub r#ref: IOBlitMemoryRef,
1362}
1363
1364#[cfg(feature = "objc2")]
1365unsafe impl Encode for IOBlitSurfaceStruct_memory {
1366 const ENCODING: Encoding =
1367 Encoding::Union("?", &[<*mut u8>::ENCODING, <IOBlitMemoryRef>::ENCODING]);
1368}
1369
1370#[cfg(feature = "objc2")]
1371unsafe impl RefEncode for IOBlitSurfaceStruct_memory {
1372 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1373}
1374
1375/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsurfacestruct?language=objc)
1376#[repr(C)]
1377#[derive(Clone, Copy)]
1378pub struct IOBlitSurfaceStruct {
1379 pub memory: IOBlitSurfaceStruct_memory,
1380 pub pixelFormat: IOFourCharCode,
1381 pub size: IOBlitRectangle,
1382 pub rowBytes: u32,
1383 pub byteOffset: u32,
1384 pub palette: *mut u32,
1385 pub accessFlags: IOOptionBits,
1386 pub interfaceRef: IOBlitMemoryRef,
1387 pub more: [u32; 14],
1388}
1389
1390#[cfg(feature = "objc2")]
1391unsafe impl Encode for IOBlitSurfaceStruct {
1392 const ENCODING: Encoding = Encoding::Struct(
1393 "IOBlitSurfaceStruct",
1394 &[
1395 <IOBlitSurfaceStruct_memory>::ENCODING,
1396 <IOFourCharCode>::ENCODING,
1397 <IOBlitRectangle>::ENCODING,
1398 <u32>::ENCODING,
1399 <u32>::ENCODING,
1400 <*mut u32>::ENCODING,
1401 <IOOptionBits>::ENCODING,
1402 <IOBlitMemoryRef>::ENCODING,
1403 <[u32; 14]>::ENCODING,
1404 ],
1405 );
1406}
1407
1408#[cfg(feature = "objc2")]
1409unsafe impl RefEncode for IOBlitSurfaceStruct {
1410 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1411}
1412
1413/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsurface?language=objc)
1414pub type IOBlitSurface = IOBlitSurfaceStruct;
1415
1416/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitmemory?language=objc)
1417pub type IOBlitMemory = IOBlitSurface;
1418
1419/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsynchronizewaitbeamexit?language=objc)
1420pub const kIOBlitSynchronizeWaitBeamExit: c_uint = 0x00000001;
1421/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsynchronizeflushhostwrites?language=objc)
1422pub const kIOBlitSynchronizeFlushHostWrites: c_uint = 0x00000002;
1423
1424/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitcontext?language=objc)
1425pub const kIOBlitWaitContext: c_uint = 0x00000000;
1426/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitall2d?language=objc)
1427pub const kIOBlitWaitAll2D: c_uint = 0x00000001;
1428/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitglobal?language=objc)
1429pub const kIOBlitWaitGlobal: c_uint = 0x00000001;
1430/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitall?language=objc)
1431pub const kIOBlitWaitAll: c_uint = 0x00000002;
1432/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitcheck?language=objc)
1433pub const kIOBlitWaitCheck: c_uint = 0x00000080;
1434/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitflushwithswap?language=objc)
1435pub const kIOBlitFlushWithSwap: c_uint = 0x00010000;
1436
1437/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblithascgssurface?language=objc)
1438pub const kIOBlitHasCGSSurface: c_uint = 0x00000001;
1439/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitfixedsource?language=objc)
1440pub const kIOBlitFixedSource: c_uint = 0x00000002;
1441/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsyncswaps?language=objc)
1442pub const kIOBlitBeamSyncSwaps: c_uint = 0x00000004;
1443/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitreferencesource?language=objc)
1444pub const kIOBlitReferenceSource: c_uint = 0x00000008;
1445
1446/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitunlockwithswap?language=objc)
1447pub const kIOBlitUnlockWithSwap: c_uint = 0x80000000;
1448
1449/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitframebufferdestination?language=objc)
1450pub const kIOBlitFramebufferDestination: c_uint = 0x00000000;
1451/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsurfacedestination?language=objc)
1452pub const kIOBlitSurfaceDestination: c_uint = 0x00000001;
1453
1454/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsync?language=objc)
1455pub const kIOBlitBeamSync: c_uint = 0x00000001;
1456/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsyncalways?language=objc)
1457pub const kIOBlitBeamSyncAlways: c_uint = 0x00000002;
1458/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsyncspin?language=objc)
1459pub const kIOBlitBeamSyncSpin: c_uint = 0x00000004;
1460/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitalloptions?language=objc)
1461pub const kIOBlitAllOptions: c_uint = 0xffffffff;
1462
1463/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitcolorspacetypes?language=objc)
1464pub const kIOBlitColorSpaceTypes: c_uint = IO_FOUR_CHAR_CODE!(0x63737063);
1465
1466/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitaccumulateptr?language=objc)
1467pub type IOBlitAccumulatePtr =
1468 Option<unsafe extern "C-unwind" fn(*mut c_void, i32, i32, i32, i32, i32, i32) -> IOReturn>;
1469
1470/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitprocptr?language=objc)
1471pub type IOBlitProcPtr = Option<
1472 unsafe extern "C-unwind" fn(
1473 *mut c_void,
1474 IOOptionBits,
1475 IOBlitType,
1476 IOBlitSourceDestType,
1477 *mut IOBlitOperation,
1478 *mut c_void,
1479 *mut c_void,
1480 *mut IOBlitCompletionToken,
1481 ) -> IOReturn,
1482>;
1483
1484/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitterptr?language=objc)
1485pub type IOBlitterPtr = Option<
1486 unsafe extern "C-unwind" fn(
1487 *mut c_void,
1488 IOOptionBits,
1489 IOBlitType,
1490 IOBlitSourceType,
1491 *mut IOBlitOperation,
1492 *mut c_void,
1493 ) -> IOReturn,
1494>;
1495
1496/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iographicsacceleratorinterfacestruct?language=objc)
1497#[cfg(feature = "libc")]
1498#[repr(C)]
1499#[allow(unpredictable_function_pointer_comparisons)]
1500#[derive(Clone, Copy, Debug, PartialEq)]
1501pub struct IOGraphicsAcceleratorInterfaceStruct {
1502 pub(crate) _reserved: *mut c_void,
1503 pub QueryInterface:
1504 Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1505 pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1506 pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1507 pub version: u16,
1508 pub revision: u16,
1509 pub Probe: Option<
1510 unsafe extern "C-unwind" fn(
1511 *mut c_void,
1512 *const CFDictionary,
1513 io_service_t,
1514 *mut i32,
1515 ) -> IOReturn,
1516 >,
1517 pub Start: Option<
1518 unsafe extern "C-unwind" fn(*mut c_void, *const CFDictionary, io_service_t) -> IOReturn,
1519 >,
1520 pub Stop: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1521 pub Reset: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
1522 pub CopyCapabilities: Option<
1523 unsafe extern "C-unwind" fn(*mut c_void, FourCharCode, *mut *const CFType) -> IOReturn,
1524 >,
1525 pub GetBlitProc: Option<
1526 unsafe extern "C-unwind" fn(
1527 *mut c_void,
1528 IOOptionBits,
1529 IOBlitType,
1530 IOBlitSourceDestType,
1531 *mut IOBlitProcPtr,
1532 ) -> IOReturn,
1533 >,
1534 pub Flush: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
1535 pub WaitForCompletion: Option<
1536 unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, IOBlitCompletionToken) -> IOReturn,
1537 >,
1538 pub Synchronize:
1539 Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, u32, u32, u32) -> IOReturn>,
1540 pub GetBeamPosition:
1541 Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, *mut i32) -> IOReturn>,
1542 pub AllocateSurface: Option<
1543 unsafe extern "C-unwind" fn(
1544 *mut c_void,
1545 IOOptionBits,
1546 *mut IOBlitSurface,
1547 *mut c_void,
1548 ) -> IOReturn,
1549 >,
1550 pub FreeSurface: Option<
1551 unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, *mut IOBlitSurface) -> IOReturn,
1552 >,
1553 pub LockSurface: Option<
1554 unsafe extern "C-unwind" fn(
1555 *mut c_void,
1556 IOOptionBits,
1557 *mut IOBlitSurface,
1558 *mut libc::vm_address_t,
1559 ) -> IOReturn,
1560 >,
1561 pub UnlockSurface: Option<
1562 unsafe extern "C-unwind" fn(
1563 *mut c_void,
1564 IOOptionBits,
1565 *mut IOBlitSurface,
1566 *mut IOOptionBits,
1567 ) -> IOReturn,
1568 >,
1569 pub SwapSurface: Option<
1570 unsafe extern "C-unwind" fn(
1571 *mut c_void,
1572 IOOptionBits,
1573 *mut IOBlitSurface,
1574 *mut IOOptionBits,
1575 ) -> IOReturn,
1576 >,
1577 pub SetDestination: Option<
1578 unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, *mut IOBlitSurface) -> IOReturn,
1579 >,
1580 pub GetBlitter: Option<
1581 unsafe extern "C-unwind" fn(
1582 *mut c_void,
1583 IOOptionBits,
1584 IOBlitType,
1585 IOBlitSourceType,
1586 *mut IOBlitterPtr,
1587 ) -> IOReturn,
1588 >,
1589 pub WaitComplete: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
1590 pub(crate) __gaInterfaceReserved: [*mut c_void; 24],
1591}
1592
1593#[cfg(all(feature = "libc", feature = "objc2"))]
1594unsafe impl Encode for IOGraphicsAcceleratorInterfaceStruct {
1595 const ENCODING: Encoding = Encoding::Struct("IOGraphicsAcceleratorInterfaceStruct", &[
1596 <*mut c_void>::ENCODING,
1597 <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1598 <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1599 <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1600 <u16>::ENCODING,
1601 <u16>::ENCODING,
1602 <Option<unsafe extern "C-unwind" fn(*mut c_void,*const CFDictionary,io_service_t,*mut i32,) -> IOReturn>>::ENCODING,
1603 <Option<unsafe extern "C-unwind" fn(*mut c_void,*const CFDictionary,io_service_t,) -> IOReturn>>::ENCODING,
1604 <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1605 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,) -> IOReturn>>::ENCODING,
1606 <Option<unsafe extern "C-unwind" fn(*mut c_void,FourCharCode,*mut *const CFType,) -> IOReturn>>::ENCODING,
1607 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,IOBlitType,IOBlitSourceDestType,*mut IOBlitProcPtr,) -> IOReturn>>::ENCODING,
1608 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,) -> IOReturn>>::ENCODING,
1609 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,IOBlitCompletionToken,) -> IOReturn>>::ENCODING,
1610 <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,u32,u32,u32,) -> IOReturn>>::ENCODING,
1611 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut i32,) -> IOReturn>>::ENCODING,
1612 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut c_void,) -> IOReturn>>::ENCODING,
1613 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,) -> IOReturn>>::ENCODING,
1614 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut libc::vm_address_t,) -> IOReturn>>::ENCODING,
1615 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut IOOptionBits,) -> IOReturn>>::ENCODING,
1616 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut IOOptionBits,) -> IOReturn>>::ENCODING,
1617 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,) -> IOReturn>>::ENCODING,
1618 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,IOBlitType,IOBlitSourceType,*mut IOBlitterPtr,) -> IOReturn>>::ENCODING,
1619 <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,) -> IOReturn>>::ENCODING,
1620 <[*mut c_void; 24]>::ENCODING,
1621 ]);
1622}
1623
1624#[cfg(all(feature = "libc", feature = "objc2"))]
1625unsafe impl RefEncode for IOGraphicsAcceleratorInterfaceStruct {
1626 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1627}
1628
1629/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iographicsacceleratorinterface?language=objc)
1630#[cfg(feature = "libc")]
1631pub type IOGraphicsAcceleratorInterface = IOGraphicsAcceleratorInterfaceStruct;
1632
1633extern "C-unwind" {
1634 /// # Safety
1635 ///
1636 /// - `p_accelerator` must be a valid pointer.
1637 /// - `p_framebuffer_index` must be a valid pointer.
1638 #[cfg(feature = "libc")]
1639 pub fn IOAccelFindAccelerator(
1640 framebuffer: io_service_t,
1641 p_accelerator: *mut io_service_t,
1642 p_framebuffer_index: *mut u32,
1643 ) -> IOReturn;
1644}
1645
1646/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioindex?language=objc)
1647pub type IOIndex = i32;
1648
1649/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioselect?language=objc)
1650pub type IOSelect = u32;
1651
1652/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofixed1616?language=objc)
1653pub type IOFixed1616 = u32;
1654
1655/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplayvendorid?language=objc)
1656pub type IODisplayVendorID = u32;
1657
1658/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplayproductid?language=objc)
1659pub type IODisplayProductID = u32;
1660
1661/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaymodeid?language=objc)
1662pub type IODisplayModeID = i32;
1663
1664/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomaxpixelbits?language=objc)
1665pub const kIOMaxPixelBits: c_uint = 64;
1666
1667/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioclutpixels?language=objc)
1668pub const kIOCLUTPixels: c_uint = 0;
1669/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofixedclutpixels?language=objc)
1670pub const kIOFixedCLUTPixels: c_uint = 1;
1671/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorgbdirectpixels?language=objc)
1672pub const kIORGBDirectPixels: c_uint = 2;
1673/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomonodirectpixels?language=objc)
1674pub const kIOMonoDirectPixels: c_uint = 3;
1675/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomonoinversedirectpixels?language=objc)
1676pub const kIOMonoInverseDirectPixels: c_uint = 4;
1677/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorgbsigneddirectpixels?language=objc)
1678pub const kIORGBSignedDirectPixels: c_uint = 5;
1679/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorgbsignedfloatingpointpixels?language=objc)
1680pub const kIORGBSignedFloatingPointPixels: c_uint = 6;
1681
1682/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioappletimingid?language=objc)
1683pub type IOAppleTimingID = u32;
1684
1685/// A structure defining the format of a framebuffer.
1686///
1687/// This structure is used by IOFramebuffer to define the format of the pixels.
1688/// Field: nominalWidth Number of pixels visible per row.
1689/// Field: nominalHeight Number of visible pixel rows.
1690/// Field: refreshRate Refresh rate in fixed point 16.16.
1691/// Field: maxDepthIndex Highest depth index available in this display mode.
1692/// Field: flags Flags for the mode, including:
1693/// <br>
1694/// kDisplayModeInterlacedFlag mode is interlaced.
1695/// <br>
1696/// kDisplayModeSimulscanFlag mode is available on multiple display connections.
1697/// <br>
1698/// kDisplayModeNotPresetFlag mode is not a factory preset for the display (geometry may need correction).
1699/// <br>
1700/// kDisplayModeStretchedFlag mode is stretched/distorted to match the display aspect ratio.
1701/// <br>
1702/// Field: imageWidth Physical width of active image if known, in millimeters, otherwise zero.
1703/// <br>
1704/// Field: imageHeight Physical height of active image if known, in millimeters, otherwise zero.
1705/// <br>
1706/// Field: reserved Set to zero.
1707///
1708/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaymodeinformation?language=objc)
1709#[repr(C)]
1710#[derive(Clone, Copy, Debug, PartialEq)]
1711pub struct IODisplayModeInformation {
1712 pub nominalWidth: u32,
1713 pub nominalHeight: u32,
1714 pub refreshRate: IOFixed1616,
1715 pub maxDepthIndex: IOIndex,
1716 pub flags: u32,
1717 pub imageWidth: u16,
1718 pub imageHeight: u16,
1719 pub reserved: [u32; 3],
1720}
1721
1722#[cfg(feature = "objc2")]
1723unsafe impl Encode for IODisplayModeInformation {
1724 const ENCODING: Encoding = Encoding::Struct(
1725 "IODisplayModeInformation",
1726 &[
1727 <u32>::ENCODING,
1728 <u32>::ENCODING,
1729 <IOFixed1616>::ENCODING,
1730 <IOIndex>::ENCODING,
1731 <u32>::ENCODING,
1732 <u16>::ENCODING,
1733 <u16>::ENCODING,
1734 <[u32; 3]>::ENCODING,
1735 ],
1736 );
1737}
1738
1739#[cfg(feature = "objc2")]
1740unsafe impl RefEncode for IODisplayModeInformation {
1741 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1742}
1743
1744/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodesafetyflags?language=objc)
1745pub const kDisplayModeSafetyFlags: c_uint = 0x00000007;
1746/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodealwaysshowflag?language=objc)
1747pub const kDisplayModeAlwaysShowFlag: c_uint = 0x00000008;
1748/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenevershowflag?language=objc)
1749pub const kDisplayModeNeverShowFlag: c_uint = 0x00000080;
1750/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenotresizeflag?language=objc)
1751pub const kDisplayModeNotResizeFlag: c_uint = 0x00000010;
1752/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymoderequirespanflag?language=objc)
1753pub const kDisplayModeRequiresPanFlag: c_uint = 0x00000020;
1754/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodeinterlacedflag?language=objc)
1755pub const kDisplayModeInterlacedFlag: c_uint = 0x00000040;
1756/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodesimulscanflag?language=objc)
1757pub const kDisplayModeSimulscanFlag: c_uint = 0x00000100;
1758/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodebuiltinflag?language=objc)
1759pub const kDisplayModeBuiltInFlag: c_uint = 0x00000400;
1760/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenotpresetflag?language=objc)
1761pub const kDisplayModeNotPresetFlag: c_uint = 0x00000200;
1762/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodestretchedflag?language=objc)
1763pub const kDisplayModeStretchedFlag: c_uint = 0x00000800;
1764/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenotgraphicsqualityflag?language=objc)
1765pub const kDisplayModeNotGraphicsQualityFlag: c_uint = 0x00001000;
1766/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidateagainstdisplay?language=objc)
1767pub const kDisplayModeValidateAgainstDisplay: c_uint = 0x00002000;
1768/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodetelevisionflag?language=objc)
1769pub const kDisplayModeTelevisionFlag: c_uint = 0x00100000;
1770/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidformirroringflag?language=objc)
1771pub const kDisplayModeValidForMirroringFlag: c_uint = 0x00200000;
1772/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodeacceleratorbackedflag?language=objc)
1773pub const kDisplayModeAcceleratorBackedFlag: c_uint = 0x00400000;
1774/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidforhiresflag?language=objc)
1775pub const kDisplayModeValidForHiResFlag: c_uint = 0x00800000;
1776/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidforairplayflag?language=objc)
1777pub const kDisplayModeValidForAirPlayFlag: c_uint = 0x01000000;
1778/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenativeflag?language=objc)
1779pub const kDisplayModeNativeFlag: c_uint = 0x02000000;
1780
1781/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidflag?language=objc)
1782pub const kDisplayModeValidFlag: c_uint = 0x00000001;
1783/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodesafeflag?language=objc)
1784pub const kDisplayModeSafeFlag: c_uint = 0x00000002;
1785/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodedefaultflag?language=objc)
1786pub const kDisplayModeDefaultFlag: c_uint = 0x00000004;
1787
1788/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioframebufferinformation?language=objc)
1789#[repr(C)]
1790#[derive(Clone, Copy, Debug, PartialEq)]
1791pub struct IOFramebufferInformation {
1792 pub baseAddress: IOPhysicalAddress,
1793 pub activeWidth: u32,
1794 pub activeHeight: u32,
1795 pub bytesPerRow: IOByteCount,
1796 pub bytesPerPlane: IOByteCount,
1797 pub bitsPerPixel: u32,
1798 pub pixelType: u32,
1799 pub flags: u32,
1800 pub reserved: [u32; 4],
1801}
1802
1803#[cfg(feature = "objc2")]
1804unsafe impl Encode for IOFramebufferInformation {
1805 const ENCODING: Encoding = Encoding::Struct(
1806 "IOFramebufferInformation",
1807 &[
1808 <IOPhysicalAddress>::ENCODING,
1809 <u32>::ENCODING,
1810 <u32>::ENCODING,
1811 <IOByteCount>::ENCODING,
1812 <IOByteCount>::ENCODING,
1813 <u32>::ENCODING,
1814 <u32>::ENCODING,
1815 <u32>::ENCODING,
1816 <[u32; 4]>::ENCODING,
1817 ],
1818 );
1819}
1820
1821#[cfg(feature = "objc2")]
1822unsafe impl RefEncode for IOFramebufferInformation {
1823 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1824}
1825
1826/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebuffersupportscopybackcache?language=objc)
1827pub const kFramebufferSupportsCopybackCache: c_uint = 0x00010000;
1828/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebuffersupportswritethrucache?language=objc)
1829pub const kFramebufferSupportsWritethruCache: c_uint = 0x00020000;
1830/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebuffersupportsgammacorrection?language=objc)
1831pub const kFramebufferSupportsGammaCorrection: c_uint = 0x00040000;
1832/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebufferdisablealtivecaccess?language=objc)
1833pub const kFramebufferDisableAltivecAccess: c_uint = 0x00080000;
1834
1835/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iopixelaperture?language=objc)
1836pub type IOPixelAperture = IOIndex;
1837
1838/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsystemaperture?language=objc)
1839pub const kIOFBSystemAperture: c_uint = 0;
1840
1841/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iocolorcomponent?language=objc)
1842pub type IOColorComponent = u16;
1843
1844/// A structure defining one entry of a color lookup table.
1845///
1846/// This structure is used by IOFramebuffer to define an entry of a color lookup table.
1847/// Field: index Number of pixels visible per row.
1848/// Field: red Value of red component 0-65535.
1849/// Field: green Value of green component 0-65535.
1850/// Field: blue Value of blue component 0-65535.
1851///
1852/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iocolorentry?language=objc)
1853#[repr(C)]
1854#[derive(Clone, Copy, Debug, PartialEq)]
1855pub struct IOColorEntry {
1856 pub index: u16,
1857 pub red: IOColorComponent,
1858 pub green: IOColorComponent,
1859 pub blue: IOColorComponent,
1860}
1861
1862#[cfg(feature = "objc2")]
1863unsafe impl Encode for IOColorEntry {
1864 const ENCODING: Encoding = Encoding::Struct(
1865 "IOColorEntry",
1866 &[
1867 <u16>::ENCODING,
1868 <IOColorComponent>::ENCODING,
1869 <IOColorComponent>::ENCODING,
1870 <IOColorComponent>::ENCODING,
1871 ],
1872 );
1873}
1874
1875#[cfg(feature = "objc2")]
1876unsafe impl RefEncode for IOColorEntry {
1877 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1878}
1879
1880/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ksetclutbyvalue?language=objc)
1881pub const kSetCLUTByValue: c_uint = 0x00000001;
1882/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ksetclutimmediately?language=objc)
1883pub const kSetCLUTImmediately: c_uint = 0x00000002;
1884/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ksetclutwithluminance?language=objc)
1885pub const kSetCLUTWithLuminance: c_uint = 0x00000004;
1886
1887/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopowerstateattribute?language=objc)
1888pub const kIOPowerStateAttribute: c_uint = 0x70777273;
1889/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopowerattribute?language=objc)
1890pub const kIOPowerAttribute: c_uint = 0x706f7772;
1891/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodriverpowerattribute?language=objc)
1892pub const kIODriverPowerAttribute: c_uint = 0x64706f77;
1893/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohardwarecursorattribute?language=objc)
1894pub const kIOHardwareCursorAttribute: c_uint = 0x63727372;
1895/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorattribute?language=objc)
1896pub const kIOMirrorAttribute: c_uint = 0x6d697272;
1897/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrordefaultattribute?language=objc)
1898pub const kIOMirrorDefaultAttribute: c_uint = 0x6d726466;
1899/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocapturedattribute?language=objc)
1900pub const kIOCapturedAttribute: c_uint = 0x63617064;
1901/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocursorcontrolattribute?language=objc)
1902pub const kIOCursorControlAttribute: c_uint = 0x63727363;
1903/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosystempowerattribute?language=objc)
1904pub const kIOSystemPowerAttribute: c_uint = 0x73707772;
1905/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowindowserveractiveattribute?language=objc)
1906pub const kIOWindowServerActiveAttribute: c_uint = 0x77737276;
1907/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiovramsaveattribute?language=objc)
1908pub const kIOVRAMSaveAttribute: c_uint = 0x76727376;
1909/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodeferclutsetattribute?language=objc)
1910pub const kIODeferCLUTSetAttribute: c_uint = 0x76636c74;
1911/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioclamshellstateattribute?language=objc)
1912pub const kIOClamshellStateAttribute: c_uint = 0x636c616d;
1913/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayporttrainingattribute?language=objc)
1914pub const kIOFBDisplayPortTrainingAttribute: c_uint = 0x64707461;
1915/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate?language=objc)
1916pub const kIOFBDisplayState: c_uint = 0x64737474;
1917/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbvariablerefreshrate?language=objc)
1918pub const kIOFBVariableRefreshRate: c_uint = 0x7672723f;
1919/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblimithdcpattribute?language=objc)
1920pub const kIOFBLimitHDCPAttribute: c_uint = 0x68646370;
1921/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblimithdcpstateattribute?language=objc)
1922pub const kIOFBLimitHDCPStateAttribute: c_uint = 0x73484443;
1923/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbstop?language=objc)
1924pub const kIOFBStop: c_uint = 0x73746f70;
1925/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbredgammascaleattribute?language=objc)
1926pub const kIOFBRedGammaScaleAttribute: c_uint = 0x67736c72;
1927/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbgreengammascaleattribute?language=objc)
1928pub const kIOFBGreenGammaScaleAttribute: c_uint = 0x67736c67;
1929/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbluegammascaleattribute?language=objc)
1930pub const kIOFBBlueGammaScaleAttribute: c_uint = 0x67736c62;
1931/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdrmetadataattribute?language=objc)
1932pub const kIOFBHDRMetaDataAttribute: c_uint = 0x6864726d;
1933/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobuiltinpanelpowerattribute?language=objc)
1934pub const kIOBuiltinPanelPowerAttribute: c_uint = 0x706e6c70;
1935
1936/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_allowall?language=objc)
1937pub const kIOFBHDCPLimit_AllowAll: c_uint = 0;
1938/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_nohdcp1x?language=objc)
1939pub const kIOFBHDCPLimit_NoHDCP1x: c_uint = 1 << 0;
1940/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_nohdcp20type0?language=objc)
1941pub const kIOFBHDCPLimit_NoHDCP20Type0: c_uint = 1 << 1;
1942/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_nohdcp20type1?language=objc)
1943pub const kIOFBHDCPLimit_NoHDCP20Type1: c_uint = 1 << 2;
1944
1945/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbhdrmetadatav1?language=objc)
1946#[repr(C)]
1947#[derive(Clone, Copy, Debug, PartialEq)]
1948pub struct IOFBHDRMetaDataV1 {
1949 pub displayPrimary_X0: u16,
1950 pub displayPrimary_Y0: u16,
1951 pub displayPrimary_X1: u16,
1952 pub displayPrimary_Y1: u16,
1953 pub displayPrimary_X2: u16,
1954 pub displayPrimary_Y2: u16,
1955 pub displayPrimary_X: u16,
1956 pub displayPrimary_Y: u16,
1957 pub desiredLuminance_Max: u16,
1958 pub desiredLuminance_Min: u16,
1959 pub desiredLightLevel_Avg: u16,
1960 pub desiredLightLevel_Max: u16,
1961 pub(crate) __reservedA: [u64; 5],
1962}
1963
1964#[cfg(feature = "objc2")]
1965unsafe impl Encode for IOFBHDRMetaDataV1 {
1966 const ENCODING: Encoding = Encoding::Struct(
1967 "IOFBHDRMetaDataV1",
1968 &[
1969 <u16>::ENCODING,
1970 <u16>::ENCODING,
1971 <u16>::ENCODING,
1972 <u16>::ENCODING,
1973 <u16>::ENCODING,
1974 <u16>::ENCODING,
1975 <u16>::ENCODING,
1976 <u16>::ENCODING,
1977 <u16>::ENCODING,
1978 <u16>::ENCODING,
1979 <u16>::ENCODING,
1980 <u16>::ENCODING,
1981 <[u64; 5]>::ENCODING,
1982 ],
1983 );
1984}
1985
1986#[cfg(feature = "objc2")]
1987unsafe impl RefEncode for IOFBHDRMetaDataV1 {
1988 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1989}
1990
1991/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbhdrmetadata?language=objc)
1992#[repr(C)]
1993#[derive(Clone, Copy)]
1994pub union IOFBHDRMetaData {
1995 pub v1: IOFBHDRMetaDataV1,
1996}
1997
1998#[cfg(feature = "objc2")]
1999unsafe impl Encode for IOFBHDRMetaData {
2000 const ENCODING: Encoding = Encoding::Union("?", &[<IOFBHDRMetaDataV1>::ENCODING]);
2001}
2002
2003#[cfg(feature = "objc2")]
2004unsafe impl RefEncode for IOFBHDRMetaData {
2005 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2006}
2007
2008/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_alreadyactive?language=objc)
2009pub const kIOFBDisplayState_AlreadyActive: c_uint = 1 << 0;
2010/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_restoredprofile?language=objc)
2011pub const kIOFBDisplayState_RestoredProfile: c_uint = 1 << 1;
2012/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_pipelineblack?language=objc)
2013pub const kIOFBDisplayState_PipelineBlack: c_uint = 1 << 2;
2014/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_mask?language=objc)
2015pub const kIOFBDisplayState_Mask: c_uint = kIOFBDisplayState_AlreadyActive
2016 | kIOFBDisplayState_RestoredProfile
2017 | kIOFBDisplayState_PipelineBlack;
2018
2019/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_unaccelerated?language=objc)
2020pub const kIOWSAA_Unaccelerated: c_uint = 0;
2021/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_accelerated?language=objc)
2022pub const kIOWSAA_Accelerated: c_uint = 1;
2023/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_from_accelerated?language=objc)
2024pub const kIOWSAA_From_Accelerated: c_uint = 2;
2025/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_to_accelerated?language=objc)
2026pub const kIOWSAA_To_Accelerated: c_uint = 3;
2027/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_sleep?language=objc)
2028pub const kIOWSAA_Sleep: c_uint = 4;
2029/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_hibernate?language=objc)
2030pub const kIOWSAA_Hibernate: c_uint = kIOWSAA_Sleep;
2031/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_driveropen?language=objc)
2032pub const kIOWSAA_DriverOpen: c_uint = 5;
2033/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_statemask?language=objc)
2034pub const kIOWSAA_StateMask: c_uint = 0xF;
2035/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_transactional?language=objc)
2036pub const kIOWSAA_Transactional: c_uint = 0x10;
2037/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_deferstart?language=objc)
2038pub const kIOWSAA_DeferStart: c_uint = 0x100;
2039/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_deferend?language=objc)
2040pub const kIOWSAA_DeferEnd: c_uint = 0x200;
2041/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_nonconsoledevice?language=objc)
2042pub const kIOWSAA_NonConsoleDevice: c_uint = 0x400;
2043/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_reserved?language=objc)
2044pub const kIOWSAA_Reserved: c_uint = 0xF0000000;
2045
2046/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_rendezvous?language=objc)
2047pub const kIOFBNS_Rendezvous: c_uint = 0x87654321;
2048/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_messagemask?language=objc)
2049pub const kIOFBNS_MessageMask: c_uint = 0x0000000f;
2050/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_sleep?language=objc)
2051pub const kIOFBNS_Sleep: c_uint = 0x00;
2052/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_wake?language=objc)
2053pub const kIOFBNS_Wake: c_uint = 0x01;
2054/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_doze?language=objc)
2055pub const kIOFBNS_Doze: c_uint = 0x02;
2056/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_dim?language=objc)
2057pub const kIOFBNS_Dim: c_uint = 0x03;
2058/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_undim?language=objc)
2059pub const kIOFBNS_UnDim: c_uint = 0x04;
2060/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_displaystatemask?language=objc)
2061pub const kIOFBNS_DisplayStateMask: c_uint = 0x00000f00;
2062/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_displaystateshift?language=objc)
2063pub const kIOFBNS_DisplayStateShift: c_uint = 8;
2064/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_generationmask?language=objc)
2065pub const kIOFBNS_GenerationMask: c_uint = 0x7fff0000;
2066/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_generationshift?language=objc)
2067pub const kIOFBNS_GenerationShift: c_uint = 16;
2068
2069/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorisprimary?language=objc)
2070pub const kIOMirrorIsPrimary: c_uint = 0x80000000;
2071/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorhwclipped?language=objc)
2072pub const kIOMirrorHWClipped: c_uint = 0x40000000;
2073/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorismirrored?language=objc)
2074pub const kIOMirrorIsMirrored: c_uint = 0x20000000;
2075
2076/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrordefault?language=objc)
2077pub const kIOMirrorDefault: c_uint = 0x00000001;
2078/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorforced?language=objc)
2079pub const kIOMirrorForced: c_uint = 0x00000002;
2080
2081/// / Display mode timing information
2082///
2083/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodetailedtiminginformationv1?language=objc)
2084#[repr(C)]
2085#[derive(Clone, Copy, Debug, PartialEq)]
2086pub struct IODetailedTimingInformationV1 {
2087 pub pixelClock: u32,
2088 pub horizontalActive: u32,
2089 pub horizontalBlanking: u32,
2090 pub horizontalBorder: u32,
2091 pub horizontalSyncOffset: u32,
2092 pub horizontalSyncWidth: u32,
2093 pub verticalActive: u32,
2094 pub verticalBlanking: u32,
2095 pub verticalBorder: u32,
2096 pub verticalSyncOffset: u32,
2097 pub verticalSyncWidth: u32,
2098}
2099
2100#[cfg(feature = "objc2")]
2101unsafe impl Encode for IODetailedTimingInformationV1 {
2102 const ENCODING: Encoding = Encoding::Struct(
2103 "IODetailedTimingInformationV1",
2104 &[
2105 <u32>::ENCODING,
2106 <u32>::ENCODING,
2107 <u32>::ENCODING,
2108 <u32>::ENCODING,
2109 <u32>::ENCODING,
2110 <u32>::ENCODING,
2111 <u32>::ENCODING,
2112 <u32>::ENCODING,
2113 <u32>::ENCODING,
2114 <u32>::ENCODING,
2115 <u32>::ENCODING,
2116 ],
2117 );
2118}
2119
2120#[cfg(feature = "objc2")]
2121unsafe impl RefEncode for IODetailedTimingInformationV1 {
2122 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2123}
2124
2125/// A structure defining the detailed timing information of a display mode.
2126///
2127/// This structure is used by IOFramebuffer to define detailed timing information for a display mode. The VESA EDID document has more information.
2128/// Field: __reservedA Set to zero.
2129/// Field: horizontalScaledInset If the mode is scaled, sets the number of active pixels to remove the left and right edges in order to display an underscanned image.
2130/// Field: verticalScaledInset If the mode is scaled, sets the number of active lines to remove the top and bottom edges in order to display an underscanned image.
2131/// Field: scalerFlags If the mode is scaled,
2132/// kIOScaleStretchToFit may be set to allow stretching.
2133/// kIOScaleRotateFlags is mask which may have the value given by kIOScaleRotate90, kIOScaleRotate180, kIOScaleRotate270 to display a rotated framebuffer.
2134/// Field: horizontalScaled If the mode is scaled, sets the size of the image before scaling or rotation.
2135/// Field: verticalScaled If the mode is scaled, sets the size of the image before scaling or rotation.
2136/// Field: signalConfig
2137/// kIOAnalogSetupExpected set if display expects a blank-to-black setup or pedestal. See VESA signal standards.
2138/// <br>
2139/// kIOInterlacedCEATiming set for a CEA style interlaced timing:
2140/// <br>
2141/// Field 1 vertical blanking = half specified vertical blanking lines.
2142/// <br>
2143/// Field 2 vertical blanking = (half vertical blanking lines) + 1 line.
2144/// <br>
2145/// Field 1 vertical offset = half specified vertical sync offset.
2146/// <br>
2147/// Field 2 vertical offset = (half specified vertical sync offset) + 0.5 lines.
2148/// <br>
2149/// Field: signalLevels One of:
2150/// <br>
2151/// kIOAnalogSignalLevel_0700_0300 0.700 - 0.300 V p-p.
2152/// <br>
2153/// kIOAnalogSignalLevel_0714_0286 0.714 - 0.286 V p-p.
2154/// <br>
2155/// kIOAnalogSignalLevel_1000_0400 1.000 - 0.400 V p-p.
2156/// <br>
2157/// kIOAnalogSignalLevel_0700_0000 0.700 - 0.000 V p-p.
2158/// <br>
2159/// Field: pixelClock Pixel clock frequency in Hz.
2160/// Field: minPixelClock Minimum pixel clock frequency in Hz, with error.
2161/// Field: maxPixelClock Maximum pixel clock frequency in Hz, with error.
2162/// Field: horizontalActive Pixel clocks per line.
2163/// Field: horizontalBlanking Blanking clocks per line.
2164/// Field: horizontalSyncOffset First clock of horizontal sync.
2165/// Field: horizontalSyncPulseWidth Width of horizontal sync.
2166/// Field: verticalActive Number of lines per frame.
2167/// Field: verticalBlanking Blanking lines per frame.
2168/// Field: verticalSyncOffset First line of vertical sync.
2169/// Field: verticalSyncPulseWidth Height of vertical sync.
2170/// Field: horizontalBorderLeft Number of pixels in left horizontal border.
2171/// Field: horizontalBorderRight Number of pixels in right horizontal border.
2172/// Field: verticalBorderTop Number of lines in top vertical border.
2173/// Field: verticalBorderBottom Number of lines in bottom vertical border.
2174/// Field: horizontalSyncConfig kIOSyncPositivePolarity for positive polarity horizontal sync (0 for negative).
2175/// Field: horizontalSyncLevel Zero.
2176/// Field: verticalSyncConfig kIOSyncPositivePolarity for positive polarity vertical sync (0 for negative).
2177/// Field: verticalSyncLevel Zero.
2178/// Field: numLinks number of links to be used by a dual link timing, if zero, assume one link.
2179/// Field: verticalBlankingExtension maximum number of blanking extension lines that is available. (0 for none).
2180/// Field: pixelEncoding 2017 Timing Features - ERS 2-58 (6.3.1)
2181/// Field: bitsPerColorComponent 2017 Timing Features - ERS 2-58 (6.3.1)
2182/// Field: colorimetry 2017 Timing Features - ERS 2-58 (6.3.1)
2183/// Field: dynamicRange 2017 Timing Features - ERS 2-58 (6.3.1)
2184/// Field: dscCompressedBitsPerPixel 2018 Timing Features - ERS 2-63 (6.3.1)
2185/// Field: dscSliceHeight 2018 Timing Features - ERS 2-63 (6.3.1)
2186/// Field: dscSliceWidth 2018 Timing Features - ERS 2-63 (6.3.1)
2187/// Field: verticalBlankingMaxStretchPerFrame Max stretch time used for VRR refresh rate ramps
2188/// Field: verticalBlankingMaxShrinkPerFrame Max shrink time used for VRR refresh rate ramps
2189/// Field: __reservedB Reserved set to zero.
2190///
2191/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodetailedtiminginformationv2?language=objc)
2192#[repr(C)]
2193#[derive(Clone, Copy, Debug, PartialEq)]
2194pub struct IODetailedTimingInformationV2 {
2195 pub(crate) __reservedA: [u32; 3],
2196 pub horizontalScaledInset: u32,
2197 pub verticalScaledInset: u32,
2198 pub scalerFlags: u32,
2199 pub horizontalScaled: u32,
2200 pub verticalScaled: u32,
2201 pub signalConfig: u32,
2202 pub signalLevels: u32,
2203 pub pixelClock: u64,
2204 pub minPixelClock: u64,
2205 pub maxPixelClock: u64,
2206 pub horizontalActive: u32,
2207 pub horizontalBlanking: u32,
2208 pub horizontalSyncOffset: u32,
2209 pub horizontalSyncPulseWidth: u32,
2210 pub verticalActive: u32,
2211 pub verticalBlanking: u32,
2212 pub verticalSyncOffset: u32,
2213 pub verticalSyncPulseWidth: u32,
2214 pub horizontalBorderLeft: u32,
2215 pub horizontalBorderRight: u32,
2216 pub verticalBorderTop: u32,
2217 pub verticalBorderBottom: u32,
2218 pub horizontalSyncConfig: u32,
2219 pub horizontalSyncLevel: u32,
2220 pub verticalSyncConfig: u32,
2221 pub verticalSyncLevel: u32,
2222 pub numLinks: u32,
2223 pub verticalBlankingExtension: u32,
2224 pub pixelEncoding: u16,
2225 pub bitsPerColorComponent: u16,
2226 pub colorimetry: u16,
2227 pub dynamicRange: u16,
2228 pub dscCompressedBitsPerPixel: u16,
2229 pub dscSliceHeight: u16,
2230 pub dscSliceWidth: u16,
2231 pub verticalBlankingMaxStretchPerFrame: u16,
2232 pub verticalBlankingMaxShrinkPerFrame: u16,
2233 pub(crate) __reservedB: [u16; 3],
2234}
2235
2236#[cfg(feature = "objc2")]
2237unsafe impl Encode for IODetailedTimingInformationV2 {
2238 const ENCODING: Encoding = Encoding::Struct(
2239 "IODetailedTimingInformationV2",
2240 &[
2241 <[u32; 3]>::ENCODING,
2242 <u32>::ENCODING,
2243 <u32>::ENCODING,
2244 <u32>::ENCODING,
2245 <u32>::ENCODING,
2246 <u32>::ENCODING,
2247 <u32>::ENCODING,
2248 <u32>::ENCODING,
2249 <u64>::ENCODING,
2250 <u64>::ENCODING,
2251 <u64>::ENCODING,
2252 <u32>::ENCODING,
2253 <u32>::ENCODING,
2254 <u32>::ENCODING,
2255 <u32>::ENCODING,
2256 <u32>::ENCODING,
2257 <u32>::ENCODING,
2258 <u32>::ENCODING,
2259 <u32>::ENCODING,
2260 <u32>::ENCODING,
2261 <u32>::ENCODING,
2262 <u32>::ENCODING,
2263 <u32>::ENCODING,
2264 <u32>::ENCODING,
2265 <u32>::ENCODING,
2266 <u32>::ENCODING,
2267 <u32>::ENCODING,
2268 <u32>::ENCODING,
2269 <u32>::ENCODING,
2270 <u16>::ENCODING,
2271 <u16>::ENCODING,
2272 <u16>::ENCODING,
2273 <u16>::ENCODING,
2274 <u16>::ENCODING,
2275 <u16>::ENCODING,
2276 <u16>::ENCODING,
2277 <u16>::ENCODING,
2278 <u16>::ENCODING,
2279 <[u16; 3]>::ENCODING,
2280 ],
2281 );
2282}
2283
2284#[cfg(feature = "objc2")]
2285unsafe impl RefEncode for IODetailedTimingInformationV2 {
2286 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2287}
2288
2289/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodetailedtiminginformation?language=objc)
2290pub type IODetailedTimingInformation = IODetailedTimingInformationV2;
2291
2292/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iotiminginformation_detailedinfo?language=objc)
2293#[repr(C)]
2294#[derive(Clone, Copy)]
2295pub union IOTimingInformation_detailedInfo {
2296 pub v1: IODetailedTimingInformationV1,
2297 pub v2: IODetailedTimingInformationV2,
2298}
2299
2300#[cfg(feature = "objc2")]
2301unsafe impl Encode for IOTimingInformation_detailedInfo {
2302 const ENCODING: Encoding = Encoding::Union(
2303 "?",
2304 &[
2305 <IODetailedTimingInformationV1>::ENCODING,
2306 <IODetailedTimingInformationV2>::ENCODING,
2307 ],
2308 );
2309}
2310
2311#[cfg(feature = "objc2")]
2312unsafe impl RefEncode for IOTimingInformation_detailedInfo {
2313 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2314}
2315
2316/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iotiminginformation?language=objc)
2317#[repr(C)]
2318#[derive(Clone, Copy)]
2319pub struct IOTimingInformation {
2320 pub appleTimingID: IOAppleTimingID,
2321 pub flags: u32,
2322 pub detailedInfo: IOTimingInformation_detailedInfo,
2323}
2324
2325#[cfg(feature = "objc2")]
2326unsafe impl Encode for IOTimingInformation {
2327 const ENCODING: Encoding = Encoding::Struct(
2328 "IOTimingInformation",
2329 &[
2330 <IOAppleTimingID>::ENCODING,
2331 <u32>::ENCODING,
2332 <IOTimingInformation_detailedInfo>::ENCODING,
2333 ],
2334 );
2335}
2336
2337#[cfg(feature = "objc2")]
2338unsafe impl RefEncode for IOTimingInformation {
2339 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2340}
2341
2342/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodetailedtimingvalid?language=objc)
2343pub const kIODetailedTimingValid: c_uint = 0x80000000;
2344/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalinginfovalid?language=objc)
2345pub const kIOScalingInfoValid: c_uint = 0x40000000;
2346
2347/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalestretchtofit?language=objc)
2348pub const kIOScaleStretchToFit: c_uint = 0x00000001;
2349/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotateflags?language=objc)
2350pub const kIOScaleRotateFlags: c_uint = 0x000000f0;
2351/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscaleswapaxes?language=objc)
2352pub const kIOScaleSwapAxes: c_uint = 0x00000010;
2353/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscaleinvertx?language=objc)
2354pub const kIOScaleInvertX: c_uint = 0x00000020;
2355/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscaleinverty?language=objc)
2356pub const kIOScaleInvertY: c_uint = 0x00000040;
2357/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate0?language=objc)
2358pub const kIOScaleRotate0: c_uint = 0x00000000;
2359/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate90?language=objc)
2360pub const kIOScaleRotate90: c_uint = kIOScaleSwapAxes | kIOScaleInvertX;
2361/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate180?language=objc)
2362pub const kIOScaleRotate180: c_uint = kIOScaleInvertX | kIOScaleInvertY;
2363/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate270?language=objc)
2364pub const kIOScaleRotate270: c_uint = kIOScaleSwapAxes | kIOScaleInvertY;
2365
2366/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingnotsupported?language=objc)
2367pub const kIOPixelEncodingNotSupported: c_uint = 0x0000;
2368/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingrgb444?language=objc)
2369pub const kIOPixelEncodingRGB444: c_uint = 0x0001;
2370/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingycbcr444?language=objc)
2371pub const kIOPixelEncodingYCbCr444: c_uint = 0x0002;
2372/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingycbcr422?language=objc)
2373pub const kIOPixelEncodingYCbCr422: c_uint = 0x0004;
2374/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingycbcr420?language=objc)
2375pub const kIOPixelEncodingYCbCr420: c_uint = 0x0008;
2376
2377/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponentnotsupported?language=objc)
2378pub const kIOBitsPerColorComponentNotSupported: c_uint = 0x0000;
2379/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent6?language=objc)
2380pub const kIOBitsPerColorComponent6: c_uint = 0x0001;
2381/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent8?language=objc)
2382pub const kIOBitsPerColorComponent8: c_uint = 0x0002;
2383/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent10?language=objc)
2384pub const kIOBitsPerColorComponent10: c_uint = 0x0004;
2385/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent12?language=objc)
2386pub const kIOBitsPerColorComponent12: c_uint = 0x0008;
2387/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent16?language=objc)
2388pub const kIOBitsPerColorComponent16: c_uint = 0x0010;
2389
2390/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrynotsupported?language=objc)
2391pub const kIOColorimetryNotSupported: c_uint = 0x0000;
2392/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrynativergb?language=objc)
2393pub const kIOColorimetryNativeRGB: c_uint = 0x0001;
2394/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrysrgb?language=objc)
2395pub const kIOColorimetrysRGB: c_uint = 0x0002;
2396/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrydcip3?language=objc)
2397pub const kIOColorimetryDCIP3: c_uint = 0x0004;
2398/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetryadobergb?language=objc)
2399pub const kIOColorimetryAdobeRGB: c_uint = 0x0008;
2400/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetryxvycc?language=objc)
2401pub const kIOColorimetryxvYCC: c_uint = 0x0010;
2402/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrywgrgb?language=objc)
2403pub const kIOColorimetryWGRGB: c_uint = 0x0020;
2404/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt601?language=objc)
2405pub const kIOColorimetryBT601: c_uint = 0x0040;
2406/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt709?language=objc)
2407pub const kIOColorimetryBT709: c_uint = 0x0080;
2408/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt2020?language=objc)
2409pub const kIOColorimetryBT2020: c_uint = 0x0100;
2410/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt2100?language=objc)
2411pub const kIOColorimetryBT2100: c_uint = 0x0200;
2412
2413/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangenotsupported?language=objc)
2414pub const kIODynamicRangeNotSupported: c_uint = 0x0000;
2415/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangesdr?language=objc)
2416pub const kIODynamicRangeSDR: c_uint = 0x0001;
2417/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangehdr10?language=objc)
2418pub const kIODynamicRangeHDR10: c_uint = 0x0002;
2419/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangedolbynormalmode?language=objc)
2420pub const kIODynamicRangeDolbyNormalMode: c_uint = 0x0004;
2421/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangedolbytunnelmode?language=objc)
2422pub const kIODynamicRangeDolbyTunnelMode: c_uint = 0x0008;
2423/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangetraditionalgammahdr?language=objc)
2424pub const kIODynamicRangeTraditionalGammaHDR: c_uint = 0x0010;
2425/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangetraditionalgammasdr?language=objc)
2426pub const kIODynamicRangeTraditionalGammaSDR: c_uint = 0x0020;
2427
2428/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbdisplaymodedescription?language=objc)
2429#[repr(C, packed(4))]
2430#[derive(Clone, Copy)]
2431pub struct IOFBDisplayModeDescription {
2432 pub info: IODisplayModeInformation,
2433 pub timingInfo: IOTimingInformation,
2434}
2435
2436#[cfg(feature = "objc2")]
2437unsafe impl Encode for IOFBDisplayModeDescription {
2438 const ENCODING: Encoding = Encoding::Struct(
2439 "IOFBDisplayModeDescription",
2440 &[
2441 <IODisplayModeInformation>::ENCODING,
2442 <IOTimingInformation>::ENCODING,
2443 ],
2444 );
2445}
2446
2447#[cfg(feature = "objc2")]
2448unsafe impl RefEncode for IOFBDisplayModeDescription {
2449 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2450}
2451
2452/// A structure defining the limits and attributes of a display or framebuffer.
2453///
2454/// This structure is used to define the limits for modes programmed as detailed timings by the OS. The VESA EDID is useful background information for many of these fields. A data property with this structure under the key kIOFBTimingRangeKey in a framebuffer will allow the OS to program detailed timings that fall within its range.
2455/// Field: __reservedA Set to zero.
2456/// Field: version Set to zero.
2457/// Field: __reservedB Set to zero.
2458/// Field: minPixelClock minimum pixel clock frequency in range, in Hz.
2459/// Field: minPixelClock maximum pixel clock frequency in range, in Hz.
2460/// Field: maxPixelError largest variation between specified and actual pixel clock frequency, in Hz.
2461/// Field: supportedSyncFlags mask of supported sync attributes. The following are defined:
2462/// <br>
2463/// kIORangeSupportsSeparateSyncs - digital separate syncs.
2464/// <br>
2465/// kIORangeSupportsSyncOnGreen - sync on green.
2466/// <br>
2467/// kIORangeSupportsCompositeSync - composite sync.
2468/// <br>
2469/// kIORangeSupportsVSyncSerration - vertical sync has serration and equalization pulses.
2470/// <br>
2471/// kIORangeSupportsVRR - variable refresh rate.
2472/// <br>
2473/// Field: supportedSignalLevels mask of possible signal levels. The following are defined:
2474/// <br>
2475/// kIORangeSupportsSignal_0700_0300 0.700 - 0.300 V p-p.
2476/// <br>
2477/// kIORangeSupportsSignal_0714_0286 0.714 - 0.286 V p-p.
2478/// <br>
2479/// kIORangeSupportsSignal_1000_0400 1.000 - 0.400 V p-p.
2480/// <br>
2481/// kIORangeSupportsSignal_0700_0000 0.700 - 0.000 V p-p.
2482/// <br>
2483/// Field: supportedSignalConfigs mask of possible signal configurations. The following are defined:
2484/// <br>
2485/// kIORangeSupportsInterlacedCEATiming Supports CEA style interlaced timing:
2486/// <br>
2487/// Field 1 vertical blanking = specified vertical blanking lines.
2488/// <br>
2489/// Field 2 vertical blanking = vertical blanking lines + 1 line.
2490/// <br>
2491/// Field 1 vertical offset = specified vertical sync offset.
2492/// <br>
2493/// Field 2 vertical offset = specified vertical sync offset + 0.5 lines.
2494/// <br>
2495/// kIORangeSupportsInterlacedCEATimingWithConfirm Supports CEA style interlaced timing, but require a confirm.
2496/// Field: minFrameRate minimum frame rate (vertical refresh frequency) in range, in Hz.
2497/// Field: maxFrameRate maximum frame rate (vertical refresh frequency) in range, in Hz.
2498/// Field: minLineRate minimum line rate (horizontal refresh frequency) in range, in Hz.
2499/// Field: maxLineRate maximum line rate (horizontal refresh frequency) in range, in Hz.
2500/// Field: maxHorizontalTotal maximum clocks in horizontal line (active + blanking).
2501/// Field: maxVerticalTotal maximum lines in vertical frame (active + blanking).
2502/// Field: __reservedD Set to zero.
2503/// Field: charSizeHorizontalActive horizontalActive must be a multiple of charSizeHorizontalActive.
2504/// Field: charSizeHorizontalBlanking horizontalBlanking must be a multiple of charSizeHorizontalBlanking.
2505/// Field: charSizeHorizontalSyncOffset horizontalSyncOffset must be a multiple of charSizeHorizontalSyncOffset.
2506/// Field: charSizeHorizontalSyncPulse horizontalSyncPulse must be a multiple of charSizeHorizontalSyncPulse.
2507/// Field: charSizeVerticalActive verticalActive must be a multiple of charSizeVerticalActive.
2508/// Field: charSizeVerticalBlanking verticalBlanking must be a multiple of charSizeVerticalBlanking.
2509/// Field: charSizeVerticalSyncOffset verticalSyncOffset must be a multiple of charSizeVerticalSyncOffset.
2510/// Field: charSizeVerticalSyncPulse verticalSyncPulse must be a multiple of charSizeVerticalSyncPulse.
2511/// Field: charSizeHorizontalBorderLeft horizontalBorderLeft must be a multiple of charSizeHorizontalBorderLeft.
2512/// Field: charSizeHorizontalBorderRight horizontalBorderRight must be a multiple of charSizeHorizontalBorderRight.
2513/// Field: charSizeVerticalBorderTop verticalBorderTop must be a multiple of charSizeVerticalBorderTop.
2514/// Field: charSizeVerticalBorderBottom verticalBorderBottom must be a multiple of charSizeVerticalBorderBottom.
2515/// Field: charSizeHorizontalTotal (horizontalActive + horizontalBlanking) must be a multiple of charSizeHorizontalTotal.
2516/// Field: charSizeVerticalTotal (verticalActive + verticalBlanking) must be a multiple of charSizeVerticalTotal.
2517/// Field: __reservedE Set to zero.
2518/// Field: minHorizontalActiveClocks minimum value of horizontalActive.
2519/// Field: maxHorizontalActiveClocks maximum value of horizontalActive.
2520/// Field: minHorizontalBlankingClocks minimum value of horizontalBlanking.
2521/// Field: maxHorizontalBlankingClocks maximum value of horizontalBlanking.
2522/// Field: minHorizontalSyncOffsetClocks minimum value of horizontalSyncOffset.
2523/// Field: maxHorizontalSyncOffsetClocks maximum value of horizontalSyncOffset.
2524/// Field: minHorizontalPulseWidthClocks minimum value of horizontalPulseWidth.
2525/// Field: maxHorizontalPulseWidthClocks maximum value of horizontalPulseWidth.
2526/// Field: minVerticalActiveClocks minimum value of verticalActive.
2527/// Field: maxVerticalActiveClocks maximum value of verticalActive.
2528/// Field: minVerticalBlankingClocks minimum value of verticalBlanking.
2529/// Field: maxVerticalBlankingClocks maximum value of verticalBlanking.
2530/// Field: minVerticalSyncOffsetClocks minimum value of verticalSyncOffset.
2531/// Field: maxVerticalSyncOffsetClocks maximum value of verticalSyncOffset.
2532/// Field: minVerticalPulseWidthClocks minimum value of verticalPulseWidth.
2533/// Field: maxVerticalPulseWidthClocks maximum value of verticalPulseWidth.
2534/// Field: minHorizontalBorderLeft minimum value of horizontalBorderLeft.
2535/// Field: maxHorizontalBorderLeft maximum value of horizontalBorderLeft.
2536/// Field: minHorizontalBorderRight minimum value of horizontalBorderRight.
2537/// Field: maxHorizontalBorderRight maximum value of horizontalBorderRight.
2538/// Field: minVerticalBorderTop minimum value of verticalBorderTop.
2539/// Field: maxVerticalBorderTop maximum value of verticalBorderTop.
2540/// Field: minVerticalBorderBottom minimum value of verticalBorderBottom.
2541/// Field: maxVerticalBorderBottom maximum value of verticalBorderBottom.
2542/// Field: maxNumLinks number of links supported, if zero, 1 link is assumed.
2543/// Field: minLink0PixelClock minimum pixel clock for link 0 (kHz).
2544/// Field: maxLink0PixelClock maximum pixel clock for link 0 (kHz).
2545/// Field: minLink1PixelClock minimum pixel clock for link 1 (kHz).
2546/// Field: maxLink1PixelClock maximum pixel clock for link 1 (kHz).
2547/// Field: supportedPixelEncoding 2017 Timing Features - ERS 2-58 (6.3.1)
2548/// Field: supportedBitsPerColorComponent 2017 Timing Features - ERS 2-58 (6.3.1)
2549/// Field: supportedColorimetry 2017 Timing Features - ERS 2-58 (6.3.1)
2550/// Field: supportedDynamicRange 2017 Timing Features - ERS 2-58 (6.3.1)
2551/// Field: __reservedF Set to zero.
2552///
2553/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaytimingrangev1?language=objc)
2554#[repr(C)]
2555#[derive(Clone, Copy, Debug, PartialEq)]
2556pub struct IODisplayTimingRangeV1 {
2557 pub(crate) __reservedA: [u32; 2],
2558 pub version: u32,
2559 pub(crate) __reservedB: [u32; 5],
2560 pub minPixelClock: u64,
2561 pub maxPixelClock: u64,
2562 pub maxPixelError: u32,
2563 pub supportedSyncFlags: u32,
2564 pub supportedSignalLevels: u32,
2565 pub supportedSignalConfigs: u32,
2566 pub minFrameRate: u32,
2567 pub maxFrameRate: u32,
2568 pub minLineRate: u32,
2569 pub maxLineRate: u32,
2570 pub maxHorizontalTotal: u32,
2571 pub maxVerticalTotal: u32,
2572 pub(crate) __reservedD: [u32; 2],
2573 pub charSizeHorizontalActive: u8,
2574 pub charSizeHorizontalBlanking: u8,
2575 pub charSizeHorizontalSyncOffset: u8,
2576 pub charSizeHorizontalSyncPulse: u8,
2577 pub charSizeVerticalActive: u8,
2578 pub charSizeVerticalBlanking: u8,
2579 pub charSizeVerticalSyncOffset: u8,
2580 pub charSizeVerticalSyncPulse: u8,
2581 pub charSizeHorizontalBorderLeft: u8,
2582 pub charSizeHorizontalBorderRight: u8,
2583 pub charSizeVerticalBorderTop: u8,
2584 pub charSizeVerticalBorderBottom: u8,
2585 pub charSizeHorizontalTotal: u8,
2586 pub charSizeVerticalTotal: u8,
2587 pub(crate) __reservedE: u16,
2588 pub minHorizontalActiveClocks: u32,
2589 pub maxHorizontalActiveClocks: u32,
2590 pub minHorizontalBlankingClocks: u32,
2591 pub maxHorizontalBlankingClocks: u32,
2592 pub minHorizontalSyncOffsetClocks: u32,
2593 pub maxHorizontalSyncOffsetClocks: u32,
2594 pub minHorizontalPulseWidthClocks: u32,
2595 pub maxHorizontalPulseWidthClocks: u32,
2596 pub minVerticalActiveClocks: u32,
2597 pub maxVerticalActiveClocks: u32,
2598 pub minVerticalBlankingClocks: u32,
2599 pub maxVerticalBlankingClocks: u32,
2600 pub minVerticalSyncOffsetClocks: u32,
2601 pub maxVerticalSyncOffsetClocks: u32,
2602 pub minVerticalPulseWidthClocks: u32,
2603 pub maxVerticalPulseWidthClocks: u32,
2604 pub minHorizontalBorderLeft: u32,
2605 pub maxHorizontalBorderLeft: u32,
2606 pub minHorizontalBorderRight: u32,
2607 pub maxHorizontalBorderRight: u32,
2608 pub minVerticalBorderTop: u32,
2609 pub maxVerticalBorderTop: u32,
2610 pub minVerticalBorderBottom: u32,
2611 pub maxVerticalBorderBottom: u32,
2612 pub maxNumLinks: u32,
2613 pub minLink0PixelClock: u32,
2614 pub maxLink0PixelClock: u32,
2615 pub minLink1PixelClock: u32,
2616 pub maxLink1PixelClock: u32,
2617 pub supportedPixelEncoding: u16,
2618 pub supportedBitsPerColorComponent: u16,
2619 pub supportedColorimetryModes: u16,
2620 pub supportedDynamicRangeModes: u16,
2621 pub(crate) __reservedF: [u32; 1],
2622}
2623
2624#[cfg(feature = "objc2")]
2625unsafe impl Encode for IODisplayTimingRangeV1 {
2626 const ENCODING: Encoding = Encoding::Struct(
2627 "IODisplayTimingRangeV1",
2628 &[
2629 <[u32; 2]>::ENCODING,
2630 <u32>::ENCODING,
2631 <[u32; 5]>::ENCODING,
2632 <u64>::ENCODING,
2633 <u64>::ENCODING,
2634 <u32>::ENCODING,
2635 <u32>::ENCODING,
2636 <u32>::ENCODING,
2637 <u32>::ENCODING,
2638 <u32>::ENCODING,
2639 <u32>::ENCODING,
2640 <u32>::ENCODING,
2641 <u32>::ENCODING,
2642 <u32>::ENCODING,
2643 <u32>::ENCODING,
2644 <[u32; 2]>::ENCODING,
2645 <u8>::ENCODING,
2646 <u8>::ENCODING,
2647 <u8>::ENCODING,
2648 <u8>::ENCODING,
2649 <u8>::ENCODING,
2650 <u8>::ENCODING,
2651 <u8>::ENCODING,
2652 <u8>::ENCODING,
2653 <u8>::ENCODING,
2654 <u8>::ENCODING,
2655 <u8>::ENCODING,
2656 <u8>::ENCODING,
2657 <u8>::ENCODING,
2658 <u8>::ENCODING,
2659 <u16>::ENCODING,
2660 <u32>::ENCODING,
2661 <u32>::ENCODING,
2662 <u32>::ENCODING,
2663 <u32>::ENCODING,
2664 <u32>::ENCODING,
2665 <u32>::ENCODING,
2666 <u32>::ENCODING,
2667 <u32>::ENCODING,
2668 <u32>::ENCODING,
2669 <u32>::ENCODING,
2670 <u32>::ENCODING,
2671 <u32>::ENCODING,
2672 <u32>::ENCODING,
2673 <u32>::ENCODING,
2674 <u32>::ENCODING,
2675 <u32>::ENCODING,
2676 <u32>::ENCODING,
2677 <u32>::ENCODING,
2678 <u32>::ENCODING,
2679 <u32>::ENCODING,
2680 <u32>::ENCODING,
2681 <u32>::ENCODING,
2682 <u32>::ENCODING,
2683 <u32>::ENCODING,
2684 <u32>::ENCODING,
2685 <u32>::ENCODING,
2686 <u32>::ENCODING,
2687 <u32>::ENCODING,
2688 <u32>::ENCODING,
2689 <u16>::ENCODING,
2690 <u16>::ENCODING,
2691 <u16>::ENCODING,
2692 <u16>::ENCODING,
2693 <[u32; 1]>::ENCODING,
2694 ],
2695 );
2696}
2697
2698#[cfg(feature = "objc2")]
2699unsafe impl RefEncode for IODisplayTimingRangeV1 {
2700 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2701}
2702
2703/// A structure defining the limits and attributes of DSC capabilities in a framebuffer.
2704///
2705/// This structure is used to define the limits for DSC enabled modes programmed as detailed timings by the OS. The VESA DSC spec is useful background information for many of these fields.
2706/// Field: maxBandwidth Maximum permitted bandwidth of the given topology in bits per second.
2707/// Field: dscMinSliceHeight Minimum slice Height, in units of line.
2708/// Field: dscMaxSliceHeight Maximum slice Height, in units of line.
2709/// Field: dscMinSliceWidth Minimum slice width, in units of line.
2710/// Field: dscMaxSliceWidth Maximum slice width, in units of line.
2711/// Field: dscMinSlicePerLine Minimum slice per Line.
2712/// Field: dscMaxSlicePerLine Maximum slice per Line.
2713/// Field: dscMinBPC Minimum Bits per component, in units of bits.
2714/// Field: dscMaxBPC Maximum Bits per component, in units of bits.
2715/// Field: dscMinBPP Minimum target bits/pixel, in bpp.
2716/// Field: dscMaxBPP Maximum target bits/pixel, in bpp.
2717/// Field: dscVBR VBR mode, 0:disabled 1:enabled.
2718/// Field: dscBlockPredEnable DSC BP is user or not, 0: not used, 1: used.
2719/// Field: __reservedF Set to zero.
2720///
2721/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaytimingrangev2?language=objc)
2722#[repr(C)]
2723#[derive(Clone, Copy, Debug, PartialEq)]
2724pub struct IODisplayTimingRangeV2 {
2725 pub(crate) __reservedA: [u32; 2],
2726 pub version: u32,
2727 pub(crate) __reservedB: [u32; 5],
2728 pub minPixelClock: u64,
2729 pub maxPixelClock: u64,
2730 pub maxPixelError: u32,
2731 pub supportedSyncFlags: u32,
2732 pub supportedSignalLevels: u32,
2733 pub supportedSignalConfigs: u32,
2734 pub minFrameRate: u32,
2735 pub maxFrameRate: u32,
2736 pub minLineRate: u32,
2737 pub maxLineRate: u32,
2738 pub maxHorizontalTotal: u32,
2739 pub maxVerticalTotal: u32,
2740 pub(crate) __reservedD: [u32; 2],
2741 pub charSizeHorizontalActive: u8,
2742 pub charSizeHorizontalBlanking: u8,
2743 pub charSizeHorizontalSyncOffset: u8,
2744 pub charSizeHorizontalSyncPulse: u8,
2745 pub charSizeVerticalActive: u8,
2746 pub charSizeVerticalBlanking: u8,
2747 pub charSizeVerticalSyncOffset: u8,
2748 pub charSizeVerticalSyncPulse: u8,
2749 pub charSizeHorizontalBorderLeft: u8,
2750 pub charSizeHorizontalBorderRight: u8,
2751 pub charSizeVerticalBorderTop: u8,
2752 pub charSizeVerticalBorderBottom: u8,
2753 pub charSizeHorizontalTotal: u8,
2754 pub charSizeVerticalTotal: u8,
2755 pub(crate) __reservedE: u16,
2756 pub minHorizontalActiveClocks: u32,
2757 pub maxHorizontalActiveClocks: u32,
2758 pub minHorizontalBlankingClocks: u32,
2759 pub maxHorizontalBlankingClocks: u32,
2760 pub minHorizontalSyncOffsetClocks: u32,
2761 pub maxHorizontalSyncOffsetClocks: u32,
2762 pub minHorizontalPulseWidthClocks: u32,
2763 pub maxHorizontalPulseWidthClocks: u32,
2764 pub minVerticalActiveClocks: u32,
2765 pub maxVerticalActiveClocks: u32,
2766 pub minVerticalBlankingClocks: u32,
2767 pub maxVerticalBlankingClocks: u32,
2768 pub minVerticalSyncOffsetClocks: u32,
2769 pub maxVerticalSyncOffsetClocks: u32,
2770 pub minVerticalPulseWidthClocks: u32,
2771 pub maxVerticalPulseWidthClocks: u32,
2772 pub minHorizontalBorderLeft: u32,
2773 pub maxHorizontalBorderLeft: u32,
2774 pub minHorizontalBorderRight: u32,
2775 pub maxHorizontalBorderRight: u32,
2776 pub minVerticalBorderTop: u32,
2777 pub maxVerticalBorderTop: u32,
2778 pub minVerticalBorderBottom: u32,
2779 pub maxVerticalBorderBottom: u32,
2780 pub maxNumLinks: u32,
2781 pub minLink0PixelClock: u32,
2782 pub maxLink0PixelClock: u32,
2783 pub minLink1PixelClock: u32,
2784 pub maxLink1PixelClock: u32,
2785 pub supportedPixelEncoding: u16,
2786 pub supportedBitsPerColorComponent: u16,
2787 pub supportedColorimetryModes: u16,
2788 pub supportedDynamicRangeModes: u16,
2789 pub(crate) __reservedF: [u32; 1],
2790 pub maxBandwidth: u64,
2791 pub dscMinSliceHeight: u32,
2792 pub dscMaxSliceHeight: u32,
2793 pub dscMinSliceWidth: u32,
2794 pub dscMaxSliceWidth: u32,
2795 pub dscMinSlicePerLine: u32,
2796 pub dscMaxSlicePerLine: u32,
2797 pub dscMinBPC: u16,
2798 pub dscMaxBPC: u16,
2799 pub dscMinBPP: u16,
2800 pub dscMaxBPP: u16,
2801 pub dscVBR: u8,
2802 pub dscBlockPredEnable: u8,
2803 pub(crate) __reservedC: [u32; 6],
2804}
2805
2806#[cfg(feature = "objc2")]
2807unsafe impl Encode for IODisplayTimingRangeV2 {
2808 const ENCODING: Encoding = Encoding::Struct(
2809 "IODisplayTimingRangeV2",
2810 &[
2811 <[u32; 2]>::ENCODING,
2812 <u32>::ENCODING,
2813 <[u32; 5]>::ENCODING,
2814 <u64>::ENCODING,
2815 <u64>::ENCODING,
2816 <u32>::ENCODING,
2817 <u32>::ENCODING,
2818 <u32>::ENCODING,
2819 <u32>::ENCODING,
2820 <u32>::ENCODING,
2821 <u32>::ENCODING,
2822 <u32>::ENCODING,
2823 <u32>::ENCODING,
2824 <u32>::ENCODING,
2825 <u32>::ENCODING,
2826 <[u32; 2]>::ENCODING,
2827 <u8>::ENCODING,
2828 <u8>::ENCODING,
2829 <u8>::ENCODING,
2830 <u8>::ENCODING,
2831 <u8>::ENCODING,
2832 <u8>::ENCODING,
2833 <u8>::ENCODING,
2834 <u8>::ENCODING,
2835 <u8>::ENCODING,
2836 <u8>::ENCODING,
2837 <u8>::ENCODING,
2838 <u8>::ENCODING,
2839 <u8>::ENCODING,
2840 <u8>::ENCODING,
2841 <u16>::ENCODING,
2842 <u32>::ENCODING,
2843 <u32>::ENCODING,
2844 <u32>::ENCODING,
2845 <u32>::ENCODING,
2846 <u32>::ENCODING,
2847 <u32>::ENCODING,
2848 <u32>::ENCODING,
2849 <u32>::ENCODING,
2850 <u32>::ENCODING,
2851 <u32>::ENCODING,
2852 <u32>::ENCODING,
2853 <u32>::ENCODING,
2854 <u32>::ENCODING,
2855 <u32>::ENCODING,
2856 <u32>::ENCODING,
2857 <u32>::ENCODING,
2858 <u32>::ENCODING,
2859 <u32>::ENCODING,
2860 <u32>::ENCODING,
2861 <u32>::ENCODING,
2862 <u32>::ENCODING,
2863 <u32>::ENCODING,
2864 <u32>::ENCODING,
2865 <u32>::ENCODING,
2866 <u32>::ENCODING,
2867 <u32>::ENCODING,
2868 <u32>::ENCODING,
2869 <u32>::ENCODING,
2870 <u32>::ENCODING,
2871 <u16>::ENCODING,
2872 <u16>::ENCODING,
2873 <u16>::ENCODING,
2874 <u16>::ENCODING,
2875 <[u32; 1]>::ENCODING,
2876 <u64>::ENCODING,
2877 <u32>::ENCODING,
2878 <u32>::ENCODING,
2879 <u32>::ENCODING,
2880 <u32>::ENCODING,
2881 <u32>::ENCODING,
2882 <u32>::ENCODING,
2883 <u16>::ENCODING,
2884 <u16>::ENCODING,
2885 <u16>::ENCODING,
2886 <u16>::ENCODING,
2887 <u8>::ENCODING,
2888 <u8>::ENCODING,
2889 <[u32; 6]>::ENCODING,
2890 ],
2891 );
2892}
2893
2894#[cfg(feature = "objc2")]
2895unsafe impl RefEncode for IODisplayTimingRangeV2 {
2896 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2897}
2898
2899/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaytimingrange?language=objc)
2900pub type IODisplayTimingRange = IODisplayTimingRangeV2;
2901
2902/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingrangev2?language=objc)
2903pub const kIOTimingRangeV2: c_uint = 0x00000002;
2904/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingrangev1?language=objc)
2905pub const kIOTimingRangeV1: c_uint = 0x00000000;
2906
2907/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingnotsupported?language=objc)
2908pub const kIORangePixelEncodingNotSupported: c_uint = 0x0000;
2909/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingrgb444?language=objc)
2910pub const kIORangePixelEncodingRGB444: c_uint = 0x0001;
2911/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingycbcr444?language=objc)
2912pub const kIORangePixelEncodingYCbCr444: c_uint = 0x0002;
2913/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingycbcr422?language=objc)
2914pub const kIORangePixelEncodingYCbCr422: c_uint = 0x0004;
2915/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingycbcr420?language=objc)
2916pub const kIORangePixelEncodingYCbCr420: c_uint = 0x0008;
2917
2918/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponentnotsupported?language=objc)
2919pub const kIORangeBitsPerColorComponentNotSupported: c_uint = 0x0000;
2920/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent6?language=objc)
2921pub const kIORangeBitsPerColorComponent6: c_uint = 0x0001;
2922/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent8?language=objc)
2923pub const kIORangeBitsPerColorComponent8: c_uint = 0x0002;
2924/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent10?language=objc)
2925pub const kIORangeBitsPerColorComponent10: c_uint = 0x0004;
2926/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent12?language=objc)
2927pub const kIORangeBitsPerColorComponent12: c_uint = 0x0008;
2928/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent16?language=objc)
2929pub const kIORangeBitsPerColorComponent16: c_uint = 0x0010;
2930
2931/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrynotsupported?language=objc)
2932pub const kIORangeColorimetryNotSupported: c_uint = 0x0000;
2933/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrynativergb?language=objc)
2934pub const kIORangeColorimetryNativeRGB: c_uint = 0x0001;
2935/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrysrgb?language=objc)
2936pub const kIORangeColorimetrysRGB: c_uint = 0x0002;
2937/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrydcip3?language=objc)
2938pub const kIORangeColorimetryDCIP3: c_uint = 0x0004;
2939/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetryadobergb?language=objc)
2940pub const kIORangeColorimetryAdobeRGB: c_uint = 0x0008;
2941/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetryxvycc?language=objc)
2942pub const kIORangeColorimetryxvYCC: c_uint = 0x0010;
2943/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrywgrgb?language=objc)
2944pub const kIORangeColorimetryWGRGB: c_uint = 0x0020;
2945/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt601?language=objc)
2946pub const kIORangeColorimetryBT601: c_uint = 0x0040;
2947/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt709?language=objc)
2948pub const kIORangeColorimetryBT709: c_uint = 0x0080;
2949/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt2020?language=objc)
2950pub const kIORangeColorimetryBT2020: c_uint = 0x0100;
2951/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt2100?language=objc)
2952pub const kIORangeColorimetryBT2100: c_uint = 0x0200;
2953
2954/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangenotsupported?language=objc)
2955pub const kIORangeDynamicRangeNotSupported: c_uint = 0x0000;
2956/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangesdr?language=objc)
2957pub const kIORangeDynamicRangeSDR: c_uint = 0x0001;
2958/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangehdr10?language=objc)
2959pub const kIORangeDynamicRangeHDR10: c_uint = 0x0002;
2960/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangedolbynormalmode?language=objc)
2961pub const kIORangeDynamicRangeDolbyNormalMode: c_uint = 0x0004;
2962/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangedolbytunnelmode?language=objc)
2963pub const kIORangeDynamicRangeDolbyTunnelMode: c_uint = 0x0008;
2964/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangetraditionalgammahdr?language=objc)
2965pub const kIORangeDynamicRangeTraditionalGammaHDR: c_uint = 0x0010;
2966/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangetraditionalgammasdr?language=objc)
2967pub const kIORangeDynamicRangeTraditionalGammaSDR: c_uint = 0x0020;
2968
2969/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_0700_0300?language=objc)
2970pub const kIORangeSupportsSignal_0700_0300: c_uint = 0x00000001;
2971/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_0714_0286?language=objc)
2972pub const kIORangeSupportsSignal_0714_0286: c_uint = 0x00000002;
2973/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_1000_0400?language=objc)
2974pub const kIORangeSupportsSignal_1000_0400: c_uint = 0x00000004;
2975/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_0700_0000?language=objc)
2976pub const kIORangeSupportsSignal_0700_0000: c_uint = 0x00000008;
2977
2978/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsseparatesyncs?language=objc)
2979pub const kIORangeSupportsSeparateSyncs: c_uint = 0x00000001;
2980/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssyncongreen?language=objc)
2981pub const kIORangeSupportsSyncOnGreen: c_uint = 0x00000002;
2982/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportscompositesync?language=objc)
2983pub const kIORangeSupportsCompositeSync: c_uint = 0x00000004;
2984/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsvsyncserration?language=objc)
2985pub const kIORangeSupportsVSyncSerration: c_uint = 0x00000008;
2986/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsvrr?language=objc)
2987pub const kIORangeSupportsVRR: c_uint = 0x00000010;
2988
2989/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsinterlacedceatiming?language=objc)
2990pub const kIORangeSupportsInterlacedCEATiming: c_uint = 0x00000004;
2991/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsinterlacedceatimingwithconfirm?language=objc)
2992pub const kIORangeSupportsInterlacedCEATimingWithConfirm: c_uint = 0x00000008;
2993/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsmultialignedtiming?language=objc)
2994pub const kIORangeSupportsMultiAlignedTiming: c_uint = 0x00000040;
2995
2996/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodigitalsignal?language=objc)
2997pub const kIODigitalSignal: c_uint = 0x00000001;
2998/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsetupexpected?language=objc)
2999pub const kIOAnalogSetupExpected: c_uint = 0x00000002;
3000/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiointerlacedceatiming?language=objc)
3001pub const kIOInterlacedCEATiming: c_uint = 0x00000004;
3002/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiontsctiming?language=objc)
3003pub const kIONTSCTiming: c_uint = 0x00000008;
3004/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopaltiming?language=objc)
3005pub const kIOPALTiming: c_uint = 0x00000010;
3006/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodscblockpredenable?language=objc)
3007pub const kIODSCBlockPredEnable: c_uint = 0x00000020;
3008/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomultialignedtiming?language=objc)
3009pub const kIOMultiAlignedTiming: c_uint = 0x00000040;
3010
3011/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_0700_0300?language=objc)
3012pub const kIOAnalogSignalLevel_0700_0300: c_uint = 0;
3013/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_0714_0286?language=objc)
3014pub const kIOAnalogSignalLevel_0714_0286: c_uint = 1;
3015/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_1000_0400?language=objc)
3016pub const kIOAnalogSignalLevel_1000_0400: c_uint = 2;
3017/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_0700_0000?language=objc)
3018pub const kIOAnalogSignalLevel_0700_0000: c_uint = 3;
3019
3020/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosyncpositivepolarity?language=objc)
3021pub const kIOSyncPositivePolarity: c_uint = 0x00000001;
3022
3023/// A structure defining the scaling capabilities of a framebuffer.
3024///
3025/// This structure is used to define the limits for modes programmed as detailed timings by the OS. A data property with this structure under the key kIOFBScalerInfoKey in a framebuffer will allow the OS to program detailed timings that are scaled to a displays native resolution.
3026/// Field: __reservedA Set to zero.
3027/// Field: version Set to zero.
3028/// Field: __reservedB Set to zero.
3029/// Field: scalerFeatures Mask of scaling features. The following are defined:
3030/// <br>
3031/// kIOScaleStretchOnly If set the framebuffer can only provide stretched scaling with non-square pixels, without borders.
3032/// <br>
3033/// kIOScaleCanUpSamplePixels If set framebuffer can scale up from a smaller number of source pixels to a larger native timing (eg. 640x480 pixels on a 1600x1200 timing).
3034/// <br>
3035/// kIOScaleCanDownSamplePixels If set framebuffer can scale down from a larger number of source pixels to a smaller native timing (eg. 1600x1200 pixels on a 640x480 timing).
3036/// <br>
3037/// kIOScaleCanScaleInterlaced If set framebuffer can scale an interlaced detailed timing.
3038/// <br>
3039/// kIOScaleCanSupportInset If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields.
3040/// <br>
3041/// kIOScaleCanRotate If set framebuffer can support some of the flags in the kIOScaleRotateFlags mask.
3042/// <br>
3043/// kIOScaleCanBorderInsetOnly If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields, but requires the active pixels to be equal in size to the inset area, ie. can do insets with a border versus scaling an image.
3044/// <br>
3045/// Field: maxHorizontalPixels Maximum number of horizontal source pixels (horizontalScaled).
3046/// <br>
3047/// Field: maxVerticalPixels Maximum number of vertical source pixels (verticalScaled).
3048/// <br>
3049/// Field: __reservedC Set to zero.
3050///
3051/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplayscalerinformation?language=objc)
3052#[repr(C)]
3053#[derive(Clone, Copy, Debug, PartialEq)]
3054pub struct IODisplayScalerInformation {
3055 pub(crate) __reservedA: [u32; 1],
3056 pub version: u32,
3057 pub(crate) __reservedB: [u32; 2],
3058 pub scalerFeatures: IOOptionBits,
3059 pub maxHorizontalPixels: u32,
3060 pub maxVerticalPixels: u32,
3061 pub(crate) __reservedC: [u32; 5],
3062}
3063
3064#[cfg(feature = "objc2")]
3065unsafe impl Encode for IODisplayScalerInformation {
3066 const ENCODING: Encoding = Encoding::Struct(
3067 "IODisplayScalerInformation",
3068 &[
3069 <[u32; 1]>::ENCODING,
3070 <u32>::ENCODING,
3071 <[u32; 2]>::ENCODING,
3072 <IOOptionBits>::ENCODING,
3073 <u32>::ENCODING,
3074 <u32>::ENCODING,
3075 <[u32; 5]>::ENCODING,
3076 ],
3077 );
3078}
3079
3080#[cfg(feature = "objc2")]
3081unsafe impl RefEncode for IODisplayScalerInformation {
3082 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3083}
3084
3085/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalestretchonly?language=objc)
3086pub const kIOScaleStretchOnly: c_uint = 0x00000001;
3087/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanupsamplepixels?language=objc)
3088pub const kIOScaleCanUpSamplePixels: c_uint = 0x00000002;
3089/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecandownsamplepixels?language=objc)
3090pub const kIOScaleCanDownSamplePixels: c_uint = 0x00000004;
3091/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanscaleinterlaced?language=objc)
3092pub const kIOScaleCanScaleInterlaced: c_uint = 0x00000008;
3093/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecansupportinset?language=objc)
3094pub const kIOScaleCanSupportInset: c_uint = 0x00000010;
3095/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanrotate?language=objc)
3096pub const kIOScaleCanRotate: c_uint = 0x00000020;
3097/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanborderinsetonly?language=objc)
3098pub const kIOScaleCanBorderInsetOnly: c_uint = 0x00000040;
3099
3100/// [Apple's documentation](https://developer.apple.com/documentation/iokit/korconnections?language=objc)
3101pub const kOrConnections: c_uint = 0xffffffe;
3102/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kandconnections?language=objc)
3103pub const kAndConnections: c_uint = 0xffffffd;
3104
3105/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionflags?language=objc)
3106pub const kConnectionFlags: c_uint = 0x666c6773;
3107/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsyncenable?language=objc)
3108pub const kConnectionSyncEnable: c_uint = 0x73796e63;
3109/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsyncflags?language=objc)
3110pub const kConnectionSyncFlags: c_uint = 0x73796366;
3111/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsupportsapplesense?language=objc)
3112pub const kConnectionSupportsAppleSense: c_uint = 0x61736e73;
3113/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsupportsllddcsense?language=objc)
3114pub const kConnectionSupportsLLDDCSense: c_uint = 0x6c646463;
3115/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsupportshlddcsense?language=objc)
3116pub const kConnectionSupportsHLDDCSense: c_uint = 0x68646463;
3117/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionenable?language=objc)
3118pub const kConnectionEnable: c_uint = 0x656e6162;
3119/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncheckenable?language=objc)
3120pub const kConnectionCheckEnable: c_uint = 0x63656e61;
3121/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionprobe?language=objc)
3122pub const kConnectionProbe: c_uint = 0x70726f62;
3123/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionignore?language=objc)
3124pub const kConnectionIgnore: c_uint = 0x00696772;
3125/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionchanged?language=objc)
3126pub const kConnectionChanged: c_uint = 0x63686e67;
3127/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionpower?language=objc)
3128pub const kConnectionPower: c_uint = 0x706f7772;
3129/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionpostwake?language=objc)
3130pub const kConnectionPostWake: c_uint = 0x7077616b;
3131/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiondisplayparametercount?language=objc)
3132pub const kConnectionDisplayParameterCount: c_uint = 0x70636e74;
3133/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiondisplayparameters?language=objc)
3134pub const kConnectionDisplayParameters: c_uint = 0x7061726d;
3135/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionoverscan?language=objc)
3136pub const kConnectionOverscan: c_uint = 0x6f73636e;
3137/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionvideobest?language=objc)
3138pub const kConnectionVideoBest: c_uint = 0x76627374;
3139/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionredgammascale?language=objc)
3140pub const kConnectionRedGammaScale: c_uint = 0x72677363;
3141/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiongreengammascale?language=objc)
3142pub const kConnectionGreenGammaScale: c_uint = 0x67677363;
3143/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionbluegammascale?language=objc)
3144pub const kConnectionBlueGammaScale: c_uint = 0x62677363;
3145/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiongammascale?language=objc)
3146pub const kConnectionGammaScale: c_uint = 0x67736320;
3147/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionflushparameters?language=objc)
3148pub const kConnectionFlushParameters: c_uint = 0x666c7573;
3149/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionvblmultiplier?language=objc)
3150pub const kConnectionVBLMultiplier: c_uint = 0x76626c6d;
3151/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionhandledisplayportevent?language=objc)
3152pub const kConnectionHandleDisplayPortEvent: c_uint = 0x64706972;
3153/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionpaneltimingdisable?language=objc)
3154pub const kConnectionPanelTimingDisable: c_uint = 0x706e6c74;
3155/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncolormode?language=objc)
3156pub const kConnectionColorMode: c_uint = 0x63797576;
3157/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncolormodessupported?language=objc)
3158pub const kConnectionColorModesSupported: c_uint = 0x636f6c72;
3159/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncolordepthssupported?language=objc)
3160pub const kConnectionColorDepthsSupported: c_uint = 0x20627063;
3161/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncontrollerdepthssupported?language=objc)
3162pub const kConnectionControllerDepthsSupported: c_uint = 0x00677264;
3163/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncontrollercolordepth?language=objc)
3164pub const kConnectionControllerColorDepth: c_uint = 0x00647064;
3165/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncontrollerdithercontrol?language=objc)
3166pub const kConnectionControllerDitherControl: c_uint = 0x00676463;
3167/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiondisplayflags?language=objc)
3168pub const kConnectionDisplayFlags: c_uint = 0x64666c67;
3169/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionenableaudio?language=objc)
3170pub const kConnectionEnableAudio: c_uint = 0x61756420;
3171/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionaudiostreaming?language=objc)
3172pub const kConnectionAudioStreaming: c_uint = 0x61756473;
3173/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionstartofframetime?language=objc)
3174pub const kConnectionStartOfFrameTime: c_uint = 0x736f6674;
3175
3176/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioconnectionbuiltin?language=objc)
3177pub const kIOConnectionBuiltIn: c_uint = 0x00000800;
3178/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioconnectionstereosync?language=objc)
3179pub const kIOConnectionStereoSync: c_uint = 0x00008000;
3180
3181/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohsyncdisable?language=objc)
3182pub const kIOHSyncDisable: c_uint = 0x00000001;
3183/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiovsyncdisable?language=objc)
3184pub const kIOVSyncDisable: c_uint = 0x00000002;
3185/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocsyncdisable?language=objc)
3186pub const kIOCSyncDisable: c_uint = 0x00000004;
3187/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kionoseparatesynccontrol?language=objc)
3188pub const kIONoSeparateSyncControl: c_uint = 0x00000040;
3189/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotristatesyncs?language=objc)
3190pub const kIOTriStateSyncs: c_uint = 0x00000080;
3191/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosynconblue?language=objc)
3192pub const kIOSyncOnBlue: c_uint = 0x00000008;
3193/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosyncongreen?language=objc)
3194pub const kIOSyncOnGreen: c_uint = 0x00000010;
3195/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosynconred?language=objc)
3196pub const kIOSyncOnRed: c_uint = 0x00000020;
3197
3198/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventstart?language=objc)
3199pub const kIODPEventStart: c_uint = 1;
3200/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventidle?language=objc)
3201pub const kIODPEventIdle: c_uint = 2;
3202/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventforceretrain?language=objc)
3203pub const kIODPEventForceRetrain: c_uint = 3;
3204/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventremotecontrolcommandpending?language=objc)
3205pub const kIODPEventRemoteControlCommandPending: c_uint = 256;
3206/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventautomatedtestrequest?language=objc)
3207pub const kIODPEventAutomatedTestRequest: c_uint = 257;
3208/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventcontentprotection?language=objc)
3209pub const kIODPEventContentProtection: c_uint = 258;
3210/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventmccs?language=objc)
3211pub const kIODPEventMCCS: c_uint = 259;
3212/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventsinkspecific?language=objc)
3213pub const kIODPEventSinkSpecific: c_uint = 260;
3214
3215/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycolormode?language=objc)
3216pub const kIODisplayColorMode: c_uint = kConnectionColorMode;
3217
3218/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbitsunknown?language=objc)
3219pub const kIODisplayRGBColorComponentBitsUnknown: c_uint = 0x00000000;
3220/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits6?language=objc)
3221pub const kIODisplayRGBColorComponentBits6: c_uint = 0x00000001;
3222/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits8?language=objc)
3223pub const kIODisplayRGBColorComponentBits8: c_uint = 0x00000002;
3224/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits10?language=objc)
3225pub const kIODisplayRGBColorComponentBits10: c_uint = 0x00000004;
3226/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits12?language=objc)
3227pub const kIODisplayRGBColorComponentBits12: c_uint = 0x00000008;
3228/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits14?language=objc)
3229pub const kIODisplayRGBColorComponentBits14: c_uint = 0x00000010;
3230/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits16?language=objc)
3231pub const kIODisplayRGBColorComponentBits16: c_uint = 0x00000020;
3232/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbitsunknown?language=objc)
3233pub const kIODisplayYCbCr444ColorComponentBitsUnknown: c_uint = 0x00000000;
3234/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits6?language=objc)
3235pub const kIODisplayYCbCr444ColorComponentBits6: c_uint = 0x00000100;
3236/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits8?language=objc)
3237pub const kIODisplayYCbCr444ColorComponentBits8: c_uint = 0x00000200;
3238/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits10?language=objc)
3239pub const kIODisplayYCbCr444ColorComponentBits10: c_uint = 0x00000400;
3240/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits12?language=objc)
3241pub const kIODisplayYCbCr444ColorComponentBits12: c_uint = 0x00000800;
3242/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits14?language=objc)
3243pub const kIODisplayYCbCr444ColorComponentBits14: c_uint = 0x00001000;
3244/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits16?language=objc)
3245pub const kIODisplayYCbCr444ColorComponentBits16: c_uint = 0x00002000;
3246/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbitsunknown?language=objc)
3247pub const kIODisplayYCbCr422ColorComponentBitsUnknown: c_uint = 0x00000000;
3248/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits6?language=objc)
3249pub const kIODisplayYCbCr422ColorComponentBits6: c_uint = 0x00010000;
3250/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits8?language=objc)
3251pub const kIODisplayYCbCr422ColorComponentBits8: c_uint = 0x00020000;
3252/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits10?language=objc)
3253pub const kIODisplayYCbCr422ColorComponentBits10: c_uint = 0x00040000;
3254/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits12?language=objc)
3255pub const kIODisplayYCbCr422ColorComponentBits12: c_uint = 0x00080000;
3256/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits14?language=objc)
3257pub const kIODisplayYCbCr422ColorComponentBits14: c_uint = 0x00100000;
3258/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits16?language=objc)
3259pub const kIODisplayYCbCr422ColorComponentBits16: c_uint = 0x00200000;
3260
3261/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherdisable?language=objc)
3262pub const kIODisplayDitherDisable: c_uint = 0x00000000;
3263/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherspatial?language=objc)
3264pub const kIODisplayDitherSpatial: c_uint = 0x00000001;
3265/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaydithertemporal?language=objc)
3266pub const kIODisplayDitherTemporal: c_uint = 0x00000002;
3267/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherframeratecontrol?language=objc)
3268pub const kIODisplayDitherFrameRateControl: c_uint = 0x00000004;
3269/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherdefault?language=objc)
3270pub const kIODisplayDitherDefault: c_uint = 0x00000080;
3271/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherall?language=objc)
3272pub const kIODisplayDitherAll: c_uint = 0x000000FF;
3273/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherrgbshift?language=objc)
3274pub const kIODisplayDitherRGBShift: c_uint = 0;
3275/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherycbcr444shift?language=objc)
3276pub const kIODisplayDitherYCbCr444Shift: c_uint = 8;
3277/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherycbcr422shift?language=objc)
3278pub const kIODisplayDitherYCbCr422Shift: c_uint = 16;
3279
3280/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayneedsceaunderscan?language=objc)
3281pub const kIODisplayNeedsCEAUnderscan: c_uint = 0x00000001;
3282
3283/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstateoff?language=objc)
3284pub const kIODisplayPowerStateOff: c_uint = 0;
3285/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstateminusable?language=objc)
3286pub const kIODisplayPowerStateMinUsable: c_uint = 1;
3287/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstateon?language=objc)
3288pub const kIODisplayPowerStateOn: c_uint = 2;
3289
3290/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbserverconnecttype?language=objc)
3291pub const kIOFBServerConnectType: c_uint = 0;
3292/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsharedconnecttype?language=objc)
3293pub const kIOFBSharedConnectType: c_uint = 1;
3294/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiogdiagnosegtracetype?language=objc)
3295pub const kIOGDiagnoseGTraceType: c_uint = 11452;
3296/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiogdiagnoseconnecttype?language=objc)
3297pub const kIOGDiagnoseConnectType: c_uint = 38744;
3298/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayassertionconnecttype?language=objc)
3299pub const kIODisplayAssertionConnectType: c_uint = 61074;
3300
3301/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbuserrequestprobe?language=objc)
3302pub const kIOFBUserRequestProbe: c_uint = 0x00000001;
3303
3304/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iogpoint?language=objc)
3305#[repr(C)]
3306#[derive(Clone, Copy, Debug, PartialEq)]
3307pub struct IOGPoint {
3308 pub x: i16,
3309 pub y: i16,
3310}
3311
3312#[cfg(feature = "objc2")]
3313unsafe impl Encode for IOGPoint {
3314 const ENCODING: Encoding = Encoding::Struct("IOGPoint", &[<i16>::ENCODING, <i16>::ENCODING]);
3315}
3316
3317#[cfg(feature = "objc2")]
3318unsafe impl RefEncode for IOGPoint {
3319 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3320}
3321
3322/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iogsize?language=objc)
3323#[repr(C)]
3324#[derive(Clone, Copy, Debug, PartialEq)]
3325pub struct IOGSize {
3326 pub width: i16,
3327 pub height: i16,
3328}
3329
3330#[cfg(feature = "objc2")]
3331unsafe impl Encode for IOGSize {
3332 const ENCODING: Encoding = Encoding::Struct("IOGSize", &[<i16>::ENCODING, <i16>::ENCODING]);
3333}
3334
3335#[cfg(feature = "objc2")]
3336unsafe impl RefEncode for IOGSize {
3337 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3338}
3339
3340/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iogbounds?language=objc)
3341#[repr(C)]
3342#[derive(Clone, Copy, Debug, PartialEq)]
3343pub struct IOGBounds {
3344 pub minx: i16,
3345 pub maxx: i16,
3346 pub miny: i16,
3347 pub maxy: i16,
3348}
3349
3350#[cfg(feature = "objc2")]
3351unsafe impl Encode for IOGBounds {
3352 const ENCODING: Encoding = Encoding::Struct(
3353 "IOGBounds",
3354 &[
3355 <i16>::ENCODING,
3356 <i16>::ENCODING,
3357 <i16>::ENCODING,
3358 <i16>::ENCODING,
3359 ],
3360 );
3361}
3362
3363#[cfg(feature = "objc2")]
3364unsafe impl RefEncode for IOGBounds {
3365 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3366}
3367
3368/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ktransparentencoding?language=objc)
3369pub const kTransparentEncoding: c_uint = 0;
3370/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kinvertingencoding?language=objc)
3371pub const kInvertingEncoding: c_uint = 1;
3372
3373/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ktransparentencodingshift?language=objc)
3374pub const kTransparentEncodingShift: c_uint = kTransparentEncoding << 1;
3375/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ktransparentencodedpixel?language=objc)
3376pub const kTransparentEncodedPixel: c_uint = 0x01 << kTransparentEncodingShift;
3377/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kinvertingencodingshift?language=objc)
3378pub const kInvertingEncodingShift: c_uint = kInvertingEncoding << 1;
3379/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kinvertingencodedpixel?language=objc)
3380pub const kInvertingEncodedPixel: c_uint = 0x01 << kInvertingEncodingShift;
3381
3382/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursordescriptormajorversion?language=objc)
3383pub const kHardwareCursorDescriptorMajorVersion: c_uint = 0x0001;
3384/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursordescriptorminorversion?language=objc)
3385pub const kHardwareCursorDescriptorMinorVersion: c_uint = 0x0000;
3386
3387/// A structure defining the format of a hardware cursor.
3388///
3389/// This structure is used by IOFramebuffer to define the format of a hardware cursor.
3390/// Field: majorVersion Set to kHardwareCursorDescriptorMajorVersion.
3391/// Field: minorVersion Set to kHardwareCursorDescriptorMinorVersion.
3392/// Field: height Maximum size of the cursor.
3393/// Field: width Maximum size of the cursor.
3394/// Field: bitDepth Number bits per pixel, or a QD/QT pixel type, for example kIO8IndexedPixelFormat, kIO32ARGBPixelFormat.
3395/// Field: maskBitDepth Unused.
3396/// Field: numColors Number of colors for indexed pixel types.
3397/// Field: colorEncodings An array pointer specifying the pixel values corresponding to the indices into the color table, for indexed pixel types.
3398/// Field: flags None defined, set to zero.
3399/// Field: supportedSpecialEncodings Mask of supported special pixel values, eg. kTransparentEncodedPixel, kInvertingEncodedPixel.
3400/// Field: specialEncodings Array of pixel values for each supported special encoding.
3401///
3402/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iohardwarecursordescriptor?language=objc)
3403#[repr(C)]
3404#[derive(Clone, Copy, Debug, PartialEq)]
3405pub struct IOHardwareCursorDescriptor {
3406 pub majorVersion: u16,
3407 pub minorVersion: u16,
3408 pub height: u32,
3409 pub width: u32,
3410 pub bitDepth: u32,
3411 pub maskBitDepth: u32,
3412 pub numColors: u32,
3413 pub colorEncodings: *mut u32,
3414 pub flags: u32,
3415 pub supportedSpecialEncodings: u32,
3416 pub specialEncodings: [u32; 16],
3417}
3418
3419#[cfg(feature = "objc2")]
3420unsafe impl Encode for IOHardwareCursorDescriptor {
3421 const ENCODING: Encoding = Encoding::Struct(
3422 "IOHardwareCursorDescriptor",
3423 &[
3424 <u16>::ENCODING,
3425 <u16>::ENCODING,
3426 <u32>::ENCODING,
3427 <u32>::ENCODING,
3428 <u32>::ENCODING,
3429 <u32>::ENCODING,
3430 <u32>::ENCODING,
3431 <*mut u32>::ENCODING,
3432 <u32>::ENCODING,
3433 <u32>::ENCODING,
3434 <[u32; 16]>::ENCODING,
3435 ],
3436 );
3437}
3438
3439#[cfg(feature = "objc2")]
3440unsafe impl RefEncode for IOHardwareCursorDescriptor {
3441 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3442}
3443
3444/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursorinfomajorversion?language=objc)
3445pub const kHardwareCursorInfoMajorVersion: c_uint = 0x0001;
3446/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursorinfominorversion?language=objc)
3447pub const kHardwareCursorInfoMinorVersion: c_uint = 0x0000;
3448
3449/// A structure defining the converted data of a hardware cursor.
3450///
3451/// This structure is used by IOFramebuffer to return the data of a hardware cursor by convertCursorImage() after conversion based on the IOHardwareCursorDescriptor passed to that routine.
3452/// Field: majorVersion Set to kHardwareCursorInfoMajorVersion.
3453/// Field: minorVersion Set to kHardwareCursorInfoMinorVersion.
3454/// Field: cursorHeight The actual size of the cursor is returned.
3455/// Field: cursorWidth The actual size of the cursor is returned.
3456/// Field: colorMap Pointer to array of IOColorEntry structures, with the number of elements set by the numColors field of the IOHardwareCursorDescriptor. Zero should be passed for direct pixel formats.
3457/// Field: hardwareCursorData Buffer to receive the converted cursor data.
3458/// Field: cursorHotSpotX Cursor's hotspot.
3459/// Field: cursorHotSpotY Cursor's hotspot.
3460/// Field: reserved Reserved, set to zero.
3461///
3462/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iohardwarecursorinfo?language=objc)
3463#[repr(C)]
3464#[derive(Clone, Copy, Debug, PartialEq)]
3465pub struct IOHardwareCursorInfo {
3466 pub majorVersion: u16,
3467 pub minorVersion: u16,
3468 pub cursorHeight: u32,
3469 pub cursorWidth: u32,
3470 pub colorMap: *mut IOColorEntry,
3471 pub hardwareCursorData: *mut u8,
3472 pub cursorHotSpotX: u16,
3473 pub cursorHotSpotY: u16,
3474 pub reserved: [u32; 5],
3475}
3476
3477#[cfg(feature = "objc2")]
3478unsafe impl Encode for IOHardwareCursorInfo {
3479 const ENCODING: Encoding = Encoding::Struct(
3480 "IOHardwareCursorInfo",
3481 &[
3482 <u16>::ENCODING,
3483 <u16>::ENCODING,
3484 <u32>::ENCODING,
3485 <u32>::ENCODING,
3486 <*mut IOColorEntry>::ENCODING,
3487 <*mut u8>::ENCODING,
3488 <u16>::ENCODING,
3489 <u16>::ENCODING,
3490 <[u32; 5]>::ENCODING,
3491 ],
3492 );
3493}
3494
3495#[cfg(feature = "objc2")]
3496unsafe impl RefEncode for IOHardwareCursorInfo {
3497 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3498}
3499
3500/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbvblinterrupttype?language=objc)
3501pub const kIOFBVBLInterruptType: c_uint = 0x76626c20;
3502/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhblinterrupttype?language=objc)
3503pub const kIOFBHBLInterruptType: c_uint = 0x68626c20;
3504/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbframeinterrupttype?language=objc)
3505pub const kIOFBFrameInterruptType: c_uint = 0x6672616d;
3506/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbconnectinterrupttype?language=objc)
3507pub const kIOFBConnectInterruptType: c_uint = 0x64636920;
3508/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbchangedinterrupttype?language=objc)
3509pub const kIOFBChangedInterruptType: c_uint = 0x63686e67;
3510/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbofflineinterrupttype?language=objc)
3511pub const kIOFBOfflineInterruptType: c_uint = 0x72656d76;
3512/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbonlineinterrupttype?language=objc)
3513pub const kIOFBOnlineInterruptType: c_uint = 0x61646420;
3514/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayportinterrupttype?language=objc)
3515pub const kIOFBDisplayPortInterruptType: c_uint = 0x64706972;
3516/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayportlinkchangeinterrupttype?language=objc)
3517pub const kIOFBDisplayPortLinkChangeInterruptType: c_uint = 0x64706c6b;
3518/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmccsinterrupttype?language=objc)
3519pub const kIOFBMCCSInterruptType: c_uint = 0x6d636373;
3520/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbwakeinterrupttype?language=objc)
3521pub const kIOFBWakeInterruptType: c_uint = 0x7677616b;
3522
3523/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidinvalid?language=objc)
3524pub const kIOTimingIDInvalid: c_uint = 0;
3525/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_fixedratelcd?language=objc)
3526pub const kIOTimingIDApple_FixedRateLCD: c_uint = 42;
3527/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_512x384_60hz?language=objc)
3528pub const kIOTimingIDApple_512x384_60hz: c_uint = 130;
3529/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_560x384_60hz?language=objc)
3530pub const kIOTimingIDApple_560x384_60hz: c_uint = 135;
3531/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x480_67hz?language=objc)
3532pub const kIOTimingIDApple_640x480_67hz: c_uint = 140;
3533/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x400_67hz?language=objc)
3534pub const kIOTimingIDApple_640x400_67hz: c_uint = 145;
3535/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_60hz?language=objc)
3536pub const kIOTimingIDVESA_640x480_60hz: c_uint = 150;
3537/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_72hz?language=objc)
3538pub const kIOTimingIDVESA_640x480_72hz: c_uint = 152;
3539/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_75hz?language=objc)
3540pub const kIOTimingIDVESA_640x480_75hz: c_uint = 154;
3541/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_85hz?language=objc)
3542pub const kIOTimingIDVESA_640x480_85hz: c_uint = 158;
3543/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidgtf_640x480_120hz?language=objc)
3544pub const kIOTimingIDGTF_640x480_120hz: c_uint = 159;
3545/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x870_75hz?language=objc)
3546pub const kIOTimingIDApple_640x870_75hz: c_uint = 160;
3547/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x818_75hz?language=objc)
3548pub const kIOTimingIDApple_640x818_75hz: c_uint = 165;
3549/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_832x624_75hz?language=objc)
3550pub const kIOTimingIDApple_832x624_75hz: c_uint = 170;
3551/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_56hz?language=objc)
3552pub const kIOTimingIDVESA_800x600_56hz: c_uint = 180;
3553/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_60hz?language=objc)
3554pub const kIOTimingIDVESA_800x600_60hz: c_uint = 182;
3555/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_72hz?language=objc)
3556pub const kIOTimingIDVESA_800x600_72hz: c_uint = 184;
3557/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_75hz?language=objc)
3558pub const kIOTimingIDVESA_800x600_75hz: c_uint = 186;
3559/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_85hz?language=objc)
3560pub const kIOTimingIDVESA_800x600_85hz: c_uint = 188;
3561/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_60hz?language=objc)
3562pub const kIOTimingIDVESA_1024x768_60hz: c_uint = 190;
3563/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_70hz?language=objc)
3564pub const kIOTimingIDVESA_1024x768_70hz: c_uint = 200;
3565/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_75hz?language=objc)
3566pub const kIOTimingIDVESA_1024x768_75hz: c_uint = 204;
3567/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_85hz?language=objc)
3568pub const kIOTimingIDVESA_1024x768_85hz: c_uint = 208;
3569/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_1024x768_75hz?language=objc)
3570pub const kIOTimingIDApple_1024x768_75hz: c_uint = 210;
3571/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1152x864_75hz?language=objc)
3572pub const kIOTimingIDVESA_1152x864_75hz: c_uint = 215;
3573/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_1152x870_75hz?language=objc)
3574pub const kIOTimingIDApple_1152x870_75hz: c_uint = 220;
3575/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_st?language=objc)
3576pub const kIOTimingIDAppleNTSC_ST: c_uint = 230;
3577/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_ff?language=objc)
3578pub const kIOTimingIDAppleNTSC_FF: c_uint = 232;
3579/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_stconv?language=objc)
3580pub const kIOTimingIDAppleNTSC_STconv: c_uint = 234;
3581/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_ffconv?language=objc)
3582pub const kIOTimingIDAppleNTSC_FFconv: c_uint = 236;
3583/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_st?language=objc)
3584pub const kIOTimingIDApplePAL_ST: c_uint = 238;
3585/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_ff?language=objc)
3586pub const kIOTimingIDApplePAL_FF: c_uint = 240;
3587/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_stconv?language=objc)
3588pub const kIOTimingIDApplePAL_STconv: c_uint = 242;
3589/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_ffconv?language=objc)
3590pub const kIOTimingIDApplePAL_FFconv: c_uint = 244;
3591/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x960_75hz?language=objc)
3592pub const kIOTimingIDVESA_1280x960_75hz: c_uint = 250;
3593/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x960_60hz?language=objc)
3594pub const kIOTimingIDVESA_1280x960_60hz: c_uint = 252;
3595/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x960_85hz?language=objc)
3596pub const kIOTimingIDVESA_1280x960_85hz: c_uint = 254;
3597/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x1024_60hz?language=objc)
3598pub const kIOTimingIDVESA_1280x1024_60hz: c_uint = 260;
3599/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x1024_75hz?language=objc)
3600pub const kIOTimingIDVESA_1280x1024_75hz: c_uint = 262;
3601/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x1024_85hz?language=objc)
3602pub const kIOTimingIDVESA_1280x1024_85hz: c_uint = 268;
3603/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_60hz?language=objc)
3604pub const kIOTimingIDVESA_1600x1200_60hz: c_uint = 280;
3605/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_65hz?language=objc)
3606pub const kIOTimingIDVESA_1600x1200_65hz: c_uint = 282;
3607/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_70hz?language=objc)
3608pub const kIOTimingIDVESA_1600x1200_70hz: c_uint = 284;
3609/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_75hz?language=objc)
3610pub const kIOTimingIDVESA_1600x1200_75hz: c_uint = 286;
3611/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_80hz?language=objc)
3612pub const kIOTimingIDVESA_1600x1200_80hz: c_uint = 288;
3613/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_85hz?language=objc)
3614pub const kIOTimingIDVESA_1600x1200_85hz: c_uint = 289;
3615/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1792x1344_60hz?language=objc)
3616pub const kIOTimingIDVESA_1792x1344_60hz: c_uint = 296;
3617/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1792x1344_75hz?language=objc)
3618pub const kIOTimingIDVESA_1792x1344_75hz: c_uint = 298;
3619/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1856x1392_60hz?language=objc)
3620pub const kIOTimingIDVESA_1856x1392_60hz: c_uint = 300;
3621/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1856x1392_75hz?language=objc)
3622pub const kIOTimingIDVESA_1856x1392_75hz: c_uint = 302;
3623/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1920x1440_60hz?language=objc)
3624pub const kIOTimingIDVESA_1920x1440_60hz: c_uint = 304;
3625/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1920x1440_75hz?language=objc)
3626pub const kIOTimingIDVESA_1920x1440_75hz: c_uint = 306;
3627/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsmpte240m_60hz?language=objc)
3628pub const kIOTimingIDSMPTE240M_60hz: c_uint = 400;
3629/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidfilmrate_48hz?language=objc)
3630pub const kIOTimingIDFilmRate_48hz: c_uint = 410;
3631/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1600x1024_76hz?language=objc)
3632pub const kIOTimingIDSony_1600x1024_76hz: c_uint = 500;
3633/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1920x1080_60hz?language=objc)
3634pub const kIOTimingIDSony_1920x1080_60hz: c_uint = 510;
3635/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1920x1080_72hz?language=objc)
3636pub const kIOTimingIDSony_1920x1080_72hz: c_uint = 520;
3637/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1920x1200_76hz?language=objc)
3638pub const kIOTimingIDSony_1920x1200_76hz: c_uint = 540;
3639/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_0x0_0hz_offline?language=objc)
3640pub const kIOTimingIDApple_0x0_0hz_Offline: c_uint = 550;
3641/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_848x480_60hz?language=objc)
3642pub const kIOTimingIDVESA_848x480_60hz: c_uint = 570;
3643/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1360x768_60hz?language=objc)
3644pub const kIOTimingIDVESA_1360x768_60hz: c_uint = 590;
3645
3646/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernatepreviewactive?language=objc)
3647pub const kIOHibernatePreviewActive: c_uint = 0x00000001;
3648/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernatepreviewupdates?language=objc)
3649pub const kIOHibernatePreviewUpdates: c_uint = 0x00000002;
3650
3651/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypeunknown?language=objc)
3652pub const kIOFBAVSignalTypeUnknown: c_uint = 0x00000000;
3653/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypevga?language=objc)
3654pub const kIOFBAVSignalTypeVGA: c_uint = 0x00000001;
3655/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypedvi?language=objc)
3656pub const kIOFBAVSignalTypeDVI: c_uint = 0x00000002;
3657/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypehdmi?language=objc)
3658pub const kIOFBAVSignalTypeHDMI: c_uint = 0x00000008;
3659/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypedp?language=objc)
3660pub const kIOFBAVSignalTypeDP: c_uint = 0x00000010;
3661
3662/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbdplinkconfig?language=objc)
3663#[repr(C)]
3664#[derive(Clone, Copy, Debug, PartialEq)]
3665pub struct IOFBDPLinkConfig {
3666 pub version: u16,
3667 pub bitRate: u8,
3668 pub(crate) __reservedA: [u8; 1],
3669 pub t1Time: u16,
3670 pub t2Time: u16,
3671 pub t3Time: u16,
3672 pub idlePatterns: u8,
3673 pub laneCount: u8,
3674 pub voltage: u8,
3675 pub preEmphasis: u8,
3676 pub downspread: u8,
3677 pub scrambler: u8,
3678 pub maxBitRate: u8,
3679 pub maxLaneCount: u8,
3680 pub maxDownspread: u8,
3681 pub(crate) __reservedB: [u8; 9],
3682}
3683
3684#[cfg(feature = "objc2")]
3685unsafe impl Encode for IOFBDPLinkConfig {
3686 const ENCODING: Encoding = Encoding::Struct(
3687 "IOFBDPLinkConfig",
3688 &[
3689 <u16>::ENCODING,
3690 <u8>::ENCODING,
3691 <[u8; 1]>::ENCODING,
3692 <u16>::ENCODING,
3693 <u16>::ENCODING,
3694 <u16>::ENCODING,
3695 <u8>::ENCODING,
3696 <u8>::ENCODING,
3697 <u8>::ENCODING,
3698 <u8>::ENCODING,
3699 <u8>::ENCODING,
3700 <u8>::ENCODING,
3701 <u8>::ENCODING,
3702 <u8>::ENCODING,
3703 <u8>::ENCODING,
3704 <[u8; 9]>::ENCODING,
3705 ],
3706 );
3707}
3708
3709#[cfg(feature = "objc2")]
3710unsafe impl RefEncode for IOFBDPLinkConfig {
3711 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3712}
3713
3714/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitraterbr?language=objc)
3715pub const kIOFBBitRateRBR: c_uint = 0x06;
3716/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitratehbr?language=objc)
3717pub const kIOFBBitRateHBR: c_uint = 0x0A;
3718/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitratehbr2?language=objc)
3719pub const kIOFBBitRateHBR2: c_uint = 0x14;
3720
3721/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel0?language=objc)
3722pub const kIOFBLinkVoltageLevel0: c_uint = 0x00;
3723/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel1?language=objc)
3724pub const kIOFBLinkVoltageLevel1: c_uint = 0x01;
3725/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel2?language=objc)
3726pub const kIOFBLinkVoltageLevel2: c_uint = 0x02;
3727/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel3?language=objc)
3728pub const kIOFBLinkVoltageLevel3: c_uint = 0x03;
3729
3730/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel0?language=objc)
3731pub const kIOFBLinkPreEmphasisLevel0: c_uint = 0x00;
3732/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel1?language=objc)
3733pub const kIOFBLinkPreEmphasisLevel1: c_uint = 0x01;
3734/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel2?language=objc)
3735pub const kIOFBLinkPreEmphasisLevel2: c_uint = 0x02;
3736/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel3?language=objc)
3737pub const kIOFBLinkPreEmphasisLevel3: c_uint = 0x03;
3738
3739/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkdownspreadnone?language=objc)
3740pub const kIOFBLinkDownspreadNone: c_uint = 0x0;
3741/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkdownspreadmax?language=objc)
3742pub const kIOFBLinkDownspreadMax: c_uint = 0x1;
3743
3744/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkscramblernormal?language=objc)
3745pub const kIOFBLinkScramblerNormal: c_uint = 0x0;
3746/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkscrambleralternate?language=objc)
3747pub const kIOFBLinkScramblerAlternate: c_uint = 0x1;
3748
3749/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayvendoridunknown?language=objc)
3750pub const kDisplayVendorIDUnknown: c_uint = 0x756e6b6e;
3751/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayproductidgeneric?language=objc)
3752pub const kDisplayProductIDGeneric: c_uint = 0x717;
3753
3754/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutundefined?language=objc)
3755pub const kDisplaySubPixelLayoutUndefined: c_uint = 0x00000000;
3756/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutrgb?language=objc)
3757pub const kDisplaySubPixelLayoutRGB: c_uint = 0x00000001;
3758/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutbgr?language=objc)
3759pub const kDisplaySubPixelLayoutBGR: c_uint = 0x00000002;
3760/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutquadgbl?language=objc)
3761pub const kDisplaySubPixelLayoutQuadGBL: c_uint = 0x00000003;
3762/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutquadgbr?language=objc)
3763pub const kDisplaySubPixelLayoutQuadGBR: c_uint = 0x00000004;
3764/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationundefined?language=objc)
3765pub const kDisplaySubPixelConfigurationUndefined: c_uint = 0x00000000;
3766/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationdelta?language=objc)
3767pub const kDisplaySubPixelConfigurationDelta: c_uint = 0x00000001;
3768/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationstripe?language=objc)
3769pub const kDisplaySubPixelConfigurationStripe: c_uint = 0x00000002;
3770/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationstripeoffset?language=objc)
3771pub const kDisplaySubPixelConfigurationStripeOffset: c_uint = 0x00000003;
3772/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationquad?language=objc)
3773pub const kDisplaySubPixelConfigurationQuad: c_uint = 0x00000004;
3774/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapeundefined?language=objc)
3775pub const kDisplaySubPixelShapeUndefined: c_uint = 0x00000000;
3776/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshaperound?language=objc)
3777pub const kDisplaySubPixelShapeRound: c_uint = 0x00000001;
3778/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapesquare?language=objc)
3779pub const kDisplaySubPixelShapeSquare: c_uint = 0x00000002;
3780/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshaperectangular?language=objc)
3781pub const kDisplaySubPixelShapeRectangular: c_uint = 0x00000003;
3782/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapeoval?language=objc)
3783pub const kDisplaySubPixelShapeOval: c_uint = 0x00000004;
3784/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapeelliptical?language=objc)
3785pub const kDisplaySubPixelShapeElliptical: c_uint = 0x00000005;
3786
3787/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbnumcursorframes?language=objc)
3788pub const kIOFBNumCursorFrames: c_uint = 4;
3789/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbnumcursorframesshift?language=objc)
3790pub const kIOFBNumCursorFramesShift: c_uint = 2;
3791/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmaxcursordepth?language=objc)
3792pub const kIOFBMaxCursorDepth: c_uint = 32;
3793/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmaxcursorwidth?language=objc)
3794pub const kIOFBMaxCursorWidth: c_uint = 256;
3795/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmaxcursorframes?language=objc)
3796pub const kIOFBMaxCursorFrames: c_uint = 32;
3797
3798/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursorimagenew?language=objc)
3799pub const kIOFBCursorImageNew: c_uint = 0x01;
3800/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursorhwcapable?language=objc)
3801pub const kIOFBCursorHWCapable: c_uint = 0x02;
3802
3803/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhardwarecursoractive?language=objc)
3804pub const kIOFBHardwareCursorActive: c_uint = 0x01;
3805/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhardwarecursorinvram?language=objc)
3806pub const kIOFBHardwareCursorInVRAM: c_uint = 0x02;
3807
3808/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbshmemversionmask?language=objc)
3809pub const kIOFBShmemVersionMask: c_uint = 0x000000ff;
3810/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbtenptoneshmemversion?language=objc)
3811pub const kIOFBTenPtOneShmemVersion: c_uint = 2;
3812/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbtenpttwoshmemversion?language=objc)
3813pub const kIOFBTenPtTwoShmemVersion: c_uint = 3;
3814/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcurrentshmemversion?language=objc)
3815pub const kIOFBCurrentShmemVersion: c_uint = 2;
3816/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbshmemcursornumframesmask?language=objc)
3817pub const kIOFBShmemCursorNumFramesMask: c_uint = 0x00ff0000;
3818/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbshmemcursornumframesshift?language=objc)
3819pub const kIOFBShmemCursorNumFramesShift: c_uint = 16;
3820/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursormemory?language=objc)
3821pub const kIOFBCursorMemory: c_uint = 100;
3822
3823extern "C-unwind" {
3824 /// IOGraphicsLib
3825 /// IOGraphicsLib implements non-kernel task access to IOGraphics family object types - IOFramebuffer and IOAccelerator. These functions implement a graphics family specific API.
3826 /// <br>
3827 /// A connection to a graphics IOService must be made before these functions are called. A connection is made with the IOServiceOpen() function described in IOKitLib.h. An io_connect_t handle is returned by IOServiceOpen(), which must be passed to the IOGraphicsLib functions. The appropriate connection type from IOGraphicsTypes.h must be specified in the call to IOServiceOpen(). All of the IOFramebuffer functions can only be called from a kIOFBServerConnectType connection. Except as specified below, functions whose names begin with IOFB are IOFramebuffer functions. Functions whose names begin with IOPS are IOAccelerator functions and must be called from connections of type kIOFBEngineControllerConnectType or kIOFBEngineConnectType.
3828 /// <br>
3829 /// The functions in IOGraphicsLib use a number of special types. The display mode is the screen's resolution and refresh rate. The known display modes are referred to by an index of type IODisplayModeID. The display depth is the number of significant color bits used in representing each pixel. Depths are also referred to by an index value that is 0 for 8 bits, 1 for 15 bits, and 2 for 24 bits. A combination of display mode and depth may have a number of supported pixel formats. The pixel aperture is an index of supported pixel formats for a display mode and depth. This index is of type IOPixelAperture. All of these graphics specific types are defined in IOGraphicsTypes.h.
3830 ///
3831 /// # Safety
3832 ///
3833 /// `connect` must be a valid pointer.
3834 #[cfg(feature = "libc")]
3835 pub fn IOFramebufferOpen(
3836 service: io_service_t,
3837 owning_task: task_port_t,
3838 r#type: c_uint,
3839 connect: *mut io_connect_t,
3840 ) -> libc::kern_return_t;
3841}
3842
3843/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymatchinginfo?language=objc)
3844pub const kIODisplayMatchingInfo: c_uint = 0x00000100;
3845/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayonlypreferredname?language=objc)
3846pub const kIODisplayOnlyPreferredName: c_uint = 0x00000200;
3847/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaynoproductname?language=objc)
3848pub const kIODisplayNoProductName: c_uint = 0x00000400;
3849
3850/// Create a CFDictionary with information about display hardware.
3851///
3852/// The CFDictionary created by this function contains information about the display hardware associated with a framebuffer. The keys for the dictionary are listed in IOGraphicsTypes.h.
3853///
3854/// Parameter `framebuffer`: The IOService handle for an IOFramebuffer service.
3855///
3856/// Parameter `options`: Use IODisplayDictionaryOptions to specify which keys to include.
3857///
3858/// Returns: The returned CFDictionary that should be released by the caller with CFRelease().
3859#[cfg(feature = "libc")]
3860#[inline]
3861pub extern "C-unwind" fn IODisplayCreateInfoDictionary(
3862 framebuffer: io_service_t,
3863 options: IOOptionBits,
3864) -> Option<CFRetained<CFDictionary>> {
3865 extern "C-unwind" {
3866 fn IODisplayCreateInfoDictionary(
3867 framebuffer: io_service_t,
3868 options: IOOptionBits,
3869 ) -> Option<NonNull<CFDictionary>>;
3870 }
3871 let ret = unsafe { IODisplayCreateInfoDictionary(framebuffer, options) };
3872 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
3873}
3874
3875extern "C-unwind" {
3876 /// Match two display information dictionaries to see if they are for the same display.
3877 ///
3878 /// By comparing two CFDictionaries returned from IODisplayCreateInfoDictionary(), this function determines if the displays are the same. The information compared is what is returned by calling IODisplayCreateInfoDictionary() with an option of kIODisplayMatchingInfo. This includes information such as the vendor, product, and serial number.
3879 ///
3880 /// Parameter `matching1`: A CFDictionary returned from IODisplayCreateInfoDictionary().
3881 ///
3882 /// Parameter `matching2`: Another CFDictionary returned from IODisplayCreateInfoDictionary().
3883 ///
3884 /// Parameter `options`: No options are currently defined.
3885 ///
3886 /// Returns: Returns FALSE if the two displays are not equivalent or TRUE if they are.
3887 ///
3888 /// # Safety
3889 ///
3890 /// - `matching1` generics must be of the correct type.
3891 /// - `matching1` might not allow `None`.
3892 /// - `matching2` generics must be of the correct type.
3893 /// - `matching2` might not allow `None`.
3894 pub fn IODisplayMatchDictionaries(
3895 matching1: Option<&CFDictionary>,
3896 matching2: Option<&CFDictionary>,
3897 options: IOOptionBits,
3898 ) -> i32;
3899}
3900
3901#[cfg(feature = "libc")]
3902#[inline]
3903pub extern "C-unwind" fn IODisplayForFramebuffer(
3904 framebuffer: io_service_t,
3905 options: IOOptionBits,
3906) -> io_service_t {
3907 extern "C-unwind" {
3908 fn IODisplayForFramebuffer(
3909 framebuffer: io_service_t,
3910 options: IOOptionBits,
3911 ) -> io_service_t;
3912 }
3913 unsafe { IODisplayForFramebuffer(framebuffer, options) }
3914}
3915
3916extern "C-unwind" {
3917 /// # Safety
3918 ///
3919 /// - `params` generics must be of the correct type.
3920 /// - `params` might not allow `None`.
3921 #[cfg(feature = "libc")]
3922 pub fn IODisplaySetParameters(
3923 service: io_service_t,
3924 options: IOOptionBits,
3925 params: Option<&CFDictionary>,
3926 ) -> IOReturn;
3927}
3928
3929extern "C-unwind" {
3930 /// # Safety
3931 ///
3932 /// `parameter_name` might not allow `None`.
3933 #[cfg(feature = "libc")]
3934 pub fn IODisplaySetFloatParameter(
3935 service: io_service_t,
3936 options: IOOptionBits,
3937 parameter_name: Option<&CFString>,
3938 value: c_float,
3939 ) -> IOReturn;
3940}
3941
3942extern "C-unwind" {
3943 /// # Safety
3944 ///
3945 /// `parameter_name` might not allow `None`.
3946 #[cfg(feature = "libc")]
3947 pub fn IODisplaySetIntegerParameter(
3948 service: io_service_t,
3949 options: IOOptionBits,
3950 parameter_name: Option<&CFString>,
3951 value: i32,
3952 ) -> IOReturn;
3953}
3954
3955extern "C-unwind" {
3956 /// # Safety
3957 ///
3958 /// `params` must be a valid pointer.
3959 #[cfg(feature = "libc")]
3960 pub fn IODisplayCopyParameters(
3961 service: io_service_t,
3962 options: IOOptionBits,
3963 params: *mut *const CFDictionary,
3964 ) -> IOReturn;
3965}
3966
3967extern "C-unwind" {
3968 /// # Safety
3969 ///
3970 /// `params` must be a valid pointer.
3971 #[cfg(feature = "libc")]
3972 pub fn IODisplayCopyFloatParameters(
3973 service: io_service_t,
3974 options: IOOptionBits,
3975 params: *mut *const CFDictionary,
3976 ) -> IOReturn;
3977}
3978
3979extern "C-unwind" {
3980 /// # Safety
3981 ///
3982 /// - `parameter_name` might not allow `None`.
3983 /// - `value` must be a valid pointer.
3984 #[cfg(feature = "libc")]
3985 pub fn IODisplayGetFloatParameter(
3986 service: io_service_t,
3987 options: IOOptionBits,
3988 parameter_name: Option<&CFString>,
3989 value: *mut c_float,
3990 ) -> IOReturn;
3991}
3992
3993extern "C-unwind" {
3994 /// # Safety
3995 ///
3996 /// - `parameter_name` might not allow `None`.
3997 /// - `value` must be a valid pointer.
3998 /// - `min` must be a valid pointer.
3999 /// - `max` must be a valid pointer.
4000 #[cfg(feature = "libc")]
4001 pub fn IODisplayGetIntegerRangeParameter(
4002 service: io_service_t,
4003 options: IOOptionBits,
4004 parameter_name: Option<&CFString>,
4005 value: *mut i32,
4006 min: *mut i32,
4007 max: *mut i32,
4008 ) -> IOReturn;
4009}
4010
4011#[cfg(feature = "libc")]
4012#[inline]
4013pub extern "C-unwind" fn IODisplayCommitParameters(
4014 service: io_service_t,
4015 options: IOOptionBits,
4016) -> IOReturn {
4017 extern "C-unwind" {
4018 fn IODisplayCommitParameters(service: io_service_t, options: IOOptionBits) -> IOReturn;
4019 }
4020 unsafe { IODisplayCommitParameters(service, options) }
4021}