//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;

use crate::*;

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipopoverpresentationcontrollersourceitem?language=objc)
    pub unsafe trait UIPopoverPresentationControllerSourceItem: NSObjectProtocol {
        #[cfg(all(
            feature = "UIResponder",
            feature = "UIView",
            feature = "objc2-core-foundation"
        ))]
        #[unsafe(method(frameInView:))]
        #[unsafe(method_family = none)]
        fn frameInView(&self, reference_view: &UIView) -> CGRect;
    }
);

/// UIPopoverPresentationControllerSourceItem.
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIView {
    extern_methods!();
}

#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
    unsafe impl UIPopoverPresentationControllerSourceItem for UIView {}
);

/// UIPopoverPresentationControllerSourceItem.
#[cfg(feature = "UILayoutGuide")]
impl UILayoutGuide {
    extern_methods!();
}

#[cfg(feature = "UILayoutGuide")]
extern_conformance!(
    unsafe impl UIPopoverPresentationControllerSourceItem for UILayoutGuide {}
);

/// UIPopoverPresentationControllerSourceItem.
#[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
impl UIBarButtonItem {
    extern_methods!();
}

#[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
extern_conformance!(
    unsafe impl UIPopoverPresentationControllerSourceItem for UIBarButtonItem {}
);

/// UIPopoverPresentationControllerSourceItem.
#[cfg(all(feature = "UIBarItem", feature = "UITabBarItem"))]
impl UITabBarItem {
    extern_methods!();
}

#[cfg(all(feature = "UIBarItem", feature = "UITabBarItem"))]
extern_conformance!(
    unsafe impl UIPopoverPresentationControllerSourceItem for UITabBarItem {}
);
