//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// This subclass of UIPanGestureRecognizer only recognizes if the user slides their finger
    /// in from the bezel on the specified edge.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscreenedgepangesturerecognizer?language=objc)
    #[unsafe(super(UIPanGestureRecognizer, UIGestureRecognizer, NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
    pub struct UIScreenEdgePanGestureRecognizer;
);

#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for UIScreenEdgePanGestureRecognizer {}
);

#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
impl UIScreenEdgePanGestureRecognizer {
    extern_methods!(
        #[cfg(feature = "UIGeometry")]
        #[unsafe(method(edges))]
        #[unsafe(method_family = none)]
        pub fn edges(&self) -> UIRectEdge;

        #[cfg(feature = "UIGeometry")]
        /// Setter for [`edges`][Self::edges].
        #[unsafe(method(setEdges:))]
        #[unsafe(method_family = none)]
        pub fn setEdges(&self, edges: UIRectEdge);
    );
}

/// Methods declared on superclass `UIGestureRecognizer`.
#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
impl UIScreenEdgePanGestureRecognizer {
    extern_methods!(
        /// # Safety
        ///
        /// - `target` should be of the correct type.
        /// - `action` must be a valid selector.
        #[unsafe(method(initWithTarget:action:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTarget_action(
            this: Allocated<Self>,
            target: Option<&AnyObject>,
            action: Option<Sel>,
        ) -> Retained<Self>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
impl UIScreenEdgePanGestureRecognizer {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
