objc2_pdf_kit/generated/
PDFAnnotationTextWidget.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtextwidget?language=objc)
15    #[unsafe(super(PDFAnnotation, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "PDFAnnotation")]
18    #[deprecated]
19    pub struct PDFAnnotationTextWidget;
20);
21
22#[cfg(feature = "PDFAnnotation")]
23extern_conformance!(
24    unsafe impl NSCoding for PDFAnnotationTextWidget {}
25);
26
27#[cfg(feature = "PDFAnnotation")]
28extern_conformance!(
29    unsafe impl NSCopying for PDFAnnotationTextWidget {}
30);
31
32#[cfg(feature = "PDFAnnotation")]
33unsafe impl CopyingHelper for PDFAnnotationTextWidget {
34    type Result = Self;
35}
36
37#[cfg(feature = "PDFAnnotation")]
38extern_conformance!(
39    unsafe impl NSObjectProtocol for PDFAnnotationTextWidget {}
40);
41
42#[cfg(feature = "PDFAnnotation")]
43impl PDFAnnotationTextWidget {
44    extern_methods!(
45        #[deprecated]
46        #[unsafe(method(stringValue))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn stringValue(&self) -> Option<Retained<NSString>>;
49
50        /// # Safety
51        ///
52        /// `value` might not allow `None`.
53        #[deprecated]
54        #[unsafe(method(setStringValue:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setStringValue(&self, value: Option<&NSString>);
57
58        #[deprecated]
59        #[unsafe(method(attributedStringValue))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn attributedStringValue(&self) -> Option<Retained<NSAttributedString>>;
62
63        /// # Safety
64        ///
65        /// `value` might not allow `None`.
66        #[deprecated]
67        #[unsafe(method(setAttributedStringValue:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn setAttributedStringValue(&self, value: Option<&NSAttributedString>);
70
71        #[cfg(feature = "objc2-app-kit")]
72        #[cfg(target_os = "macos")]
73        #[deprecated]
74        #[unsafe(method(backgroundColor))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn backgroundColor(&self) -> Option<Retained<NSColor>>;
77
78        #[cfg(feature = "objc2-app-kit")]
79        #[cfg(target_os = "macos")]
80        /// # Safety
81        ///
82        /// `color` might not allow `None`.
83        #[deprecated]
84        #[unsafe(method(setBackgroundColor:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn setBackgroundColor(&self, color: Option<&NSColor>);
87
88        #[deprecated]
89        #[unsafe(method(rotation))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn rotation(&self) -> NSInteger;
92
93        #[deprecated]
94        #[unsafe(method(setRotation:))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn setRotation(&self, rotation: c_int);
97
98        #[cfg(feature = "objc2-app-kit")]
99        #[cfg(target_os = "macos")]
100        #[deprecated]
101        #[unsafe(method(font))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn font(&self) -> Option<Retained<NSFont>>;
104
105        #[cfg(feature = "objc2-app-kit")]
106        #[cfg(target_os = "macos")]
107        /// # Safety
108        ///
109        /// `font` might not allow `None`.
110        #[deprecated]
111        #[unsafe(method(setFont:))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn setFont(&self, font: Option<&NSFont>);
114
115        #[cfg(feature = "objc2-app-kit")]
116        #[cfg(target_os = "macos")]
117        #[deprecated]
118        #[unsafe(method(fontColor))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn fontColor(&self) -> Option<Retained<NSColor>>;
121
122        #[cfg(feature = "objc2-app-kit")]
123        #[cfg(target_os = "macos")]
124        /// # Safety
125        ///
126        /// `color` might not allow `None`.
127        #[deprecated]
128        #[unsafe(method(setFontColor:))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn setFontColor(&self, color: Option<&NSColor>);
131
132        #[cfg(feature = "objc2-app-kit")]
133        #[cfg(target_os = "macos")]
134        #[deprecated]
135        #[unsafe(method(alignment))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn alignment(&self) -> NSTextAlignment;
138
139        #[cfg(feature = "objc2-app-kit")]
140        #[cfg(target_os = "macos")]
141        #[deprecated]
142        #[unsafe(method(setAlignment:))]
143        #[unsafe(method_family = none)]
144        pub unsafe fn setAlignment(&self, alignment: NSTextAlignment);
145
146        #[deprecated]
147        #[unsafe(method(maximumLength))]
148        #[unsafe(method_family = none)]
149        pub unsafe fn maximumLength(&self) -> NSUInteger;
150
151        #[deprecated]
152        #[unsafe(method(setMaximumLength:))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn setMaximumLength(&self, max_len: NSUInteger);
155
156        #[deprecated]
157        #[unsafe(method(fieldName))]
158        #[unsafe(method_family = none)]
159        pub unsafe fn fieldName(&self) -> Option<Retained<NSString>>;
160
161        /// # Safety
162        ///
163        /// `name` might not allow `None`.
164        #[deprecated]
165        #[unsafe(method(setFieldName:))]
166        #[unsafe(method_family = none)]
167        pub unsafe fn setFieldName(&self, name: Option<&NSString>);
168
169        #[deprecated]
170        #[unsafe(method(isMultiline))]
171        #[unsafe(method_family = none)]
172        pub unsafe fn isMultiline(&self) -> bool;
173
174        #[deprecated]
175        #[unsafe(method(setIsMultiline:))]
176        #[unsafe(method_family = none)]
177        pub unsafe fn setIsMultiline(&self, multiline: bool);
178    );
179}
180
181/// Methods declared on superclass `PDFAnnotation`.
182#[cfg(feature = "PDFAnnotation")]
183impl PDFAnnotationTextWidget {
184    extern_methods!(
185        /// # Safety
186        ///
187        /// `properties` generic should be of the correct type.
188        #[unsafe(method(initWithBounds:forType:withProperties:))]
189        #[unsafe(method_family = init)]
190        pub unsafe fn initWithBounds_forType_withProperties(
191            this: Allocated<Self>,
192            bounds: NSRect,
193            annotation_type: &PDFAnnotationSubtype,
194            properties: Option<&NSDictionary>,
195        ) -> Retained<Self>;
196    );
197}
198
199/// Methods declared on superclass `NSObject`.
200#[cfg(feature = "PDFAnnotation")]
201impl PDFAnnotationTextWidget {
202    extern_methods!(
203        #[unsafe(method(init))]
204        #[unsafe(method_family = init)]
205        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
206
207        #[unsafe(method(new))]
208        #[unsafe(method_family = new)]
209        pub unsafe fn new() -> Retained<Self>;
210    );
211}