use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSDictionaryControllerKeyValuePair;
);
extern_conformance!(
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 fn key(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setKey:))]
#[unsafe(method_family = none)]
pub fn setKey(&self, key: Option<&NSString>);
#[unsafe(method(value))]
#[unsafe(method_family = none)]
pub fn value(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setValue(&self, value: Option<&AnyObject>);
#[unsafe(method(localizedKey))]
#[unsafe(method_family = none)]
pub fn localizedKey(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setLocalizedKey:))]
#[unsafe(method_family = none)]
pub fn setLocalizedKey(&self, localized_key: Option<&NSString>);
#[unsafe(method(isExplicitlyIncluded))]
#[unsafe(method_family = none)]
pub fn isExplicitlyIncluded(&self) -> bool;
);
}
impl NSDictionaryControllerKeyValuePair {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[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"
))]
extern_conformance!(
unsafe impl NSCoding for NSDictionaryController {}
);
#[cfg(all(
feature = "NSArrayController",
feature = "NSController",
feature = "NSKeyValueBinding",
feature = "NSObjectController"
))]
extern_conformance!(
unsafe impl NSEditor for NSDictionaryController {}
);
#[cfg(all(
feature = "NSArrayController",
feature = "NSController",
feature = "NSKeyValueBinding",
feature = "NSObjectController"
))]
extern_conformance!(
unsafe impl NSEditorRegistration for NSDictionaryController {}
);
#[cfg(all(
feature = "NSArrayController",
feature = "NSController",
feature = "NSObjectController"
))]
extern_conformance!(
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 fn newObject(&self) -> Retained<NSDictionaryControllerKeyValuePair>;
#[unsafe(method(initialKey))]
#[unsafe(method_family = none)]
pub fn initialKey(&self) -> Retained<NSString>;
#[unsafe(method(setInitialKey:))]
#[unsafe(method_family = none)]
pub fn setInitialKey(&self, initial_key: &NSString);
#[unsafe(method(initialValue))]
#[unsafe(method_family = none)]
pub fn initialValue(&self) -> Retained<AnyObject>;
#[unsafe(method(setInitialValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setInitialValue(&self, initial_value: &AnyObject);
#[unsafe(method(includedKeys))]
#[unsafe(method_family = none)]
pub fn includedKeys(&self) -> Retained<NSArray<NSString>>;
#[unsafe(method(setIncludedKeys:))]
#[unsafe(method_family = none)]
pub fn setIncludedKeys(&self, included_keys: &NSArray<NSString>);
#[unsafe(method(excludedKeys))]
#[unsafe(method_family = none)]
pub fn excludedKeys(&self) -> Retained<NSArray<NSString>>;
#[unsafe(method(setExcludedKeys:))]
#[unsafe(method_family = none)]
pub fn setExcludedKeys(&self, excluded_keys: &NSArray<NSString>);
#[unsafe(method(localizedKeyDictionary))]
#[unsafe(method_family = none)]
pub fn localizedKeyDictionary(&self) -> Retained<NSDictionary<NSString, NSString>>;
#[unsafe(method(setLocalizedKeyDictionary:))]
#[unsafe(method_family = none)]
pub fn setLocalizedKeyDictionary(
&self,
localized_key_dictionary: &NSDictionary<NSString, NSString>,
);
#[unsafe(method(localizedKeyTable))]
#[unsafe(method_family = none)]
pub fn localizedKeyTable(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setLocalizedKeyTable:))]
#[unsafe(method_family = none)]
pub fn setLocalizedKeyTable(&self, localized_key_table: Option<&NSString>);
);
}
#[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>>;
);
}
#[cfg(all(
feature = "NSArrayController",
feature = "NSController",
feature = "NSObjectController"
))]
impl NSDictionaryController {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(
feature = "NSArrayController",
feature = "NSController",
feature = "NSObjectController"
))]
impl NSDictionaryController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}