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/pdfactionremotegoto?language=objc)
    #[unsafe(super(PDFAction, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "PDFAction")]
    pub struct PDFActionRemoteGoTo;
);

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

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

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

#[cfg(feature = "PDFAction")]
impl PDFActionRemoteGoTo {
    extern_methods!(
        #[unsafe(method(initWithPageIndex:atPoint:fileURL:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPageIndex_atPoint_fileURL(
            this: Allocated<Self>,
            page_index: NSUInteger,
            point: NSPoint,
            url: &NSURL,
        ) -> Retained<Self>;

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

        /// Setter for [`pageIndex`][Self::pageIndex].
        #[unsafe(method(setPageIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPageIndex(&self, page_index: NSUInteger);

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

        /// Setter for [`point`][Self::point].
        #[unsafe(method(setPoint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPoint(&self, point: NSPoint);

        #[unsafe(method(URL))]
        #[unsafe(method_family = none)]
        pub unsafe fn URL(&self) -> Retained<NSURL>;

        /// Setter for [`URL`][Self::URL].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setURL(&self, url: &NSURL);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "PDFAction")]
impl PDFActionRemoteGoTo {
    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>;
    );
}