use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTL4LibraryDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTL4LibraryDescriptor {}
);
unsafe impl CopyingHelper for MTL4LibraryDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTL4LibraryDescriptor {}
);
impl MTL4LibraryDescriptor {
extern_methods!(
#[unsafe(method(source))]
#[unsafe(method_family = none)]
pub fn source(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setSource:))]
#[unsafe(method_family = none)]
pub fn setSource(&self, source: Option<&NSString>);
#[cfg(feature = "MTLLibrary")]
#[unsafe(method(options))]
#[unsafe(method_family = none)]
pub fn options(&self) -> Option<Retained<MTLCompileOptions>>;
#[cfg(feature = "MTLLibrary")]
#[unsafe(method(setOptions:))]
#[unsafe(method_family = none)]
pub fn setOptions(&self, options: Option<&MTLCompileOptions>);
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub fn name(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setName:))]
#[unsafe(method_family = none)]
pub fn setName(&self, name: Option<&NSString>);
);
}
impl MTL4LibraryDescriptor {
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>;
);
}
impl DefaultRetained for MTL4LibraryDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}