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))]
28extern_conformance!(
29    unsafe impl NSCoding for UIVideoEditorController {}
30);
31
32#[cfg(all(
33    feature = "UINavigationController",
34    feature = "UIResponder",
35    feature = "UIViewController"
36))]
37extern_conformance!(
38    unsafe impl NSObjectProtocol for UIVideoEditorController {}
39);
40
41#[cfg(all(
42    feature = "UIAppearance",
43    feature = "UINavigationController",
44    feature = "UIResponder",
45    feature = "UIViewController"
46))]
47extern_conformance!(
48    unsafe impl UIAppearanceContainer for UIVideoEditorController {}
49);
50
51#[cfg(all(
52    feature = "UINavigationController",
53    feature = "UIResponder",
54    feature = "UIViewController"
55))]
56extern_conformance!(
57    unsafe impl UIContentContainer for UIVideoEditorController {}
58);
59
60#[cfg(all(
61    feature = "UIFocus",
62    feature = "UINavigationController",
63    feature = "UIResponder",
64    feature = "UIViewController"
65))]
66extern_conformance!(
67    unsafe impl UIFocusEnvironment for UIVideoEditorController {}
68);
69
70#[cfg(all(
71    feature = "UINavigationController",
72    feature = "UIResponder",
73    feature = "UIViewController"
74))]
75extern_conformance!(
76    unsafe impl UIResponderStandardEditActions for UIVideoEditorController {}
77);
78
79#[cfg(all(
80    feature = "UINavigationController",
81    feature = "UIResponder",
82    feature = "UITraitCollection",
83    feature = "UIViewController"
84))]
85extern_conformance!(
86    unsafe impl UITraitEnvironment for UIVideoEditorController {}
87);
88
89#[cfg(all(
90    feature = "UINavigationController",
91    feature = "UIResponder",
92    feature = "UIViewController"
93))]
94impl UIVideoEditorController {
95    extern_methods!(
96        #[unsafe(method(canEditVideoAtPath:))]
97        #[unsafe(method_family = none)]
98        pub fn canEditVideoAtPath(video_path: &NSString, mtm: MainThreadMarker) -> bool;
99
100        /// # Safety
101        ///
102        /// This is not retained internally, you must ensure the object is still alive.
103        #[unsafe(method(delegate))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn delegate(
106            &self,
107        ) -> Option<
108            Retained<
109                AnyObject, /* UINavigationControllerDelegate+ UIVideoEditorControllerDelegate */
110            >,
111        >;
112
113        /// Setter for [`delegate`][Self::delegate].
114        ///
115        /// # Safety
116        ///
117        /// - `delegate` should be of the correct type.
118        /// - This is unretained, you must ensure the object is kept alive while in use.
119        #[unsafe(method(setDelegate:))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn setDelegate(
122            &self,
123            delegate: Option<
124                &AnyObject, /* UINavigationControllerDelegate+ UIVideoEditorControllerDelegate */
125            >,
126        );
127
128        #[unsafe(method(videoPath))]
129        #[unsafe(method_family = none)]
130        pub fn videoPath(&self) -> Retained<NSString>;
131
132        /// Setter for [`videoPath`][Self::videoPath].
133        ///
134        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
135        #[unsafe(method(setVideoPath:))]
136        #[unsafe(method_family = none)]
137        pub fn setVideoPath(&self, video_path: &NSString);
138
139        #[unsafe(method(videoMaximumDuration))]
140        #[unsafe(method_family = none)]
141        pub fn videoMaximumDuration(&self) -> NSTimeInterval;
142
143        /// Setter for [`videoMaximumDuration`][Self::videoMaximumDuration].
144        #[unsafe(method(setVideoMaximumDuration:))]
145        #[unsafe(method_family = none)]
146        pub fn setVideoMaximumDuration(&self, video_maximum_duration: NSTimeInterval);
147
148        #[cfg(feature = "UIImagePickerController")]
149        #[unsafe(method(videoQuality))]
150        #[unsafe(method_family = none)]
151        pub fn videoQuality(&self) -> UIImagePickerControllerQualityType;
152
153        #[cfg(feature = "UIImagePickerController")]
154        /// Setter for [`videoQuality`][Self::videoQuality].
155        #[unsafe(method(setVideoQuality:))]
156        #[unsafe(method_family = none)]
157        pub fn setVideoQuality(&self, video_quality: UIImagePickerControllerQualityType);
158    );
159}
160
161/// Methods declared on superclass `UINavigationController`.
162#[cfg(all(
163    feature = "UINavigationController",
164    feature = "UIResponder",
165    feature = "UIViewController"
166))]
167impl UIVideoEditorController {
168    extern_methods!(
169        /// # Safety
170        ///
171        /// - `navigation_bar_class` probably has further requirements.
172        /// - `toolbar_class` probably has further requirements.
173        #[unsafe(method(initWithNavigationBarClass:toolbarClass:))]
174        #[unsafe(method_family = init)]
175        pub unsafe fn initWithNavigationBarClass_toolbarClass(
176            this: Allocated<Self>,
177            navigation_bar_class: Option<&AnyClass>,
178            toolbar_class: Option<&AnyClass>,
179        ) -> Retained<Self>;
180
181        #[unsafe(method(initWithRootViewController:))]
182        #[unsafe(method_family = init)]
183        pub fn initWithRootViewController(
184            this: Allocated<Self>,
185            root_view_controller: &UIViewController,
186        ) -> Retained<Self>;
187
188        #[unsafe(method(initWithNibName:bundle:))]
189        #[unsafe(method_family = init)]
190        pub fn initWithNibName_bundle(
191            this: Allocated<Self>,
192            nib_name_or_nil: Option<&NSString>,
193            nib_bundle_or_nil: Option<&NSBundle>,
194        ) -> Retained<Self>;
195
196        /// # Safety
197        ///
198        /// `a_decoder` possibly has further requirements.
199        #[unsafe(method(initWithCoder:))]
200        #[unsafe(method_family = init)]
201        pub unsafe fn initWithCoder(
202            this: Allocated<Self>,
203            a_decoder: &NSCoder,
204        ) -> Option<Retained<Self>>;
205    );
206}
207
208/// Methods declared on superclass `NSObject`.
209#[cfg(all(
210    feature = "UINavigationController",
211    feature = "UIResponder",
212    feature = "UIViewController"
213))]
214impl UIVideoEditorController {
215    extern_methods!(
216        #[unsafe(method(init))]
217        #[unsafe(method_family = init)]
218        pub fn init(this: Allocated<Self>) -> Retained<Self>;
219
220        #[unsafe(method(new))]
221        #[unsafe(method_family = new)]
222        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
223    );
224}
225
226extern_protocol!(
227    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uivideoeditorcontrollerdelegate?language=objc)
228    pub unsafe trait UIVideoEditorControllerDelegate:
229        NSObjectProtocol + MainThreadOnly
230    {
231        #[cfg(all(
232            feature = "UINavigationController",
233            feature = "UIResponder",
234            feature = "UIViewController"
235        ))]
236        #[optional]
237        #[unsafe(method(videoEditorController:didSaveEditedVideoToPath:))]
238        #[unsafe(method_family = none)]
239        fn videoEditorController_didSaveEditedVideoToPath(
240            &self,
241            editor: &UIVideoEditorController,
242            edited_video_path: &NSString,
243        );
244
245        #[cfg(all(
246            feature = "UINavigationController",
247            feature = "UIResponder",
248            feature = "UIViewController"
249        ))]
250        #[optional]
251        #[unsafe(method(videoEditorController:didFailWithError:))]
252        #[unsafe(method_family = none)]
253        fn videoEditorController_didFailWithError(
254            &self,
255            editor: &UIVideoEditorController,
256            error: &NSError,
257        );
258
259        #[cfg(all(
260            feature = "UINavigationController",
261            feature = "UIResponder",
262            feature = "UIViewController"
263        ))]
264        #[optional]
265        #[unsafe(method(videoEditorControllerDidCancel:))]
266        #[unsafe(method_family = none)]
267        fn videoEditorControllerDidCancel(&self, editor: &UIVideoEditorController);
268    }
269);