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")]
19extern_conformance!(
20    unsafe impl NSObjectProtocol for UIPressesEvent {}
21);
22
23#[cfg(feature = "UIEvent")]
24impl UIPressesEvent {
25    extern_methods!(
26        #[cfg(feature = "UIPress")]
27        #[unsafe(method(allPresses))]
28        #[unsafe(method_family = none)]
29        pub fn allPresses(&self) -> Retained<NSSet<UIPress>>;
30
31        #[cfg(all(feature = "UIGestureRecognizer", feature = "UIPress"))]
32        #[unsafe(method(pressesForGestureRecognizer:))]
33        #[unsafe(method_family = none)]
34        pub fn pressesForGestureRecognizer(
35            &self,
36            gesture: &UIGestureRecognizer,
37        ) -> Retained<NSSet<UIPress>>;
38    );
39}
40
41/// Methods declared on superclass `NSObject`.
42#[cfg(feature = "UIEvent")]
43impl UIPressesEvent {
44    extern_methods!(
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub fn init(this: Allocated<Self>) -> Retained<Self>;
48
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
52    );
53}