icrate/generated/AppKit/
NSPDFPanel.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8ns_options!(
9    #[underlying(NSInteger)]
10    pub enum NSPDFPanelOptions {
11        NSPDFPanelShowsPaperSize = 1 << 2,
12        NSPDFPanelShowsOrientation = 1 << 3,
13        NSPDFPanelRequestsParentDirectory = 1 << 24,
14    }
15);
16
17extern_class!(
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(feature = "AppKit_NSPDFPanel")]
20    pub struct NSPDFPanel;
21
22    #[cfg(feature = "AppKit_NSPDFPanel")]
23    unsafe impl ClassType for NSPDFPanel {
24        type Super = NSObject;
25        type Mutability = MainThreadOnly;
26    }
27);
28
29#[cfg(feature = "AppKit_NSPDFPanel")]
30unsafe impl NSObjectProtocol for NSPDFPanel {}
31
32extern_methods!(
33    #[cfg(feature = "AppKit_NSPDFPanel")]
34    unsafe impl NSPDFPanel {
35        #[method_id(@__retain_semantics Other panel)]
36        pub unsafe fn panel(mtm: MainThreadMarker) -> Id<NSPDFPanel>;
37
38        #[cfg(feature = "AppKit_NSViewController")]
39        #[method_id(@__retain_semantics Other accessoryController)]
40        pub unsafe fn accessoryController(&self) -> Option<Id<NSViewController>>;
41
42        #[cfg(feature = "AppKit_NSViewController")]
43        #[method(setAccessoryController:)]
44        pub unsafe fn setAccessoryController(
45            &self,
46            accessory_controller: Option<&NSViewController>,
47        );
48
49        #[method(options)]
50        pub unsafe fn options(&self) -> NSPDFPanelOptions;
51
52        #[method(setOptions:)]
53        pub unsafe fn setOptions(&self, options: NSPDFPanelOptions);
54
55        #[cfg(feature = "Foundation_NSString")]
56        #[method_id(@__retain_semantics Other defaultFileName)]
57        pub unsafe fn defaultFileName(&self) -> Id<NSString>;
58
59        #[cfg(feature = "Foundation_NSString")]
60        #[method(setDefaultFileName:)]
61        pub unsafe fn setDefaultFileName(&self, default_file_name: &NSString);
62
63        #[cfg(all(feature = "AppKit_NSPDFInfo", feature = "AppKit_NSWindow"))]
64        #[method(beginSheetWithPDFInfo:modalForWindow:completionHandler:)]
65        pub unsafe fn beginSheetWithPDFInfo_modalForWindow_completionHandler(
66            &self,
67            pdf_info: &NSPDFInfo,
68            doc_window: Option<&NSWindow>,
69            completion_handler: &Block<(NSInteger,), ()>,
70        );
71    }
72);
73
74extern_methods!(
75    /// Methods declared on superclass `NSObject`
76    #[cfg(feature = "AppKit_NSPDFPanel")]
77    unsafe impl NSPDFPanel {
78        #[method_id(@__retain_semantics Init init)]
79        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
80
81        #[method_id(@__retain_semantics New new)]
82        pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
83    }
84);