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"))]
23extern_conformance!(
24    unsafe impl NSObjectProtocol for UIScreenEdgePanGestureRecognizer {}
25);
26
27#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
28impl UIScreenEdgePanGestureRecognizer {
29    extern_methods!(
30        #[cfg(feature = "UIGeometry")]
31        #[unsafe(method(edges))]
32        #[unsafe(method_family = none)]
33        pub fn edges(&self) -> UIRectEdge;
34
35        #[cfg(feature = "UIGeometry")]
36        /// Setter for [`edges`][Self::edges].
37        #[unsafe(method(setEdges:))]
38        #[unsafe(method_family = none)]
39        pub fn setEdges(&self, edges: UIRectEdge);
40    );
41}
42
43/// Methods declared on superclass `UIGestureRecognizer`.
44#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
45impl UIScreenEdgePanGestureRecognizer {
46    extern_methods!(
47        /// # Safety
48        ///
49        /// - `target` should be of the correct type.
50        /// - `action` must be a valid selector.
51        #[unsafe(method(initWithTarget:action:))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn initWithTarget_action(
54            this: Allocated<Self>,
55            target: Option<&AnyObject>,
56            action: Option<Sel>,
57        ) -> Retained<Self>;
58
59        #[unsafe(method(init))]
60        #[unsafe(method_family = init)]
61        pub fn init(this: Allocated<Self>) -> Retained<Self>;
62
63        /// # Safety
64        ///
65        /// `coder` possibly has further requirements.
66        #[unsafe(method(initWithCoder:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithCoder(
69            this: Allocated<Self>,
70            coder: &NSCoder,
71        ) -> Option<Retained<Self>>;
72    );
73}
74
75/// Methods declared on superclass `NSObject`.
76#[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
77impl UIScreenEdgePanGestureRecognizer {
78    extern_methods!(
79        #[unsafe(method(new))]
80        #[unsafe(method_family = new)]
81        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
82    );
83}