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:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn setSnapshotWidth(&self, snapshot_width: Option<&NSNumber>);
64
65 #[unsafe(method(afterScreenUpdates))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn afterScreenUpdates(&self) -> bool;
73
74 #[unsafe(method(setAfterScreenUpdates:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn setAfterScreenUpdates(&self, after_screen_updates: bool);
78 );
79}
80
81impl WKSnapshotConfiguration {
83 extern_methods!(
84 #[unsafe(method(init))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88 #[unsafe(method(new))]
89 #[unsafe(method_family = new)]
90 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
91 );
92}