objc2_pdf_kit/generated/
PDFAnnotationButtonWidget.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(PDFAnnotation, NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "PDFAnnotation")]
18 #[deprecated]
19 pub struct PDFAnnotationButtonWidget;
20);
21
22#[cfg(feature = "PDFAnnotation")]
23extern_conformance!(
24 unsafe impl NSCoding for PDFAnnotationButtonWidget {}
25);
26
27#[cfg(feature = "PDFAnnotation")]
28extern_conformance!(
29 unsafe impl NSCopying for PDFAnnotationButtonWidget {}
30);
31
32#[cfg(feature = "PDFAnnotation")]
33unsafe impl CopyingHelper for PDFAnnotationButtonWidget {
34 type Result = Self;
35}
36
37#[cfg(feature = "PDFAnnotation")]
38extern_conformance!(
39 unsafe impl NSObjectProtocol for PDFAnnotationButtonWidget {}
40);
41
42#[cfg(feature = "PDFAnnotation")]
43impl PDFAnnotationButtonWidget {
44 extern_methods!(
45 #[cfg(feature = "PDFAnnotationUtilities")]
46 #[deprecated]
47 #[unsafe(method(controlType))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn controlType(&self) -> PDFWidgetControlType;
50
51 #[cfg(feature = "PDFAnnotationUtilities")]
52 #[deprecated]
53 #[unsafe(method(setControlType:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn setControlType(&self, r#type: PDFWidgetControlType);
56
57 #[deprecated]
58 #[unsafe(method(state))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn state(&self) -> NSInteger;
61
62 #[deprecated]
63 #[unsafe(method(setState:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setState(&self, value: NSInteger);
66
67 #[cfg(feature = "objc2-app-kit")]
68 #[cfg(target_os = "macos")]
69 #[deprecated]
70 #[unsafe(method(backgroundColor))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn backgroundColor(&self) -> Option<Retained<NSColor>>;
73
74 #[cfg(feature = "objc2-app-kit")]
75 #[cfg(target_os = "macos")]
76 #[deprecated]
80 #[unsafe(method(setBackgroundColor:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setBackgroundColor(&self, color: Option<&NSColor>);
83
84 #[deprecated]
85 #[unsafe(method(allowsToggleToOff))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn allowsToggleToOff(&self) -> bool;
88
89 #[deprecated]
90 #[unsafe(method(setAllowsToggleToOff:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setAllowsToggleToOff(&self, allow_off: bool);
93
94 #[cfg(feature = "objc2-app-kit")]
95 #[cfg(target_os = "macos")]
96 #[deprecated]
97 #[unsafe(method(font))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn font(&self) -> Option<Retained<NSFont>>;
100
101 #[cfg(feature = "objc2-app-kit")]
102 #[cfg(target_os = "macos")]
103 #[deprecated]
107 #[unsafe(method(setFont:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setFont(&self, font: Option<&NSFont>);
110
111 #[cfg(feature = "objc2-app-kit")]
112 #[cfg(target_os = "macos")]
113 #[deprecated]
114 #[unsafe(method(fontColor))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn fontColor(&self) -> Option<Retained<NSColor>>;
117
118 #[cfg(feature = "objc2-app-kit")]
119 #[cfg(target_os = "macos")]
120 #[deprecated]
124 #[unsafe(method(setFontColor:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setFontColor(&self, color: Option<&NSColor>);
127
128 #[deprecated]
129 #[unsafe(method(caption))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn caption(&self) -> Option<Retained<NSString>>;
132
133 #[deprecated]
137 #[unsafe(method(setCaption:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn setCaption(&self, name: Option<&NSString>);
140
141 #[deprecated]
142 #[unsafe(method(fieldName))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn fieldName(&self) -> Option<Retained<NSString>>;
145
146 #[deprecated]
150 #[unsafe(method(setFieldName:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setFieldName(&self, name: Option<&NSString>);
153
154 #[deprecated]
155 #[unsafe(method(onStateValue))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn onStateValue(&self) -> Option<Retained<NSString>>;
158
159 #[deprecated]
163 #[unsafe(method(setOnStateValue:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn setOnStateValue(&self, name: Option<&NSString>);
166 );
167}
168
169#[cfg(feature = "PDFAnnotation")]
171impl PDFAnnotationButtonWidget {
172 extern_methods!(
173 #[unsafe(method(initWithBounds:forType:withProperties:))]
177 #[unsafe(method_family = init)]
178 pub unsafe fn initWithBounds_forType_withProperties(
179 this: Allocated<Self>,
180 bounds: NSRect,
181 annotation_type: &PDFAnnotationSubtype,
182 properties: Option<&NSDictionary>,
183 ) -> Retained<Self>;
184 );
185}
186
187#[cfg(feature = "PDFAnnotation")]
189impl PDFAnnotationButtonWidget {
190 extern_methods!(
191 #[unsafe(method(init))]
192 #[unsafe(method_family = init)]
193 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
194
195 #[unsafe(method(new))]
196 #[unsafe(method_family = new)]
197 pub unsafe fn new() -> Retained<Self>;
198 );
199}