objc2_app_kit/generated/
NSTableCellView.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstablecellview?language=objc)
12    #[unsafe(super(NSView, NSResponder, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(feature = "NSResponder", feature = "NSView"))]
15    pub struct NSTableCellView;
16);
17
18#[cfg(all(
19    feature = "NSAccessibilityProtocols",
20    feature = "NSResponder",
21    feature = "NSView"
22))]
23extern_conformance!(
24    unsafe impl NSAccessibility for NSTableCellView {}
25);
26
27#[cfg(all(
28    feature = "NSAccessibilityProtocols",
29    feature = "NSResponder",
30    feature = "NSView"
31))]
32extern_conformance!(
33    unsafe impl NSAccessibilityElementProtocol for NSTableCellView {}
34);
35
36#[cfg(all(feature = "NSAnimation", feature = "NSResponder", feature = "NSView"))]
37extern_conformance!(
38    unsafe impl NSAnimatablePropertyContainer for NSTableCellView {}
39);
40
41#[cfg(all(feature = "NSAppearance", feature = "NSResponder", feature = "NSView"))]
42extern_conformance!(
43    unsafe impl NSAppearanceCustomization for NSTableCellView {}
44);
45
46#[cfg(all(feature = "NSResponder", feature = "NSView"))]
47extern_conformance!(
48    unsafe impl NSCoding for NSTableCellView {}
49);
50
51#[cfg(all(feature = "NSDragging", feature = "NSResponder", feature = "NSView"))]
52extern_conformance!(
53    unsafe impl NSDraggingDestination for NSTableCellView {}
54);
55
56#[cfg(all(feature = "NSResponder", feature = "NSView"))]
57extern_conformance!(
58    unsafe impl NSObjectProtocol for NSTableCellView {}
59);
60
61#[cfg(all(
62    feature = "NSResponder",
63    feature = "NSUserInterfaceItemIdentification",
64    feature = "NSView"
65))]
66extern_conformance!(
67    unsafe impl NSUserInterfaceItemIdentification for NSTableCellView {}
68);
69
70#[cfg(all(feature = "NSResponder", feature = "NSView"))]
71impl NSTableCellView {
72    extern_methods!(
73        #[unsafe(method(objectValue))]
74        #[unsafe(method_family = none)]
75        pub fn objectValue(&self) -> Option<Retained<AnyObject>>;
76
77        /// Setter for [`objectValue`][Self::objectValue].
78        ///
79        /// # Safety
80        ///
81        /// `object_value` should be of the correct type.
82        #[unsafe(method(setObjectValue:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn setObjectValue(&self, object_value: Option<&AnyObject>);
85
86        #[cfg(all(feature = "NSControl", feature = "NSTextField"))]
87        /// # Safety
88        ///
89        /// This is not retained internally, you must ensure the object is still alive.
90        #[unsafe(method(textField))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn textField(&self) -> Option<Retained<NSTextField>>;
93
94        #[cfg(all(feature = "NSControl", feature = "NSTextField"))]
95        /// Setter for [`textField`][Self::textField].
96        ///
97        /// # Safety
98        ///
99        /// This is unretained, you must ensure the object is kept alive while in use.
100        #[unsafe(method(setTextField:))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn setTextField(&self, text_field: Option<&NSTextField>);
103
104        #[cfg(all(feature = "NSControl", feature = "NSImageView"))]
105        /// # Safety
106        ///
107        /// This is not retained internally, you must ensure the object is still alive.
108        #[unsafe(method(imageView))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn imageView(&self) -> Option<Retained<NSImageView>>;
111
112        #[cfg(all(feature = "NSControl", feature = "NSImageView"))]
113        /// Setter for [`imageView`][Self::imageView].
114        ///
115        /// # Safety
116        ///
117        /// This is unretained, you must ensure the object is kept alive while in use.
118        #[unsafe(method(setImageView:))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn setImageView(&self, image_view: Option<&NSImageView>);
121
122        #[cfg(feature = "NSCell")]
123        #[unsafe(method(backgroundStyle))]
124        #[unsafe(method_family = none)]
125        pub fn backgroundStyle(&self) -> NSBackgroundStyle;
126
127        #[cfg(feature = "NSCell")]
128        /// Setter for [`backgroundStyle`][Self::backgroundStyle].
129        #[unsafe(method(setBackgroundStyle:))]
130        #[unsafe(method_family = none)]
131        pub fn setBackgroundStyle(&self, background_style: NSBackgroundStyle);
132
133        #[cfg(feature = "NSTableView")]
134        #[unsafe(method(rowSizeStyle))]
135        #[unsafe(method_family = none)]
136        pub fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle;
137
138        #[cfg(feature = "NSTableView")]
139        /// Setter for [`rowSizeStyle`][Self::rowSizeStyle].
140        #[unsafe(method(setRowSizeStyle:))]
141        #[unsafe(method_family = none)]
142        pub fn setRowSizeStyle(&self, row_size_style: NSTableViewRowSizeStyle);
143
144        #[cfg(feature = "NSDraggingItem")]
145        #[unsafe(method(draggingImageComponents))]
146        #[unsafe(method_family = none)]
147        pub fn draggingImageComponents(&self) -> Retained<NSArray<NSDraggingImageComponent>>;
148    );
149}
150
151/// Methods declared on superclass `NSView`.
152#[cfg(all(feature = "NSResponder", feature = "NSView"))]
153impl NSTableCellView {
154    extern_methods!(
155        #[unsafe(method(initWithFrame:))]
156        #[unsafe(method_family = init)]
157        pub fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
158
159        /// # Safety
160        ///
161        /// `coder` possibly has further requirements.
162        #[unsafe(method(initWithCoder:))]
163        #[unsafe(method_family = init)]
164        pub unsafe fn initWithCoder(
165            this: Allocated<Self>,
166            coder: &NSCoder,
167        ) -> Option<Retained<Self>>;
168    );
169}
170
171/// Methods declared on superclass `NSResponder`.
172#[cfg(all(feature = "NSResponder", feature = "NSView"))]
173impl NSTableCellView {
174    extern_methods!(
175        #[unsafe(method(init))]
176        #[unsafe(method_family = init)]
177        pub fn init(this: Allocated<Self>) -> Retained<Self>;
178    );
179}
180
181/// Methods declared on superclass `NSObject`.
182#[cfg(all(feature = "NSResponder", feature = "NSView"))]
183impl NSTableCellView {
184    extern_methods!(
185        #[unsafe(method(new))]
186        #[unsafe(method_family = new)]
187        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
188    );
189}