icrate/generated/AppKit/
NSTextFieldCell.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8ns_enum!(
9 #[underlying(NSUInteger)]
10 pub enum NSTextFieldBezelStyle {
11 NSTextFieldSquareBezel = 0,
12 NSTextFieldRoundedBezel = 1,
13 }
14);
15
16extern_class!(
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 #[cfg(feature = "AppKit_NSTextFieldCell")]
19 pub struct NSTextFieldCell;
20
21 #[cfg(feature = "AppKit_NSTextFieldCell")]
22 unsafe impl ClassType for NSTextFieldCell {
23 #[inherits(NSCell, NSObject)]
24 type Super = NSActionCell;
25 type Mutability = MainThreadOnly;
26 }
27);
28
29#[cfg(feature = "AppKit_NSTextFieldCell")]
30unsafe impl NSAccessibility for NSTextFieldCell {}
31
32#[cfg(feature = "AppKit_NSTextFieldCell")]
33unsafe impl NSAccessibilityElementProtocol for NSTextFieldCell {}
34
35#[cfg(feature = "AppKit_NSTextFieldCell")]
36unsafe impl NSCoding for NSTextFieldCell {}
37
38#[cfg(feature = "AppKit_NSTextFieldCell")]
39unsafe impl NSCopying for NSTextFieldCell {}
40
41#[cfg(feature = "AppKit_NSTextFieldCell")]
42unsafe impl NSObjectProtocol for NSTextFieldCell {}
43
44#[cfg(feature = "AppKit_NSTextFieldCell")]
45unsafe impl NSUserInterfaceItemIdentification for NSTextFieldCell {}
46
47extern_methods!(
48 #[cfg(feature = "AppKit_NSTextFieldCell")]
49 unsafe impl NSTextFieldCell {
50 #[cfg(feature = "Foundation_NSString")]
51 #[method_id(@__retain_semantics Init initTextCell:)]
52 pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Id<Self>;
53
54 #[cfg(feature = "Foundation_NSCoder")]
55 #[method_id(@__retain_semantics Init initWithCoder:)]
56 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;
57
58 #[cfg(feature = "AppKit_NSImage")]
59 #[method_id(@__retain_semantics Init initImageCell:)]
60 pub unsafe fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Id<Self>;
61
62 #[cfg(feature = "AppKit_NSColor")]
63 #[method_id(@__retain_semantics Other backgroundColor)]
64 pub unsafe fn backgroundColor(&self) -> Option<Id<NSColor>>;
65
66 #[cfg(feature = "AppKit_NSColor")]
67 #[method(setBackgroundColor:)]
68 pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>);
69
70 #[method(drawsBackground)]
71 pub unsafe fn drawsBackground(&self) -> bool;
72
73 #[method(setDrawsBackground:)]
74 pub unsafe fn setDrawsBackground(&self, draws_background: bool);
75
76 #[cfg(feature = "AppKit_NSColor")]
77 #[method_id(@__retain_semantics Other textColor)]
78 pub unsafe fn textColor(&self) -> Option<Id<NSColor>>;
79
80 #[cfg(feature = "AppKit_NSColor")]
81 #[method(setTextColor:)]
82 pub unsafe fn setTextColor(&self, text_color: Option<&NSColor>);
83
84 #[cfg(feature = "AppKit_NSText")]
85 #[method_id(@__retain_semantics Other setUpFieldEditorAttributes:)]
86 pub unsafe fn setUpFieldEditorAttributes(&self, text_obj: &NSText) -> Id<NSText>;
87
88 #[method(bezelStyle)]
89 pub unsafe fn bezelStyle(&self) -> NSTextFieldBezelStyle;
90
91 #[method(setBezelStyle:)]
92 pub unsafe fn setBezelStyle(&self, bezel_style: NSTextFieldBezelStyle);
93
94 #[cfg(feature = "Foundation_NSString")]
95 #[method_id(@__retain_semantics Other placeholderString)]
96 pub unsafe fn placeholderString(&self) -> Option<Id<NSString>>;
97
98 #[cfg(feature = "Foundation_NSString")]
99 #[method(setPlaceholderString:)]
100 pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>);
101
102 #[cfg(feature = "Foundation_NSAttributedString")]
103 #[method_id(@__retain_semantics Other placeholderAttributedString)]
104 pub unsafe fn placeholderAttributedString(&self) -> Option<Id<NSAttributedString>>;
105
106 #[cfg(feature = "Foundation_NSAttributedString")]
107 #[method(setPlaceholderAttributedString:)]
108 pub unsafe fn setPlaceholderAttributedString(
109 &self,
110 placeholder_attributed_string: Option<&NSAttributedString>,
111 );
112
113 #[method(setWantsNotificationForMarkedText:)]
114 pub unsafe fn setWantsNotificationForMarkedText(&self, flag: bool);
115
116 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
117 #[method_id(@__retain_semantics Other allowedInputSourceLocales)]
118 pub unsafe fn allowedInputSourceLocales(&self) -> Option<Id<NSArray<NSString>>>;
119
120 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
121 #[method(setAllowedInputSourceLocales:)]
122 pub unsafe fn setAllowedInputSourceLocales(
123 &self,
124 allowed_input_source_locales: Option<&NSArray<NSString>>,
125 );
126 }
127);
128
129extern_methods!(
130 #[cfg(feature = "AppKit_NSTextFieldCell")]
132 unsafe impl NSTextFieldCell {
133 #[method_id(@__retain_semantics Init init)]
134 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
135 }
136);
137
138extern_methods!(
139 #[cfg(feature = "AppKit_NSTextFieldCell")]
141 unsafe impl NSTextFieldCell {
142 #[method_id(@__retain_semantics New new)]
143 pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
144 }
145);