objc2_app_kit/generated/
NSMagnificationGestureRecognizer.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/nsmagnificationgesturerecognizer?language=objc)
14    #[unsafe(super(NSGestureRecognizer, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "NSGestureRecognizer")]
17    pub struct NSMagnificationGestureRecognizer;
18);
19
20#[cfg(feature = "NSGestureRecognizer")]
21unsafe impl NSCoding for NSMagnificationGestureRecognizer {}
22
23#[cfg(feature = "NSGestureRecognizer")]
24unsafe impl NSObjectProtocol for NSMagnificationGestureRecognizer {}
25
26#[cfg(feature = "NSGestureRecognizer")]
27impl NSMagnificationGestureRecognizer {
28    extern_methods!(
29        #[cfg(feature = "objc2-core-foundation")]
30        #[unsafe(method(magnification))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn magnification(&self) -> CGFloat;
33
34        #[cfg(feature = "objc2-core-foundation")]
35        /// Setter for [`magnification`][Self::magnification].
36        #[unsafe(method(setMagnification:))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn setMagnification(&self, magnification: CGFloat);
39    );
40}
41
42/// Methods declared on superclass `NSGestureRecognizer`.
43#[cfg(feature = "NSGestureRecognizer")]
44impl NSMagnificationGestureRecognizer {
45    extern_methods!(
46        #[unsafe(method(initWithTarget:action:))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn initWithTarget_action(
49            this: Allocated<Self>,
50            target: Option<&AnyObject>,
51            action: Option<Sel>,
52        ) -> Retained<Self>;
53
54        #[unsafe(method(initWithCoder:))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn initWithCoder(
57            this: Allocated<Self>,
58            coder: &NSCoder,
59        ) -> Option<Retained<Self>>;
60    );
61}
62
63/// Methods declared on superclass `NSObject`.
64#[cfg(feature = "NSGestureRecognizer")]
65impl NSMagnificationGestureRecognizer {
66    extern_methods!(
67        #[unsafe(method(init))]
68        #[unsafe(method_family = init)]
69        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
70
71        #[unsafe(method(new))]
72        #[unsafe(method_family = new)]
73        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
74    );
75}