objc2_ui_kit/generated/
UITapGestureRecognizer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(UIGestureRecognizer, NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "UIGestureRecognizer")]
16 pub struct UITapGestureRecognizer;
17);
18
19#[cfg(feature = "UIGestureRecognizer")]
20extern_conformance!(
21 unsafe impl NSObjectProtocol for UITapGestureRecognizer {}
22);
23
24#[cfg(feature = "UIGestureRecognizer")]
25impl UITapGestureRecognizer {
26 extern_methods!(
27 #[unsafe(method(numberOfTapsRequired))]
28 #[unsafe(method_family = none)]
29 pub fn numberOfTapsRequired(&self) -> NSUInteger;
30
31 #[unsafe(method(setNumberOfTapsRequired:))]
33 #[unsafe(method_family = none)]
34 pub fn setNumberOfTapsRequired(&self, number_of_taps_required: NSUInteger);
35
36 #[unsafe(method(numberOfTouchesRequired))]
37 #[unsafe(method_family = none)]
38 pub fn numberOfTouchesRequired(&self) -> NSUInteger;
39
40 #[unsafe(method(setNumberOfTouchesRequired:))]
42 #[unsafe(method_family = none)]
43 pub fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSUInteger);
44
45 #[cfg(feature = "UIEvent")]
46 #[unsafe(method(buttonMaskRequired))]
47 #[unsafe(method_family = none)]
48 pub fn buttonMaskRequired(&self) -> UIEventButtonMask;
49
50 #[cfg(feature = "UIEvent")]
51 #[unsafe(method(setButtonMaskRequired:))]
53 #[unsafe(method_family = none)]
54 pub fn setButtonMaskRequired(&self, button_mask_required: UIEventButtonMask);
55 );
56}
57
58#[cfg(feature = "UIGestureRecognizer")]
60impl UITapGestureRecognizer {
61 extern_methods!(
62 #[unsafe(method(initWithTarget:action:))]
67 #[unsafe(method_family = init)]
68 pub unsafe fn initWithTarget_action(
69 this: Allocated<Self>,
70 target: Option<&AnyObject>,
71 action: Option<Sel>,
72 ) -> Retained<Self>;
73
74 #[unsafe(method(init))]
75 #[unsafe(method_family = init)]
76 pub fn init(this: Allocated<Self>) -> Retained<Self>;
77
78 #[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 = "UIGestureRecognizer")]
92impl UITapGestureRecognizer {
93 extern_methods!(
94 #[unsafe(method(new))]
95 #[unsafe(method_family = new)]
96 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
97 );
98}