icrate 0.0.1

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
    unsafe impl<ObjectType: Message, ObjectTypeOwnership: Ownership>
        NSArray<ObjectType, ObjectTypeOwnership>
    {
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Id<Object, Shared>;

        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString);
    }
);

extern_methods!(
    /// NSKeyValueCoding
    unsafe impl<
            KeyType: Message,
            ObjectType: Message,
            KeyTypeOwnership: Ownership,
            ObjectTypeOwnership: Ownership,
        > NSDictionary<KeyType, ObjectType, KeyTypeOwnership, ObjectTypeOwnership>
    {
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Option<Id<ObjectType, Shared>>;
    }
);

extern_methods!(
    /// NSKeyValueCoding
    unsafe impl<
            KeyType: Message,
            ObjectType: Message,
            KeyTypeOwnership: Ownership,
            ObjectTypeOwnership: Ownership,
        > NSMutableDictionary<KeyType, ObjectType, KeyTypeOwnership, ObjectTypeOwnership>
    {
        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString);
    }
);

extern_methods!(
    /// NSKeyValueCoding
    unsafe impl<ObjectType: Message, ObjectTypeOwnership: Ownership>
        NSOrderedSet<ObjectType, ObjectTypeOwnership>
    {
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Id<Object, Shared>;

        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString);
    }
);

extern_methods!(
    /// NSKeyValueCoding
    unsafe impl<ObjectType: Message, ObjectTypeOwnership: Ownership>
        NSSet<ObjectType, ObjectTypeOwnership>
    {
        #[method_id(@__retain_semantics Other valueForKey:)]
        pub unsafe fn valueForKey(&self, key: &NSString) -> Id<Object, Shared>;

        #[method(setValue:forKey:)]
        pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString);
    }
);