objc2_gl_kit/generated/
GLKBaseEffect.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::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-open-gl")]
8#[cfg(target_os = "macos")]
9use objc2_open_gl::*;
10
11use crate::*;
12
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/glkit/glkbaseeffect?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct GLKBaseEffect;
18);
19
20#[cfg(feature = "GLKNamedEffect")]
21extern_conformance!(
22    unsafe impl GLKNamedEffect for GLKBaseEffect {}
23);
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for GLKBaseEffect {}
27);
28
29impl GLKBaseEffect {
30    extern_methods!(
31        #[unsafe(method(prepareToDraw))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn prepareToDraw(&self);
34
35        #[cfg(feature = "objc2-open-gl")]
36        #[cfg(target_os = "macos")]
37        #[unsafe(method(colorMaterialEnabled))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn colorMaterialEnabled(&self) -> GLboolean;
40
41        #[cfg(feature = "objc2-open-gl")]
42        #[cfg(target_os = "macos")]
43        /// Setter for [`colorMaterialEnabled`][Self::colorMaterialEnabled].
44        #[unsafe(method(setColorMaterialEnabled:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setColorMaterialEnabled(&self, color_material_enabled: GLboolean);
47
48        #[cfg(feature = "objc2-open-gl")]
49        #[cfg(target_os = "macos")]
50        #[unsafe(method(lightModelTwoSided))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn lightModelTwoSided(&self) -> GLboolean;
53
54        #[cfg(feature = "objc2-open-gl")]
55        #[cfg(target_os = "macos")]
56        /// Setter for [`lightModelTwoSided`][Self::lightModelTwoSided].
57        #[unsafe(method(setLightModelTwoSided:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setLightModelTwoSided(&self, light_model_two_sided: GLboolean);
60
61        #[cfg(feature = "objc2-open-gl")]
62        #[cfg(target_os = "macos")]
63        #[unsafe(method(useConstantColor))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn useConstantColor(&self) -> GLboolean;
66
67        #[cfg(feature = "objc2-open-gl")]
68        #[cfg(target_os = "macos")]
69        /// Setter for [`useConstantColor`][Self::useConstantColor].
70        #[unsafe(method(setUseConstantColor:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn setUseConstantColor(&self, use_constant_color: GLboolean);
73
74        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTransform"))]
75        #[unsafe(method(transform))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn transform(&self) -> Retained<GLKEffectPropertyTransform>;
78
79        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyLight"))]
80        #[unsafe(method(light0))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn light0(&self) -> Retained<GLKEffectPropertyLight>;
83
84        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyLight"))]
85        #[unsafe(method(light1))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn light1(&self) -> Retained<GLKEffectPropertyLight>;
88
89        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyLight"))]
90        #[unsafe(method(light2))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn light2(&self) -> Retained<GLKEffectPropertyLight>;
93
94        #[cfg(all(feature = "GLKEffectPropertyLight", feature = "objc2-open-gl"))]
95        #[cfg(target_os = "macos")]
96        #[unsafe(method(lightingType))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn lightingType(&self) -> GLKLightingType;
99
100        #[cfg(all(feature = "GLKEffectPropertyLight", feature = "objc2-open-gl"))]
101        #[cfg(target_os = "macos")]
102        /// Setter for [`lightingType`][Self::lightingType].
103        #[unsafe(method(setLightingType:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn setLightingType(&self, lighting_type: GLKLightingType);
106
107        #[cfg(feature = "GLKMathTypes")]
108        #[unsafe(method(lightModelAmbientColor))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn lightModelAmbientColor(&self) -> GLKVector4;
111
112        #[cfg(feature = "GLKMathTypes")]
113        /// Setter for [`lightModelAmbientColor`][Self::lightModelAmbientColor].
114        #[unsafe(method(setLightModelAmbientColor:))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn setLightModelAmbientColor(&self, light_model_ambient_color: GLKVector4);
117
118        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyMaterial"))]
119        #[unsafe(method(material))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn material(&self) -> Retained<GLKEffectPropertyMaterial>;
122
123        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
124        #[unsafe(method(texture2d0))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn texture2d0(&self) -> Retained<GLKEffectPropertyTexture>;
127
128        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
129        #[unsafe(method(texture2d1))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn texture2d1(&self) -> Retained<GLKEffectPropertyTexture>;
132
133        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
134        #[unsafe(method(textureOrder))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn textureOrder(&self) -> Option<Retained<NSArray<GLKEffectPropertyTexture>>>;
137
138        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
139        /// Setter for [`textureOrder`][Self::textureOrder].
140        ///
141        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
142        #[unsafe(method(setTextureOrder:))]
143        #[unsafe(method_family = none)]
144        pub unsafe fn setTextureOrder(
145            &self,
146            texture_order: Option<&NSArray<GLKEffectPropertyTexture>>,
147        );
148
149        #[cfg(feature = "GLKMathTypes")]
150        #[unsafe(method(constantColor))]
151        #[unsafe(method_family = none)]
152        pub unsafe fn constantColor(&self) -> GLKVector4;
153
154        #[cfg(feature = "GLKMathTypes")]
155        /// Setter for [`constantColor`][Self::constantColor].
156        #[unsafe(method(setConstantColor:))]
157        #[unsafe(method_family = none)]
158        pub unsafe fn setConstantColor(&self, constant_color: GLKVector4);
159
160        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyFog"))]
161        #[unsafe(method(fog))]
162        #[unsafe(method_family = none)]
163        pub unsafe fn fog(&self) -> Retained<GLKEffectPropertyFog>;
164
165        #[unsafe(method(label))]
166        #[unsafe(method_family = none)]
167        pub unsafe fn label(&self) -> Option<Retained<NSString>>;
168
169        /// Setter for [`label`][Self::label].
170        ///
171        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
172        #[unsafe(method(setLabel:))]
173        #[unsafe(method_family = none)]
174        pub unsafe fn setLabel(&self, label: Option<&NSString>);
175    );
176}
177
178/// Methods declared on superclass `NSObject`.
179impl GLKBaseEffect {
180    extern_methods!(
181        #[unsafe(method(init))]
182        #[unsafe(method_family = init)]
183        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
184
185        #[unsafe(method(new))]
186        #[unsafe(method_family = new)]
187        pub unsafe fn new() -> Retained<Self>;
188    );
189}