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
19extern_conformance!(
20    unsafe impl NSObjectProtocol for WKBackForwardListItem {}
21);
22
23impl WKBackForwardListItem {
24    extern_methods!(
25        #[unsafe(method(init))]
26        #[unsafe(method_family = init)]
27        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
28
29        /// The URL of the webpage represented by this item.
30        #[unsafe(method(URL))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn URL(&self) -> Retained<NSURL>;
33
34        /// The title of the webpage represented by this item.
35        #[unsafe(method(title))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
38
39        /// The URL of the initial request that created this item.
40        #[unsafe(method(initialURL))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn initialURL(&self) -> Retained<NSURL>;
43    );
44}
45
46/// Methods declared on superclass `NSObject`.
47impl WKBackForwardListItem {
48    extern_methods!(
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
52    );
53}