objc2_pdf_kit/generated/
PDFThumbnailView.rs1use 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 pub static PDFThumbnailViewDocumentEditedNotification: &'static NSString;
16}
17
18extern_class!(
19 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[unsafe(method(setAllowsMultipleSelection:))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool);
154 );
155}
156
157#[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 #[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#[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#[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}