objc2_web_kit/generated/
WKBackForwardListItem.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A WKBackForwardListItem object represents a webpage in the back-forward list of a web view.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wkbackforwardlistitem?language=objc)
13    #[unsafe(super(NSObject))]
14    #[thread_kind = MainThreadOnly]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct WKBackForwardListItem;
17);
18
19unsafe impl NSObjectProtocol for WKBackForwardListItem {}
20
21impl WKBackForwardListItem {
22    extern_methods!(
23        #[unsafe(method(init))]
24        #[unsafe(method_family = init)]
25        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
26
27        /// The URL of the webpage represented by this item.
28        #[unsafe(method(URL))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn URL(&self) -> Retained<NSURL>;
31
32        /// The title of the webpage represented by this item.
33        #[unsafe(method(title))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
36
37        /// The URL of the initial request that created this item.
38        #[unsafe(method(initialURL))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn initialURL(&self) -> Retained<NSURL>;
41    );
42}
43
44/// Methods declared on superclass `NSObject`.
45impl WKBackForwardListItem {
46    extern_methods!(
47        #[unsafe(method(new))]
48        #[unsafe(method_family = new)]
49        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
50    );
51}