objc2-pdf-kit 0.3.2

Bindings to the PDFKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationmarkup?language=objc)
    #[unsafe(super(PDFAnnotation, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "PDFAnnotation")]
    #[deprecated]
    pub struct PDFAnnotationMarkup;
);

#[cfg(feature = "PDFAnnotation")]
extern_conformance!(
    unsafe impl NSCoding for PDFAnnotationMarkup {}
);

#[cfg(feature = "PDFAnnotation")]
extern_conformance!(
    unsafe impl NSCopying for PDFAnnotationMarkup {}
);

#[cfg(feature = "PDFAnnotation")]
unsafe impl CopyingHelper for PDFAnnotationMarkup {
    type Result = Self;
}

#[cfg(feature = "PDFAnnotation")]
extern_conformance!(
    unsafe impl NSObjectProtocol for PDFAnnotationMarkup {}
);

#[cfg(feature = "PDFAnnotation")]
impl PDFAnnotationMarkup {
    extern_methods!(
        #[deprecated]
        #[unsafe(method(quadrilateralPoints))]
        #[unsafe(method_family = none)]
        pub unsafe fn quadrilateralPoints(&self) -> Option<Retained<NSArray>>;

        /// # Safety
        ///
        /// - `points` generic should be of the correct type.
        /// - `points` might not allow `None`.
        #[deprecated]
        #[unsafe(method(setQuadrilateralPoints:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setQuadrilateralPoints(&self, points: Option<&NSArray>);

        #[cfg(feature = "PDFAnnotationUtilities")]
        #[deprecated]
        #[unsafe(method(markupType))]
        #[unsafe(method_family = none)]
        pub unsafe fn markupType(&self) -> PDFMarkupType;

        #[cfg(feature = "PDFAnnotationUtilities")]
        #[deprecated]
        #[unsafe(method(setMarkupType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMarkupType(&self, r#type: PDFMarkupType);
    );
}

/// Methods declared on superclass `PDFAnnotation`.
#[cfg(feature = "PDFAnnotation")]
impl PDFAnnotationMarkup {
    extern_methods!(
        /// # Safety
        ///
        /// `properties` generic should be of the correct type.
        #[unsafe(method(initWithBounds:forType:withProperties:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithBounds_forType_withProperties(
            this: Allocated<Self>,
            bounds: NSRect,
            annotation_type: &PDFAnnotationSubtype,
            properties: Option<&NSDictionary>,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "PDFAnnotation")]
impl PDFAnnotationMarkup {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}