objc2-quartz 0.3.2

Bindings to the Quartz framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_app_kit::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
use objc2_quartz_core::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstylenone?language=objc)
pub const IKCellsStyleNone: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstyleshadowed?language=objc)
pub const IKCellsStyleShadowed: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstyleoutlined?language=objc)
pub const IKCellsStyleOutlined: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstyletitled?language=objc)
pub const IKCellsStyleTitled: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstylesubtitled?language=objc)
pub const IKCellsStyleSubtitled: c_uint = 8;

/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikgroupbezelstyle?language=objc)
pub const IKGroupBezelStyle: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikgroupdisclosurestyle?language=objc)
pub const IKGroupDisclosureStyle: c_uint = 1;

/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserdropoperation?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct IKImageBrowserDropOperation(pub c_uint);
impl IKImageBrowserDropOperation {
    #[doc(alias = "IKImageBrowserDropOn")]
    pub const On: Self = Self(0);
    #[doc(alias = "IKImageBrowserDropBefore")]
    pub const Before: Self = Self(1);
}

unsafe impl Encode for IKImageBrowserDropOperation {
    const ENCODING: Encoding = c_uint::ENCODING;
}

unsafe impl RefEncode for IKImageBrowserDropOperation {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

mod private_NSObjectIKImageBrowserDataSource {
    pub trait Sealed {}
}

/// Category "IKImageBrowserDataSource" on [`NSObject`].
///
/// The IKImageBrowserDataSource informal protocol declares the methods that an instance of IKImageBrowserView uses to access the contents of its data source object.
#[doc(alias = "IKImageBrowserDataSource")]
pub unsafe trait NSObjectIKImageBrowserDataSource:
    ClassType + Sized + private_NSObjectIKImageBrowserDataSource::Sealed
{
    extern_methods!(
        /// Returns the number of records managed for aBrowser by the data source object (required).
        ///
        /// An instance of IKImageView uses this method to determine how many cells it should create and display.
        ///
        /// # Safety
        ///
        /// `a_browser` might not allow `None`.
        #[unsafe(method(numberOfItemsInImageBrowser:))]
        #[unsafe(method_family = none)]
        unsafe fn numberOfItemsInImageBrowser(
            &self,
            a_browser: Option<&IKImageBrowserView>,
        ) -> NSUInteger;

        /// Returns an object for the record in aBrowser corresponding to index
        /// <i>
        /// index
        /// </i>
        /// (required).
        ///
        /// The returned object must implement the required methods of
        /// <i>
        /// IKImageBrowserItem
        /// </i>
        /// .
        ///
        /// # Safety
        ///
        /// `a_browser` might not allow `None`.
        #[unsafe(method(imageBrowser:itemAtIndex:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_itemAtIndex(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            index: NSUInteger,
        ) -> Option<Retained<AnyObject>>;

        /// Invoked by the image browser after it has been determined that a remove operation should be applied (optional)
        ///
        /// The data source should update itself (usually by removing this indexes).
        ///
        /// # Safety
        ///
        /// - `a_browser` might not allow `None`.
        /// - `indexes` might not allow `None`.
        #[unsafe(method(imageBrowser:removeItemsAtIndexes:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_removeItemsAtIndexes(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            indexes: Option<&NSIndexSet>,
        );

