//! 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!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspangesturerecognizer?language=objc)
    #[unsafe(super(NSGestureRecognizer, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSGestureRecognizer")]
    pub struct NSPanGestureRecognizer;
);

#[cfg(feature = "NSGestureRecognizer")]
unsafe impl NSCoding for NSPanGestureRecognizer {}

#[cfg(feature = "NSGestureRecognizer")]
unsafe impl NSObjectProtocol for NSPanGestureRecognizer {}

#[cfg(feature = "NSGestureRecognizer")]
impl NSPanGestureRecognizer {
    extern_methods!(
        #[unsafe(method(buttonMask))]
        #[unsafe(method_family = none)]
        pub unsafe fn buttonMask(&self) -> NSUInteger;

        /// Setter for [`buttonMask`][Self::buttonMask].
        #[unsafe(method(setButtonMask:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setButtonMask(&self, button_mask: NSUInteger);

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[unsafe(method(translationInView:))]
        #[unsafe(method_family = none)]
        pub unsafe fn translationInView(&self, view: Option<&NSView>) -> NSPoint;

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[unsafe(method(setTranslation:inView:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTranslation_inView(&self, translation: NSPoint, view: Option<&NSView>);

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[unsafe(method(velocityInView:))]
        #[unsafe(method_family = none)]
        pub unsafe fn velocityInView(&self, view: Option<&NSView>) -> NSPoint;

        #[unsafe(method(numberOfTouchesRequired))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger;

        /// Setter for [`numberOfTouchesRequired`][Self::numberOfTouchesRequired].
        #[unsafe(method(setNumberOfTouchesRequired:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSInteger);
    );
}

/// Methods declared on superclass `NSGestureRecognizer`.
#[cfg(feature = "NSGestureRecognizer")]
impl NSPanGestureRecognizer {
    extern_methods!(
        #[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(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "NSGestureRecognizer")]
impl NSPanGestureRecognizer {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
