use objc2::{
extern_class, extern_conformance, extern_methods,
rc::{Allocated, Retained},
runtime::{NSObject, ProtocolObject},
};
use objc2_foundation::NSObjectProtocol;
use crate::MTLBuffer;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLMotionKeyframeData;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MTLMotionKeyframeData {}
);
impl MTLMotionKeyframeData {
extern_methods!(
#[unsafe(method(buffer))]
#[unsafe(method_family = none)]
pub fn buffer(&self) -> Option<Retained<ProtocolObject<dyn MTLBuffer>>>;
#[unsafe(method(setBuffer:))]
#[unsafe(method_family = none)]
pub fn set_buffer(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
);
#[unsafe(method(offset))]
#[unsafe(method_family = none)]
pub fn offset(&self) -> usize;
#[unsafe(method(setOffset:))]
#[unsafe(method_family = none)]
pub fn set_offset(
&self,
offset: usize,
);
#[unsafe(method(data))]
#[unsafe(method_family = none)]
pub fn data() -> Retained<Self>;
);
}
impl MTLMotionKeyframeData {
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>;
);
}