objc2_app_kit/generated/
NSTableHeaderView.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
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstableheaderview?language=objc)
14    #[unsafe(super(NSView, NSResponder, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(all(feature = "NSResponder", feature = "NSView"))]
17    pub struct NSTableHeaderView;
18);
19
20#[cfg(all(
21    feature = "NSAccessibilityProtocols",
22    feature = "NSResponder",
23    feature = "NSView"
24))]
25extern_conformance!(
26    unsafe impl NSAccessibility for NSTableHeaderView {}
27);
28
29#[cfg(all(
30    feature = "NSAccessibilityProtocols",
31    feature = "NSResponder",
32    feature = "NSView"
33))]
34extern_conformance!(
35    unsafe impl NSAccessibilityElementProtocol for NSTableHeaderView {}
36);
37
38#[cfg(all(feature = "NSAnimation", feature = "NSResponder", feature = "NSView"))]
39extern_conformance!(
40    unsafe impl NSAnimatablePropertyContainer for NSTableHeaderView {}
41);
42
43#[cfg(all(feature = "NSAppearance", feature = "NSResponder", feature = "NSView"))]
44extern_conformance!(
45    unsafe impl NSAppearanceCustomization for NSTableHeaderView {}
46);
47
48#[cfg(all(feature = "NSResponder", feature = "NSView"))]
49extern_conformance!(
50    unsafe impl NSCoding for NSTableHeaderView {}
51);
52
53#[cfg(all(feature = "NSDragging", feature = "NSResponder", feature = "NSView"))]
54extern_conformance!(
55    unsafe impl NSDraggingDestination for NSTableHeaderView {}
56);
57
58#[cfg(all(feature = "NSResponder", feature = "NSView"))]
59extern_conformance!(
60    unsafe impl NSObjectProtocol for NSTableHeaderView {}
61);
62
63#[cfg(all(
64    feature = "NSResponder",
65    feature = "NSUserInterfaceItemIdentification",
66    feature = "NSView"
67))]
68extern_conformance!(
69    unsafe impl NSUserInterfaceItemIdentification for NSTableHeaderView {}
70);
71
72#[cfg(all(feature = "NSResponder", feature = "NSView"))]
73extern_conformance!(
74    unsafe impl NSViewToolTipOwner for NSTableHeaderView {}
75);
76
77#[cfg(all(feature = "NSResponder", feature = "NSView"))]
78impl NSTableHeaderView {
79    extern_methods!(
80        #[cfg(all(feature = "NSControl", feature = "NSTableView"))]
81        #[unsafe(method(tableView))]
82        #[unsafe(method_family = none)]
83        pub fn tableView(&self) -> Option<Retained<NSTableView>>;
84
85        #[cfg(all(feature = "NSControl", feature = "NSTableView"))]
86        /// Setter for [`tableView`][Self::tableView].
87        ///
88        /// This is a [weak property][objc2::topics::weak_property].
89        #[unsafe(method(setTableView:))]
90        #[unsafe(method_family = none)]
91        pub fn setTableView(&self, table_view: Option<&NSTableView>);
92
93        #[unsafe(method(draggedColumn))]
94        #[unsafe(method_family = none)]
95        pub fn draggedColumn(&self) -> NSInteger;
96
97        #[cfg(feature = "objc2-core-foundation")]
98        #[unsafe(method(draggedDistance))]
99        #[unsafe(method_family = none)]
100        pub fn draggedDistance(&self) -> CGFloat;
101
102        #[unsafe(method(resizedColumn))]
103        #[unsafe(method_family = none)]
104        pub fn resizedColumn(&self) -> NSInteger;
105
106        #[unsafe(method(headerRectOfColumn:))]
107        #[unsafe(method_family = none)]
108        pub fn headerRectOfColumn(&self, column: NSInteger) -> NSRect;
109
110        #[unsafe(method(columnAtPoint:))]
111        #[unsafe(method_family = none)]
112        pub fn columnAtPoint(&self, point: NSPoint) -> NSInteger;
113    );
114}
115
116/// Methods declared on superclass `NSView`.
117#[cfg(all(feature = "NSResponder", feature = "NSView"))]
118impl NSTableHeaderView {
119    extern_methods!(
120        #[unsafe(method(initWithFrame:))]
121        #[unsafe(method_family = init)]
122        pub fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
123
124        /// # Safety
125        ///
126        /// `coder` possibly has further requirements.
127        #[unsafe(method(initWithCoder:))]
128        #[unsafe(method_family = init)]
129        pub unsafe fn initWithCoder(
130            this: Allocated<Self>,
131            coder: &NSCoder,
132        ) -> Option<Retained<Self>>;
133    );
134}
135
136/// Methods declared on superclass `NSResponder`.
137#[cfg(all(feature = "NSResponder", feature = "NSView"))]
138impl NSTableHeaderView {
139    extern_methods!(
140        #[unsafe(method(init))]
141        #[unsafe(method_family = init)]
142        pub fn init(this: Allocated<Self>) -> Retained<Self>;
143    );
144}
145
146/// Methods declared on superclass `NSObject`.
147#[cfg(all(feature = "NSResponder", feature = "NSView"))]
148impl NSTableHeaderView {
149    extern_methods!(
150        #[unsafe(method(new))]
151        #[unsafe(method_family = new)]
152        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
153    );
154}