objc2_pdf_kit/generated/
PDFAnnotationLine.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/pdfannotationline?language=objc)
15    #[unsafe(super(PDFAnnotation, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "PDFAnnotation")]
18    #[deprecated]
19    pub struct PDFAnnotationLine;
20);
21
22#[cfg(feature = "PDFAnnotation")]
23extern_conformance!(
24    unsafe impl NSCoding for PDFAnnotationLine {}
25);
26
27#[cfg(feature = "PDFAnnotation")]
28extern_conformance!(
29    unsafe impl NSCopying for PDFAnnotationLine {}
30);
31
32#[cfg(feature = "PDFAnnotation")]
33unsafe impl CopyingHelper for PDFAnnotationLine {
34    type Result = Self;
35}
36
37#[cfg(feature = "PDFAnnotation")]
38extern_conformance!(
39    unsafe impl NSObjectProtocol for PDFAnnotationLine {}
40);
41
42#[cfg(feature = "PDFAnnotation")]
43impl PDFAnnotationLine {
44    extern_methods!(
45        #[deprecated]
46        #[unsafe(method(startPoint))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn startPoint(&self) -> NSPoint;
49
50        #[deprecated]
51        #[unsafe(method(setStartPoint:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setStartPoint(&self, point: NSPoint);
54
55        #[deprecated]
56        #[unsafe(method(endPoint))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn endPoint(&self) -> NSPoint;
59
60        #[deprecated]
61        #[unsafe(method(setEndPoint:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn setEndPoint(&self, point: NSPoint);
64
65        #[cfg(feature = "PDFAnnotationUtilities")]
66        #[deprecated]
67        #[unsafe(method(startLineStyle))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn startLineStyle(&self) -> PDFLineStyle;
70
71        #[cfg(feature = "PDFAnnotationUtilities")]
72        #[deprecated]
73        #[unsafe(method(setStartLineStyle:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn setStartLineStyle(&self, style: PDFLineStyle);
76
77        #[cfg(feature = "PDFAnnotationUtilities")]
78        #[deprecated]
79        #[unsafe(method(endLineStyle))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn endLineStyle(&self) -> PDFLineStyle;
82
83        #[cfg(feature = "PDFAnnotationUtilities")]
84        #[deprecated]
85        #[unsafe(method(setEndLineStyle:))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn setEndLineStyle(&self, style: PDFLineStyle);
88
89        #[cfg(feature = "objc2-app-kit")]
90        #[cfg(target_os = "macos")]
91        #[deprecated]
92        #[unsafe(method(interiorColor))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn interiorColor(&self) -> Option<Retained<NSColor>>;
95
96        #[cfg(feature = "objc2-app-kit")]
97        #[cfg(target_os = "macos")]
98        /// # Safety
99        ///
100        /// `color` might not allow `None`.
101        #[deprecated]
102        #[unsafe(method(setInteriorColor:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn setInteriorColor(&self, color: Option<&NSColor>);
105    );
106}
107
108/// Methods declared on superclass `PDFAnnotation`.
109#[cfg(feature = "PDFAnnotation")]
110impl PDFAnnotationLine {
111    extern_methods!(
112        /// # Safety
113        ///
114        /// `properties` generic should be of the correct type.
115        #[unsafe(method(initWithBounds:forType:withProperties:))]
116        #[unsafe(method_family = init)]
117        pub unsafe fn initWithBounds_forType_withProperties(
118            this: Allocated<Self>,
119            bounds: NSRect,
120            annotation_type: &PDFAnnotationSubtype,
121            properties: Option<&NSDictionary>,
122        ) -> Retained<Self>;
123    );
124}
125
126/// Methods declared on superclass `NSObject`.
127#[cfg(feature = "PDFAnnotation")]
128impl PDFAnnotationLine {
129    extern_methods!(
130        #[unsafe(method(init))]
131        #[unsafe(method_family = init)]
132        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
133
134        #[unsafe(method(new))]
135        #[unsafe(method_family = new)]
136        pub unsafe fn new() -> Retained<Self>;
137    );
138}