objc2_pdf_kit/generated/
PDFActionNamed.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfactionnamedname?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct PDFActionNamedName(pub NSInteger);
15impl PDFActionNamedName {
16    #[doc(alias = "kPDFActionNamedNone")]
17    pub const None: Self = Self(0);
18    #[doc(alias = "kPDFActionNamedNextPage")]
19    pub const NextPage: Self = Self(1);
20    #[doc(alias = "kPDFActionNamedPreviousPage")]
21    pub const PreviousPage: Self = Self(2);
22    #[doc(alias = "kPDFActionNamedFirstPage")]
23    pub const FirstPage: Self = Self(3);
24    #[doc(alias = "kPDFActionNamedLastPage")]
25    pub const LastPage: Self = Self(4);
26    #[doc(alias = "kPDFActionNamedGoBack")]
27    pub const GoBack: Self = Self(5);
28    #[doc(alias = "kPDFActionNamedGoForward")]
29    pub const GoForward: Self = Self(6);
30    #[doc(alias = "kPDFActionNamedGoToPage")]
31    pub const GoToPage: Self = Self(7);
32    #[doc(alias = "kPDFActionNamedFind")]
33    pub const Find: Self = Self(8);
34    #[doc(alias = "kPDFActionNamedPrint")]
35    pub const Print: Self = Self(9);
36    #[doc(alias = "kPDFActionNamedZoomIn")]
37    pub const ZoomIn: Self = Self(10);
38    #[doc(alias = "kPDFActionNamedZoomOut")]
39    pub const ZoomOut: Self = Self(11);
40}
41
42unsafe impl Encode for PDFActionNamedName {
43    const ENCODING: Encoding = NSInteger::ENCODING;
44}
45
46unsafe impl RefEncode for PDFActionNamedName {
47    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
48}
49
50extern_class!(
51    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfactionnamed?language=objc)
52    #[unsafe(super(PDFAction, NSObject))]
53    #[derive(Debug, PartialEq, Eq, Hash)]
54    #[cfg(feature = "PDFAction")]
55    pub struct PDFActionNamed;
56);
57
58#[cfg(feature = "PDFAction")]
59extern_conformance!(
60    unsafe impl NSCopying for PDFActionNamed {}
61);
62
63#[cfg(feature = "PDFAction")]
64unsafe impl CopyingHelper for PDFActionNamed {
65    type Result = Self;
66}
67
68#[cfg(feature = "PDFAction")]
69extern_conformance!(
70    unsafe impl NSObjectProtocol for PDFActionNamed {}
71);
72
73#[cfg(feature = "PDFAction")]
74impl PDFActionNamed {
75    extern_methods!(
76        #[unsafe(method(initWithName:))]
77        #[unsafe(method_family = init)]
78        pub unsafe fn initWithName(
79            this: Allocated<Self>,
80            name: PDFActionNamedName,
81        ) -> Retained<Self>;
82
83        #[unsafe(method(name))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn name(&self) -> PDFActionNamedName;
86
87        /// Setter for [`name`][Self::name].
88        #[unsafe(method(setName:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setName(&self, name: PDFActionNamedName);
91    );
92}
93
94/// Methods declared on superclass `NSObject`.
95#[cfg(feature = "PDFAction")]
96impl PDFActionNamed {
97    extern_methods!(
98        #[unsafe(method(init))]
99        #[unsafe(method_family = init)]
100        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
101
102        #[unsafe(method(new))]
103        #[unsafe(method_family = new)]
104        pub unsafe fn new() -> Retained<Self>;
105    );
106}