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
20unsafe impl NSCopying for WKSnapshotConfiguration {}
21
22unsafe impl CopyingHelper for WKSnapshotConfiguration {
23 type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for WKSnapshotConfiguration {}
27
28impl WKSnapshotConfiguration {
29 extern_methods!(
30 #[cfg(feature = "objc2-core-foundation")]
31 #[unsafe(method(rect))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn rect(&self) -> CGRect;
38
39 #[cfg(feature = "objc2-core-foundation")]
40 #[unsafe(method(setRect:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setRect(&self, rect: CGRect);
44
45 #[unsafe(method(snapshotWidth))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn snapshotWidth(&self) -> Option<Retained<NSNumber>>;
53
54 #[unsafe(method(setSnapshotWidth:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn setSnapshotWidth(&self, snapshot_width: Option<&NSNumber>);
58
59 #[unsafe(method(afterScreenUpdates))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn afterScreenUpdates(&self) -> bool;
67
68 #[unsafe(method(setAfterScreenUpdates:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn setAfterScreenUpdates(&self, after_screen_updates: bool);
72 );
73}
74
75impl WKSnapshotConfiguration {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
85 );
86}