icrate/generated/AppKit/
NSPathControl.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8extern_class!(
9 #[derive(Debug, PartialEq, Eq, Hash)]
10 #[cfg(feature = "AppKit_NSPathControl")]
11 pub struct NSPathControl;
12
13 #[cfg(feature = "AppKit_NSPathControl")]
14 unsafe impl ClassType for NSPathControl {
15 #[inherits(NSView, NSResponder, NSObject)]
16 type Super = NSControl;
17 type Mutability = MainThreadOnly;
18 }
19);
20
21#[cfg(feature = "AppKit_NSPathControl")]
22unsafe impl NSAccessibility for NSPathControl {}
23
24#[cfg(feature = "AppKit_NSPathControl")]
25unsafe impl NSAccessibilityElementProtocol for NSPathControl {}
26
27#[cfg(feature = "AppKit_NSPathControl")]
28unsafe impl NSAnimatablePropertyContainer for NSPathControl {}
29
30#[cfg(feature = "AppKit_NSPathControl")]
31unsafe impl NSAppearanceCustomization for NSPathControl {}
32
33#[cfg(feature = "AppKit_NSPathControl")]
34unsafe impl NSCoding for NSPathControl {}
35
36#[cfg(feature = "AppKit_NSPathControl")]
37unsafe impl NSDraggingDestination for NSPathControl {}
38
39#[cfg(feature = "AppKit_NSPathControl")]
40unsafe impl NSObjectProtocol for NSPathControl {}
41
42#[cfg(feature = "AppKit_NSPathControl")]
43unsafe impl NSUserInterfaceItemIdentification for NSPathControl {}
44
45extern_methods!(
46 #[cfg(feature = "AppKit_NSPathControl")]
47 unsafe impl NSPathControl {
48 #[method(isEditable)]
49 pub unsafe fn isEditable(&self) -> bool;
50
51 #[method(setEditable:)]
52 pub unsafe fn setEditable(&self, editable: bool);
53
54 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
55 #[method_id(@__retain_semantics Other allowedTypes)]
56 pub unsafe fn allowedTypes(&self) -> Option<Id<NSArray<NSString>>>;
57
58 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
59 #[method(setAllowedTypes:)]
60 pub unsafe fn setAllowedTypes(&self, allowed_types: Option<&NSArray<NSString>>);
61
62 #[cfg(feature = "Foundation_NSString")]
63 #[method_id(@__retain_semantics Other placeholderString)]
64 pub unsafe fn placeholderString(&self) -> Option<Id<NSString>>;
65
66 #[cfg(feature = "Foundation_NSString")]
67 #[method(setPlaceholderString:)]
68 pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>);
69
70 #[cfg(feature = "Foundation_NSAttributedString")]
71 #[method_id(@__retain_semantics Other placeholderAttributedString)]
72 pub unsafe fn placeholderAttributedString(&self) -> Option<Id<NSAttributedString>>;
73
74 #[cfg(feature = "Foundation_NSAttributedString")]
75 #[method(setPlaceholderAttributedString:)]
76 pub unsafe fn setPlaceholderAttributedString(
77 &self,
78 placeholder_attributed_string: Option<&NSAttributedString>,
79 );
80
81 #[cfg(feature = "Foundation_NSURL")]
82 #[method_id(@__retain_semantics Other URL)]
83 pub unsafe fn URL(&self) -> Option<Id<NSURL>>;
84
85 #[cfg(feature = "Foundation_NSURL")]
86 #[method(setURL:)]
87 pub unsafe fn setURL(&self, url: Option<&NSURL>);
88
89 #[method(doubleAction)]
90 pub unsafe fn doubleAction(&self) -> Option<Sel>;
91
92 #[method(setDoubleAction:)]
93 pub unsafe fn setDoubleAction(&self, double_action: Option<Sel>);
94
95 #[method(pathStyle)]
96 pub unsafe fn pathStyle(&self) -> NSPathStyle;
97
98 #[method(setPathStyle:)]
99 pub unsafe fn setPathStyle(&self, path_style: NSPathStyle);
100
101 #[cfg(feature = "AppKit_NSPathControlItem")]
102 #[method_id(@__retain_semantics Other clickedPathItem)]
103 pub unsafe fn clickedPathItem(&self) -> Option<Id<NSPathControlItem>>;
104
105 #[cfg(all(feature = "AppKit_NSPathControlItem", feature = "Foundation_NSArray"))]
106 #[method_id(@__retain_semantics Other pathItems)]
107 pub unsafe fn pathItems(&self) -> Id<NSArray<NSPathControlItem>>;
108
109 #[cfg(all(feature = "AppKit_NSPathControlItem", feature = "Foundation_NSArray"))]
110 #[method(setPathItems:)]
111 pub unsafe fn setPathItems(&self, path_items: &NSArray<NSPathControlItem>);
112
113 #[cfg(feature = "AppKit_NSColor")]
114 #[method_id(@__retain_semantics Other backgroundColor)]
115 pub unsafe fn backgroundColor(&self) -> Option<Id<NSColor>>;
116
117 #[cfg(feature = "AppKit_NSColor")]
118 #[method(setBackgroundColor:)]
119 pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>);
120
121 #[method_id(@__retain_semantics Other delegate)]
122 pub unsafe fn delegate(&self) -> Option<Id<ProtocolObject<dyn NSPathControlDelegate>>>;
123
124 #[method(setDelegate:)]
125 pub unsafe fn setDelegate(
126 &self,
127 delegate: Option<&ProtocolObject<dyn NSPathControlDelegate>>,
128 );
129
130 #[method(setDraggingSourceOperationMask:forLocal:)]
131 pub unsafe fn setDraggingSourceOperationMask_forLocal(
132 &self,
133 mask: NSDragOperation,
134 is_local: bool,
135 );
136
137 #[cfg(feature = "AppKit_NSMenu")]
138 #[method_id(@__retain_semantics Other menu)]
139 pub unsafe fn menu(&self) -> Option<Id<NSMenu>>;
140
141 #[cfg(feature = "AppKit_NSMenu")]
142 #[method(setMenu:)]
143 pub unsafe fn setMenu(&self, menu: Option<&NSMenu>);
144 }
145);
146
147extern_methods!(
148 #[cfg(feature = "AppKit_NSPathControl")]
150 unsafe impl NSPathControl {
151 #[method_id(@__retain_semantics Init initWithFrame:)]
152 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Id<Self>;
153
154 #[cfg(feature = "Foundation_NSCoder")]
155 #[method_id(@__retain_semantics Init initWithCoder:)]
156 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
157 }
158);
159
160extern_methods!(
161 #[cfg(feature = "AppKit_NSPathControl")]
163 unsafe impl NSPathControl {
164 #[method_id(@__retain_semantics Init init)]
165 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
166 }
167);
168
169extern_methods!(
170 #[cfg(feature = "AppKit_NSPathControl")]
172 unsafe impl NSPathControl {
173 #[method_id(@__retain_semantics New new)]
174 pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
175 }
176);
177
178extern_protocol!(
179 pub unsafe trait NSPathControlDelegate: NSObjectProtocol + IsMainThreadOnly {
180 #[cfg(all(
181 feature = "AppKit_NSPasteboard",
182 feature = "AppKit_NSPathControl",
183 feature = "AppKit_NSPathControlItem"
184 ))]
185 #[optional]
186 #[method(pathControl:shouldDragItem:withPasteboard:)]
187 unsafe fn pathControl_shouldDragItem_withPasteboard(
188 &self,
189 path_control: &NSPathControl,
190 path_item: &NSPathControlItem,
191 pasteboard: &NSPasteboard,
192 ) -> bool;
193
194 #[cfg(all(
195 feature = "AppKit_NSPasteboard",
196 feature = "AppKit_NSPathComponentCell",
197 feature = "AppKit_NSPathControl"
198 ))]
199 #[optional]
200 #[method(pathControl:shouldDragPathComponentCell:withPasteboard:)]
201 unsafe fn pathControl_shouldDragPathComponentCell_withPasteboard(
202 &self,
203 path_control: &NSPathControl,
204 path_component_cell: &NSPathComponentCell,
205 pasteboard: &NSPasteboard,
206 ) -> bool;
207
208 #[cfg(feature = "AppKit_NSPathControl")]
209 #[optional]
210 #[method(pathControl:validateDrop:)]
211 unsafe fn pathControl_validateDrop(
212 &self,
213 path_control: &NSPathControl,
214 info: &ProtocolObject<dyn NSDraggingInfo>,
215 ) -> NSDragOperation;
216
217 #[cfg(feature = "AppKit_NSPathControl")]
218 #[optional]
219 #[method(pathControl:acceptDrop:)]
220 unsafe fn pathControl_acceptDrop(
221 &self,
222 path_control: &NSPathControl,
223 info: &ProtocolObject<dyn NSDraggingInfo>,
224 ) -> bool;
225
226 #[cfg(all(feature = "AppKit_NSOpenPanel", feature = "AppKit_NSPathControl"))]
227 #[optional]
228 #[method(pathControl:willDisplayOpenPanel:)]
229 unsafe fn pathControl_willDisplayOpenPanel(
230 &self,
231 path_control: &NSPathControl,
232 open_panel: &NSOpenPanel,
233 );
234
235 #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSPathControl"))]
236 #[optional]
237 #[method(pathControl:willPopUpMenu:)]
238 unsafe fn pathControl_willPopUpMenu(&self, path_control: &NSPathControl, menu: &NSMenu);
239 }
240
241 unsafe impl ProtocolType for dyn NSPathControlDelegate {}
242);
243
244extern_methods!(
245 #[cfg(feature = "AppKit_NSPathControl")]
247 unsafe impl NSPathControl {
248 #[cfg(feature = "AppKit_NSPathComponentCell")]
249 #[deprecated = "Use the clickedPathItem property instead"]
250 #[method_id(@__retain_semantics Other clickedPathComponentCell)]
251 pub unsafe fn clickedPathComponentCell(&self) -> Option<Id<NSPathComponentCell>>;
252
253 #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "Foundation_NSArray"))]
254 #[deprecated = "Use the pathItems property instead"]
255 #[method_id(@__retain_semantics Other pathComponentCells)]
256 pub unsafe fn pathComponentCells(&self) -> Id<NSArray<NSPathComponentCell>>;
257
258 #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "Foundation_NSArray"))]
259 #[deprecated = "Use the pathItems property instead"]
260 #[method(setPathComponentCells:)]
261 pub unsafe fn setPathComponentCells(&self, cells: &NSArray<NSPathComponentCell>);
262 }
263);