objc2_ui_kit/generated/
UIVideoEditorController.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/uivideoeditorcontroller?language=objc)
12    #[unsafe(super(UINavigationController, UIViewController, UIResponder, NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(all(
16        feature = "UINavigationController",
17        feature = "UIResponder",
18        feature = "UIViewController"
19    ))]
20    pub struct UIVideoEditorController;
21);
22
23#[cfg(all(
24    feature = "UINavigationController",
25    feature = "UIResponder",
26    feature = "UIViewController"
27))]
28unsafe impl NSCoding for UIVideoEditorController {}
29
30#[cfg(all(
31    feature = "UINavigationController",
32    feature = "UIResponder",
33    feature = "UIViewController"
34))]
35unsafe impl NSObjectProtocol for UIVideoEditorController {}
36
37#[cfg(all(
38    feature = "UIAppearance",
39    feature = "UINavigationController",
40    feature = "UIResponder",
41    feature = "UIViewController"
42))]
43unsafe impl UIAppearanceContainer for UIVideoEditorController {}
44
45#[cfg(all(
46    feature = "UINavigationController",
47    feature = "UIResponder",
48    feature = "UIViewController"
49))]
50unsafe impl UIContentContainer for UIVideoEditorController {}
51
52#[cfg(all(
53    feature = "UIFocus",
54    feature = "UINavigationController",
55    feature = "UIResponder",
56    feature = "UIViewController"
57))]
58unsafe impl UIFocusEnvironment for UIVideoEditorController {}
59
60#[cfg(all(
61    feature = "UINavigationController",
62    feature = "UIResponder",
63    feature = "UIViewController"
64))]
65unsafe impl UIResponderStandardEditActions for UIVideoEditorController {}
66
67#[cfg(all(
68    feature = "UINavigationController",
69    feature = "UIResponder",
70    feature = "UITraitCollection",
71    feature = "UIViewController"
72))]
73unsafe impl UITraitEnvironment for UIVideoEditorController {}
74
75#[cfg(all(
76    feature = "UINavigationController",
77    feature = "UIResponder",
78    feature = "UIViewController"
79))]
80impl UIVideoEditorController {
81    extern_methods!(
82        #[unsafe(method(canEditVideoAtPath:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn canEditVideoAtPath(video_path: &NSString, mtm: MainThreadMarker) -> bool;
85
86        #[unsafe(method(delegate))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn delegate(
89            &self,
90        ) -> Option<
91            Retained<
92                AnyObject, /* UINavigationControllerDelegate+ UIVideoEditorControllerDelegate */
93            >,
94        >;
95
96        /// Setter for [`delegate`][Self::delegate].
97        #[unsafe(method(setDelegate:))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn setDelegate(
100            &self,
101            delegate: Option<
102                &AnyObject, /* UINavigationControllerDelegate+ UIVideoEditorControllerDelegate */
103            >,
104        );
105
106        #[unsafe(method(videoPath))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn videoPath(&self) -> Retained<NSString>;
109
110        /// Setter for [`videoPath`][Self::videoPath].
111        #[unsafe(method(setVideoPath:))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn setVideoPath(&self, video_path: &NSString);
114
115        #[unsafe(method(videoMaximumDuration))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn videoMaximumDuration(&self) -> NSTimeInterval;
118
119        /// Setter for [`videoMaximumDuration`][Self::videoMaximumDuration].
120        #[unsafe(method(setVideoMaximumDuration:))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn setVideoMaximumDuration(&self, video_maximum_duration: NSTimeInterval);
123
124        #[cfg(feature = "UIImagePickerController")]
125        #[unsafe(method(videoQuality))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn videoQuality(&self) -> UIImagePickerControllerQualityType;
128
129        #[cfg(feature = "UIImagePickerController")]
130        /// Setter for [`videoQuality`][Self::videoQuality].
131        #[unsafe(method(setVideoQuality:))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn setVideoQuality(&self, video_quality: UIImagePickerControllerQualityType);
134    );
135}
136
137/// Methods declared on superclass `UINavigationController`.
138#[cfg(all(
139    feature = "UINavigationController",
140    feature = "UIResponder",
141    feature = "UIViewController"
142))]
143impl UIVideoEditorController {
144    extern_methods!(
145        #[unsafe(method(initWithNavigationBarClass:toolbarClass:))]
146        #[unsafe(method_family = init)]
147        pub unsafe fn initWithNavigationBarClass_toolbarClass(
148            this: Allocated<Self>,
149            navigation_bar_class: Option<&AnyClass>,
150            toolbar_class: Option<&AnyClass>,
151        ) -> Retained<Self>;
152
153        #[unsafe(method(initWithRootViewController:))]
154        #[unsafe(method_family = init)]
155        pub unsafe fn initWithRootViewController(
156            this: Allocated<Self>,
157            root_view_controller: &UIViewController,
158        ) -> Retained<Self>;
159
160        #[unsafe(method(initWithNibName:bundle:))]
161        #[unsafe(method_family = init)]
162        pub unsafe fn initWithNibName_bundle(
163            this: Allocated<Self>,
164            nib_name_or_nil: Option<&NSString>,
165            nib_bundle_or_nil: Option<&NSBundle>,
166        ) -> Retained<Self>;
167
168        #[unsafe(method(initWithCoder:))]
169        #[unsafe(method_family = init)]
170        pub unsafe fn initWithCoder(
171            this: Allocated<Self>,
172            a_decoder: &NSCoder,
173        ) -> Option<Retained<Self>>;
174    );
175}
176
177/// Methods declared on superclass `NSObject`.
178#[cfg(all(
179    feature = "UINavigationController",
180    feature = "UIResponder",
181    feature = "UIViewController"
182))]
183impl UIVideoEditorController {
184    extern_methods!(
185        #[unsafe(method(init))]
186        #[unsafe(method_family = init)]
187        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
188
189        #[unsafe(method(new))]
190        #[unsafe(method_family = new)]
191        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
192    );
193}
194
195extern_protocol!(
196    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uivideoeditorcontrollerdelegate?language=objc)
197    pub unsafe trait UIVideoEditorControllerDelegate:
198        NSObjectProtocol + MainThreadOnly
199    {
200        #[cfg(all(
201            feature = "UINavigationController",
202            feature = "UIResponder",
203            feature = "UIViewController"
204        ))]
205        #[optional]
206        #[unsafe(method(videoEditorController:didSaveEditedVideoToPath:))]
207        #[unsafe(method_family = none)]
208        unsafe fn videoEditorController_didSaveEditedVideoToPath(
209            &self,
210            editor: &UIVideoEditorController,
211            edited_video_path: &NSString,
212        );
213
214        #[cfg(all(
215            feature = "UINavigationController",
216            feature = "UIResponder",
217            feature = "UIViewController"
218        ))]
219        #[optional]
220        #[unsafe(method(videoEditorController:didFailWithError:))]
221        #[unsafe(method_family = none)]
222        unsafe fn videoEditorController_didFailWithError(
223            &self,
224            editor: &UIVideoEditorController,
225            error: &NSError,
226        );
227
228        #[cfg(all(
229            feature = "UINavigationController",
230            feature = "UIResponder",
231            feature = "UIViewController"
232        ))]
233        #[optional]
234        #[unsafe(method(videoEditorControllerDidCancel:))]
235        #[unsafe(method_family = none)]
236        unsafe fn videoEditorControllerDidCancel(&self, editor: &UIVideoEditorController);
237    }
238);