objc2-open-gl 0.3.2

Bindings to the OpenGL framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglmonoscopicbit?language=objc)
pub const kCGLMonoscopicBit: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglstereoscopicbit?language=objc)
pub const kCGLStereoscopicBit: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglsinglebufferbit?language=objc)
pub const kCGLSingleBufferBit: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgldoublebufferbit?language=objc)
pub const kCGLDoubleBufferBit: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgltriplebufferbit?language=objc)
pub const kCGLTripleBufferBit: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl0bit?language=objc)
pub const kCGL0Bit: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl1bit?language=objc)
pub const kCGL1Bit: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl2bit?language=objc)
pub const kCGL2Bit: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl3bit?language=objc)
pub const kCGL3Bit: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl4bit?language=objc)
pub const kCGL4Bit: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl5bit?language=objc)
pub const kCGL5Bit: c_uint = 0x00000020;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl6bit?language=objc)
pub const kCGL6Bit: c_uint = 0x00000040;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl8bit?language=objc)
pub const kCGL8Bit: c_uint = 0x00000080;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl10bit?language=objc)
pub const kCGL10Bit: c_uint = 0x00000100;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl12bit?language=objc)
pub const kCGL12Bit: c_uint = 0x00000200;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl16bit?language=objc)
pub const kCGL16Bit: c_uint = 0x00000400;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl24bit?language=objc)
pub const kCGL24Bit: c_uint = 0x00000800;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl32bit?language=objc)
pub const kCGL32Bit: c_uint = 0x00001000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl48bit?language=objc)
pub const kCGL48Bit: c_uint = 0x00002000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl64bit?language=objc)
pub const kCGL64Bit: c_uint = 0x00004000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl96bit?language=objc)
pub const kCGL96Bit: c_uint = 0x00008000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcgl128bit?language=objc)
pub const kCGL128Bit: c_uint = 0x00010000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb444bit?language=objc)
pub const kCGLRGB444Bit: c_uint = 0x00000040;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglargb4444bit?language=objc)
pub const kCGLARGB4444Bit: c_uint = 0x00000080;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb444a8bit?language=objc)
pub const kCGLRGB444A8Bit: c_uint = 0x00000100;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb555bit?language=objc)
pub const kCGLRGB555Bit: c_uint = 0x00000200;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglargb1555bit?language=objc)
pub const kCGLARGB1555Bit: c_uint = 0x00000400;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb555a8bit?language=objc)
pub const kCGLRGB555A8Bit: c_uint = 0x00000800;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb565bit?language=objc)
pub const kCGLRGB565Bit: c_uint = 0x00001000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb565a8bit?language=objc)
pub const kCGLRGB565A8Bit: c_uint = 0x00002000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb888bit?language=objc)
pub const kCGLRGB888Bit: c_uint = 0x00004000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglargb8888bit?language=objc)
pub const kCGLARGB8888Bit: c_uint = 0x00008000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb888a8bit?language=objc)
pub const kCGLRGB888A8Bit: c_uint = 0x00010000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb101010bit?language=objc)
pub const kCGLRGB101010Bit: c_uint = 0x00020000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglargb2101010bit?language=objc)
pub const kCGLARGB2101010Bit: c_uint = 0x00040000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb101010_a8bit?language=objc)
pub const kCGLRGB101010_A8Bit: c_uint = 0x00080000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb121212bit?language=objc)
pub const kCGLRGB121212Bit: c_uint = 0x00100000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglargb12121212bit?language=objc)
pub const kCGLARGB12121212Bit: c_uint = 0x00200000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgb161616bit?language=objc)
pub const kCGLRGB161616Bit: c_uint = 0x00400000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgba16161616bit?language=objc)
pub const kCGLRGBA16161616Bit: c_uint = 0x00800000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgbfloat64bit?language=objc)
pub const kCGLRGBFloat64Bit: c_uint = 0x01000000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgbafloat64bit?language=objc)
pub const kCGLRGBAFloat64Bit: c_uint = 0x02000000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgbfloat128bit?language=objc)
pub const kCGLRGBFloat128Bit: c_uint = 0x04000000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgbafloat128bit?language=objc)
pub const kCGLRGBAFloat128Bit: c_uint = 0x08000000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgbfloat256bit?language=objc)
pub const kCGLRGBFloat256Bit: c_uint = 0x10000000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglrgbafloat256bit?language=objc)
pub const kCGLRGBAFloat256Bit: c_uint = 0x20000000;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglsupersamplebit?language=objc)
pub const kCGLSupersampleBit: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglmultisamplebit?language=objc)
pub const kCGLMultisampleBit: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/kcglargb16161616bit?language=objc)
pub const kCGLARGB16161616Bit: c_uint = kCGLRGBA16161616Bit;
/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglcontextobj?language=objc)
pub type CGLContextObj = *mut _CGLContextObject;

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/_cglpixelformatobject?language=objc)
#[repr(C)]
#[derive(Debug)]
pub struct _CGLPixelFormatObject {
    inner: [u8; 0],
    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}

