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
22extern_conformance!(
23    unsafe impl NSObjectProtocol for WKNavigation {}
24);
25
26impl WKNavigation {
27    extern_methods!(
28        #[cfg(feature = "WKWebpagePreferences")]
29        /// The content mode used when loading this webpage.
30        ///
31        /// The value is either WKContentModeMobile or WKContentModeDesktop.
32        #[unsafe(method(effectiveContentMode))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn effectiveContentMode(&self) -> WKContentMode;
35    );
36}
37
38/// Methods declared on superclass `NSObject`.
39impl WKNavigation {
40    extern_methods!(
41        #[unsafe(method(init))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
48    );
49}