objc2_app_kit/generated/
NSPressGestureRecognizer.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(NSGestureRecognizer, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "NSGestureRecognizer")]
17 pub struct NSPressGestureRecognizer;
18);
19
20#[cfg(feature = "NSGestureRecognizer")]
21unsafe impl NSCoding for NSPressGestureRecognizer {}
22
23#[cfg(feature = "NSGestureRecognizer")]
24unsafe impl NSObjectProtocol for NSPressGestureRecognizer {}
25
26#[cfg(feature = "NSGestureRecognizer")]
27impl NSPressGestureRecognizer {
28 extern_methods!(
29 #[unsafe(method(buttonMask))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn buttonMask(&self) -> NSUInteger;
32
33 #[unsafe(method(setButtonMask:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn setButtonMask(&self, button_mask: NSUInteger);
37
38 #[unsafe(method(minimumPressDuration))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval;
41
42 #[unsafe(method(setMinimumPressDuration:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn setMinimumPressDuration(&self, minimum_press_duration: NSTimeInterval);
46
47 #[cfg(feature = "objc2-core-foundation")]
48 #[unsafe(method(allowableMovement))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn allowableMovement(&self) -> CGFloat;
51
52 #[cfg(feature = "objc2-core-foundation")]
53 #[unsafe(method(setAllowableMovement:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setAllowableMovement(&self, allowable_movement: CGFloat);
57
58 #[unsafe(method(numberOfTouchesRequired))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger;
61
62 #[unsafe(method(setNumberOfTouchesRequired:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSInteger);
66 );
67}
68
69#[cfg(feature = "NSGestureRecognizer")]
71impl NSPressGestureRecognizer {
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(initWithCoder:))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn initWithCoder(
84 this: Allocated<Self>,
85 coder: &NSCoder,
86 ) -> Option<Retained<Self>>;
87 );
88}
89
90#[cfg(feature = "NSGestureRecognizer")]
92impl NSPressGestureRecognizer {
93 extern_methods!(
94 #[unsafe(method(init))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97
98 #[unsafe(method(new))]
99 #[unsafe(method_family = new)]
100 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
101 );
102}