objc2_map_kit/generated/
MKMultiPoint.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-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-location")]
9use objc2_core_location::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmultipoint?language=objc)
16    #[unsafe(super(MKShape, NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    #[cfg(feature = "MKShape")]
19    pub struct MKMultiPoint;
20);
21
22#[cfg(all(feature = "MKAnnotation", feature = "MKShape"))]
23extern_conformance!(
24    unsafe impl MKAnnotation for MKMultiPoint {}
25);
26
27#[cfg(feature = "MKShape")]
28extern_conformance!(
29    unsafe impl NSObjectProtocol for MKMultiPoint {}
30);
31
32#[cfg(feature = "MKShape")]
33impl MKMultiPoint {
34    extern_methods!(
35        #[cfg(feature = "MKGeometry")]
36        #[unsafe(method(points))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn points(&self) -> NonNull<MKMapPoint>;
39
40        #[unsafe(method(pointCount))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn pointCount(&self) -> NSUInteger;
43
44        #[cfg(feature = "objc2-core-location")]
45        /// # Safety
46        ///
47        /// `coords` must be a valid pointer.
48        #[unsafe(method(getCoordinates:range:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn getCoordinates_range(
51            &self,
52            coords: NonNull<CLLocationCoordinate2D>,
53            range: NSRange,
54        );
55
56        #[cfg(feature = "objc2-core-foundation")]
57        #[unsafe(method(locationAtPointIndex:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn locationAtPointIndex(&self, index: NSUInteger) -> CGFloat;
60
61        #[unsafe(method(locationsAtPointIndexes:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn locationsAtPointIndexes(
64            &self,
65            indexes: &NSIndexSet,
66        ) -> Retained<NSArray<NSNumber>>;
67    );
68}
69
70/// Methods declared on superclass `NSObject`.
71#[cfg(feature = "MKShape")]
72impl MKMultiPoint {
73    extern_methods!(
74        #[unsafe(method(init))]
75        #[unsafe(method_family = init)]
76        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
77
78        #[unsafe(method(new))]
79        #[unsafe(method_family = new)]
80        pub unsafe fn new() -> Retained<Self>;
81    );
82}