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/glkskyboxeffect?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct GLKSkyboxEffect;
);

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

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

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

        #[unsafe(method(draw))]
        #[unsafe(method_family = none)]
        pub unsafe fn draw(&self);

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

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

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

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

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

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

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

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

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

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

        #[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 GLKSkyboxEffect {
    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>;
    );
}