objc2_open_gl_es/generated/
EAGLDrawable.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern "C" {
13 pub static kEAGLDrawablePropertyRetainedBacking: &'static NSString;
17}
18
19extern "C" {
20 pub static kEAGLDrawablePropertyColorFormat: &'static NSString;
22}
23
24extern "C" {
25 pub static kEAGLColorFormatRGBA8: &'static NSString;
29}
30
31extern "C" {
32 pub static kEAGLColorFormatRGB565: &'static NSString;
34}
35
36extern "C" {
37 pub static kEAGLColorFormatSRGBA8: &'static NSString;
39}
40
41extern_protocol!(
42 pub unsafe trait EAGLDrawable {
46 #[unsafe(method(drawableProperties))]
47 #[unsafe(method_family = none)]
48 unsafe fn drawableProperties(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
49
50 #[unsafe(method(setDrawableProperties:))]
58 #[unsafe(method_family = none)]
59 unsafe fn setDrawableProperties(
60 &self,
61 drawable_properties: Option<&NSDictionary<NSString, AnyObject>>,
62 );
63 }
64);
65
66#[cfg(feature = "EAGL")]
68impl EAGLContext {
69 extern_methods!(
70 #[unsafe(method(renderbufferStorage:fromDrawable:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn renderbufferStorage_fromDrawable(
73 &self,
74 target: NSUInteger,
75 drawable: Option<&ProtocolObject<dyn EAGLDrawable>>,
76 ) -> bool;
77
78 #[unsafe(method(presentRenderbuffer:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn presentRenderbuffer(&self, target: NSUInteger) -> bool;
81
82 #[cfg(feature = "objc2-core-foundation")]
83 #[unsafe(method(presentRenderbuffer:atTime:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn presentRenderbuffer_atTime(
86 &self,
87 target: NSUInteger,
88 presentation_time: CFTimeInterval,
89 ) -> bool;
90
91 #[cfg(feature = "objc2-core-foundation")]
92 #[unsafe(method(presentRenderbuffer:afterMinimumDuration:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn presentRenderbuffer_afterMinimumDuration(
95 &self,
96 target: NSUInteger,
97 duration: CFTimeInterval,
98 ) -> bool;
99 );
100}