objc2_gl_kit/generated/
GLKEffectPropertyLight.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-open-gl")]
7#[cfg(target_os = "macos")]
8use objc2_open_gl::*;
9
10use crate::*;
11
12#[cfg(feature = "objc2-open-gl")]
15#[cfg(target_os = "macos")]
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct GLKLightingType(pub GLint);
19#[cfg(feature = "objc2-open-gl")]
20#[cfg(target_os = "macos")]
21impl GLKLightingType {
22 #[doc(alias = "GLKLightingTypePerVertex")]
23 pub const PerVertex: Self = Self(0);
24 #[doc(alias = "GLKLightingTypePerPixel")]
25 pub const PerPixel: Self = Self(1);
26}
27
28#[cfg(feature = "objc2-open-gl")]
29#[cfg(target_os = "macos")]
30unsafe impl Encode for GLKLightingType {
31 const ENCODING: Encoding = GLint::ENCODING;
32}
33
34#[cfg(feature = "objc2-open-gl")]
35#[cfg(target_os = "macos")]
36unsafe impl RefEncode for GLKLightingType {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40extern_class!(
41 #[unsafe(super(GLKEffectProperty, NSObject))]
43 #[derive(Debug, PartialEq, Eq, Hash)]
44 #[cfg(feature = "GLKEffectProperty")]
45 pub struct GLKEffectPropertyLight;
46);
47
48#[cfg(feature = "GLKEffectProperty")]
49extern_conformance!(
50 unsafe impl NSObjectProtocol for GLKEffectPropertyLight {}
51);
52
53#[cfg(feature = "GLKEffectProperty")]
54impl GLKEffectPropertyLight {
55 extern_methods!(
56 #[cfg(feature = "objc2-open-gl")]
57 #[cfg(target_os = "macos")]
58 #[unsafe(method(enabled))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn enabled(&self) -> GLboolean;
61
62 #[cfg(feature = "objc2-open-gl")]
63 #[cfg(target_os = "macos")]
64 #[unsafe(method(setEnabled:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setEnabled(&self, enabled: GLboolean);
68
69 #[cfg(feature = "GLKMathTypes")]
70 #[unsafe(method(position))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn position(&self) -> GLKVector4;
73
74 #[cfg(feature = "GLKMathTypes")]
75 #[unsafe(method(setPosition:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn setPosition(&self, position: GLKVector4);
79
80 #[cfg(feature = "GLKMathTypes")]
81 #[unsafe(method(ambientColor))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn ambientColor(&self) -> GLKVector4;
84
85 #[cfg(feature = "GLKMathTypes")]
86 #[unsafe(method(setAmbientColor:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setAmbientColor(&self, ambient_color: GLKVector4);
90
91 #[cfg(feature = "GLKMathTypes")]
92 #[unsafe(method(diffuseColor))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn diffuseColor(&self) -> GLKVector4;
95
96 #[cfg(feature = "GLKMathTypes")]
97 #[unsafe(method(setDiffuseColor:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn setDiffuseColor(&self, diffuse_color: GLKVector4);
101
102 #[cfg(feature = "GLKMathTypes")]
103 #[unsafe(method(specularColor))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn specularColor(&self) -> GLKVector4;
106
107 #[cfg(feature = "GLKMathTypes")]
108 #[unsafe(method(setSpecularColor:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn setSpecularColor(&self, specular_color: GLKVector4);
112
113 #[cfg(feature = "GLKMathTypes")]
114 #[unsafe(method(spotDirection))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn spotDirection(&self) -> GLKVector3;
117
118 #[cfg(feature = "GLKMathTypes")]
119 #[unsafe(method(setSpotDirection:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn setSpotDirection(&self, spot_direction: GLKVector3);
123
124 #[cfg(feature = "objc2-open-gl")]
125 #[cfg(target_os = "macos")]
126 #[unsafe(method(spotExponent))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn spotExponent(&self) -> GLfloat;
129
130 #[cfg(feature = "objc2-open-gl")]
131 #[cfg(target_os = "macos")]
132 #[unsafe(method(setSpotExponent:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn setSpotExponent(&self, spot_exponent: GLfloat);
136
137 #[cfg(feature = "objc2-open-gl")]
138 #[cfg(target_os = "macos")]
139 #[unsafe(method(spotCutoff))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn spotCutoff(&self) -> GLfloat;
142
143 #[cfg(feature = "objc2-open-gl")]
144 #[cfg(target_os = "macos")]
145 #[unsafe(method(setSpotCutoff:))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn setSpotCutoff(&self, spot_cutoff: GLfloat);
149
150 #[cfg(feature = "objc2-open-gl")]
151 #[cfg(target_os = "macos")]
152 #[unsafe(method(constantAttenuation))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn constantAttenuation(&self) -> GLfloat;
155
156 #[cfg(feature = "objc2-open-gl")]
157 #[cfg(target_os = "macos")]
158 #[unsafe(method(setConstantAttenuation:))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn setConstantAttenuation(&self, constant_attenuation: GLfloat);
162
163 #[cfg(feature = "objc2-open-gl")]
164 #[cfg(target_os = "macos")]
165 #[unsafe(method(linearAttenuation))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn linearAttenuation(&self) -> GLfloat;
168
169 #[cfg(feature = "objc2-open-gl")]
170 #[cfg(target_os = "macos")]
171 #[unsafe(method(setLinearAttenuation:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn setLinearAttenuation(&self, linear_attenuation: GLfloat);
175
176 #[cfg(feature = "objc2-open-gl")]
177 #[cfg(target_os = "macos")]
178 #[unsafe(method(quadraticAttenuation))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn quadraticAttenuation(&self) -> GLfloat;
181
182 #[cfg(feature = "objc2-open-gl")]
183 #[cfg(target_os = "macos")]
184 #[unsafe(method(setQuadraticAttenuation:))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn setQuadraticAttenuation(&self, quadratic_attenuation: GLfloat);
188
189 #[cfg(feature = "GLKEffectPropertyTransform")]
190 #[unsafe(method(transform))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn transform(&self) -> Retained<GLKEffectPropertyTransform>;
193
194 #[cfg(feature = "GLKEffectPropertyTransform")]
195 #[unsafe(method(setTransform:))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn setTransform(&self, transform: &GLKEffectPropertyTransform);
199 );
200}
201
202#[cfg(feature = "GLKEffectProperty")]
204impl GLKEffectPropertyLight {
205 extern_methods!(
206 #[unsafe(method(init))]
207 #[unsafe(method_family = init)]
208 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
209
210 #[unsafe(method(new))]
211 #[unsafe(method_family = new)]
212 pub unsafe fn new() -> Retained<Self>;
213 );
214}