objc2_open_gl/generated/
CGLTypes.rs1use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6use objc2::__framework_prelude::*;
7
8use crate::*;
9
10pub const kCGLMonoscopicBit: c_uint = 0x00000001;
12pub const kCGLStereoscopicBit: c_uint = 0x00000002;
14pub const kCGLSingleBufferBit: c_uint = 0x00000004;
16pub const kCGLDoubleBufferBit: c_uint = 0x00000008;
18pub const kCGLTripleBufferBit: c_uint = 0x00000010;
20pub const kCGL0Bit: c_uint = 0x00000001;
22pub const kCGL1Bit: c_uint = 0x00000002;
24pub const kCGL2Bit: c_uint = 0x00000004;
26pub const kCGL3Bit: c_uint = 0x00000008;
28pub const kCGL4Bit: c_uint = 0x00000010;
30pub const kCGL5Bit: c_uint = 0x00000020;
32pub const kCGL6Bit: c_uint = 0x00000040;
34pub const kCGL8Bit: c_uint = 0x00000080;
36pub const kCGL10Bit: c_uint = 0x00000100;
38pub const kCGL12Bit: c_uint = 0x00000200;
40pub const kCGL16Bit: c_uint = 0x00000400;
42pub const kCGL24Bit: c_uint = 0x00000800;
44pub const kCGL32Bit: c_uint = 0x00001000;
46pub const kCGL48Bit: c_uint = 0x00002000;
48pub const kCGL64Bit: c_uint = 0x00004000;
50pub const kCGL96Bit: c_uint = 0x00008000;
52pub const kCGL128Bit: c_uint = 0x00010000;
54pub const kCGLRGB444Bit: c_uint = 0x00000040;
56pub const kCGLARGB4444Bit: c_uint = 0x00000080;
58pub const kCGLRGB444A8Bit: c_uint = 0x00000100;
60pub const kCGLRGB555Bit: c_uint = 0x00000200;
62pub const kCGLARGB1555Bit: c_uint = 0x00000400;
64pub const kCGLRGB555A8Bit: c_uint = 0x00000800;
66pub const kCGLRGB565Bit: c_uint = 0x00001000;
68pub const kCGLRGB565A8Bit: c_uint = 0x00002000;
70pub const kCGLRGB888Bit: c_uint = 0x00004000;
72pub const kCGLARGB8888Bit: c_uint = 0x00008000;
74pub const kCGLRGB888A8Bit: c_uint = 0x00010000;
76pub const kCGLRGB101010Bit: c_uint = 0x00020000;
78pub const kCGLARGB2101010Bit: c_uint = 0x00040000;
80pub const kCGLRGB101010_A8Bit: c_uint = 0x00080000;
82pub const kCGLRGB121212Bit: c_uint = 0x00100000;
84pub const kCGLARGB12121212Bit: c_uint = 0x00200000;
86pub const kCGLRGB161616Bit: c_uint = 0x00400000;
88pub const kCGLRGBA16161616Bit: c_uint = 0x00800000;
90pub const kCGLRGBFloat64Bit: c_uint = 0x01000000;
92pub const kCGLRGBAFloat64Bit: c_uint = 0x02000000;
94pub const kCGLRGBFloat128Bit: c_uint = 0x04000000;
96pub const kCGLRGBAFloat128Bit: c_uint = 0x08000000;
98pub const kCGLRGBFloat256Bit: c_uint = 0x10000000;
100pub const kCGLRGBAFloat256Bit: c_uint = 0x20000000;
102pub const kCGLSupersampleBit: c_uint = 0x00000001;
104pub const kCGLMultisampleBit: c_uint = 0x00000002;
106pub const kCGLARGB16161616Bit: c_uint = kCGLRGBA16161616Bit;
108pub type CGLContextObj = *mut _CGLContextObject;
110
111#[repr(C)]
113#[derive(Debug)]
114pub struct _CGLPixelFormatObject {
115 inner: [u8; 0],
116 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
117}
118
119unsafe impl RefEncode for _CGLPixelFormatObject {
120 const ENCODING_REF: Encoding =
121 Encoding::Pointer(&Encoding::Struct("_CGLPixelFormatObject", &[]));
122}
123
124pub type CGLPixelFormatObj = *mut _CGLPixelFormatObject;
126
127#[repr(C)]
129#[derive(Debug)]
130pub struct _CGLRendererInfoObject {
131 inner: [u8; 0],
132 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
133}
134
135unsafe impl RefEncode for _CGLRendererInfoObject {
136 const ENCODING_REF: Encoding =
137 Encoding::Pointer(&Encoding::Struct("_CGLRendererInfoObject", &[]));
138}
139
140pub type CGLRendererInfoObj = *mut _CGLRendererInfoObject;
142
143#[repr(C)]
145#[derive(Debug)]
146pub struct _CGLPBufferObject {
147 inner: [u8; 0],
148 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
149}
150
151unsafe impl RefEncode for _CGLPBufferObject {
152 const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("_CGLPBufferObject", &[]));
153}
154
155pub type CGLPBufferObj = *mut _CGLPBufferObject;
157
158#[repr(transparent)]
160#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
161pub struct CGLPixelFormatAttribute(pub c_uint);
162impl CGLPixelFormatAttribute {
163 #[doc(alias = "kCGLPFAAllRenderers")]
164 pub const CGLPFAAllRenderers: Self = Self(1);
165 #[doc(alias = "kCGLPFATripleBuffer")]
166 pub const CGLPFATripleBuffer: Self = Self(3);
167 #[doc(alias = "kCGLPFADoubleBuffer")]
168 pub const CGLPFADoubleBuffer: Self = Self(5);
169 #[doc(alias = "kCGLPFAColorSize")]
170 pub const CGLPFAColorSize: Self = Self(8);
171 #[doc(alias = "kCGLPFAAlphaSize")]
172 pub const CGLPFAAlphaSize: Self = Self(11);
173 #[doc(alias = "kCGLPFADepthSize")]
174 pub const CGLPFADepthSize: Self = Self(12);
175 #[doc(alias = "kCGLPFAStencilSize")]
176 pub const CGLPFAStencilSize: Self = Self(13);
177 #[doc(alias = "kCGLPFAMinimumPolicy")]
178 pub const CGLPFAMinimumPolicy: Self = Self(51);
179 #[doc(alias = "kCGLPFAMaximumPolicy")]
180 pub const CGLPFAMaximumPolicy: Self = Self(52);
181 #[doc(alias = "kCGLPFASampleBuffers")]
182 pub const CGLPFASampleBuffers: Self = Self(55);
183 #[doc(alias = "kCGLPFASamples")]
184 pub const CGLPFASamples: Self = Self(56);
185 #[doc(alias = "kCGLPFAColorFloat")]
186 pub const CGLPFAColorFloat: Self = Self(58);
187 #[doc(alias = "kCGLPFAMultisample")]
188 pub const CGLPFAMultisample: Self = Self(59);
189 #[doc(alias = "kCGLPFASupersample")]
190 pub const CGLPFASupersample: Self = Self(60);
191 #[doc(alias = "kCGLPFASampleAlpha")]
192 pub const CGLPFASampleAlpha: Self = Self(61);
193 #[doc(alias = "kCGLPFARendererID")]
194 pub const CGLPFARendererID: Self = Self(70);
195 #[doc(alias = "kCGLPFANoRecovery")]
196 pub const CGLPFANoRecovery: Self = Self(72);
197 #[doc(alias = "kCGLPFAAccelerated")]
198 pub const CGLPFAAccelerated: Self = Self(73);
199 #[doc(alias = "kCGLPFAClosestPolicy")]
200 pub const CGLPFAClosestPolicy: Self = Self(74);
201 #[doc(alias = "kCGLPFABackingStore")]
202 pub const CGLPFABackingStore: Self = Self(76);
203 #[doc(alias = "kCGLPFABackingVolatile")]
204 pub const CGLPFABackingVolatile: Self = Self(77);
205 #[doc(alias = "kCGLPFADisplayMask")]
206 pub const CGLPFADisplayMask: Self = Self(84);
207 #[doc(alias = "kCGLPFAAllowOfflineRenderers")]
208 pub const CGLPFAAllowOfflineRenderers: Self = Self(96);
209 #[doc(alias = "kCGLPFAAcceleratedCompute")]
210 pub const CGLPFAAcceleratedCompute: Self = Self(97);
211 #[doc(alias = "kCGLPFAOpenGLProfile")]
212 pub const CGLPFAOpenGLProfile: Self = Self(99);
213 #[doc(alias = "kCGLPFASupportsAutomaticGraphicsSwitching")]
214 pub const CGLPFASupportsAutomaticGraphicsSwitching: Self = Self(101);
215 #[doc(alias = "kCGLPFAVirtualScreenCount")]
216 pub const CGLPFAVirtualScreenCount: Self = Self(128);
217 #[doc(alias = "kCGLPFAAuxBuffers")]
218 pub const CGLPFAAuxBuffers: Self = Self(7);
219 #[doc(alias = "kCGLPFAAccumSize")]
220 pub const CGLPFAAccumSize: Self = Self(14);
221 #[doc(alias = "kCGLPFAAuxDepthStencil")]
222 pub const CGLPFAAuxDepthStencil: Self = Self(57);
223 #[doc(alias = "kCGLPFAStereo")]
224 pub const CGLPFAStereo: Self = Self(6);
225 #[doc(alias = "kCGLPFAOffScreen")]
226 pub const CGLPFAOffScreen: Self = Self(53);
227 #[doc(alias = "kCGLPFAWindow")]
228 pub const CGLPFAWindow: Self = Self(80);
229 #[doc(alias = "kCGLPFACompliant")]
230 pub const CGLPFACompliant: Self = Self(83);
231 #[doc(alias = "kCGLPFAPBuffer")]
232 pub const CGLPFAPBuffer: Self = Self(90);
233 #[doc(alias = "kCGLPFARemotePBuffer")]
234 pub const CGLPFARemotePBuffer: Self = Self(91);
235 #[doc(alias = "kCGLPFASingleRenderer")]
236 pub const CGLPFASingleRenderer: Self = Self(71);
237 #[doc(alias = "kCGLPFARobust")]
238 pub const CGLPFARobust: Self = Self(75);
239 #[doc(alias = "kCGLPFAMPSafe")]
240 pub const CGLPFAMPSafe: Self = Self(78);
241 #[doc(alias = "kCGLPFAMultiScreen")]
242 pub const CGLPFAMultiScreen: Self = Self(81);
243 #[doc(alias = "kCGLPFAFullScreen")]
244 pub const CGLPFAFullScreen: Self = Self(54);
245}
246
247unsafe impl Encode for CGLPixelFormatAttribute {
248 const ENCODING: Encoding = c_uint::ENCODING;
249}
250
251unsafe impl RefEncode for CGLPixelFormatAttribute {
252 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
253}
254
255#[repr(transparent)]
257#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
258pub struct CGLRendererProperty(pub c_uint);
259impl CGLRendererProperty {
260 #[doc(alias = "kCGLRPOffScreen")]
261 pub const CGLRPOffScreen: Self = Self(53);
262 #[doc(alias = "kCGLRPRendererID")]
263 pub const CGLRPRendererID: Self = Self(70);
264 #[doc(alias = "kCGLRPAccelerated")]
265 pub const CGLRPAccelerated: Self = Self(73);
266 #[doc(alias = "kCGLRPBackingStore")]
267 pub const CGLRPBackingStore: Self = Self(76);
268 #[doc(alias = "kCGLRPWindow")]
269 pub const CGLRPWindow: Self = Self(80);
270 #[doc(alias = "kCGLRPCompliant")]
271 pub const CGLRPCompliant: Self = Self(83);
272 #[doc(alias = "kCGLRPDisplayMask")]
273 pub const CGLRPDisplayMask: Self = Self(84);
274 #[doc(alias = "kCGLRPBufferModes")]
275 pub const CGLRPBufferModes: Self = Self(100);
276 #[doc(alias = "kCGLRPColorModes")]
277 pub const CGLRPColorModes: Self = Self(103);
278 #[doc(alias = "kCGLRPAccumModes")]
279 pub const CGLRPAccumModes: Self = Self(104);
280 #[doc(alias = "kCGLRPDepthModes")]
281 pub const CGLRPDepthModes: Self = Self(105);
282 #[doc(alias = "kCGLRPStencilModes")]
283 pub const CGLRPStencilModes: Self = Self(106);
284 #[doc(alias = "kCGLRPMaxAuxBuffers")]
285 pub const CGLRPMaxAuxBuffers: Self = Self(107);
286 #[doc(alias = "kCGLRPMaxSampleBuffers")]
287 pub const CGLRPMaxSampleBuffers: Self = Self(108);
288 #[doc(alias = "kCGLRPMaxSamples")]
289 pub const CGLRPMaxSamples: Self = Self(109);
290 #[doc(alias = "kCGLRPSampleModes")]
291 pub const CGLRPSampleModes: Self = Self(110);
292 #[doc(alias = "kCGLRPSampleAlpha")]
293 pub const CGLRPSampleAlpha: Self = Self(111);
294 #[doc(alias = "kCGLRPGPUVertProcCapable")]
295 pub const CGLRPGPUVertProcCapable: Self = Self(122);
296 #[doc(alias = "kCGLRPGPUFragProcCapable")]
297 pub const CGLRPGPUFragProcCapable: Self = Self(123);
298 #[doc(alias = "kCGLRPRendererCount")]
299 pub const CGLRPRendererCount: Self = Self(128);
300 #[doc(alias = "kCGLRPOnline")]
301 pub const CGLRPOnline: Self = Self(129);
302 #[doc(alias = "kCGLRPAcceleratedCompute")]
303 pub const CGLRPAcceleratedCompute: Self = Self(130);
304 #[doc(alias = "kCGLRPVideoMemoryMegabytes")]
305 pub const CGLRPVideoMemoryMegabytes: Self = Self(131);
306 #[doc(alias = "kCGLRPTextureMemoryMegabytes")]
307 pub const CGLRPTextureMemoryMegabytes: Self = Self(132);
308 #[doc(alias = "kCGLRPMajorGLVersion")]
309 pub const CGLRPMajorGLVersion: Self = Self(133);
310 #[doc(alias = "kCGLRPRegistryIDLow")]
311 pub const CGLRPRegistryIDLow: Self = Self(140);
312 #[doc(alias = "kCGLRPRegistryIDHigh")]
313 pub const CGLRPRegistryIDHigh: Self = Self(141);
314 #[doc(alias = "kCGLRPRemovable")]
315 pub const CGLRPRemovable: Self = Self(142);
316 #[doc(alias = "kCGLRPRobust")]
317 pub const CGLRPRobust: Self = Self(75);
318 #[doc(alias = "kCGLRPMPSafe")]
319 pub const CGLRPMPSafe: Self = Self(78);
320 #[doc(alias = "kCGLRPMultiScreen")]
321 pub const CGLRPMultiScreen: Self = Self(81);
322 #[doc(alias = "kCGLRPFullScreen")]
323 pub const CGLRPFullScreen: Self = Self(54);
324 #[doc(alias = "kCGLRPVideoMemory")]
325 pub const CGLRPVideoMemory: Self = Self(120);
326 #[doc(alias = "kCGLRPTextureMemory")]
327 pub const CGLRPTextureMemory: Self = Self(121);
328}
329
330unsafe impl Encode for CGLRendererProperty {
331 const ENCODING: Encoding = c_uint::ENCODING;
332}
333
334unsafe impl RefEncode for CGLRendererProperty {
335 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
336}
337
338#[repr(transparent)]
340#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
341pub struct CGLContextEnable(pub c_uint);
342impl CGLContextEnable {
343 #[doc(alias = "kCGLCESwapRectangle")]
344 pub const CGLCESwapRectangle: Self = Self(201);
345 #[doc(alias = "kCGLCESwapLimit")]
346 pub const CGLCESwapLimit: Self = Self(203);
347 #[doc(alias = "kCGLCERasterization")]
348 pub const CGLCERasterization: Self = Self(221);
349 #[doc(alias = "kCGLCEStateValidation")]
350 pub const CGLCEStateValidation: Self = Self(301);
351 #[doc(alias = "kCGLCESurfaceBackingSize")]
352 pub const CGLCESurfaceBackingSize: Self = Self(305);
353 #[doc(alias = "kCGLCEDisplayListOptimization")]
354 pub const CGLCEDisplayListOptimization: Self = Self(307);
355 #[doc(alias = "kCGLCEMPEngine")]
356 pub const CGLCEMPEngine: Self = Self(313);
357 #[doc(alias = "kCGLCECrashOnRemovedFunctions")]
358 pub const CGLCECrashOnRemovedFunctions: Self = Self(316);
359}
360
361unsafe impl Encode for CGLContextEnable {
362 const ENCODING: Encoding = c_uint::ENCODING;
363}
364
365unsafe impl RefEncode for CGLContextEnable {
366 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
367}
368
369#[repr(transparent)]
371#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
372pub struct CGLGPURestartStatus(pub c_uint);
373impl CGLGPURestartStatus {
374 #[doc(alias = "kCGLCPGPURestartStatusNone")]
375 pub const CGLCPGPURestartStatusNone: Self = Self(0);
376 #[doc(alias = "kCGLCPGPURestartStatusCaused")]
377 pub const CGLCPGPURestartStatusCaused: Self = Self(1);
378 #[doc(alias = "kCGLCPGPURestartStatusBlacklisted")]
379 pub const CGLCPGPURestartStatusBlacklisted: Self = Self(2);
380 #[doc(alias = "kCGLCPGPURestartStatusDenied")]
381 pub const CGLCPGPURestartStatusDenied: Self = Self(2);
382}
383
384unsafe impl Encode for CGLGPURestartStatus {
385 const ENCODING: Encoding = c_uint::ENCODING;
386}
387
388unsafe impl RefEncode for CGLGPURestartStatus {
389 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
390}
391
392#[repr(transparent)]
394#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
395pub struct CGLContextParameter(pub c_uint);
396impl CGLContextParameter {
397 #[doc(alias = "kCGLCPSwapRectangle")]
398 pub const CGLCPSwapRectangle: Self = Self(200);
399 #[doc(alias = "kCGLCPSwapInterval")]
400 pub const CGLCPSwapInterval: Self = Self(222);
401 #[doc(alias = "kCGLCPDispatchTableSize")]
402 pub const CGLCPDispatchTableSize: Self = Self(224);
403 #[doc(alias = "kCGLCPClientStorage")]
404 pub const CGLCPClientStorage: Self = Self(226);
405 #[doc(alias = "kCGLCPSurfaceTexture")]
406 pub const CGLCPSurfaceTexture: Self = Self(228);
407 #[doc(alias = "kCGLCPSurfaceOrder")]
408 pub const CGLCPSurfaceOrder: Self = Self(235);
409 #[doc(alias = "kCGLCPSurfaceOpacity")]
410 pub const CGLCPSurfaceOpacity: Self = Self(236);
411 #[doc(alias = "kCGLCPSurfaceBackingSize")]
412 pub const CGLCPSurfaceBackingSize: Self = Self(304);
413 #[doc(alias = "kCGLCPSurfaceSurfaceVolatile")]
414 pub const CGLCPSurfaceSurfaceVolatile: Self = Self(306);
415 #[doc(alias = "kCGLCPReclaimResources")]
416 pub const CGLCPReclaimResources: Self = Self(308);
417 #[doc(alias = "kCGLCPCurrentRendererID")]
418 pub const CGLCPCurrentRendererID: Self = Self(309);
419 #[doc(alias = "kCGLCPGPUVertexProcessing")]
420 pub const CGLCPGPUVertexProcessing: Self = Self(310);
421 #[doc(alias = "kCGLCPGPUFragmentProcessing")]
422 pub const CGLCPGPUFragmentProcessing: Self = Self(311);
423 #[doc(alias = "kCGLCPHasDrawable")]
424 pub const CGLCPHasDrawable: Self = Self(314);
425 #[doc(alias = "kCGLCPMPSwapsInFlight")]
426 pub const CGLCPMPSwapsInFlight: Self = Self(315);
427 #[doc(alias = "kCGLCPGPURestartStatus")]
428 pub const CGLCPGPURestartStatus: Self = Self(317);
429 #[doc(alias = "kCGLCPAbortOnGPURestartStatusBlacklisted")]
430 pub const CGLCPAbortOnGPURestartStatusBlacklisted: Self = Self(318);
431 #[doc(alias = "kCGLCPAbortOnGPURestartStatusDenied")]
432 pub const CGLCPAbortOnGPURestartStatusDenied: Self = Self(318);
433 #[doc(alias = "kCGLCPSupportGPURestart")]
434 pub const CGLCPSupportGPURestart: Self = Self(319);
435 #[doc(alias = "kCGLCPSupportSeparateAddressSpace")]
436 pub const CGLCPSupportSeparateAddressSpace: Self = Self(320);
437 #[doc(alias = "kCGLCPContextPriorityRequest")]
438 pub const CGLCPContextPriorityRequest: Self = Self(608);
439}
440
441unsafe impl Encode for CGLContextParameter {
442 const ENCODING: Encoding = c_uint::ENCODING;
443}
444
445unsafe impl RefEncode for CGLContextParameter {
446 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
447}
448
449#[repr(transparent)]
451#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
452pub struct CGLCPContextPriorityRequest(pub c_uint);
453impl CGLCPContextPriorityRequest {
454 #[doc(alias = "kCGLCPContextPriorityRequestHigh")]
455 pub const High: Self = Self(0);
456 #[doc(alias = "kCGLCPContextPriorityRequestNormal")]
457 pub const Normal: Self = Self(1);
458 #[doc(alias = "kCGLCPContextPriorityRequestLow")]
459 pub const Low: Self = Self(2);
460}
461
462unsafe impl Encode for CGLCPContextPriorityRequest {
463 const ENCODING: Encoding = c_uint::ENCODING;
464}
465
466unsafe impl RefEncode for CGLCPContextPriorityRequest {
467 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
468}
469
470#[repr(transparent)]
472#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
473pub struct CGLGlobalOption(pub c_uint);
474impl CGLGlobalOption {
475 #[doc(alias = "kCGLGOFormatCacheSize")]
476 pub const CGLGOFormatCacheSize: Self = Self(501);
477 #[doc(alias = "kCGLGOClearFormatCache")]
478 pub const CGLGOClearFormatCache: Self = Self(502);
479 #[doc(alias = "kCGLGORetainRenderers")]
480 pub const CGLGORetainRenderers: Self = Self(503);
481 #[doc(alias = "kCGLGOUseBuildCache")]
482 pub const CGLGOUseBuildCache: Self = Self(506);
483 #[doc(alias = "kCGLGOResetLibrary")]
484 pub const CGLGOResetLibrary: Self = Self(504);
485 #[doc(alias = "kCGLGOUseErrorHandler")]
486 pub const CGLGOUseErrorHandler: Self = Self(505);
487}
488
489unsafe impl Encode for CGLGlobalOption {
490 const ENCODING: Encoding = c_uint::ENCODING;
491}
492
493unsafe impl RefEncode for CGLGlobalOption {
494 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
495}
496
497#[repr(transparent)]
499#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
500pub struct CGLOpenGLProfile(pub c_uint);
501impl CGLOpenGLProfile {
502 #[doc(alias = "kCGLOGLPVersion_Legacy")]
503 pub const CGLOGLPVersion_Legacy: Self = Self(0x1000);
504 #[doc(alias = "kCGLOGLPVersion_3_2_Core")]
505 pub const CGLOGLPVersion_3_2_Core: Self = Self(0x3200);
506 #[doc(alias = "kCGLOGLPVersion_GL3_Core")]
507 pub const CGLOGLPVersion_GL3_Core: Self = Self(0x3200);
508 #[doc(alias = "kCGLOGLPVersion_GL4_Core")]
509 pub const CGLOGLPVersion_GL4_Core: Self = Self(0x4100);
510}
511
512unsafe impl Encode for CGLOpenGLProfile {
513 const ENCODING: Encoding = c_uint::ENCODING;
514}
515
516unsafe impl RefEncode for CGLOpenGLProfile {
517 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
518}
519
520#[repr(transparent)]
522#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
523pub struct CGLError(pub c_uint);
524impl CGLError {
525 #[doc(alias = "kCGLNoError")]
526 pub const NoError: Self = Self(0);
527 #[doc(alias = "kCGLBadAttribute")]
528 pub const BadAttribute: Self = Self(10000);
529 #[doc(alias = "kCGLBadProperty")]
530 pub const BadProperty: Self = Self(10001);
531 #[doc(alias = "kCGLBadPixelFormat")]
532 pub const BadPixelFormat: Self = Self(10002);
533 #[doc(alias = "kCGLBadRendererInfo")]
534 pub const BadRendererInfo: Self = Self(10003);
535 #[doc(alias = "kCGLBadContext")]
536 pub const BadContext: Self = Self(10004);
537 #[doc(alias = "kCGLBadDrawable")]
538 pub const BadDrawable: Self = Self(10005);
539 #[doc(alias = "kCGLBadDisplay")]
540 pub const BadDisplay: Self = Self(10006);
541 #[doc(alias = "kCGLBadState")]
542 pub const BadState: Self = Self(10007);
543 #[doc(alias = "kCGLBadValue")]
544 pub const BadValue: Self = Self(10008);
545 #[doc(alias = "kCGLBadMatch")]
546 pub const BadMatch: Self = Self(10009);
547 #[doc(alias = "kCGLBadEnumeration")]
548 pub const BadEnumeration: Self = Self(10010);
549 #[doc(alias = "kCGLBadOffScreen")]
550 pub const BadOffScreen: Self = Self(10011);
551 #[doc(alias = "kCGLBadFullScreen")]
552 pub const BadFullScreen: Self = Self(10012);
553 #[doc(alias = "kCGLBadWindow")]
554 pub const BadWindow: Self = Self(10013);
555 #[doc(alias = "kCGLBadAddress")]
556 pub const BadAddress: Self = Self(10014);
557 #[doc(alias = "kCGLBadCodeModule")]
558 pub const BadCodeModule: Self = Self(10015);
559 #[doc(alias = "kCGLBadAlloc")]
560 pub const BadAlloc: Self = Self(10016);
561 #[doc(alias = "kCGLBadConnection")]
562 pub const BadConnection: Self = Self(10017);
563}
564
565unsafe impl Encode for CGLError {
566 const ENCODING: Encoding = c_uint::ENCODING;
567}
568
569unsafe impl RefEncode for CGLError {
570 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
571}