objc2_ui_kit/generated/
UIDataSourceTranslating.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uidatasourcetranslating?language=objc)
12    pub unsafe trait UIDataSourceTranslating: NSObjectProtocol + MainThreadOnly {
13        #[unsafe(method(presentationSectionIndexForDataSourceSectionIndex:))]
14        #[unsafe(method_family = none)]
15        unsafe fn presentationSectionIndexForDataSourceSectionIndex(
16            &self,
17            data_source_section_index: NSInteger,
18        ) -> NSInteger;
19
20        #[unsafe(method(dataSourceSectionIndexForPresentationSectionIndex:))]
21        #[unsafe(method_family = none)]
22        unsafe fn dataSourceSectionIndexForPresentationSectionIndex(
23            &self,
24            presentation_section_index: NSInteger,
25        ) -> NSInteger;
26
27        #[unsafe(method(presentationIndexPathForDataSourceIndexPath:))]
28        #[unsafe(method_family = none)]
29        unsafe fn presentationIndexPathForDataSourceIndexPath(
30            &self,
31            data_source_index_path: Option<&NSIndexPath>,
32        ) -> Option<Retained<NSIndexPath>>;
33
34        #[unsafe(method(dataSourceIndexPathForPresentationIndexPath:))]
35        #[unsafe(method_family = none)]
36        unsafe fn dataSourceIndexPathForPresentationIndexPath(
37            &self,
38            presentation_index_path: Option<&NSIndexPath>,
39        ) -> Option<Retained<NSIndexPath>>;
40
41        #[cfg(feature = "block2")]
42        #[unsafe(method(performUsingPresentationValues:))]
43        #[unsafe(method_family = none)]
44        unsafe fn performUsingPresentationValues(
45            &self,
46            actions_to_translate: &block2::DynBlock<dyn Fn() + '_>,
47        );
48    }
49);