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::*;
use objc2_foundation::*;
#[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/glkbaseeffect?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct GLKBaseEffect;
);

#[cfg(feature = "GLKNamedEffect")]
extern_conformance!(
    unsafe impl GLKNamedEffect for GLKBaseEffect {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for GLKBaseEffect {}
);

impl GLKBaseEffect {
    extern_methods!(
        #[unsafe(method(prepareToDraw))]
        #[unsafe(method_family = none)]
        pub unsafe fn prepareToDraw(&self);

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

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

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

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

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

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

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

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyLight"))]
        #[unsafe(method(light0))]
        #[unsafe(method_family = none)]
        pub unsafe fn light0(&self) -> Retained<GLKEffectPropertyLight>;

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyLight"))]
        #[unsafe(method(light1))]
        #[unsafe(method_family = none)]
        pub unsafe fn light1(&self) -> Retained<GLKEffectPropertyLight>;

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyLight"))]
        #[unsafe(method(light2))]
        #[unsafe(method_family = none)]
        pub unsafe fn light2(&self) -> Retained<GLKEffectPropertyLight>;

        #[cfg(all(feature = "GLKEffectPropertyLight", feature = "objc2-open-gl"))]
        #[cfg(target_os = "macos")]
        #[unsafe(method(lightingType))]
        #[unsafe(method_family = none)]
        pub unsafe fn lightingType(&self) -> GLKLightingType;

        #[cfg(all(feature = "GLKEffectPropertyLight", feature = "objc2-open-gl"))]
        #[cfg(target_os = "macos")]
        /// Setter for [`lightingType`][Self::lightingType].
        #[unsafe(method(setLightingType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLightingType(&self, lighting_type: GLKLightingType);

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

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

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyMaterial"))]
        #[unsafe(method(material))]
        #[unsafe(method_family = none)]
        pub unsafe fn material(&self) -> Retained<GLKEffectPropertyMaterial>;

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
        #[unsafe(method(texture2d0))]
        #[unsafe(method_family = none)]
        pub unsafe fn texture2d0(&self) -> Retained<GLKEffectPropertyTexture>;

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
        #[unsafe(method(texture2d1))]
        #[unsafe(method_family = none)]
        pub unsafe fn texture2d1(&self) -> Retained<GLKEffectPropertyTexture>;

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
        #[unsafe(method(textureOrder))]
        #[unsafe(method_family = none)]
        pub unsafe fn textureOrder(&self) -> Option<Retained<NSArray<GLKEffectPropertyTexture>>>;

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyTexture"))]
        /// Setter for [`textureOrder`][Self::textureOrder].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setTextureOrder:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextureOrder(
            &self,
            texture_order: Option<&NSArray<GLKEffectPropertyTexture>>,
        );

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

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

        #[cfg(all(feature = "GLKEffectProperty", feature = "GLKEffectPropertyFog"))]
        #[unsafe(method(fog))]
        #[unsafe(method_family = none)]
        pub unsafe fn fog(&self) -> Retained<GLKEffectPropertyFog>;

        #[unsafe(method(label))]
        #[unsafe(method_family = none)]
        pub unsafe fn label(&self) -> Option<Retained<NSString>>;

        /// Setter for [`label`][Self::label].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLabel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLabel(&self, label: Option<&NSString>);
    );
}

/// Methods declared on superclass `NSObject`.
impl GLKBaseEffect {
    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>;
    );
}