objc2_pdf_kit/generated/
PDFOutline.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
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfoutline?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct PDFOutline;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for PDFOutline {}
19);
20
21impl PDFOutline {
22    extern_methods!(
23        #[unsafe(method(init))]
24        #[unsafe(method_family = init)]
25        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
26
27        #[cfg(feature = "PDFDocument")]
28        #[unsafe(method(document))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn document(&self) -> Option<Retained<PDFDocument>>;
31
32        #[unsafe(method(parent))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn parent(&self) -> Option<Retained<PDFOutline>>;
35
36        #[unsafe(method(numberOfChildren))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn numberOfChildren(&self) -> NSUInteger;
39
40        #[unsafe(method(index))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn index(&self) -> NSUInteger;
43
44        #[unsafe(method(childAtIndex:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option<Retained<PDFOutline>>;
47
48        #[unsafe(method(insertChild:atIndex:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn insertChild_atIndex(&self, child: &PDFOutline, index: NSUInteger);
51
52        #[unsafe(method(removeFromParent))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn removeFromParent(&self);
55
56        #[unsafe(method(label))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn label(&self) -> Option<Retained<NSString>>;
59
60        /// Setter for [`label`][Self::label].
61        ///
62        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
63        #[unsafe(method(setLabel:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn setLabel(&self, label: Option<&NSString>);
66
67        #[unsafe(method(isOpen))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn isOpen(&self) -> bool;
70
71        /// Setter for [`isOpen`][Self::isOpen].
72        #[unsafe(method(setIsOpen:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn setIsOpen(&self, is_open: bool);
75
76        #[cfg(feature = "PDFDestination")]
77        #[unsafe(method(destination))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn destination(&self) -> Option<Retained<PDFDestination>>;
80
81        #[cfg(feature = "PDFDestination")]
82        /// Setter for [`destination`][Self::destination].
83        #[unsafe(method(setDestination:))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn setDestination(&self, destination: Option<&PDFDestination>);
86
87        #[cfg(feature = "PDFAction")]
88        #[unsafe(method(action))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn action(&self) -> Option<Retained<PDFAction>>;
91
92        #[cfg(feature = "PDFAction")]
93        /// Setter for [`action`][Self::action].
94        #[unsafe(method(setAction:))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn setAction(&self, action: Option<&PDFAction>);
97    );
98}
99
100/// Methods declared on superclass `NSObject`.
101impl PDFOutline {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new() -> Retained<Self>;
106    );
107}