use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000;
pub static NSSearchFieldRecentsMenuItemTag: NSInteger = 1001;
pub static NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002;
pub static NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003;
extern_class!(
#[unsafe(super(NSTextFieldCell, NSActionCell, NSCell, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
pub struct NSSearchFieldCell;
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
extern_conformance!(
unsafe impl NSAccessibility for NSSearchFieldCell {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSSearchFieldCell {}
);
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
extern_conformance!(
unsafe impl NSCoding for NSSearchFieldCell {}
);
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
extern_conformance!(
unsafe impl NSCopying for NSSearchFieldCell {}
);
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
unsafe impl CopyingHelper for NSSearchFieldCell {
type Result = Self;
}
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for NSSearchFieldCell {}
);
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell",
feature = "NSUserInterfaceItemIdentification"
))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSSearchFieldCell {}
);
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
impl NSSearchFieldCell {
extern_methods!(
#[unsafe(method(initTextCell:))]
#[unsafe(method_family = init)]
pub fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "NSImage")]
#[unsafe(method(initImageCell:))]
#[unsafe(method_family = init)]
pub unsafe fn initImageCell(
this: Allocated<Self>,
image: Option<&NSImage>,
) -> Retained<Self>;
#[cfg(feature = "NSButtonCell")]
#[unsafe(method(searchButtonCell))]
#[unsafe(method_family = none)]
pub fn searchButtonCell(&self) -> Option<Retained<NSButtonCell>>;
#[cfg(feature = "NSButtonCell")]
#[unsafe(method(setSearchButtonCell:))]
#[unsafe(method_family = none)]
pub fn setSearchButtonCell(&self, search_button_cell: Option<&NSButtonCell>);
#[cfg(feature = "NSButtonCell")]
#[unsafe(method(cancelButtonCell))]
#[unsafe(method_family = none)]
pub fn cancelButtonCell(&self) -> Option<Retained<NSButtonCell>>;
#[cfg(feature = "NSButtonCell")]
#[unsafe(method(setCancelButtonCell:))]
#[unsafe(method_family = none)]
pub fn setCancelButtonCell(&self, cancel_button_cell: Option<&NSButtonCell>);
#[unsafe(method(resetSearchButtonCell))]
#[unsafe(method_family = none)]
pub fn resetSearchButtonCell(&self);
#[unsafe(method(resetCancelButtonCell))]
#[unsafe(method_family = none)]
pub fn resetCancelButtonCell(&self);
#[unsafe(method(searchTextRectForBounds:))]
#[unsafe(method_family = none)]
pub fn searchTextRectForBounds(&self, rect: NSRect) -> NSRect;
#[unsafe(method(searchButtonRectForBounds:))]
#[unsafe(method_family = none)]
pub fn searchButtonRectForBounds(&self, rect: NSRect) -> NSRect;
#[unsafe(method(cancelButtonRectForBounds:))]
#[unsafe(method_family = none)]
pub fn cancelButtonRectForBounds(&self, rect: NSRect) -> NSRect;
#[cfg(feature = "NSMenu")]
#[unsafe(method(searchMenuTemplate))]
#[unsafe(method_family = none)]
pub fn searchMenuTemplate(&self) -> Option<Retained<NSMenu>>;
#[cfg(feature = "NSMenu")]
#[unsafe(method(setSearchMenuTemplate:))]
#[unsafe(method_family = none)]
pub fn setSearchMenuTemplate(&self, search_menu_template: Option<&NSMenu>);
#[unsafe(method(sendsWholeSearchString))]
#[unsafe(method_family = none)]
pub fn sendsWholeSearchString(&self) -> bool;
#[unsafe(method(setSendsWholeSearchString:))]
#[unsafe(method_family = none)]
pub fn setSendsWholeSearchString(&self, sends_whole_search_string: bool);
#[unsafe(method(maximumRecents))]
#[unsafe(method_family = none)]
pub fn maximumRecents(&self) -> NSInteger;
#[unsafe(method(setMaximumRecents:))]
#[unsafe(method_family = none)]
pub fn setMaximumRecents(&self, maximum_recents: NSInteger);
#[unsafe(method(recentSearches))]
#[unsafe(method_family = none)]
pub fn recentSearches(&self) -> Retained<NSArray<NSString>>;
#[unsafe(method(setRecentSearches:))]
#[unsafe(method_family = none)]
pub fn setRecentSearches(&self, recent_searches: Option<&NSArray<NSString>>);
#[cfg(feature = "NSSearchField")]
#[unsafe(method(recentsAutosaveName))]
#[unsafe(method_family = none)]
pub fn recentsAutosaveName(&self) -> Option<Retained<NSSearchFieldRecentsAutosaveName>>;
#[cfg(feature = "NSSearchField")]
#[unsafe(method(setRecentsAutosaveName:))]
#[unsafe(method_family = none)]
pub fn setRecentsAutosaveName(
&self,
recents_autosave_name: Option<&NSSearchFieldRecentsAutosaveName>,
);
#[unsafe(method(sendsSearchStringImmediately))]
#[unsafe(method_family = none)]
pub fn sendsSearchStringImmediately(&self) -> bool;
#[unsafe(method(setSendsSearchStringImmediately:))]
#[unsafe(method_family = none)]
pub fn setSendsSearchStringImmediately(&self, sends_search_string_immediately: bool);
);
}
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
impl NSSearchFieldCell {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSTextFieldCell"
))]
impl NSSearchFieldCell {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}