//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdictionarycontrollerkeyvaluepair?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSDictionaryControllerKeyValuePair;
);

unsafe impl NSObjectProtocol for NSDictionaryControllerKeyValuePair {}

impl NSDictionaryControllerKeyValuePair {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(key))]
        #[unsafe(method_family = none)]
        pub unsafe fn key(&self) -> Option<Retained<NSString>>;

        /// Setter for [`key`][Self::key].
        #[unsafe(method(setKey:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setKey(&self, key: Option<&NSString>);

        #[unsafe(method(value))]
        #[unsafe(method_family = none)]
        pub unsafe fn value(&self) -> Option<Retained<AnyObject>>;

        /// Setter for [`value`][Self::value].
        #[unsafe(method(setValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setValue(&self, value: Option<&AnyObject>);

        #[unsafe(method(localizedKey))]
        #[unsafe(method_family = none)]
        pub unsafe fn localizedKey(&self) -> Option<Retained<NSString>>;

        /// Setter for [`localizedKey`][Self::localizedKey].
        #[unsafe(method(setLocalizedKey:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLocalizedKey(&self, localized_key: Option<&NSString>);

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

/// Methods declared on superclass `NSObject`.
impl NSDictionaryControllerKeyValuePair {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdictionarycontroller?language=objc)
    #[unsafe(super(NSArrayController, NSObjectController, NSController, NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(
        feature = "NSArrayController",
        feature = "NSController",
        feature = "NSObjectController"
    ))]
    pub struct NSDictionaryController;
);

#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSObjectController"
))]
unsafe impl NSCoding for NSDictionaryController {}

#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSKeyValueBinding",
    feature = "NSObjectController"
))]
unsafe impl NSEditor for NSDictionaryController {}

#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSKeyValueBinding",
    feature = "NSObjectController"
))]
unsafe impl NSEditorRegistration for NSDictionaryController {}

#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSObjectController"
))]
unsafe impl NSObjectProtocol for NSDictionaryController {}

#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSObjectController"
))]
impl NSDictionaryController {
    extern_methods!(
        #[unsafe(method(newObject))]
        #[unsafe(method_family = new)]
        pub unsafe fn newObject(&self) -> Retained<NSDictionaryControllerKeyValuePair>;

        #[unsafe(method(initialKey))]
        #[unsafe(method_family = none)]
        pub unsafe fn initialKey(&self) -> Retained<NSString>;

        /// Setter for [`initialKey`][Self::initialKey].
        #[unsafe(method(setInitialKey:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setInitialKey(&self, initial_key: &NSString);

        #[unsafe(method(initialValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn initialValue(&self) -> Retained<AnyObject>;

        /// Setter for [`initialValue`][Self::initialValue].
        #[unsafe(method(setInitialValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setInitialValue(&self, initial_value: &AnyObject);

        #[unsafe(method(includedKeys))]
        #[unsafe(method_family = none)]
        pub unsafe fn includedKeys(&self) -> Retained<NSArray<NSString>>;

        /// Setter for [`includedKeys`][Self::includedKeys].
        #[unsafe(method(setIncludedKeys:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setIncludedKeys(&self, included_keys: &NSArray<NSString>);

        #[unsafe(method(excludedKeys))]
        #[unsafe(method_family = none)]
        pub unsafe fn excludedKeys(&self) -> Retained<NSArray<NSString>>;

        /// Setter for [`excludedKeys`][Self::excludedKeys].
        #[unsafe(method(setExcludedKeys:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setExcludedKeys(&self, excluded_keys: &NSArray<NSString>);

        #[unsafe(method(localizedKeyDictionary))]
        #[unsafe(method_family = none)]
        pub unsafe fn localizedKeyDictionary(&self) -> Retained<NSDictionary<NSString, NSString>>;

        /// Setter for [`localizedKeyDictionary`][Self::localizedKeyDictionary].
        #[unsafe(method(setLocalizedKeyDictionary:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLocalizedKeyDictionary(
            &self,
            localized_key_dictionary: &NSDictionary<NSString, NSString>,
        );

        #[unsafe(method(localizedKeyTable))]
        #[unsafe(method_family = none)]
        pub unsafe fn localizedKeyTable(&self) -> Option<Retained<NSString>>;

        /// Setter for [`localizedKeyTable`][Self::localizedKeyTable].
        #[unsafe(method(setLocalizedKeyTable:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLocalizedKeyTable(&self, localized_key_table: Option<&NSString>);
    );
}

/// Methods declared on superclass `NSObjectController`.
#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSObjectController"
))]
impl NSDictionaryController {
    extern_methods!(
        #[unsafe(method(initWithContent:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithContent(
            this: Allocated<Self>,
            content: Option<&AnyObject>,
        ) -> Retained<Self>;

        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSController`.
#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSObjectController"
))]
impl NSDictionaryController {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(
    feature = "NSArrayController",
    feature = "NSController",
    feature = "NSObjectController"
))]
impl NSDictionaryController {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
