objc2_app_kit/generated/
NSCollectionViewLayout.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::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionelementcategory?language=objc)
13// NS_ENUM
14#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct NSCollectionElementCategory(pub NSInteger);
17impl NSCollectionElementCategory {
18    #[doc(alias = "NSCollectionElementCategoryItem")]
19    pub const Item: Self = Self(0);
20    #[doc(alias = "NSCollectionElementCategorySupplementaryView")]
21    pub const SupplementaryView: Self = Self(1);
22    #[doc(alias = "NSCollectionElementCategoryDecorationView")]
23    pub const DecorationView: Self = Self(2);
24    #[doc(alias = "NSCollectionElementCategoryInterItemGap")]
25    pub const InterItemGap: Self = Self(3);
26}
27
28unsafe impl Encode for NSCollectionElementCategory {
29    const ENCODING: Encoding = NSInteger::ENCODING;
30}
31
32unsafe impl RefEncode for NSCollectionElementCategory {
33    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
34}
35
36/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionviewdecorationelementkind?language=objc)
37pub type NSCollectionViewDecorationElementKind = NSString;
38
39extern "C" {
40    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionelementkindinteritemgapindicator?language=objc)
41    #[cfg(feature = "NSCollectionView")]
42    pub static NSCollectionElementKindInterItemGapIndicator:
43        &'static NSCollectionViewSupplementaryElementKind;
44}
45
46extern_class!(
47    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionviewlayoutattributes?language=objc)
48    #[unsafe(super(NSObject))]
49    #[thread_kind = MainThreadOnly]
50    #[derive(Debug, PartialEq, Eq, Hash)]
51    pub struct NSCollectionViewLayoutAttributes;
52);
53
54unsafe impl NSCopying for NSCollectionViewLayoutAttributes {}
55
56unsafe impl CopyingHelper for NSCollectionViewLayoutAttributes {
57    type Result = Self;
58}
59
60unsafe impl NSObjectProtocol for NSCollectionViewLayoutAttributes {}
61
62impl NSCollectionViewLayoutAttributes {
63    extern_methods!(
64        #[unsafe(method(frame))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn frame(&self) -> NSRect;
67
68        /// Setter for [`frame`][Self::frame].
69        #[unsafe(method(setFrame:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn setFrame(&self, frame: NSRect);
72
73        #[unsafe(method(size))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn size(&self) -> NSSize;
76
77        /// Setter for [`size`][Self::size].
78        #[unsafe(method(setSize:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn setSize(&self, size: NSSize);
81
82        #[cfg(feature = "objc2-core-foundation")]
83        #[unsafe(method(alpha))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn alpha(&self) -> CGFloat;
86
87        #[cfg(feature = "objc2-core-foundation")]
88        /// Setter for [`alpha`][Self::alpha].
89        #[unsafe(method(setAlpha:))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn setAlpha(&self, alpha: CGFloat);
92
93        #[unsafe(method(zIndex))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn zIndex(&self) -> NSInteger;
96
97        /// Setter for [`zIndex`][Self::zIndex].
98        #[unsafe(method(setZIndex:))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn setZIndex(&self, z_index: NSInteger);
101
102        #[unsafe(method(isHidden))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn isHidden(&self) -> bool;
105
106        /// Setter for [`isHidden`][Self::isHidden].
107        #[unsafe(method(setHidden:))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn setHidden(&self, hidden: bool);
110
111        #[unsafe(method(indexPath))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn indexPath(&self) -> Option<Retained<NSIndexPath>>;
114
115        /// Setter for [`indexPath`][Self::indexPath].
116        #[unsafe(method(setIndexPath:))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn setIndexPath(&self, index_path: Option<&NSIndexPath>);
119
120        #[unsafe(method(representedElementCategory))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn representedElementCategory(&self) -> NSCollectionElementCategory;
123
124        #[unsafe(method(representedElementKind))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn representedElementKind(&self) -> Option<Retained<NSString>>;
127
128        #[unsafe(method(layoutAttributesForItemWithIndexPath:))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn layoutAttributesForItemWithIndexPath(
131            index_path: &NSIndexPath,
132            mtm: MainThreadMarker,
133        ) -> Retained<Self>;
134
135        #[unsafe(method(layoutAttributesForInterItemGapBeforeIndexPath:))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath(
138            index_path: &NSIndexPath,
139            mtm: MainThreadMarker,
140        ) -> Retained<Self>;
141
142        #[cfg(feature = "NSCollectionView")]
143        #[unsafe(method(layoutAttributesForSupplementaryViewOfKind:withIndexPath:))]
144        #[unsafe(method_family = none)]
145        pub unsafe fn layoutAttributesForSupplementaryViewOfKind_withIndexPath(
146            element_kind: &NSCollectionViewSupplementaryElementKind,
147            index_path: &NSIndexPath,
148            mtm: MainThreadMarker,
149        ) -> Retained<Self>;
150
151        #[unsafe(method(layoutAttributesForDecorationViewOfKind:withIndexPath:))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn layoutAttributesForDecorationViewOfKind_withIndexPath(
154            decoration_view_kind: &NSCollectionViewDecorationElementKind,
155            index_path: &NSIndexPath,
156            mtm: MainThreadMarker,
157        ) -> Retained<Self>;
158    );
159}
160
161/// Methods declared on superclass `NSObject`.
162impl NSCollectionViewLayoutAttributes {
163    extern_methods!(
164        #[unsafe(method(init))]
165        #[unsafe(method_family = init)]
166        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
167
168        #[unsafe(method(new))]
169        #[unsafe(method_family = new)]
170        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
171    );
172}
173
174/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionupdateaction?language=objc)
175// NS_ENUM
176#[repr(transparent)]
177#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
178pub struct NSCollectionUpdateAction(pub NSInteger);
179impl NSCollectionUpdateAction {
180    #[doc(alias = "NSCollectionUpdateActionInsert")]
181    pub const Insert: Self = Self(0);
182    #[doc(alias = "NSCollectionUpdateActionDelete")]
183    pub const Delete: Self = Self(1);
184    #[doc(alias = "NSCollectionUpdateActionReload")]
185    pub const Reload: Self = Self(2);
186    #[doc(alias = "NSCollectionUpdateActionMove")]
187    pub const Move: Self = Self(3);
188    #[doc(alias = "NSCollectionUpdateActionNone")]
189    pub const None: Self = Self(4);
190}
191
192unsafe impl Encode for NSCollectionUpdateAction {
193    const ENCODING: Encoding = NSInteger::ENCODING;
194}
195
196unsafe impl RefEncode for NSCollectionUpdateAction {
197    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
198}
199
200extern_class!(
201    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionviewupdateitem?language=objc)
202    #[unsafe(super(NSObject))]
203    #[thread_kind = MainThreadOnly]
204    #[derive(Debug, PartialEq, Eq, Hash)]
205    pub struct NSCollectionViewUpdateItem;
206);
207
208unsafe impl NSObjectProtocol for NSCollectionViewUpdateItem {}
209
210impl NSCollectionViewUpdateItem {
211    extern_methods!(
212        #[unsafe(method(indexPathBeforeUpdate))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn indexPathBeforeUpdate(&self) -> Option<Retained<NSIndexPath>>;
215
216        #[unsafe(method(indexPathAfterUpdate))]
217        #[unsafe(method_family = none)]
218        pub unsafe fn indexPathAfterUpdate(&self) -> Option<Retained<NSIndexPath>>;
219
220        #[unsafe(method(updateAction))]
221        #[unsafe(method_family = none)]
222        pub unsafe fn updateAction(&self) -> NSCollectionUpdateAction;
223    );
224}
225
226/// Methods declared on superclass `NSObject`.
227impl NSCollectionViewUpdateItem {
228    extern_methods!(
229        #[unsafe(method(init))]
230        #[unsafe(method_family = init)]
231        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
232
233        #[unsafe(method(new))]
234        #[unsafe(method_family = new)]
235        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
236    );
237}
238
239extern_class!(
240    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionviewlayoutinvalidationcontext?language=objc)
241    #[unsafe(super(NSObject))]
242    #[thread_kind = MainThreadOnly]
243    #[derive(Debug, PartialEq, Eq, Hash)]
244    pub struct NSCollectionViewLayoutInvalidationContext;
245);
246
247unsafe impl NSObjectProtocol for NSCollectionViewLayoutInvalidationContext {}
248
249impl NSCollectionViewLayoutInvalidationContext {
250    extern_methods!(
251        #[unsafe(method(invalidateEverything))]
252        #[unsafe(method_family = none)]
253        pub unsafe fn invalidateEverything(&self) -> bool;
254
255        #[unsafe(method(invalidateDataSourceCounts))]
256        #[unsafe(method_family = none)]
257        pub unsafe fn invalidateDataSourceCounts(&self) -> bool;
258
259        #[unsafe(method(invalidateItemsAtIndexPaths:))]
260        #[unsafe(method_family = none)]
261        pub unsafe fn invalidateItemsAtIndexPaths(&self, index_paths: &NSSet<NSIndexPath>);
262
263        #[cfg(feature = "NSCollectionView")]
264        #[unsafe(method(invalidateSupplementaryElementsOfKind:atIndexPaths:))]
265        #[unsafe(method_family = none)]
266        pub unsafe fn invalidateSupplementaryElementsOfKind_atIndexPaths(
267            &self,
268            element_kind: &NSCollectionViewSupplementaryElementKind,
269            index_paths: &NSSet<NSIndexPath>,
270        );
271
272        #[unsafe(method(invalidateDecorationElementsOfKind:atIndexPaths:))]
273        #[unsafe(method_family = none)]
274        pub unsafe fn invalidateDecorationElementsOfKind_atIndexPaths(
275            &self,
276            element_kind: &NSCollectionViewDecorationElementKind,
277            index_paths: &NSSet<NSIndexPath>,
278        );
279
280        #[unsafe(method(invalidatedItemIndexPaths))]
281        #[unsafe(method_family = none)]
282        pub unsafe fn invalidatedItemIndexPaths(&self) -> Option<Retained<NSSet<NSIndexPath>>>;
283
284        #[cfg(feature = "NSCollectionView")]
285        #[unsafe(method(invalidatedSupplementaryIndexPaths))]
286        #[unsafe(method_family = none)]
287        pub unsafe fn invalidatedSupplementaryIndexPaths(
288            &self,
289        ) -> Option<
290            Retained<NSDictionary<NSCollectionViewSupplementaryElementKind, NSSet<NSIndexPath>>>,
291        >;
292
293        #[unsafe(method(invalidatedDecorationIndexPaths))]
294        #[unsafe(method_family = none)]
295        pub unsafe fn invalidatedDecorationIndexPaths(
296            &self,
297        ) -> Option<Retained<NSDictionary<NSCollectionViewDecorationElementKind, NSSet<NSIndexPath>>>>;
298
299        #[unsafe(method(contentOffsetAdjustment))]
300        #[unsafe(method_family = none)]
301        pub unsafe fn contentOffsetAdjustment(&self) -> NSPoint;
302
303        /// Setter for [`contentOffsetAdjustment`][Self::contentOffsetAdjustment].
304        #[unsafe(method(setContentOffsetAdjustment:))]
305        #[unsafe(method_family = none)]
306        pub unsafe fn setContentOffsetAdjustment(&self, content_offset_adjustment: NSPoint);
307
308        #[unsafe(method(contentSizeAdjustment))]
309        #[unsafe(method_family = none)]
310        pub unsafe fn contentSizeAdjustment(&self) -> NSSize;
311
312        /// Setter for [`contentSizeAdjustment`][Self::contentSizeAdjustment].
313        #[unsafe(method(setContentSizeAdjustment:))]
314        #[unsafe(method_family = none)]
315        pub unsafe fn setContentSizeAdjustment(&self, content_size_adjustment: NSSize);
316    );
317}
318
319/// Methods declared on superclass `NSObject`.
320impl NSCollectionViewLayoutInvalidationContext {
321    extern_methods!(
322        #[unsafe(method(init))]
323        #[unsafe(method_family = init)]
324        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
325
326        #[unsafe(method(new))]
327        #[unsafe(method_family = new)]
328        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
329    );
330}
331
332extern_class!(
333    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscollectionviewlayout?language=objc)
334    #[unsafe(super(NSObject))]
335    #[thread_kind = MainThreadOnly]
336    #[derive(Debug, PartialEq, Eq, Hash)]
337    pub struct NSCollectionViewLayout;
338);
339
340unsafe impl NSCoding for NSCollectionViewLayout {}
341
342unsafe impl NSObjectProtocol for NSCollectionViewLayout {}
343
344impl NSCollectionViewLayout {
345    extern_methods!(
346        #[cfg(all(
347            feature = "NSCollectionView",
348            feature = "NSResponder",
349            feature = "NSView"
350        ))]
351        #[unsafe(method(collectionView))]
352        #[unsafe(method_family = none)]
353        pub unsafe fn collectionView(&self) -> Option<Retained<NSCollectionView>>;
354
355        #[unsafe(method(invalidateLayout))]
356        #[unsafe(method_family = none)]
357        pub unsafe fn invalidateLayout(&self);
358
359        #[unsafe(method(invalidateLayoutWithContext:))]
360        #[unsafe(method_family = none)]
361        pub unsafe fn invalidateLayoutWithContext(
362            &self,
363            context: &NSCollectionViewLayoutInvalidationContext,
364        );
365
366        #[unsafe(method(registerClass:forDecorationViewOfKind:))]
367        #[unsafe(method_family = none)]
368        pub unsafe fn registerClass_forDecorationViewOfKind(
369            &self,
370            view_class: Option<&AnyClass>,
371            element_kind: &NSCollectionViewDecorationElementKind,
372        );
373
374        #[cfg(feature = "NSNib")]
375        #[unsafe(method(registerNib:forDecorationViewOfKind:))]
376        #[unsafe(method_family = none)]
377        pub unsafe fn registerNib_forDecorationViewOfKind(
378            &self,
379            nib: Option<&NSNib>,
380            element_kind: &NSCollectionViewDecorationElementKind,
381        );
382    );
383}
384
385/// Methods declared on superclass `NSObject`.
386impl NSCollectionViewLayout {
387    extern_methods!(
388        #[unsafe(method(init))]
389        #[unsafe(method_family = init)]
390        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
391
392        #[unsafe(method(new))]
393        #[unsafe(method_family = new)]
394        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
395    );
396}
397
398/// NSSubclassingHooks.
399impl NSCollectionViewLayout {
400    extern_methods!(
401        #[unsafe(method(layoutAttributesClass))]
402        #[unsafe(method_family = none)]
403        pub unsafe fn layoutAttributesClass(mtm: MainThreadMarker) -> &'static AnyClass;
404
405        #[unsafe(method(invalidationContextClass))]
406        #[unsafe(method_family = none)]
407        pub unsafe fn invalidationContextClass(mtm: MainThreadMarker) -> &'static AnyClass;
408
409        #[unsafe(method(prepareLayout))]
410        #[unsafe(method_family = none)]
411        pub unsafe fn prepareLayout(&self);
412
413        #[unsafe(method(layoutAttributesForElementsInRect:))]
414        #[unsafe(method_family = none)]
415        pub unsafe fn layoutAttributesForElementsInRect(
416            &self,
417            rect: NSRect,
418        ) -> Retained<NSArray<NSCollectionViewLayoutAttributes>>;
419
420        #[unsafe(method(layoutAttributesForItemAtIndexPath:))]
421        #[unsafe(method_family = none)]
422        pub unsafe fn layoutAttributesForItemAtIndexPath(
423            &self,
424            index_path: &NSIndexPath,
425        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
426
427        #[cfg(feature = "NSCollectionView")]
428        #[unsafe(method(layoutAttributesForSupplementaryViewOfKind:atIndexPath:))]
429        #[unsafe(method_family = none)]
430        pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath(
431            &self,
432            element_kind: &NSCollectionViewSupplementaryElementKind,
433            index_path: &NSIndexPath,
434        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
435
436        #[unsafe(method(layoutAttributesForDecorationViewOfKind:atIndexPath:))]
437        #[unsafe(method_family = none)]
438        pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath(
439            &self,
440            element_kind: &NSCollectionViewDecorationElementKind,
441            index_path: &NSIndexPath,
442        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
443
444        #[unsafe(method(layoutAttributesForDropTargetAtPoint:))]
445        #[unsafe(method_family = none)]
446        pub unsafe fn layoutAttributesForDropTargetAtPoint(
447            &self,
448            point_in_collection_view: NSPoint,
449        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
450
451        #[unsafe(method(layoutAttributesForInterItemGapBeforeIndexPath:))]
452        #[unsafe(method_family = none)]
453        pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath(
454            &self,
455            index_path: &NSIndexPath,
456        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
457
458        #[unsafe(method(shouldInvalidateLayoutForBoundsChange:))]
459        #[unsafe(method_family = none)]
460        pub unsafe fn shouldInvalidateLayoutForBoundsChange(&self, new_bounds: NSRect) -> bool;
461
462        #[unsafe(method(invalidationContextForBoundsChange:))]
463        #[unsafe(method_family = none)]
464        pub unsafe fn invalidationContextForBoundsChange(
465            &self,
466            new_bounds: NSRect,
467        ) -> Retained<NSCollectionViewLayoutInvalidationContext>;
468
469        #[unsafe(method(shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:))]
470        #[unsafe(method_family = none)]
471        pub unsafe fn shouldInvalidateLayoutForPreferredLayoutAttributes_withOriginalAttributes(
472            &self,
473            preferred_attributes: &NSCollectionViewLayoutAttributes,
474            original_attributes: &NSCollectionViewLayoutAttributes,
475        ) -> bool;
476
477        #[unsafe(method(invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:))]
478        #[unsafe(method_family = none)]
479        pub unsafe fn invalidationContextForPreferredLayoutAttributes_withOriginalAttributes(
480            &self,
481            preferred_attributes: &NSCollectionViewLayoutAttributes,
482            original_attributes: &NSCollectionViewLayoutAttributes,
483        ) -> Retained<NSCollectionViewLayoutInvalidationContext>;
484
485        #[unsafe(method(targetContentOffsetForProposedContentOffset:withScrollingVelocity:))]
486        #[unsafe(method_family = none)]
487        pub unsafe fn targetContentOffsetForProposedContentOffset_withScrollingVelocity(
488            &self,
489            proposed_content_offset: NSPoint,
490            velocity: NSPoint,
491        ) -> NSPoint;
492
493        #[unsafe(method(targetContentOffsetForProposedContentOffset:))]
494        #[unsafe(method_family = none)]
495        pub unsafe fn targetContentOffsetForProposedContentOffset(
496            &self,
497            proposed_content_offset: NSPoint,
498        ) -> NSPoint;
499
500        #[unsafe(method(collectionViewContentSize))]
501        #[unsafe(method_family = none)]
502        pub unsafe fn collectionViewContentSize(&self) -> NSSize;
503    );
504}
505
506/// NSUpdateSupportHooks.
507impl NSCollectionViewLayout {
508    extern_methods!(
509        #[unsafe(method(prepareForCollectionViewUpdates:))]
510        #[unsafe(method_family = none)]
511        pub unsafe fn prepareForCollectionViewUpdates(
512            &self,
513            update_items: &NSArray<NSCollectionViewUpdateItem>,
514        );
515
516        #[unsafe(method(finalizeCollectionViewUpdates))]
517        #[unsafe(method_family = none)]
518        pub unsafe fn finalizeCollectionViewUpdates(&self);
519
520        #[unsafe(method(prepareForAnimatedBoundsChange:))]
521        #[unsafe(method_family = none)]
522        pub unsafe fn prepareForAnimatedBoundsChange(&self, old_bounds: NSRect);
523
524        #[unsafe(method(finalizeAnimatedBoundsChange))]
525        #[unsafe(method_family = none)]
526        pub unsafe fn finalizeAnimatedBoundsChange(&self);
527
528        #[unsafe(method(prepareForTransitionToLayout:))]
529        #[unsafe(method_family = none)]
530        pub unsafe fn prepareForTransitionToLayout(&self, new_layout: &NSCollectionViewLayout);
531
532        #[unsafe(method(prepareForTransitionFromLayout:))]
533        #[unsafe(method_family = none)]
534        pub unsafe fn prepareForTransitionFromLayout(&self, old_layout: &NSCollectionViewLayout);
535
536        #[unsafe(method(finalizeLayoutTransition))]
537        #[unsafe(method_family = none)]
538        pub unsafe fn finalizeLayoutTransition(&self);
539
540        #[unsafe(method(initialLayoutAttributesForAppearingItemAtIndexPath:))]
541        #[unsafe(method_family = none)]
542        pub unsafe fn initialLayoutAttributesForAppearingItemAtIndexPath(
543            &self,
544            item_index_path: &NSIndexPath,
545        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
546
547        #[unsafe(method(finalLayoutAttributesForDisappearingItemAtIndexPath:))]
548        #[unsafe(method_family = none)]
549        pub unsafe fn finalLayoutAttributesForDisappearingItemAtIndexPath(
550            &self,
551            item_index_path: &NSIndexPath,
552        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
553
554        #[cfg(feature = "NSCollectionView")]
555        #[unsafe(method(initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:))]
556        #[unsafe(method_family = none)]
557        pub unsafe fn initialLayoutAttributesForAppearingSupplementaryElementOfKind_atIndexPath(
558            &self,
559            element_kind: &NSCollectionViewSupplementaryElementKind,
560            element_index_path: &NSIndexPath,
561        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
562
563        #[cfg(feature = "NSCollectionView")]
564        #[unsafe(method(finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:))]
565        #[unsafe(method_family = none)]
566        pub unsafe fn finalLayoutAttributesForDisappearingSupplementaryElementOfKind_atIndexPath(
567            &self,
568            element_kind: &NSCollectionViewSupplementaryElementKind,
569            element_index_path: &NSIndexPath,
570        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
571
572        #[unsafe(method(initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:))]
573        #[unsafe(method_family = none)]
574        pub unsafe fn initialLayoutAttributesForAppearingDecorationElementOfKind_atIndexPath(
575            &self,
576            element_kind: &NSCollectionViewDecorationElementKind,
577            decoration_index_path: &NSIndexPath,
578        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
579
580        #[unsafe(method(finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:))]
581        #[unsafe(method_family = none)]
582        pub unsafe fn finalLayoutAttributesForDisappearingDecorationElementOfKind_atIndexPath(
583            &self,
584            element_kind: &NSCollectionViewDecorationElementKind,
585            decoration_index_path: &NSIndexPath,
586        ) -> Option<Retained<NSCollectionViewLayoutAttributes>>;
587
588        #[cfg(feature = "NSCollectionView")]
589        #[unsafe(method(indexPathsToDeleteForSupplementaryViewOfKind:))]
590        #[unsafe(method_family = none)]
591        pub unsafe fn indexPathsToDeleteForSupplementaryViewOfKind(
592            &self,
593            element_kind: &NSCollectionViewSupplementaryElementKind,
594        ) -> Retained<NSSet<NSIndexPath>>;
595
596        #[unsafe(method(indexPathsToDeleteForDecorationViewOfKind:))]
597        #[unsafe(method_family = none)]
598        pub unsafe fn indexPathsToDeleteForDecorationViewOfKind(
599            &self,
600            element_kind: &NSCollectionViewDecorationElementKind,
601        ) -> Retained<NSSet<NSIndexPath>>;
602
603        #[cfg(feature = "NSCollectionView")]
604        #[unsafe(method(indexPathsToInsertForSupplementaryViewOfKind:))]
605        #[unsafe(method_family = none)]
606        pub unsafe fn indexPathsToInsertForSupplementaryViewOfKind(
607            &self,
608            element_kind: &NSCollectionViewSupplementaryElementKind,
609        ) -> Retained<NSSet<NSIndexPath>>;
610
611        #[unsafe(method(indexPathsToInsertForDecorationViewOfKind:))]
612        #[unsafe(method_family = none)]
613        pub unsafe fn indexPathsToInsertForDecorationViewOfKind(
614            &self,
615            element_kind: &NSCollectionViewDecorationElementKind,
616        ) -> Retained<NSSet<NSIndexPath>>;
617    );
618}