objc2_metal/generated/
MTLFunctionConstantValues.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct MTLFunctionConstantValues;
15);
16
17extern_conformance!(
18 unsafe impl NSCopying for MTLFunctionConstantValues {}
19);
20
21unsafe impl CopyingHelper for MTLFunctionConstantValues {
22 type Result = Self;
23}
24
25extern_conformance!(
26 unsafe impl NSObjectProtocol for MTLFunctionConstantValues {}
27);
28
29impl MTLFunctionConstantValues {
30 extern_methods!(
31 #[cfg(feature = "MTLDataType")]
32 #[unsafe(method(setConstantValue:type:atIndex:))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn setConstantValue_type_atIndex(
39 &self,
40 value: NonNull<c_void>,
41 r#type: MTLDataType,
42 index: NSUInteger,
43 );
44
45 #[cfg(feature = "MTLDataType")]
46 #[unsafe(method(setConstantValues:type:withRange:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setConstantValues_type_withRange(
53 &self,
54 values: NonNull<c_void>,
55 r#type: MTLDataType,
56 range: NSRange,
57 );
58
59 #[cfg(feature = "MTLDataType")]
60 #[unsafe(method(setConstantValue:type:withName:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setConstantValue_type_withName(
66 &self,
67 value: NonNull<c_void>,
68 r#type: MTLDataType,
69 name: &NSString,
70 );
71
72 #[unsafe(method(reset))]
73 #[unsafe(method_family = none)]
74 pub fn reset(&self);
75 );
76}
77
78impl MTLFunctionConstantValues {
80 extern_methods!(
81 #[unsafe(method(init))]
82 #[unsafe(method_family = init)]
83 pub fn init(this: Allocated<Self>) -> Retained<Self>;
84
85 #[unsafe(method(new))]
86 #[unsafe(method_family = new)]
87 pub fn new() -> Retained<Self>;
88 );
89}
90
91impl DefaultRetained for MTLFunctionConstantValues {
92 #[inline]
93 fn default_retained() -> Retained<Self> {
94 Self::new()
95 }
96}