icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::Foundation::*;
use crate::Metal::*;

extern_protocol!(
    pub unsafe trait MTLFunctionStitchingAttribute: NSObjectProtocol {}

    unsafe impl ProtocolType for dyn MTLFunctionStitchingAttribute {}
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "Metal_MTLFunctionStitchingAttributeAlwaysInline")]
    pub struct MTLFunctionStitchingAttributeAlwaysInline;

    #[cfg(feature = "Metal_MTLFunctionStitchingAttributeAlwaysInline")]
    unsafe impl ClassType for MTLFunctionStitchingAttributeAlwaysInline {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Metal_MTLFunctionStitchingAttributeAlwaysInline")]
unsafe impl MTLFunctionStitchingAttribute for MTLFunctionStitchingAttributeAlwaysInline {}

#[cfg(feature = "Metal_MTLFunctionStitchingAttributeAlwaysInline")]
unsafe impl NSObjectProtocol for MTLFunctionStitchingAttributeAlwaysInline {}

extern_methods!(
    #[cfg(feature = "Metal_MTLFunctionStitchingAttributeAlwaysInline")]
    unsafe impl MTLFunctionStitchingAttributeAlwaysInline {}
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Metal_MTLFunctionStitchingAttributeAlwaysInline")]
    unsafe impl MTLFunctionStitchingAttributeAlwaysInline {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_protocol!(
    pub unsafe trait MTLFunctionStitchingNode: NSCopying + NSObjectProtocol {}

    unsafe impl ProtocolType for dyn MTLFunctionStitchingNode {}
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "Metal_MTLFunctionStitchingInputNode")]
    pub struct MTLFunctionStitchingInputNode;

    #[cfg(feature = "Metal_MTLFunctionStitchingInputNode")]
    unsafe impl ClassType for MTLFunctionStitchingInputNode {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Metal_MTLFunctionStitchingInputNode")]
unsafe impl MTLFunctionStitchingNode for MTLFunctionStitchingInputNode {}

#[cfg(feature = "Metal_MTLFunctionStitchingInputNode")]
unsafe impl NSCopying for MTLFunctionStitchingInputNode {}

#[cfg(feature = "Metal_MTLFunctionStitchingInputNode")]
unsafe impl NSObjectProtocol for MTLFunctionStitchingInputNode {}

extern_methods!(
    #[cfg(feature = "Metal_MTLFunctionStitchingInputNode")]
    unsafe impl MTLFunctionStitchingInputNode {
        #[method(argumentIndex)]
        pub unsafe fn argumentIndex(&self) -> NSUInteger;

        #[method(setArgumentIndex:)]
        pub unsafe fn setArgumentIndex(&self, argument_index: NSUInteger);

        #[method_id(@__retain_semantics Init initWithArgumentIndex:)]
        pub unsafe fn initWithArgumentIndex(
            this: Allocated<Self>,
            argument: NSUInteger,
        ) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Metal_MTLFunctionStitchingInputNode")]
    unsafe impl MTLFunctionStitchingInputNode {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
    pub struct MTLFunctionStitchingFunctionNode;

    #[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
    unsafe impl ClassType for MTLFunctionStitchingFunctionNode {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
unsafe impl MTLFunctionStitchingNode for MTLFunctionStitchingFunctionNode {}

#[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
unsafe impl NSCopying for MTLFunctionStitchingFunctionNode {}

#[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
unsafe impl NSObjectProtocol for MTLFunctionStitchingFunctionNode {}

extern_methods!(
    #[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
    unsafe impl MTLFunctionStitchingFunctionNode {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other name)]
        pub unsafe fn name(&self) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setName:)]
        pub unsafe fn setName(&self, name: &NSString);

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other arguments)]
        pub unsafe fn arguments(&self)
            -> Id<NSArray<ProtocolObject<dyn MTLFunctionStitchingNode>>>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method(setArguments:)]
        pub unsafe fn setArguments(
            &self,
            arguments: &NSArray<ProtocolObject<dyn MTLFunctionStitchingNode>>,
        );

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other controlDependencies)]
        pub unsafe fn controlDependencies(&self) -> Id<NSArray<MTLFunctionStitchingFunctionNode>>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method(setControlDependencies:)]
        pub unsafe fn setControlDependencies(
            &self,
            control_dependencies: &NSArray<MTLFunctionStitchingFunctionNode>,
        );

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Init initWithName:arguments:controlDependencies:)]
        pub unsafe fn initWithName_arguments_controlDependencies(
            this: Allocated<Self>,
            name: &NSString,
            arguments: &NSArray<ProtocolObject<dyn MTLFunctionStitchingNode>>,
            control_dependencies: &NSArray<MTLFunctionStitchingFunctionNode>,
        ) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
    unsafe impl MTLFunctionStitchingFunctionNode {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "Metal_MTLFunctionStitchingGraph")]
    pub struct MTLFunctionStitchingGraph;

    #[cfg(feature = "Metal_MTLFunctionStitchingGraph")]
    unsafe impl ClassType for MTLFunctionStitchingGraph {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Metal_MTLFunctionStitchingGraph")]
unsafe impl NSCopying for MTLFunctionStitchingGraph {}

#[cfg(feature = "Metal_MTLFunctionStitchingGraph")]
unsafe impl NSObjectProtocol for MTLFunctionStitchingGraph {}

extern_methods!(
    #[cfg(feature = "Metal_MTLFunctionStitchingGraph")]
    unsafe impl MTLFunctionStitchingGraph {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other functionName)]
        pub unsafe fn functionName(&self) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setFunctionName:)]
        pub unsafe fn setFunctionName(&self, function_name: &NSString);

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Metal_MTLFunctionStitchingFunctionNode"
        ))]
        #[method_id(@__retain_semantics Other nodes)]
        pub unsafe fn nodes(&self) -> Id<NSArray<MTLFunctionStitchingFunctionNode>>;

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Metal_MTLFunctionStitchingFunctionNode"
        ))]
        #[method(setNodes:)]
        pub unsafe fn setNodes(&self, nodes: &NSArray<MTLFunctionStitchingFunctionNode>);

        #[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
        #[method_id(@__retain_semantics Other outputNode)]
        pub unsafe fn outputNode(&self) -> Option<Id<MTLFunctionStitchingFunctionNode>>;

        #[cfg(feature = "Metal_MTLFunctionStitchingFunctionNode")]
        #[method(setOutputNode:)]
        pub unsafe fn setOutputNode(&self, output_node: Option<&MTLFunctionStitchingFunctionNode>);

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other attributes)]
        pub unsafe fn attributes(
            &self,
        ) -> Id<NSArray<ProtocolObject<dyn MTLFunctionStitchingAttribute>>>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method(setAttributes:)]
        pub unsafe fn setAttributes(
            &self,
            attributes: &NSArray<ProtocolObject<dyn MTLFunctionStitchingAttribute>>,
        );

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString",
            feature = "Metal_MTLFunctionStitchingFunctionNode"
        ))]
        #[method_id(@__retain_semantics Init initWithFunctionName:nodes:outputNode:attributes:)]
        pub unsafe fn initWithFunctionName_nodes_outputNode_attributes(
            this: Allocated<Self>,
            function_name: &NSString,
            nodes: &NSArray<MTLFunctionStitchingFunctionNode>,
            output_node: Option<&MTLFunctionStitchingFunctionNode>,
            attributes: &NSArray<ProtocolObject<dyn MTLFunctionStitchingAttribute>>,
        ) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Metal_MTLFunctionStitchingGraph")]
    unsafe impl MTLFunctionStitchingGraph {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "Metal_MTLStitchedLibraryDescriptor")]
    pub struct MTLStitchedLibraryDescriptor;

    #[cfg(feature = "Metal_MTLStitchedLibraryDescriptor")]
    unsafe impl ClassType for MTLStitchedLibraryDescriptor {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Metal_MTLStitchedLibraryDescriptor")]
unsafe impl NSCopying for MTLStitchedLibraryDescriptor {}

#[cfg(feature = "Metal_MTLStitchedLibraryDescriptor")]
unsafe impl NSObjectProtocol for MTLStitchedLibraryDescriptor {}

extern_methods!(
    #[cfg(feature = "Metal_MTLStitchedLibraryDescriptor")]
    unsafe impl MTLStitchedLibraryDescriptor {
        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Metal_MTLFunctionStitchingGraph"
        ))]
        #[method_id(@__retain_semantics Other functionGraphs)]
        pub unsafe fn functionGraphs(&self) -> Id<NSArray<MTLFunctionStitchingGraph>>;

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Metal_MTLFunctionStitchingGraph"
        ))]
        #[method(setFunctionGraphs:)]
        pub unsafe fn setFunctionGraphs(
            &self,
            function_graphs: &NSArray<MTLFunctionStitchingGraph>,
        );

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other functions)]
        pub unsafe fn functions(&self) -> Id<NSArray<ProtocolObject<dyn MTLFunction>>>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method(setFunctions:)]
        pub unsafe fn setFunctions(&self, functions: &NSArray<ProtocolObject<dyn MTLFunction>>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Metal_MTLStitchedLibraryDescriptor")]
    unsafe impl MTLStitchedLibraryDescriptor {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);