objc2_web_kit/generated/
WKSnapshotConfiguration.rs1use 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 #[unsafe(super(NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct WKSnapshotConfiguration;
18);
19
20extern_conformance!(
21 unsafe impl NSCopying for WKSnapshotConfiguration {}
22);
23
24unsafe impl CopyingHelper for WKSnapshotConfiguration {
25 type Result = Self;
26}
27
28extern_conformance!(
29 unsafe impl NSObjectProtocol for WKSnapshotConfiguration {}
30);
31
32impl WKSnapshotConfiguration {
33 extern_methods!(
34 #[cfg(feature = "objc2-core-foundation")]
35 #[unsafe(method(rect))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn rect(&self) -> CGRect;
42
43 #[cfg(feature = "objc2-core-foundation")]
44 #[unsafe(method(setRect:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn setRect(&self, rect: CGRect);
48
49 #[unsafe(method(snapshotWidth))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn snapshotWidth(&self) -> Option<Retained<NSNumber>>;
57
58 #[unsafe(method(setSnapshotWidth:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setSnapshotWidth(&self, snapshot_width: Option<&NSNumber>);
62
63 #[unsafe(method(afterScreenUpdates))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn afterScreenUpdates(&self) -> bool;
71
72 #[unsafe(method(setAfterScreenUpdates:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn setAfterScreenUpdates(&self, after_screen_updates: bool);
76 );
77}
78
79impl WKSnapshotConfiguration {
81 extern_methods!(
82 #[unsafe(method(init))]
83 #[unsafe(method_family = init)]
84 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85
86 #[unsafe(method(new))]
87 #[unsafe(method_family = new)]
88 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
89 );
90}