use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(UIGestureRecognizer, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIGestureRecognizer")]
pub struct UILongPressGestureRecognizer;
);
#[cfg(feature = "UIGestureRecognizer")]
extern_conformance!(
unsafe impl NSObjectProtocol for UILongPressGestureRecognizer {}
);
#[cfg(feature = "UIGestureRecognizer")]
impl UILongPressGestureRecognizer {
extern_methods!(
#[unsafe(method(numberOfTapsRequired))]
#[unsafe(method_family = none)]
pub fn numberOfTapsRequired(&self) -> NSUInteger;
#[unsafe(method(setNumberOfTapsRequired:))]
#[unsafe(method_family = none)]
pub fn setNumberOfTapsRequired(&self, number_of_taps_required: NSUInteger);
#[unsafe(method(numberOfTouchesRequired))]
#[unsafe(method_family = none)]
pub fn numberOfTouchesRequired(&self) -> NSUInteger;
#[unsafe(method(setNumberOfTouchesRequired:))]
#[unsafe(method_family = none)]
pub fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSUInteger);
#[unsafe(method(minimumPressDuration))]
#[unsafe(method_family = none)]
pub fn minimumPressDuration(&self) -> NSTimeInterval;
#[unsafe(method(setMinimumPressDuration:))]
#[unsafe(method_family = none)]
pub fn setMinimumPressDuration(&self, minimum_press_duration: NSTimeInterval);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(allowableMovement))]
#[unsafe(method_family = none)]
pub fn allowableMovement(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setAllowableMovement:))]
#[unsafe(method_family = none)]
pub fn setAllowableMovement(&self, allowable_movement: CGFloat);
);
}
#[cfg(feature = "UIGestureRecognizer")]
impl UILongPressGestureRecognizer {
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(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "UIGestureRecognizer")]
impl UILongPressGestureRecognizer {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}