objc2_app_kit/generated/
NSPathComponentCell.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/nspathcomponentcell?language=objc)
12    #[unsafe(super(NSTextFieldCell, NSActionCell, NSCell, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(
15        feature = "NSActionCell",
16        feature = "NSCell",
17        feature = "NSTextFieldCell"
18    ))]
19    pub struct NSPathComponentCell;
20);
21
22#[cfg(all(
23    feature = "NSAccessibilityProtocols",
24    feature = "NSActionCell",
25    feature = "NSCell",
26    feature = "NSTextFieldCell"
27))]
28unsafe impl NSAccessibility for NSPathComponentCell {}
29
30#[cfg(all(
31    feature = "NSAccessibilityProtocols",
32    feature = "NSActionCell",
33    feature = "NSCell",
34    feature = "NSTextFieldCell"
35))]
36unsafe impl NSAccessibilityElementProtocol for NSPathComponentCell {}
37
38#[cfg(all(
39    feature = "NSActionCell",
40    feature = "NSCell",
41    feature = "NSTextFieldCell"
42))]
43unsafe impl NSCoding for NSPathComponentCell {}
44
45#[cfg(all(
46    feature = "NSActionCell",
47    feature = "NSCell",
48    feature = "NSTextFieldCell"
49))]
50unsafe impl NSCopying for NSPathComponentCell {}
51
52#[cfg(all(
53    feature = "NSActionCell",
54    feature = "NSCell",
55    feature = "NSTextFieldCell"
56))]
57unsafe impl CopyingHelper for NSPathComponentCell {
58    type Result = Self;
59}
60
61#[cfg(all(
62    feature = "NSActionCell",
63    feature = "NSCell",
64    feature = "NSTextFieldCell"
65))]
66unsafe impl NSObjectProtocol for NSPathComponentCell {}
67
68#[cfg(all(
69    feature = "NSActionCell",
70    feature = "NSCell",
71    feature = "NSTextFieldCell",
72    feature = "NSUserInterfaceItemIdentification"
73))]
74unsafe impl NSUserInterfaceItemIdentification for NSPathComponentCell {}
75
76#[cfg(all(
77    feature = "NSActionCell",
78    feature = "NSCell",
79    feature = "NSTextFieldCell"
80))]
81impl NSPathComponentCell {
82    extern_methods!(
83        #[cfg(feature = "NSImage")]
84        #[unsafe(method(image))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn image(&self) -> Option<Retained<NSImage>>;
87
88        #[cfg(feature = "NSImage")]
89        /// Setter for [`image`][Self::image].
90        #[unsafe(method(setImage:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setImage(&self, image: Option<&NSImage>);
93
94        #[unsafe(method(URL))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
97
98        /// Setter for [`URL`][Self::URL].
99        #[unsafe(method(setURL:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn setURL(&self, url: Option<&NSURL>);
102    );
103}
104
105/// Methods declared on superclass `NSTextFieldCell`.
106#[cfg(all(
107    feature = "NSActionCell",
108    feature = "NSCell",
109    feature = "NSTextFieldCell"
110))]
111impl NSPathComponentCell {
112    extern_methods!(
113        #[unsafe(method(initTextCell:))]
114        #[unsafe(method_family = init)]
115        pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
116
117        #[unsafe(method(initWithCoder:))]
118        #[unsafe(method_family = init)]
119        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
120
121        #[cfg(feature = "NSImage")]
122        #[unsafe(method(initImageCell:))]
123        #[unsafe(method_family = init)]
124        pub unsafe fn initImageCell(
125            this: Allocated<Self>,
126            image: Option<&NSImage>,
127        ) -> Retained<Self>;
128    );
129}
130
131/// Methods declared on superclass `NSCell`.
132#[cfg(all(
133    feature = "NSActionCell",
134    feature = "NSCell",
135    feature = "NSTextFieldCell"
136))]
137impl NSPathComponentCell {
138    extern_methods!(
139        #[unsafe(method(init))]
140        #[unsafe(method_family = init)]
141        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
142    );
143}
144
145/// Methods declared on superclass `NSObject`.
146#[cfg(all(
147    feature = "NSActionCell",
148    feature = "NSCell",
149    feature = "NSTextFieldCell"
150))]
151impl NSPathComponentCell {
152    extern_methods!(
153        #[unsafe(method(new))]
154        #[unsafe(method_family = new)]
155        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
156    );
157}