objc2-metal 0.2.2

Bindings to the Metal framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MTLFunctionConstantValues;

    unsafe impl ClassType for MTLFunctionConstantValues {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCopying for MTLFunctionConstantValues {}

unsafe impl NSObjectProtocol for MTLFunctionConstantValues {}

extern_methods!(
    unsafe impl MTLFunctionConstantValues {
        #[cfg(feature = "MTLArgument")]
        #[method(setConstantValue:type:atIndex:)]
        pub unsafe fn setConstantValue_type_atIndex(
            &self,
            value: NonNull<c_void>,
            r#type: MTLDataType,
            index: NSUInteger,
        );

        #[cfg(feature = "MTLArgument")]
        #[method(setConstantValues:type:withRange:)]
        pub unsafe fn setConstantValues_type_withRange(
            &self,
            values: NonNull<c_void>,
            r#type: MTLDataType,
            range: NSRange,
        );

        #[cfg(feature = "MTLArgument")]
        #[method(setConstantValue:type:withName:)]
        pub unsafe fn setConstantValue_type_withName(
            &self,
            value: NonNull<c_void>,
            r#type: MTLDataType,
            name: &NSString,
        );

        #[method(reset)]
        pub fn reset(&self);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl MTLFunctionConstantValues {
        #[method_id(@__retain_semantics Init init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub fn new() -> Retained<Self>;
    }
);

impl DefaultRetained for MTLFunctionConstantValues {
    #[inline]
    fn default_id() -> Retained<Self> {
        Self::new()
    }
}