objc2_map_kit/generated/
MKCompassButton.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/mkcompassbutton?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 MKCompassButton;
20);
21
22#[cfg(feature = "objc2-app-kit")]
23#[cfg(target_os = "macos")]
24extern_conformance!(
25    unsafe impl NSAccessibility for MKCompassButton {}
26);
27
28#[cfg(feature = "objc2-app-kit")]
29#[cfg(target_os = "macos")]
30extern_conformance!(
31    unsafe impl NSAccessibilityElementProtocol for MKCompassButton {}
32);
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36extern_conformance!(
37    unsafe impl NSAnimatablePropertyContainer for MKCompassButton {}
38);
39
40#[cfg(feature = "objc2-app-kit")]
41#[cfg(target_os = "macos")]
42extern_conformance!(
43    unsafe impl NSAppearanceCustomization for MKCompassButton {}
44);
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48extern_conformance!(
49    unsafe impl NSCoding for MKCompassButton {}
50);
51
52#[cfg(feature = "objc2-app-kit")]
53#[cfg(target_os = "macos")]
54extern_conformance!(
55    unsafe impl NSDraggingDestination for MKCompassButton {}
56);
57
58#[cfg(feature = "objc2-app-kit")]
59#[cfg(target_os = "macos")]
60extern_conformance!(
61    unsafe impl NSObjectProtocol for MKCompassButton {}
62);
63
64#[cfg(feature = "objc2-app-kit")]
65#[cfg(target_os = "macos")]
66extern_conformance!(
67    unsafe impl NSUserInterfaceItemIdentification for MKCompassButton {}
68);
69
70#[cfg(feature = "objc2-app-kit")]
71#[cfg(target_os = "macos")]
72impl MKCompassButton {
73    extern_methods!(
74        #[cfg(feature = "MKMapView")]
75        #[unsafe(method(compassButtonWithMapView:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn compassButtonWithMapView(
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        /// This is a [weak property][objc2::topics::weak_property].
89        /// Setter for [`mapView`][Self::mapView].
90        #[unsafe(method(setMapView:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setMapView(&self, map_view: Option<&MKMapView>);
93
94        #[cfg(feature = "MKTypes")]
95        #[unsafe(method(compassVisibility))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn compassVisibility(&self) -> MKFeatureVisibility;
98
99        #[cfg(feature = "MKTypes")]
100        /// Setter for [`compassVisibility`][Self::compassVisibility].
101        #[unsafe(method(setCompassVisibility:))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn setCompassVisibility(&self, compass_visibility: MKFeatureVisibility);
104    );
105}
106
107/// Methods declared on superclass `NSView`.
108#[cfg(feature = "objc2-app-kit")]
109#[cfg(target_os = "macos")]
110impl MKCompassButton {
111    extern_methods!(
112        #[unsafe(method(initWithFrame:))]
113        #[unsafe(method_family = init)]
114        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
115
116        #[unsafe(method(initWithCoder:))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn initWithCoder(
119            this: Allocated<Self>,
120            coder: &NSCoder,
121        ) -> Option<Retained<Self>>;
122    );
123}
124
125/// Methods declared on superclass `NSResponder`.
126#[cfg(feature = "objc2-app-kit")]
127#[cfg(target_os = "macos")]
128impl MKCompassButton {
129    extern_methods!(
130        #[unsafe(method(init))]
131        #[unsafe(method_family = init)]
132        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
133    );
134}
135
136/// Methods declared on superclass `NSObject`.
137#[cfg(feature = "objc2-app-kit")]
138#[cfg(target_os = "macos")]
139impl MKCompassButton {
140    extern_methods!(
141        #[unsafe(method(new))]
142        #[unsafe(method_family = new)]
143        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
144    );
145}