        /// Invoked by the image browser after it has been determined that a reordering operation should be applied (optional).
        ///
        /// The data source should update itself (usually by reordering its elements).
        ///
        /// # Safety
        ///
        /// - `a_browser` might not allow `None`.
        /// - `indexes` might not allow `None`.
        #[unsafe(method(imageBrowser:moveItemsAtIndexes:toIndex:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_moveItemsAtIndexes_toIndex(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            indexes: Option<&NSIndexSet>,
            destination_index: NSUInteger,
        ) -> bool;

        /// This method is called after it has been determined that a drag should begin, but before the drag has been started. 'itemIndexes' contains the indexes that will be participating in the drag. Return the number of items effectively written to the pasteboard.
        ///
        /// optional - drag and drop support
        ///
        /// # Safety
        ///
        /// - `a_browser` might not allow `None`.
        /// - `item_indexes` might not allow `None`.
        /// - `pasteboard` might not allow `None`.
        #[unsafe(method(imageBrowser:writeItemsAtIndexes:toPasteboard:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_writeItemsAtIndexes_toPasteboard(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            item_indexes: Option<&NSIndexSet>,
            pasteboard: Option<&NSPasteboard>,
        ) -> NSUInteger;

        /// Returns the number of groups
        ///
        /// this method is optional
        ///
        /// # Safety
        ///
        /// `a_browser` might not allow `None`.
        #[unsafe(method(numberOfGroupsInImageBrowser:))]
        #[unsafe(method_family = none)]
        unsafe fn numberOfGroupsInImageBrowser(
            &self,
            a_browser: Option<&IKImageBrowserView>,
        ) -> NSUInteger;

        /// Returns the group at index 'index'
        ///
        /// A group is defined by a dictionay. Keys for this dictionary are defined below.
        ///
        /// # Safety
        ///
        /// `a_browser` might not allow `None`.
        #[unsafe(method(imageBrowser:groupAtIndex:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_groupAtIndex(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            index: NSUInteger,
        ) -> Option<Retained<NSDictionary>>;
    );
}

impl private_NSObjectIKImageBrowserDataSource::Sealed for NSObject {}
unsafe impl NSObjectIKImageBrowserDataSource for NSObject {}

mod private_NSObjectIKImageBrowserItem {
    pub trait Sealed {}
}

/// Category "IKImageBrowserItem" on [`NSObject`].
///
/// The IKImageBrowserItem informal protocol declares the methods that an instance of IKImageBrowserView uses to access the contents of its data source for a given item.
///
/// Some of the methods in this protocol, such as
/// <i>
/// image
/// </i>
/// are called very frequently, so they must be efficient.
#[doc(alias = "IKImageBrowserItem")]
pub unsafe trait NSObjectIKImageBrowserItem:
    ClassType + Sized + private_NSObjectIKImageBrowserItem::Sealed
{
    extern_methods!(
        /// Returns a unique string that identify this data source item (required).
        ///
        /// The image browser uses this identifier to keep the correspondance between its cache and the data source item
        #[unsafe(method(imageUID))]
        #[unsafe(method_family = none)]
        unsafe fn imageUID(&self) -> Option<Retained<NSString>>;

        /// Returns the representation of the image to display (required).
        ///
        /// Keys for imageRepresentationType are defined below.
        #[unsafe(method(imageRepresentationType))]
        #[unsafe(method_family = none)]
        unsafe fn imageRepresentationType(&self) -> Option<Retained<NSString>>;

        /// Returns the image to display (required). Can return nil if the item has no image to display.
        #[unsafe(method(imageRepresentation))]
        #[unsafe(method_family = none)]
        unsafe fn imageRepresentation(&self) -> Option<Retained<AnyObject>>;

        /// Returns a version of this item. The receiver can return a new version to let the image browser knows that it shouldn't use its cache for this item
        #[unsafe(method(imageVersion))]
        #[unsafe(method_family = none)]
        unsafe fn imageVersion(&self) -> NSUInteger;

        /// Returns the title to display as a NSString. Use setValue:forKey: with IKImageBrowserCellsTitleAttributesKey on the IKImageBrowserView instance to set text attributes.
        #[unsafe(method(imageTitle))]
        #[unsafe(method_family = none)]
        unsafe fn imageTitle(&self) -> Option<Retained<NSString>>;

        /// Returns the subtitle to display as a NSString. Use setValue:forKey: with IKImageBrowserCellsSubtitleAttributesKey on the IKImageBrowserView instance to set text attributes.
        #[unsafe(method(imageSubtitle))]
        #[unsafe(method_family = none)]
        unsafe fn imageSubtitle(&self) -> Option<Retained<NSString>>;

        /// Returns whether this item is selectable.
        ///
        /// The receiver can implement this methods to forbid selection of this item by returning NO.
        #[unsafe(method(isSelectable))]
        #[unsafe(method_family = none)]
        unsafe fn isSelectable(&self) -> bool;
    );
}

impl private_NSObjectIKImageBrowserItem::Sealed for NSObject {}
unsafe impl NSObjectIKImageBrowserItem for NSObject {}

