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/glkfogmode?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 GLKFogMode(pub GLint);
#[cfg(feature = "objc2-open-gl")]
#[cfg(target_os = "macos")]
impl GLKFogMode {
    #[doc(alias = "GLKFogModeExp")]
    pub const Exp: Self = Self(0);
    #[doc(alias = "GLKFogModeExp2")]
    pub const Exp2: Self = Self(1);
    #[doc(alias = "GLKFogModeLinear")]
    pub const Linear: Self = Self(2);
}

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

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

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

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

#[cfg(feature = "GLKEffectProperty")]
impl GLKEffectPropertyFog {
    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 = "objc2-open-gl")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(mode))]
        #[unsafe(method_family = none)]
        pub unsafe fn mode(&self) -> GLint;

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

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

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

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

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

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

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

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

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

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