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::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSDictionaryControllerKeyValuePair;

    unsafe impl ClassType for NSDictionaryControllerKeyValuePair {
        type Super = NSObject;
    }
);

extern_methods!(
    unsafe impl NSDictionaryControllerKeyValuePair {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self, Shared>;

        #[method_id(@__retain_semantics Other key)]
        pub unsafe fn key(&self) -> Option<Id<NSString, Shared>>;

        #[method(setKey:)]
        pub unsafe fn setKey(&self, key: Option<&NSString>);

        #[method_id(@__retain_semantics Other value)]
        pub unsafe fn value(&self) -> Option<Id<Object, Shared>>;

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

        #[method_id(@__retain_semantics Other localizedKey)]
        pub unsafe fn localizedKey(&self) -> Option<Id<NSString, Shared>>;

        #[method(setLocalizedKey:)]
        pub unsafe fn setLocalizedKey(&self, localizedKey: Option<&NSString>);

        #[method(isExplicitlyIncluded)]
        pub unsafe fn isExplicitlyIncluded(&self) -> bool;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSDictionaryController;

    unsafe impl ClassType for NSDictionaryController {
        #[inherits(NSObjectController, NSController, NSObject)]
        type Super = NSArrayController;
    }
);

extern_methods!(
    unsafe impl NSDictionaryController {
        #[method_id(@__retain_semantics New newObject)]
        pub unsafe fn newObject(&self) -> Id<NSDictionaryControllerKeyValuePair, Shared>;

        #[method_id(@__retain_semantics Other initialKey)]
        pub unsafe fn initialKey(&self) -> Id<NSString, Shared>;

        #[method(setInitialKey:)]
        pub unsafe fn setInitialKey(&self, initialKey: &NSString);

        #[method_id(@__retain_semantics Other initialValue)]
        pub unsafe fn initialValue(&self) -> Id<Object, Shared>;

        #[method(setInitialValue:)]
        pub unsafe fn setInitialValue(&self, initialValue: &Object);

        #[method_id(@__retain_semantics Other includedKeys)]
        pub unsafe fn includedKeys(&self) -> Id<NSArray<NSString>, Shared>;

        #[method(setIncludedKeys:)]
        pub unsafe fn setIncludedKeys(&self, includedKeys: &NSArray<NSString>);

        #[method_id(@__retain_semantics Other excludedKeys)]
        pub unsafe fn excludedKeys(&self) -> Id<NSArray<NSString>, Shared>;

        #[method(setExcludedKeys:)]
        pub unsafe fn setExcludedKeys(&self, excludedKeys: &NSArray<NSString>);

        #[method_id(@__retain_semantics Other localizedKeyDictionary)]
        pub unsafe fn localizedKeyDictionary(&self)
            -> Id<NSDictionary<NSString, NSString>, Shared>;

        #[method(setLocalizedKeyDictionary:)]
        pub unsafe fn setLocalizedKeyDictionary(
            &self,
            localizedKeyDictionary: &NSDictionary<NSString, NSString>,
        );

        #[method_id(@__retain_semantics Other localizedKeyTable)]
        pub unsafe fn localizedKeyTable(&self) -> Option<Id<NSString, Shared>>;

        #[method(setLocalizedKeyTable:)]
        pub unsafe fn setLocalizedKeyTable(&self, localizedKeyTable: Option<&NSString>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObjectController`
    unsafe impl NSDictionaryController {
        #[method_id(@__retain_semantics Init initWithContent:)]
        pub unsafe fn initWithContent(
            this: Option<Allocated<Self>>,
            content: Option<&Object>,
        ) -> Id<Self, Shared>;
    }
);