objc2_web_kit/generated/
WKNavigation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// A WKNavigation object can be used for tracking the loading progress of a webpage.
10    ///
11    /// A navigation is returned from the web view load methods, and is
12    /// also passed to the navigation delegate methods, to uniquely identify a webpage
13    /// load from start to finish.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wknavigation?language=objc)
16    #[unsafe(super(NSObject))]
17    #[thread_kind = MainThreadOnly]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    pub struct WKNavigation;
20);
21
22unsafe impl NSObjectProtocol for WKNavigation {}
23
24impl WKNavigation {
25    extern_methods!(
26        #[cfg(feature = "WKWebpagePreferences")]
27        /// The content mode used when loading this webpage.
28        ///
29        /// The value is either WKContentModeMobile or WKContentModeDesktop.
30        #[unsafe(method(effectiveContentMode))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn effectiveContentMode(&self) -> WKContentMode;
33    );
34}
35
36/// Methods declared on superclass `NSObject`.
37impl WKNavigation {
38    extern_methods!(
39        #[unsafe(method(init))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
42
43        #[unsafe(method(new))]
44        #[unsafe(method_family = new)]
45        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
46    );
47}