objc2_map_kit/generated/
MKCompassButton.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 MKCompassButton;
20);
21
22#[cfg(feature = "objc2-app-kit")]
23#[cfg(target_os = "macos")]
24unsafe impl NSAccessibility for MKCompassButton {}
25
26#[cfg(feature = "objc2-app-kit")]
27#[cfg(target_os = "macos")]
28unsafe impl NSAccessibilityElementProtocol for MKCompassButton {}
29
30#[cfg(feature = "objc2-app-kit")]
31#[cfg(target_os = "macos")]
32unsafe impl NSAnimatablePropertyContainer for MKCompassButton {}
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36unsafe impl NSAppearanceCustomization for MKCompassButton {}
37
38#[cfg(feature = "objc2-app-kit")]
39#[cfg(target_os = "macos")]
40unsafe impl NSCoding for MKCompassButton {}
41
42#[cfg(feature = "objc2-app-kit")]
43#[cfg(target_os = "macos")]
44unsafe impl NSDraggingDestination for MKCompassButton {}
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48unsafe impl NSObjectProtocol for MKCompassButton {}
49
50#[cfg(feature = "objc2-app-kit")]
51#[cfg(target_os = "macos")]
52unsafe impl NSUserInterfaceItemIdentification for MKCompassButton {}
53
54#[cfg(feature = "objc2-app-kit")]
55#[cfg(target_os = "macos")]
56impl MKCompassButton {
57 extern_methods!(
58 #[cfg(feature = "MKMapView")]
59 #[unsafe(method(compassButtonWithMapView:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn compassButtonWithMapView(
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 #[cfg(feature = "MKTypes")]
79 #[unsafe(method(compassVisibility))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn compassVisibility(&self) -> MKFeatureVisibility;
82
83 #[cfg(feature = "MKTypes")]
84 #[unsafe(method(setCompassVisibility:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn setCompassVisibility(&self, compass_visibility: MKFeatureVisibility);
88 );
89}
90
91#[cfg(feature = "objc2-app-kit")]
93#[cfg(target_os = "macos")]
94impl MKCompassButton {
95 extern_methods!(
96 #[unsafe(method(initWithFrame:))]
97 #[unsafe(method_family = init)]
98 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
99
100 #[unsafe(method(initWithCoder:))]
101 #[unsafe(method_family = init)]
102 pub unsafe fn initWithCoder(
103 this: Allocated<Self>,
104 coder: &NSCoder,
105 ) -> Option<Retained<Self>>;
106 );
107}
108
109#[cfg(feature = "objc2-app-kit")]
111#[cfg(target_os = "macos")]
112impl MKCompassButton {
113 extern_methods!(
114 #[unsafe(method(init))]
115 #[unsafe(method_family = init)]
116 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
117 );
118}
119
120#[cfg(feature = "objc2-app-kit")]
122#[cfg(target_os = "macos")]
123impl MKCompassButton {
124 extern_methods!(
125 #[unsafe(method(new))]
126 #[unsafe(method_family = new)]
127 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
128 );
129}