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")]
21extern_conformance!(
22    unsafe impl NSCoding for NSMagnificationGestureRecognizer {}
23);
24
25#[cfg(feature = "NSGestureRecognizer")]
26extern_conformance!(
27    unsafe impl NSObjectProtocol for NSMagnificationGestureRecognizer {}
28);
29
30#[cfg(feature = "NSGestureRecognizer")]
31impl NSMagnificationGestureRecognizer {
32    extern_methods!(
33        #[cfg(feature = "objc2-core-foundation")]
34        #[unsafe(method(magnification))]
35        #[unsafe(method_family = none)]
36        pub fn magnification(&self) -> CGFloat;
37
38        #[cfg(feature = "objc2-core-foundation")]
39        /// Setter for [`magnification`][Self::magnification].
40        #[unsafe(method(setMagnification:))]
41        #[unsafe(method_family = none)]
42        pub fn setMagnification(&self, magnification: CGFloat);
43    );
44}
45
46/// Methods declared on superclass `NSGestureRecognizer`.
47#[cfg(feature = "NSGestureRecognizer")]
48impl NSMagnificationGestureRecognizer {
49    extern_methods!(
50        /// # Safety
51        ///
52        /// - `target` should be of the correct type.
53        /// - `action` must be a valid selector.
54        #[unsafe(method(initWithTarget:action:))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn initWithTarget_action(
57            this: Allocated<Self>,
58            target: Option<&AnyObject>,
59            action: Option<Sel>,
60        ) -> Retained<Self>;
61
62        /// # Safety
63        ///
64        /// `coder` possibly has further requirements.
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/// Methods declared on superclass `NSObject`.
75#[cfg(feature = "NSGestureRecognizer")]
76impl NSMagnificationGestureRecognizer {
77    extern_methods!(
78        #[unsafe(method(init))]
79        #[unsafe(method_family = init)]
80        pub fn init(this: Allocated<Self>) -> Retained<Self>;
81
82        #[unsafe(method(new))]
83        #[unsafe(method_family = new)]
84        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
85    );
86}