objc2_cloud_kit/generated/
CKLocationSortDescriptor.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::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/cklocationsortdescriptor?language=objc)
13    #[unsafe(super(NSSortDescriptor, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct CKLocationSortDescriptor;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for CKLocationSortDescriptor {}
20);
21
22extern_conformance!(
23    unsafe impl NSCopying for CKLocationSortDescriptor {}
24);
25
26unsafe impl CopyingHelper for CKLocationSortDescriptor {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for CKLocationSortDescriptor {}
32);
33
34extern_conformance!(
35    unsafe impl NSSecureCoding for CKLocationSortDescriptor {}
36);
37
38impl CKLocationSortDescriptor {
39    extern_methods!(
40        #[unsafe(method(init))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
43
44        #[unsafe(method(new))]
45        #[unsafe(method_family = new)]
46        pub unsafe fn new() -> Retained<Self>;
47
48        #[cfg(feature = "objc2-core-location")]
49        #[unsafe(method(initWithKey:relativeLocation:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithKey_relativeLocation(
52            this: Allocated<Self>,
53            key: &NSString,
54            relative_location: &CLLocation,
55        ) -> Retained<Self>;
56
57        /// # Safety
58        ///
59        /// `a_decoder` possibly has further requirements.
60        #[unsafe(method(initWithCoder:))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
63
64        #[cfg(feature = "objc2-core-location")]
65        #[unsafe(method(relativeLocation))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn relativeLocation(&self) -> Retained<CLLocation>;
68    );
69}
70
71/// Methods declared on superclass `NSSortDescriptor`.
72impl CKLocationSortDescriptor {
73    extern_methods!(
74        #[unsafe(method(sortDescriptorWithKey:ascending:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn sortDescriptorWithKey_ascending(
77            key: Option<&NSString>,
78            ascending: bool,
79        ) -> Retained<Self>;
80
81        /// # Safety
82        ///
83        /// `selector` must be a valid selector.
84        #[unsafe(method(sortDescriptorWithKey:ascending:selector:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn sortDescriptorWithKey_ascending_selector(
87            key: Option<&NSString>,
88            ascending: bool,
89            selector: Option<Sel>,
90        ) -> Retained<Self>;
91
92        #[unsafe(method(initWithKey:ascending:))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn initWithKey_ascending(
95            this: Allocated<Self>,
96            key: Option<&NSString>,
97            ascending: bool,
98        ) -> Retained<Self>;
99
100        /// # Safety
101        ///
102        /// `selector` must be a valid selector.
103        #[unsafe(method(initWithKey:ascending:selector:))]
104        #[unsafe(method_family = init)]
105        pub unsafe fn initWithKey_ascending_selector(
106            this: Allocated<Self>,
107            key: Option<&NSString>,
108            ascending: bool,
109            selector: Option<Sel>,
110        ) -> Retained<Self>;
111
112        /// # Safety
113        ///
114        /// `cmptr` must be a valid pointer.
115        #[unsafe(method(sortDescriptorWithKey:ascending:comparator:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn sortDescriptorWithKey_ascending_comparator(
118            key: Option<&NSString>,
119            ascending: bool,
120            cmptr: NSComparator,
121        ) -> Retained<Self>;
122
123        /// # Safety
124        ///
125        /// `cmptr` must be a valid pointer.
126        #[unsafe(method(initWithKey:ascending:comparator:))]
127        #[unsafe(method_family = init)]
128        pub unsafe fn initWithKey_ascending_comparator(
129            this: Allocated<Self>,
130            key: Option<&NSString>,
131            ascending: bool,
132            cmptr: NSComparator,
133        ) -> Retained<Self>;
134    );
135}