objc2_pdf_kit/generated/
PDFThumbnailView.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern "C" {
14    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfthumbnailviewdocumenteditednotification?language=objc)
15    pub static PDFThumbnailViewDocumentEditedNotification: &'static NSString;
16}
17
18extern_class!(
19    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfthumbnailview?language=objc)
20    #[unsafe(super(NSView, NSResponder, NSObject))]
21    #[derive(Debug, PartialEq, Eq, Hash)]
22    #[cfg(feature = "objc2-app-kit")]
23    #[cfg(target_os = "macos")]
24    pub struct PDFThumbnailView;
25);
26
27#[cfg(feature = "objc2-app-kit")]
28#[cfg(target_os = "macos")]
29extern_conformance!(
30    unsafe impl NSAccessibility for PDFThumbnailView {}
31);
32
33#[cfg(feature = "objc2-app-kit")]
34#[cfg(target_os = "macos")]
35extern_conformance!(
36    unsafe impl NSAccessibilityElementProtocol for PDFThumbnailView {}
37);
38
39#[cfg(feature = "objc2-app-kit")]
40#[cfg(target_os = "macos")]
41extern_conformance!(
42    unsafe impl NSAnimatablePropertyContainer for PDFThumbnailView {}
43);
44
45#[cfg(feature = "objc2-app-kit")]
46#[cfg(target_os = "macos")]
47extern_conformance!(
48    unsafe impl NSAppearanceCustomization for PDFThumbnailView {}
49);
50
51#[cfg(feature = "objc2-app-kit")]
52#[cfg(target_os = "macos")]
53extern_conformance!(
54    unsafe impl NSCoding for PDFThumbnailView {}
55);
56
57#[cfg(feature = "objc2-app-kit")]
58#[cfg(target_os = "macos")]
59extern_conformance!(
60    unsafe impl NSDraggingDestination for PDFThumbnailView {}
61);
62
63#[cfg(feature = "objc2-app-kit")]
64#[cfg(target_os = "macos")]
65extern_conformance!(
66    unsafe impl NSObjectProtocol for PDFThumbnailView {}
67);
68
69#[cfg(feature = "objc2-app-kit")]
70#[cfg(target_os = "macos")]
71extern_conformance!(
72    unsafe impl NSUserInterfaceItemIdentification for PDFThumbnailView {}
73);
74
75#[cfg(feature = "objc2-app-kit")]
76#[cfg(target_os = "macos")]
77impl PDFThumbnailView {
78    extern_methods!(
79        #[cfg(feature = "PDFView")]
80        #[unsafe(method(PDFView))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn PDFView(&self) -> Option<Retained<PDFView>>;
83
84        #[cfg(feature = "PDFView")]
85        /// Setter for [`PDFView`][Self::PDFView].
86        ///
87        /// This is a [weak property][objc2::topics::weak_property].
88        #[unsafe(method(setPDFView:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setPDFView(&self, pdf_view: Option<&PDFView>);
91
92        #[unsafe(method(backgroundColor))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn backgroundColor(&self) -> Option<Retained<NSColor>>;
95
96        /// Setter for [`backgroundColor`][Self::backgroundColor].
97        ///
98        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
99        #[unsafe(method(setBackgroundColor:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>);
102
103        #[cfg(feature = "PDFPage")]
104        #[unsafe(method(selectedPages))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn selectedPages(&self) -> Option<Retained<NSArray<PDFPage>>>;
107
108        #[unsafe(method(thumbnailSize))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn thumbnailSize(&self) -> NSSize;
111
112        /// Setter for [`thumbnailSize`][Self::thumbnailSize].
113        #[unsafe(method(setThumbnailSize:))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn setThumbnailSize(&self, thumbnail_size: NSSize);
116
117        #[unsafe(method(maximumNumberOfColumns))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn maximumNumberOfColumns(&self) -> NSUInteger;
120
121        /// Setter for [`maximumNumberOfColumns`][Self::maximumNumberOfColumns].
122        #[unsafe(method(setMaximumNumberOfColumns:))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn setMaximumNumberOfColumns(&self, maximum_number_of_columns: NSUInteger);
125
126        #[unsafe(method(labelFont))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn labelFont(&self) -> Option<Retained<NSFont>>;
129
130        /// Setter for [`labelFont`][Self::labelFont].
131        ///
132        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
133        #[unsafe(method(setLabelFont:))]
134        #[unsafe(method_family = none)]
135        pub unsafe fn setLabelFont(&self, label_font: Option<&NSFont>);
136
137        #[unsafe(method(allowsDragging))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn allowsDragging(&self) -> bool;
140
141        /// Setter for [`allowsDragging`][Self::allowsDragging].
142        #[unsafe(method(setAllowsDragging:))]
143        #[unsafe(method_family = none)]
144        pub unsafe fn setAllowsDragging(&self, allows_dragging: bool);
145
146        #[unsafe(method(allowsMultipleSelection))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn allowsMultipleSelection(&self) -> bool;
149
150        /// Setter for [`allowsMultipleSelection`][Self::allowsMultipleSelection].
151        #[unsafe(method(setAllowsMultipleSelection:))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool);
154    );
155}
156
157/// Methods declared on superclass `NSView`.
158#[cfg(feature = "objc2-app-kit")]
159#[cfg(target_os = "macos")]
160impl PDFThumbnailView {
161    extern_methods!(
162        #[unsafe(method(initWithFrame:))]
163        #[unsafe(method_family = init)]
164        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
165
166        /// # Safety
167        ///
168        /// `coder` possibly has further requirements.
169        #[unsafe(method(initWithCoder:))]
170        #[unsafe(method_family = init)]
171        pub unsafe fn initWithCoder(
172            this: Allocated<Self>,
173            coder: &NSCoder,
174        ) -> Option<Retained<Self>>;
175    );
176}
177
178/// Methods declared on superclass `NSResponder`.
179#[cfg(feature = "objc2-app-kit")]
180#[cfg(target_os = "macos")]
181impl PDFThumbnailView {
182    extern_methods!(
183        #[unsafe(method(init))]
184        #[unsafe(method_family = init)]
185        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
186    );
187}
188
189/// Methods declared on superclass `NSObject`.
190#[cfg(feature = "objc2-app-kit")]
191#[cfg(target_os = "macos")]
192impl PDFThumbnailView {
193    extern_methods!(
194        #[unsafe(method(new))]
195        #[unsafe(method_family = new)]
196        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
197    );
198}