extern_class!(
    /// An IKImageBrowserView object is a view that display and browse images and movies. It supports scrolling and zooming.
    ///
    /// The IKImageBrowserView is deprecated. Please switch to NSCollectionView.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserview?language=objc)
    #[unsafe(super(NSView, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Deprecated - Please use NSCollectionView instead"]
    pub struct IKImageBrowserView;
);

extern_conformance!(
    unsafe impl NSAccessibility for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSAccessibilityElementProtocol for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSAnimatablePropertyContainer for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSAppearanceCustomization for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSCoding for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSDraggingDestination for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSDraggingSource for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for IKImageBrowserView {}
);

extern_conformance!(
    unsafe impl NSUserInterfaceItemIdentification for IKImageBrowserView {}
);

impl IKImageBrowserView {
    extern_methods!();
}

/// Methods declared on superclass `NSView`.
impl IKImageBrowserView {
    extern_methods!(
        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSResponder`.
impl IKImageBrowserView {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl IKImageBrowserView {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}

/// IKMainMethods.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
    extern_methods!(
        /// The receiver's data source. the data source is not retained by the receiver.
        ///
        /// # Safety
        ///
        /// This is not retained internally, you must ensure the object is still alive.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(dataSource))]
        #[unsafe(method_family = none)]
        pub unsafe fn dataSource(&self) -> Option<Retained<AnyObject>>;

        /// Setter for [`dataSource`][Self::dataSource].
        ///
        /// # Safety
        ///
        /// - `data_source` should be of the correct type.
        /// - `data_source` might not allow `None`.
        /// - This is unretained, you must ensure the object is kept alive while in use.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setDataSource:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDataSource(&self, data_source: Option<&AnyObject>);

        /// Marks the receiver as needing redisplay, so it will reload the data and draw the new values.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(reloadData))]
        #[unsafe(method_family = none)]
        pub unsafe fn reloadData(&self);

        /// The receiver's delegate. aDelegate is expected to implement the IKImageBrowserDelegate informal protocol.
        ///
        /// # Safety
        ///
        /// This is not retained internally, you must ensure the object is still alive.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(delegate))]
        #[unsafe(method_family = none)]
        pub unsafe fn delegate(&self) -> Option<Retained<AnyObject>>;

        /// Setter for [`delegate`][Self::delegate].
        ///
        /// # Safety
        ///
        /// - `delegate` should be of the correct type.
        /// - `delegate` might not allow `None`.
        /// - This is unretained, you must ensure the object is kept alive while in use.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setDelegate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDelegate(&self, delegate: Option<&AnyObject>);
    );
}

/// IKAppearance.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
    extern_methods!(
        /// Defines the cells appearance style.
        ///
        /// Parameter `mask`: An integer bit mask; see the discussion below.
        ///
        /// mask can be specified by combining any of the options below using the C bitwise OR operator
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setCellsStyleMask:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCellsStyleMask(&self, mask: NSUInteger);

        /// Return the cells appearance style mask.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(cellsStyleMask))]
        #[unsafe(method_family = none)]
        pub unsafe fn cellsStyleMask(&self) -> NSUInteger;

        /// Sets whether the receiver constraints the cells's image to their original size. Default is NO.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setConstrainsToOriginalSize:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setConstrainsToOriginalSize(&self, flag: bool);

        /// Returns whether the receiver constraints the cells's image to their original size.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(constrainsToOriginalSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn constrainsToOriginalSize(&self) -> bool;

        #[cfg(feature = "objc2-quartz-core")]
        /// Specifies the receiver�s background layer.
        ///
        /// # Safety
        ///
        /// `a_layer` might not allow `None`.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setBackgroundLayer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBackgroundLayer(&self, a_layer: Option<&CALayer>);

        #[cfg(feature = "objc2-quartz-core")]
        /// Provides the receiver�s background layer.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(backgroundLayer))]
        #[unsafe(method_family = none)]
        pub unsafe fn backgroundLayer(&self) -> Option<Retained<CALayer>>;

        #[cfg(feature = "objc2-quartz-core")]
        /// Specifies the receiver�s foreground layer.
        ///
        /// # Safety
        ///
        /// `a_layer` might not allow `None`.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setForegroundLayer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setForegroundLayer(&self, a_layer: Option<&CALayer>);

        #[cfg(feature = "objc2-quartz-core")]
        /// Provides the receiver�s foreground layer.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(foregroundLayer))]
        #[unsafe(method_family = none)]
        pub unsafe fn foregroundLayer(&self) -> Option<Retained<CALayer>>;

        #[cfg(feature = "IKImageBrowserCell")]
        /// Returns the cell to use for the specified item. The returned cell should not be autoreleased.
        ///
        /// Parameter `The`: item that the returned cell will represent.
        ///
        /// Subclasses can override this method to customize the appearance of the cell that will represent "anItem".
        ///
        /// # Safety
        ///
        /// - `an_item` should be of the correct type.
        /// - `an_item` might not allow `None`.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(newCellForRepresentedItem:))]
        #[unsafe(method_family = new)]
        pub unsafe fn newCellForRepresentedItem(
            &self,
            an_item: Option<&AnyObject>,
        ) -> Option<Retained<IKImageBrowserCell>>;

        #[cfg(feature = "IKImageBrowserCell")]
        /// Returns the cell at the specified index.
        ///
        /// Subclasses must not override this method.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(cellForItemAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn cellForItemAtIndex(
            &self,
            index: NSUInteger,
        ) -> Option<Retained<IKImageBrowserCell>>;
    );
}

/// IKBrowsing.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
    extern_methods!(
        /// Sets the zoom value to
        /// <i>
        /// aValue
        /// </i>
        /// .
        ///
        /// This value should be greater or equal to zero and less or equal than one. A zoom value of zero corresponds to the minimum size (40x40 pixels), A zoom value of one means images fit the browser bounds. Other values are interpolated.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setZoomValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setZoomValue(&self, a_value: c_float);

        /// Returns the current zoom value.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(zoomValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn zoomValue(&self) -> c_float;

        /// Determines how the receiver resize its content when zooming.
        ///
        /// mask can be specified by combining any of the following options using the C bitwise OR operator:NSViewWidthSizable NSViewHeightSizable, other values are ignored.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setContentResizingMask:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContentResizingMask(&self, mask: NSUInteger);

        /// Returns the receiver�s content resizing mask, which determines how it�s content is resized while zooming.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(contentResizingMask))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentResizingMask(&self) -> NSUInteger;

        /// Scrolls the receiver so the item at the specified index is visible.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(scrollIndexToVisible:))]
        #[unsafe(method_family = none)]
        pub unsafe fn scrollIndexToVisible(&self, index: NSInteger);

        /// sets the size of the cells to size
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setCellSize:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCellSize(&self, size: NSSize);

        /// Returns the size of the cells
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(cellSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn cellSize(&self) -> NSSize;

        /// Returns the spacing between cells in the image browser.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(intercellSpacing))]
        #[unsafe(method_family = none)]
        pub unsafe fn intercellSpacing(&self) -> NSSize;

        /// Sets the spacing between cells in the matrix.
        ///
        /// Parameter `aSize`: The vertical and horizontal spacing to use between cells in the receiver. By default, both values are 10.0 in the receiver�s coordinate system.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setIntercellSpacing:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setIntercellSpacing(&self, a_size: NSSize);

        /// Returns the item at the specified location or NSNotFound if no item at this location.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(indexOfItemAtPoint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn indexOfItemAtPoint(&self, point: NSPoint) -> NSInteger;

        /// Returns the frame rectangle of the item that would be drawn at the specified location.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(itemFrameAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn itemFrameAtIndex(&self, index: NSInteger) -> NSRect;

        /// Returns indexes of the receiver�s currently visible items.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(visibleItemIndexes))]
        #[unsafe(method_family = none)]
        pub unsafe fn visibleItemIndexes(&self) -> Option<Retained<NSIndexSet>>;

        /// Returns the indexes of the receiver�s rows that intersect the specified rectangle.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(rowIndexesInRect:))]
        #[unsafe(method_family = none)]
        pub unsafe fn rowIndexesInRect(&self, rect: NSRect) -> Option<Retained<NSIndexSet>>;

        /// Returns the indexes of the receiver�s columns that intersect the specified rectangle.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(columnIndexesInRect:))]
        #[unsafe(method_family = none)]
        pub unsafe fn columnIndexesInRect(&self, rect: NSRect) -> Option<Retained<NSIndexSet>>;

        /// Returns the rectangle containing the column at a given index.
        ///
        /// Parameter `columnIndex`: The index of a column in the receiver.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(rectOfColumn:))]
        #[unsafe(method_family = none)]
        pub unsafe fn rectOfColumn(&self, column_index: NSUInteger) -> NSRect;

        /// Returns the rectangle containing the row at a given index.
        ///
        /// Parameter `rowIndex`: The index of a row in the receiver.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(rectOfRow:))]
        #[unsafe(method_family = none)]
        pub unsafe fn rectOfRow(&self, row_index: NSUInteger) -> NSRect;

        /// Returns the number of rows in the receiver.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(numberOfRows))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfRows(&self) -> NSUInteger;

        /// Returns the number of columns in the receiver.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(numberOfColumns))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfColumns(&self) -> NSUInteger;

        /// Sets whether the receiver can automatically take control of the Quick Look panel.
        ///
        /// Parameter `flag`: if YES, KImageBrowser can take control of the Quick Look panel automatically whenever it becomes first responder. This means that it provides the spacebar key store to open/close Quick Look panel and sets itself as the panel's datasource and delegate.
        ///
        /// default value is NO. IKImageBrowserView's datasource items should provide file paths or URLs as their representation (see IKImageBrowserItem protocol).
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setCanControlQuickLookPanel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCanControlQuickLookPanel(&self, flag: bool);

        /// Returns a Boolean value that indicates whether the receiver can automatically take control of the Quick Look panel.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(canControlQuickLookPanel))]
        #[unsafe(method_family = none)]
        pub unsafe fn canControlQuickLookPanel(&self) -> bool;
    );
}

/// IKSelectionReorderingAndGrouping.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
    extern_methods!(
        /// Returns the indexes of the selected cells
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(selectionIndexes))]
        #[unsafe(method_family = none)]
        pub unsafe fn selectionIndexes(&self) -> Option<Retained<NSIndexSet>>;

        /// Selects cells at indexes
        /// <i>
        /// indexes
        /// </i>
        /// . If
        /// <i>
        /// extendSelection
        /// </i>
        /// is YES it extends the current selection, otherwise it replaces the current selection.
        ///
        /// # Safety
        ///
        /// `indexes` might not allow `None`.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setSelectionIndexes:byExtendingSelection:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSelectionIndexes_byExtendingSelection(
            &self,
            indexes: Option<&NSIndexSet>,
            extend_selection: bool,
        );

        /// Controls whether the user can select more than one cell at a time.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setAllowsMultipleSelection:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAllowsMultipleSelection(&self, flag: bool);

        /// Returns YES if the receiver allows the user to select more than one cell at a time, NO otherwise.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(allowsMultipleSelection))]
        #[unsafe(method_family = none)]
        pub unsafe fn allowsMultipleSelection(&self) -> bool;

        /// Controls whether the receiver allows zero cell to be selected.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setAllowsEmptySelection:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAllowsEmptySelection(&self, flag: bool);

        /// Returns YES if the receiver allows the user to select zero cell, NO otherwise.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(allowsEmptySelection))]
        #[unsafe(method_family = none)]
        pub unsafe fn allowsEmptySelection(&self) -> bool;

        /// Controls whether the user can reorder items.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setAllowsReordering:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAllowsReordering(&self, flag: bool);

        /// Returns YES if the receiver allows the user to reorder items, NO otherwise.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(allowsReordering))]
        #[unsafe(method_family = none)]
        pub unsafe fn allowsReordering(&self) -> bool;

        /// Controls whether the receiver animate reordering and changes of the data source.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setAnimates:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAnimates(&self, flag: bool);

        /// Returns YES if the receiver animate changes of the data source, NO otherwise.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(animates))]
        #[unsafe(method_family = none)]
        pub unsafe fn animates(&self) -> bool;

        /// Expands group at index 'index' if it is not already expanded; otherwise, does nothing.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(expandGroupAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn expandGroupAtIndex(&self, index: NSUInteger);

        /// Collapse group at index 'index' if it is expanded; otherwise, does nothing.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(collapseGroupAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn collapseGroupAtIndex(&self, index: NSUInteger);

        /// Returns YES if the group at index 'index' is expanded.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(isGroupExpandedAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn isGroupExpandedAtIndex(&self, index: NSUInteger) -> bool;
    );
}

/// IKDragNDrop.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
    extern_methods!(
        /// Sets the receiver's dragging destination delegate to
        /// <i>
        /// delegate
        /// </i>
        /// .
        ///
        /// # Safety
        ///
        /// - `delegate` should be of the correct type.
        /// - `delegate` might not allow `None`.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setDraggingDestinationDelegate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDraggingDestinationDelegate(&self, delegate: Option<&AnyObject>);

        /// Returns the receiver's dragging destination delegate.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(draggingDestinationDelegate))]
        #[unsafe(method_family = none)]
        pub unsafe fn draggingDestinationDelegate(&self) -> Option<Retained<AnyObject>>;

        /// Returns the index of the cell where the drop operation occured. This index is valid when a drop occurred and until next drop.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(indexAtLocationOfDroppedItem))]
        #[unsafe(method_family = none)]
        pub unsafe fn indexAtLocationOfDroppedItem(&self) -> NSUInteger;

        /// Returns the current dropOperation. The returned value is valid when a drop occurred and until next drop.
        ///
        /// Returns IKImageBrowserDropOn if the drop occurs on an item. Returns IKImageBrowserDropBefore otherwise.
        /// In drag and drop, used to specify a dropOperation.  For example, given a browser with N cells (numbered with cell 0 at the top left visually), a cell of N-1 and operation of IKImageBrowserDropOn would specify a drop on the last cell.  To specify a drop after the last cell, one would use an index of N and IKImageBrowserDropBefore for the operation.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(dropOperation))]
        #[unsafe(method_family = none)]
        pub unsafe fn dropOperation(&self) -> IKImageBrowserDropOperation;

        /// Controls whether the user can drop on items. Default is NO.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setAllowsDroppingOnItems:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAllowsDroppingOnItems(&self, flag: bool);

        /// Returns YES if the receiver allows the user to drop on items, NO otherwise.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(allowsDroppingOnItems))]
        #[unsafe(method_family = none)]
        pub unsafe fn allowsDroppingOnItems(&self) -> bool;

        /// Used if you wish to �retarget� the proposed drop.
        ///
        /// To specify a drop on the second item, one would specify index as 1, and operation as IKImageBrowserDropOn. To specify a drop after the last item, one would specify index as the number of items and operation as IKImageBrowserDropBefore. Passing a value of �1 for index, and IKImageBrowserDropOn as the operation causes the entire browser view to be highlighted rather than a specific item. This is useful if the data displayed by the receiver does not allow the user to drop items at a specific item location.
        #[deprecated = "Deprecated - Please use NSCollectionView instead"]
        #[unsafe(method(setDropIndex:dropOperation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDropIndex_dropOperation(
            &self,
            index: NSInteger,
            operation: IKImageBrowserDropOperation,
        );
    );
}

mod private_NSObjectIKImageBrowserDelegate {
    pub trait Sealed {}
}

/// Category "IKImageBrowserDelegate" on [`NSObject`].
///
/// Informal protocol for image browser 's delegate
#[doc(alias = "IKImageBrowserDelegate")]
pub unsafe trait NSObjectIKImageBrowserDelegate:
    ClassType + Sized + private_NSObjectIKImageBrowserDelegate::Sealed
{
    extern_methods!(
        /// Invoked by 'aBrowser' when the selection did change
        ///
        /// # Safety
        ///
        /// `a_browser` might not allow `None`.
        #[unsafe(method(imageBrowserSelectionDidChange:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowserSelectionDidChange(&self, a_browser: Option<&IKImageBrowserView>);

        /// Invoked by 'aBrowser' when a cell was double clicked.
        ///
        /// Parameter `index`: Index of the cell that was double clicked.
        ///
        /// # Safety
        ///
        /// `a_browser` might not allow `None`.
        #[unsafe(method(imageBrowser:cellWasDoubleClickedAtIndex:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_cellWasDoubleClickedAtIndex(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            index: NSUInteger,
        );

        /// Invoked by 'aBrowser' when a cell was right clicked or left clicked with the Alt key pressed.
        ///
        /// Parameter `index`: Index of the cell that was right clicked.
        ///
        /// # Safety
        ///
        /// - `a_browser` might not allow `None`.
        /// - `event` might not allow `None`.
        #[unsafe(method(imageBrowser:cellWasRightClickedAtIndex:withEvent:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_cellWasRightClickedAtIndex_withEvent(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            index: NSUInteger,
            event: Option<&NSEvent>,
        );

        /// Invoked by 'aBrowser' when a the background was right clicked or left clicked with the Alt key pressed.
        ///
        /// # Safety
        ///
        /// - `a_browser` might not allow `None`.
        /// - `event` might not allow `None`.
        #[unsafe(method(imageBrowser:backgroundWasRightClickedWithEvent:))]
        #[unsafe(method_family = none)]
        unsafe fn imageBrowser_backgroundWasRightClickedWithEvent(
            &self,
            a_browser: Option<&IKImageBrowserView>,
            event: Option<&NSEvent>,
        );
    );
}

impl private_NSObjectIKImageBrowserDelegate::Sealed for NSObject {}
unsafe impl NSObjectIKImageBrowserDelegate for NSObject {}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserpathrepresentationtype?language=objc)
    pub static IKImageBrowserPathRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsurlrepresentationtype?language=objc)
    pub static IKImageBrowserNSURLRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsimagerepresentationtype?language=objc)
    pub static IKImageBrowserNSImageRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercgimagerepresentationtype?language=objc)
    pub static IKImageBrowserCGImageRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercgimagesourcerepresentationtype?language=objc)
    pub static IKImageBrowserCGImageSourceRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsdatarepresentationtype?language=objc)
    pub static IKImageBrowserNSDataRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsbitmapimagerepresentationtype?language=objc)
    pub static IKImageBrowserNSBitmapImageRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqtmovierepresentationtype?language=objc)
    pub static IKImageBrowserQTMovieRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqtmoviepathrepresentationtype?language=objc)
    pub static IKImageBrowserQTMoviePathRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqccompositionrepresentationtype?language=objc)
    pub static IKImageBrowserQCCompositionRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqccompositionpathrepresentationtype?language=objc)
    pub static IKImageBrowserQCCompositionPathRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserquicklookpathrepresentationtype?language=objc)
    pub static IKImageBrowserQuickLookPathRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsericonrefpathrepresentationtype?language=objc)
    pub static IKImageBrowserIconRefPathRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsericonrefrepresentationtype?language=objc)
    pub static IKImageBrowserIconRefRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserpdfpagerepresentationtype?language=objc)
    pub static IKImageBrowserPDFPageRepresentationType: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserbackgroundcolorkey?language=objc)
    pub static IKImageBrowserBackgroundColorKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserselectioncolorkey?language=objc)
    pub static IKImageBrowserSelectionColorKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellsoutlinecolorkey?language=objc)
    pub static IKImageBrowserCellsOutlineColorKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellstitleattributeskey?language=objc)
    pub static IKImageBrowserCellsTitleAttributesKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellshighlightedtitleattributeskey?language=objc)
    pub static IKImageBrowserCellsHighlightedTitleAttributesKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellssubtitleattributeskey?language=objc)
    pub static IKImageBrowserCellsSubtitleAttributesKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergrouprangekey?language=objc)
    pub static IKImageBrowserGroupRangeKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupbackgroundcolorkey?language=objc)
    pub static IKImageBrowserGroupBackgroundColorKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergrouptitlekey?language=objc)
    pub static IKImageBrowserGroupTitleKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupstylekey?language=objc)
    pub static IKImageBrowserGroupStyleKey: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupheaderlayer?language=objc)
    pub static IKImageBrowserGroupHeaderLayer: Option<&'static NSString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupfooterlayer?language=objc)
    pub static IKImageBrowserGroupFooterLayer: Option<&'static NSString>;
}