use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
use objc2_gl_kit::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SKUniformType(pub NSInteger);
impl SKUniformType {
#[doc(alias = "SKUniformTypeNone")]
pub const None: Self = Self(0);
#[doc(alias = "SKUniformTypeFloat")]
pub const Float: Self = Self(1);
#[doc(alias = "SKUniformTypeFloatVector2")]
pub const FloatVector2: Self = Self(2);
#[doc(alias = "SKUniformTypeFloatVector3")]
pub const FloatVector3: Self = Self(3);
#[doc(alias = "SKUniformTypeFloatVector4")]
pub const FloatVector4: Self = Self(4);
#[doc(alias = "SKUniformTypeFloatMatrix2")]
pub const FloatMatrix2: Self = Self(5);
#[doc(alias = "SKUniformTypeFloatMatrix3")]
pub const FloatMatrix3: Self = Self(6);
#[doc(alias = "SKUniformTypeFloatMatrix4")]
pub const FloatMatrix4: Self = Self(7);
#[doc(alias = "SKUniformTypeTexture")]
pub const Texture: Self = Self(8);
}
unsafe impl Encode for SKUniformType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SKUniformType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKUniform;
);
extern_conformance!(
unsafe impl NSCoding for SKUniform {}
);
extern_conformance!(
unsafe impl NSCopying for SKUniform {}
);
unsafe impl CopyingHelper for SKUniform {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SKUniform {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKUniform {}
);
impl SKUniform {
extern_methods!(
#[unsafe(method(uniformWithName:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName(name: &NSString) -> Retained<Self>;
#[cfg(feature = "SKTexture")]
#[unsafe(method(uniformWithName:texture:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_texture(
name: &NSString,
texture: Option<&SKTexture>,
) -> Retained<Self>;
#[unsafe(method(uniformWithName:float:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_float(name: &NSString, value: c_float) -> Retained<Self>;
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[unsafe(method(uniformType))]
#[unsafe(method_family = none)]
pub unsafe fn uniformType(&self) -> SKUniformType;
#[cfg(feature = "SKTexture")]
#[unsafe(method(textureValue))]
#[unsafe(method_family = none)]
pub unsafe fn textureValue(&self) -> Option<Retained<SKTexture>>;
#[cfg(feature = "SKTexture")]
#[unsafe(method(setTextureValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setTextureValue(&self, texture_value: Option<&SKTexture>);
#[unsafe(method(floatValue))]
#[unsafe(method_family = none)]
pub unsafe fn floatValue(&self) -> c_float;
#[unsafe(method(setFloatValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setFloatValue(&self, float_value: c_float);
#[unsafe(method(initWithName:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName(this: Allocated<Self>, name: &NSString) -> Retained<Self>;
#[cfg(feature = "SKTexture")]
#[unsafe(method(initWithName:texture:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_texture(
this: Allocated<Self>,
name: &NSString,
texture: Option<&SKTexture>,
) -> Retained<Self>;
#[unsafe(method(initWithName:float:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_float(
this: Allocated<Self>,
name: &NSString,
value: c_float,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(floatVector2Value))]
#[unsafe(method_family = none)]
pub unsafe fn floatVector2Value(&self) -> GLKVector2;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(setFloatVector2Value:))]
#[unsafe(method_family = none)]
pub unsafe fn setFloatVector2Value(&self, float_vector2_value: GLKVector2);
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(floatVector3Value))]
#[unsafe(method_family = none)]
pub unsafe fn floatVector3Value(&self) -> GLKVector3;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(setFloatVector3Value:))]
#[unsafe(method_family = none)]
pub unsafe fn setFloatVector3Value(&self, float_vector3_value: GLKVector3);
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(floatVector4Value))]
#[unsafe(method_family = none)]
pub unsafe fn floatVector4Value(&self) -> GLKVector4;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(setFloatVector4Value:))]
#[unsafe(method_family = none)]
pub unsafe fn setFloatVector4Value(&self, float_vector4_value: GLKVector4);
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(floatMatrix2Value))]
#[unsafe(method_family = none)]
pub unsafe fn floatMatrix2Value(&self) -> GLKMatrix2;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(setFloatMatrix2Value:))]
#[unsafe(method_family = none)]
pub unsafe fn setFloatMatrix2Value(&self, float_matrix2_value: GLKMatrix2);
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(floatMatrix3Value))]
#[unsafe(method_family = none)]
pub unsafe fn floatMatrix3Value(&self) -> GLKMatrix3;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(setFloatMatrix3Value:))]
#[unsafe(method_family = none)]
pub unsafe fn setFloatMatrix3Value(&self, float_matrix3_value: GLKMatrix3);
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(floatMatrix4Value))]
#[unsafe(method_family = none)]
pub unsafe fn floatMatrix4Value(&self) -> GLKMatrix4;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(setFloatMatrix4Value:))]
#[unsafe(method_family = none)]
pub unsafe fn setFloatMatrix4Value(&self, float_matrix4_value: GLKMatrix4);
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(uniformWithName:floatVector2:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_floatVector2(
name: &NSString,
value: GLKVector2,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(uniformWithName:floatVector3:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_floatVector3(
name: &NSString,
value: GLKVector3,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(uniformWithName:floatVector4:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_floatVector4(
name: &NSString,
value: GLKVector4,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(uniformWithName:floatMatrix2:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_floatMatrix2(
name: &NSString,
value: GLKMatrix2,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(uniformWithName:floatMatrix3:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_floatMatrix3(
name: &NSString,
value: GLKMatrix3,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(uniformWithName:floatMatrix4:))]
#[unsafe(method_family = none)]
pub unsafe fn uniformWithName_floatMatrix4(
name: &NSString,
value: GLKMatrix4,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(initWithName:floatVector2:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_floatVector2(
this: Allocated<Self>,
name: &NSString,
value: GLKVector2,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(initWithName:floatVector3:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_floatVector3(
this: Allocated<Self>,
name: &NSString,
value: GLKVector3,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(initWithName:floatVector4:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_floatVector4(
this: Allocated<Self>,
name: &NSString,
value: GLKVector4,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(initWithName:floatMatrix2:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_floatMatrix2(
this: Allocated<Self>,
name: &NSString,
value: GLKMatrix2,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(initWithName:floatMatrix3:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_floatMatrix3(
this: Allocated<Self>,
name: &NSString,
value: GLKMatrix3,
) -> Retained<Self>;
#[cfg(feature = "objc2-gl-kit")]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[deprecated]
#[unsafe(method(initWithName:floatMatrix4:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_floatMatrix4(
this: Allocated<Self>,
name: &NSString,
value: GLKMatrix4,
) -> Retained<Self>;
);
}
impl SKUniform {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}