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 MTL4StaticLinkingDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTL4StaticLinkingDescriptor {}
);
unsafe impl CopyingHelper for MTL4StaticLinkingDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTL4StaticLinkingDescriptor {}
);
impl MTL4StaticLinkingDescriptor {
extern_methods!(
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(functionDescriptors))]
#[unsafe(method_family = none)]
pub fn functionDescriptors(&self) -> Option<Retained<NSArray<MTL4FunctionDescriptor>>>;
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(setFunctionDescriptors:))]
#[unsafe(method_family = none)]
pub fn setFunctionDescriptors(
&self,
function_descriptors: Option<&NSArray<MTL4FunctionDescriptor>>,
);
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(privateFunctionDescriptors))]
#[unsafe(method_family = none)]
pub fn privateFunctionDescriptors(
&self,
) -> Option<Retained<NSArray<MTL4FunctionDescriptor>>>;
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(setPrivateFunctionDescriptors:))]
#[unsafe(method_family = none)]
pub fn setPrivateFunctionDescriptors(
&self,
private_function_descriptors: Option<&NSArray<MTL4FunctionDescriptor>>,
);
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(groups))]
#[unsafe(method_family = none)]
pub fn groups(
&self,
) -> Option<Retained<NSDictionary<NSString, NSArray<MTL4FunctionDescriptor>>>>;
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(setGroups:))]
#[unsafe(method_family = none)]
pub fn setGroups(
&self,
groups: Option<&NSDictionary<NSString, NSArray<MTL4FunctionDescriptor>>>,
);
);
}
impl MTL4StaticLinkingDescriptor {
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 MTL4StaticLinkingDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTL4PipelineStageDynamicLinkingDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTL4PipelineStageDynamicLinkingDescriptor {}
);
unsafe impl CopyingHelper for MTL4PipelineStageDynamicLinkingDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTL4PipelineStageDynamicLinkingDescriptor {}
);
impl MTL4PipelineStageDynamicLinkingDescriptor {
extern_methods!(
#[unsafe(method(maxCallStackDepth))]
#[unsafe(method_family = none)]
pub fn maxCallStackDepth(&self) -> NSUInteger;
#[unsafe(method(setMaxCallStackDepth:))]
#[unsafe(method_family = none)]
pub fn setMaxCallStackDepth(&self, max_call_stack_depth: NSUInteger);
#[cfg(feature = "MTL4BinaryFunction")]
#[unsafe(method(binaryLinkedFunctions))]
#[unsafe(method_family = none)]
pub fn binaryLinkedFunctions(
&self,
) -> Option<Retained<NSArray<ProtocolObject<dyn MTL4BinaryFunction>>>>;
#[cfg(feature = "MTL4BinaryFunction")]
#[unsafe(method(setBinaryLinkedFunctions:))]
#[unsafe(method_family = none)]
pub fn setBinaryLinkedFunctions(
&self,
binary_linked_functions: Option<&NSArray<ProtocolObject<dyn MTL4BinaryFunction>>>,
);
#[cfg(feature = "MTLDynamicLibrary")]
#[unsafe(method(preloadedLibraries))]
#[unsafe(method_family = none)]
pub fn preloadedLibraries(
&self,
) -> Retained<NSArray<ProtocolObject<dyn MTLDynamicLibrary>>>;
#[cfg(feature = "MTLDynamicLibrary")]
#[unsafe(method(setPreloadedLibraries:))]
#[unsafe(method_family = none)]
pub fn setPreloadedLibraries(
&self,
preloaded_libraries: &NSArray<ProtocolObject<dyn MTLDynamicLibrary>>,
);
);
}
impl MTL4PipelineStageDynamicLinkingDescriptor {
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 MTL4PipelineStageDynamicLinkingDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTL4RenderPipelineDynamicLinkingDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTL4RenderPipelineDynamicLinkingDescriptor {}
);
unsafe impl CopyingHelper for MTL4RenderPipelineDynamicLinkingDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTL4RenderPipelineDynamicLinkingDescriptor {}
);
impl MTL4RenderPipelineDynamicLinkingDescriptor {
extern_methods!(
#[unsafe(method(vertexLinkingDescriptor))]
#[unsafe(method_family = none)]
pub fn vertexLinkingDescriptor(
&self,
) -> Retained<MTL4PipelineStageDynamicLinkingDescriptor>;
#[unsafe(method(fragmentLinkingDescriptor))]
#[unsafe(method_family = none)]
pub fn fragmentLinkingDescriptor(
&self,
) -> Retained<MTL4PipelineStageDynamicLinkingDescriptor>;
#[unsafe(method(tileLinkingDescriptor))]
#[unsafe(method_family = none)]
pub fn tileLinkingDescriptor(&self) -> Retained<MTL4PipelineStageDynamicLinkingDescriptor>;
#[unsafe(method(objectLinkingDescriptor))]
#[unsafe(method_family = none)]
pub fn objectLinkingDescriptor(
&self,
) -> Retained<MTL4PipelineStageDynamicLinkingDescriptor>;
#[unsafe(method(meshLinkingDescriptor))]
#[unsafe(method_family = none)]
pub fn meshLinkingDescriptor(&self) -> Retained<MTL4PipelineStageDynamicLinkingDescriptor>;
);
}
impl MTL4RenderPipelineDynamicLinkingDescriptor {
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 MTL4RenderPipelineDynamicLinkingDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}