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::*;

extern_static!(NSUndefinedKeyException: &'static NSExceptionName);

typed_enum!(
    pub type NSKeyValueOperator = NSString;
);

extern_static!(NSAverageKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSCountKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSDistinctUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSDistinctUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSDistinctUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSMaximumKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSMinimumKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSSumKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator);

extern_static!(NSUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator);

extern_methods!(
    /// NSKeyValueCoding
    #[cfg(feature = "Foundation_NSArray")]
    unsafe impl<ObjectType: Message> NSArray<ObjectType> {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Id<AnyObject>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString);
    }
);

extern_methods!(
    /// NSKeyValueCoding
    #[cfg(feature = "Foundation_NSDictionary")]
    unsafe impl<KeyType: Message, ObjectType: Message> NSDictionary<KeyType, ObjectType> {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Option<Id<ObjectType>>;
    }
);

extern_methods!(
    /// NSKeyValueCoding
    #[cfg(feature = "Foundation_NSMutableDictionary")]
    unsafe impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType> {
        #[cfg(feature = "Foundation_NSString")]
        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&mut self, value: Option<&ObjectType>, key: &NSString);
    }
);

extern_methods!(
    /// NSKeyValueCoding
    #[cfg(feature = "Foundation_NSOrderedSet")]
    unsafe impl<ObjectType: Message> NSOrderedSet<ObjectType> {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Id<AnyObject>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString);
    }
);

extern_methods!(
    /// NSKeyValueCoding
    #[cfg(feature = "Foundation_NSSet")]
    unsafe impl<ObjectType: Message> NSSet<ObjectType> {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Id<AnyObject>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString);
    }
);