objc2_app_kit/generated/
NSRotationGestureRecognizer.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::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrotationgesturerecognizer?language=objc)
14    #[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 unsafe fn rotation(&self) -> CGFloat;
37
38        #[cfg(feature = "objc2-core-foundation")]
39        /// Setter for [`rotation`][Self::rotation].
40        #[unsafe(method(setRotation:))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn setRotation(&self, rotation: CGFloat);
43
44        #[cfg(feature = "objc2-core-foundation")]
45        #[unsafe(method(rotationInDegrees))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn rotationInDegrees(&self) -> CGFloat;
48
49        #[cfg(feature = "objc2-core-foundation")]
50        /// Setter for [`rotationInDegrees`][Self::rotationInDegrees].
51        #[unsafe(method(setRotationInDegrees:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setRotationInDegrees(&self, rotation_in_degrees: CGFloat);
54    );
55}
56
57/// Methods declared on superclass `NSGestureRecognizer`.
58#[cfg(feature = "NSGestureRecognizer")]
59impl NSRotationGestureRecognizer {
60    extern_methods!(
61        #[unsafe(method(initWithTarget:action:))]
62        #[unsafe(method_family = init)]
63        pub unsafe fn initWithTarget_action(
64            this: Allocated<Self>,
65            target: Option<&AnyObject>,
66            action: Option<Sel>,
67        ) -> Retained<Self>;
68
69        #[unsafe(method(initWithCoder:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithCoder(
72            this: Allocated<Self>,
73            coder: &NSCoder,
74        ) -> Option<Retained<Self>>;
75    );
76}
77
78/// Methods declared on superclass `NSObject`.
79#[cfg(feature = "NSGestureRecognizer")]
80impl NSRotationGestureRecognizer {
81    extern_methods!(
82        #[unsafe(method(init))]
83        #[unsafe(method_family = init)]
84        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85
86        #[unsafe(method(new))]
87        #[unsafe(method_family = new)]
88        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
89    );
90}