use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait UISearchSuggestion: NSObjectProtocol + MainThreadOnly {
#[unsafe(method(localizedSuggestion))]
#[unsafe(method_family = none)]
fn localizedSuggestion(&self) -> Option<Retained<NSString>>;
#[optional]
#[unsafe(method(localizedDescription))]
#[unsafe(method_family = none)]
fn localizedDescription(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "UIImage")]
#[optional]
#[unsafe(method(iconImage))]
#[unsafe(method_family = none)]
fn iconImage(&self) -> Option<Retained<UIImage>>;
#[unsafe(method(localizedAttributedSuggestion))]
#[unsafe(method_family = none)]
fn localizedAttributedSuggestion(&self) -> Option<Retained<NSAttributedString>>;
#[unsafe(method(representedObject))]
#[unsafe(method_family = none)]
fn representedObject(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setRepresentedObject:))]
#[unsafe(method_family = none)]
unsafe fn setRepresentedObject(&self, represented_object: Option<&AnyObject>);
}
);
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UISearchSuggestionItem;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UISearchSuggestionItem {}
);
extern_conformance!(
unsafe impl UISearchSuggestion for UISearchSuggestionItem {}
);
impl UISearchSuggestionItem {
extern_methods!(
#[unsafe(method(suggestionWithLocalizedSuggestion:))]
#[unsafe(method_family = none)]
pub fn suggestionWithLocalizedSuggestion(
suggestion: &NSString,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(suggestionWithLocalizedSuggestion:descriptionString:))]
#[unsafe(method_family = none)]
pub fn suggestionWithLocalizedSuggestion_descriptionString(
suggestion: &NSString,
description: Option<&NSString>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "UIImage")]
#[unsafe(method(suggestionWithLocalizedSuggestion:descriptionString:iconImage:))]
#[unsafe(method_family = none)]
pub fn suggestionWithLocalizedSuggestion_descriptionString_iconImage(
suggestion: &NSString,
description: Option<&NSString>,
icon_image: Option<&UIImage>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(suggestionWithLocalizedAttributedSuggestion:))]
#[unsafe(method_family = none)]
pub fn suggestionWithLocalizedAttributedSuggestion(
suggestion: &NSAttributedString,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(suggestionWithLocalizedAttributedSuggestion:descriptionString:))]
#[unsafe(method_family = none)]
pub fn suggestionWithLocalizedAttributedSuggestion_descriptionString(
suggestion: &NSAttributedString,
description: Option<&NSString>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "UIImage")]
#[unsafe(method(suggestionWithLocalizedAttributedSuggestion:descriptionString:iconImage:))]
#[unsafe(method_family = none)]
pub fn suggestionWithLocalizedAttributedSuggestion_descriptionString_iconImage(
suggestion: &NSAttributedString,
description: Option<&NSString>,
icon_image: Option<&UIImage>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(initWithLocalizedSuggestion:))]
#[unsafe(method_family = init)]
pub fn initWithLocalizedSuggestion(
this: Allocated<Self>,
suggestion: &NSString,
) -> Retained<Self>;
#[unsafe(method(initWithLocalizedSuggestion:localizedDescription:))]
#[unsafe(method_family = init)]
pub fn initWithLocalizedSuggestion_localizedDescription(
this: Allocated<Self>,
suggestion: &NSString,
description: Option<&NSString>,
) -> Retained<Self>;
#[cfg(feature = "UIImage")]
#[unsafe(method(initWithLocalizedSuggestion:localizedDescription:iconImage:))]
#[unsafe(method_family = init)]
pub fn initWithLocalizedSuggestion_localizedDescription_iconImage(
this: Allocated<Self>,
suggestion: &NSString,
description: Option<&NSString>,
icon_image: Option<&UIImage>,
) -> Retained<Self>;
#[unsafe(method(initWithLocalizedAttributedSuggestion:))]
#[unsafe(method_family = init)]
pub fn initWithLocalizedAttributedSuggestion(
this: Allocated<Self>,
suggestion: &NSAttributedString,
) -> Retained<Self>;
#[unsafe(method(initWithLocalizedAttributedSuggestion:localizedDescription:))]
#[unsafe(method_family = init)]
pub fn initWithLocalizedAttributedSuggestion_localizedDescription(
this: Allocated<Self>,
suggestion: &NSAttributedString,
description: Option<&NSString>,
) -> Retained<Self>;
#[cfg(feature = "UIImage")]
#[unsafe(method(initWithLocalizedAttributedSuggestion:localizedDescription:iconImage:))]
#[unsafe(method_family = init)]
pub fn initWithLocalizedAttributedSuggestion_localizedDescription_iconImage(
this: Allocated<Self>,
suggestion: &NSAttributedString,
description: Option<&NSString>,
icon_image: Option<&UIImage>,
) -> Retained<Self>;
#[unsafe(method(localizedAttributedSuggestion))]
#[unsafe(method_family = none)]
pub fn localizedAttributedSuggestion(&self) -> Option<Retained<NSAttributedString>>;
#[unsafe(method(localizedSuggestion))]
#[unsafe(method_family = none)]
pub fn localizedSuggestion(&self) -> Option<Retained<NSString>>;
#[unsafe(method(localizedDescription))]
#[unsafe(method_family = none)]
pub fn localizedDescription(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(iconImage))]
#[unsafe(method_family = none)]
pub fn iconImage(&self) -> Option<Retained<UIImage>>;
#[unsafe(method(representedObject))]
#[unsafe(method_family = none)]
pub fn representedObject(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setRepresentedObject:))]
#[unsafe(method_family = none)]
pub unsafe fn setRepresentedObject(&self, represented_object: Option<&AnyObject>);
);
}
impl UISearchSuggestionItem {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}