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")]
22unsafe impl NSObjectProtocol for UILongPressGestureRecognizer {}
23
24#[cfg(feature = "UIGestureRecognizer")]
25impl UILongPressGestureRecognizer {
26 extern_methods!(
27 #[unsafe(method(numberOfTapsRequired))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn numberOfTapsRequired(&self) -> NSUInteger;
30
31 #[unsafe(method(setNumberOfTapsRequired:))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn setNumberOfTapsRequired(&self, number_of_taps_required: NSUInteger);
35
36 #[unsafe(method(numberOfTouchesRequired))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn numberOfTouchesRequired(&self) -> NSUInteger;
39
40 #[unsafe(method(setNumberOfTouchesRequired:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSUInteger);
44
45 #[unsafe(method(minimumPressDuration))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval;
48
49 #[unsafe(method(setMinimumPressDuration:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setMinimumPressDuration(&self, minimum_press_duration: NSTimeInterval);
53
54 #[cfg(feature = "objc2-core-foundation")]
55 #[unsafe(method(allowableMovement))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn allowableMovement(&self) -> CGFloat;
58
59 #[cfg(feature = "objc2-core-foundation")]
60 #[unsafe(method(setAllowableMovement:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn setAllowableMovement(&self, allowable_movement: CGFloat);
64 );
65}
66
67#[cfg(feature = "UIGestureRecognizer")]
69impl UILongPressGestureRecognizer {
70 extern_methods!(
71 #[unsafe(method(initWithTarget:action:))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn initWithTarget_action(
74 this: Allocated<Self>,
75 target: Option<&AnyObject>,
76 action: Option<Sel>,
77 ) -> Retained<Self>;
78
79 #[unsafe(method(init))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83 #[unsafe(method(initWithCoder:))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn initWithCoder(
86 this: Allocated<Self>,
87 coder: &NSCoder,
88 ) -> Option<Retained<Self>>;
89 );
90}
91
92#[cfg(feature = "UIGestureRecognizer")]
94impl UILongPressGestureRecognizer {
95 extern_methods!(
96 #[unsafe(method(new))]
97 #[unsafe(method_family = new)]
98 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
99 );
100}