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"))]
22extern_conformance!(
23    unsafe impl CAMediaTiming for CAOpenGLLayer {}
24);
25
26#[cfg(feature = "CALayer")]
27extern_conformance!(
28    unsafe impl NSCoding for CAOpenGLLayer {}
29);
30
31#[cfg(feature = "CALayer")]
32extern_conformance!(
33    unsafe impl NSObjectProtocol for CAOpenGLLayer {}
34);
35
36#[cfg(feature = "CALayer")]
37extern_conformance!(
38    unsafe impl NSSecureCoding for CAOpenGLLayer {}
39);
40
41#[cfg(feature = "CALayer")]
42impl CAOpenGLLayer {
43    extern_methods!(
44        #[deprecated = "OpenGL is deprecated"]
45        #[unsafe(method(isAsynchronous))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn isAsynchronous(&self) -> bool;
48
49        /// Setter for [`isAsynchronous`][Self::isAsynchronous].
50        #[deprecated = "OpenGL is deprecated"]
51        #[unsafe(method(setAsynchronous:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setAsynchronous(&self, asynchronous: bool);
54
55        #[cfg(feature = "objc2-core-graphics")]
56        #[deprecated = "OpenGL is deprecated"]
57        #[unsafe(method(colorspace))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn colorspace(&self) -> Option<Retained<CGColorSpace>>;
60
61        #[cfg(feature = "objc2-core-graphics")]
62        /// Setter for [`colorspace`][Self::colorspace].
63        #[deprecated = "OpenGL is deprecated"]
64        #[unsafe(method(setColorspace:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn setColorspace(&self, colorspace: Option<&CGColorSpace>);
67
68        #[deprecated = "OpenGL is deprecated"]
69        #[unsafe(method(wantsExtendedDynamicRangeContent))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn wantsExtendedDynamicRangeContent(&self) -> bool;
72
73        /// Setter for [`wantsExtendedDynamicRangeContent`][Self::wantsExtendedDynamicRangeContent].
74        #[deprecated = "OpenGL is deprecated"]
75        #[unsafe(method(setWantsExtendedDynamicRangeContent:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn setWantsExtendedDynamicRangeContent(
78            &self,
79            wants_extended_dynamic_range_content: bool,
80        );
81    );
82}
83
84/// Methods declared on superclass `CALayer`.
85#[cfg(feature = "CALayer")]
86impl CAOpenGLLayer {
87    extern_methods!(
88        /// Layer creation and initialization. *
89        #[unsafe(method(layer))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn layer() -> Retained<Self>;
92
93        #[unsafe(method(init))]
94        #[unsafe(method_family = init)]
95        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
96
97        #[unsafe(method(initWithLayer:))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
100    );
101}
102
103/// Methods declared on superclass `NSObject`.
104#[cfg(feature = "CALayer")]
105impl CAOpenGLLayer {
106    extern_methods!(
107        #[unsafe(method(new))]
108        #[unsafe(method_family = new)]
109        pub unsafe fn new() -> Retained<Self>;
110    );
111}