objc2_app_kit/generated/
NSSearchFieldCell.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10pub static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000;
12
13pub static NSSearchFieldRecentsMenuItemTag: NSInteger = 1001;
15
16pub static NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002;
18
19pub static NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003;
21
22extern_class!(
23 #[unsafe(super(NSTextFieldCell, NSActionCell, NSCell, NSObject))]
25 #[derive(Debug, PartialEq, Eq, Hash)]
26 #[cfg(all(
27 feature = "NSActionCell",
28 feature = "NSCell",
29 feature = "NSTextFieldCell"
30 ))]
31 pub struct NSSearchFieldCell;
32);
33
34#[cfg(all(
35 feature = "NSAccessibilityProtocols",
36 feature = "NSActionCell",
37 feature = "NSCell",
38 feature = "NSTextFieldCell"
39))]
40extern_conformance!(
41 unsafe impl NSAccessibility for NSSearchFieldCell {}
42);
43
44#[cfg(all(
45 feature = "NSAccessibilityProtocols",
46 feature = "NSActionCell",
47 feature = "NSCell",
48 feature = "NSTextFieldCell"
49))]
50extern_conformance!(
51 unsafe impl NSAccessibilityElementProtocol for NSSearchFieldCell {}
52);
53
54#[cfg(all(
55 feature = "NSActionCell",
56 feature = "NSCell",
57 feature = "NSTextFieldCell"
58))]
59extern_conformance!(
60 unsafe impl NSCoding for NSSearchFieldCell {}
61);
62
63#[cfg(all(
64 feature = "NSActionCell",
65 feature = "NSCell",
66 feature = "NSTextFieldCell"
67))]
68extern_conformance!(
69 unsafe impl NSCopying for NSSearchFieldCell {}
70);
71
72#[cfg(all(
73 feature = "NSActionCell",
74 feature = "NSCell",
75 feature = "NSTextFieldCell"
76))]
77unsafe impl CopyingHelper for NSSearchFieldCell {
78 type Result = Self;
79}
80
81#[cfg(all(
82 feature = "NSActionCell",
83 feature = "NSCell",
84 feature = "NSTextFieldCell"
85))]
86extern_conformance!(
87 unsafe impl NSObjectProtocol for NSSearchFieldCell {}
88);
89
90#[cfg(all(
91 feature = "NSActionCell",
92 feature = "NSCell",
93 feature = "NSTextFieldCell",
94 feature = "NSUserInterfaceItemIdentification"
95))]
96extern_conformance!(
97 unsafe impl NSUserInterfaceItemIdentification for NSSearchFieldCell {}
98);
99
100#[cfg(all(
101 feature = "NSActionCell",
102 feature = "NSCell",
103 feature = "NSTextFieldCell"
104))]
105impl NSSearchFieldCell {
106 extern_methods!(
107 #[unsafe(method(initTextCell:))]
108 #[unsafe(method_family = init)]
109 pub fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
110
111 #[unsafe(method(initWithCoder:))]
115 #[unsafe(method_family = init)]
116 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
117
118 #[cfg(feature = "NSImage")]
119 #[unsafe(method(initImageCell:))]
120 #[unsafe(method_family = init)]
121 pub unsafe fn initImageCell(
122 this: Allocated<Self>,
123 image: Option<&NSImage>,
124 ) -> Retained<Self>;
125
126 #[cfg(feature = "NSButtonCell")]
127 #[unsafe(method(searchButtonCell))]
128 #[unsafe(method_family = none)]
129 pub fn searchButtonCell(&self) -> Option<Retained<NSButtonCell>>;
130
131 #[cfg(feature = "NSButtonCell")]
132 #[unsafe(method(setSearchButtonCell:))]
134 #[unsafe(method_family = none)]
135 pub fn setSearchButtonCell(&self, search_button_cell: Option<&NSButtonCell>);
136
137 #[cfg(feature = "NSButtonCell")]
138 #[unsafe(method(cancelButtonCell))]
139 #[unsafe(method_family = none)]
140 pub fn cancelButtonCell(&self) -> Option<Retained<NSButtonCell>>;
141
142 #[cfg(feature = "NSButtonCell")]
143 #[unsafe(method(setCancelButtonCell:))]
145 #[unsafe(method_family = none)]
146 pub fn setCancelButtonCell(&self, cancel_button_cell: Option<&NSButtonCell>);
147
148 #[unsafe(method(resetSearchButtonCell))]
149 #[unsafe(method_family = none)]
150 pub fn resetSearchButtonCell(&self);
151
152 #[unsafe(method(resetCancelButtonCell))]
153 #[unsafe(method_family = none)]
154 pub fn resetCancelButtonCell(&self);
155
156 #[unsafe(method(searchTextRectForBounds:))]
157 #[unsafe(method_family = none)]
158 pub fn searchTextRectForBounds(&self, rect: NSRect) -> NSRect;
159
160 #[unsafe(method(searchButtonRectForBounds:))]
161 #[unsafe(method_family = none)]
162 pub fn searchButtonRectForBounds(&self, rect: NSRect) -> NSRect;
163
164 #[unsafe(method(cancelButtonRectForBounds:))]
165 #[unsafe(method_family = none)]
166 pub fn cancelButtonRectForBounds(&self, rect: NSRect) -> NSRect;
167
168 #[cfg(feature = "NSMenu")]
169 #[unsafe(method(searchMenuTemplate))]
170 #[unsafe(method_family = none)]
171 pub fn searchMenuTemplate(&self) -> Option<Retained<NSMenu>>;
172
173 #[cfg(feature = "NSMenu")]
174 #[unsafe(method(setSearchMenuTemplate:))]
176 #[unsafe(method_family = none)]
177 pub fn setSearchMenuTemplate(&self, search_menu_template: Option<&NSMenu>);
178
179 #[unsafe(method(sendsWholeSearchString))]
180 #[unsafe(method_family = none)]
181 pub fn sendsWholeSearchString(&self) -> bool;
182
183 #[unsafe(method(setSendsWholeSearchString:))]
185 #[unsafe(method_family = none)]
186 pub fn setSendsWholeSearchString(&self, sends_whole_search_string: bool);
187
188 #[unsafe(method(maximumRecents))]
189 #[unsafe(method_family = none)]
190 pub fn maximumRecents(&self) -> NSInteger;
191
192 #[unsafe(method(setMaximumRecents:))]
194 #[unsafe(method_family = none)]
195 pub fn setMaximumRecents(&self, maximum_recents: NSInteger);
196
197 #[unsafe(method(recentSearches))]
198 #[unsafe(method_family = none)]
199 pub fn recentSearches(&self) -> Retained<NSArray<NSString>>;
200
201 #[unsafe(method(setRecentSearches:))]
205 #[unsafe(method_family = none)]
206 pub fn setRecentSearches(&self, recent_searches: Option<&NSArray<NSString>>);
207
208 #[cfg(feature = "NSSearchField")]
209 #[unsafe(method(recentsAutosaveName))]
210 #[unsafe(method_family = none)]
211 pub fn recentsAutosaveName(&self) -> Option<Retained<NSSearchFieldRecentsAutosaveName>>;
212
213 #[cfg(feature = "NSSearchField")]
214 #[unsafe(method(setRecentsAutosaveName:))]
218 #[unsafe(method_family = none)]
219 pub fn setRecentsAutosaveName(
220 &self,
221 recents_autosave_name: Option<&NSSearchFieldRecentsAutosaveName>,
222 );
223
224 #[unsafe(method(sendsSearchStringImmediately))]
225 #[unsafe(method_family = none)]
226 pub fn sendsSearchStringImmediately(&self) -> bool;
227
228 #[unsafe(method(setSendsSearchStringImmediately:))]
230 #[unsafe(method_family = none)]
231 pub fn setSendsSearchStringImmediately(&self, sends_search_string_immediately: bool);
232 );
233}
234
235#[cfg(all(
237 feature = "NSActionCell",
238 feature = "NSCell",
239 feature = "NSTextFieldCell"
240))]
241impl NSSearchFieldCell {
242 extern_methods!(
243 #[unsafe(method(init))]
244 #[unsafe(method_family = init)]
245 pub fn init(this: Allocated<Self>) -> Retained<Self>;
246 );
247}
248
249#[cfg(all(
251 feature = "NSActionCell",
252 feature = "NSCell",
253 feature = "NSTextFieldCell"
254))]
255impl NSSearchFieldCell {
256 extern_methods!(
257 #[unsafe(method(new))]
258 #[unsafe(method_family = new)]
259 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
260 );
261}