objc2_foundation/generated/
NSScriptStandardSuiteCommands.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct NSSaveOptions(pub NSUInteger);
14impl NSSaveOptions {
15 #[doc(alias = "NSSaveOptionsYes")]
16 pub const Yes: Self = Self(0);
17 #[doc(alias = "NSSaveOptionsNo")]
18 pub const No: Self = Self(1);
19 #[doc(alias = "NSSaveOptionsAsk")]
20 pub const Ask: Self = Self(2);
21}
22
23unsafe impl Encode for NSSaveOptions {
24 const ENCODING: Encoding = NSUInteger::ENCODING;
25}
26
27unsafe impl RefEncode for NSSaveOptions {
28 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
29}
30
31extern_class!(
32 #[unsafe(super(NSScriptCommand, NSObject))]
34 #[derive(Debug, PartialEq, Eq, Hash)]
35 #[cfg(feature = "NSScriptCommand")]
36 pub struct NSCloneCommand;
37);
38
39#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
40unsafe impl NSCoding for NSCloneCommand {}
41
42#[cfg(feature = "NSScriptCommand")]
43unsafe impl NSObjectProtocol for NSCloneCommand {}
44
45#[cfg(feature = "NSScriptCommand")]
46impl NSCloneCommand {
47 extern_methods!(
48 #[cfg(feature = "NSScriptObjectSpecifiers")]
49 #[unsafe(method(setReceiversSpecifier:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
52
53 #[cfg(feature = "NSScriptObjectSpecifiers")]
54 #[unsafe(method(keySpecifier))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
57 );
58}
59
60#[cfg(feature = "NSScriptCommand")]
62impl NSCloneCommand {
63 extern_methods!(
64 #[cfg(feature = "NSScriptCommandDescription")]
65 #[unsafe(method(initWithCommandDescription:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initWithCommandDescription(
68 this: Allocated<Self>,
69 command_def: &NSScriptCommandDescription,
70 ) -> Retained<Self>;
71
72 #[cfg(feature = "NSCoder")]
73 #[unsafe(method(initWithCoder:))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn initWithCoder(
76 this: Allocated<Self>,
77 in_coder: &NSCoder,
78 ) -> Option<Retained<Self>>;
79 );
80}
81
82#[cfg(feature = "NSScriptCommand")]
84impl NSCloneCommand {
85 extern_methods!(
86 #[unsafe(method(init))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90 #[unsafe(method(new))]
91 #[unsafe(method_family = new)]
92 pub unsafe fn new() -> Retained<Self>;
93 );
94}
95
96extern_class!(
97 #[unsafe(super(NSScriptCommand, NSObject))]
99 #[derive(Debug, PartialEq, Eq, Hash)]
100 #[cfg(feature = "NSScriptCommand")]
101 pub struct NSCloseCommand;
102);
103
104#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
105unsafe impl NSCoding for NSCloseCommand {}
106
107#[cfg(feature = "NSScriptCommand")]
108unsafe impl NSObjectProtocol for NSCloseCommand {}
109
110#[cfg(feature = "NSScriptCommand")]
111impl NSCloseCommand {
112 extern_methods!(
113 #[unsafe(method(saveOptions))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn saveOptions(&self) -> NSSaveOptions;
116 );
117}
118
119#[cfg(feature = "NSScriptCommand")]
121impl NSCloseCommand {
122 extern_methods!(
123 #[cfg(feature = "NSScriptCommandDescription")]
124 #[unsafe(method(initWithCommandDescription:))]
125 #[unsafe(method_family = init)]
126 pub unsafe fn initWithCommandDescription(
127 this: Allocated<Self>,
128 command_def: &NSScriptCommandDescription,
129 ) -> Retained<Self>;
130
131 #[cfg(feature = "NSCoder")]
132 #[unsafe(method(initWithCoder:))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn initWithCoder(
135 this: Allocated<Self>,
136 in_coder: &NSCoder,
137 ) -> Option<Retained<Self>>;
138 );
139}
140
141#[cfg(feature = "NSScriptCommand")]
143impl NSCloseCommand {
144 extern_methods!(
145 #[unsafe(method(init))]
146 #[unsafe(method_family = init)]
147 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
148
149 #[unsafe(method(new))]
150 #[unsafe(method_family = new)]
151 pub unsafe fn new() -> Retained<Self>;
152 );
153}
154
155extern_class!(
156 #[unsafe(super(NSScriptCommand, NSObject))]
158 #[derive(Debug, PartialEq, Eq, Hash)]
159 #[cfg(feature = "NSScriptCommand")]
160 pub struct NSCountCommand;
161);
162
163#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
164unsafe impl NSCoding for NSCountCommand {}
165
166#[cfg(feature = "NSScriptCommand")]
167unsafe impl NSObjectProtocol for NSCountCommand {}
168
169#[cfg(feature = "NSScriptCommand")]
170impl NSCountCommand {
171 extern_methods!();
172}
173
174#[cfg(feature = "NSScriptCommand")]
176impl NSCountCommand {
177 extern_methods!(
178 #[cfg(feature = "NSScriptCommandDescription")]
179 #[unsafe(method(initWithCommandDescription:))]
180 #[unsafe(method_family = init)]
181 pub unsafe fn initWithCommandDescription(
182 this: Allocated<Self>,
183 command_def: &NSScriptCommandDescription,
184 ) -> Retained<Self>;
185
186 #[cfg(feature = "NSCoder")]
187 #[unsafe(method(initWithCoder:))]
188 #[unsafe(method_family = init)]
189 pub unsafe fn initWithCoder(
190 this: Allocated<Self>,
191 in_coder: &NSCoder,
192 ) -> Option<Retained<Self>>;
193 );
194}
195
196#[cfg(feature = "NSScriptCommand")]
198impl NSCountCommand {
199 extern_methods!(
200 #[unsafe(method(init))]
201 #[unsafe(method_family = init)]
202 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
203
204 #[unsafe(method(new))]
205 #[unsafe(method_family = new)]
206 pub unsafe fn new() -> Retained<Self>;
207 );
208}
209
210extern_class!(
211 #[unsafe(super(NSScriptCommand, NSObject))]
213 #[derive(Debug, PartialEq, Eq, Hash)]
214 #[cfg(feature = "NSScriptCommand")]
215 pub struct NSCreateCommand;
216);
217
218#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
219unsafe impl NSCoding for NSCreateCommand {}
220
221#[cfg(feature = "NSScriptCommand")]
222unsafe impl NSObjectProtocol for NSCreateCommand {}
223
224#[cfg(feature = "NSScriptCommand")]
225impl NSCreateCommand {
226 extern_methods!(
227 #[cfg(all(feature = "NSClassDescription", feature = "NSScriptClassDescription"))]
228 #[unsafe(method(createClassDescription))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn createClassDescription(&self) -> Retained<NSScriptClassDescription>;
231
232 #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
233 #[unsafe(method(resolvedKeyDictionary))]
234 #[unsafe(method_family = none)]
235 pub unsafe fn resolvedKeyDictionary(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
236 );
237}
238
239#[cfg(feature = "NSScriptCommand")]
241impl NSCreateCommand {
242 extern_methods!(
243 #[cfg(feature = "NSScriptCommandDescription")]
244 #[unsafe(method(initWithCommandDescription:))]
245 #[unsafe(method_family = init)]
246 pub unsafe fn initWithCommandDescription(
247 this: Allocated<Self>,
248 command_def: &NSScriptCommandDescription,
249 ) -> Retained<Self>;
250
251 #[cfg(feature = "NSCoder")]
252 #[unsafe(method(initWithCoder:))]
253 #[unsafe(method_family = init)]
254 pub unsafe fn initWithCoder(
255 this: Allocated<Self>,
256 in_coder: &NSCoder,
257 ) -> Option<Retained<Self>>;
258 );
259}
260
261#[cfg(feature = "NSScriptCommand")]
263impl NSCreateCommand {
264 extern_methods!(
265 #[unsafe(method(init))]
266 #[unsafe(method_family = init)]
267 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
268
269 #[unsafe(method(new))]
270 #[unsafe(method_family = new)]
271 pub unsafe fn new() -> Retained<Self>;
272 );
273}
274
275extern_class!(
276 #[unsafe(super(NSScriptCommand, NSObject))]
278 #[derive(Debug, PartialEq, Eq, Hash)]
279 #[cfg(feature = "NSScriptCommand")]
280 pub struct NSDeleteCommand;
281);
282
283#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
284unsafe impl NSCoding for NSDeleteCommand {}
285
286#[cfg(feature = "NSScriptCommand")]
287unsafe impl NSObjectProtocol for NSDeleteCommand {}
288
289#[cfg(feature = "NSScriptCommand")]
290impl NSDeleteCommand {
291 extern_methods!(
292 #[cfg(feature = "NSScriptObjectSpecifiers")]
293 #[unsafe(method(setReceiversSpecifier:))]
294 #[unsafe(method_family = none)]
295 pub unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
296
297 #[cfg(feature = "NSScriptObjectSpecifiers")]
298 #[unsafe(method(keySpecifier))]
299 #[unsafe(method_family = none)]
300 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
301 );
302}
303
304#[cfg(feature = "NSScriptCommand")]
306impl NSDeleteCommand {
307 extern_methods!(
308 #[cfg(feature = "NSScriptCommandDescription")]
309 #[unsafe(method(initWithCommandDescription:))]
310 #[unsafe(method_family = init)]
311 pub unsafe fn initWithCommandDescription(
312 this: Allocated<Self>,
313 command_def: &NSScriptCommandDescription,
314 ) -> Retained<Self>;
315
316 #[cfg(feature = "NSCoder")]
317 #[unsafe(method(initWithCoder:))]
318 #[unsafe(method_family = init)]
319 pub unsafe fn initWithCoder(
320 this: Allocated<Self>,
321 in_coder: &NSCoder,
322 ) -> Option<Retained<Self>>;
323 );
324}
325
326#[cfg(feature = "NSScriptCommand")]
328impl NSDeleteCommand {
329 extern_methods!(
330 #[unsafe(method(init))]
331 #[unsafe(method_family = init)]
332 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
333
334 #[unsafe(method(new))]
335 #[unsafe(method_family = new)]
336 pub unsafe fn new() -> Retained<Self>;
337 );
338}
339
340extern_class!(
341 #[unsafe(super(NSScriptCommand, NSObject))]
343 #[derive(Debug, PartialEq, Eq, Hash)]
344 #[cfg(feature = "NSScriptCommand")]
345 pub struct NSExistsCommand;
346);
347
348#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
349unsafe impl NSCoding for NSExistsCommand {}
350
351#[cfg(feature = "NSScriptCommand")]
352unsafe impl NSObjectProtocol for NSExistsCommand {}
353
354#[cfg(feature = "NSScriptCommand")]
355impl NSExistsCommand {
356 extern_methods!();
357}
358
359#[cfg(feature = "NSScriptCommand")]
361impl NSExistsCommand {
362 extern_methods!(
363 #[cfg(feature = "NSScriptCommandDescription")]
364 #[unsafe(method(initWithCommandDescription:))]
365 #[unsafe(method_family = init)]
366 pub unsafe fn initWithCommandDescription(
367 this: Allocated<Self>,
368 command_def: &NSScriptCommandDescription,
369 ) -> Retained<Self>;
370
371 #[cfg(feature = "NSCoder")]
372 #[unsafe(method(initWithCoder:))]
373 #[unsafe(method_family = init)]
374 pub unsafe fn initWithCoder(
375 this: Allocated<Self>,
376 in_coder: &NSCoder,
377 ) -> Option<Retained<Self>>;
378 );
379}
380
381#[cfg(feature = "NSScriptCommand")]
383impl NSExistsCommand {
384 extern_methods!(
385 #[unsafe(method(init))]
386 #[unsafe(method_family = init)]
387 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
388
389 #[unsafe(method(new))]
390 #[unsafe(method_family = new)]
391 pub unsafe fn new() -> Retained<Self>;
392 );
393}
394
395extern_class!(
396 #[unsafe(super(NSScriptCommand, NSObject))]
398 #[derive(Debug, PartialEq, Eq, Hash)]
399 #[cfg(feature = "NSScriptCommand")]
400 pub struct NSGetCommand;
401);
402
403#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
404unsafe impl NSCoding for NSGetCommand {}
405
406#[cfg(feature = "NSScriptCommand")]
407unsafe impl NSObjectProtocol for NSGetCommand {}
408
409#[cfg(feature = "NSScriptCommand")]
410impl NSGetCommand {
411 extern_methods!();
412}
413
414#[cfg(feature = "NSScriptCommand")]
416impl NSGetCommand {
417 extern_methods!(
418 #[cfg(feature = "NSScriptCommandDescription")]
419 #[unsafe(method(initWithCommandDescription:))]
420 #[unsafe(method_family = init)]
421 pub unsafe fn initWithCommandDescription(
422 this: Allocated<Self>,
423 command_def: &NSScriptCommandDescription,
424 ) -> Retained<Self>;
425
426 #[cfg(feature = "NSCoder")]
427 #[unsafe(method(initWithCoder:))]
428 #[unsafe(method_family = init)]
429 pub unsafe fn initWithCoder(
430 this: Allocated<Self>,
431 in_coder: &NSCoder,
432 ) -> Option<Retained<Self>>;
433 );
434}
435
436#[cfg(feature = "NSScriptCommand")]
438impl NSGetCommand {
439 extern_methods!(
440 #[unsafe(method(init))]
441 #[unsafe(method_family = init)]
442 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
443
444 #[unsafe(method(new))]
445 #[unsafe(method_family = new)]
446 pub unsafe fn new() -> Retained<Self>;
447 );
448}
449
450extern_class!(
451 #[unsafe(super(NSScriptCommand, NSObject))]
453 #[derive(Debug, PartialEq, Eq, Hash)]
454 #[cfg(feature = "NSScriptCommand")]
455 pub struct NSMoveCommand;
456);
457
458#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
459unsafe impl NSCoding for NSMoveCommand {}
460
461#[cfg(feature = "NSScriptCommand")]
462unsafe impl NSObjectProtocol for NSMoveCommand {}
463
464#[cfg(feature = "NSScriptCommand")]
465impl NSMoveCommand {
466 extern_methods!(
467 #[cfg(feature = "NSScriptObjectSpecifiers")]
468 #[unsafe(method(setReceiversSpecifier:))]
469 #[unsafe(method_family = none)]
470 pub unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
471
472 #[cfg(feature = "NSScriptObjectSpecifiers")]
473 #[unsafe(method(keySpecifier))]
474 #[unsafe(method_family = none)]
475 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
476 );
477}
478
479#[cfg(feature = "NSScriptCommand")]
481impl NSMoveCommand {
482 extern_methods!(
483 #[cfg(feature = "NSScriptCommandDescription")]
484 #[unsafe(method(initWithCommandDescription:))]
485 #[unsafe(method_family = init)]
486 pub unsafe fn initWithCommandDescription(
487 this: Allocated<Self>,
488 command_def: &NSScriptCommandDescription,
489 ) -> Retained<Self>;
490
491 #[cfg(feature = "NSCoder")]
492 #[unsafe(method(initWithCoder:))]
493 #[unsafe(method_family = init)]
494 pub unsafe fn initWithCoder(
495 this: Allocated<Self>,
496 in_coder: &NSCoder,
497 ) -> Option<Retained<Self>>;
498 );
499}
500
501#[cfg(feature = "NSScriptCommand")]
503impl NSMoveCommand {
504 extern_methods!(
505 #[unsafe(method(init))]
506 #[unsafe(method_family = init)]
507 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
508
509 #[unsafe(method(new))]
510 #[unsafe(method_family = new)]
511 pub unsafe fn new() -> Retained<Self>;
512 );
513}
514
515extern_class!(
516 #[unsafe(super(NSScriptCommand, NSObject))]
518 #[derive(Debug, PartialEq, Eq, Hash)]
519 #[cfg(feature = "NSScriptCommand")]
520 pub struct NSQuitCommand;
521);
522
523#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
524unsafe impl NSCoding for NSQuitCommand {}
525
526#[cfg(feature = "NSScriptCommand")]
527unsafe impl NSObjectProtocol for NSQuitCommand {}
528
529#[cfg(feature = "NSScriptCommand")]
530impl NSQuitCommand {
531 extern_methods!(
532 #[unsafe(method(saveOptions))]
533 #[unsafe(method_family = none)]
534 pub unsafe fn saveOptions(&self) -> NSSaveOptions;
535 );
536}
537
538#[cfg(feature = "NSScriptCommand")]
540impl NSQuitCommand {
541 extern_methods!(
542 #[cfg(feature = "NSScriptCommandDescription")]
543 #[unsafe(method(initWithCommandDescription:))]
544 #[unsafe(method_family = init)]
545 pub unsafe fn initWithCommandDescription(
546 this: Allocated<Self>,
547 command_def: &NSScriptCommandDescription,
548 ) -> Retained<Self>;
549
550 #[cfg(feature = "NSCoder")]
551 #[unsafe(method(initWithCoder:))]
552 #[unsafe(method_family = init)]
553 pub unsafe fn initWithCoder(
554 this: Allocated<Self>,
555 in_coder: &NSCoder,
556 ) -> Option<Retained<Self>>;
557 );
558}
559
560#[cfg(feature = "NSScriptCommand")]
562impl NSQuitCommand {
563 extern_methods!(
564 #[unsafe(method(init))]
565 #[unsafe(method_family = init)]
566 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
567
568 #[unsafe(method(new))]
569 #[unsafe(method_family = new)]
570 pub unsafe fn new() -> Retained<Self>;
571 );
572}
573
574extern_class!(
575 #[unsafe(super(NSScriptCommand, NSObject))]
577 #[derive(Debug, PartialEq, Eq, Hash)]
578 #[cfg(feature = "NSScriptCommand")]
579 pub struct NSSetCommand;
580);
581
582#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
583unsafe impl NSCoding for NSSetCommand {}
584
585#[cfg(feature = "NSScriptCommand")]
586unsafe impl NSObjectProtocol for NSSetCommand {}
587
588#[cfg(feature = "NSScriptCommand")]
589impl NSSetCommand {
590 extern_methods!(
591 #[cfg(feature = "NSScriptObjectSpecifiers")]
592 #[unsafe(method(setReceiversSpecifier:))]
593 #[unsafe(method_family = none)]
594 pub unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
595
596 #[cfg(feature = "NSScriptObjectSpecifiers")]
597 #[unsafe(method(keySpecifier))]
598 #[unsafe(method_family = none)]
599 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
600 );
601}
602
603#[cfg(feature = "NSScriptCommand")]
605impl NSSetCommand {
606 extern_methods!(
607 #[cfg(feature = "NSScriptCommandDescription")]
608 #[unsafe(method(initWithCommandDescription:))]
609 #[unsafe(method_family = init)]
610 pub unsafe fn initWithCommandDescription(
611 this: Allocated<Self>,
612 command_def: &NSScriptCommandDescription,
613 ) -> Retained<Self>;
614
615 #[cfg(feature = "NSCoder")]
616 #[unsafe(method(initWithCoder:))]
617 #[unsafe(method_family = init)]
618 pub unsafe fn initWithCoder(
619 this: Allocated<Self>,
620 in_coder: &NSCoder,
621 ) -> Option<Retained<Self>>;
622 );
623}
624
625#[cfg(feature = "NSScriptCommand")]
627impl NSSetCommand {
628 extern_methods!(
629 #[unsafe(method(init))]
630 #[unsafe(method_family = init)]
631 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
632
633 #[unsafe(method(new))]
634 #[unsafe(method_family = new)]
635 pub unsafe fn new() -> Retained<Self>;
636 );
637}