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 unsafe 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:))]
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 unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63 #[unsafe(method(initWithCoder:))]
64 #[unsafe(method_family = init)]
65 pub unsafe fn initWithCoder(
66 this: Allocated<Self>,
67 coder: &NSCoder,
68 ) -> Option<Retained<Self>>;
69 );
70}
71
72#[cfg(feature = "UIGestureRecognizer")]
74impl UIRotationGestureRecognizer {
75 extern_methods!(
76 #[unsafe(method(new))]
77 #[unsafe(method_family = new)]
78 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
79 );
80}