objc2_core_video/generated/
CVOpenGLBufferPool.rs1use core::cell::UnsafeCell;
4use core::marker::{PhantomData, PhantomPinned};
5use core::ptr::NonNull;
6use objc2_core_foundation::*;
7
8use crate::*;
9
10#[repr(C)]
12pub struct CVOpenGLBufferPool {
13 inner: [u8; 0],
14 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
15}
16
17cf_type!(
18 #[encoding_name = "__CVOpenGLBufferPool"]
19 unsafe impl CVOpenGLBufferPool {}
20);
21
22extern "C" {
23 pub static kCVOpenGLBufferPoolMinimumBufferCountKey: &'static CFString;
25}
26
27extern "C" {
28 pub static kCVOpenGLBufferPoolMaximumBufferAgeKey: &'static CFString;
30}
31
32unsafe impl ConcreteType for CVOpenGLBufferPool {
33 #[doc(alias = "CVOpenGLBufferPoolGetTypeID")]
34 #[inline]
35 fn type_id() -> CFTypeID {
36 extern "C-unwind" {
37 fn CVOpenGLBufferPoolGetTypeID() -> CFTypeID;
38 }
39 unsafe { CVOpenGLBufferPoolGetTypeID() }
40 }
41}
42
43extern "C-unwind" {
44 #[cfg(feature = "CVReturn")]
58 #[deprecated = "OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)"]
59 pub fn CVOpenGLBufferPoolCreate(
60 allocator: Option<&CFAllocator>,
61 pool_attributes: Option<&CFDictionary>,
62 open_gl_buffer_attributes: Option<&CFDictionary>,
63 pool_out: NonNull<*mut CVOpenGLBufferPool>,
64 ) -> CVReturn;
65}
66
67#[deprecated = "OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)"]
73#[inline]
74pub unsafe extern "C-unwind" fn CVOpenGLBufferPoolGetAttributes(
75 pool: &CVOpenGLBufferPool,
76) -> Option<CFRetained<CFDictionary>> {
77 extern "C-unwind" {
78 fn CVOpenGLBufferPoolGetAttributes(
79 pool: &CVOpenGLBufferPool,
80 ) -> Option<NonNull<CFDictionary>>;
81 }
82 let ret = unsafe { CVOpenGLBufferPoolGetAttributes(pool) };
83 ret.map(|ret| unsafe { CFRetained::retain(ret) })
84}
85
86#[deprecated = "OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)"]
95#[inline]
96pub unsafe extern "C-unwind" fn CVOpenGLBufferPoolGetOpenGLBufferAttributes(
97 pool: &CVOpenGLBufferPool,
98) -> Option<CFRetained<CFDictionary>> {
99 extern "C-unwind" {
100 fn CVOpenGLBufferPoolGetOpenGLBufferAttributes(
101 pool: &CVOpenGLBufferPool,
102 ) -> Option<NonNull<CFDictionary>>;
103 }
104 let ret = unsafe { CVOpenGLBufferPoolGetOpenGLBufferAttributes(pool) };
105 ret.map(|ret| unsafe { CFRetained::retain(ret) })
106}
107
108extern "C-unwind" {
109 #[cfg(all(
121 feature = "CVBuffer",
122 feature = "CVImageBuffer",
123 feature = "CVOpenGLBuffer",
124 feature = "CVReturn"
125 ))]
126 #[deprecated = "OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)"]
127 pub fn CVOpenGLBufferPoolCreateOpenGLBuffer(
128 allocator: Option<&CFAllocator>,
129 open_gl_buffer_pool: &CVOpenGLBufferPool,
130 open_gl_buffer_out: NonNull<*mut CVOpenGLBuffer>,
131 ) -> CVReturn;
132}