objc2_ui_kit/generated/
UIPinchGestureRecognizer.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(UIGestureRecognizer, NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "UIGestureRecognizer")]
18 pub struct UIPinchGestureRecognizer;
19);
20
21#[cfg(feature = "UIGestureRecognizer")]
22unsafe impl NSObjectProtocol for UIPinchGestureRecognizer {}
23
24#[cfg(feature = "UIGestureRecognizer")]
25impl UIPinchGestureRecognizer {
26 extern_methods!(
27 #[cfg(feature = "objc2-core-foundation")]
28 #[unsafe(method(scale))]
29 #[unsafe(method_family = none)]
30 pub fn scale(&self) -> CGFloat;
31
32 #[cfg(feature = "objc2-core-foundation")]
33 #[unsafe(method(setScale:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn setScale(&self, scale: CGFloat);
37
38 #[cfg(feature = "objc2-core-foundation")]
39 #[unsafe(method(velocity))]
40 #[unsafe(method_family = none)]
41 pub fn velocity(&self) -> CGFloat;
42 );
43}
44
45#[cfg(feature = "UIGestureRecognizer")]
47impl UIPinchGestureRecognizer {
48 extern_methods!(
49 #[unsafe(method(initWithTarget:action:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initWithTarget_action(
52 this: Allocated<Self>,
53 target: Option<&AnyObject>,
54 action: Option<Sel>,
55 ) -> Retained<Self>;
56
57 #[unsafe(method(init))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61 #[unsafe(method(initWithCoder:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithCoder(
64 this: Allocated<Self>,
65 coder: &NSCoder,
66 ) -> Option<Retained<Self>>;
67 );
68}
69
70#[cfg(feature = "UIGestureRecognizer")]
72impl UIPinchGestureRecognizer {
73 extern_methods!(
74 #[unsafe(method(new))]
75 #[unsafe(method_family = new)]
76 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
77 );
78}