icrate/generated/AppKit/
NSSearchFieldCell.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8extern_static!(NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000);
9
10extern_static!(NSSearchFieldRecentsMenuItemTag: NSInteger = 1001);
11
12extern_static!(NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002);
13
14extern_static!(NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003);
15
16extern_class!(
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 #[cfg(feature = "AppKit_NSSearchFieldCell")]
19 pub struct NSSearchFieldCell;
20
21 #[cfg(feature = "AppKit_NSSearchFieldCell")]
22 unsafe impl ClassType for NSSearchFieldCell {
23 #[inherits(NSActionCell, NSCell, NSObject)]
24 type Super = NSTextFieldCell;
25 type Mutability = MainThreadOnly;
26 }
27);
28
29#[cfg(feature = "AppKit_NSSearchFieldCell")]
30unsafe impl NSAccessibility for NSSearchFieldCell {}
31
32#[cfg(feature = "AppKit_NSSearchFieldCell")]
33unsafe impl NSAccessibilityElementProtocol for NSSearchFieldCell {}
34
35#[cfg(feature = "AppKit_NSSearchFieldCell")]
36unsafe impl NSCoding for NSSearchFieldCell {}
37
38#[cfg(feature = "AppKit_NSSearchFieldCell")]
39unsafe impl NSCopying for NSSearchFieldCell {}
40
41#[cfg(feature = "AppKit_NSSearchFieldCell")]
42unsafe impl NSObjectProtocol for NSSearchFieldCell {}
43
44#[cfg(feature = "AppKit_NSSearchFieldCell")]
45unsafe impl NSUserInterfaceItemIdentification for NSSearchFieldCell {}
46
47extern_methods!(
48 #[cfg(feature = "AppKit_NSSearchFieldCell")]
49 unsafe impl NSSearchFieldCell {
50 #[cfg(feature = "Foundation_NSString")]
51 #[method_id(@__retain_semantics Init initTextCell:)]
52 pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Id<Self>;
53
54 #[cfg(feature = "Foundation_NSCoder")]
55 #[method_id(@__retain_semantics Init initWithCoder:)]
56 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;
57
58 #[cfg(feature = "AppKit_NSImage")]
59 #[method_id(@__retain_semantics Init initImageCell:)]
60 pub unsafe fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Id<Self>;
61
62 #[cfg(feature = "AppKit_NSButtonCell")]
63 #[method_id(@__retain_semantics Other searchButtonCell)]
64 pub unsafe fn searchButtonCell(&self) -> Option<Id<NSButtonCell>>;
65
66 #[cfg(feature = "AppKit_NSButtonCell")]
67 #[method(setSearchButtonCell:)]
68 pub unsafe fn setSearchButtonCell(&self, search_button_cell: Option<&NSButtonCell>);
69
70 #[cfg(feature = "AppKit_NSButtonCell")]
71 #[method_id(@__retain_semantics Other cancelButtonCell)]
72 pub unsafe fn cancelButtonCell(&self) -> Option<Id<NSButtonCell>>;
73
74 #[cfg(feature = "AppKit_NSButtonCell")]
75 #[method(setCancelButtonCell:)]
76 pub unsafe fn setCancelButtonCell(&self, cancel_button_cell: Option<&NSButtonCell>);
77
78 #[method(resetSearchButtonCell)]
79 pub unsafe fn resetSearchButtonCell(&self);
80
81 #[method(resetCancelButtonCell)]
82 pub unsafe fn resetCancelButtonCell(&self);
83
84 #[method(searchTextRectForBounds:)]
85 pub unsafe fn searchTextRectForBounds(&self, rect: NSRect) -> NSRect;
86
87 #[method(searchButtonRectForBounds:)]
88 pub unsafe fn searchButtonRectForBounds(&self, rect: NSRect) -> NSRect;
89
90 #[method(cancelButtonRectForBounds:)]
91 pub unsafe fn cancelButtonRectForBounds(&self, rect: NSRect) -> NSRect;
92
93 #[cfg(feature = "AppKit_NSMenu")]
94 #[method_id(@__retain_semantics Other searchMenuTemplate)]
95 pub unsafe fn searchMenuTemplate(&self) -> Option<Id<NSMenu>>;
96
97 #[cfg(feature = "AppKit_NSMenu")]
98 #[method(setSearchMenuTemplate:)]
99 pub unsafe fn setSearchMenuTemplate(&self, search_menu_template: Option<&NSMenu>);
100
101 #[method(sendsWholeSearchString)]
102 pub unsafe fn sendsWholeSearchString(&self) -> bool;
103
104 #[method(setSendsWholeSearchString:)]
105 pub unsafe fn setSendsWholeSearchString(&self, sends_whole_search_string: bool);
106
107 #[method(maximumRecents)]
108 pub unsafe fn maximumRecents(&self) -> NSInteger;
109
110 #[method(setMaximumRecents:)]
111 pub unsafe fn setMaximumRecents(&self, maximum_recents: NSInteger);
112
113 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
114 #[method_id(@__retain_semantics Other recentSearches)]
115 pub unsafe fn recentSearches(&self) -> Id<NSArray<NSString>>;
116
117 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
118 #[method(setRecentSearches:)]
119 pub unsafe fn setRecentSearches(&self, recent_searches: Option<&NSArray<NSString>>);
120
121 #[method_id(@__retain_semantics Other recentsAutosaveName)]
122 pub unsafe fn recentsAutosaveName(&self) -> Option<Id<NSSearchFieldRecentsAutosaveName>>;
123
124 #[method(setRecentsAutosaveName:)]
125 pub unsafe fn setRecentsAutosaveName(
126 &self,
127 recents_autosave_name: Option<&NSSearchFieldRecentsAutosaveName>,
128 );
129
130 #[method(sendsSearchStringImmediately)]
131 pub unsafe fn sendsSearchStringImmediately(&self) -> bool;
132
133 #[method(setSendsSearchStringImmediately:)]
134 pub unsafe fn setSendsSearchStringImmediately(&self, sends_search_string_immediately: bool);
135 }
136);
137
138extern_methods!(
139 #[cfg(feature = "AppKit_NSSearchFieldCell")]
141 unsafe impl NSSearchFieldCell {
142 #[method_id(@__retain_semantics Init init)]
143 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
144 }
145);
146
147extern_methods!(
148 #[cfg(feature = "AppKit_NSSearchFieldCell")]
150 unsafe impl NSSearchFieldCell {
151 #[method_id(@__retain_semantics New new)]
152 pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
153 }
154);