objc2_ui_kit/generated/
UIStoryboardSegue.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
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uistoryboardsegue?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
16    pub struct UIStoryboardSegue;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for UIStoryboardSegue {}
21);
22
23impl UIStoryboardSegue {
24    extern_methods!(
25        #[cfg(all(
26            feature = "UIResponder",
27            feature = "UIViewController",
28            feature = "block2"
29        ))]
30        #[unsafe(method(segueWithIdentifier:source:destination:performHandler:))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn segueWithIdentifier_source_destination_performHandler(
33            identifier: Option<&NSString>,
34            source: &UIViewController,
35            destination: &UIViewController,
36            perform_handler: &block2::DynBlock<dyn Fn()>,
37        ) -> Retained<Self>;
38
39        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
40        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
41        #[unsafe(method(initWithIdentifier:source:destination:))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn initWithIdentifier_source_destination(
44            this: Allocated<Self>,
45            identifier: Option<&NSString>,
46            source: &UIViewController,
47            destination: &UIViewController,
48        ) -> Retained<Self>;
49
50        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
56        #[unsafe(method(identifier))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
59
60        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
61        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
62        #[unsafe(method(sourceViewController))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn sourceViewController(&self) -> Retained<UIViewController>;
65
66        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
67        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
68        #[unsafe(method(destinationViewController))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn destinationViewController(&self) -> Retained<UIViewController>;
71
72        /// Subclasses can override this method to augment or replace the effect of this segue. For example, to animate alongside the effect of a Modal Presentation segue, an override of this method can call super, then send -animateAlongsideTransition:completion: to the transitionCoordinator of the destinationViewController.
73        /// The segue runtime will call +[UIView setAnimationsAreEnabled:] prior to invoking this method, based on the value of the Animates checkbox in the Properties Inspector for the segue.
74        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
75        #[unsafe(method(perform))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn perform(&self);
78    );
79}
80
81/// Methods declared on superclass `NSObject`.
82impl UIStoryboardSegue {
83    extern_methods!(
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
87    );
88}
89
90extern_class!(
91    /// Encapsulates the source of a prospective unwind segue.
92    /// You do not create instances of this class directly. Instead, UIKit creates an instance of this class and sends -allowedChildViewControllersForUnwindingFromSource: to each ancestor of the sourceViewController until it finds a view controller which returns YES from -canPerformUnwindSegueAction:fromViewController:sender:.
93    ///
94    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uistoryboardunwindseguesource?language=objc)
95    #[unsafe(super(NSObject))]
96    #[thread_kind = MainThreadOnly]
97    #[derive(Debug, PartialEq, Eq, Hash)]
98    pub struct UIStoryboardUnwindSegueSource;
99);
100
101extern_conformance!(
102    unsafe impl NSObjectProtocol for UIStoryboardUnwindSegueSource {}
103);
104
105impl UIStoryboardUnwindSegueSource {
106    extern_methods!(
107        #[unsafe(method(init))]
108        #[unsafe(method_family = init)]
109        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
110
111        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
112        #[unsafe(method(sourceViewController))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn sourceViewController(&self) -> Retained<UIViewController>;
115
116        #[unsafe(method(unwindAction))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn unwindAction(&self) -> Sel;
119
120        #[unsafe(method(sender))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn sender(&self) -> Option<Retained<AnyObject>>;
123    );
124}
125
126/// Methods declared on superclass `NSObject`.
127impl UIStoryboardUnwindSegueSource {
128    extern_methods!(
129        #[unsafe(method(new))]
130        #[unsafe(method_family = new)]
131        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
132    );
133}