objc2_pdf_kit/generated/
PDFAnnotationChoiceWidget.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/pdfannotationchoicewidget?language=objc)
15    #[unsafe(super(PDFAnnotation, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "PDFAnnotation")]
18    #[deprecated]
19    pub struct PDFAnnotationChoiceWidget;
20);
21
22#[cfg(feature = "PDFAnnotation")]
23extern_conformance!(
24    unsafe impl NSCoding for PDFAnnotationChoiceWidget {}
25);
26
27#[cfg(feature = "PDFAnnotation")]
28extern_conformance!(
29    unsafe impl NSCopying for PDFAnnotationChoiceWidget {}
30);
31
32#[cfg(feature = "PDFAnnotation")]
33unsafe impl CopyingHelper for PDFAnnotationChoiceWidget {
34    type Result = Self;
35}
36
37#[cfg(feature = "PDFAnnotation")]
38extern_conformance!(
39    unsafe impl NSObjectProtocol for PDFAnnotationChoiceWidget {}
40);
41
42#[cfg(feature = "PDFAnnotation")]
43impl PDFAnnotationChoiceWidget {
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        #[cfg(feature = "objc2-app-kit")]
59        #[cfg(target_os = "macos")]
60        #[deprecated]
61        #[unsafe(method(backgroundColor))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn backgroundColor(&self) -> Option<Retained<NSColor>>;
64
65        #[cfg(feature = "objc2-app-kit")]
66        #[cfg(target_os = "macos")]
67        /// # Safety
68        ///
69        /// `color` might not allow `None`.
70        #[deprecated]
71        #[unsafe(method(setBackgroundColor:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn setBackgroundColor(&self, color: Option<&NSColor>);
74
75        #[cfg(feature = "objc2-app-kit")]
76        #[cfg(target_os = "macos")]
77        #[deprecated]
78        #[unsafe(method(font))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn font(&self) -> Option<Retained<NSFont>>;
81
82        #[cfg(feature = "objc2-app-kit")]
83        #[cfg(target_os = "macos")]
84        /// # Safety
85        ///
86        /// `font` might not allow `None`.
87        #[deprecated]
88        #[unsafe(method(setFont:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setFont(&self, font: Option<&NSFont>);
91
92        #[cfg(feature = "objc2-app-kit")]
93        #[cfg(target_os = "macos")]
94        #[deprecated]
95        #[unsafe(method(fontColor))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn fontColor(&self) -> Option<Retained<NSColor>>;
98
99        #[cfg(feature = "objc2-app-kit")]
100        #[cfg(target_os = "macos")]
101        /// # Safety
102        ///
103        /// `color` might not allow `None`.
104        #[deprecated]
105        #[unsafe(method(setFontColor:))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn setFontColor(&self, color: Option<&NSColor>);
108
109        #[deprecated]
110        #[unsafe(method(fieldName))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn fieldName(&self) -> Option<Retained<NSString>>;
113
114        /// # Safety
115        ///
116        /// `name` might not allow `None`.
117        #[deprecated]
118        #[unsafe(method(setFieldName:))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn setFieldName(&self, name: Option<&NSString>);
121
122        #[deprecated]
123        #[unsafe(method(isListChoice))]
124        #[unsafe(method_family = none)]
125        pub unsafe fn isListChoice(&self) -> bool;
126
127        #[deprecated]
128        #[unsafe(method(setIsListChoice:))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn setIsListChoice(&self, is_list: bool);
131
132        #[deprecated]
133        #[unsafe(method(choices))]
134        #[unsafe(method_family = none)]
135        pub unsafe fn choices(&self) -> Option<Retained<NSArray>>;
136
137        /// # Safety
138        ///
139        /// - `options` generic should be of the correct type.
140        /// - `options` might not allow `None`.
141        #[deprecated]
142        #[unsafe(method(setChoices:))]
143        #[unsafe(method_family = none)]
144        pub unsafe fn setChoices(&self, options: Option<&NSArray>);
145    );
146}
147
148/// Methods declared on superclass `PDFAnnotation`.
149#[cfg(feature = "PDFAnnotation")]
150impl PDFAnnotationChoiceWidget {
151    extern_methods!(
152        /// # Safety
153        ///
154        /// `properties` generic should be of the correct type.
155        #[unsafe(method(initWithBounds:forType:withProperties:))]
156        #[unsafe(method_family = init)]
157        pub unsafe fn initWithBounds_forType_withProperties(
158            this: Allocated<Self>,
159            bounds: NSRect,
160            annotation_type: &PDFAnnotationSubtype,
161            properties: Option<&NSDictionary>,
162        ) -> Retained<Self>;
163    );
164}
165
166/// Methods declared on superclass `NSObject`.
167#[cfg(feature = "PDFAnnotation")]
168impl PDFAnnotationChoiceWidget {
169    extern_methods!(
170        #[unsafe(method(init))]
171        #[unsafe(method_family = init)]
172        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
173
174        #[unsafe(method(new))]
175        #[unsafe(method_family = new)]
176        pub unsafe fn new() -> Retained<Self>;
177    );
178}