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::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/kpdfdestinationunspecifiedvalue?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kPDFDestinationUnspecifiedValue: CGFloat;
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfdestination?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct PDFDestination;
);

extern_conformance!(
    unsafe impl NSCopying for PDFDestination {}
);

unsafe impl CopyingHelper for PDFDestination {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for PDFDestination {}
);

impl PDFDestination {
    extern_methods!(
        #[cfg(feature = "PDFPage")]
        #[unsafe(method(initWithPage:atPoint:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPage_atPoint(
            this: Allocated<Self>,
            page: &PDFPage,
            point: NSPoint,
        ) -> Retained<Self>;

        #[cfg(feature = "PDFPage")]
        #[unsafe(method(page))]
        #[unsafe(method_family = none)]
        pub unsafe fn page(&self) -> Option<Retained<PDFPage>>;

        #[unsafe(method(point))]
        #[unsafe(method_family = none)]
        pub unsafe fn point(&self) -> NSPoint;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(zoom))]
        #[unsafe(method_family = none)]
        pub unsafe fn zoom(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`zoom`][Self::zoom].
        #[unsafe(method(setZoom:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setZoom(&self, zoom: CGFloat);

        #[unsafe(method(compare:))]
        #[unsafe(method_family = none)]
        pub unsafe fn compare(&self, destination: &PDFDestination) -> NSComparisonResult;
    );
}

/// Methods declared on superclass `NSObject`.
impl PDFDestination {
    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>;
    );
}