objc2_map_kit/generated/
MKZoomControl.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-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkzoomcontrol?language=objc)
15    #[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")]
24extern_conformance!(
25    unsafe impl NSAccessibility for MKZoomControl {}
26);
27
28#[cfg(feature = "objc2-app-kit")]
29#[cfg(target_os = "macos")]
30extern_conformance!(
31    unsafe impl NSAccessibilityElementProtocol for MKZoomControl {}
32);
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36extern_conformance!(
37    unsafe impl NSAnimatablePropertyContainer for MKZoomControl {}
38);
39
40#[cfg(feature = "objc2-app-kit")]
41#[cfg(target_os = "macos")]
42extern_conformance!(
43    unsafe impl NSAppearanceCustomization for MKZoomControl {}
44);
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48extern_conformance!(
49    unsafe impl NSCoding for MKZoomControl {}
50);
51
52#[cfg(feature = "objc2-app-kit")]
53#[cfg(target_os = "macos")]
54extern_conformance!(
55    unsafe impl NSDraggingDestination for MKZoomControl {}
56);
57
58#[cfg(feature = "objc2-app-kit")]
59#[cfg(target_os = "macos")]
60extern_conformance!(
61    unsafe impl NSObjectProtocol for MKZoomControl {}
62);
63
64#[cfg(feature = "objc2-app-kit")]
65#[cfg(target_os = "macos")]
66extern_conformance!(
67    unsafe impl NSUserInterfaceItemIdentification for MKZoomControl {}
68);
69
70#[cfg(feature = "objc2-app-kit")]
71#[cfg(target_os = "macos")]
72impl MKZoomControl {
73    extern_methods!(
74        #[cfg(feature = "MKMapView")]
75        #[unsafe(method(zoomControlWithMapView:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn zoomControlWithMapView(
78            map_view: Option<&MKMapView>,
79            mtm: MainThreadMarker,
80        ) -> Retained<Self>;
81
82        #[cfg(feature = "MKMapView")]
83        #[unsafe(method(mapView))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn mapView(&self) -> Option<Retained<MKMapView>>;
86
87        #[cfg(feature = "MKMapView")]
88        /// Setter for [`mapView`][Self::mapView].
89        ///
90        /// This is a [weak property][objc2::topics::weak_property].
91        #[unsafe(method(setMapView:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setMapView(&self, map_view: Option<&MKMapView>);
94    );
95}
96
97/// Methods declared on superclass `NSView`.
98#[cfg(feature = "objc2-app-kit")]
99#[cfg(target_os = "macos")]
100impl MKZoomControl {
101    extern_methods!(
102        #[unsafe(method(initWithFrame:))]
103        #[unsafe(method_family = init)]
104        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
105
106        /// # Safety
107        ///
108        /// `coder` possibly has further requirements.
109        #[unsafe(method(initWithCoder:))]
110        #[unsafe(method_family = init)]
111        pub unsafe fn initWithCoder(
112            this: Allocated<Self>,
113            coder: &NSCoder,
114        ) -> Option<Retained<Self>>;
115    );
116}
117
118/// Methods declared on superclass `NSResponder`.
119#[cfg(feature = "objc2-app-kit")]
120#[cfg(target_os = "macos")]
121impl MKZoomControl {
122    extern_methods!(
123        #[unsafe(method(init))]
124        #[unsafe(method_family = init)]
125        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
126    );
127}
128
129/// Methods declared on superclass `NSObject`.
130#[cfg(feature = "objc2-app-kit")]
131#[cfg(target_os = "macos")]
132impl MKZoomControl {
133    extern_methods!(
134        #[unsafe(method(new))]
135        #[unsafe(method_family = new)]
136        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
137    );
138}