objc2_ui_kit/generated/
UIRotationGestureRecognizer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(UIGestureRecognizer, NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "UIGestureRecognizer")]
18 pub struct UIRotationGestureRecognizer;
19);
20
21#[cfg(feature = "UIGestureRecognizer")]
22extern_conformance!(
23 unsafe impl NSObjectProtocol for UIRotationGestureRecognizer {}
24);
25
26#[cfg(feature = "UIGestureRecognizer")]
27impl UIRotationGestureRecognizer {
28 extern_methods!(
29 #[cfg(feature = "objc2-core-foundation")]
30 #[unsafe(method(rotation))]
31 #[unsafe(method_family = none)]
32 pub fn rotation(&self) -> CGFloat;
33
34 #[cfg(feature = "objc2-core-foundation")]
35 #[unsafe(method(setRotation:))]
37 #[unsafe(method_family = none)]
38 pub fn setRotation(&self, rotation: CGFloat);
39
40 #[cfg(feature = "objc2-core-foundation")]
41 #[unsafe(method(velocity))]
42 #[unsafe(method_family = none)]
43 pub fn velocity(&self) -> CGFloat;
44 );
45}
46
47#[cfg(feature = "UIGestureRecognizer")]
49impl UIRotationGestureRecognizer {
50 extern_methods!(
51 #[unsafe(method(initWithTarget:action:))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn initWithTarget_action(
58 this: Allocated<Self>,
59 target: Option<&AnyObject>,
60 action: Option<Sel>,
61 ) -> Retained<Self>;
62
63 #[unsafe(method(init))]
64 #[unsafe(method_family = init)]
65 pub fn init(this: Allocated<Self>) -> Retained<Self>;
66
67 #[unsafe(method(initWithCoder:))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn initWithCoder(
73 this: Allocated<Self>,
74 coder: &NSCoder,
75 ) -> Option<Retained<Self>>;
76 );
77}
78
79#[cfg(feature = "UIGestureRecognizer")]
81impl UIRotationGestureRecognizer {
82 extern_methods!(
83 #[unsafe(method(new))]
84 #[unsafe(method_family = new)]
85 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
86 );
87}