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" {
#[cfg(feature = "objc2-core-foundation")]
pub static kPDFDestinationUnspecifiedValue: CGFloat;
}
extern_class!(
#[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")]
#[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;
);
}
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>;
);
}