objc2_app_kit/generated/
NSPrintInfo.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-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspaperorientation?language=objc)
13// NS_ENUM
14#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct NSPaperOrientation(pub NSInteger);
17impl NSPaperOrientation {
18    #[doc(alias = "NSPaperOrientationPortrait")]
19    pub const Portrait: Self = Self(0);
20    #[doc(alias = "NSPaperOrientationLandscape")]
21    pub const Landscape: Self = Self(1);
22}
23
24unsafe impl Encode for NSPaperOrientation {
25    const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for NSPaperOrientation {
29    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintingpaginationmode?language=objc)
33// NS_ENUM
34#[repr(transparent)]
35#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
36pub struct NSPrintingPaginationMode(pub NSUInteger);
37impl NSPrintingPaginationMode {
38    #[doc(alias = "NSPrintingPaginationModeAutomatic")]
39    pub const Automatic: Self = Self(0);
40    #[doc(alias = "NSPrintingPaginationModeFit")]
41    pub const Fit: Self = Self(1);
42    #[doc(alias = "NSPrintingPaginationModeClip")]
43    pub const Clip: Self = Self(2);
44}
45
46unsafe impl Encode for NSPrintingPaginationMode {
47    const ENCODING: Encoding = NSUInteger::ENCODING;
48}
49
50unsafe impl RefEncode for NSPrintingPaginationMode {
51    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
52}
53
54/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintinfoattributekey?language=objc)
55// NS_TYPED_EXTENSIBLE_ENUM
56pub type NSPrintInfoAttributeKey = NSString;
57
58extern "C" {
59    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintpapername?language=objc)
60    pub static NSPrintPaperName: &'static NSPrintInfoAttributeKey;
61}
62
63extern "C" {
64    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintpapersize?language=objc)
65    pub static NSPrintPaperSize: &'static NSPrintInfoAttributeKey;
66}
67
68extern "C" {
69    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintorientation?language=objc)
70    pub static NSPrintOrientation: &'static NSPrintInfoAttributeKey;
71}
72
73extern "C" {
74    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintscalingfactor?language=objc)
75    pub static NSPrintScalingFactor: &'static NSPrintInfoAttributeKey;
76}
77
78extern "C" {
79    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintleftmargin?language=objc)
80    pub static NSPrintLeftMargin: &'static NSPrintInfoAttributeKey;
81}
82
83extern "C" {
84    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintrightmargin?language=objc)
85    pub static NSPrintRightMargin: &'static NSPrintInfoAttributeKey;
86}
87
88extern "C" {
89    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprinttopmargin?language=objc)
90    pub static NSPrintTopMargin: &'static NSPrintInfoAttributeKey;
91}
92
93extern "C" {
94    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintbottommargin?language=objc)
95    pub static NSPrintBottomMargin: &'static NSPrintInfoAttributeKey;
96}
97
98extern "C" {
99    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprinthorizontallycentered?language=objc)
100    pub static NSPrintHorizontallyCentered: &'static NSPrintInfoAttributeKey;
101}
102
103extern "C" {
104    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintverticallycentered?language=objc)
105    pub static NSPrintVerticallyCentered: &'static NSPrintInfoAttributeKey;
106}
107
108extern "C" {
109    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprinthorizontalpagination?language=objc)
110    pub static NSPrintHorizontalPagination: &'static NSPrintInfoAttributeKey;
111}
112
113extern "C" {
114    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintverticalpagination?language=objc)
115    pub static NSPrintVerticalPagination: &'static NSPrintInfoAttributeKey;
116}
117
118extern "C" {
119    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintprinter?language=objc)
120    pub static NSPrintPrinter: &'static NSPrintInfoAttributeKey;
121}
122
123extern "C" {
124    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintcopies?language=objc)
125    pub static NSPrintCopies: &'static NSPrintInfoAttributeKey;
126}
127
128extern "C" {
129    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintallpages?language=objc)
130    pub static NSPrintAllPages: &'static NSPrintInfoAttributeKey;
131}
132
133extern "C" {
134    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintfirstpage?language=objc)
135    pub static NSPrintFirstPage: &'static NSPrintInfoAttributeKey;
136}
137
138extern "C" {
139    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintlastpage?language=objc)
140    pub static NSPrintLastPage: &'static NSPrintInfoAttributeKey;
141}
142
143extern "C" {
144    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintmustcollate?language=objc)
145    pub static NSPrintMustCollate: &'static NSPrintInfoAttributeKey;
146}
147
148extern "C" {
149    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintreversepageorder?language=objc)
150    pub static NSPrintReversePageOrder: &'static NSPrintInfoAttributeKey;
151}
152
153extern "C" {
154    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintjobdisposition?language=objc)
155    pub static NSPrintJobDisposition: &'static NSPrintInfoAttributeKey;
156}
157
158extern "C" {
159    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintpagesacross?language=objc)
160    pub static NSPrintPagesAcross: &'static NSPrintInfoAttributeKey;
161}
162
163extern "C" {
164    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintpagesdown?language=objc)
165    pub static NSPrintPagesDown: &'static NSPrintInfoAttributeKey;
166}
167
168extern "C" {
169    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprinttime?language=objc)
170    pub static NSPrintTime: &'static NSPrintInfoAttributeKey;
171}
172
173extern "C" {
174    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintdetailederrorreporting?language=objc)
175    pub static NSPrintDetailedErrorReporting: &'static NSPrintInfoAttributeKey;
176}
177
178extern "C" {
179    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintfaxnumber?language=objc)
180    pub static NSPrintFaxNumber: &'static NSPrintInfoAttributeKey;
181}
182
183extern "C" {
184    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintprintername?language=objc)
185    pub static NSPrintPrinterName: &'static NSPrintInfoAttributeKey;
186}
187
188extern "C" {
189    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintselectiononly?language=objc)
190    pub static NSPrintSelectionOnly: &'static NSPrintInfoAttributeKey;
191}
192
193extern "C" {
194    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintjobsavingurl?language=objc)
195    pub static NSPrintJobSavingURL: &'static NSPrintInfoAttributeKey;
196}
197
198extern "C" {
199    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintjobsavingfilenameextensionhidden?language=objc)
200    pub static NSPrintJobSavingFileNameExtensionHidden: &'static NSPrintInfoAttributeKey;
201}
202
203extern "C" {
204    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintheaderandfooter?language=objc)
205    pub static NSPrintHeaderAndFooter: &'static NSPrintInfoAttributeKey;
206}
207
208/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintjobdispositionvalue?language=objc)
209// NS_TYPED_ENUM
210pub type NSPrintJobDispositionValue = NSString;
211
212extern "C" {
213    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintspooljob?language=objc)
214    pub static NSPrintSpoolJob: &'static NSPrintJobDispositionValue;
215}
216
217extern "C" {
218    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintpreviewjob?language=objc)
219    pub static NSPrintPreviewJob: &'static NSPrintJobDispositionValue;
220}
221
222extern "C" {
223    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintsavejob?language=objc)
224    pub static NSPrintSaveJob: &'static NSPrintJobDispositionValue;
225}
226
227extern "C" {
228    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintcanceljob?language=objc)
229    pub static NSPrintCancelJob: &'static NSPrintJobDispositionValue;
230}
231
232/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintinfosettingkey?language=objc)
233pub type NSPrintInfoSettingKey = NSString;
234
235extern_class!(
236    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintinfo?language=objc)
237    #[unsafe(super(NSObject))]
238    #[derive(Debug, PartialEq, Eq, Hash)]
239    pub struct NSPrintInfo;
240);
241
242unsafe impl NSCoding for NSPrintInfo {}
243
244unsafe impl NSCopying for NSPrintInfo {}
245
246unsafe impl CopyingHelper for NSPrintInfo {
247    type Result = Self;
248}
249
250unsafe impl NSObjectProtocol for NSPrintInfo {}
251
252impl NSPrintInfo {
253    extern_methods!(
254        #[unsafe(method(sharedPrintInfo))]
255        #[unsafe(method_family = none)]
256        pub unsafe fn sharedPrintInfo() -> Retained<NSPrintInfo>;
257
258        /// Setter for [`sharedPrintInfo`][Self::sharedPrintInfo].
259        #[unsafe(method(setSharedPrintInfo:))]
260        #[unsafe(method_family = none)]
261        pub unsafe fn setSharedPrintInfo(shared_print_info: &NSPrintInfo);
262
263        #[unsafe(method(initWithDictionary:))]
264        #[unsafe(method_family = init)]
265        pub unsafe fn initWithDictionary(
266            this: Allocated<Self>,
267            attributes: &NSDictionary<NSPrintInfoAttributeKey, AnyObject>,
268        ) -> Retained<Self>;
269
270        #[unsafe(method(initWithCoder:))]
271        #[unsafe(method_family = init)]
272        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
273
274        #[unsafe(method(init))]
275        #[unsafe(method_family = init)]
276        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
277
278        #[unsafe(method(dictionary))]
279        #[unsafe(method_family = none)]
280        pub unsafe fn dictionary(
281            &self,
282        ) -> Retained<NSMutableDictionary<NSPrintInfoAttributeKey, AnyObject>>;
283
284        #[cfg(feature = "NSPrinter")]
285        #[unsafe(method(paperName))]
286        #[unsafe(method_family = none)]
287        pub unsafe fn paperName(&self) -> Option<Retained<NSPrinterPaperName>>;
288
289        #[cfg(feature = "NSPrinter")]
290        /// Setter for [`paperName`][Self::paperName].
291        #[unsafe(method(setPaperName:))]
292        #[unsafe(method_family = none)]
293        pub unsafe fn setPaperName(&self, paper_name: Option<&NSPrinterPaperName>);
294
295        #[unsafe(method(paperSize))]
296        #[unsafe(method_family = none)]
297        pub unsafe fn paperSize(&self) -> NSSize;
298
299        /// Setter for [`paperSize`][Self::paperSize].
300        #[unsafe(method(setPaperSize:))]
301        #[unsafe(method_family = none)]
302        pub unsafe fn setPaperSize(&self, paper_size: NSSize);
303
304        #[unsafe(method(orientation))]
305        #[unsafe(method_family = none)]
306        pub unsafe fn orientation(&self) -> NSPaperOrientation;
307
308        /// Setter for [`orientation`][Self::orientation].
309        #[unsafe(method(setOrientation:))]
310        #[unsafe(method_family = none)]
311        pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation);
312
313        #[cfg(feature = "objc2-core-foundation")]
314        #[unsafe(method(scalingFactor))]
315        #[unsafe(method_family = none)]
316        pub unsafe fn scalingFactor(&self) -> CGFloat;
317
318        #[cfg(feature = "objc2-core-foundation")]
319        /// Setter for [`scalingFactor`][Self::scalingFactor].
320        #[unsafe(method(setScalingFactor:))]
321        #[unsafe(method_family = none)]
322        pub unsafe fn setScalingFactor(&self, scaling_factor: CGFloat);
323
324        #[cfg(feature = "objc2-core-foundation")]
325        #[unsafe(method(leftMargin))]
326        #[unsafe(method_family = none)]
327        pub unsafe fn leftMargin(&self) -> CGFloat;
328
329        #[cfg(feature = "objc2-core-foundation")]
330        /// Setter for [`leftMargin`][Self::leftMargin].
331        #[unsafe(method(setLeftMargin:))]
332        #[unsafe(method_family = none)]
333        pub unsafe fn setLeftMargin(&self, left_margin: CGFloat);
334
335        #[cfg(feature = "objc2-core-foundation")]
336        #[unsafe(method(rightMargin))]
337        #[unsafe(method_family = none)]
338        pub unsafe fn rightMargin(&self) -> CGFloat;
339
340        #[cfg(feature = "objc2-core-foundation")]
341        /// Setter for [`rightMargin`][Self::rightMargin].
342        #[unsafe(method(setRightMargin:))]
343        #[unsafe(method_family = none)]
344        pub unsafe fn setRightMargin(&self, right_margin: CGFloat);
345
346        #[cfg(feature = "objc2-core-foundation")]
347        #[unsafe(method(topMargin))]
348        #[unsafe(method_family = none)]
349        pub unsafe fn topMargin(&self) -> CGFloat;
350
351        #[cfg(feature = "objc2-core-foundation")]
352        /// Setter for [`topMargin`][Self::topMargin].
353        #[unsafe(method(setTopMargin:))]
354        #[unsafe(method_family = none)]
355        pub unsafe fn setTopMargin(&self, top_margin: CGFloat);
356
357        #[cfg(feature = "objc2-core-foundation")]
358        #[unsafe(method(bottomMargin))]
359        #[unsafe(method_family = none)]
360        pub unsafe fn bottomMargin(&self) -> CGFloat;
361
362        #[cfg(feature = "objc2-core-foundation")]
363        /// Setter for [`bottomMargin`][Self::bottomMargin].
364        #[unsafe(method(setBottomMargin:))]
365        #[unsafe(method_family = none)]
366        pub unsafe fn setBottomMargin(&self, bottom_margin: CGFloat);
367
368        #[unsafe(method(isHorizontallyCentered))]
369        #[unsafe(method_family = none)]
370        pub unsafe fn isHorizontallyCentered(&self) -> bool;
371
372        /// Setter for [`isHorizontallyCentered`][Self::isHorizontallyCentered].
373        #[unsafe(method(setHorizontallyCentered:))]
374        #[unsafe(method_family = none)]
375        pub unsafe fn setHorizontallyCentered(&self, horizontally_centered: bool);
376
377        #[unsafe(method(isVerticallyCentered))]
378        #[unsafe(method_family = none)]
379        pub unsafe fn isVerticallyCentered(&self) -> bool;
380
381        /// Setter for [`isVerticallyCentered`][Self::isVerticallyCentered].
382        #[unsafe(method(setVerticallyCentered:))]
383        #[unsafe(method_family = none)]
384        pub unsafe fn setVerticallyCentered(&self, vertically_centered: bool);
385
386        #[unsafe(method(horizontalPagination))]
387        #[unsafe(method_family = none)]
388        pub unsafe fn horizontalPagination(&self) -> NSPrintingPaginationMode;
389
390        /// Setter for [`horizontalPagination`][Self::horizontalPagination].
391        #[unsafe(method(setHorizontalPagination:))]
392        #[unsafe(method_family = none)]
393        pub unsafe fn setHorizontalPagination(
394            &self,
395            horizontal_pagination: NSPrintingPaginationMode,
396        );
397
398        #[unsafe(method(verticalPagination))]
399        #[unsafe(method_family = none)]
400        pub unsafe fn verticalPagination(&self) -> NSPrintingPaginationMode;
401
402        /// Setter for [`verticalPagination`][Self::verticalPagination].
403        #[unsafe(method(setVerticalPagination:))]
404        #[unsafe(method_family = none)]
405        pub unsafe fn setVerticalPagination(&self, vertical_pagination: NSPrintingPaginationMode);
406
407        #[unsafe(method(jobDisposition))]
408        #[unsafe(method_family = none)]
409        pub unsafe fn jobDisposition(&self) -> Retained<NSPrintJobDispositionValue>;
410
411        /// Setter for [`jobDisposition`][Self::jobDisposition].
412        #[unsafe(method(setJobDisposition:))]
413        #[unsafe(method_family = none)]
414        pub unsafe fn setJobDisposition(&self, job_disposition: &NSPrintJobDispositionValue);
415
416        #[cfg(feature = "NSPrinter")]
417        #[unsafe(method(printer))]
418        #[unsafe(method_family = none)]
419        pub unsafe fn printer(&self) -> Retained<NSPrinter>;
420
421        #[cfg(feature = "NSPrinter")]
422        /// Setter for [`printer`][Self::printer].
423        #[unsafe(method(setPrinter:))]
424        #[unsafe(method_family = none)]
425        pub unsafe fn setPrinter(&self, printer: &NSPrinter);
426
427        #[unsafe(method(setUpPrintOperationDefaultValues))]
428        #[unsafe(method_family = none)]
429        pub unsafe fn setUpPrintOperationDefaultValues(&self);
430
431        #[unsafe(method(imageablePageBounds))]
432        #[unsafe(method_family = none)]
433        pub unsafe fn imageablePageBounds(&self) -> NSRect;
434
435        #[unsafe(method(localizedPaperName))]
436        #[unsafe(method_family = none)]
437        pub unsafe fn localizedPaperName(&self) -> Option<Retained<NSString>>;
438
439        #[cfg(feature = "NSPrinter")]
440        #[unsafe(method(defaultPrinter))]
441        #[unsafe(method_family = none)]
442        pub unsafe fn defaultPrinter() -> Option<Retained<NSPrinter>>;
443
444        #[unsafe(method(printSettings))]
445        #[unsafe(method_family = none)]
446        pub unsafe fn printSettings(
447            &self,
448        ) -> Retained<NSMutableDictionary<NSPrintInfoSettingKey, AnyObject>>;
449
450        #[unsafe(method(PMPrintSession))]
451        #[unsafe(method_family = none)]
452        pub unsafe fn PMPrintSession(&self) -> NonNull<c_void>;
453
454        #[unsafe(method(PMPageFormat))]
455        #[unsafe(method_family = none)]
456        pub unsafe fn PMPageFormat(&self) -> NonNull<c_void>;
457
458        #[unsafe(method(PMPrintSettings))]
459        #[unsafe(method_family = none)]
460        pub unsafe fn PMPrintSettings(&self) -> NonNull<c_void>;
461
462        #[unsafe(method(updateFromPMPageFormat))]
463        #[unsafe(method_family = none)]
464        pub unsafe fn updateFromPMPageFormat(&self);
465
466        #[unsafe(method(updateFromPMPrintSettings))]
467        #[unsafe(method_family = none)]
468        pub unsafe fn updateFromPMPrintSettings(&self);
469
470        #[unsafe(method(isSelectionOnly))]
471        #[unsafe(method_family = none)]
472        pub unsafe fn isSelectionOnly(&self) -> bool;
473
474        /// Setter for [`isSelectionOnly`][Self::isSelectionOnly].
475        #[unsafe(method(setSelectionOnly:))]
476        #[unsafe(method_family = none)]
477        pub unsafe fn setSelectionOnly(&self, selection_only: bool);
478
479        #[cfg(feature = "NSPDFInfo")]
480        #[unsafe(method(takeSettingsFromPDFInfo:))]
481        #[unsafe(method_family = none)]
482        pub unsafe fn takeSettingsFromPDFInfo(&self, in_pdf_info: &NSPDFInfo);
483    );
484}
485
486/// Methods declared on superclass `NSObject`.
487impl NSPrintInfo {
488    extern_methods!(
489        #[unsafe(method(new))]
490        #[unsafe(method_family = new)]
491        pub unsafe fn new() -> Retained<Self>;
492    );
493}
494
495/// NSDeprecated.
496impl NSPrintInfo {
497    extern_methods!(
498        #[cfg(feature = "NSPrinter")]
499        #[deprecated = "NSPrintInfo's implementation has no effect"]
500        #[unsafe(method(setDefaultPrinter:))]
501        #[unsafe(method_family = none)]
502        pub unsafe fn setDefaultPrinter(printer: Option<&NSPrinter>);
503
504        #[cfg(feature = "NSPrinter")]
505        #[deprecated = "Use -[NSPrinter pageSizeForPaper:] instead"]
506        #[unsafe(method(sizeForPaperName:))]
507        #[unsafe(method_family = none)]
508        pub unsafe fn sizeForPaperName(name: Option<&NSPrinterPaperName>) -> NSSize;
509    );
510}
511
512extern "C" {
513    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintformname?language=objc)
514    pub static NSPrintFormName: &'static NSString;
515}
516
517extern "C" {
518    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintjobfeatures?language=objc)
519    pub static NSPrintJobFeatures: &'static NSString;
520}
521
522extern "C" {
523    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintmanualfeed?language=objc)
524    pub static NSPrintManualFeed: &'static NSString;
525}
526
527extern "C" {
528    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintpagespersheet?language=objc)
529    pub static NSPrintPagesPerSheet: &'static NSString;
530}
531
532extern "C" {
533    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintpaperfeed?language=objc)
534    pub static NSPrintPaperFeed: &'static NSString;
535}
536
537extern "C" {
538    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintsavepath?language=objc)
539    pub static NSPrintSavePath: &'static NSString;
540}
541
542/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintingorientation?language=objc)
543// NS_ENUM
544#[deprecated]
545#[repr(transparent)]
546#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
547pub struct NSPrintingOrientation(pub NSUInteger);
548impl NSPrintingOrientation {
549    #[deprecated]
550    #[doc(alias = "NSPortraitOrientation")]
551    pub const PortraitOrientation: Self = Self(0);
552    #[deprecated]
553    #[doc(alias = "NSLandscapeOrientation")]
554    pub const LandscapeOrientation: Self = Self(1);
555}
556
557unsafe impl Encode for NSPrintingOrientation {
558    const ENCODING: Encoding = NSUInteger::ENCODING;
559}
560
561unsafe impl RefEncode for NSPrintingOrientation {
562    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
563}
564
565/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsautopagination?language=objc)
566pub static NSAutoPagination: NSPrintingPaginationMode =
567    NSPrintingPaginationMode(NSPrintingPaginationMode::Automatic.0);
568
569/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfitpagination?language=objc)
570pub static NSFitPagination: NSPrintingPaginationMode =
571    NSPrintingPaginationMode(NSPrintingPaginationMode::Fit.0);
572
573/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsclippagination?language=objc)
574pub static NSClipPagination: NSPrintingPaginationMode =
575    NSPrintingPaginationMode(NSPrintingPaginationMode::Clip.0);