objc2_ui_kit/generated/
NSDiffableDataSourceSectionSnapshot.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_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/nsdiffabledatasourcesectionsnapshot?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct NSDiffableDataSourceSectionSnapshot<ItemIdentifierType: ?Sized = AnyObject>;
15);
16
17unsafe impl<ItemIdentifierType: ?Sized> NSCopying
18    for NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>
19{
20}
21
22unsafe impl<ItemIdentifierType: ?Sized + Message> CopyingHelper
23    for NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>
24{
25    type Result = Self;
26}
27
28unsafe impl<ItemIdentifierType: ?Sized> NSObjectProtocol
29    for NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>
30{
31}
32
33impl<ItemIdentifierType: Message> NSDiffableDataSourceSectionSnapshot<ItemIdentifierType> {
34    extern_methods!(
35        #[unsafe(method(init))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39        #[unsafe(method(appendItems:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn appendItems(&self, items: &NSArray<ItemIdentifierType>);
42
43        #[unsafe(method(appendItems:intoParentItem:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn appendItems_intoParentItem(
46            &self,
47            items: &NSArray<ItemIdentifierType>,
48            parent_item: Option<&ItemIdentifierType>,
49        );
50
51        #[unsafe(method(insertItems:beforeItem:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn insertItems_beforeItem(
54            &self,
55            items: &NSArray<ItemIdentifierType>,
56            before_identifier: &ItemIdentifierType,
57        );
58
59        #[unsafe(method(insertItems:afterItem:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn insertItems_afterItem(
62            &self,
63            items: &NSArray<ItemIdentifierType>,
64            after_identifier: &ItemIdentifierType,
65        );
66
67        #[unsafe(method(deleteItems:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn deleteItems(&self, items: &NSArray<ItemIdentifierType>);
70
71        #[unsafe(method(deleteAllItems))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn deleteAllItems(&self);
74
75        #[unsafe(method(expandItems:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn expandItems(&self, items: &NSArray<ItemIdentifierType>);
78
79        #[unsafe(method(collapseItems:))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn collapseItems(&self, items: &NSArray<ItemIdentifierType>);
82
83        #[unsafe(method(replaceChildrenOfParentItem:withSnapshot:))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn replaceChildrenOfParentItem_withSnapshot(
86            &self,
87            parent_item: &ItemIdentifierType,
88            snapshot: &NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>,
89        );
90
91        #[unsafe(method(insertSnapshot:beforeItem:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn insertSnapshot_beforeItem(
94            &self,
95            snapshot: &NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>,
96            item: &ItemIdentifierType,
97        );
98
99        #[unsafe(method(insertSnapshot:afterItem:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn insertSnapshot_afterItem(
102            &self,
103            snapshot: &NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>,
104            item: &ItemIdentifierType,
105        ) -> Retained<ItemIdentifierType>;
106
107        #[unsafe(method(isExpanded:))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn isExpanded(&self, item: &ItemIdentifierType) -> bool;
110
111        #[unsafe(method(isVisible:))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn isVisible(&self, item: &ItemIdentifierType) -> bool;
114
115        #[unsafe(method(containsItem:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn containsItem(&self, item: &ItemIdentifierType) -> bool;
118
119        #[unsafe(method(levelOfItem:))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn levelOfItem(&self, item: &ItemIdentifierType) -> NSInteger;
122
123        #[unsafe(method(indexOfItem:))]
124        #[unsafe(method_family = none)]
125        pub unsafe fn indexOfItem(&self, item: &ItemIdentifierType) -> NSInteger;
126
127        #[unsafe(method(expandedItems))]
128        #[unsafe(method_family = none)]
129        pub unsafe fn expandedItems(&self) -> Retained<NSArray<ItemIdentifierType>>;
130
131        #[unsafe(method(parentOfChildItem:))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn parentOfChildItem(
134            &self,
135            child_item: &ItemIdentifierType,
136        ) -> Option<Retained<ItemIdentifierType>>;
137
138        #[unsafe(method(snapshotOfParentItem:))]
139        #[unsafe(method_family = none)]
140        pub unsafe fn snapshotOfParentItem(
141            &self,
142            parent_item: &ItemIdentifierType,
143        ) -> Retained<NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>>;
144
145        #[unsafe(method(snapshotOfParentItem:includingParentItem:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn snapshotOfParentItem_includingParentItem(
148            &self,
149            parent_item: &ItemIdentifierType,
150            including_parent_item: bool,
151        ) -> Retained<NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>>;
152
153        #[unsafe(method(rootItems))]
154        #[unsafe(method_family = none)]
155        pub unsafe fn rootItems(&self) -> Retained<NSArray<ItemIdentifierType>>;
156
157        #[unsafe(method(visibleItems))]
158        #[unsafe(method_family = none)]
159        pub unsafe fn visibleItems(&self) -> Retained<NSArray<ItemIdentifierType>>;
160
161        #[unsafe(method(visualDescription))]
162        #[unsafe(method_family = none)]
163        pub unsafe fn visualDescription(&self) -> Retained<NSString>;
164    );
165}
166
167/// Methods declared on superclass `NSObject`.
168impl<ItemIdentifierType: Message> NSDiffableDataSourceSectionSnapshot<ItemIdentifierType> {
169    extern_methods!(
170        #[unsafe(method(new))]
171        #[unsafe(method_family = new)]
172        pub unsafe fn new() -> Retained<Self>;
173    );
174}