objc2_ui_kit/generated/
UIDocumentViewControllerLaunchOptions.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/uidocumentviewcontrollerlaunchoptions?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct UIDocumentViewControllerLaunchOptions;
16);
17
18extern_conformance!(
19    unsafe impl NSObjectProtocol for UIDocumentViewControllerLaunchOptions {}
20);
21
22impl UIDocumentViewControllerLaunchOptions {
23    extern_methods!(
24        #[cfg(all(
25            feature = "UIDocumentBrowserViewController",
26            feature = "UIResponder",
27            feature = "UIViewController"
28        ))]
29        /// The view controller for browsing documents to open.
30        #[unsafe(method(browserViewController))]
31        #[unsafe(method_family = none)]
32        pub fn browserViewController(&self) -> Retained<UIDocumentBrowserViewController>;
33
34        #[cfg(all(
35            feature = "UIDocumentBrowserViewController",
36            feature = "UIResponder",
37            feature = "UIViewController"
38        ))]
39        /// Setter for [`browserViewController`][Self::browserViewController].
40        #[unsafe(method(setBrowserViewController:))]
41        #[unsafe(method_family = none)]
42        pub fn setBrowserViewController(
43            &self,
44            browser_view_controller: &UIDocumentBrowserViewController,
45        );
46
47        /// The title of the view. Default is the application's name.
48        #[unsafe(method(title))]
49        #[unsafe(method_family = none)]
50        pub fn title(&self) -> Retained<NSString>;
51
52        /// Setter for [`title`][Self::title].
53        ///
54        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
55        #[unsafe(method(setTitle:))]
56        #[unsafe(method_family = none)]
57        pub fn setTitle(&self, title: &NSString);
58
59        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
60        /// The primary action.
61        #[unsafe(method(primaryAction))]
62        #[unsafe(method_family = none)]
63        pub fn primaryAction(&self) -> Option<Retained<UIAction>>;
64
65        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
66        /// Setter for [`primaryAction`][Self::primaryAction].
67        ///
68        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
69        #[unsafe(method(setPrimaryAction:))]
70        #[unsafe(method_family = none)]
71        pub fn setPrimaryAction(&self, primary_action: Option<&UIAction>);
72
73        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
74        /// The secondary action.
75        #[unsafe(method(secondaryAction))]
76        #[unsafe(method_family = none)]
77        pub fn secondaryAction(&self) -> Option<Retained<UIAction>>;
78
79        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
80        /// Setter for [`secondaryAction`][Self::secondaryAction].
81        ///
82        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
83        #[unsafe(method(setSecondaryAction:))]
84        #[unsafe(method_family = none)]
85        pub fn setSecondaryAction(&self, secondary_action: Option<&UIAction>);
86
87        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
88        /// The view which displays an open document. Default is the view controller's view.
89        #[unsafe(method(documentTargetView))]
90        #[unsafe(method_family = none)]
91        pub fn documentTargetView(&self) -> Option<Retained<UIView>>;
92
93        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
94        /// Setter for [`documentTargetView`][Self::documentTargetView].
95        #[unsafe(method(setDocumentTargetView:))]
96        #[unsafe(method_family = none)]
97        pub fn setDocumentTargetView(&self, document_target_view: Option<&UIView>);
98
99        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
100        /// The foreground accessory view.
101        #[unsafe(method(foregroundAccessoryView))]
102        #[unsafe(method_family = none)]
103        pub fn foregroundAccessoryView(&self) -> Option<Retained<UIView>>;
104
105        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
106        /// Setter for [`foregroundAccessoryView`][Self::foregroundAccessoryView].
107        #[unsafe(method(setForegroundAccessoryView:))]
108        #[unsafe(method_family = none)]
109        pub fn setForegroundAccessoryView(&self, foreground_accessory_view: Option<&UIView>);
110
111        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
112        /// The background accessory view.
113        #[unsafe(method(backgroundAccessoryView))]
114        #[unsafe(method_family = none)]
115        pub fn backgroundAccessoryView(&self) -> Option<Retained<UIView>>;
116
117        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
118        /// Setter for [`backgroundAccessoryView`][Self::backgroundAccessoryView].
119        #[unsafe(method(setBackgroundAccessoryView:))]
120        #[unsafe(method_family = none)]
121        pub fn setBackgroundAccessoryView(&self, background_accessory_view: Option<&UIView>);
122
123        #[cfg(feature = "UIBackgroundConfiguration")]
124        /// The background configuration.
125        #[unsafe(method(background))]
126        #[unsafe(method_family = none)]
127        pub fn background(&self) -> Retained<UIBackgroundConfiguration>;
128
129        #[cfg(feature = "UIBackgroundConfiguration")]
130        /// Setter for [`background`][Self::background].
131        #[unsafe(method(setBackground:))]
132        #[unsafe(method_family = none)]
133        pub fn setBackground(&self, background: &UIBackgroundConfiguration);
134
135        #[cfg(all(
136            feature = "UIAction",
137            feature = "UIDocument",
138            feature = "UIMenuElement"
139        ))]
140        /// Returns an action which requests the creation of a new document with the specified intent.
141        /// Can be used for either the primary or secondary action.
142        #[unsafe(method(createDocumentActionWithIntent:))]
143        #[unsafe(method_family = none)]
144        pub fn createDocumentActionWithIntent(
145            intent: &UIDocumentCreationIntent,
146            mtm: MainThreadMarker,
147        ) -> Retained<UIAction>;
148    );
149}
150
151/// Methods declared on superclass `NSObject`.
152impl UIDocumentViewControllerLaunchOptions {
153    extern_methods!(
154        #[unsafe(method(init))]
155        #[unsafe(method_family = init)]
156        pub fn init(this: Allocated<Self>) -> Retained<Self>;
157
158        #[unsafe(method(new))]
159        #[unsafe(method_family = new)]
160        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
161    );
162}