icrate/generated/AppKit/
NSImageCell.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8ns_enum!(
9 #[underlying(NSUInteger)]
10 pub enum NSImageAlignment {
11 NSImageAlignCenter = 0,
12 NSImageAlignTop = 1,
13 NSImageAlignTopLeft = 2,
14 NSImageAlignTopRight = 3,
15 NSImageAlignLeft = 4,
16 NSImageAlignBottom = 5,
17 NSImageAlignBottomLeft = 6,
18 NSImageAlignBottomRight = 7,
19 NSImageAlignRight = 8,
20 }
21);
22
23ns_enum!(
24 #[underlying(NSUInteger)]
25 pub enum NSImageFrameStyle {
26 NSImageFrameNone = 0,
27 NSImageFramePhoto = 1,
28 NSImageFrameGrayBezel = 2,
29 NSImageFrameGroove = 3,
30 NSImageFrameButton = 4,
31 }
32);
33
34extern_class!(
35 #[derive(Debug, PartialEq, Eq, Hash)]
36 #[cfg(feature = "AppKit_NSImageCell")]
37 pub struct NSImageCell;
38
39 #[cfg(feature = "AppKit_NSImageCell")]
40 unsafe impl ClassType for NSImageCell {
41 #[inherits(NSObject)]
42 type Super = NSCell;
43 type Mutability = MainThreadOnly;
44 }
45);
46
47#[cfg(feature = "AppKit_NSImageCell")]
48unsafe impl NSAccessibility for NSImageCell {}
49
50#[cfg(feature = "AppKit_NSImageCell")]
51unsafe impl NSAccessibilityElementProtocol for NSImageCell {}
52
53#[cfg(feature = "AppKit_NSImageCell")]
54unsafe impl NSCoding for NSImageCell {}
55
56#[cfg(feature = "AppKit_NSImageCell")]
57unsafe impl NSCopying for NSImageCell {}
58
59#[cfg(feature = "AppKit_NSImageCell")]
60unsafe impl NSObjectProtocol for NSImageCell {}
61
62#[cfg(feature = "AppKit_NSImageCell")]
63unsafe impl NSUserInterfaceItemIdentification for NSImageCell {}
64
65extern_methods!(
66 #[cfg(feature = "AppKit_NSImageCell")]
67 unsafe impl NSImageCell {
68 #[method(imageAlignment)]
69 pub unsafe fn imageAlignment(&self) -> NSImageAlignment;
70
71 #[method(setImageAlignment:)]
72 pub unsafe fn setImageAlignment(&self, image_alignment: NSImageAlignment);
73
74 #[method(imageScaling)]
75 pub unsafe fn imageScaling(&self) -> NSImageScaling;
76
77 #[method(setImageScaling:)]
78 pub unsafe fn setImageScaling(&self, image_scaling: NSImageScaling);
79
80 #[method(imageFrameStyle)]
81 pub unsafe fn imageFrameStyle(&self) -> NSImageFrameStyle;
82
83 #[method(setImageFrameStyle:)]
84 pub unsafe fn setImageFrameStyle(&self, image_frame_style: NSImageFrameStyle);
85 }
86);
87
88extern_methods!(
89 #[cfg(feature = "AppKit_NSImageCell")]
91 unsafe impl NSImageCell {
92 #[method_id(@__retain_semantics Init init)]
93 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
94
95 #[cfg(feature = "Foundation_NSString")]
96 #[method_id(@__retain_semantics Init initTextCell:)]
97 pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Id<Self>;
98
99 #[cfg(feature = "AppKit_NSImage")]
100 #[method_id(@__retain_semantics Init initImageCell:)]
101 pub unsafe fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Id<Self>;
102
103 #[cfg(feature = "Foundation_NSCoder")]
104 #[method_id(@__retain_semantics Init initWithCoder:)]
105 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;
106 }
107);
108
109extern_methods!(
110 #[cfg(feature = "AppKit_NSImageCell")]
112 unsafe impl NSImageCell {
113 #[method_id(@__retain_semantics New new)]
114 pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
115 }
116);