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")]
21extern_conformance!(
22 unsafe impl NSCoding for NSRotationGestureRecognizer {}
23);
24
25#[cfg(feature = "NSGestureRecognizer")]
26extern_conformance!(
27 unsafe impl NSObjectProtocol for NSRotationGestureRecognizer {}
28);
29
30#[cfg(feature = "NSGestureRecognizer")]
31impl NSRotationGestureRecognizer {
32 extern_methods!(
33 #[cfg(feature = "objc2-core-foundation")]
34 #[unsafe(method(rotation))]
35 #[unsafe(method_family = none)]
36 pub fn rotation(&self) -> CGFloat;
37
38 #[cfg(feature = "objc2-core-foundation")]
39 #[unsafe(method(setRotation:))]
41 #[unsafe(method_family = none)]
42 pub fn setRotation(&self, rotation: CGFloat);
43
44 #[cfg(feature = "objc2-core-foundation")]
45 #[unsafe(method(rotationInDegrees))]
46 #[unsafe(method_family = none)]
47 pub fn rotationInDegrees(&self) -> CGFloat;
48
49 #[cfg(feature = "objc2-core-foundation")]
50 #[unsafe(method(setRotationInDegrees:))]
52 #[unsafe(method_family = none)]
53 pub fn setRotationInDegrees(&self, rotation_in_degrees: CGFloat);
54 );
55}
56
57#[cfg(feature = "NSGestureRecognizer")]
59impl NSRotationGestureRecognizer {
60 extern_methods!(
61 #[unsafe(method(initWithTarget:action:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initWithTarget_action(
68 this: Allocated<Self>,
69 target: Option<&AnyObject>,
70 action: Option<Sel>,
71 ) -> Retained<Self>;
72
73 #[unsafe(method(initWithCoder:))]
77 #[unsafe(method_family = init)]
78 pub unsafe fn initWithCoder(
79 this: Allocated<Self>,
80 coder: &NSCoder,
81 ) -> Option<Retained<Self>>;
82 );
83}
84
85#[cfg(feature = "NSGestureRecognizer")]
87impl NSRotationGestureRecognizer {
88 extern_methods!(
89 #[unsafe(method(init))]
90 #[unsafe(method_family = init)]
91 pub fn init(this: Allocated<Self>) -> Retained<Self>;
92
93 #[unsafe(method(new))]
94 #[unsafe(method_family = new)]
95 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
96 );
97}