unsafe impl RefEncode for _CGLPixelFormatObject {
    const ENCODING_REF: Encoding =
        Encoding::Pointer(&Encoding::Struct("_CGLPixelFormatObject", &[]));
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglpixelformatobj?language=objc)
pub type CGLPixelFormatObj = *mut _CGLPixelFormatObject;

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/_cglrendererinfoobject?language=objc)
#[repr(C)]
#[derive(Debug)]
pub struct _CGLRendererInfoObject {
    inner: [u8; 0],
    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}

unsafe impl RefEncode for _CGLRendererInfoObject {
    const ENCODING_REF: Encoding =
        Encoding::Pointer(&Encoding::Struct("_CGLRendererInfoObject", &[]));
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglrendererinfoobj?language=objc)
pub type CGLRendererInfoObj = *mut _CGLRendererInfoObject;

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/_cglpbufferobject?language=objc)
#[repr(C)]
#[derive(Debug)]
pub struct _CGLPBufferObject {
    inner: [u8; 0],
    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}

unsafe impl RefEncode for _CGLPBufferObject {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("_CGLPBufferObject", &[]));
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglpbufferobj?language=objc)
pub type CGLPBufferObj = *mut _CGLPBufferObject;

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglpixelformatattribute?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLPixelFormatAttribute(pub c_uint);
impl CGLPixelFormatAttribute {
    #[doc(alias = "kCGLPFAAllRenderers")]
    pub const CGLPFAAllRenderers: Self = Self(1);
    #[doc(alias = "kCGLPFATripleBuffer")]
    pub const CGLPFATripleBuffer: Self = Self(3);
    #[doc(alias = "kCGLPFADoubleBuffer")]
    pub const CGLPFADoubleBuffer: Self = Self(5);
    #[doc(alias = "kCGLPFAColorSize")]
    pub const CGLPFAColorSize: Self = Self(8);
    #[doc(alias = "kCGLPFAAlphaSize")]
    pub const CGLPFAAlphaSize: Self = Self(11);
    #[doc(alias = "kCGLPFADepthSize")]
    pub const CGLPFADepthSize: Self = Self(12);
    #[doc(alias = "kCGLPFAStencilSize")]
    pub const CGLPFAStencilSize: Self = Self(13);
    #[doc(alias = "kCGLPFAMinimumPolicy")]
    pub const CGLPFAMinimumPolicy: Self = Self(51);
    #[doc(alias = "kCGLPFAMaximumPolicy")]
    pub const CGLPFAMaximumPolicy: Self = Self(52);
    #[doc(alias = "kCGLPFASampleBuffers")]
    pub const CGLPFASampleBuffers: Self = Self(55);
    #[doc(alias = "kCGLPFASamples")]
    pub const CGLPFASamples: Self = Self(56);
    #[doc(alias = "kCGLPFAColorFloat")]
    pub const CGLPFAColorFloat: Self = Self(58);
    #[doc(alias = "kCGLPFAMultisample")]
    pub const CGLPFAMultisample: Self = Self(59);
    #[doc(alias = "kCGLPFASupersample")]
    pub const CGLPFASupersample: Self = Self(60);
    #[doc(alias = "kCGLPFASampleAlpha")]
    pub const CGLPFASampleAlpha: Self = Self(61);
    #[doc(alias = "kCGLPFARendererID")]
    pub const CGLPFARendererID: Self = Self(70);
    #[doc(alias = "kCGLPFANoRecovery")]
    pub const CGLPFANoRecovery: Self = Self(72);
    #[doc(alias = "kCGLPFAAccelerated")]
    pub const CGLPFAAccelerated: Self = Self(73);
    #[doc(alias = "kCGLPFAClosestPolicy")]
    pub const CGLPFAClosestPolicy: Self = Self(74);
    #[doc(alias = "kCGLPFABackingStore")]
    pub const CGLPFABackingStore: Self = Self(76);
    #[doc(alias = "kCGLPFABackingVolatile")]
    pub const CGLPFABackingVolatile: Self = Self(77);
    #[doc(alias = "kCGLPFADisplayMask")]
    pub const CGLPFADisplayMask: Self = Self(84);
    #[doc(alias = "kCGLPFAAllowOfflineRenderers")]
    pub const CGLPFAAllowOfflineRenderers: Self = Self(96);
    #[doc(alias = "kCGLPFAAcceleratedCompute")]
    pub const CGLPFAAcceleratedCompute: Self = Self(97);
    #[doc(alias = "kCGLPFAOpenGLProfile")]
    pub const CGLPFAOpenGLProfile: Self = Self(99);
    #[doc(alias = "kCGLPFASupportsAutomaticGraphicsSwitching")]
    pub const CGLPFASupportsAutomaticGraphicsSwitching: Self = Self(101);
    #[doc(alias = "kCGLPFAVirtualScreenCount")]
    pub const CGLPFAVirtualScreenCount: Self = Self(128);
    #[doc(alias = "kCGLPFAAuxBuffers")]
    pub const CGLPFAAuxBuffers: Self = Self(7);
    #[doc(alias = "kCGLPFAAccumSize")]
    pub const CGLPFAAccumSize: Self = Self(14);
    #[doc(alias = "kCGLPFAAuxDepthStencil")]
    pub const CGLPFAAuxDepthStencil: Self = Self(57);
    #[doc(alias = "kCGLPFAStereo")]
    pub const CGLPFAStereo: Self = Self(6);
    #[doc(alias = "kCGLPFAOffScreen")]
    pub const CGLPFAOffScreen: Self = Self(53);
    #[doc(alias = "kCGLPFAWindow")]
    pub const CGLPFAWindow: Self = Self(80);
    #[doc(alias = "kCGLPFACompliant")]
    pub const CGLPFACompliant: Self = Self(83);
    #[doc(alias = "kCGLPFAPBuffer")]
    pub const CGLPFAPBuffer: Self = Self(90);
    #[doc(alias = "kCGLPFARemotePBuffer")]
    pub const CGLPFARemotePBuffer: Self = Self(91);
    #[doc(alias = "kCGLPFASingleRenderer")]
    pub const CGLPFASingleRenderer: Self = Self(71);
    #[doc(alias = "kCGLPFARobust")]
    pub const CGLPFARobust: Self = Self(75);
    #[doc(alias = "kCGLPFAMPSafe")]
    pub const CGLPFAMPSafe: Self = Self(78);
    #[doc(alias = "kCGLPFAMultiScreen")]
    pub const CGLPFAMultiScreen: Self = Self(81);
    #[doc(alias = "kCGLPFAFullScreen")]
    pub const CGLPFAFullScreen: Self = Self(54);
}

