objc2_foundation/generated/
NSScriptStandardSuiteCommands.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nssaveoptions?language=objc)
10// NS_ENUM
11#[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    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsclonecommand?language=objc)
33    #[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"))]
40extern_conformance!(
41    unsafe impl NSCoding for NSCloneCommand {}
42);
43
44#[cfg(feature = "NSScriptCommand")]
45extern_conformance!(
46    unsafe impl NSObjectProtocol for NSCloneCommand {}
47);
48
49#[cfg(feature = "NSScriptCommand")]
50impl NSCloneCommand {
51    extern_methods!(
52        #[cfg(feature = "NSScriptObjectSpecifiers")]
53        #[unsafe(method(setReceiversSpecifier:))]
54        #[unsafe(method_family = none)]
55        pub fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
56
57        #[cfg(feature = "NSScriptObjectSpecifiers")]
58        #[unsafe(method(keySpecifier))]
59        #[unsafe(method_family = none)]
60        pub fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
61    );
62}
63
64/// Methods declared on superclass `NSScriptCommand`.
65#[cfg(feature = "NSScriptCommand")]
66impl NSCloneCommand {
67    extern_methods!(
68        #[cfg(feature = "NSScriptCommandDescription")]
69        #[unsafe(method(initWithCommandDescription:))]
70        #[unsafe(method_family = init)]
71        pub fn initWithCommandDescription(
72            this: Allocated<Self>,
73            command_def: &NSScriptCommandDescription,
74        ) -> Retained<Self>;
75
76        #[cfg(feature = "NSCoder")]
77        /// # Safety
78        ///
79        /// `in_coder` possibly has further requirements.
80        #[unsafe(method(initWithCoder:))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn initWithCoder(
83            this: Allocated<Self>,
84            in_coder: &NSCoder,
85        ) -> Option<Retained<Self>>;
86    );
87}
88
89/// Methods declared on superclass `NSObject`.
90#[cfg(feature = "NSScriptCommand")]
91impl NSCloneCommand {
92    extern_methods!(
93        #[unsafe(method(init))]
94        #[unsafe(method_family = init)]
95        pub fn init(this: Allocated<Self>) -> Retained<Self>;
96
97        #[unsafe(method(new))]
98        #[unsafe(method_family = new)]
99        pub fn new() -> Retained<Self>;
100    );
101}
102
103#[cfg(feature = "NSScriptCommand")]
104impl DefaultRetained for NSCloneCommand {
105    #[inline]
106    fn default_retained() -> Retained<Self> {
107        Self::new()
108    }
109}
110
111extern_class!(
112    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsclosecommand?language=objc)
113    #[unsafe(super(NSScriptCommand, NSObject))]
114    #[derive(Debug, PartialEq, Eq, Hash)]
115    #[cfg(feature = "NSScriptCommand")]
116    pub struct NSCloseCommand;
117);
118
119#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
120extern_conformance!(
121    unsafe impl NSCoding for NSCloseCommand {}
122);
123
124#[cfg(feature = "NSScriptCommand")]
125extern_conformance!(
126    unsafe impl NSObjectProtocol for NSCloseCommand {}
127);
128
129#[cfg(feature = "NSScriptCommand")]
130impl NSCloseCommand {
131    extern_methods!(
132        #[unsafe(method(saveOptions))]
133        #[unsafe(method_family = none)]
134        pub fn saveOptions(&self) -> NSSaveOptions;
135    );
136}
137
138/// Methods declared on superclass `NSScriptCommand`.
139#[cfg(feature = "NSScriptCommand")]
140impl NSCloseCommand {
141    extern_methods!(
142        #[cfg(feature = "NSScriptCommandDescription")]
143        #[unsafe(method(initWithCommandDescription:))]
144        #[unsafe(method_family = init)]
145        pub fn initWithCommandDescription(
146            this: Allocated<Self>,
147            command_def: &NSScriptCommandDescription,
148        ) -> Retained<Self>;
149
150        #[cfg(feature = "NSCoder")]
151        /// # Safety
152        ///
153        /// `in_coder` possibly has further requirements.
154        #[unsafe(method(initWithCoder:))]
155        #[unsafe(method_family = init)]
156        pub unsafe fn initWithCoder(
157            this: Allocated<Self>,
158            in_coder: &NSCoder,
159        ) -> Option<Retained<Self>>;
160    );
161}
162
163/// Methods declared on superclass `NSObject`.
164#[cfg(feature = "NSScriptCommand")]
165impl NSCloseCommand {
166    extern_methods!(
167        #[unsafe(method(init))]
168        #[unsafe(method_family = init)]
169        pub fn init(this: Allocated<Self>) -> Retained<Self>;
170
171        #[unsafe(method(new))]
172        #[unsafe(method_family = new)]
173        pub fn new() -> Retained<Self>;
174    );
175}
176
177#[cfg(feature = "NSScriptCommand")]
178impl DefaultRetained for NSCloseCommand {
179    #[inline]
180    fn default_retained() -> Retained<Self> {
181        Self::new()
182    }
183}
184
185extern_class!(
186    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nscountcommand?language=objc)
187    #[unsafe(super(NSScriptCommand, NSObject))]
188    #[derive(Debug, PartialEq, Eq, Hash)]
189    #[cfg(feature = "NSScriptCommand")]
190    pub struct NSCountCommand;
191);
192
193#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
194extern_conformance!(
195    unsafe impl NSCoding for NSCountCommand {}
196);
197
198#[cfg(feature = "NSScriptCommand")]
199extern_conformance!(
200    unsafe impl NSObjectProtocol for NSCountCommand {}
201);
202
203#[cfg(feature = "NSScriptCommand")]
204impl NSCountCommand {
205    extern_methods!();
206}
207
208/// Methods declared on superclass `NSScriptCommand`.
209#[cfg(feature = "NSScriptCommand")]
210impl NSCountCommand {
211    extern_methods!(
212        #[cfg(feature = "NSScriptCommandDescription")]
213        #[unsafe(method(initWithCommandDescription:))]
214        #[unsafe(method_family = init)]
215        pub fn initWithCommandDescription(
216            this: Allocated<Self>,
217            command_def: &NSScriptCommandDescription,
218        ) -> Retained<Self>;
219
220        #[cfg(feature = "NSCoder")]
221        /// # Safety
222        ///
223        /// `in_coder` possibly has further requirements.
224        #[unsafe(method(initWithCoder:))]
225        #[unsafe(method_family = init)]
226        pub unsafe fn initWithCoder(
227            this: Allocated<Self>,
228            in_coder: &NSCoder,
229        ) -> Option<Retained<Self>>;
230    );
231}
232
233/// Methods declared on superclass `NSObject`.
234#[cfg(feature = "NSScriptCommand")]
235impl NSCountCommand {
236    extern_methods!(
237        #[unsafe(method(init))]
238        #[unsafe(method_family = init)]
239        pub fn init(this: Allocated<Self>) -> Retained<Self>;
240
241        #[unsafe(method(new))]
242        #[unsafe(method_family = new)]
243        pub fn new() -> Retained<Self>;
244    );
245}
246
247#[cfg(feature = "NSScriptCommand")]
248impl DefaultRetained for NSCountCommand {
249    #[inline]
250    fn default_retained() -> Retained<Self> {
251        Self::new()
252    }
253}
254
255extern_class!(
256    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nscreatecommand?language=objc)
257    #[unsafe(super(NSScriptCommand, NSObject))]
258    #[derive(Debug, PartialEq, Eq, Hash)]
259    #[cfg(feature = "NSScriptCommand")]
260    pub struct NSCreateCommand;
261);
262
263#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
264extern_conformance!(
265    unsafe impl NSCoding for NSCreateCommand {}
266);
267
268#[cfg(feature = "NSScriptCommand")]
269extern_conformance!(
270    unsafe impl NSObjectProtocol for NSCreateCommand {}
271);
272
273#[cfg(feature = "NSScriptCommand")]
274impl NSCreateCommand {
275    extern_methods!(
276        #[cfg(all(feature = "NSClassDescription", feature = "NSScriptClassDescription"))]
277        #[unsafe(method(createClassDescription))]
278        #[unsafe(method_family = none)]
279        pub fn createClassDescription(&self) -> Retained<NSScriptClassDescription>;
280
281        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
282        #[unsafe(method(resolvedKeyDictionary))]
283        #[unsafe(method_family = none)]
284        pub fn resolvedKeyDictionary(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
285    );
286}
287
288/// Methods declared on superclass `NSScriptCommand`.
289#[cfg(feature = "NSScriptCommand")]
290impl NSCreateCommand {
291    extern_methods!(
292        #[cfg(feature = "NSScriptCommandDescription")]
293        #[unsafe(method(initWithCommandDescription:))]
294        #[unsafe(method_family = init)]
295        pub fn initWithCommandDescription(
296            this: Allocated<Self>,
297            command_def: &NSScriptCommandDescription,
298        ) -> Retained<Self>;
299
300        #[cfg(feature = "NSCoder")]
301        /// # Safety
302        ///
303        /// `in_coder` possibly has further requirements.
304        #[unsafe(method(initWithCoder:))]
305        #[unsafe(method_family = init)]
306        pub unsafe fn initWithCoder(
307            this: Allocated<Self>,
308            in_coder: &NSCoder,
309        ) -> Option<Retained<Self>>;
310    );
311}
312
313/// Methods declared on superclass `NSObject`.
314#[cfg(feature = "NSScriptCommand")]
315impl NSCreateCommand {
316    extern_methods!(
317        #[unsafe(method(init))]
318        #[unsafe(method_family = init)]
319        pub fn init(this: Allocated<Self>) -> Retained<Self>;
320
321        #[unsafe(method(new))]
322        #[unsafe(method_family = new)]
323        pub fn new() -> Retained<Self>;
324    );
325}
326
327#[cfg(feature = "NSScriptCommand")]
328impl DefaultRetained for NSCreateCommand {
329    #[inline]
330    fn default_retained() -> Retained<Self> {
331        Self::new()
332    }
333}
334
335extern_class!(
336    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdeletecommand?language=objc)
337    #[unsafe(super(NSScriptCommand, NSObject))]
338    #[derive(Debug, PartialEq, Eq, Hash)]
339    #[cfg(feature = "NSScriptCommand")]
340    pub struct NSDeleteCommand;
341);
342
343#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
344extern_conformance!(
345    unsafe impl NSCoding for NSDeleteCommand {}
346);
347
348#[cfg(feature = "NSScriptCommand")]
349extern_conformance!(
350    unsafe impl NSObjectProtocol for NSDeleteCommand {}
351);
352
353#[cfg(feature = "NSScriptCommand")]
354impl NSDeleteCommand {
355    extern_methods!(
356        #[cfg(feature = "NSScriptObjectSpecifiers")]
357        #[unsafe(method(setReceiversSpecifier:))]
358        #[unsafe(method_family = none)]
359        pub fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
360
361        #[cfg(feature = "NSScriptObjectSpecifiers")]
362        #[unsafe(method(keySpecifier))]
363        #[unsafe(method_family = none)]
364        pub fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
365    );
366}
367
368/// Methods declared on superclass `NSScriptCommand`.
369#[cfg(feature = "NSScriptCommand")]
370impl NSDeleteCommand {
371    extern_methods!(
372        #[cfg(feature = "NSScriptCommandDescription")]
373        #[unsafe(method(initWithCommandDescription:))]
374        #[unsafe(method_family = init)]
375        pub fn initWithCommandDescription(
376            this: Allocated<Self>,
377            command_def: &NSScriptCommandDescription,
378        ) -> Retained<Self>;
379
380        #[cfg(feature = "NSCoder")]
381        /// # Safety
382        ///
383        /// `in_coder` possibly has further requirements.
384        #[unsafe(method(initWithCoder:))]
385        #[unsafe(method_family = init)]
386        pub unsafe fn initWithCoder(
387            this: Allocated<Self>,
388            in_coder: &NSCoder,
389        ) -> Option<Retained<Self>>;
390    );
391}
392
393/// Methods declared on superclass `NSObject`.
394#[cfg(feature = "NSScriptCommand")]
395impl NSDeleteCommand {
396    extern_methods!(
397        #[unsafe(method(init))]
398        #[unsafe(method_family = init)]
399        pub fn init(this: Allocated<Self>) -> Retained<Self>;
400
401        #[unsafe(method(new))]
402        #[unsafe(method_family = new)]
403        pub fn new() -> Retained<Self>;
404    );
405}
406
407#[cfg(feature = "NSScriptCommand")]
408impl DefaultRetained for NSDeleteCommand {
409    #[inline]
410    fn default_retained() -> Retained<Self> {
411        Self::new()
412    }
413}
414
415extern_class!(
416    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsexistscommand?language=objc)
417    #[unsafe(super(NSScriptCommand, NSObject))]
418    #[derive(Debug, PartialEq, Eq, Hash)]
419    #[cfg(feature = "NSScriptCommand")]
420    pub struct NSExistsCommand;
421);
422
423#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
424extern_conformance!(
425    unsafe impl NSCoding for NSExistsCommand {}
426);
427
428#[cfg(feature = "NSScriptCommand")]
429extern_conformance!(
430    unsafe impl NSObjectProtocol for NSExistsCommand {}
431);
432
433#[cfg(feature = "NSScriptCommand")]
434impl NSExistsCommand {
435    extern_methods!();
436}
437
438/// Methods declared on superclass `NSScriptCommand`.
439#[cfg(feature = "NSScriptCommand")]
440impl NSExistsCommand {
441    extern_methods!(
442        #[cfg(feature = "NSScriptCommandDescription")]
443        #[unsafe(method(initWithCommandDescription:))]
444        #[unsafe(method_family = init)]
445        pub fn initWithCommandDescription(
446            this: Allocated<Self>,
447            command_def: &NSScriptCommandDescription,
448        ) -> Retained<Self>;
449
450        #[cfg(feature = "NSCoder")]
451        /// # Safety
452        ///
453        /// `in_coder` possibly has further requirements.
454        #[unsafe(method(initWithCoder:))]
455        #[unsafe(method_family = init)]
456        pub unsafe fn initWithCoder(
457            this: Allocated<Self>,
458            in_coder: &NSCoder,
459        ) -> Option<Retained<Self>>;
460    );
461}
462
463/// Methods declared on superclass `NSObject`.
464#[cfg(feature = "NSScriptCommand")]
465impl NSExistsCommand {
466    extern_methods!(
467        #[unsafe(method(init))]
468        #[unsafe(method_family = init)]
469        pub fn init(this: Allocated<Self>) -> Retained<Self>;
470
471        #[unsafe(method(new))]
472        #[unsafe(method_family = new)]
473        pub fn new() -> Retained<Self>;
474    );
475}
476
477#[cfg(feature = "NSScriptCommand")]
478impl DefaultRetained for NSExistsCommand {
479    #[inline]
480    fn default_retained() -> Retained<Self> {
481        Self::new()
482    }
483}
484
485extern_class!(
486    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgetcommand?language=objc)
487    #[unsafe(super(NSScriptCommand, NSObject))]
488    #[derive(Debug, PartialEq, Eq, Hash)]
489    #[cfg(feature = "NSScriptCommand")]
490    pub struct NSGetCommand;
491);
492
493#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
494extern_conformance!(
495    unsafe impl NSCoding for NSGetCommand {}
496);
497
498#[cfg(feature = "NSScriptCommand")]
499extern_conformance!(
500    unsafe impl NSObjectProtocol for NSGetCommand {}
501);
502
503#[cfg(feature = "NSScriptCommand")]
504impl NSGetCommand {
505    extern_methods!();
506}
507
508/// Methods declared on superclass `NSScriptCommand`.
509#[cfg(feature = "NSScriptCommand")]
510impl NSGetCommand {
511    extern_methods!(
512        #[cfg(feature = "NSScriptCommandDescription")]
513        #[unsafe(method(initWithCommandDescription:))]
514        #[unsafe(method_family = init)]
515        pub fn initWithCommandDescription(
516            this: Allocated<Self>,
517            command_def: &NSScriptCommandDescription,
518        ) -> Retained<Self>;
519
520        #[cfg(feature = "NSCoder")]
521        /// # Safety
522        ///
523        /// `in_coder` possibly has further requirements.
524        #[unsafe(method(initWithCoder:))]
525        #[unsafe(method_family = init)]
526        pub unsafe fn initWithCoder(
527            this: Allocated<Self>,
528            in_coder: &NSCoder,
529        ) -> Option<Retained<Self>>;
530    );
531}
532
533/// Methods declared on superclass `NSObject`.
534#[cfg(feature = "NSScriptCommand")]
535impl NSGetCommand {
536    extern_methods!(
537        #[unsafe(method(init))]
538        #[unsafe(method_family = init)]
539        pub fn init(this: Allocated<Self>) -> Retained<Self>;
540
541        #[unsafe(method(new))]
542        #[unsafe(method_family = new)]
543        pub fn new() -> Retained<Self>;
544    );
545}
546
547#[cfg(feature = "NSScriptCommand")]
548impl DefaultRetained for NSGetCommand {
549    #[inline]
550    fn default_retained() -> Retained<Self> {
551        Self::new()
552    }
553}
554
555extern_class!(
556    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsmovecommand?language=objc)
557    #[unsafe(super(NSScriptCommand, NSObject))]
558    #[derive(Debug, PartialEq, Eq, Hash)]
559    #[cfg(feature = "NSScriptCommand")]
560    pub struct NSMoveCommand;
561);
562
563#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
564extern_conformance!(
565    unsafe impl NSCoding for NSMoveCommand {}
566);
567
568#[cfg(feature = "NSScriptCommand")]
569extern_conformance!(
570    unsafe impl NSObjectProtocol for NSMoveCommand {}
571);
572
573#[cfg(feature = "NSScriptCommand")]
574impl NSMoveCommand {
575    extern_methods!(
576        #[cfg(feature = "NSScriptObjectSpecifiers")]
577        #[unsafe(method(setReceiversSpecifier:))]
578        #[unsafe(method_family = none)]
579        pub fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
580
581        #[cfg(feature = "NSScriptObjectSpecifiers")]
582        #[unsafe(method(keySpecifier))]
583        #[unsafe(method_family = none)]
584        pub fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
585    );
586}
587
588/// Methods declared on superclass `NSScriptCommand`.
589#[cfg(feature = "NSScriptCommand")]
590impl NSMoveCommand {
591    extern_methods!(
592        #[cfg(feature = "NSScriptCommandDescription")]
593        #[unsafe(method(initWithCommandDescription:))]
594        #[unsafe(method_family = init)]
595        pub fn initWithCommandDescription(
596            this: Allocated<Self>,
597            command_def: &NSScriptCommandDescription,
598        ) -> Retained<Self>;
599
600        #[cfg(feature = "NSCoder")]
601        /// # Safety
602        ///
603        /// `in_coder` possibly has further requirements.
604        #[unsafe(method(initWithCoder:))]
605        #[unsafe(method_family = init)]
606        pub unsafe fn initWithCoder(
607            this: Allocated<Self>,
608            in_coder: &NSCoder,
609        ) -> Option<Retained<Self>>;
610    );
611}
612
613/// Methods declared on superclass `NSObject`.
614#[cfg(feature = "NSScriptCommand")]
615impl NSMoveCommand {
616    extern_methods!(
617        #[unsafe(method(init))]
618        #[unsafe(method_family = init)]
619        pub fn init(this: Allocated<Self>) -> Retained<Self>;
620
621        #[unsafe(method(new))]
622        #[unsafe(method_family = new)]
623        pub fn new() -> Retained<Self>;
624    );
625}
626
627#[cfg(feature = "NSScriptCommand")]
628impl DefaultRetained for NSMoveCommand {
629    #[inline]
630    fn default_retained() -> Retained<Self> {
631        Self::new()
632    }
633}
634
635extern_class!(
636    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsquitcommand?language=objc)
637    #[unsafe(super(NSScriptCommand, NSObject))]
638    #[derive(Debug, PartialEq, Eq, Hash)]
639    #[cfg(feature = "NSScriptCommand")]
640    pub struct NSQuitCommand;
641);
642
643#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
644extern_conformance!(
645    unsafe impl NSCoding for NSQuitCommand {}
646);
647
648#[cfg(feature = "NSScriptCommand")]
649extern_conformance!(
650    unsafe impl NSObjectProtocol for NSQuitCommand {}
651);
652
653#[cfg(feature = "NSScriptCommand")]
654impl NSQuitCommand {
655    extern_methods!(
656        #[unsafe(method(saveOptions))]
657        #[unsafe(method_family = none)]
658        pub fn saveOptions(&self) -> NSSaveOptions;
659    );
660}
661
662/// Methods declared on superclass `NSScriptCommand`.
663#[cfg(feature = "NSScriptCommand")]
664impl NSQuitCommand {
665    extern_methods!(
666        #[cfg(feature = "NSScriptCommandDescription")]
667        #[unsafe(method(initWithCommandDescription:))]
668        #[unsafe(method_family = init)]
669        pub fn initWithCommandDescription(
670            this: Allocated<Self>,
671            command_def: &NSScriptCommandDescription,
672        ) -> Retained<Self>;
673
674        #[cfg(feature = "NSCoder")]
675        /// # Safety
676        ///
677        /// `in_coder` possibly has further requirements.
678        #[unsafe(method(initWithCoder:))]
679        #[unsafe(method_family = init)]
680        pub unsafe fn initWithCoder(
681            this: Allocated<Self>,
682            in_coder: &NSCoder,
683        ) -> Option<Retained<Self>>;
684    );
685}
686
687/// Methods declared on superclass `NSObject`.
688#[cfg(feature = "NSScriptCommand")]
689impl NSQuitCommand {
690    extern_methods!(
691        #[unsafe(method(init))]
692        #[unsafe(method_family = init)]
693        pub fn init(this: Allocated<Self>) -> Retained<Self>;
694
695        #[unsafe(method(new))]
696        #[unsafe(method_family = new)]
697        pub fn new() -> Retained<Self>;
698    );
699}
700
701#[cfg(feature = "NSScriptCommand")]
702impl DefaultRetained for NSQuitCommand {
703    #[inline]
704    fn default_retained() -> Retained<Self> {
705        Self::new()
706    }
707}
708
709extern_class!(
710    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nssetcommand?language=objc)
711    #[unsafe(super(NSScriptCommand, NSObject))]
712    #[derive(Debug, PartialEq, Eq, Hash)]
713    #[cfg(feature = "NSScriptCommand")]
714    pub struct NSSetCommand;
715);
716
717#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
718extern_conformance!(
719    unsafe impl NSCoding for NSSetCommand {}
720);
721
722#[cfg(feature = "NSScriptCommand")]
723extern_conformance!(
724    unsafe impl NSObjectProtocol for NSSetCommand {}
725);
726
727#[cfg(feature = "NSScriptCommand")]
728impl NSSetCommand {
729    extern_methods!(
730        #[cfg(feature = "NSScriptObjectSpecifiers")]
731        #[unsafe(method(setReceiversSpecifier:))]
732        #[unsafe(method_family = none)]
733        pub fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
734
735        #[cfg(feature = "NSScriptObjectSpecifiers")]
736        #[unsafe(method(keySpecifier))]
737        #[unsafe(method_family = none)]
738        pub fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
739    );
740}
741
742/// Methods declared on superclass `NSScriptCommand`.
743#[cfg(feature = "NSScriptCommand")]
744impl NSSetCommand {
745    extern_methods!(
746        #[cfg(feature = "NSScriptCommandDescription")]
747        #[unsafe(method(initWithCommandDescription:))]
748        #[unsafe(method_family = init)]
749        pub fn initWithCommandDescription(
750            this: Allocated<Self>,
751            command_def: &NSScriptCommandDescription,
752        ) -> Retained<Self>;
753
754        #[cfg(feature = "NSCoder")]
755        /// # Safety
756        ///
757        /// `in_coder` possibly has further requirements.
758        #[unsafe(method(initWithCoder:))]
759        #[unsafe(method_family = init)]
760        pub unsafe fn initWithCoder(
761            this: Allocated<Self>,
762            in_coder: &NSCoder,
763        ) -> Option<Retained<Self>>;
764    );
765}
766
767/// Methods declared on superclass `NSObject`.
768#[cfg(feature = "NSScriptCommand")]
769impl NSSetCommand {
770    extern_methods!(
771        #[unsafe(method(init))]
772        #[unsafe(method_family = init)]
773        pub fn init(this: Allocated<Self>) -> Retained<Self>;
774
775        #[unsafe(method(new))]
776        #[unsafe(method_family = new)]
777        pub fn new() -> Retained<Self>;
778    );
779}
780
781#[cfg(feature = "NSScriptCommand")]
782impl DefaultRetained for NSSetCommand {
783    #[inline]
784    fn default_retained() -> Retained<Self> {
785        Self::new()
786    }
787}