use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSSortDescriptor, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CKLocationSortDescriptor;
);
extern_conformance!(
unsafe impl NSCoding for CKLocationSortDescriptor {}
);
extern_conformance!(
unsafe impl NSCopying for CKLocationSortDescriptor {}
);
unsafe impl CopyingHelper for CKLocationSortDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CKLocationSortDescriptor {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CKLocationSortDescriptor {}
);
impl CKLocationSortDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(initWithKey:relativeLocation:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithKey_relativeLocation(
this: Allocated<Self>,
key: &NSString,
relative_location: &CLLocation,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, a_decoder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(relativeLocation))]
#[unsafe(method_family = none)]
pub unsafe fn relativeLocation(&self) -> Retained<CLLocation>;
);
}
impl CKLocationSortDescriptor {
extern_methods!(
#[unsafe(method(sortDescriptorWithKey:ascending:))]
#[unsafe(method_family = none)]
pub unsafe fn sortDescriptorWithKey_ascending(
key: Option<&NSString>,
ascending: bool,
) -> Retained<Self>;
#[unsafe(method(sortDescriptorWithKey:ascending:selector:))]
#[unsafe(method_family = none)]
pub unsafe fn sortDescriptorWithKey_ascending_selector(
key: Option<&NSString>,
ascending: bool,
selector: Option<Sel>,
) -> Retained<Self>;
#[unsafe(method(initWithKey:ascending:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithKey_ascending(
this: Allocated<Self>,
key: Option<&NSString>,
ascending: bool,
) -> Retained<Self>;
#[unsafe(method(initWithKey:ascending:selector:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithKey_ascending_selector(
this: Allocated<Self>,
key: Option<&NSString>,
ascending: bool,
selector: Option<Sel>,
) -> Retained<Self>;
#[unsafe(method(sortDescriptorWithKey:ascending:comparator:))]
#[unsafe(method_family = none)]
pub unsafe fn sortDescriptorWithKey_ascending_comparator(
key: Option<&NSString>,
ascending: bool,
cmptr: NSComparator,
) -> Retained<Self>;
#[unsafe(method(initWithKey:ascending:comparator:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithKey_ascending_comparator(
this: Allocated<Self>,
key: Option<&NSString>,
ascending: bool,
cmptr: NSComparator,
) -> Retained<Self>;
);
}