use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-uniform-type-identifiers")]
use objc2_uniform_type_identifiers::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CSSearchableItemAttributeSet;
);
extern_conformance!(
unsafe impl NSCoding for CSSearchableItemAttributeSet {}
);
extern_conformance!(
unsafe impl NSCopying for CSSearchableItemAttributeSet {}
);
unsafe impl CopyingHelper for CSSearchableItemAttributeSet {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CSSearchableItemAttributeSet {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CSSearchableItemAttributeSet {}
);
impl CSSearchableItemAttributeSet {
extern_methods!(
#[deprecated = "Use initWithContentType instead"]
#[unsafe(method(initWithItemContentType:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithItemContentType(
this: Allocated<Self>,
item_content_type: &NSString,
) -> Retained<Self>;
#[cfg(feature = "objc2-uniform-type-identifiers")]
#[unsafe(method(initWithContentType:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithContentType(
this: Allocated<Self>,
content_type: &UTType,
) -> Retained<Self>;
);
}
impl CSSearchableItemAttributeSet {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSString, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CSLocalizedString;
);
extern_conformance!(
unsafe impl NSCoding for CSLocalizedString {}
);
extern_conformance!(
unsafe impl NSCopying for CSLocalizedString {}
);
unsafe impl CopyingHelper for CSLocalizedString {
type Result = Self;
}
extern_conformance!(
unsafe impl NSMutableCopying for CSLocalizedString {}
);
unsafe impl MutableCopyingHelper for CSLocalizedString {
type Result = NSMutableString;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CSLocalizedString {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CSLocalizedString {}
);
impl CSLocalizedString {
extern_methods!(
#[unsafe(method(initWithLocalizedStrings:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLocalizedStrings(
this: Allocated<Self>,
localized_strings: &NSDictionary,
) -> Retained<Self>;
#[unsafe(method(localizedString))]
#[unsafe(method_family = none)]
pub unsafe fn localizedString(&self) -> Retained<NSString>;
);
}
impl CSLocalizedString {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
impl CSLocalizedString {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CSCustomAttributeKey;
);
extern_conformance!(
unsafe impl NSCoding for CSCustomAttributeKey {}
);
extern_conformance!(
unsafe impl NSCopying for CSCustomAttributeKey {}
);
unsafe impl CopyingHelper for CSCustomAttributeKey {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CSCustomAttributeKey {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CSCustomAttributeKey {}
);
impl CSCustomAttributeKey {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithKeyName:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithKeyName(
this: Allocated<Self>,
key_name: &NSString,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithKeyName:searchable:searchableByDefault:unique:multiValued:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithKeyName_searchable_searchableByDefault_unique_multiValued(
this: Allocated<Self>,
key_name: &NSString,
searchable: bool,
searchable_by_default: bool,
unique: bool,
multi_valued: bool,
) -> Option<Retained<Self>>;
#[unsafe(method(keyName))]
#[unsafe(method_family = none)]
pub unsafe fn keyName(&self) -> Retained<NSString>;
#[unsafe(method(isSearchable))]
#[unsafe(method_family = none)]
pub unsafe fn isSearchable(&self) -> bool;
#[unsafe(method(isSearchableByDefault))]
#[unsafe(method_family = none)]
pub unsafe fn isSearchableByDefault(&self) -> bool;
#[unsafe(method(isUnique))]
#[unsafe(method_family = none)]
pub unsafe fn isUnique(&self) -> bool;
#[unsafe(method(isMultiValued))]
#[unsafe(method_family = none)]
pub unsafe fn isMultiValued(&self) -> bool;
);
}
impl CSCustomAttributeKey {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
impl CSSearchableItemAttributeSet {
extern_methods!(
#[unsafe(method(setValue:forCustomKey:))]
#[unsafe(method_family = none)]
pub unsafe fn setValue_forCustomKey(
&self,
value: Option<&ProtocolObject<dyn NSSecureCoding>>,
key: &CSCustomAttributeKey,
);
#[unsafe(method(valueForCustomKey:))]
#[unsafe(method_family = none)]
pub unsafe fn valueForCustomKey(
&self,
key: &CSCustomAttributeKey,
) -> Option<Retained<ProtocolObject<dyn NSSecureCoding>>>;
);
}
mod private_NSUserActivityCSSearchableItemAttributeSet {
pub trait Sealed {}
}
#[doc(alias = "CSSearchableItemAttributeSet")]
pub unsafe trait NSUserActivityCSSearchableItemAttributeSet:
ClassType + Sized + private_NSUserActivityCSSearchableItemAttributeSet::Sealed
{
extern_methods!(
#[unsafe(method(contentAttributeSet))]
#[unsafe(method_family = none)]
unsafe fn contentAttributeSet(&self) -> Option<Retained<CSSearchableItemAttributeSet>>;
#[unsafe(method(setContentAttributeSet:))]
#[unsafe(method_family = none)]
unsafe fn setContentAttributeSet(
&self,
content_attribute_set: Option<&CSSearchableItemAttributeSet>,
);
);
}
impl private_NSUserActivityCSSearchableItemAttributeSet::Sealed for NSUserActivity {}
unsafe impl NSUserActivityCSSearchableItemAttributeSet for NSUserActivity {}