objc2_map_kit/generated/
MKStandardMapConfiguration.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkstandardmapemphasisstyle?language=objc)
11// NS_ENUM
12#[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    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkstandardmapconfiguration?language=objc)
32    #[unsafe(super(MKMapConfiguration, NSObject))]
33    #[derive(Debug, PartialEq, Eq, Hash)]
34    #[cfg(feature = "MKMapConfiguration")]
35    pub struct MKStandardMapConfiguration;
36);
37
38#[cfg(feature = "MKMapConfiguration")]
39extern_conformance!(
40    unsafe impl NSCoding for MKStandardMapConfiguration {}
41);
42
43#[cfg(feature = "MKMapConfiguration")]
44extern_conformance!(
45    unsafe impl NSCopying for MKStandardMapConfiguration {}
46);
47
48#[cfg(feature = "MKMapConfiguration")]
49unsafe impl CopyingHelper for MKStandardMapConfiguration {
50    type Result = Self;
51}
52
53#[cfg(feature = "MKMapConfiguration")]
54extern_conformance!(
55    unsafe impl NSObjectProtocol for MKStandardMapConfiguration {}
56);
57
58#[cfg(feature = "MKMapConfiguration")]
59extern_conformance!(
60    unsafe impl NSSecureCoding for MKStandardMapConfiguration {}
61);
62
63#[cfg(feature = "MKMapConfiguration")]
64impl MKStandardMapConfiguration {
65    extern_methods!(
66        #[unsafe(method(init))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70        #[unsafe(method(initWithElevationStyle:))]
71        #[unsafe(method_family = init)]
72        pub unsafe fn initWithElevationStyle(
73            this: Allocated<Self>,
74            elevation_style: MKMapElevationStyle,
75        ) -> Retained<Self>;
76
77        #[unsafe(method(initWithElevationStyle:emphasisStyle:))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn initWithElevationStyle_emphasisStyle(
80            this: Allocated<Self>,
81            elevation_style: MKMapElevationStyle,
82            emphasis_style: MKStandardMapEmphasisStyle,
83        ) -> Retained<Self>;
84
85        #[unsafe(method(initWithEmphasisStyle:))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn initWithEmphasisStyle(
88            this: Allocated<Self>,
89            emphasis_style: MKStandardMapEmphasisStyle,
90        ) -> Retained<Self>;
91
92        #[unsafe(method(emphasisStyle))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn emphasisStyle(&self) -> MKStandardMapEmphasisStyle;
95
96        /// Setter for [`emphasisStyle`][Self::emphasisStyle].
97        #[unsafe(method(setEmphasisStyle:))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn setEmphasisStyle(&self, emphasis_style: MKStandardMapEmphasisStyle);
100
101        #[cfg(feature = "MKPointOfInterestFilter")]
102        #[unsafe(method(pointOfInterestFilter))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
105
106        #[cfg(feature = "MKPointOfInterestFilter")]
107        /// Setter for [`pointOfInterestFilter`][Self::pointOfInterestFilter].
108        #[unsafe(method(setPointOfInterestFilter:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setPointOfInterestFilter(
111            &self,
112            point_of_interest_filter: Option<&MKPointOfInterestFilter>,
113        );
114
115        #[unsafe(method(showsTraffic))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn showsTraffic(&self) -> bool;
118
119        /// Setter for [`showsTraffic`][Self::showsTraffic].
120        #[unsafe(method(setShowsTraffic:))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn setShowsTraffic(&self, shows_traffic: bool);
123    );
124}
125
126/// Methods declared on superclass `MKMapConfiguration`.
127#[cfg(feature = "MKMapConfiguration")]
128impl MKStandardMapConfiguration {
129    extern_methods!(
130        #[unsafe(method(new))]
131        #[unsafe(method_family = new)]
132        pub unsafe fn new() -> Retained<Self>;
133    );
134}