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")]
20unsafe impl NSObjectProtocol for UITapGestureRecognizer {}
21
22#[cfg(feature = "UIGestureRecognizer")]
23impl UITapGestureRecognizer {
24 extern_methods!(
25 #[unsafe(method(numberOfTapsRequired))]
26 #[unsafe(method_family = none)]
27 pub fn numberOfTapsRequired(&self) -> NSUInteger;
28
29 #[unsafe(method(setNumberOfTapsRequired:))]
31 #[unsafe(method_family = none)]
32 pub fn setNumberOfTapsRequired(&self, number_of_taps_required: NSUInteger);
33
34 #[unsafe(method(numberOfTouchesRequired))]
35 #[unsafe(method_family = none)]
36 pub fn numberOfTouchesRequired(&self) -> NSUInteger;
37
38 #[unsafe(method(setNumberOfTouchesRequired:))]
40 #[unsafe(method_family = none)]
41 pub fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSUInteger);
42
43 #[cfg(feature = "UIEvent")]
44 #[unsafe(method(buttonMaskRequired))]
45 #[unsafe(method_family = none)]
46 pub fn buttonMaskRequired(&self) -> UIEventButtonMask;
47
48 #[cfg(feature = "UIEvent")]
49 #[unsafe(method(setButtonMaskRequired:))]
51 #[unsafe(method_family = none)]
52 pub fn setButtonMaskRequired(&self, button_mask_required: UIEventButtonMask);
53 );
54}
55
56#[cfg(feature = "UIGestureRecognizer")]
58impl UITapGestureRecognizer {
59 extern_methods!(
60 #[unsafe(method(initWithTarget:action:))]
61 #[unsafe(method_family = init)]
62 pub unsafe fn initWithTarget_action(
63 this: Allocated<Self>,
64 target: Option<&AnyObject>,
65 action: Option<Sel>,
66 ) -> Retained<Self>;
67
68 #[unsafe(method(init))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72 #[unsafe(method(initWithCoder:))]
73 #[unsafe(method_family = init)]
74 pub unsafe fn initWithCoder(
75 this: Allocated<Self>,
76 coder: &NSCoder,
77 ) -> Option<Retained<Self>>;
78 );
79}
80
81#[cfg(feature = "UIGestureRecognizer")]
83impl UITapGestureRecognizer {
84 extern_methods!(
85 #[unsafe(method(new))]
86 #[unsafe(method_family = new)]
87 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
88 );
89}