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 unsafe 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 unsafe fn setMagnification(&self, magnification: CGFloat);
43    );
44}
45
46/// Methods declared on superclass `NSGestureRecognizer`.
47#[cfg(feature = "NSGestureRecognizer")]
48impl NSMagnificationGestureRecognizer {
49    extern_methods!(
50        #[unsafe(method(initWithTarget:action:))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn initWithTarget_action(
53            this: Allocated<Self>,
54            target: Option<&AnyObject>,
55            action: Option<Sel>,
56        ) -> Retained<Self>;
57
58        #[unsafe(method(initWithCoder:))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn initWithCoder(
61            this: Allocated<Self>,
62            coder: &NSCoder,
63        ) -> Option<Retained<Self>>;
64    );
65}
66
67/// Methods declared on superclass `NSObject`.
68#[cfg(feature = "NSGestureRecognizer")]
69impl NSMagnificationGestureRecognizer {
70    extern_methods!(
71        #[unsafe(method(init))]
72        #[unsafe(method_family = init)]
73        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
74
75        #[unsafe(method(new))]
76        #[unsafe(method_family = new)]
77        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
78    );
79}