use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
use objc2_quartz_core::*;
use crate::*;
extern_protocol!(
pub unsafe trait UIPopoverBackgroundViewMethods {
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(arrowBase))]
#[unsafe(method_family = none)]
fn arrowBase() -> CGFloat;
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(contentViewInsets))]
#[unsafe(method_family = none)]
fn contentViewInsets() -> UIEdgeInsets;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(arrowHeight))]
#[unsafe(method_family = none)]
fn arrowHeight() -> CGFloat;
}
);
extern_class!(
#[unsafe(super(UIView, UIResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
pub struct UIPopoverBackgroundView;
);
#[cfg(all(
feature = "UIResponder",
feature = "UIView",
feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl CALayerDelegate for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSCoding for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIAppearance for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UICoordinateSpace for UIPopoverBackgroundView {}
);
#[cfg(all(
feature = "UIDynamicBehavior",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIDynamicItem for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusItem for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusItemContainer for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIPopoverBackgroundViewMethods for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UIPopoverBackgroundView {}
);
#[cfg(all(
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UIPopoverBackgroundView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIPopoverBackgroundView {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(arrowOffset))]
#[unsafe(method_family = none)]
pub fn arrowOffset(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setArrowOffset:))]
#[unsafe(method_family = none)]
pub fn setArrowOffset(&self, arrow_offset: CGFloat);
#[cfg(feature = "UIPopoverSupport")]
#[unsafe(method(arrowDirection))]
#[unsafe(method_family = none)]
pub fn arrowDirection(&self) -> UIPopoverArrowDirection;
#[cfg(feature = "UIPopoverSupport")]
#[unsafe(method(setArrowDirection:))]
#[unsafe(method_family = none)]
pub fn setArrowDirection(&self, arrow_direction: UIPopoverArrowDirection);
#[deprecated = "No longer supported"]
#[unsafe(method(wantsDefaultContentAppearance))]
#[unsafe(method_family = none)]
pub fn wantsDefaultContentAppearance(mtm: MainThreadMarker) -> bool;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIPopoverBackgroundView {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIPopoverBackgroundView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}