objc2_ui_kit/generated/
UIScreenEdgePanGestureRecognizer.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// This subclass of UIPanGestureRecognizer only recognizes if the user slides their finger
12    /// in from the bezel on the specified edge.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscreenedgepangesturerecognizer?language=objc)
15    #[unsafe(super(UIPanGestureRecognizer, UIGestureRecognizer, NSObject))]
16    #[thread_kind = MainThreadOnly]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    #[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
19    pub struct UIScreenEdgePanGestureRecognizer;
20);
21
22#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
23unsafe impl NSObjectProtocol for UIScreenEdgePanGestureRecognizer {}
24
25#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
26impl UIScreenEdgePanGestureRecognizer {
27    extern_methods!(
28        #[cfg(feature = "UIGeometry")]
29        #[unsafe(method(edges))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn edges(&self) -> UIRectEdge;
32
33        #[cfg(feature = "UIGeometry")]
34        /// Setter for [`edges`][Self::edges].
35        #[unsafe(method(setEdges:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn setEdges(&self, edges: UIRectEdge);
38    );
39}
40
41/// Methods declared on superclass `UIGestureRecognizer`.
42#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
43impl UIScreenEdgePanGestureRecognizer {
44    extern_methods!(
45        #[unsafe(method(initWithTarget:action:))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn initWithTarget_action(
48            this: Allocated<Self>,
49            target: Option<&AnyObject>,
50            action: Option<Sel>,
51        ) -> Retained<Self>;
52
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[unsafe(method(initWithCoder:))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn initWithCoder(
60            this: Allocated<Self>,
61            coder: &NSCoder,
62        ) -> Option<Retained<Self>>;
63    );
64}
65
66/// Methods declared on superclass `NSObject`.
67#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
68impl UIScreenEdgePanGestureRecognizer {
69    extern_methods!(
70        #[unsafe(method(new))]
71        #[unsafe(method_family = new)]
72        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
73    );
74}