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 unsafe 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 unsafe 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 unsafe fn title(&self) -> Retained<NSString>;
51
52        /// Setter for [`title`][Self::title].
53        #[unsafe(method(setTitle:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setTitle(&self, title: &NSString);
56
57        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
58        /// The primary action.
59        #[unsafe(method(primaryAction))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn primaryAction(&self) -> Option<Retained<UIAction>>;
62
63        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
64        /// Setter for [`primaryAction`][Self::primaryAction].
65        #[unsafe(method(setPrimaryAction:))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn setPrimaryAction(&self, primary_action: Option<&UIAction>);
68
69        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
70        /// The secondary action.
71        #[unsafe(method(secondaryAction))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn secondaryAction(&self) -> Option<Retained<UIAction>>;
74
75        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
76        /// Setter for [`secondaryAction`][Self::secondaryAction].
77        #[unsafe(method(setSecondaryAction:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn setSecondaryAction(&self, secondary_action: Option<&UIAction>);
80
81        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
82        /// The view which displays an open document. Default is the view controller's view.
83        #[unsafe(method(documentTargetView))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn documentTargetView(&self) -> Option<Retained<UIView>>;
86
87        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
88        /// Setter for [`documentTargetView`][Self::documentTargetView].
89        #[unsafe(method(setDocumentTargetView:))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn setDocumentTargetView(&self, document_target_view: Option<&UIView>);
92
93        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
94        /// The foreground accessory view.
95        #[unsafe(method(foregroundAccessoryView))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn foregroundAccessoryView(&self) -> Option<Retained<UIView>>;
98
99        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
100        /// Setter for [`foregroundAccessoryView`][Self::foregroundAccessoryView].
101        #[unsafe(method(setForegroundAccessoryView:))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn setForegroundAccessoryView(&self, foreground_accessory_view: Option<&UIView>);
104
105        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
106        /// The background accessory view.
107        #[unsafe(method(backgroundAccessoryView))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn backgroundAccessoryView(&self) -> Option<Retained<UIView>>;
110
111        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
112        /// Setter for [`backgroundAccessoryView`][Self::backgroundAccessoryView].
113        #[unsafe(method(setBackgroundAccessoryView:))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn setBackgroundAccessoryView(&self, background_accessory_view: Option<&UIView>);
116
117        #[cfg(feature = "UIBackgroundConfiguration")]
118        /// The background configuration.
119        #[unsafe(method(background))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn background(&self) -> Retained<UIBackgroundConfiguration>;
122
123        #[cfg(feature = "UIBackgroundConfiguration")]
124        /// Setter for [`background`][Self::background].
125        #[unsafe(method(setBackground:))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn setBackground(&self, background: &UIBackgroundConfiguration);
128
129        #[cfg(all(
130            feature = "UIAction",
131            feature = "UIDocument",
132            feature = "UIMenuElement"
133        ))]
134        /// Returns an action which requests the creation of a new document with the specified intent.
135        /// Can be used for either the primary or secondary action.
136        #[unsafe(method(createDocumentActionWithIntent:))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn createDocumentActionWithIntent(
139            intent: &UIDocumentCreationIntent,
140            mtm: MainThreadMarker,
141        ) -> Retained<UIAction>;
142    );
143}
144
145/// Methods declared on superclass `NSObject`.
146impl UIDocumentViewControllerLaunchOptions {
147    extern_methods!(
148        #[unsafe(method(init))]
149        #[unsafe(method_family = init)]
150        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
151
152        #[unsafe(method(new))]
153        #[unsafe(method_family = new)]
154        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
155    );
156}