objc2_app_kit/generated/
NSActionCell.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSCell, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "NSCell")]
15 pub struct NSActionCell;
16);
17
18#[cfg(all(feature = "NSAccessibilityProtocols", feature = "NSCell"))]
19extern_conformance!(
20 unsafe impl NSAccessibility for NSActionCell {}
21);
22
23#[cfg(all(feature = "NSAccessibilityProtocols", feature = "NSCell"))]
24extern_conformance!(
25 unsafe impl NSAccessibilityElementProtocol for NSActionCell {}
26);
27
28#[cfg(feature = "NSCell")]
29extern_conformance!(
30 unsafe impl NSCoding for NSActionCell {}
31);
32
33#[cfg(feature = "NSCell")]
34extern_conformance!(
35 unsafe impl NSCopying for NSActionCell {}
36);
37
38#[cfg(feature = "NSCell")]
39unsafe impl CopyingHelper for NSActionCell {
40 type Result = Self;
41}
42
43#[cfg(feature = "NSCell")]
44extern_conformance!(
45 unsafe impl NSObjectProtocol for NSActionCell {}
46);
47
48#[cfg(all(feature = "NSCell", feature = "NSUserInterfaceItemIdentification"))]
49extern_conformance!(
50 unsafe impl NSUserInterfaceItemIdentification for NSActionCell {}
51);
52
53#[cfg(feature = "NSCell")]
54impl NSActionCell {
55 extern_methods!(
56 #[unsafe(method(target))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
59
60 #[unsafe(method(setTarget:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
65
66 #[unsafe(method(action))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn action(&self) -> Option<Sel>;
69
70 #[unsafe(method(setAction:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setAction(&self, action: Option<Sel>);
74
75 #[unsafe(method(tag))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn tag(&self) -> NSInteger;
78
79 #[unsafe(method(setTag:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setTag(&self, tag: NSInteger);
83 );
84}
85
86#[cfg(feature = "NSCell")]
88impl NSActionCell {
89 extern_methods!(
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(initTextCell:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
97
98 #[cfg(feature = "NSImage")]
99 #[unsafe(method(initImageCell:))]
100 #[unsafe(method_family = init)]
101 pub unsafe fn initImageCell(
102 this: Allocated<Self>,
103 image: Option<&NSImage>,
104 ) -> Retained<Self>;
105
106 #[unsafe(method(initWithCoder:))]
107 #[unsafe(method_family = init)]
108 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
109 );
110}
111
112#[cfg(feature = "NSCell")]
114impl NSActionCell {
115 extern_methods!(
116 #[unsafe(method(new))]
117 #[unsafe(method_family = new)]
118 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
119 );
120}