objc2_ui_kit/generated/
UIPopoverBackgroundView.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15extern_protocol!(
16 pub unsafe trait UIPopoverBackgroundViewMethods {
18 #[cfg(feature = "objc2-core-foundation")]
19 #[unsafe(method(arrowBase))]
20 #[unsafe(method_family = none)]
21 unsafe fn arrowBase() -> CGFloat;
22
23 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
24 #[unsafe(method(contentViewInsets))]
25 #[unsafe(method_family = none)]
26 unsafe fn contentViewInsets() -> UIEdgeInsets;
27
28 #[cfg(feature = "objc2-core-foundation")]
29 #[unsafe(method(arrowHeight))]
30 #[unsafe(method_family = none)]
31 unsafe fn arrowHeight() -> CGFloat;
32 }
33);
34
35extern_class!(
36 #[unsafe(super(UIView, UIResponder, NSObject))]
38 #[derive(Debug, PartialEq, Eq, Hash)]
39 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
40 pub struct UIPopoverBackgroundView;
41);
42
43#[cfg(all(
44 feature = "UIResponder",
45 feature = "UIView",
46 feature = "objc2-quartz-core"
47))]
48#[cfg(not(target_os = "watchos"))]
49unsafe impl CALayerDelegate for UIPopoverBackgroundView {}
50
51#[cfg(all(feature = "UIResponder", feature = "UIView"))]
52unsafe impl NSCoding for UIPopoverBackgroundView {}
53
54#[cfg(all(feature = "UIResponder", feature = "UIView"))]
55unsafe impl NSObjectProtocol for UIPopoverBackgroundView {}
56
57#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
58unsafe impl UIAppearance for UIPopoverBackgroundView {}
59
60#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
61unsafe impl UIAppearanceContainer for UIPopoverBackgroundView {}
62
63#[cfg(all(feature = "UIResponder", feature = "UIView"))]
64unsafe impl UICoordinateSpace for UIPopoverBackgroundView {}
65
66#[cfg(all(
67 feature = "UIDynamicBehavior",
68 feature = "UIResponder",
69 feature = "UIView"
70))]
71unsafe impl UIDynamicItem for UIPopoverBackgroundView {}
72
73#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
74unsafe impl UIFocusEnvironment for UIPopoverBackgroundView {}
75
76#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
77unsafe impl UIFocusItem for UIPopoverBackgroundView {}
78
79#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
80unsafe impl UIFocusItemContainer for UIPopoverBackgroundView {}
81
82#[cfg(all(feature = "UIResponder", feature = "UIView"))]
83unsafe impl UIPopoverBackgroundViewMethods for UIPopoverBackgroundView {}
84
85#[cfg(all(feature = "UIResponder", feature = "UIView"))]
86unsafe impl UIResponderStandardEditActions for UIPopoverBackgroundView {}
87
88#[cfg(all(
89 feature = "UIResponder",
90 feature = "UITraitCollection",
91 feature = "UIView"
92))]
93unsafe impl UITraitEnvironment for UIPopoverBackgroundView {}
94
95#[cfg(all(feature = "UIResponder", feature = "UIView"))]
96impl UIPopoverBackgroundView {
97 extern_methods!(
98 #[cfg(feature = "objc2-core-foundation")]
99 #[unsafe(method(arrowOffset))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn arrowOffset(&self) -> CGFloat;
102
103 #[cfg(feature = "objc2-core-foundation")]
104 #[unsafe(method(setArrowOffset:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setArrowOffset(&self, arrow_offset: CGFloat);
108
109 #[cfg(feature = "UIPopoverSupport")]
110 #[unsafe(method(arrowDirection))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn arrowDirection(&self) -> UIPopoverArrowDirection;
113
114 #[cfg(feature = "UIPopoverSupport")]
115 #[unsafe(method(setArrowDirection:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn setArrowDirection(&self, arrow_direction: UIPopoverArrowDirection);
119
120 #[deprecated = "No longer supported"]
121 #[unsafe(method(wantsDefaultContentAppearance))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn wantsDefaultContentAppearance(mtm: MainThreadMarker) -> bool;
124 );
125}
126
127#[cfg(all(feature = "UIResponder", feature = "UIView"))]
129impl UIPopoverBackgroundView {
130 extern_methods!(
131 #[cfg(feature = "objc2-core-foundation")]
132 #[unsafe(method(initWithFrame:))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
135
136 #[unsafe(method(initWithCoder:))]
137 #[unsafe(method_family = init)]
138 pub unsafe fn initWithCoder(
139 this: Allocated<Self>,
140 coder: &NSCoder,
141 ) -> Option<Retained<Self>>;
142 );
143}
144
145#[cfg(all(feature = "UIResponder", feature = "UIView"))]
147impl UIPopoverBackgroundView {
148 extern_methods!(
149 #[unsafe(method(init))]
150 #[unsafe(method_family = init)]
151 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
152
153 #[unsafe(method(new))]
154 #[unsafe(method_family = new)]
155 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
156 );
157}