objc2_quartz_core/generated/
CAOpenGLLayer.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-graphics")]
7use objc2_core_graphics::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caopengllayer?language=objc)
14    #[unsafe(super(CALayer, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "CALayer")]
17    #[deprecated = "OpenGL is deprecated"]
18    pub struct CAOpenGLLayer;
19);
20
21#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
22unsafe impl CAMediaTiming for CAOpenGLLayer {}
23
24#[cfg(feature = "CALayer")]
25unsafe impl NSCoding for CAOpenGLLayer {}
26
27#[cfg(feature = "CALayer")]
28unsafe impl NSObjectProtocol for CAOpenGLLayer {}
29
30#[cfg(feature = "CALayer")]
31unsafe impl NSSecureCoding for CAOpenGLLayer {}
32
33#[cfg(feature = "CALayer")]
34impl CAOpenGLLayer {
35    extern_methods!(
36        #[deprecated = "OpenGL is deprecated"]
37        #[unsafe(method(isAsynchronous))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn isAsynchronous(&self) -> bool;
40
41        /// Setter for [`isAsynchronous`][Self::isAsynchronous].
42        #[deprecated = "OpenGL is deprecated"]
43        #[unsafe(method(setAsynchronous:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn setAsynchronous(&self, asynchronous: bool);
46
47        #[cfg(feature = "objc2-core-graphics")]
48        #[deprecated = "OpenGL is deprecated"]
49        #[unsafe(method(colorspace))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn colorspace(&self) -> Option<Retained<CGColorSpace>>;
52
53        #[cfg(feature = "objc2-core-graphics")]
54        /// Setter for [`colorspace`][Self::colorspace].
55        #[deprecated = "OpenGL is deprecated"]
56        #[unsafe(method(setColorspace:))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn setColorspace(&self, colorspace: Option<&CGColorSpace>);
59
60        #[deprecated = "OpenGL is deprecated"]
61        #[unsafe(method(wantsExtendedDynamicRangeContent))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn wantsExtendedDynamicRangeContent(&self) -> bool;
64
65        /// Setter for [`wantsExtendedDynamicRangeContent`][Self::wantsExtendedDynamicRangeContent].
66        #[deprecated = "OpenGL is deprecated"]
67        #[unsafe(method(setWantsExtendedDynamicRangeContent:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn setWantsExtendedDynamicRangeContent(
70            &self,
71            wants_extended_dynamic_range_content: bool,
72        );
73    );
74}
75
76/// Methods declared on superclass `CALayer`.
77#[cfg(feature = "CALayer")]
78impl CAOpenGLLayer {
79    extern_methods!(
80        /// Layer creation and initialization. *
81        #[unsafe(method(layer))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn layer() -> Retained<Self>;
84
85        #[unsafe(method(init))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88
89        #[unsafe(method(initWithLayer:))]
90        #[unsafe(method_family = init)]
91        pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
92    );
93}
94
95/// Methods declared on superclass `NSObject`.
96#[cfg(feature = "CALayer")]
97impl CAOpenGLLayer {
98    extern_methods!(
99        #[unsafe(method(new))]
100        #[unsafe(method_family = new)]
101        pub unsafe fn new() -> Retained<Self>;
102    );
103}