objc2_map_kit/generated/
MKStandardMapConfiguration.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct MKStandardMapEmphasisStyle(pub NSInteger);
15impl MKStandardMapEmphasisStyle {
16 #[doc(alias = "MKStandardMapEmphasisStyleDefault")]
17 pub const Default: Self = Self(0);
18 #[doc(alias = "MKStandardMapEmphasisStyleMuted")]
19 pub const Muted: Self = Self(1);
20}
21
22unsafe impl Encode for MKStandardMapEmphasisStyle {
23 const ENCODING: Encoding = NSInteger::ENCODING;
24}
25
26unsafe impl RefEncode for MKStandardMapEmphasisStyle {
27 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
28}
29
30extern_class!(
31 #[unsafe(super(MKMapConfiguration, NSObject))]
33 #[derive(Debug, PartialEq, Eq, Hash)]
34 #[cfg(feature = "MKMapConfiguration")]
35 pub struct MKStandardMapConfiguration;
36);
37
38#[cfg(feature = "MKMapConfiguration")]
39unsafe impl NSCoding for MKStandardMapConfiguration {}
40
41#[cfg(feature = "MKMapConfiguration")]
42unsafe impl NSCopying for MKStandardMapConfiguration {}
43
44#[cfg(feature = "MKMapConfiguration")]
45unsafe impl CopyingHelper for MKStandardMapConfiguration {
46 type Result = Self;
47}
48
49#[cfg(feature = "MKMapConfiguration")]
50unsafe impl NSObjectProtocol for MKStandardMapConfiguration {}
51
52#[cfg(feature = "MKMapConfiguration")]
53unsafe impl NSSecureCoding for MKStandardMapConfiguration {}
54
55#[cfg(feature = "MKMapConfiguration")]
56impl MKStandardMapConfiguration {
57 extern_methods!(
58 #[unsafe(method(init))]
59 #[unsafe(method_family = init)]
60 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
61
62 #[unsafe(method(initWithElevationStyle:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initWithElevationStyle(
65 this: Allocated<Self>,
66 elevation_style: MKMapElevationStyle,
67 ) -> Retained<Self>;
68
69 #[unsafe(method(initWithElevationStyle:emphasisStyle:))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn initWithElevationStyle_emphasisStyle(
72 this: Allocated<Self>,
73 elevation_style: MKMapElevationStyle,
74 emphasis_style: MKStandardMapEmphasisStyle,
75 ) -> Retained<Self>;
76
77 #[unsafe(method(initWithEmphasisStyle:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithEmphasisStyle(
80 this: Allocated<Self>,
81 emphasis_style: MKStandardMapEmphasisStyle,
82 ) -> Retained<Self>;
83
84 #[unsafe(method(emphasisStyle))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn emphasisStyle(&self) -> MKStandardMapEmphasisStyle;
87
88 #[unsafe(method(setEmphasisStyle:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn setEmphasisStyle(&self, emphasis_style: MKStandardMapEmphasisStyle);
92
93 #[cfg(feature = "MKPointOfInterestFilter")]
94 #[unsafe(method(pointOfInterestFilter))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
97
98 #[cfg(feature = "MKPointOfInterestFilter")]
99 #[unsafe(method(setPointOfInterestFilter:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setPointOfInterestFilter(
103 &self,
104 point_of_interest_filter: Option<&MKPointOfInterestFilter>,
105 );
106
107 #[unsafe(method(showsTraffic))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn showsTraffic(&self) -> bool;
110
111 #[unsafe(method(setShowsTraffic:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn setShowsTraffic(&self, shows_traffic: bool);
115 );
116}
117
118#[cfg(feature = "MKMapConfiguration")]
120impl MKStandardMapConfiguration {
121 extern_methods!(
122 #[unsafe(method(new))]
123 #[unsafe(method_family = new)]
124 pub unsafe fn new() -> Retained<Self>;
125 );
126}