unsafe impl Encode for CGLPixelFormatAttribute {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLPixelFormatAttribute {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglrendererproperty?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLRendererProperty(pub c_uint);
impl CGLRendererProperty {
    #[doc(alias = "kCGLRPOffScreen")]
    pub const CGLRPOffScreen: Self = Self(53);
    #[doc(alias = "kCGLRPRendererID")]
    pub const CGLRPRendererID: Self = Self(70);
    #[doc(alias = "kCGLRPAccelerated")]
    pub const CGLRPAccelerated: Self = Self(73);
    #[doc(alias = "kCGLRPBackingStore")]
    pub const CGLRPBackingStore: Self = Self(76);
    #[doc(alias = "kCGLRPWindow")]
    pub const CGLRPWindow: Self = Self(80);
    #[doc(alias = "kCGLRPCompliant")]
    pub const CGLRPCompliant: Self = Self(83);
    #[doc(alias = "kCGLRPDisplayMask")]
    pub const CGLRPDisplayMask: Self = Self(84);
    #[doc(alias = "kCGLRPBufferModes")]
    pub const CGLRPBufferModes: Self = Self(100);
    #[doc(alias = "kCGLRPColorModes")]
    pub const CGLRPColorModes: Self = Self(103);
    #[doc(alias = "kCGLRPAccumModes")]
    pub const CGLRPAccumModes: Self = Self(104);
    #[doc(alias = "kCGLRPDepthModes")]
    pub const CGLRPDepthModes: Self = Self(105);
    #[doc(alias = "kCGLRPStencilModes")]
    pub const CGLRPStencilModes: Self = Self(106);
    #[doc(alias = "kCGLRPMaxAuxBuffers")]
    pub const CGLRPMaxAuxBuffers: Self = Self(107);
    #[doc(alias = "kCGLRPMaxSampleBuffers")]
    pub const CGLRPMaxSampleBuffers: Self = Self(108);
    #[doc(alias = "kCGLRPMaxSamples")]
    pub const CGLRPMaxSamples: Self = Self(109);
    #[doc(alias = "kCGLRPSampleModes")]
    pub const CGLRPSampleModes: Self = Self(110);
    #[doc(alias = "kCGLRPSampleAlpha")]
    pub const CGLRPSampleAlpha: Self = Self(111);
    #[doc(alias = "kCGLRPGPUVertProcCapable")]
    pub const CGLRPGPUVertProcCapable: Self = Self(122);
    #[doc(alias = "kCGLRPGPUFragProcCapable")]
    pub const CGLRPGPUFragProcCapable: Self = Self(123);
    #[doc(alias = "kCGLRPRendererCount")]
    pub const CGLRPRendererCount: Self = Self(128);
    #[doc(alias = "kCGLRPOnline")]
    pub const CGLRPOnline: Self = Self(129);
    #[doc(alias = "kCGLRPAcceleratedCompute")]
    pub const CGLRPAcceleratedCompute: Self = Self(130);
    #[doc(alias = "kCGLRPVideoMemoryMegabytes")]
    pub const CGLRPVideoMemoryMegabytes: Self = Self(131);
    #[doc(alias = "kCGLRPTextureMemoryMegabytes")]
    pub const CGLRPTextureMemoryMegabytes: Self = Self(132);
    #[doc(alias = "kCGLRPMajorGLVersion")]
    pub const CGLRPMajorGLVersion: Self = Self(133);
    #[doc(alias = "kCGLRPRegistryIDLow")]
    pub const CGLRPRegistryIDLow: Self = Self(140);
    #[doc(alias = "kCGLRPRegistryIDHigh")]
    pub const CGLRPRegistryIDHigh: Self = Self(141);
    #[doc(alias = "kCGLRPRemovable")]
    pub const CGLRPRemovable: Self = Self(142);
    #[doc(alias = "kCGLRPRobust")]
    pub const CGLRPRobust: Self = Self(75);
    #[doc(alias = "kCGLRPMPSafe")]
    pub const CGLRPMPSafe: Self = Self(78);
    #[doc(alias = "kCGLRPMultiScreen")]
    pub const CGLRPMultiScreen: Self = Self(81);
    #[doc(alias = "kCGLRPFullScreen")]
    pub const CGLRPFullScreen: Self = Self(54);
    #[doc(alias = "kCGLRPVideoMemory")]
    pub const CGLRPVideoMemory: Self = Self(120);
    #[doc(alias = "kCGLRPTextureMemory")]
    pub const CGLRPTextureMemory: Self = Self(121);
}

unsafe impl Encode for CGLRendererProperty {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLRendererProperty {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglcontextenable?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLContextEnable(pub c_uint);
impl CGLContextEnable {
    #[doc(alias = "kCGLCESwapRectangle")]
    pub const CGLCESwapRectangle: Self = Self(201);
    #[doc(alias = "kCGLCESwapLimit")]
    pub const CGLCESwapLimit: Self = Self(203);
    #[doc(alias = "kCGLCERasterization")]
    pub const CGLCERasterization: Self = Self(221);
    #[doc(alias = "kCGLCEStateValidation")]
    pub const CGLCEStateValidation: Self = Self(301);
    #[doc(alias = "kCGLCESurfaceBackingSize")]
    pub const CGLCESurfaceBackingSize: Self = Self(305);
    #[doc(alias = "kCGLCEDisplayListOptimization")]
    pub const CGLCEDisplayListOptimization: Self = Self(307);
    #[doc(alias = "kCGLCEMPEngine")]
    pub const CGLCEMPEngine: Self = Self(313);
    #[doc(alias = "kCGLCECrashOnRemovedFunctions")]
    pub const CGLCECrashOnRemovedFunctions: Self = Self(316);
}

unsafe impl Encode for CGLContextEnable {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLContextEnable {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglgpurestartstatus?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLGPURestartStatus(pub c_uint);
impl CGLGPURestartStatus {
    #[doc(alias = "kCGLCPGPURestartStatusNone")]
    pub const CGLCPGPURestartStatusNone: Self = Self(0);
    #[doc(alias = "kCGLCPGPURestartStatusCaused")]
    pub const CGLCPGPURestartStatusCaused: Self = Self(1);
    #[doc(alias = "kCGLCPGPURestartStatusBlacklisted")]
    pub const CGLCPGPURestartStatusBlacklisted: Self = Self(2);
    #[doc(alias = "kCGLCPGPURestartStatusDenied")]
    pub const CGLCPGPURestartStatusDenied: Self = Self(2);
}

unsafe impl Encode for CGLGPURestartStatus {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLGPURestartStatus {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglcontextparameter?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLContextParameter(pub c_uint);
impl CGLContextParameter {
    #[doc(alias = "kCGLCPSwapRectangle")]
    pub const CGLCPSwapRectangle: Self = Self(200);
    #[doc(alias = "kCGLCPSwapInterval")]
    pub const CGLCPSwapInterval: Self = Self(222);
    #[doc(alias = "kCGLCPDispatchTableSize")]
    pub const CGLCPDispatchTableSize: Self = Self(224);
    #[doc(alias = "kCGLCPClientStorage")]
    pub const CGLCPClientStorage: Self = Self(226);
    #[doc(alias = "kCGLCPSurfaceTexture")]
    pub const CGLCPSurfaceTexture: Self = Self(228);
    #[doc(alias = "kCGLCPSurfaceOrder")]
    pub const CGLCPSurfaceOrder: Self = Self(235);
    #[doc(alias = "kCGLCPSurfaceOpacity")]
    pub const CGLCPSurfaceOpacity: Self = Self(236);
    #[doc(alias = "kCGLCPSurfaceBackingSize")]
    pub const CGLCPSurfaceBackingSize: Self = Self(304);
    #[doc(alias = "kCGLCPSurfaceSurfaceVolatile")]
    pub const CGLCPSurfaceSurfaceVolatile: Self = Self(306);
    #[doc(alias = "kCGLCPReclaimResources")]
    pub const CGLCPReclaimResources: Self = Self(308);
    #[doc(alias = "kCGLCPCurrentRendererID")]
    pub const CGLCPCurrentRendererID: Self = Self(309);
    #[doc(alias = "kCGLCPGPUVertexProcessing")]
    pub const CGLCPGPUVertexProcessing: Self = Self(310);
    #[doc(alias = "kCGLCPGPUFragmentProcessing")]
    pub const CGLCPGPUFragmentProcessing: Self = Self(311);
    #[doc(alias = "kCGLCPHasDrawable")]
    pub const CGLCPHasDrawable: Self = Self(314);
    #[doc(alias = "kCGLCPMPSwapsInFlight")]
    pub const CGLCPMPSwapsInFlight: Self = Self(315);
    #[doc(alias = "kCGLCPGPURestartStatus")]
    pub const CGLCPGPURestartStatus: Self = Self(317);
    #[doc(alias = "kCGLCPAbortOnGPURestartStatusBlacklisted")]
    pub const CGLCPAbortOnGPURestartStatusBlacklisted: Self = Self(318);
    #[doc(alias = "kCGLCPAbortOnGPURestartStatusDenied")]
    pub const CGLCPAbortOnGPURestartStatusDenied: Self = Self(318);
    #[doc(alias = "kCGLCPSupportGPURestart")]
    pub const CGLCPSupportGPURestart: Self = Self(319);
    #[doc(alias = "kCGLCPSupportSeparateAddressSpace")]
    pub const CGLCPSupportSeparateAddressSpace: Self = Self(320);
    #[doc(alias = "kCGLCPContextPriorityRequest")]
    pub const CGLCPContextPriorityRequest: Self = Self(608);
}

unsafe impl Encode for CGLContextParameter {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLContextParameter {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglcpcontextpriorityrequest?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLCPContextPriorityRequest(pub c_uint);
impl CGLCPContextPriorityRequest {
    #[doc(alias = "kCGLCPContextPriorityRequestHigh")]
    pub const High: Self = Self(0);
    #[doc(alias = "kCGLCPContextPriorityRequestNormal")]
    pub const Normal: Self = Self(1);
    #[doc(alias = "kCGLCPContextPriorityRequestLow")]
    pub const Low: Self = Self(2);
}

unsafe impl Encode for CGLCPContextPriorityRequest {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLCPContextPriorityRequest {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglglobaloption?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLGlobalOption(pub c_uint);
impl CGLGlobalOption {
    #[doc(alias = "kCGLGOFormatCacheSize")]
    pub const CGLGOFormatCacheSize: Self = Self(501);
    #[doc(alias = "kCGLGOClearFormatCache")]
    pub const CGLGOClearFormatCache: Self = Self(502);
    #[doc(alias = "kCGLGORetainRenderers")]
    pub const CGLGORetainRenderers: Self = Self(503);
    #[doc(alias = "kCGLGOUseBuildCache")]
    pub const CGLGOUseBuildCache: Self = Self(506);
    #[doc(alias = "kCGLGOResetLibrary")]
    pub const CGLGOResetLibrary: Self = Self(504);
    #[doc(alias = "kCGLGOUseErrorHandler")]
    pub const CGLGOUseErrorHandler: Self = Self(505);
}

unsafe impl Encode for CGLGlobalOption {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLGlobalOption {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglopenglprofile?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLOpenGLProfile(pub c_uint);
impl CGLOpenGLProfile {
    #[doc(alias = "kCGLOGLPVersion_Legacy")]
    pub const CGLOGLPVersion_Legacy: Self = Self(0x1000);
    #[doc(alias = "kCGLOGLPVersion_3_2_Core")]
    pub const CGLOGLPVersion_3_2_Core: Self = Self(0x3200);
    #[doc(alias = "kCGLOGLPVersion_GL3_Core")]
    pub const CGLOGLPVersion_GL3_Core: Self = Self(0x3200);
    #[doc(alias = "kCGLOGLPVersion_GL4_Core")]
    pub const CGLOGLPVersion_GL4_Core: Self = Self(0x4100);
}

unsafe impl Encode for CGLOpenGLProfile {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLOpenGLProfile {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/opengl/cglerror?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGLError(pub c_uint);
impl CGLError {
    #[doc(alias = "kCGLNoError")]
    pub const NoError: Self = Self(0);
    #[doc(alias = "kCGLBadAttribute")]
    pub const BadAttribute: Self = Self(10000);
    #[doc(alias = "kCGLBadProperty")]
    pub const BadProperty: Self = Self(10001);
    #[doc(alias = "kCGLBadPixelFormat")]
    pub const BadPixelFormat: Self = Self(10002);
    #[doc(alias = "kCGLBadRendererInfo")]
    pub const BadRendererInfo: Self = Self(10003);
    #[doc(alias = "kCGLBadContext")]
    pub const BadContext: Self = Self(10004);
    #[doc(alias = "kCGLBadDrawable")]
    pub const BadDrawable: Self = Self(10005);
    #[doc(alias = "kCGLBadDisplay")]
    pub const BadDisplay: Self = Self(10006);
    #[doc(alias = "kCGLBadState")]
    pub const BadState: Self = Self(10007);
    #[doc(alias = "kCGLBadValue")]
    pub const BadValue: Self = Self(10008);
    #[doc(alias = "kCGLBadMatch")]
    pub const BadMatch: Self = Self(10009);
    #[doc(alias = "kCGLBadEnumeration")]
    pub const BadEnumeration: Self = Self(10010);
    #[doc(alias = "kCGLBadOffScreen")]
    pub const BadOffScreen: Self = Self(10011);
    #[doc(alias = "kCGLBadFullScreen")]
    pub const BadFullScreen: Self = Self(10012);
    #[doc(alias = "kCGLBadWindow")]
    pub const BadWindow: Self = Self(10013);
    #[doc(alias = "kCGLBadAddress")]
    pub const BadAddress: Self = Self(10014);
    #[doc(alias = "kCGLBadCodeModule")]
    pub const BadCodeModule: Self = Self(10015);
    #[doc(alias = "kCGLBadAlloc")]
    pub const BadAlloc: Self = Self(10016);
    #[doc(alias = "kCGLBadConnection")]
    pub const BadConnection: Self = Self(10017);
}

unsafe impl Encode for CGLError {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for CGLError {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}