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::*;

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

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

#[cfg(feature = "GLKEffectProperty")]
impl GLKEffectPropertyMaterial {
    extern_methods!(
        #[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(emissiveColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn emissiveColor(&self) -> GLKVector4;

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

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

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

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