objc2_ui_kit/generated/
UIPressesEvent.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipressesevent?language=objc)
11    #[unsafe(super(UIEvent, NSObject))]
12    #[thread_kind = MainThreadOnly]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "UIEvent")]
15    pub struct UIPressesEvent;
16);
17
18#[cfg(feature = "UIEvent")]
19unsafe impl NSObjectProtocol for UIPressesEvent {}
20
21#[cfg(feature = "UIEvent")]
22impl UIPressesEvent {
23    extern_methods!(
24        #[cfg(feature = "UIPress")]
25        #[unsafe(method(allPresses))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn allPresses(&self) -> Retained<NSSet<UIPress>>;
28
29        #[cfg(all(feature = "UIGestureRecognizer", feature = "UIPress"))]
30        #[unsafe(method(pressesForGestureRecognizer:))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn pressesForGestureRecognizer(
33            &self,
34            gesture: &UIGestureRecognizer,
35        ) -> Retained<NSSet<UIPress>>;
36    );
37}
38
39/// Methods declared on superclass `NSObject`.
40#[cfg(feature = "UIEvent")]
41impl UIPressesEvent {
42    extern_methods!(
43        #[unsafe(method(init))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47        #[unsafe(method(new))]
48        #[unsafe(method_family = new)]
49        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
50    );
51}