objc2_ui_kit/generated/
UILongPressGestureRecognizer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(UIGestureRecognizer, NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "UIGestureRecognizer")]
18 pub struct UILongPressGestureRecognizer;
19);
20
21#[cfg(feature = "UIGestureRecognizer")]
22extern_conformance!(
23 unsafe impl NSObjectProtocol for UILongPressGestureRecognizer {}
24);
25
26#[cfg(feature = "UIGestureRecognizer")]
27impl UILongPressGestureRecognizer {
28 extern_methods!(
29 #[unsafe(method(numberOfTapsRequired))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn numberOfTapsRequired(&self) -> NSUInteger;
32
33 #[unsafe(method(setNumberOfTapsRequired:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn setNumberOfTapsRequired(&self, number_of_taps_required: NSUInteger);
37
38 #[unsafe(method(numberOfTouchesRequired))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn numberOfTouchesRequired(&self) -> NSUInteger;
41
42 #[unsafe(method(setNumberOfTouchesRequired:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSUInteger);
46
47 #[unsafe(method(minimumPressDuration))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval;
50
51 #[unsafe(method(setMinimumPressDuration:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn setMinimumPressDuration(&self, minimum_press_duration: NSTimeInterval);
55
56 #[cfg(feature = "objc2-core-foundation")]
57 #[unsafe(method(allowableMovement))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn allowableMovement(&self) -> CGFloat;
60
61 #[cfg(feature = "objc2-core-foundation")]
62 #[unsafe(method(setAllowableMovement:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setAllowableMovement(&self, allowable_movement: CGFloat);
66 );
67}
68
69#[cfg(feature = "UIGestureRecognizer")]
71impl UILongPressGestureRecognizer {
72 extern_methods!(
73 #[unsafe(method(initWithTarget:action:))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn initWithTarget_action(
76 this: Allocated<Self>,
77 target: Option<&AnyObject>,
78 action: Option<Sel>,
79 ) -> Retained<Self>;
80
81 #[unsafe(method(init))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
84
85 #[unsafe(method(initWithCoder:))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn initWithCoder(
88 this: Allocated<Self>,
89 coder: &NSCoder,
90 ) -> Option<Retained<Self>>;
91 );
92}
93
94#[cfg(feature = "UIGestureRecognizer")]
96impl UILongPressGestureRecognizer {
97 extern_methods!(
98 #[unsafe(method(new))]
99 #[unsafe(method_family = new)]
100 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
101 );
102}