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"))]
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 unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
56
57 #[cfg(feature = "NSScriptObjectSpecifiers")]
58 #[unsafe(method(keySpecifier))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
61 );
62}
63
64#[cfg(feature = "NSScriptCommand")]
66impl NSCloneCommand {
67 extern_methods!(
68 #[cfg(feature = "NSScriptCommandDescription")]
69 #[unsafe(method(initWithCommandDescription:))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn initWithCommandDescription(
72 this: Allocated<Self>,
73 command_def: &NSScriptCommandDescription,
74 ) -> Retained<Self>;
75
76 #[cfg(feature = "NSCoder")]
77 #[unsafe(method(initWithCoder:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithCoder(
80 this: Allocated<Self>,
81 in_coder: &NSCoder,
82 ) -> Option<Retained<Self>>;
83 );
84}
85
86#[cfg(feature = "NSScriptCommand")]
88impl NSCloneCommand {
89 extern_methods!(
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(new))]
95 #[unsafe(method_family = new)]
96 pub unsafe fn new() -> Retained<Self>;
97 );
98}
99
100extern_class!(
101 #[unsafe(super(NSScriptCommand, NSObject))]
103 #[derive(Debug, PartialEq, Eq, Hash)]
104 #[cfg(feature = "NSScriptCommand")]
105 pub struct NSCloseCommand;
106);
107
108#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
109extern_conformance!(
110 unsafe impl NSCoding for NSCloseCommand {}
111);
112
113#[cfg(feature = "NSScriptCommand")]
114extern_conformance!(
115 unsafe impl NSObjectProtocol for NSCloseCommand {}
116);
117
118#[cfg(feature = "NSScriptCommand")]
119impl NSCloseCommand {
120 extern_methods!(
121 #[unsafe(method(saveOptions))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn saveOptions(&self) -> NSSaveOptions;
124 );
125}
126
127#[cfg(feature = "NSScriptCommand")]
129impl NSCloseCommand {
130 extern_methods!(
131 #[cfg(feature = "NSScriptCommandDescription")]
132 #[unsafe(method(initWithCommandDescription:))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn initWithCommandDescription(
135 this: Allocated<Self>,
136 command_def: &NSScriptCommandDescription,
137 ) -> Retained<Self>;
138
139 #[cfg(feature = "NSCoder")]
140 #[unsafe(method(initWithCoder:))]
141 #[unsafe(method_family = init)]
142 pub unsafe fn initWithCoder(
143 this: Allocated<Self>,
144 in_coder: &NSCoder,
145 ) -> Option<Retained<Self>>;
146 );
147}
148
149#[cfg(feature = "NSScriptCommand")]
151impl NSCloseCommand {
152 extern_methods!(
153 #[unsafe(method(init))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
156
157 #[unsafe(method(new))]
158 #[unsafe(method_family = new)]
159 pub unsafe fn new() -> Retained<Self>;
160 );
161}
162
163extern_class!(
164 #[unsafe(super(NSScriptCommand, NSObject))]
166 #[derive(Debug, PartialEq, Eq, Hash)]
167 #[cfg(feature = "NSScriptCommand")]
168 pub struct NSCountCommand;
169);
170
171#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
172extern_conformance!(
173 unsafe impl NSCoding for NSCountCommand {}
174);
175
176#[cfg(feature = "NSScriptCommand")]
177extern_conformance!(
178 unsafe impl NSObjectProtocol for NSCountCommand {}
179);
180
181#[cfg(feature = "NSScriptCommand")]
182impl NSCountCommand {
183 extern_methods!();
184}
185
186#[cfg(feature = "NSScriptCommand")]
188impl NSCountCommand {
189 extern_methods!(
190 #[cfg(feature = "NSScriptCommandDescription")]
191 #[unsafe(method(initWithCommandDescription:))]
192 #[unsafe(method_family = init)]
193 pub unsafe fn initWithCommandDescription(
194 this: Allocated<Self>,
195 command_def: &NSScriptCommandDescription,
196 ) -> Retained<Self>;
197
198 #[cfg(feature = "NSCoder")]
199 #[unsafe(method(initWithCoder:))]
200 #[unsafe(method_family = init)]
201 pub unsafe fn initWithCoder(
202 this: Allocated<Self>,
203 in_coder: &NSCoder,
204 ) -> Option<Retained<Self>>;
205 );
206}
207
208#[cfg(feature = "NSScriptCommand")]
210impl NSCountCommand {
211 extern_methods!(
212 #[unsafe(method(init))]
213 #[unsafe(method_family = init)]
214 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
215
216 #[unsafe(method(new))]
217 #[unsafe(method_family = new)]
218 pub unsafe fn new() -> Retained<Self>;
219 );
220}
221
222extern_class!(
223 #[unsafe(super(NSScriptCommand, NSObject))]
225 #[derive(Debug, PartialEq, Eq, Hash)]
226 #[cfg(feature = "NSScriptCommand")]
227 pub struct NSCreateCommand;
228);
229
230#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
231extern_conformance!(
232 unsafe impl NSCoding for NSCreateCommand {}
233);
234
235#[cfg(feature = "NSScriptCommand")]
236extern_conformance!(
237 unsafe impl NSObjectProtocol for NSCreateCommand {}
238);
239
240#[cfg(feature = "NSScriptCommand")]
241impl NSCreateCommand {
242 extern_methods!(
243 #[cfg(all(feature = "NSClassDescription", feature = "NSScriptClassDescription"))]
244 #[unsafe(method(createClassDescription))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn createClassDescription(&self) -> Retained<NSScriptClassDescription>;
247
248 #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
249 #[unsafe(method(resolvedKeyDictionary))]
250 #[unsafe(method_family = none)]
251 pub unsafe fn resolvedKeyDictionary(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
252 );
253}
254
255#[cfg(feature = "NSScriptCommand")]
257impl NSCreateCommand {
258 extern_methods!(
259 #[cfg(feature = "NSScriptCommandDescription")]
260 #[unsafe(method(initWithCommandDescription:))]
261 #[unsafe(method_family = init)]
262 pub unsafe fn initWithCommandDescription(
263 this: Allocated<Self>,
264 command_def: &NSScriptCommandDescription,
265 ) -> Retained<Self>;
266
267 #[cfg(feature = "NSCoder")]
268 #[unsafe(method(initWithCoder:))]
269 #[unsafe(method_family = init)]
270 pub unsafe fn initWithCoder(
271 this: Allocated<Self>,
272 in_coder: &NSCoder,
273 ) -> Option<Retained<Self>>;
274 );
275}
276
277#[cfg(feature = "NSScriptCommand")]
279impl NSCreateCommand {
280 extern_methods!(
281 #[unsafe(method(init))]
282 #[unsafe(method_family = init)]
283 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
284
285 #[unsafe(method(new))]
286 #[unsafe(method_family = new)]
287 pub unsafe fn new() -> Retained<Self>;
288 );
289}
290
291extern_class!(
292 #[unsafe(super(NSScriptCommand, NSObject))]
294 #[derive(Debug, PartialEq, Eq, Hash)]
295 #[cfg(feature = "NSScriptCommand")]
296 pub struct NSDeleteCommand;
297);
298
299#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
300extern_conformance!(
301 unsafe impl NSCoding for NSDeleteCommand {}
302);
303
304#[cfg(feature = "NSScriptCommand")]
305extern_conformance!(
306 unsafe impl NSObjectProtocol for NSDeleteCommand {}
307);
308
309#[cfg(feature = "NSScriptCommand")]
310impl NSDeleteCommand {
311 extern_methods!(
312 #[cfg(feature = "NSScriptObjectSpecifiers")]
313 #[unsafe(method(setReceiversSpecifier:))]
314 #[unsafe(method_family = none)]
315 pub unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
316
317 #[cfg(feature = "NSScriptObjectSpecifiers")]
318 #[unsafe(method(keySpecifier))]
319 #[unsafe(method_family = none)]
320 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
321 );
322}
323
324#[cfg(feature = "NSScriptCommand")]
326impl NSDeleteCommand {
327 extern_methods!(
328 #[cfg(feature = "NSScriptCommandDescription")]
329 #[unsafe(method(initWithCommandDescription:))]
330 #[unsafe(method_family = init)]
331 pub unsafe fn initWithCommandDescription(
332 this: Allocated<Self>,
333 command_def: &NSScriptCommandDescription,
334 ) -> Retained<Self>;
335
336 #[cfg(feature = "NSCoder")]
337 #[unsafe(method(initWithCoder:))]
338 #[unsafe(method_family = init)]
339 pub unsafe fn initWithCoder(
340 this: Allocated<Self>,
341 in_coder: &NSCoder,
342 ) -> Option<Retained<Self>>;
343 );
344}
345
346#[cfg(feature = "NSScriptCommand")]
348impl NSDeleteCommand {
349 extern_methods!(
350 #[unsafe(method(init))]
351 #[unsafe(method_family = init)]
352 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
353
354 #[unsafe(method(new))]
355 #[unsafe(method_family = new)]
356 pub unsafe fn new() -> Retained<Self>;
357 );
358}
359
360extern_class!(
361 #[unsafe(super(NSScriptCommand, NSObject))]
363 #[derive(Debug, PartialEq, Eq, Hash)]
364 #[cfg(feature = "NSScriptCommand")]
365 pub struct NSExistsCommand;
366);
367
368#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
369extern_conformance!(
370 unsafe impl NSCoding for NSExistsCommand {}
371);
372
373#[cfg(feature = "NSScriptCommand")]
374extern_conformance!(
375 unsafe impl NSObjectProtocol for NSExistsCommand {}
376);
377
378#[cfg(feature = "NSScriptCommand")]
379impl NSExistsCommand {
380 extern_methods!();
381}
382
383#[cfg(feature = "NSScriptCommand")]
385impl NSExistsCommand {
386 extern_methods!(
387 #[cfg(feature = "NSScriptCommandDescription")]
388 #[unsafe(method(initWithCommandDescription:))]
389 #[unsafe(method_family = init)]
390 pub unsafe fn initWithCommandDescription(
391 this: Allocated<Self>,
392 command_def: &NSScriptCommandDescription,
393 ) -> Retained<Self>;
394
395 #[cfg(feature = "NSCoder")]
396 #[unsafe(method(initWithCoder:))]
397 #[unsafe(method_family = init)]
398 pub unsafe fn initWithCoder(
399 this: Allocated<Self>,
400 in_coder: &NSCoder,
401 ) -> Option<Retained<Self>>;
402 );
403}
404
405#[cfg(feature = "NSScriptCommand")]
407impl NSExistsCommand {
408 extern_methods!(
409 #[unsafe(method(init))]
410 #[unsafe(method_family = init)]
411 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
412
413 #[unsafe(method(new))]
414 #[unsafe(method_family = new)]
415 pub unsafe fn new() -> Retained<Self>;
416 );
417}
418
419extern_class!(
420 #[unsafe(super(NSScriptCommand, NSObject))]
422 #[derive(Debug, PartialEq, Eq, Hash)]
423 #[cfg(feature = "NSScriptCommand")]
424 pub struct NSGetCommand;
425);
426
427#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
428extern_conformance!(
429 unsafe impl NSCoding for NSGetCommand {}
430);
431
432#[cfg(feature = "NSScriptCommand")]
433extern_conformance!(
434 unsafe impl NSObjectProtocol for NSGetCommand {}
435);
436
437#[cfg(feature = "NSScriptCommand")]
438impl NSGetCommand {
439 extern_methods!();
440}
441
442#[cfg(feature = "NSScriptCommand")]
444impl NSGetCommand {
445 extern_methods!(
446 #[cfg(feature = "NSScriptCommandDescription")]
447 #[unsafe(method(initWithCommandDescription:))]
448 #[unsafe(method_family = init)]
449 pub unsafe fn initWithCommandDescription(
450 this: Allocated<Self>,
451 command_def: &NSScriptCommandDescription,
452 ) -> Retained<Self>;
453
454 #[cfg(feature = "NSCoder")]
455 #[unsafe(method(initWithCoder:))]
456 #[unsafe(method_family = init)]
457 pub unsafe fn initWithCoder(
458 this: Allocated<Self>,
459 in_coder: &NSCoder,
460 ) -> Option<Retained<Self>>;
461 );
462}
463
464#[cfg(feature = "NSScriptCommand")]
466impl NSGetCommand {
467 extern_methods!(
468 #[unsafe(method(init))]
469 #[unsafe(method_family = init)]
470 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
471
472 #[unsafe(method(new))]
473 #[unsafe(method_family = new)]
474 pub unsafe fn new() -> Retained<Self>;
475 );
476}
477
478extern_class!(
479 #[unsafe(super(NSScriptCommand, NSObject))]
481 #[derive(Debug, PartialEq, Eq, Hash)]
482 #[cfg(feature = "NSScriptCommand")]
483 pub struct NSMoveCommand;
484);
485
486#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
487extern_conformance!(
488 unsafe impl NSCoding for NSMoveCommand {}
489);
490
491#[cfg(feature = "NSScriptCommand")]
492extern_conformance!(
493 unsafe impl NSObjectProtocol for NSMoveCommand {}
494);
495
496#[cfg(feature = "NSScriptCommand")]
497impl NSMoveCommand {
498 extern_methods!(
499 #[cfg(feature = "NSScriptObjectSpecifiers")]
500 #[unsafe(method(setReceiversSpecifier:))]
501 #[unsafe(method_family = none)]
502 pub unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
503
504 #[cfg(feature = "NSScriptObjectSpecifiers")]
505 #[unsafe(method(keySpecifier))]
506 #[unsafe(method_family = none)]
507 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
508 );
509}
510
511#[cfg(feature = "NSScriptCommand")]
513impl NSMoveCommand {
514 extern_methods!(
515 #[cfg(feature = "NSScriptCommandDescription")]
516 #[unsafe(method(initWithCommandDescription:))]
517 #[unsafe(method_family = init)]
518 pub unsafe fn initWithCommandDescription(
519 this: Allocated<Self>,
520 command_def: &NSScriptCommandDescription,
521 ) -> Retained<Self>;
522
523 #[cfg(feature = "NSCoder")]
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#[cfg(feature = "NSScriptCommand")]
535impl NSMoveCommand {
536 extern_methods!(
537 #[unsafe(method(init))]
538 #[unsafe(method_family = init)]
539 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
540
541 #[unsafe(method(new))]
542 #[unsafe(method_family = new)]
543 pub unsafe fn new() -> Retained<Self>;
544 );
545}
546
547extern_class!(
548 #[unsafe(super(NSScriptCommand, NSObject))]
550 #[derive(Debug, PartialEq, Eq, Hash)]
551 #[cfg(feature = "NSScriptCommand")]
552 pub struct NSQuitCommand;
553);
554
555#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
556extern_conformance!(
557 unsafe impl NSCoding for NSQuitCommand {}
558);
559
560#[cfg(feature = "NSScriptCommand")]
561extern_conformance!(
562 unsafe impl NSObjectProtocol for NSQuitCommand {}
563);
564
565#[cfg(feature = "NSScriptCommand")]
566impl NSQuitCommand {
567 extern_methods!(
568 #[unsafe(method(saveOptions))]
569 #[unsafe(method_family = none)]
570 pub unsafe fn saveOptions(&self) -> NSSaveOptions;
571 );
572}
573
574#[cfg(feature = "NSScriptCommand")]
576impl NSQuitCommand {
577 extern_methods!(
578 #[cfg(feature = "NSScriptCommandDescription")]
579 #[unsafe(method(initWithCommandDescription:))]
580 #[unsafe(method_family = init)]
581 pub unsafe fn initWithCommandDescription(
582 this: Allocated<Self>,
583 command_def: &NSScriptCommandDescription,
584 ) -> Retained<Self>;
585
586 #[cfg(feature = "NSCoder")]
587 #[unsafe(method(initWithCoder:))]
588 #[unsafe(method_family = init)]
589 pub unsafe fn initWithCoder(
590 this: Allocated<Self>,
591 in_coder: &NSCoder,
592 ) -> Option<Retained<Self>>;
593 );
594}
595
596#[cfg(feature = "NSScriptCommand")]
598impl NSQuitCommand {
599 extern_methods!(
600 #[unsafe(method(init))]
601 #[unsafe(method_family = init)]
602 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
603
604 #[unsafe(method(new))]
605 #[unsafe(method_family = new)]
606 pub unsafe fn new() -> Retained<Self>;
607 );
608}
609
610extern_class!(
611 #[unsafe(super(NSScriptCommand, NSObject))]
613 #[derive(Debug, PartialEq, Eq, Hash)]
614 #[cfg(feature = "NSScriptCommand")]
615 pub struct NSSetCommand;
616);
617
618#[cfg(all(feature = "NSObject", feature = "NSScriptCommand"))]
619extern_conformance!(
620 unsafe impl NSCoding for NSSetCommand {}
621);
622
623#[cfg(feature = "NSScriptCommand")]
624extern_conformance!(
625 unsafe impl NSObjectProtocol for NSSetCommand {}
626);
627
628#[cfg(feature = "NSScriptCommand")]
629impl NSSetCommand {
630 extern_methods!(
631 #[cfg(feature = "NSScriptObjectSpecifiers")]
632 #[unsafe(method(setReceiversSpecifier:))]
633 #[unsafe(method_family = none)]
634 pub unsafe fn setReceiversSpecifier(&self, receivers_ref: Option<&NSScriptObjectSpecifier>);
635
636 #[cfg(feature = "NSScriptObjectSpecifiers")]
637 #[unsafe(method(keySpecifier))]
638 #[unsafe(method_family = none)]
639 pub unsafe fn keySpecifier(&self) -> Retained<NSScriptObjectSpecifier>;
640 );
641}
642
643#[cfg(feature = "NSScriptCommand")]
645impl NSSetCommand {
646 extern_methods!(
647 #[cfg(feature = "NSScriptCommandDescription")]
648 #[unsafe(method(initWithCommandDescription:))]
649 #[unsafe(method_family = init)]
650 pub unsafe fn initWithCommandDescription(
651 this: Allocated<Self>,
652 command_def: &NSScriptCommandDescription,
653 ) -> Retained<Self>;
654
655 #[cfg(feature = "NSCoder")]
656 #[unsafe(method(initWithCoder:))]
657 #[unsafe(method_family = init)]
658 pub unsafe fn initWithCoder(
659 this: Allocated<Self>,
660 in_coder: &NSCoder,
661 ) -> Option<Retained<Self>>;
662 );
663}
664
665#[cfg(feature = "NSScriptCommand")]
667impl NSSetCommand {
668 extern_methods!(
669 #[unsafe(method(init))]
670 #[unsafe(method_family = init)]
671 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
672
673 #[unsafe(method(new))]
674 #[unsafe(method_family = new)]
675 pub unsafe fn new() -> Retained<Self>;
676 );
677}