objc2_metal/generated/
MTLBlitPass.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 MTLBlitPassSampleBufferAttachmentDescriptor;
15);
16
17extern_conformance!(
18 unsafe impl NSCopying for MTLBlitPassSampleBufferAttachmentDescriptor {}
19);
20
21unsafe impl CopyingHelper for MTLBlitPassSampleBufferAttachmentDescriptor {
22 type Result = Self;
23}
24
25extern_conformance!(
26 unsafe impl NSObjectProtocol for MTLBlitPassSampleBufferAttachmentDescriptor {}
27);
28
29impl MTLBlitPassSampleBufferAttachmentDescriptor {
30 extern_methods!(
31 #[cfg(feature = "MTLCounters")]
32 #[unsafe(method(sampleBuffer))]
38 #[unsafe(method_family = none)]
39 pub fn sampleBuffer(&self) -> Option<Retained<ProtocolObject<dyn MTLCounterSampleBuffer>>>;
40
41 #[cfg(feature = "MTLCounters")]
42 #[unsafe(method(setSampleBuffer:))]
44 #[unsafe(method_family = none)]
45 pub fn setSampleBuffer(
46 &self,
47 sample_buffer: Option<&ProtocolObject<dyn MTLCounterSampleBuffer>>,
48 );
49
50 #[unsafe(method(startOfEncoderSampleIndex))]
57 #[unsafe(method_family = none)]
58 pub fn startOfEncoderSampleIndex(&self) -> NSUInteger;
59
60 #[unsafe(method(setStartOfEncoderSampleIndex:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setStartOfEncoderSampleIndex(
68 &self,
69 start_of_encoder_sample_index: NSUInteger,
70 );
71
72 #[unsafe(method(endOfEncoderSampleIndex))]
79 #[unsafe(method_family = none)]
80 pub fn endOfEncoderSampleIndex(&self) -> NSUInteger;
81
82 #[unsafe(method(setEndOfEncoderSampleIndex:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setEndOfEncoderSampleIndex(&self, end_of_encoder_sample_index: NSUInteger);
90 );
91}
92
93impl MTLBlitPassSampleBufferAttachmentDescriptor {
95 extern_methods!(
96 #[unsafe(method(init))]
97 #[unsafe(method_family = init)]
98 pub fn init(this: Allocated<Self>) -> Retained<Self>;
99
100 #[unsafe(method(new))]
101 #[unsafe(method_family = new)]
102 pub fn new() -> Retained<Self>;
103 );
104}
105
106impl DefaultRetained for MTLBlitPassSampleBufferAttachmentDescriptor {
107 #[inline]
108 fn default_retained() -> Retained<Self> {
109 Self::new()
110 }
111}
112
113extern_class!(
114 #[unsafe(super(NSObject))]
116 #[derive(Debug, PartialEq, Eq, Hash)]
117 pub struct MTLBlitPassSampleBufferAttachmentDescriptorArray;
118);
119
120extern_conformance!(
121 unsafe impl NSObjectProtocol for MTLBlitPassSampleBufferAttachmentDescriptorArray {}
122);
123
124impl MTLBlitPassSampleBufferAttachmentDescriptorArray {
125 extern_methods!(
126 #[unsafe(method(objectAtIndexedSubscript:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn objectAtIndexedSubscript(
132 &self,
133 attachment_index: NSUInteger,
134 ) -> Retained<MTLBlitPassSampleBufferAttachmentDescriptor>;
135
136 #[unsafe(method(setObject:atIndexedSubscript:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setObject_atIndexedSubscript(
142 &self,
143 attachment: Option<&MTLBlitPassSampleBufferAttachmentDescriptor>,
144 attachment_index: NSUInteger,
145 );
146 );
147}
148
149impl MTLBlitPassSampleBufferAttachmentDescriptorArray {
151 extern_methods!(
152 #[unsafe(method(init))]
153 #[unsafe(method_family = init)]
154 pub fn init(this: Allocated<Self>) -> Retained<Self>;
155
156 #[unsafe(method(new))]
157 #[unsafe(method_family = new)]
158 pub fn new() -> Retained<Self>;
159 );
160}
161
162impl DefaultRetained for MTLBlitPassSampleBufferAttachmentDescriptorArray {
163 #[inline]
164 fn default_retained() -> Retained<Self> {
165 Self::new()
166 }
167}
168
169extern_class!(
170 #[unsafe(super(NSObject))]
174 #[derive(Debug, PartialEq, Eq, Hash)]
175 pub struct MTLBlitPassDescriptor;
176);
177
178extern_conformance!(
179 unsafe impl NSCopying for MTLBlitPassDescriptor {}
180);
181
182unsafe impl CopyingHelper for MTLBlitPassDescriptor {
183 type Result = Self;
184}
185
186extern_conformance!(
187 unsafe impl NSObjectProtocol for MTLBlitPassDescriptor {}
188);
189
190impl MTLBlitPassDescriptor {
191 extern_methods!(
192 #[unsafe(method(blitPassDescriptor))]
194 #[unsafe(method_family = none)]
195 pub fn blitPassDescriptor() -> Retained<MTLBlitPassDescriptor>;
196
197 #[unsafe(method(sampleBufferAttachments))]
199 #[unsafe(method_family = none)]
200 pub fn sampleBufferAttachments(
201 &self,
202 ) -> Retained<MTLBlitPassSampleBufferAttachmentDescriptorArray>;
203 );
204}
205
206impl MTLBlitPassDescriptor {
208 extern_methods!(
209 #[unsafe(method(init))]
210 #[unsafe(method_family = init)]
211 pub fn init(this: Allocated<Self>) -> Retained<Self>;
212
213 #[unsafe(method(new))]
214 #[unsafe(method_family = new)]
215 pub fn new() -> Retained<Self>;
216 );
217}
218
219impl DefaultRetained for MTLBlitPassDescriptor {
220 #[inline]
221 fn default_retained() -> Retained<Self> {
222 Self::new()
223 }
224}