objc2_app_kit/generated/
NSOpenGL.rs1use core::ffi::*;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
10#[repr(transparent)]
11#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
12pub struct NSOpenGLGlobalOption(pub u32);
13impl NSOpenGLGlobalOption {
14 #[doc(alias = "NSOpenGLGOFormatCacheSize")]
15 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
16 pub const GLGOFormatCacheSize: Self = Self(501);
17 #[doc(alias = "NSOpenGLGOClearFormatCache")]
18 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
19 pub const GLGOClearFormatCache: Self = Self(502);
20 #[doc(alias = "NSOpenGLGORetainRenderers")]
21 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
22 pub const GLGORetainRenderers: Self = Self(503);
23 #[doc(alias = "NSOpenGLGOUseBuildCache")]
24 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
25 pub const GLGOUseBuildCache: Self = Self(506);
26 #[doc(alias = "NSOpenGLGOResetLibrary")]
27 #[deprecated]
28 pub const GLGOResetLibrary: Self = Self(504);
29}
30
31unsafe impl Encode for NSOpenGLGlobalOption {
32 const ENCODING: Encoding = u32::ENCODING;
33}
34
35unsafe impl RefEncode for NSOpenGLGlobalOption {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
41pub const NSOpenGLPFAAllRenderers: c_uint = 1;
42#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
44pub const NSOpenGLPFATripleBuffer: c_uint = 3;
45#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
47pub const NSOpenGLPFADoubleBuffer: c_uint = 5;
48#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
50pub const NSOpenGLPFAAuxBuffers: c_uint = 7;
51#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
53pub const NSOpenGLPFAColorSize: c_uint = 8;
54#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
56pub const NSOpenGLPFAAlphaSize: c_uint = 11;
57#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
59pub const NSOpenGLPFADepthSize: c_uint = 12;
60#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
62pub const NSOpenGLPFAStencilSize: c_uint = 13;
63#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
65pub const NSOpenGLPFAAccumSize: c_uint = 14;
66#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
68pub const NSOpenGLPFAMinimumPolicy: c_uint = 51;
69#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
71pub const NSOpenGLPFAMaximumPolicy: c_uint = 52;
72#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
74pub const NSOpenGLPFASampleBuffers: c_uint = 55;
75#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
77pub const NSOpenGLPFASamples: c_uint = 56;
78#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
80pub const NSOpenGLPFAAuxDepthStencil: c_uint = 57;
81#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
83pub const NSOpenGLPFAColorFloat: c_uint = 58;
84#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
86pub const NSOpenGLPFAMultisample: c_uint = 59;
87#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
89pub const NSOpenGLPFASupersample: c_uint = 60;
90#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
92pub const NSOpenGLPFASampleAlpha: c_uint = 61;
93#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
95pub const NSOpenGLPFARendererID: c_uint = 70;
96#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
98pub const NSOpenGLPFANoRecovery: c_uint = 72;
99#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
101pub const NSOpenGLPFAAccelerated: c_uint = 73;
102#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
104pub const NSOpenGLPFAClosestPolicy: c_uint = 74;
105#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
107pub const NSOpenGLPFABackingStore: c_uint = 76;
108#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
110pub const NSOpenGLPFAScreenMask: c_uint = 84;
111#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
113pub const NSOpenGLPFAAllowOfflineRenderers: c_uint = 96;
114#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
116pub const NSOpenGLPFAAcceleratedCompute: c_uint = 97;
117#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
119pub const NSOpenGLPFAOpenGLProfile: c_uint = 99;
120#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
122pub const NSOpenGLPFAVirtualScreenCount: c_uint = 128;
123#[deprecated]
125pub const NSOpenGLPFAStereo: c_uint = 6;
126#[deprecated]
128pub const NSOpenGLPFAOffScreen: c_uint = 53;
129#[deprecated]
131pub const NSOpenGLPFAFullScreen: c_uint = 54;
132#[deprecated]
134pub const NSOpenGLPFASingleRenderer: c_uint = 71;
135#[deprecated]
137pub const NSOpenGLPFARobust: c_uint = 75;
138#[deprecated]
140pub const NSOpenGLPFAMPSafe: c_uint = 78;
141#[deprecated]
143pub const NSOpenGLPFAWindow: c_uint = 80;
144#[deprecated]
146pub const NSOpenGLPFAMultiScreen: c_uint = 81;
147#[deprecated]
149pub const NSOpenGLPFACompliant: c_uint = 83;
150#[deprecated]
152pub const NSOpenGLPFAPixelBuffer: c_uint = 90;
153#[deprecated]
155pub const NSOpenGLPFARemotePixelBuffer: c_uint = 91;
156
157pub type NSOpenGLPixelFormatAttribute = u32;
159
160#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
162pub const NSOpenGLProfileVersionLegacy: c_uint = 0x1000;
163#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
165pub const NSOpenGLProfileVersion3_2Core: c_uint = 0x3200;
166#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
168pub const NSOpenGLProfileVersion4_1Core: c_uint = 0x4100;
169
170#[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
177#[repr(transparent)]
178#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
179pub struct NSOpenGLContextParameter(pub NSInteger);
180impl NSOpenGLContextParameter {
181 #[doc(alias = "NSOpenGLContextParameterSwapInterval")]
182 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
183 pub const SwapInterval: Self = Self(222);
184 #[doc(alias = "NSOpenGLContextParameterSurfaceOrder")]
185 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
186 pub const SurfaceOrder: Self = Self(235);
187 #[doc(alias = "NSOpenGLContextParameterSurfaceOpacity")]
188 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
189 pub const SurfaceOpacity: Self = Self(236);
190 #[doc(alias = "NSOpenGLContextParameterSurfaceBackingSize")]
191 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
192 pub const SurfaceBackingSize: Self = Self(304);
193 #[doc(alias = "NSOpenGLContextParameterReclaimResources")]
194 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
195 pub const ReclaimResources: Self = Self(308);
196 #[doc(alias = "NSOpenGLContextParameterCurrentRendererID")]
197 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
198 pub const CurrentRendererID: Self = Self(309);
199 #[doc(alias = "NSOpenGLContextParameterGPUVertexProcessing")]
200 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
201 pub const GPUVertexProcessing: Self = Self(310);
202 #[doc(alias = "NSOpenGLContextParameterGPUFragmentProcessing")]
203 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
204 pub const GPUFragmentProcessing: Self = Self(311);
205 #[doc(alias = "NSOpenGLContextParameterHasDrawable")]
206 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
207 pub const HasDrawable: Self = Self(314);
208 #[doc(alias = "NSOpenGLContextParameterMPSwapsInFlight")]
209 #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"]
210 pub const MPSwapsInFlight: Self = Self(315);
211 #[doc(alias = "NSOpenGLContextParameterSwapRectangle")]
212 #[deprecated]
213 pub const SwapRectangle: Self = Self(200);
214 #[doc(alias = "NSOpenGLContextParameterSwapRectangleEnable")]
215 #[deprecated]
216 pub const SwapRectangleEnable: Self = Self(201);
217 #[doc(alias = "NSOpenGLContextParameterRasterizationEnable")]
218 #[deprecated]
219 pub const RasterizationEnable: Self = Self(221);
220 #[doc(alias = "NSOpenGLContextParameterStateValidation")]
221 #[deprecated]
222 pub const StateValidation: Self = Self(301);
223 #[doc(alias = "NSOpenGLContextParameterSurfaceSurfaceVolatile")]
224 #[deprecated]
225 pub const SurfaceSurfaceVolatile: Self = Self(306);
226}
227
228unsafe impl Encode for NSOpenGLContextParameter {
229 const ENCODING: Encoding = NSInteger::ENCODING;
230}
231
232unsafe impl RefEncode for NSOpenGLContextParameter {
233 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
234}
235
236pub static NSOpenGLCPSwapInterval: NSOpenGLContextParameter =
238 NSOpenGLContextParameter(NSOpenGLContextParameter::SwapInterval.0);
239
240pub static NSOpenGLCPSurfaceOrder: NSOpenGLContextParameter =
242 NSOpenGLContextParameter(NSOpenGLContextParameter::SurfaceOrder.0);
243
244pub static NSOpenGLCPSurfaceOpacity: NSOpenGLContextParameter =
246 NSOpenGLContextParameter(NSOpenGLContextParameter::SurfaceOpacity.0);
247
248pub static NSOpenGLCPSurfaceBackingSize: NSOpenGLContextParameter =
250 NSOpenGLContextParameter(NSOpenGLContextParameter::SurfaceBackingSize.0);
251
252pub static NSOpenGLCPReclaimResources: NSOpenGLContextParameter =
254 NSOpenGLContextParameter(NSOpenGLContextParameter::ReclaimResources.0);
255
256pub static NSOpenGLCPCurrentRendererID: NSOpenGLContextParameter =
258 NSOpenGLContextParameter(NSOpenGLContextParameter::CurrentRendererID.0);
259
260pub static NSOpenGLCPGPUVertexProcessing: NSOpenGLContextParameter =
262 NSOpenGLContextParameter(NSOpenGLContextParameter::GPUVertexProcessing.0);
263
264pub static NSOpenGLCPGPUFragmentProcessing: NSOpenGLContextParameter =
266 NSOpenGLContextParameter(NSOpenGLContextParameter::GPUFragmentProcessing.0);
267
268pub static NSOpenGLCPHasDrawable: NSOpenGLContextParameter =
270 NSOpenGLContextParameter(NSOpenGLContextParameter::HasDrawable.0);
271
272pub static NSOpenGLCPMPSwapsInFlight: NSOpenGLContextParameter =
274 NSOpenGLContextParameter(NSOpenGLContextParameter::MPSwapsInFlight.0);
275
276pub static NSOpenGLCPSwapRectangle: NSOpenGLContextParameter =
278 NSOpenGLContextParameter(NSOpenGLContextParameter::SwapRectangle.0);
279
280pub static NSOpenGLCPSwapRectangleEnable: NSOpenGLContextParameter =
282 NSOpenGLContextParameter(NSOpenGLContextParameter::SwapRectangleEnable.0);
283
284pub static NSOpenGLCPRasterizationEnable: NSOpenGLContextParameter =
286 NSOpenGLContextParameter(NSOpenGLContextParameter::RasterizationEnable.0);
287
288pub static NSOpenGLCPStateValidation: NSOpenGLContextParameter =
290 NSOpenGLContextParameter(NSOpenGLContextParameter::StateValidation.0);
291
292pub static NSOpenGLCPSurfaceSurfaceVolatile: NSOpenGLContextParameter =
294 NSOpenGLContextParameter(NSOpenGLContextParameter::SurfaceSurfaceVolatile.0);