objc2-gl-kit 0.3.2

Bindings to the GLKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-open-gl")]
#[cfg(target_os = "macos")]
use objc2_open_gl::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/glkit/glklightingtype?language=objc)
// NS_ENUM
#[cfg(feature = "objc2-open-gl")]
#[cfg(target_os = "macos")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct GLKLightingType(pub GLint);
#[cfg(feature = "objc2-open-gl")]
#[cfg(target_os = "macos")]
impl GLKLightingType {
    #[doc(alias = "GLKLightingTypePerVertex")]
    pub const PerVertex: Self = Self(0);
    #[doc(alias = "GLKLightingTypePerPixel")]
    pub const PerPixel: Self = Self(1);
}

#[cfg(feature = "objc2-open-gl")]
#[cfg(target_os = "macos")]
unsafe impl Encode for GLKLightingType {
    const ENCODING: Encoding = GLint::ENCODING;
}

#[cfg(feature = "objc2-open-gl")]
#[cfg(target_os = "macos")]
unsafe impl RefEncode for GLKLightingType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/glkit/glkeffectpropertylight?language=objc)
    #[unsafe(super(GLKEffectProperty, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "GLKEffectProperty")]
    pub struct GLKEffectPropertyLight;
);

#[cfg(feature = "GLKEffectProperty")]
extern_conformance!(
    unsafe impl NSObjectProtocol for GLKEffectPropertyLight {}
);

#[cfg(feature = "GLKEffectProperty")]
impl GLKEffectPropertyLight {
    extern_methods!(
        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(enabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn enabled(&self) -> GLboolean;

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        /// Setter for [`enabled`][Self::enabled].
        #[unsafe(method(setEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEnabled(&self, enabled: GLboolean);

        #[cfg(feature = "GLKMathTypes")]
        #[unsafe(method(position))]
        #[unsafe(method_family = none)]
        pub unsafe fn position(&self) -> GLKVector4;

        #[cfg(feature = "GLKMathTypes")]
        /// Setter for [`position`][Self::position].
        #[unsafe(method(setPosition:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPosition(&self, position: GLKVector4);

        #[cfg(feature = "GLKMathTypes")]
        #[unsafe(method(ambientColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn ambientColor(&self) -> GLKVector4;

        #[cfg(feature = "GLKMathTypes")]
        /// Setter for [`ambientColor`][Self::ambientColor].
        #[unsafe(method(setAmbientColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAmbientColor(&self, ambient_color: GLKVector4);

        #[cfg(feature = "GLKMathTypes")]
        #[unsafe(method(diffuseColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn diffuseColor(&self) -> GLKVector4;

        #[cfg(feature = "GLKMathTypes")]
        /// Setter for [`diffuseColor`][Self::diffuseColor].
        #[unsafe(method(setDiffuseColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDiffuseColor(&self, diffuse_color: GLKVector4);

        #[cfg(feature = "GLKMathTypes")]
        #[unsafe(method(specularColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn specularColor(&self) -> GLKVector4;

        #[cfg(feature = "GLKMathTypes")]
        /// Setter for [`specularColor`][Self::specularColor].
        #[unsafe(method(setSpecularColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSpecularColor(&self, specular_color: GLKVector4);

        #[cfg(feature = "GLKMathTypes")]
        #[unsafe(method(spotDirection))]
        #[unsafe(method_family = none)]
        pub unsafe fn spotDirection(&self) -> GLKVector3;

        #[cfg(feature = "GLKMathTypes")]
        /// Setter for [`spotDirection`][Self::spotDirection].
        #[unsafe(method(setSpotDirection:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSpotDirection(&self, spot_direction: GLKVector3);

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(spotExponent))]
        #[unsafe(method_family = none)]
        pub unsafe fn spotExponent(&self) -> GLfloat;

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        /// Setter for [`spotExponent`][Self::spotExponent].
        #[unsafe(method(setSpotExponent:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSpotExponent(&self, spot_exponent: GLfloat);

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(spotCutoff))]
        #[unsafe(method_family = none)]
        pub unsafe fn spotCutoff(&self) -> GLfloat;

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        /// Setter for [`spotCutoff`][Self::spotCutoff].
        #[unsafe(method(setSpotCutoff:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSpotCutoff(&self, spot_cutoff: GLfloat);

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(constantAttenuation))]
        #[unsafe(method_family = none)]
        pub unsafe fn constantAttenuation(&self) -> GLfloat;

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        /// Setter for [`constantAttenuation`][Self::constantAttenuation].
        #[unsafe(method(setConstantAttenuation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setConstantAttenuation(&self, constant_attenuation: GLfloat);

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(linearAttenuation))]
        #[unsafe(method_family = none)]
        pub unsafe fn linearAttenuation(&self) -> GLfloat;

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        /// Setter for [`linearAttenuation`][Self::linearAttenuation].
        #[unsafe(method(setLinearAttenuation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLinearAttenuation(&self, linear_attenuation: GLfloat);

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(quadraticAttenuation))]
        #[unsafe(method_family = none)]
        pub unsafe fn quadraticAttenuation(&self) -> GLfloat;

        #[cfg(feature = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        /// Setter for [`quadraticAttenuation`][Self::quadraticAttenuation].
        #[unsafe(method(setQuadraticAttenuation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setQuadraticAttenuation(&self, quadratic_attenuation: GLfloat);

        #[cfg(feature = "GLKEffectPropertyTransform")]
        #[unsafe(method(transform))]
        #[unsafe(method_family = none)]
        pub unsafe fn transform(&self) -> Retained<GLKEffectPropertyTransform>;

        #[cfg(feature = "GLKEffectPropertyTransform")]
        /// Setter for [`transform`][Self::transform].
        #[unsafe(method(setTransform:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTransform(&self, transform: &GLKEffectPropertyTransform);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "GLKEffectProperty")]
impl GLKEffectPropertyLight {
    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>;
    );
}