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:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initWithTarget_action(
65 this: Allocated<Self>,
66 target: Option<&AnyObject>,
67 action: Option<Sel>,
68 ) -> Retained<Self>;
69
70 #[unsafe(method(init))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
73
74 #[unsafe(method(initWithCoder:))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn initWithCoder(
77 this: Allocated<Self>,
78 coder: &NSCoder,
79 ) -> Option<Retained<Self>>;
80 );
81}
82
83#[cfg(feature = "UIGestureRecognizer")]
85impl UITapGestureRecognizer {
86 extern_methods!(
87 #[unsafe(method(new))]
88 #[unsafe(method_family = new)]
89 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
90 );
91}