objc2_app_kit/generated/
NSRotationGestureRecognizer.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(NSGestureRecognizer, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "NSGestureRecognizer")]
17 pub struct NSRotationGestureRecognizer;
18);
19
20#[cfg(feature = "NSGestureRecognizer")]
21unsafe impl NSCoding for NSRotationGestureRecognizer {}
22
23#[cfg(feature = "NSGestureRecognizer")]
24unsafe impl NSObjectProtocol for NSRotationGestureRecognizer {}
25
26#[cfg(feature = "NSGestureRecognizer")]
27impl NSRotationGestureRecognizer {
28 extern_methods!(
29 #[cfg(feature = "objc2-core-foundation")]
30 #[unsafe(method(rotation))]
31 #[unsafe(method_family = none)]
32 pub unsafe 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(rotationInDegrees))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn rotationInDegrees(&self) -> CGFloat;
44
45 #[cfg(feature = "objc2-core-foundation")]
46 #[unsafe(method(setRotationInDegrees:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn setRotationInDegrees(&self, rotation_in_degrees: CGFloat);
50 );
51}
52
53#[cfg(feature = "NSGestureRecognizer")]
55impl NSRotationGestureRecognizer {
56 extern_methods!(
57 #[unsafe(method(initWithTarget:action:))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn initWithTarget_action(
60 this: Allocated<Self>,
61 target: Option<&AnyObject>,
62 action: Option<Sel>,
63 ) -> Retained<Self>;
64
65 #[unsafe(method(initWithCoder:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initWithCoder(
68 this: Allocated<Self>,
69 coder: &NSCoder,
70 ) -> Option<Retained<Self>>;
71 );
72}
73
74#[cfg(feature = "NSGestureRecognizer")]
76impl NSRotationGestureRecognizer {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
85 );
86}