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"))]
19unsafe impl NSAccessibility for NSActionCell {}
20
21#[cfg(all(feature = "NSAccessibilityProtocols", feature = "NSCell"))]
22unsafe impl NSAccessibilityElementProtocol for NSActionCell {}
23
24#[cfg(feature = "NSCell")]
25unsafe impl NSCoding for NSActionCell {}
26
27#[cfg(feature = "NSCell")]
28unsafe impl NSCopying for NSActionCell {}
29
30#[cfg(feature = "NSCell")]
31unsafe impl CopyingHelper for NSActionCell {
32 type Result = Self;
33}
34
35#[cfg(feature = "NSCell")]
36unsafe impl NSObjectProtocol for NSActionCell {}
37
38#[cfg(all(feature = "NSCell", feature = "NSUserInterfaceItemIdentification"))]
39unsafe impl NSUserInterfaceItemIdentification for NSActionCell {}
40
41#[cfg(feature = "NSCell")]
42impl NSActionCell {
43 extern_methods!(
44 #[unsafe(method(target))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
47
48 #[unsafe(method(setTarget:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
53
54 #[unsafe(method(action))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn action(&self) -> Option<Sel>;
57
58 #[unsafe(method(setAction:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setAction(&self, action: Option<Sel>);
62
63 #[unsafe(method(tag))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn tag(&self) -> NSInteger;
66
67 #[unsafe(method(setTag:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn setTag(&self, tag: NSInteger);
71 );
72}
73
74#[cfg(feature = "NSCell")]
76impl NSActionCell {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(initTextCell:))]
83 #[unsafe(method_family = init)]
84 pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
85
86 #[cfg(feature = "NSImage")]
87 #[unsafe(method(initImageCell:))]
88 #[unsafe(method_family = init)]
89 pub unsafe fn initImageCell(
90 this: Allocated<Self>,
91 image: Option<&NSImage>,
92 ) -> Retained<Self>;
93
94 #[unsafe(method(initWithCoder:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
97 );
98}
99
100#[cfg(feature = "NSCell")]
102impl NSActionCell {
103 extern_methods!(
104 #[unsafe(method(new))]
105 #[unsafe(method_family = new)]
106 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
107 );
108}