objc2_map_kit/generated/
MKZoomControl.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSView, NSResponder, NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "objc2-app-kit")]
18 #[cfg(target_os = "macos")]
19 pub struct MKZoomControl;
20);
21
22#[cfg(feature = "objc2-app-kit")]
23#[cfg(target_os = "macos")]
24unsafe impl NSAccessibility for MKZoomControl {}
25
26#[cfg(feature = "objc2-app-kit")]
27#[cfg(target_os = "macos")]
28unsafe impl NSAccessibilityElementProtocol for MKZoomControl {}
29
30#[cfg(feature = "objc2-app-kit")]
31#[cfg(target_os = "macos")]
32unsafe impl NSAnimatablePropertyContainer for MKZoomControl {}
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36unsafe impl NSAppearanceCustomization for MKZoomControl {}
37
38#[cfg(feature = "objc2-app-kit")]
39#[cfg(target_os = "macos")]
40unsafe impl NSCoding for MKZoomControl {}
41
42#[cfg(feature = "objc2-app-kit")]
43#[cfg(target_os = "macos")]
44unsafe impl NSDraggingDestination for MKZoomControl {}
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48unsafe impl NSObjectProtocol for MKZoomControl {}
49
50#[cfg(feature = "objc2-app-kit")]
51#[cfg(target_os = "macos")]
52unsafe impl NSUserInterfaceItemIdentification for MKZoomControl {}
53
54#[cfg(feature = "objc2-app-kit")]
55#[cfg(target_os = "macos")]
56impl MKZoomControl {
57 extern_methods!(
58 #[cfg(feature = "MKMapView")]
59 #[unsafe(method(zoomControlWithMapView:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn zoomControlWithMapView(
62 map_view: Option<&MKMapView>,
63 mtm: MainThreadMarker,
64 ) -> Retained<Self>;
65
66 #[cfg(feature = "MKMapView")]
67 #[unsafe(method(mapView))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn mapView(&self) -> Option<Retained<MKMapView>>;
70
71 #[cfg(feature = "MKMapView")]
72 #[unsafe(method(setMapView:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setMapView(&self, map_view: Option<&MKMapView>);
77 );
78}
79
80#[cfg(feature = "objc2-app-kit")]
82#[cfg(target_os = "macos")]
83impl MKZoomControl {
84 extern_methods!(
85 #[unsafe(method(initWithFrame:))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
88
89 #[unsafe(method(initWithCoder:))]
90 #[unsafe(method_family = init)]
91 pub unsafe fn initWithCoder(
92 this: Allocated<Self>,
93 coder: &NSCoder,
94 ) -> Option<Retained<Self>>;
95 );
96}
97
98#[cfg(feature = "objc2-app-kit")]
100#[cfg(target_os = "macos")]
101impl MKZoomControl {
102 extern_methods!(
103 #[unsafe(method(init))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
106 );
107}
108
109#[cfg(feature = "objc2-app-kit")]
111#[cfg(target_os = "macos")]
112impl MKZoomControl {
113 extern_methods!(
114 #[unsafe(method(new))]
115 #[unsafe(method_family = new)]
116 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
117 );
118}