objc2_map_kit/generated/
MKMapCameraBoundary.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmapcameraboundary?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct MKMapCameraBoundary;
14);
15
16extern_conformance!(
17    unsafe impl NSCoding for MKMapCameraBoundary {}
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for MKMapCameraBoundary {}
22);
23
24unsafe impl CopyingHelper for MKMapCameraBoundary {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for MKMapCameraBoundary {}
30);
31
32extern_conformance!(
33    unsafe impl NSSecureCoding for MKMapCameraBoundary {}
34);
35
36impl MKMapCameraBoundary {
37    extern_methods!(
38        #[cfg(feature = "MKGeometry")]
39        #[unsafe(method(initWithMapRect:))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn initWithMapRect(
42            this: Allocated<Self>,
43            map_rect: MKMapRect,
44        ) -> Option<Retained<Self>>;
45
46        #[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
47        #[unsafe(method(initWithCoordinateRegion:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithCoordinateRegion(
50            this: Allocated<Self>,
51            region: MKCoordinateRegion,
52        ) -> Option<Retained<Self>>;
53
54        /// # Safety
55        ///
56        /// `coder` possibly has further requirements.
57        #[unsafe(method(initWithCoder:))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn initWithCoder(
60            this: Allocated<Self>,
61            coder: &NSCoder,
62        ) -> Option<Retained<Self>>;
63
64        #[cfg(feature = "MKGeometry")]
65        #[unsafe(method(mapRect))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn mapRect(&self) -> MKMapRect;
68
69        #[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
70        #[unsafe(method(region))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn region(&self) -> MKCoordinateRegion;
73    );
74}
75
76/// Methods declared on superclass `NSObject`.
77impl MKMapCameraBoundary {
78    extern_methods!(
79        #[unsafe(method(init))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86    );
87}