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