use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFDisplayMode(pub NSInteger);
impl PDFDisplayMode {
#[doc(alias = "kPDFDisplaySinglePage")]
pub const SinglePage: Self = Self(0);
#[doc(alias = "kPDFDisplaySinglePageContinuous")]
pub const SinglePageContinuous: Self = Self(1);
#[doc(alias = "kPDFDisplayTwoUp")]
pub const TwoUp: Self = Self(2);
#[doc(alias = "kPDFDisplayTwoUpContinuous")]
pub const TwoUpContinuous: Self = Self(3);
}
unsafe impl Encode for PDFDisplayMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFDisplayMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFDisplayDirection(pub NSInteger);
impl PDFDisplayDirection {
#[doc(alias = "kPDFDisplayDirectionVertical")]
pub const Vertical: Self = Self(0);
#[doc(alias = "kPDFDisplayDirectionHorizontal")]
pub const Horizontal: Self = Self(1);
}
unsafe impl Encode for PDFDisplayDirection {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFDisplayDirection {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFInterpolationQuality(pub NSInteger);
impl PDFInterpolationQuality {
#[doc(alias = "kPDFInterpolationQualityNone")]
pub const None: Self = Self(0);
#[doc(alias = "kPDFInterpolationQualityLow")]
pub const Low: Self = Self(1);
#[doc(alias = "kPDFInterpolationQualityHigh")]
pub const High: Self = Self(2);
}
unsafe impl Encode for PDFInterpolationQuality {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFInterpolationQuality {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static PDFViewDocumentChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewChangedHistoryNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewPageChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewScaleChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewAnnotationHitNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewCopyPermissionNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewPrintPermissionNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewAnnotationWillHitNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewSelectionChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewDisplayModeChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewDisplayBoxChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static PDFViewVisiblePagesChangedNotification: &'static NSNotificationName;
}
extern_class!(
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
pub struct PDFView;
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAccessibility for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAnimationDelegate for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAppearanceCustomization for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSDraggingDestination for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSMenuDelegate for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for PDFView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl PDFView {
extern_methods!(
#[cfg(feature = "PDFDocument")]
#[unsafe(method(document))]
#[unsafe(method_family = none)]
pub unsafe fn document(&self) -> Option<Retained<PDFDocument>>;
#[cfg(feature = "PDFDocument")]
#[unsafe(method(setDocument:))]
#[unsafe(method_family = none)]
pub unsafe fn setDocument(&self, document: Option<&PDFDocument>);
#[unsafe(method(canGoToFirstPage))]
#[unsafe(method_family = none)]
pub unsafe fn canGoToFirstPage(&self) -> bool;
#[unsafe(method(goToFirstPage:))]
#[unsafe(method_family = none)]
pub unsafe fn goToFirstPage(&self, sender: Option<&AnyObject>);
#[unsafe(method(canGoToLastPage))]
#[unsafe(method_family = none)]
pub unsafe fn canGoToLastPage(&self) -> bool;
#[unsafe(method(goToLastPage:))]
#[unsafe(method_family = none)]
pub unsafe fn goToLastPage(&self, sender: Option<&AnyObject>);
#[unsafe(method(canGoToNextPage))]
#[unsafe(method_family = none)]
pub unsafe fn canGoToNextPage(&self) -> bool;
#[unsafe(method(goToNextPage:))]
#[unsafe(method_family = none)]
pub unsafe fn goToNextPage(&self, sender: Option<&AnyObject>);
#[unsafe(method(canGoToPreviousPage))]
#[unsafe(method_family = none)]
pub unsafe fn canGoToPreviousPage(&self) -> bool;
#[unsafe(method(goToPreviousPage:))]
#[unsafe(method_family = none)]
pub unsafe fn goToPreviousPage(&self, sender: Option<&AnyObject>);
#[unsafe(method(canGoBack))]
#[unsafe(method_family = none)]
pub unsafe fn canGoBack(&self) -> bool;
#[unsafe(method(goBack:))]
#[unsafe(method_family = none)]
pub unsafe fn goBack(&self, sender: Option<&AnyObject>);
#[unsafe(method(canGoForward))]
#[unsafe(method_family = none)]
pub unsafe fn canGoForward(&self) -> bool;
#[unsafe(method(goForward:))]
#[unsafe(method_family = none)]
pub unsafe fn goForward(&self, sender: Option<&AnyObject>);
#[cfg(feature = "PDFPage")]
#[unsafe(method(currentPage))]
#[unsafe(method_family = none)]
pub unsafe fn currentPage(&self) -> Option<Retained<PDFPage>>;
#[cfg(feature = "PDFPage")]
#[unsafe(method(goToPage:))]
#[unsafe(method_family = none)]
pub unsafe fn goToPage(&self, page: &PDFPage);
#[cfg(feature = "PDFDestination")]
#[unsafe(method(currentDestination))]
#[unsafe(method_family = none)]
pub unsafe fn currentDestination(&self) -> Option<Retained<PDFDestination>>;
#[cfg(feature = "PDFDestination")]
#[unsafe(method(goToDestination:))]
#[unsafe(method_family = none)]
pub unsafe fn goToDestination(&self, destination: &PDFDestination);
#[cfg(feature = "PDFSelection")]
#[unsafe(method(goToSelection:))]
#[unsafe(method_family = none)]
pub unsafe fn goToSelection(&self, selection: &PDFSelection);
#[cfg(feature = "PDFPage")]
#[unsafe(method(goToRect:onPage:))]
#[unsafe(method_family = none)]
pub unsafe fn goToRect_onPage(&self, rect: NSRect, page: &PDFPage);
#[unsafe(method(displayMode))]
#[unsafe(method_family = none)]
pub unsafe fn displayMode(&self) -> PDFDisplayMode;
#[unsafe(method(setDisplayMode:))]
#[unsafe(method_family = none)]
pub unsafe fn setDisplayMode(&self, display_mode: PDFDisplayMode);
#[unsafe(method(displayDirection))]
#[unsafe(method_family = none)]
pub unsafe fn displayDirection(&self) -> PDFDisplayDirection;
#[unsafe(method(setDisplayDirection:))]
#[unsafe(method_family = none)]
pub unsafe fn setDisplayDirection(&self, display_direction: PDFDisplayDirection);
#[unsafe(method(displaysPageBreaks))]
#[unsafe(method_family = none)]
pub unsafe fn displaysPageBreaks(&self) -> bool;
#[unsafe(method(setDisplaysPageBreaks:))]
#[unsafe(method_family = none)]
pub unsafe fn setDisplaysPageBreaks(&self, displays_page_breaks: bool);
#[unsafe(method(pageBreakMargins))]
#[unsafe(method_family = none)]
pub unsafe fn pageBreakMargins(&self) -> NSEdgeInsets;
#[unsafe(method(setPageBreakMargins:))]
#[unsafe(method_family = none)]
pub unsafe fn setPageBreakMargins(&self, page_break_margins: NSEdgeInsets);
#[cfg(feature = "PDFPage")]
#[unsafe(method(displayBox))]
#[unsafe(method_family = none)]
pub unsafe fn displayBox(&self) -> PDFDisplayBox;
#[cfg(feature = "PDFPage")]
#[unsafe(method(setDisplayBox:))]
#[unsafe(method_family = none)]
pub unsafe fn setDisplayBox(&self, display_box: PDFDisplayBox);
#[unsafe(method(displaysAsBook))]
#[unsafe(method_family = none)]
pub unsafe fn displaysAsBook(&self) -> bool;
#[unsafe(method(setDisplaysAsBook:))]
#[unsafe(method_family = none)]
pub unsafe fn setDisplaysAsBook(&self, displays_as_book: bool);
#[unsafe(method(displaysRTL))]
#[unsafe(method_family = none)]
pub unsafe fn displaysRTL(&self) -> bool;
#[unsafe(method(setDisplaysRTL:))]
#[unsafe(method_family = none)]
pub unsafe fn setDisplaysRTL(&self, displays_rtl: bool);
#[unsafe(method(backgroundColor))]
#[unsafe(method_family = none)]
pub unsafe fn backgroundColor(&self) -> Retained<NSColor>;
#[unsafe(method(setBackgroundColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setBackgroundColor(&self, background_color: &NSColor);
#[unsafe(method(interpolationQuality))]
#[unsafe(method_family = none)]
pub unsafe fn interpolationQuality(&self) -> PDFInterpolationQuality;
#[unsafe(method(setInterpolationQuality:))]
#[unsafe(method_family = none)]
pub unsafe fn setInterpolationQuality(
&self,
interpolation_quality: PDFInterpolationQuality,
);
#[unsafe(method(pageShadowsEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn pageShadowsEnabled(&self) -> bool;
#[unsafe(method(enablePageShadows:))]
#[unsafe(method_family = none)]
pub unsafe fn enablePageShadows(&self, page_shadows_enabled: bool);
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn PDFViewDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn PDFViewDelegate>>);
#[cfg(feature = "PDFPageOverlayViewProvider")]
#[unsafe(method(pageOverlayViewProvider))]
#[unsafe(method_family = none)]
pub unsafe fn pageOverlayViewProvider(
&self,
) -> Option<Retained<ProtocolObject<dyn PDFPageOverlayViewProvider>>>;
#[cfg(feature = "PDFPageOverlayViewProvider")]
#[unsafe(method(setPageOverlayViewProvider:))]
#[unsafe(method_family = none)]
pub unsafe fn setPageOverlayViewProvider(
&self,
page_overlay_view_provider: Option<&ProtocolObject<dyn PDFPageOverlayViewProvider>>,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(scaleFactor))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactor(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setScaleFactor:))]
#[unsafe(method_family = none)]
pub unsafe fn setScaleFactor(&self, scale_factor: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(minScaleFactor))]
#[unsafe(method_family = none)]
pub unsafe fn minScaleFactor(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setMinScaleFactor:))]
#[unsafe(method_family = none)]
pub unsafe fn setMinScaleFactor(&self, min_scale_factor: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(maxScaleFactor))]
#[unsafe(method_family = none)]
pub unsafe fn maxScaleFactor(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setMaxScaleFactor:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaxScaleFactor(&self, max_scale_factor: CGFloat);
#[unsafe(method(autoScales))]
#[unsafe(method_family = none)]
pub unsafe fn autoScales(&self) -> bool;
#[unsafe(method(setAutoScales:))]
#[unsafe(method_family = none)]
pub unsafe fn setAutoScales(&self, auto_scales: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(scaleFactorForSizeToFit))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorForSizeToFit(&self) -> CGFloat;
#[unsafe(method(zoomIn:))]
#[unsafe(method_family = none)]
pub unsafe fn zoomIn(&self, sender: Option<&AnyObject>);
#[unsafe(method(canZoomIn))]
#[unsafe(method_family = none)]
pub unsafe fn canZoomIn(&self) -> bool;
#[unsafe(method(zoomOut:))]
#[unsafe(method_family = none)]
pub unsafe fn zoomOut(&self, sender: Option<&AnyObject>);
#[unsafe(method(canZoomOut))]
#[unsafe(method_family = none)]
pub unsafe fn canZoomOut(&self) -> bool;
#[cfg(feature = "PDFPage")]
#[unsafe(method(areaOfInterestForMouse:))]
#[unsafe(method_family = none)]
pub unsafe fn areaOfInterestForMouse(&self, event: &NSEvent) -> PDFAreaOfInterest;
#[cfg(feature = "PDFPage")]
#[unsafe(method(areaOfInterestForPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn areaOfInterestForPoint(&self, cursor_location: NSPoint) -> PDFAreaOfInterest;
#[cfg(feature = "PDFPage")]
#[unsafe(method(setCursorForAreaOfInterest:))]
#[unsafe(method_family = none)]
pub unsafe fn setCursorForAreaOfInterest(&self, area: PDFAreaOfInterest);
#[cfg(feature = "PDFAction")]
#[unsafe(method(performAction:))]
#[unsafe(method_family = none)]
pub unsafe fn performAction(&self, action: &PDFAction);
#[cfg(feature = "PDFSelection")]
#[unsafe(method(currentSelection))]
#[unsafe(method_family = none)]
pub unsafe fn currentSelection(&self) -> Option<Retained<PDFSelection>>;
#[cfg(feature = "PDFSelection")]
#[unsafe(method(setCurrentSelection:))]
#[unsafe(method_family = none)]
pub unsafe fn setCurrentSelection(&self, current_selection: Option<&PDFSelection>);
#[cfg(feature = "PDFSelection")]
#[unsafe(method(setCurrentSelection:animate:))]
#[unsafe(method_family = none)]
pub unsafe fn setCurrentSelection_animate(
&self,
selection: Option<&PDFSelection>,
animate: bool,
);
#[unsafe(method(clearSelection))]
#[unsafe(method_family = none)]
pub unsafe fn clearSelection(&self);
#[unsafe(method(selectAll:))]
#[unsafe(method_family = none)]
pub unsafe fn selectAll(&self, sender: Option<&AnyObject>);
#[unsafe(method(scrollSelectionToVisible:))]
#[unsafe(method_family = none)]
pub unsafe fn scrollSelectionToVisible(&self, sender: Option<&AnyObject>);
#[cfg(feature = "PDFSelection")]
#[unsafe(method(highlightedSelections))]
#[unsafe(method_family = none)]
pub unsafe fn highlightedSelections(&self) -> Option<Retained<NSArray<PDFSelection>>>;
#[cfg(feature = "PDFSelection")]
#[unsafe(method(setHighlightedSelections:))]
#[unsafe(method_family = none)]
pub unsafe fn setHighlightedSelections(
&self,
highlighted_selections: Option<&NSArray<PDFSelection>>,
);
#[cfg(all(feature = "PDFPage", feature = "objc2-core-graphics"))]
#[unsafe(method(drawPage:toContext:))]
#[unsafe(method_family = none)]
pub unsafe fn drawPage_toContext(&self, page: &PDFPage, context: &CGContext);
#[cfg(all(feature = "PDFPage", feature = "objc2-core-graphics"))]
#[unsafe(method(drawPagePost:toContext:))]
#[unsafe(method_family = none)]
pub unsafe fn drawPagePost_toContext(&self, page: &PDFPage, context: &CGContext);
#[unsafe(method(copy:))]
#[unsafe(method_family = none)]
pub unsafe fn copy(&self, sender: Option<&AnyObject>);
#[unsafe(method(printWithInfo:autoRotate:))]
#[unsafe(method_family = none)]
pub unsafe fn printWithInfo_autoRotate(&self, print_info: &NSPrintInfo, do_rotate: bool);
#[cfg(feature = "PDFDocument")]
#[unsafe(method(printWithInfo:autoRotate:pageScaling:))]
#[unsafe(method_family = none)]
pub unsafe fn printWithInfo_autoRotate_pageScaling(
&self,
print_info: &NSPrintInfo,
do_rotate: bool,
scale: PDFPrintScalingMode,
);
#[cfg(feature = "PDFPage")]
#[unsafe(method(pageForPoint:nearest:))]
#[unsafe(method_family = none)]
pub unsafe fn pageForPoint_nearest(
&self,
point: NSPoint,
nearest: bool,
) -> Option<Retained<PDFPage>>;
#[cfg(feature = "PDFPage")]
#[unsafe(method(convertPoint:toPage:))]
#[unsafe(method_family = none)]
pub unsafe fn convertPoint_toPage(&self, point: NSPoint, page: &PDFPage) -> NSPoint;
#[cfg(feature = "PDFPage")]
#[unsafe(method(convertRect:toPage:))]
#[unsafe(method_family = none)]
pub unsafe fn convertRect_toPage(&self, rect: NSRect, page: &PDFPage) -> NSRect;
#[cfg(feature = "PDFPage")]
#[unsafe(method(convertPoint:fromPage:))]
#[unsafe(method_family = none)]
pub unsafe fn convertPoint_fromPage(&self, point: NSPoint, page: &PDFPage) -> NSPoint;
#[cfg(feature = "PDFPage")]
#[unsafe(method(convertRect:fromPage:))]
#[unsafe(method_family = none)]
pub unsafe fn convertRect_fromPage(&self, rect: NSRect, page: &PDFPage) -> NSRect;
#[unsafe(method(documentView))]
#[unsafe(method_family = none)]
pub unsafe fn documentView(&self) -> Option<Retained<NSView>>;
#[unsafe(method(layoutDocumentView))]
#[unsafe(method_family = none)]
pub unsafe fn layoutDocumentView(&self);
#[cfg(feature = "PDFPage")]
#[unsafe(method(annotationsChangedOnPage:))]
#[unsafe(method_family = none)]
pub unsafe fn annotationsChangedOnPage(&self, page: &PDFPage);
#[cfg(feature = "PDFPage")]
#[unsafe(method(rowSizeForPage:))]
#[unsafe(method_family = none)]
pub unsafe fn rowSizeForPage(&self, page: &PDFPage) -> NSSize;
#[unsafe(method(acceptsDraggedFiles))]
#[unsafe(method_family = none)]
pub unsafe fn acceptsDraggedFiles(&self) -> bool;
#[unsafe(method(setAcceptsDraggedFiles:))]
#[unsafe(method_family = none)]
pub unsafe fn setAcceptsDraggedFiles(&self, accepts_dragged_files: bool);
#[cfg(feature = "PDFPage")]
#[unsafe(method(visiblePages))]
#[unsafe(method_family = none)]
pub unsafe fn visiblePages(&self) -> Retained<NSArray<PDFPage>>;
#[deprecated]
#[unsafe(method(enableDataDetectors))]
#[unsafe(method_family = none)]
pub unsafe fn enableDataDetectors(&self) -> bool;
#[deprecated]
#[unsafe(method(setEnableDataDetectors:))]
#[unsafe(method_family = none)]
pub unsafe fn setEnableDataDetectors(&self, enable_data_detectors: bool);
#[unsafe(method(isInMarkupMode))]
#[unsafe(method_family = none)]
pub unsafe fn isInMarkupMode(&self) -> bool;
#[unsafe(method(setInMarkupMode:))]
#[unsafe(method_family = none)]
pub unsafe fn setInMarkupMode(&self, in_markup_mode: bool);
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl PDFView {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl PDFView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl PDFView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait PDFViewDelegate: NSObjectProtocol {
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(PDFViewWillClickOnLink:withURL:))]
#[unsafe(method_family = none)]
unsafe fn PDFViewWillClickOnLink_withURL(&self, sender: &PDFView, url: &NSURL);
#[cfg(all(feature = "objc2-app-kit", feature = "objc2-core-foundation"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(PDFViewWillChangeScaleFactor:toScale:))]
#[unsafe(method_family = none)]
unsafe fn PDFViewWillChangeScaleFactor_toScale(
&self,
sender: &PDFView,
scaler: CGFloat,
) -> CGFloat;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(PDFViewPrintJobTitle:))]
#[unsafe(method_family = none)]
unsafe fn PDFViewPrintJobTitle(&self, sender: &PDFView) -> Retained<NSString>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(PDFViewPerformPrint:))]
#[unsafe(method_family = none)]
unsafe fn PDFViewPerformPrint(&self, sender: &PDFView);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(PDFViewPerformFind:))]
#[unsafe(method_family = none)]
unsafe fn PDFViewPerformFind(&self, sender: &PDFView);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(PDFViewPerformGoToPage:))]
#[unsafe(method_family = none)]
unsafe fn PDFViewPerformGoToPage(&self, sender: &PDFView);
#[cfg(all(
feature = "PDFAction",
feature = "PDFActionRemoteGoTo",
feature = "objc2-app-kit"
))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(PDFViewOpenPDF:forRemoteGoToAction:))]
#[unsafe(method_family = none)]
unsafe fn PDFViewOpenPDF_forRemoteGoToAction(
&self,
sender: &PDFView,
action: &PDFActionRemoteGoTo,
);
}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl PDFView {
extern_methods!(
#[deprecated]
#[unsafe(method(takePasswordFrom:))]
#[unsafe(method_family = none)]
pub unsafe fn takePasswordFrom(&self, sender: &AnyObject);
#[cfg(feature = "PDFPage")]
#[deprecated]
#[unsafe(method(drawPage:))]
#[unsafe(method_family = none)]
pub unsafe fn drawPage(&self, page: &PDFPage);
#[cfg(feature = "PDFPage")]
#[deprecated]
#[unsafe(method(drawPagePost:))]
#[unsafe(method_family = none)]
pub unsafe fn drawPagePost(&self, page: &PDFPage);
#[deprecated]
#[unsafe(method(shouldAntiAlias))]
#[unsafe(method_family = none)]
pub unsafe fn shouldAntiAlias(&self) -> bool;
#[deprecated]
#[unsafe(method(setShouldAntiAlias:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldAntiAlias(&self, should_anti_alias: bool);
#[cfg(feature = "objc2-core-foundation")]
#[deprecated]
#[unsafe(method(greekingThreshold))]
#[unsafe(method_family = none)]
pub unsafe fn greekingThreshold(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[deprecated]
#[unsafe(method(setGreekingThreshold:))]
#[unsafe(method_family = none)]
pub unsafe fn setGreekingThreshold(&self, greeking_threshold: CGFloat);
#[deprecated]
#[unsafe(method(takeBackgroundColorFrom:))]
#[unsafe(method_family = none)]
pub unsafe fn takeBackgroundColorFrom(&self, sender: &AnyObject);
#[deprecated]
#[unsafe(method(allowsDragging))]
#[unsafe(method_family = none)]
pub unsafe fn allowsDragging(&self) -> bool;
#[deprecated]
#[unsafe(method(setAllowsDragging:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsDragging(&self, allows_dragging: bool);
);
}