objc2_cloud_kit/generated/
CKLocationSortDescriptor.rs1use 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 #[unsafe(super(NSSortDescriptor, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct CKLocationSortDescriptor;
16);
17
18unsafe impl NSCoding for CKLocationSortDescriptor {}
19
20unsafe impl NSCopying for CKLocationSortDescriptor {}
21
22unsafe impl CopyingHelper for CKLocationSortDescriptor {
23 type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for CKLocationSortDescriptor {}
27
28unsafe impl NSSecureCoding for CKLocationSortDescriptor {}
29
30impl CKLocationSortDescriptor {
31 extern_methods!(
32 #[unsafe(method(init))]
33 #[unsafe(method_family = init)]
34 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36 #[unsafe(method(new))]
37 #[unsafe(method_family = new)]
38 pub unsafe fn new() -> Retained<Self>;
39
40 #[cfg(feature = "objc2-core-location")]
41 #[unsafe(method(initWithKey:relativeLocation:))]
42 #[unsafe(method_family = init)]
43 pub unsafe fn initWithKey_relativeLocation(
44 this: Allocated<Self>,
45 key: &NSString,
46 relative_location: &CLLocation,
47 ) -> Retained<Self>;
48
49 #[unsafe(method(initWithCoder:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
52
53 #[cfg(feature = "objc2-core-location")]
54 #[unsafe(method(relativeLocation))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn relativeLocation(&self) -> Retained<CLLocation>;
57 );
58}
59
60impl CKLocationSortDescriptor {
62 extern_methods!(
63 #[unsafe(method(sortDescriptorWithKey:ascending:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn sortDescriptorWithKey_ascending(
66 key: Option<&NSString>,
67 ascending: bool,
68 ) -> Retained<Self>;
69
70 #[unsafe(method(sortDescriptorWithKey:ascending:selector:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn sortDescriptorWithKey_ascending_selector(
73 key: Option<&NSString>,
74 ascending: bool,
75 selector: Option<Sel>,
76 ) -> Retained<Self>;
77
78 #[unsafe(method(initWithKey:ascending:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithKey_ascending(
81 this: Allocated<Self>,
82 key: Option<&NSString>,
83 ascending: bool,
84 ) -> Retained<Self>;
85
86 #[unsafe(method(initWithKey:ascending:selector:))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn initWithKey_ascending_selector(
89 this: Allocated<Self>,
90 key: Option<&NSString>,
91 ascending: bool,
92 selector: Option<Sel>,
93 ) -> Retained<Self>;
94
95 #[unsafe(method(sortDescriptorWithKey:ascending:comparator:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn sortDescriptorWithKey_ascending_comparator(
98 key: Option<&NSString>,
99 ascending: bool,
100 cmptr: NSComparator,
101 ) -> Retained<Self>;
102
103 #[unsafe(method(initWithKey:ascending:comparator:))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn initWithKey_ascending_comparator(
106 this: Allocated<Self>,
107 key: Option<&NSString>,
108 ascending: bool,
109 cmptr: NSComparator,
110 ) -> Retained<Self>;
111 );
112}