use objc2::{
extern_class, extern_conformance, extern_methods,
rc::{Allocated, Retained},
runtime::NSObject,
};
use objc2_foundation::{CopyingHelper, NSCopying, NSObjectProtocol};
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLResourceStatePassSampleBufferAttachmentDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTLResourceStatePassSampleBufferAttachmentDescriptor {}
);
unsafe impl CopyingHelper for MTLResourceStatePassSampleBufferAttachmentDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTLResourceStatePassSampleBufferAttachmentDescriptor {}
);
impl MTLResourceStatePassSampleBufferAttachmentDescriptor {
extern_methods!(
#[unsafe(method(startOfEncoderSampleIndex))]
#[unsafe(method_family = none)]
pub fn start_of_encoder_sample_index(&self) -> usize;
#[unsafe(method(setStartOfEncoderSampleIndex:))]
#[unsafe(method_family = none)]
pub fn set_start_of_encoder_sample_index(
&self,
index: usize,
);
#[unsafe(method(endOfEncoderSampleIndex))]
#[unsafe(method_family = none)]
pub fn end_of_encoder_sample_index(&self) -> usize;
#[unsafe(method(setEndOfEncoderSampleIndex:))]
#[unsafe(method_family = none)]
pub fn set_end_of_encoder_sample_index(
&self,
index: usize,
);
);
}
impl MTLResourceStatePassSampleBufferAttachmentDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}