use crate::common::*;
use crate::Foundation::*;
use crate::Metal::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "Metal_MTLFunctionConstantValues")]
pub struct MTLFunctionConstantValues;
#[cfg(feature = "Metal_MTLFunctionConstantValues")]
unsafe impl ClassType for MTLFunctionConstantValues {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "Metal_MTLFunctionConstantValues")]
unsafe impl NSCopying for MTLFunctionConstantValues {}
#[cfg(feature = "Metal_MTLFunctionConstantValues")]
unsafe impl NSObjectProtocol for MTLFunctionConstantValues {}
extern_methods!(
#[cfg(feature = "Metal_MTLFunctionConstantValues")]
unsafe impl MTLFunctionConstantValues {
#[method(setConstantValue:type:atIndex:)]
pub unsafe fn setConstantValue_type_atIndex(
&self,
value: NonNull<c_void>,
r#type: MTLDataType,
index: NSUInteger,
);
#[method(setConstantValues:type:withRange:)]
pub unsafe fn setConstantValues_type_withRange(
&self,
values: NonNull<c_void>,
r#type: MTLDataType,
range: NSRange,
);
#[cfg(feature = "Foundation_NSString")]
#[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!(
#[cfg(feature = "Metal_MTLFunctionConstantValues")]
unsafe impl MTLFunctionConstantValues {
#[method_id(@__retain_semantics Init init)]
pub fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub fn new() -> Id<Self>;
}
);
#[cfg(feature = "Metal_MTLFunctionConstantValues")]
impl DefaultId for MTLFunctionConstantValues {
#[inline]
fn default_id() -> Id<Self> {
Self::new()
}
}