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_static!(MTLDynamicLibraryDomain: &'static NSErrorDomain);

ns_enum!(
    #[underlying(NSUInteger)]
    pub enum MTLDynamicLibraryError {
        MTLDynamicLibraryErrorNone = 0,
        MTLDynamicLibraryErrorInvalidFile = 1,
        MTLDynamicLibraryErrorCompilationFailure = 2,
        MTLDynamicLibraryErrorUnresolvedInstallName = 3,
        MTLDynamicLibraryErrorDependencyLoadFailure = 4,
        MTLDynamicLibraryErrorUnsupported = 5,
    }
);

extern_protocol!(
    pub unsafe trait MTLDynamicLibrary: NSObjectProtocol {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other label)]
        fn label(&self) -> Option<Id<NSString>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setLabel:)]
        fn setLabel(&self, label: Option<&NSString>);

        #[method_id(@__retain_semantics Other device)]
        fn device(&self) -> Id<ProtocolObject<dyn MTLDevice>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other installName)]
        fn installName(&self) -> Id<NSString>;

        #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))]
        #[method(serializeToURL:error:_)]
        fn serializeToURL_error(&self, url: &NSURL) -> Result<(), Id<NSError>>;
    }

    unsafe impl ProtocolType for dyn MTLDynamicLibrary {}
);