objc2_ui_kit/generated/
UILocalizedIndexedCollation.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uilocalizedindexedcollation?language=objc)
11    #[unsafe(super(NSObject))]
12    #[thread_kind = MainThreadOnly]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct UILocalizedIndexedCollation;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for UILocalizedIndexedCollation {}
19);
20
21impl UILocalizedIndexedCollation {
22    extern_methods!(
23        #[unsafe(method(currentCollation))]
24        #[unsafe(method_family = none)]
25        pub fn currentCollation(mtm: MainThreadMarker) -> Retained<Self>;
26
27        #[unsafe(method(sectionTitles))]
28        #[unsafe(method_family = none)]
29        pub fn sectionTitles(&self) -> Retained<NSArray<NSString>>;
30
31        #[unsafe(method(sectionIndexTitles))]
32        #[unsafe(method_family = none)]
33        pub fn sectionIndexTitles(&self) -> Retained<NSArray<NSString>>;
34
35        #[unsafe(method(sectionForSectionIndexTitleAtIndex:))]
36        #[unsafe(method_family = none)]
37        pub fn sectionForSectionIndexTitleAtIndex(&self, index_title_index: NSInteger)
38            -> NSInteger;
39
40        /// # Safety
41        ///
42        /// - `object` should be of the correct type.
43        /// - `selector` must be a valid selector.
44        #[unsafe(method(sectionForObject:collationStringSelector:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn sectionForObject_collationStringSelector(
47            &self,
48            object: &AnyObject,
49            selector: Sel,
50        ) -> NSInteger;
51
52        /// # Safety
53        ///
54        /// - `array` generic should be of the correct type.
55        /// - `selector` must be a valid selector.
56        #[unsafe(method(sortedArrayFromArray:collationStringSelector:))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn sortedArrayFromArray_collationStringSelector(
59            &self,
60            array: &NSArray,
61            selector: Sel,
62        ) -> Retained<NSArray>;
63    );
64}
65
66/// Methods declared on superclass `NSObject`.
67impl UILocalizedIndexedCollation {
68    extern_methods!(
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub fn init(this: Allocated<Self>) -> Retained<Self>;
72
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
76    );
77}