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 fn buttonMask(&self) -> NSUInteger;
36
37 #[unsafe(method(setButtonMask:))]
39 #[unsafe(method_family = none)]
40 pub fn setButtonMask(&self, button_mask: NSUInteger);
41
42 #[unsafe(method(minimumPressDuration))]
43 #[unsafe(method_family = none)]
44 pub fn minimumPressDuration(&self) -> NSTimeInterval;
45
46 #[unsafe(method(setMinimumPressDuration:))]
48 #[unsafe(method_family = none)]
49 pub 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 fn allowableMovement(&self) -> CGFloat;
55
56 #[cfg(feature = "objc2-core-foundation")]
57 #[unsafe(method(setAllowableMovement:))]
59 #[unsafe(method_family = none)]
60 pub fn setAllowableMovement(&self, allowable_movement: CGFloat);
61
62 #[unsafe(method(numberOfTouchesRequired))]
63 #[unsafe(method_family = none)]
64 pub fn numberOfTouchesRequired(&self) -> NSInteger;
65
66 #[unsafe(method(setNumberOfTouchesRequired:))]
68 #[unsafe(method_family = none)]
69 pub 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:))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn initWithTarget_action(
84 this: Allocated<Self>,
85 target: Option<&AnyObject>,
86 action: Option<Sel>,
87 ) -> Retained<Self>;
88
89 #[unsafe(method(initWithCoder:))]
93 #[unsafe(method_family = init)]
94 pub unsafe fn initWithCoder(
95 this: Allocated<Self>,
96 coder: &NSCoder,
97 ) -> Option<Retained<Self>>;
98 );
99}
100
101#[cfg(feature = "NSGestureRecognizer")]
103impl NSPressGestureRecognizer {
104 extern_methods!(
105 #[unsafe(method(init))]
106 #[unsafe(method_family = init)]
107 pub fn init(this: Allocated<Self>) -> Retained<Self>;
108
109 #[unsafe(method(new))]
110 #[unsafe(method_family = new)]
111 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
112 );
113}