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