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")]
21extern_conformance!(
22 unsafe impl NSCoding for NSPressGestureRecognizer {}
23);
24
25#[cfg(feature = "NSGestureRecognizer")]
26extern_conformance!(
27 unsafe impl NSObjectProtocol for NSPressGestureRecognizer {}
28);
29
30#[cfg(feature = "NSGestureRecognizer")]
31impl NSPressGestureRecognizer {
32 extern_methods!(
33 #[unsafe(method(buttonMask))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn buttonMask(&self) -> NSUInteger;
36
37 #[unsafe(method(setButtonMask:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn setButtonMask(&self, button_mask: NSUInteger);
41
42 #[unsafe(method(minimumPressDuration))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval;
45
46 #[unsafe(method(setMinimumPressDuration:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn setMinimumPressDuration(&self, minimum_press_duration: NSTimeInterval);
50
51 #[cfg(feature = "objc2-core-foundation")]
52 #[unsafe(method(allowableMovement))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn allowableMovement(&self) -> CGFloat;
55
56 #[cfg(feature = "objc2-core-foundation")]
57 #[unsafe(method(setAllowableMovement:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setAllowableMovement(&self, allowable_movement: CGFloat);
61
62 #[unsafe(method(numberOfTouchesRequired))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger;
65
66 #[unsafe(method(setNumberOfTouchesRequired:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSInteger);
70 );
71}
72
73#[cfg(feature = "NSGestureRecognizer")]
75impl NSPressGestureRecognizer {
76 extern_methods!(
77 #[unsafe(method(initWithTarget:action:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithTarget_action(
80 this: Allocated<Self>,
81 target: Option<&AnyObject>,
82 action: Option<Sel>,
83 ) -> 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 = "NSGestureRecognizer")]
96impl NSPressGestureRecognizer {
97 extern_methods!(
98 #[unsafe(method(init))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
101
102 #[unsafe(method(new))]
103 #[unsafe(method_family = new)]
104 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
105 );
106}