objc2_app_kit/generated/
NSStoryboardSegue.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsstoryboardsegueidentifier?language=objc)
11pub type NSStoryboardSegueIdentifier = NSString;
12
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsstoryboardsegue?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct NSStoryboardSegue;
18);
19
20unsafe impl NSObjectProtocol for NSStoryboardSegue {}
21
22impl NSStoryboardSegue {
23    extern_methods!(
24        #[cfg(feature = "block2")]
25        #[unsafe(method(segueWithIdentifier:source:destination:performHandler:))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn segueWithIdentifier_source_destination_performHandler(
28            identifier: &NSStoryboardSegueIdentifier,
29            source_controller: &AnyObject,
30            destination_controller: &AnyObject,
31            perform_handler: &block2::Block<dyn Fn()>,
32        ) -> Retained<Self>;
33
34        #[unsafe(method(initWithIdentifier:source:destination:))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn initWithIdentifier_source_destination(
37            this: Allocated<Self>,
38            identifier: &NSStoryboardSegueIdentifier,
39            source_controller: &AnyObject,
40            destination_controller: &AnyObject,
41        ) -> Retained<Self>;
42
43        #[unsafe(method(identifier))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn identifier(&self) -> Option<Retained<NSStoryboardSegueIdentifier>>;
46
47        #[unsafe(method(sourceController))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn sourceController(&self) -> Retained<AnyObject>;
50
51        #[unsafe(method(destinationController))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn destinationController(&self) -> Retained<AnyObject>;
54
55        #[unsafe(method(perform))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn perform(&self);
58    );
59}
60
61/// Methods declared on superclass `NSObject`.
62impl NSStoryboardSegue {
63    extern_methods!(
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68        #[unsafe(method(new))]
69        #[unsafe(method_family = new)]
70        pub unsafe fn new() -> Retained<Self>;
71    );
72}
73
74extern_protocol!(
75    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssegueperforming?language=objc)
76    pub unsafe trait NSSeguePerforming: NSObjectProtocol + MainThreadOnly {
77        #[optional]
78        #[unsafe(method(prepareForSegue:sender:))]
79        #[unsafe(method_family = none)]
80        unsafe fn prepareForSegue_sender(
81            &self,
82            segue: &NSStoryboardSegue,
83            sender: Option<&AnyObject>,
84        );
85
86        #[optional]
87        #[unsafe(method(performSegueWithIdentifier:sender:))]
88        #[unsafe(method_family = none)]
89        unsafe fn performSegueWithIdentifier_sender(
90            &self,
91            identifier: &NSStoryboardSegueIdentifier,
92            sender: Option<&AnyObject>,
93        );
94
95        #[optional]
96        #[unsafe(method(shouldPerformSegueWithIdentifier:sender:))]
97        #[unsafe(method_family = none)]
98        unsafe fn shouldPerformSegueWithIdentifier_sender(
99            &self,
100            identifier: &NSStoryboardSegueIdentifier,
101            sender: Option<&AnyObject>,
102        ) -> bool;
103    }
104);