icrate/generated/AppKit/
NSActionCell.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8extern_class!(
9    #[derive(Debug, PartialEq, Eq, Hash)]
10    #[cfg(feature = "AppKit_NSActionCell")]
11    pub struct NSActionCell;
12
13    #[cfg(feature = "AppKit_NSActionCell")]
14    unsafe impl ClassType for NSActionCell {
15        #[inherits(NSObject)]
16        type Super = NSCell;
17        type Mutability = MainThreadOnly;
18    }
19);
20
21#[cfg(feature = "AppKit_NSActionCell")]
22unsafe impl NSAccessibility for NSActionCell {}
23
24#[cfg(feature = "AppKit_NSActionCell")]
25unsafe impl NSAccessibilityElementProtocol for NSActionCell {}
26
27#[cfg(feature = "AppKit_NSActionCell")]
28unsafe impl NSCoding for NSActionCell {}
29
30#[cfg(feature = "AppKit_NSActionCell")]
31unsafe impl NSCopying for NSActionCell {}
32
33#[cfg(feature = "AppKit_NSActionCell")]
34unsafe impl NSObjectProtocol for NSActionCell {}
35
36#[cfg(feature = "AppKit_NSActionCell")]
37unsafe impl NSUserInterfaceItemIdentification for NSActionCell {}
38
39extern_methods!(
40    #[cfg(feature = "AppKit_NSActionCell")]
41    unsafe impl NSActionCell {
42        #[method_id(@__retain_semantics Other target)]
43        pub unsafe fn target(&self) -> Option<Id<AnyObject>>;
44
45        #[method(setTarget:)]
46        pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
47
48        #[method(action)]
49        pub unsafe fn action(&self) -> Option<Sel>;
50
51        #[method(setAction:)]
52        pub unsafe fn setAction(&self, action: Option<Sel>);
53
54        #[method(tag)]
55        pub unsafe fn tag(&self) -> NSInteger;
56
57        #[method(setTag:)]
58        pub unsafe fn setTag(&self, tag: NSInteger);
59    }
60);
61
62extern_methods!(
63    /// Methods declared on superclass `NSCell`
64    #[cfg(feature = "AppKit_NSActionCell")]
65    unsafe impl NSActionCell {
66        #[method_id(@__retain_semantics Init init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
68
69        #[cfg(feature = "Foundation_NSString")]
70        #[method_id(@__retain_semantics Init initTextCell:)]
71        pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Id<Self>;
72
73        #[cfg(feature = "AppKit_NSImage")]
74        #[method_id(@__retain_semantics Init initImageCell:)]
75        pub unsafe fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Id<Self>;
76
77        #[cfg(feature = "Foundation_NSCoder")]
78        #[method_id(@__retain_semantics Init initWithCoder:)]
79        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;
80    }
81);
82
83extern_methods!(
84    /// Methods declared on superclass `NSObject`
85    #[cfg(feature = "AppKit_NSActionCell")]
86    unsafe impl NSActionCell {
87        #[method_id(@__retain_semantics New new)]
88        pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
89    }
90);