objc2_web_kit/generated/
WKPDFConfiguration.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
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/wkpdfconfiguration?language=objc)
14    #[unsafe(super(NSObject))]
15    #[thread_kind = MainThreadOnly]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct WKPDFConfiguration;
18);
19
20unsafe impl NSCopying for WKPDFConfiguration {}
21
22unsafe impl CopyingHelper for WKPDFConfiguration {
23    type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for WKPDFConfiguration {}
27
28impl WKPDFConfiguration {
29    extern_methods!(
30        #[cfg(feature = "objc2-core-foundation")]
31        /// The rect to capture in web page coordinates
32        ///
33        /// If the rect is set to the null rect, the bounds of the currently displayed web page will be used.
34        /// The initial value is the null rect.
35        #[unsafe(method(rect))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn rect(&self) -> CGRect;
38
39        #[cfg(feature = "objc2-core-foundation")]
40        /// Setter for [`rect`][Self::rect].
41        #[unsafe(method(setRect:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn setRect(&self, rect: CGRect);
44
45        /// A Boolean value indicating whether the PDF should allow transparent backgrounds.
46        ///
47        /// The default value is `NO`.
48        #[unsafe(method(allowTransparentBackground))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn allowTransparentBackground(&self) -> bool;
51
52        /// Setter for [`allowTransparentBackground`][Self::allowTransparentBackground].
53        #[unsafe(method(setAllowTransparentBackground:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setAllowTransparentBackground(&self, allow_transparent_background: bool);
56    );
57}
58
59/// Methods declared on superclass `NSObject`.
60impl WKPDFConfiguration {
61    extern_methods!(
62        #[unsafe(method(init))]
63        #[unsafe(method_family = init)]
64        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
65
66        #[unsafe(method(new))]
67        #[unsafe(method_family = new)]
68        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
69    );
70}