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!(
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()
}
}