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
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 #[unsafe(method(initWithCoder:))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
60
61 #[cfg(feature = "objc2-core-location")]
62 #[unsafe(method(relativeLocation))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn relativeLocation(&self) -> Retained<CLLocation>;
65 );
66}
67
68impl CKLocationSortDescriptor {
70 extern_methods!(
71 #[unsafe(method(sortDescriptorWithKey:ascending:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn sortDescriptorWithKey_ascending(
74 key: Option<&NSString>,
75 ascending: bool,
76 ) -> Retained<Self>;
77
78 #[unsafe(method(sortDescriptorWithKey:ascending:selector:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn sortDescriptorWithKey_ascending_selector(
81 key: Option<&NSString>,
82 ascending: bool,
83 selector: Option<Sel>,
84 ) -> Retained<Self>;
85
86 #[unsafe(method(initWithKey:ascending:))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn initWithKey_ascending(
89 this: Allocated<Self>,
90 key: Option<&NSString>,
91 ascending: bool,
92 ) -> Retained<Self>;
93
94 #[unsafe(method(initWithKey:ascending:selector:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initWithKey_ascending_selector(
97 this: Allocated<Self>,
98 key: Option<&NSString>,
99 ascending: bool,
100 selector: Option<Sel>,
101 ) -> Retained<Self>;
102
103 #[unsafe(method(sortDescriptorWithKey:ascending:comparator:))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn sortDescriptorWithKey_ascending_comparator(
106 key: Option<&NSString>,
107 ascending: bool,
108 cmptr: NSComparator,
109 ) -> Retained<Self>;
110
111 #[unsafe(method(initWithKey:ascending:comparator:))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn initWithKey_ascending_comparator(
114 this: Allocated<Self>,
115 key: Option<&NSString>,
116 ascending: bool,
117 cmptr: NSComparator,
118 ) -> Retained<Self>;
119 );
120}