1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// A WKBackForwardList object is a list of webpages previously
/// visited in a web view that can be reached by going back or forward.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wkbackforwardlist?language=objc)
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct WKBackForwardList;
);
unsafe impl NSObjectProtocol for WKBackForwardList {}
impl WKBackForwardList {
extern_methods!(
#[cfg(feature = "WKBackForwardListItem")]
/// The current item.
#[unsafe(method(currentItem))]
#[unsafe(method_family = none)]
pub unsafe fn currentItem(&self) -> Option<Retained<WKBackForwardListItem>>;
#[cfg(feature = "WKBackForwardListItem")]
/// The item immediately preceding the current item, or nil
/// if there isn't one.
#[unsafe(method(backItem))]
#[unsafe(method_family = none)]
pub unsafe fn backItem(&self) -> Option<Retained<WKBackForwardListItem>>;
#[cfg(feature = "WKBackForwardListItem")]
/// The item immediately following the current item, or nil
/// if there isn't one.
#[unsafe(method(forwardItem))]
#[unsafe(method_family = none)]
pub unsafe fn forwardItem(&self) -> Option<Retained<WKBackForwardListItem>>;
#[cfg(feature = "WKBackForwardListItem")]
/// Returns the item at a specified distance from the current
/// item.
///
/// Parameter `index`: Index of the desired list item relative to the current item:
/// 0 for the current item, -1 for the immediately preceding item, 1 for the
/// immediately following item, and so on.
///
/// Returns: The item at the specified distance from the current item, or nil
/// if the index parameter exceeds the limits of the list.
#[unsafe(method(itemAtIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn itemAtIndex(
&self,
index: NSInteger,
) -> Option<Retained<WKBackForwardListItem>>;
#[cfg(feature = "WKBackForwardListItem")]
/// The portion of the list preceding the current item.
///
/// The items are in the order in which they were originally
/// visited.
#[unsafe(method(backList))]
#[unsafe(method_family = none)]
pub unsafe fn backList(&self) -> Retained<NSArray<WKBackForwardListItem>>;
#[cfg(feature = "WKBackForwardListItem")]
/// The portion of the list following the current item.
///
/// The items are in the order in which they were originally
/// visited.
#[unsafe(method(forwardList))]
#[unsafe(method_family = none)]
pub unsafe fn forwardList(&self) -> Retained<NSArray<WKBackForwardListItem>>;
);
}
/// Methods declared on superclass `NSObject`.
impl WKBackForwardList {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}