objc2_app_kit/generated/
NSMagnificationGestureRecognizer.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 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 #[unsafe(method(setMagnification:))]
41 #[unsafe(method_family = none)]
42 pub fn setMagnification(&self, magnification: CGFloat);
43 );
44}
45
46#[cfg(feature = "NSGestureRecognizer")]
48impl NSMagnificationGestureRecognizer {
49 extern_methods!(
50 #[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 #[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#[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}