objc2_app_kit/generated/
NSBrowser.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/nsappkitversionnumberwithcontinuousscrollingbrowser?language=objc)
13#[cfg(feature = "NSApplication")]
14pub static NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0 as _;
15
16/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsappkitversionnumberwithcolumnresizingbrowser?language=objc)
17#[cfg(feature = "NSApplication")]
18pub static NSAppKitVersionNumberWithColumnResizingBrowser: NSAppKitVersion = 685.0 as _;
19
20/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbrowsercolumnsautosavename?language=objc)
21pub type NSBrowserColumnsAutosaveName = NSString;
22
23/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbrowsercolumnresizingtype?language=objc)
24// NS_ENUM
25#[repr(transparent)]
26#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
27pub struct NSBrowserColumnResizingType(pub NSUInteger);
28impl NSBrowserColumnResizingType {
29    #[doc(alias = "NSBrowserNoColumnResizing")]
30    pub const NoColumnResizing: Self = Self(0);
31    #[doc(alias = "NSBrowserAutoColumnResizing")]
32    pub const AutoColumnResizing: Self = Self(1);
33    #[doc(alias = "NSBrowserUserColumnResizing")]
34    pub const UserColumnResizing: Self = Self(2);
35}
36
37unsafe impl Encode for NSBrowserColumnResizingType {
38    const ENCODING: Encoding = NSUInteger::ENCODING;
39}
40
41unsafe impl RefEncode for NSBrowserColumnResizingType {
42    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
43}
44
45/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbrowserdropoperation?language=objc)
46// NS_ENUM
47#[repr(transparent)]
48#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
49pub struct NSBrowserDropOperation(pub NSUInteger);
50impl NSBrowserDropOperation {
51    #[doc(alias = "NSBrowserDropOn")]
52    pub const On: Self = Self(0);
53    #[doc(alias = "NSBrowserDropAbove")]
54    pub const Above: Self = Self(1);
55}
56
57unsafe impl Encode for NSBrowserDropOperation {
58    const ENCODING: Encoding = NSUInteger::ENCODING;
59}
60
61unsafe impl RefEncode for NSBrowserDropOperation {
62    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
63}
64
65extern_class!(
66    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbrowser?language=objc)
67    #[unsafe(super(NSControl, NSView, NSResponder, NSObject))]
68    #[derive(Debug, PartialEq, Eq, Hash)]
69    #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
70    pub struct NSBrowser;
71);
72
73#[cfg(all(
74    feature = "NSAccessibilityProtocols",
75    feature = "NSControl",
76    feature = "NSResponder",
77    feature = "NSView"
78))]
79extern_conformance!(
80    unsafe impl NSAccessibility for NSBrowser {}
81);
82
83#[cfg(all(
84    feature = "NSAccessibilityProtocols",
85    feature = "NSControl",
86    feature = "NSResponder",
87    feature = "NSView"
88))]
89extern_conformance!(
90    unsafe impl NSAccessibilityElementProtocol for NSBrowser {}
91);
92
93#[cfg(all(
94    feature = "NSAnimation",
95    feature = "NSControl",
96    feature = "NSResponder",
97    feature = "NSView"
98))]
99extern_conformance!(
100    unsafe impl NSAnimatablePropertyContainer for NSBrowser {}
101);
102
103#[cfg(all(
104    feature = "NSAppearance",
105    feature = "NSControl",
106    feature = "NSResponder",
107    feature = "NSView"
108))]
109extern_conformance!(
110    unsafe impl NSAppearanceCustomization for NSBrowser {}
111);
112
113#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
114extern_conformance!(
115    unsafe impl NSCoding for NSBrowser {}
116);
117
118#[cfg(all(
119    feature = "NSControl",
120    feature = "NSDragging",
121    feature = "NSResponder",
122    feature = "NSView"
123))]
124extern_conformance!(
125    unsafe impl NSDraggingDestination for NSBrowser {}
126);
127
128#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
129extern_conformance!(
130    unsafe impl NSObjectProtocol for NSBrowser {}
131);
132
133#[cfg(all(
134    feature = "NSControl",
135    feature = "NSResponder",
136    feature = "NSUserInterfaceItemIdentification",
137    feature = "NSView"
138))]
139extern_conformance!(
140    unsafe impl NSUserInterfaceItemIdentification for NSBrowser {}
141);
142
143#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
144impl NSBrowser {
145    extern_methods!(
146        #[unsafe(method(cellClass))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn cellClass(mtm: MainThreadMarker) -> &'static AnyClass;
149
150        #[unsafe(method(loadColumnZero))]
151        #[unsafe(method_family = none)]
152        pub unsafe fn loadColumnZero(&self);
153
154        #[unsafe(method(isLoaded))]
155        #[unsafe(method_family = none)]
156        pub unsafe fn isLoaded(&self) -> bool;
157
158        #[unsafe(method(doubleAction))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn doubleAction(&self) -> Option<Sel>;
161
162        /// Setter for [`doubleAction`][Self::doubleAction].
163        #[unsafe(method(setDoubleAction:))]
164        #[unsafe(method_family = none)]
165        pub unsafe fn setDoubleAction(&self, double_action: Option<Sel>);
166
167        #[unsafe(method(setCellClass:))]
168        #[unsafe(method_family = none)]
169        pub unsafe fn setCellClass(&self, factory_id: &AnyClass);
170
171        #[unsafe(method(cellPrototype))]
172        #[unsafe(method_family = none)]
173        pub unsafe fn cellPrototype(&self) -> Option<Retained<AnyObject>>;
174
175        /// Setter for [`cellPrototype`][Self::cellPrototype].
176        #[unsafe(method(setCellPrototype:))]
177        #[unsafe(method_family = none)]
178        pub unsafe fn setCellPrototype(&self, cell_prototype: Option<&AnyObject>);
179
180        #[unsafe(method(delegate))]
181        #[unsafe(method_family = none)]
182        pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn NSBrowserDelegate>>>;
183
184        /// This is a [weak property][objc2::topics::weak_property].
185        /// Setter for [`delegate`][Self::delegate].
186        #[unsafe(method(setDelegate:))]
187        #[unsafe(method_family = none)]
188        pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn NSBrowserDelegate>>);
189
190        #[unsafe(method(reusesColumns))]
191        #[unsafe(method_family = none)]
192        pub unsafe fn reusesColumns(&self) -> bool;
193
194        /// Setter for [`reusesColumns`][Self::reusesColumns].
195        #[unsafe(method(setReusesColumns:))]
196        #[unsafe(method_family = none)]
197        pub unsafe fn setReusesColumns(&self, reuses_columns: bool);
198
199        #[unsafe(method(hasHorizontalScroller))]
200        #[unsafe(method_family = none)]
201        pub unsafe fn hasHorizontalScroller(&self) -> bool;
202
203        /// Setter for [`hasHorizontalScroller`][Self::hasHorizontalScroller].
204        #[unsafe(method(setHasHorizontalScroller:))]
205        #[unsafe(method_family = none)]
206        pub unsafe fn setHasHorizontalScroller(&self, has_horizontal_scroller: bool);
207
208        #[unsafe(method(autohidesScroller))]
209        #[unsafe(method_family = none)]
210        pub unsafe fn autohidesScroller(&self) -> bool;
211
212        /// Setter for [`autohidesScroller`][Self::autohidesScroller].
213        #[unsafe(method(setAutohidesScroller:))]
214        #[unsafe(method_family = none)]
215        pub unsafe fn setAutohidesScroller(&self, autohides_scroller: bool);
216
217        #[unsafe(method(separatesColumns))]
218        #[unsafe(method_family = none)]
219        pub unsafe fn separatesColumns(&self) -> bool;
220
221        /// Setter for [`separatesColumns`][Self::separatesColumns].
222        #[unsafe(method(setSeparatesColumns:))]
223        #[unsafe(method_family = none)]
224        pub unsafe fn setSeparatesColumns(&self, separates_columns: bool);
225
226        #[unsafe(method(isTitled))]
227        #[unsafe(method_family = none)]
228        pub unsafe fn isTitled(&self) -> bool;
229
230        /// Setter for [`isTitled`][Self::isTitled].
231        #[unsafe(method(setTitled:))]
232        #[unsafe(method_family = none)]
233        pub unsafe fn setTitled(&self, titled: bool);
234
235        #[cfg(feature = "objc2-core-foundation")]
236        #[unsafe(method(minColumnWidth))]
237        #[unsafe(method_family = none)]
238        pub unsafe fn minColumnWidth(&self) -> CGFloat;
239
240        #[cfg(feature = "objc2-core-foundation")]
241        /// Setter for [`minColumnWidth`][Self::minColumnWidth].
242        #[unsafe(method(setMinColumnWidth:))]
243        #[unsafe(method_family = none)]
244        pub unsafe fn setMinColumnWidth(&self, min_column_width: CGFloat);
245
246        #[unsafe(method(maxVisibleColumns))]
247        #[unsafe(method_family = none)]
248        pub unsafe fn maxVisibleColumns(&self) -> NSInteger;
249
250        /// Setter for [`maxVisibleColumns`][Self::maxVisibleColumns].
251        #[unsafe(method(setMaxVisibleColumns:))]
252        #[unsafe(method_family = none)]
253        pub unsafe fn setMaxVisibleColumns(&self, max_visible_columns: NSInteger);
254
255        #[unsafe(method(allowsMultipleSelection))]
256        #[unsafe(method_family = none)]
257        pub unsafe fn allowsMultipleSelection(&self) -> bool;
258
259        /// Setter for [`allowsMultipleSelection`][Self::allowsMultipleSelection].
260        #[unsafe(method(setAllowsMultipleSelection:))]
261        #[unsafe(method_family = none)]
262        pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool);
263
264        #[unsafe(method(allowsBranchSelection))]
265        #[unsafe(method_family = none)]
266        pub unsafe fn allowsBranchSelection(&self) -> bool;
267
268        /// Setter for [`allowsBranchSelection`][Self::allowsBranchSelection].
269        #[unsafe(method(setAllowsBranchSelection:))]
270        #[unsafe(method_family = none)]
271        pub unsafe fn setAllowsBranchSelection(&self, allows_branch_selection: bool);
272
273        #[unsafe(method(allowsEmptySelection))]
274        #[unsafe(method_family = none)]
275        pub unsafe fn allowsEmptySelection(&self) -> bool;
276
277        /// Setter for [`allowsEmptySelection`][Self::allowsEmptySelection].
278        #[unsafe(method(setAllowsEmptySelection:))]
279        #[unsafe(method_family = none)]
280        pub unsafe fn setAllowsEmptySelection(&self, allows_empty_selection: bool);
281
282        #[unsafe(method(takesTitleFromPreviousColumn))]
283        #[unsafe(method_family = none)]
284        pub unsafe fn takesTitleFromPreviousColumn(&self) -> bool;
285
286        /// Setter for [`takesTitleFromPreviousColumn`][Self::takesTitleFromPreviousColumn].
287        #[unsafe(method(setTakesTitleFromPreviousColumn:))]
288        #[unsafe(method_family = none)]
289        pub unsafe fn setTakesTitleFromPreviousColumn(
290            &self,
291            takes_title_from_previous_column: bool,
292        );
293
294        #[unsafe(method(sendsActionOnArrowKeys))]
295        #[unsafe(method_family = none)]
296        pub unsafe fn sendsActionOnArrowKeys(&self) -> bool;
297
298        /// Setter for [`sendsActionOnArrowKeys`][Self::sendsActionOnArrowKeys].
299        #[unsafe(method(setSendsActionOnArrowKeys:))]
300        #[unsafe(method_family = none)]
301        pub unsafe fn setSendsActionOnArrowKeys(&self, sends_action_on_arrow_keys: bool);
302
303        #[unsafe(method(itemAtIndexPath:))]
304        #[unsafe(method_family = none)]
305        pub unsafe fn itemAtIndexPath(
306            &self,
307            index_path: &NSIndexPath,
308        ) -> Option<Retained<AnyObject>>;
309
310        #[unsafe(method(itemAtRow:inColumn:))]
311        #[unsafe(method_family = none)]
312        pub unsafe fn itemAtRow_inColumn(
313            &self,
314            row: NSInteger,
315            column: NSInteger,
316        ) -> Option<Retained<AnyObject>>;
317
318        #[unsafe(method(indexPathForColumn:))]
319        #[unsafe(method_family = none)]
320        pub unsafe fn indexPathForColumn(&self, column: NSInteger) -> Retained<NSIndexPath>;
321
322        #[unsafe(method(isLeafItem:))]
323        #[unsafe(method_family = none)]
324        pub unsafe fn isLeafItem(&self, item: Option<&AnyObject>) -> bool;
325
326        #[unsafe(method(reloadDataForRowIndexes:inColumn:))]
327        #[unsafe(method_family = none)]
328        pub unsafe fn reloadDataForRowIndexes_inColumn(
329            &self,
330            row_indexes: &NSIndexSet,
331            column: NSInteger,
332        );
333
334        #[unsafe(method(parentForItemsInColumn:))]
335        #[unsafe(method_family = none)]
336        pub unsafe fn parentForItemsInColumn(
337            &self,
338            column: NSInteger,
339        ) -> Option<Retained<AnyObject>>;
340
341        #[unsafe(method(scrollRowToVisible:inColumn:))]
342        #[unsafe(method_family = none)]
343        pub unsafe fn scrollRowToVisible_inColumn(&self, row: NSInteger, column: NSInteger);
344
345        #[unsafe(method(setTitle:ofColumn:))]
346        #[unsafe(method_family = none)]
347        pub unsafe fn setTitle_ofColumn(&self, string: &NSString, column: NSInteger);
348
349        #[unsafe(method(titleOfColumn:))]
350        #[unsafe(method_family = none)]
351        pub unsafe fn titleOfColumn(&self, column: NSInteger) -> Option<Retained<NSString>>;
352
353        #[unsafe(method(pathSeparator))]
354        #[unsafe(method_family = none)]
355        pub unsafe fn pathSeparator(&self) -> Retained<NSString>;
356
357        /// Setter for [`pathSeparator`][Self::pathSeparator].
358        #[unsafe(method(setPathSeparator:))]
359        #[unsafe(method_family = none)]
360        pub unsafe fn setPathSeparator(&self, path_separator: &NSString);
361
362        #[unsafe(method(setPath:))]
363        #[unsafe(method_family = none)]
364        pub unsafe fn setPath(&self, path: &NSString) -> bool;
365
366        #[unsafe(method(path))]
367        #[unsafe(method_family = none)]
368        pub unsafe fn path(&self) -> Retained<NSString>;
369
370        #[unsafe(method(pathToColumn:))]
371        #[unsafe(method_family = none)]
372        pub unsafe fn pathToColumn(&self, column: NSInteger) -> Retained<NSString>;
373
374        #[unsafe(method(clickedColumn))]
375        #[unsafe(method_family = none)]
376        pub unsafe fn clickedColumn(&self) -> NSInteger;
377
378        #[unsafe(method(clickedRow))]
379        #[unsafe(method_family = none)]
380        pub unsafe fn clickedRow(&self) -> NSInteger;
381
382        #[unsafe(method(selectedColumn))]
383        #[unsafe(method_family = none)]
384        pub unsafe fn selectedColumn(&self) -> NSInteger;
385
386        #[unsafe(method(selectedCell))]
387        #[unsafe(method_family = none)]
388        pub unsafe fn selectedCell(&self) -> Option<Retained<AnyObject>>;
389
390        #[unsafe(method(selectedCellInColumn:))]
391        #[unsafe(method_family = none)]
392        pub unsafe fn selectedCellInColumn(&self, column: NSInteger)
393            -> Option<Retained<AnyObject>>;
394
395        #[cfg(feature = "NSCell")]
396        #[unsafe(method(selectedCells))]
397        #[unsafe(method_family = none)]
398        pub unsafe fn selectedCells(&self) -> Option<Retained<NSArray<NSCell>>>;
399
400        #[unsafe(method(selectRow:inColumn:))]
401        #[unsafe(method_family = none)]
402        pub unsafe fn selectRow_inColumn(&self, row: NSInteger, column: NSInteger);
403
404        #[unsafe(method(selectedRowInColumn:))]
405        #[unsafe(method_family = none)]
406        pub unsafe fn selectedRowInColumn(&self, column: NSInteger) -> NSInteger;
407
408        #[unsafe(method(selectionIndexPath))]
409        #[unsafe(method_family = none)]
410        pub unsafe fn selectionIndexPath(&self) -> Option<Retained<NSIndexPath>>;
411
412        /// Setter for [`selectionIndexPath`][Self::selectionIndexPath].
413        #[unsafe(method(setSelectionIndexPath:))]
414        #[unsafe(method_family = none)]
415        pub unsafe fn setSelectionIndexPath(&self, selection_index_path: Option<&NSIndexPath>);
416
417        #[unsafe(method(selectionIndexPaths))]
418        #[unsafe(method_family = none)]
419        pub unsafe fn selectionIndexPaths(&self) -> Retained<NSArray<NSIndexPath>>;
420
421        /// Setter for [`selectionIndexPaths`][Self::selectionIndexPaths].
422        #[unsafe(method(setSelectionIndexPaths:))]
423        #[unsafe(method_family = none)]
424        pub unsafe fn setSelectionIndexPaths(&self, selection_index_paths: &NSArray<NSIndexPath>);
425
426        #[unsafe(method(selectRowIndexes:inColumn:))]
427        #[unsafe(method_family = none)]
428        pub unsafe fn selectRowIndexes_inColumn(&self, indexes: &NSIndexSet, column: NSInteger);
429
430        #[unsafe(method(selectedRowIndexesInColumn:))]
431        #[unsafe(method_family = none)]
432        pub unsafe fn selectedRowIndexesInColumn(
433            &self,
434            column: NSInteger,
435        ) -> Option<Retained<NSIndexSet>>;
436
437        #[unsafe(method(reloadColumn:))]
438        #[unsafe(method_family = none)]
439        pub unsafe fn reloadColumn(&self, column: NSInteger);
440
441        #[unsafe(method(validateVisibleColumns))]
442        #[unsafe(method_family = none)]
443        pub unsafe fn validateVisibleColumns(&self);
444
445        #[unsafe(method(scrollColumnsRightBy:))]
446        #[unsafe(method_family = none)]
447        pub unsafe fn scrollColumnsRightBy(&self, shift_amount: NSInteger);
448
449        #[unsafe(method(scrollColumnsLeftBy:))]
450        #[unsafe(method_family = none)]
451        pub unsafe fn scrollColumnsLeftBy(&self, shift_amount: NSInteger);
452
453        #[unsafe(method(scrollColumnToVisible:))]
454        #[unsafe(method_family = none)]
455        pub unsafe fn scrollColumnToVisible(&self, column: NSInteger);
456
457        #[unsafe(method(lastColumn))]
458        #[unsafe(method_family = none)]
459        pub unsafe fn lastColumn(&self) -> NSInteger;
460
461        /// Setter for [`lastColumn`][Self::lastColumn].
462        #[unsafe(method(setLastColumn:))]
463        #[unsafe(method_family = none)]
464        pub unsafe fn setLastColumn(&self, last_column: NSInteger);
465
466        #[unsafe(method(addColumn))]
467        #[unsafe(method_family = none)]
468        pub unsafe fn addColumn(&self);
469
470        #[unsafe(method(numberOfVisibleColumns))]
471        #[unsafe(method_family = none)]
472        pub unsafe fn numberOfVisibleColumns(&self) -> NSInteger;
473
474        #[unsafe(method(firstVisibleColumn))]
475        #[unsafe(method_family = none)]
476        pub unsafe fn firstVisibleColumn(&self) -> NSInteger;
477
478        #[unsafe(method(lastVisibleColumn))]
479        #[unsafe(method_family = none)]
480        pub unsafe fn lastVisibleColumn(&self) -> NSInteger;
481
482        #[unsafe(method(loadedCellAtRow:column:))]
483        #[unsafe(method_family = none)]
484        pub unsafe fn loadedCellAtRow_column(
485            &self,
486            row: NSInteger,
487            col: NSInteger,
488        ) -> Option<Retained<AnyObject>>;
489
490        #[unsafe(method(selectAll:))]
491        #[unsafe(method_family = none)]
492        pub unsafe fn selectAll(&self, sender: Option<&AnyObject>);
493
494        #[unsafe(method(tile))]
495        #[unsafe(method_family = none)]
496        pub unsafe fn tile(&self);
497
498        #[unsafe(method(doClick:))]
499        #[unsafe(method_family = none)]
500        pub unsafe fn doClick(&self, sender: Option<&AnyObject>);
501
502        #[unsafe(method(doDoubleClick:))]
503        #[unsafe(method_family = none)]
504        pub unsafe fn doDoubleClick(&self, sender: Option<&AnyObject>);
505
506        #[unsafe(method(sendAction))]
507        #[unsafe(method_family = none)]
508        pub unsafe fn sendAction(&self) -> bool;
509
510        #[unsafe(method(titleFrameOfColumn:))]
511        #[unsafe(method_family = none)]
512        pub unsafe fn titleFrameOfColumn(&self, column: NSInteger) -> NSRect;
513
514        #[unsafe(method(drawTitleOfColumn:inRect:))]
515        #[unsafe(method_family = none)]
516        pub unsafe fn drawTitleOfColumn_inRect(&self, column: NSInteger, rect: NSRect);
517
518        #[cfg(feature = "objc2-core-foundation")]
519        #[unsafe(method(titleHeight))]
520        #[unsafe(method_family = none)]
521        pub unsafe fn titleHeight(&self) -> CGFloat;
522
523        #[unsafe(method(frameOfColumn:))]
524        #[unsafe(method_family = none)]
525        pub unsafe fn frameOfColumn(&self, column: NSInteger) -> NSRect;
526
527        #[unsafe(method(frameOfInsideOfColumn:))]
528        #[unsafe(method_family = none)]
529        pub unsafe fn frameOfInsideOfColumn(&self, column: NSInteger) -> NSRect;
530
531        #[unsafe(method(frameOfRow:inColumn:))]
532        #[unsafe(method_family = none)]
533        pub unsafe fn frameOfRow_inColumn(&self, row: NSInteger, column: NSInteger) -> NSRect;
534
535        #[unsafe(method(getRow:column:forPoint:))]
536        #[unsafe(method_family = none)]
537        pub unsafe fn getRow_column_forPoint(
538            &self,
539            row: *mut NSInteger,
540            column: *mut NSInteger,
541            point: NSPoint,
542        ) -> bool;
543
544        #[cfg(feature = "objc2-core-foundation")]
545        #[unsafe(method(columnWidthForColumnContentWidth:))]
546        #[unsafe(method_family = none)]
547        pub unsafe fn columnWidthForColumnContentWidth(
548            &self,
549            column_content_width: CGFloat,
550        ) -> CGFloat;
551
552        #[cfg(feature = "objc2-core-foundation")]
553        #[unsafe(method(columnContentWidthForColumnWidth:))]
554        #[unsafe(method_family = none)]
555        pub unsafe fn columnContentWidthForColumnWidth(&self, column_width: CGFloat) -> CGFloat;
556
557        #[unsafe(method(columnResizingType))]
558        #[unsafe(method_family = none)]
559        pub unsafe fn columnResizingType(&self) -> NSBrowserColumnResizingType;
560
561        /// Setter for [`columnResizingType`][Self::columnResizingType].
562        #[unsafe(method(setColumnResizingType:))]
563        #[unsafe(method_family = none)]
564        pub unsafe fn setColumnResizingType(
565            &self,
566            column_resizing_type: NSBrowserColumnResizingType,
567        );
568
569        #[unsafe(method(prefersAllColumnUserResizing))]
570        #[unsafe(method_family = none)]
571        pub unsafe fn prefersAllColumnUserResizing(&self) -> bool;
572
573        /// Setter for [`prefersAllColumnUserResizing`][Self::prefersAllColumnUserResizing].
574        #[unsafe(method(setPrefersAllColumnUserResizing:))]
575        #[unsafe(method_family = none)]
576        pub unsafe fn setPrefersAllColumnUserResizing(
577            &self,
578            prefers_all_column_user_resizing: bool,
579        );
580
581        #[cfg(feature = "objc2-core-foundation")]
582        #[unsafe(method(setWidth:ofColumn:))]
583        #[unsafe(method_family = none)]
584        pub unsafe fn setWidth_ofColumn(&self, column_width: CGFloat, column_index: NSInteger);
585
586        #[cfg(feature = "objc2-core-foundation")]
587        #[unsafe(method(widthOfColumn:))]
588        #[unsafe(method_family = none)]
589        pub unsafe fn widthOfColumn(&self, column: NSInteger) -> CGFloat;
590
591        #[cfg(feature = "objc2-core-foundation")]
592        #[unsafe(method(rowHeight))]
593        #[unsafe(method_family = none)]
594        pub unsafe fn rowHeight(&self) -> CGFloat;
595
596        #[cfg(feature = "objc2-core-foundation")]
597        /// Setter for [`rowHeight`][Self::rowHeight].
598        #[unsafe(method(setRowHeight:))]
599        #[unsafe(method_family = none)]
600        pub unsafe fn setRowHeight(&self, row_height: CGFloat);
601
602        #[unsafe(method(noteHeightOfRowsWithIndexesChanged:inColumn:))]
603        #[unsafe(method_family = none)]
604        pub unsafe fn noteHeightOfRowsWithIndexesChanged_inColumn(
605            &self,
606            index_set: &NSIndexSet,
607            column_index: NSInteger,
608        );
609
610        #[cfg(feature = "objc2-core-foundation")]
611        #[unsafe(method(setDefaultColumnWidth:))]
612        #[unsafe(method_family = none)]
613        pub unsafe fn setDefaultColumnWidth(&self, column_width: CGFloat);
614
615        #[cfg(feature = "objc2-core-foundation")]
616        #[unsafe(method(defaultColumnWidth))]
617        #[unsafe(method_family = none)]
618        pub unsafe fn defaultColumnWidth(&self) -> CGFloat;
619
620        #[unsafe(method(columnsAutosaveName))]
621        #[unsafe(method_family = none)]
622        pub unsafe fn columnsAutosaveName(&self) -> Retained<NSBrowserColumnsAutosaveName>;
623
624        /// Setter for [`columnsAutosaveName`][Self::columnsAutosaveName].
625        #[unsafe(method(setColumnsAutosaveName:))]
626        #[unsafe(method_family = none)]
627        pub unsafe fn setColumnsAutosaveName(
628            &self,
629            columns_autosave_name: &NSBrowserColumnsAutosaveName,
630        );
631
632        #[unsafe(method(removeSavedColumnsWithAutosaveName:))]
633        #[unsafe(method_family = none)]
634        pub unsafe fn removeSavedColumnsWithAutosaveName(
635            name: &NSBrowserColumnsAutosaveName,
636            mtm: MainThreadMarker,
637        );
638
639        #[cfg(feature = "NSEvent")]
640        #[unsafe(method(canDragRowsWithIndexes:inColumn:withEvent:))]
641        #[unsafe(method_family = none)]
642        pub unsafe fn canDragRowsWithIndexes_inColumn_withEvent(
643            &self,
644            row_indexes: &NSIndexSet,
645            column: NSInteger,
646            event: &NSEvent,
647        ) -> bool;
648
649        #[cfg(all(feature = "NSEvent", feature = "NSImage"))]
650        #[unsafe(method(draggingImageForRowsWithIndexes:inColumn:withEvent:offset:))]
651        #[unsafe(method_family = none)]
652        pub unsafe fn draggingImageForRowsWithIndexes_inColumn_withEvent_offset(
653            &self,
654            row_indexes: &NSIndexSet,
655            column: NSInteger,
656            event: &NSEvent,
657            drag_image_offset: NSPointPointer,
658        ) -> Option<Retained<NSImage>>;
659
660        #[cfg(feature = "NSDragging")]
661        #[unsafe(method(setDraggingSourceOperationMask:forLocal:))]
662        #[unsafe(method_family = none)]
663        pub unsafe fn setDraggingSourceOperationMask_forLocal(
664            &self,
665            mask: NSDragOperation,
666            is_local: bool,
667        );
668
669        #[unsafe(method(allowsTypeSelect))]
670        #[unsafe(method_family = none)]
671        pub unsafe fn allowsTypeSelect(&self) -> bool;
672
673        /// Setter for [`allowsTypeSelect`][Self::allowsTypeSelect].
674        #[unsafe(method(setAllowsTypeSelect:))]
675        #[unsafe(method_family = none)]
676        pub unsafe fn setAllowsTypeSelect(&self, allows_type_select: bool);
677
678        #[cfg(feature = "NSColor")]
679        #[unsafe(method(backgroundColor))]
680        #[unsafe(method_family = none)]
681        pub unsafe fn backgroundColor(&self) -> Retained<NSColor>;
682
683        #[cfg(feature = "NSColor")]
684        /// Setter for [`backgroundColor`][Self::backgroundColor].
685        #[unsafe(method(setBackgroundColor:))]
686        #[unsafe(method_family = none)]
687        pub unsafe fn setBackgroundColor(&self, background_color: &NSColor);
688
689        #[cfg(feature = "NSEvent")]
690        #[unsafe(method(editItemAtIndexPath:withEvent:select:))]
691        #[unsafe(method_family = none)]
692        pub unsafe fn editItemAtIndexPath_withEvent_select(
693            &self,
694            index_path: &NSIndexPath,
695            event: Option<&NSEvent>,
696            select: bool,
697        );
698    );
699}
700
701/// Methods declared on superclass `NSControl`.
702#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
703impl NSBrowser {
704    extern_methods!(
705        #[unsafe(method(initWithFrame:))]
706        #[unsafe(method_family = init)]
707        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
708
709        #[unsafe(method(initWithCoder:))]
710        #[unsafe(method_family = init)]
711        pub unsafe fn initWithCoder(
712            this: Allocated<Self>,
713            coder: &NSCoder,
714        ) -> Option<Retained<Self>>;
715    );
716}
717
718/// Methods declared on superclass `NSResponder`.
719#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
720impl NSBrowser {
721    extern_methods!(
722        #[unsafe(method(init))]
723        #[unsafe(method_family = init)]
724        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
725    );
726}
727
728/// Methods declared on superclass `NSObject`.
729#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
730impl NSBrowser {
731    extern_methods!(
732        #[unsafe(method(new))]
733        #[unsafe(method_family = new)]
734        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
735    );
736}
737
738extern "C" {
739    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbrowsercolumnconfigurationdidchangenotification?language=objc)
740    pub static NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName;
741}
742
743extern_protocol!(
744    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbrowserdelegate?language=objc)
745    pub unsafe trait NSBrowserDelegate: NSObjectProtocol + MainThreadOnly {
746        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
747        #[optional]
748        #[unsafe(method(browser:numberOfRowsInColumn:))]
749        #[unsafe(method_family = none)]
750        unsafe fn browser_numberOfRowsInColumn(
751            &self,
752            sender: &NSBrowser,
753            column: NSInteger,
754        ) -> NSInteger;
755
756        #[cfg(all(
757            feature = "NSControl",
758            feature = "NSMatrix",
759            feature = "NSResponder",
760            feature = "NSView"
761        ))]
762        #[optional]
763        #[unsafe(method(browser:createRowsForColumn:inMatrix:))]
764        #[unsafe(method_family = none)]
765        unsafe fn browser_createRowsForColumn_inMatrix(
766            &self,
767            sender: &NSBrowser,
768            column: NSInteger,
769            matrix: &NSMatrix,
770        );
771
772        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
773        #[optional]
774        #[unsafe(method(browser:numberOfChildrenOfItem:))]
775        #[unsafe(method_family = none)]
776        unsafe fn browser_numberOfChildrenOfItem(
777            &self,
778            browser: &NSBrowser,
779            item: Option<&AnyObject>,
780        ) -> NSInteger;
781
782        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
783        #[optional]
784        #[unsafe(method(browser:child:ofItem:))]
785        #[unsafe(method_family = none)]
786        unsafe fn browser_child_ofItem(
787            &self,
788            browser: &NSBrowser,
789            index: NSInteger,
790            item: Option<&AnyObject>,
791        ) -> Retained<AnyObject>;
792
793        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
794        #[optional]
795        #[unsafe(method(browser:isLeafItem:))]
796        #[unsafe(method_family = none)]
797        unsafe fn browser_isLeafItem(&self, browser: &NSBrowser, item: Option<&AnyObject>) -> bool;
798
799        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
800        #[optional]
801        #[unsafe(method(browser:objectValueForItem:))]
802        #[unsafe(method_family = none)]
803        unsafe fn browser_objectValueForItem(
804            &self,
805            browser: &NSBrowser,
806            item: Option<&AnyObject>,
807        ) -> Option<Retained<AnyObject>>;
808
809        #[cfg(all(
810            feature = "NSControl",
811            feature = "NSResponder",
812            feature = "NSView",
813            feature = "objc2-core-foundation"
814        ))]
815        #[optional]
816        #[unsafe(method(browser:heightOfRow:inColumn:))]
817        #[unsafe(method_family = none)]
818        unsafe fn browser_heightOfRow_inColumn(
819            &self,
820            browser: &NSBrowser,
821            row: NSInteger,
822            column_index: NSInteger,
823        ) -> CGFloat;
824
825        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
826        #[optional]
827        #[unsafe(method(rootItemForBrowser:))]
828        #[unsafe(method_family = none)]
829        unsafe fn rootItemForBrowser(&self, browser: &NSBrowser) -> Option<Retained<AnyObject>>;
830
831        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
832        #[optional]
833        #[unsafe(method(browser:setObjectValue:forItem:))]
834        #[unsafe(method_family = none)]
835        unsafe fn browser_setObjectValue_forItem(
836            &self,
837            browser: &NSBrowser,
838            object: Option<&AnyObject>,
839            item: Option<&AnyObject>,
840        );
841
842        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
843        #[optional]
844        #[unsafe(method(browser:shouldEditItem:))]
845        #[unsafe(method_family = none)]
846        unsafe fn browser_shouldEditItem(
847            &self,
848            browser: &NSBrowser,
849            item: Option<&AnyObject>,
850        ) -> bool;
851
852        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
853        #[optional]
854        #[unsafe(method(browser:willDisplayCell:atRow:column:))]
855        #[unsafe(method_family = none)]
856        unsafe fn browser_willDisplayCell_atRow_column(
857            &self,
858            sender: &NSBrowser,
859            cell: &AnyObject,
860            row: NSInteger,
861            column: NSInteger,
862        );
863
864        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
865        #[optional]
866        #[unsafe(method(browser:titleOfColumn:))]
867        #[unsafe(method_family = none)]
868        unsafe fn browser_titleOfColumn(
869            &self,
870            sender: &NSBrowser,
871            column: NSInteger,
872        ) -> Option<Retained<NSString>>;
873
874        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
875        #[optional]
876        #[unsafe(method(browser:selectCellWithString:inColumn:))]
877        #[unsafe(method_family = none)]
878        unsafe fn browser_selectCellWithString_inColumn(
879            &self,
880            sender: &NSBrowser,
881            title: &NSString,
882            column: NSInteger,
883        ) -> bool;
884
885        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
886        #[optional]
887        #[unsafe(method(browser:selectRow:inColumn:))]
888        #[unsafe(method_family = none)]
889        unsafe fn browser_selectRow_inColumn(
890            &self,
891            sender: &NSBrowser,
892            row: NSInteger,
893            column: NSInteger,
894        ) -> bool;
895
896        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
897        #[optional]
898        #[unsafe(method(browser:isColumnValid:))]
899        #[unsafe(method_family = none)]
900        unsafe fn browser_isColumnValid(&self, sender: &NSBrowser, column: NSInteger) -> bool;
901
902        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
903        #[optional]
904        #[unsafe(method(browserWillScroll:))]
905        #[unsafe(method_family = none)]
906        unsafe fn browserWillScroll(&self, sender: &NSBrowser);
907
908        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
909        #[optional]
910        #[unsafe(method(browserDidScroll:))]
911        #[unsafe(method_family = none)]
912        unsafe fn browserDidScroll(&self, sender: &NSBrowser);
913
914        #[cfg(all(
915            feature = "NSControl",
916            feature = "NSResponder",
917            feature = "NSView",
918            feature = "objc2-core-foundation"
919        ))]
920        #[optional]
921        #[unsafe(method(browser:shouldSizeColumn:forUserResize:toWidth:))]
922        #[unsafe(method_family = none)]
923        unsafe fn browser_shouldSizeColumn_forUserResize_toWidth(
924            &self,
925            browser: &NSBrowser,
926            column_index: NSInteger,
927            for_user_resize: bool,
928            suggested_width: CGFloat,
929        ) -> CGFloat;
930
931        #[cfg(all(
932            feature = "NSControl",
933            feature = "NSResponder",
934            feature = "NSView",
935            feature = "objc2-core-foundation"
936        ))]
937        #[optional]
938        #[unsafe(method(browser:sizeToFitWidthOfColumn:))]
939        #[unsafe(method_family = none)]
940        unsafe fn browser_sizeToFitWidthOfColumn(
941            &self,
942            browser: &NSBrowser,
943            column_index: NSInteger,
944        ) -> CGFloat;
945
946        #[optional]
947        #[unsafe(method(browserColumnConfigurationDidChange:))]
948        #[unsafe(method_family = none)]
949        unsafe fn browserColumnConfigurationDidChange(&self, notification: &NSNotification);
950
951        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
952        #[optional]
953        #[unsafe(method(browser:shouldShowCellExpansionForRow:column:))]
954        #[unsafe(method_family = none)]
955        unsafe fn browser_shouldShowCellExpansionForRow_column(
956            &self,
957            browser: &NSBrowser,
958            row: NSInteger,
959            column: NSInteger,
960        ) -> bool;
961
962        #[cfg(all(
963            feature = "NSControl",
964            feature = "NSPasteboard",
965            feature = "NSResponder",
966            feature = "NSView"
967        ))]
968        #[optional]
969        #[unsafe(method(browser:writeRowsWithIndexes:inColumn:toPasteboard:))]
970        #[unsafe(method_family = none)]
971        unsafe fn browser_writeRowsWithIndexes_inColumn_toPasteboard(
972            &self,
973            browser: &NSBrowser,
974            row_indexes: &NSIndexSet,
975            column: NSInteger,
976            pasteboard: &NSPasteboard,
977        ) -> bool;
978
979        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
980        #[deprecated = "Use NSFilePromiseReceiver objects instead"]
981        #[optional]
982        #[unsafe(method(browser:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:inColumn:))]
983        #[unsafe(method_family = none)]
984        unsafe fn browser_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_inColumn(
985            &self,
986            browser: &NSBrowser,
987            drop_destination: &NSURL,
988            row_indexes: &NSIndexSet,
989            column: NSInteger,
990        ) -> Retained<NSArray<NSString>>;
991
992        #[cfg(all(
993            feature = "NSControl",
994            feature = "NSEvent",
995            feature = "NSResponder",
996            feature = "NSView"
997        ))]
998        #[optional]
999        #[unsafe(method(browser:canDragRowsWithIndexes:inColumn:withEvent:))]
1000        #[unsafe(method_family = none)]
1001        unsafe fn browser_canDragRowsWithIndexes_inColumn_withEvent(
1002            &self,
1003            browser: &NSBrowser,
1004            row_indexes: &NSIndexSet,
1005            column: NSInteger,
1006            event: &NSEvent,
1007        ) -> bool;
1008
1009        #[cfg(all(
1010            feature = "NSControl",
1011            feature = "NSEvent",
1012            feature = "NSImage",
1013            feature = "NSResponder",
1014            feature = "NSView"
1015        ))]
1016        #[optional]
1017        #[unsafe(method(browser:draggingImageForRowsWithIndexes:inColumn:withEvent:offset:))]
1018        #[unsafe(method_family = none)]
1019        unsafe fn browser_draggingImageForRowsWithIndexes_inColumn_withEvent_offset(
1020            &self,
1021            browser: &NSBrowser,
1022            row_indexes: &NSIndexSet,
1023            column: NSInteger,
1024            event: &NSEvent,
1025            drag_image_offset: NSPointPointer,
1026        ) -> Option<Retained<NSImage>>;
1027
1028        #[cfg(all(
1029            feature = "NSControl",
1030            feature = "NSDragging",
1031            feature = "NSResponder",
1032            feature = "NSView"
1033        ))]
1034        #[optional]
1035        #[unsafe(method(browser:validateDrop:proposedRow:column:dropOperation:))]
1036        #[unsafe(method_family = none)]
1037        unsafe fn browser_validateDrop_proposedRow_column_dropOperation(
1038            &self,
1039            browser: &NSBrowser,
1040            info: &ProtocolObject<dyn NSDraggingInfo>,
1041            row: NonNull<NSInteger>,
1042            column: NonNull<NSInteger>,
1043            drop_operation: NonNull<NSBrowserDropOperation>,
1044        ) -> NSDragOperation;
1045
1046        #[cfg(all(
1047            feature = "NSControl",
1048            feature = "NSDragging",
1049            feature = "NSResponder",
1050            feature = "NSView"
1051        ))]
1052        #[optional]
1053        #[unsafe(method(browser:acceptDrop:atRow:column:dropOperation:))]
1054        #[unsafe(method_family = none)]
1055        unsafe fn browser_acceptDrop_atRow_column_dropOperation(
1056            &self,
1057            browser: &NSBrowser,
1058            info: &ProtocolObject<dyn NSDraggingInfo>,
1059            row: NSInteger,
1060            column: NSInteger,
1061            drop_operation: NSBrowserDropOperation,
1062        ) -> bool;
1063
1064        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
1065        #[optional]
1066        #[unsafe(method(browser:typeSelectStringForRow:inColumn:))]
1067        #[unsafe(method_family = none)]
1068        unsafe fn browser_typeSelectStringForRow_inColumn(
1069            &self,
1070            browser: &NSBrowser,
1071            row: NSInteger,
1072            column: NSInteger,
1073        ) -> Option<Retained<NSString>>;
1074
1075        #[cfg(all(
1076            feature = "NSControl",
1077            feature = "NSEvent",
1078            feature = "NSResponder",
1079            feature = "NSView"
1080        ))]
1081        #[optional]
1082        #[unsafe(method(browser:shouldTypeSelectForEvent:withCurrentSearchString:))]
1083        #[unsafe(method_family = none)]
1084        unsafe fn browser_shouldTypeSelectForEvent_withCurrentSearchString(
1085            &self,
1086            browser: &NSBrowser,
1087            event: &NSEvent,
1088            search_string: Option<&NSString>,
1089        ) -> bool;
1090
1091        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
1092        #[optional]
1093        #[unsafe(method(browser:nextTypeSelectMatchFromRow:toRow:inColumn:forString:))]
1094        #[unsafe(method_family = none)]
1095        unsafe fn browser_nextTypeSelectMatchFromRow_toRow_inColumn_forString(
1096            &self,
1097            browser: &NSBrowser,
1098            start_row: NSInteger,
1099            end_row: NSInteger,
1100            column: NSInteger,
1101            search_string: Option<&NSString>,
1102        ) -> NSInteger;
1103
1104        #[cfg(all(
1105            feature = "NSControl",
1106            feature = "NSResponder",
1107            feature = "NSView",
1108            feature = "NSViewController"
1109        ))]
1110        #[optional]
1111        #[unsafe(method(browser:previewViewControllerForLeafItem:))]
1112        #[unsafe(method_family = none)]
1113        unsafe fn browser_previewViewControllerForLeafItem(
1114            &self,
1115            browser: &NSBrowser,
1116            item: &AnyObject,
1117        ) -> Option<Retained<NSViewController>>;
1118
1119        #[cfg(all(
1120            feature = "NSControl",
1121            feature = "NSResponder",
1122            feature = "NSView",
1123            feature = "NSViewController"
1124        ))]
1125        #[optional]
1126        #[unsafe(method(browser:headerViewControllerForItem:))]
1127        #[unsafe(method_family = none)]
1128        unsafe fn browser_headerViewControllerForItem(
1129            &self,
1130            browser: &NSBrowser,
1131            item: Option<&AnyObject>,
1132        ) -> Option<Retained<NSViewController>>;
1133
1134        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
1135        #[optional]
1136        #[unsafe(method(browser:didChangeLastColumn:toColumn:))]
1137        #[unsafe(method_family = none)]
1138        unsafe fn browser_didChangeLastColumn_toColumn(
1139            &self,
1140            browser: &NSBrowser,
1141            old_last_column: NSInteger,
1142            column: NSInteger,
1143        );
1144
1145        #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
1146        #[optional]
1147        #[unsafe(method(browser:selectionIndexesForProposedSelection:inColumn:))]
1148        #[unsafe(method_family = none)]
1149        unsafe fn browser_selectionIndexesForProposedSelection_inColumn(
1150            &self,
1151            browser: &NSBrowser,
1152            proposed_selection_indexes: &NSIndexSet,
1153            column: NSInteger,
1154        ) -> Retained<NSIndexSet>;
1155    }
1156);
1157
1158/// NSDeprecated.
1159#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
1160impl NSBrowser {
1161    extern_methods!(
1162        #[deprecated]
1163        #[unsafe(method(setAcceptsArrowKeys:))]
1164        #[unsafe(method_family = none)]
1165        pub unsafe fn setAcceptsArrowKeys(&self, flag: bool);
1166
1167        #[deprecated]
1168        #[unsafe(method(acceptsArrowKeys))]
1169        #[unsafe(method_family = none)]
1170        pub unsafe fn acceptsArrowKeys(&self) -> bool;
1171
1172        #[deprecated]
1173        #[unsafe(method(displayColumn:))]
1174        #[unsafe(method_family = none)]
1175        pub unsafe fn displayColumn(&self, column: NSInteger);
1176
1177        #[deprecated]
1178        #[unsafe(method(displayAllColumns))]
1179        #[unsafe(method_family = none)]
1180        pub unsafe fn displayAllColumns(&self);
1181
1182        #[cfg(feature = "NSScroller")]
1183        #[deprecated]
1184        #[unsafe(method(scrollViaScroller:))]
1185        #[unsafe(method_family = none)]
1186        pub unsafe fn scrollViaScroller(&self, sender: Option<&NSScroller>);
1187
1188        #[deprecated]
1189        #[unsafe(method(updateScroller))]
1190        #[unsafe(method_family = none)]
1191        pub unsafe fn updateScroller(&self);
1192
1193        #[deprecated = "Use the item based NSBrowser instead"]
1194        #[unsafe(method(setMatrixClass:))]
1195        #[unsafe(method_family = none)]
1196        pub unsafe fn setMatrixClass(&self, factory_id: &AnyClass);
1197
1198        #[deprecated = "Use the item based NSBrowser instead"]
1199        #[unsafe(method(matrixClass))]
1200        #[unsafe(method_family = none)]
1201        pub unsafe fn matrixClass(&self) -> &'static AnyClass;
1202
1203        #[cfg(feature = "NSMatrix")]
1204        #[deprecated = "Use the item based NSBrowser instead"]
1205        #[unsafe(method(columnOfMatrix:))]
1206        #[unsafe(method_family = none)]
1207        pub unsafe fn columnOfMatrix(&self, matrix: &NSMatrix) -> NSInteger;
1208
1209        #[cfg(feature = "NSMatrix")]
1210        #[deprecated = "Use the item based NSBrowser instead"]
1211        #[unsafe(method(matrixInColumn:))]
1212        #[unsafe(method_family = none)]
1213        pub unsafe fn matrixInColumn(&self, column: NSInteger) -> Option<Retained<NSMatrix>>;
1214    );
1215}