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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webhistoryitemchangednotification?language=objc)
pub static WebHistoryItemChangedNotification: Option<&'static NSString>;
}
extern_class!(
/// WebHistoryItems are created by WebKit to represent pages visited.
/// The WebBackForwardList and WebHistory classes both use WebHistoryItems to represent
/// pages visited. With the exception of the displayTitle, the properties of
/// WebHistoryItems are set by WebKit. WebHistoryItems are normally never created directly.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webhistoryitem?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[deprecated]
pub struct WebHistoryItem;
);
unsafe impl NSCopying for WebHistoryItem {}
unsafe impl CopyingHelper for WebHistoryItem {
type Result = Self;
}
unsafe impl NSObjectProtocol for WebHistoryItem {}
impl WebHistoryItem {
extern_methods!(
/// Parameter `URLString`: The URL string for the item.
///
/// Parameter `title`: The title to use for the item. This is normally the
/// <title
/// > of a page.
///
/// Parameter `time`: The time used to indicate when the item was used.
///
/// Initialize a new WebHistoryItem
///
/// WebHistoryItems are normally created for you by the WebKit.
/// You may use this method to prepopulate a WebBackForwardList, or create
/// 'artificial' items to add to a WebBackForwardList. When first initialized
/// the URLString and originalURLString will be the same.
#[deprecated]
#[unsafe(method(initWithURLString:title:lastVisitedTimeInterval:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithURLString_title_lastVisitedTimeInterval(
this: Allocated<Self>,
url_string: Option<&NSString>,
title: Option<&NSString>,
time: NSTimeInterval,
) -> Option<Retained<Self>>;
/// The string representation of the initial URL of this item.
/// This value is normally set by the WebKit.
#[deprecated]
#[unsafe(method(originalURLString))]
#[unsafe(method_family = none)]
pub unsafe fn originalURLString(&self) -> Retained<NSString>;
/// The string representation of the URL represented by this item.
///
/// The URLString may be different than the originalURLString if the page
/// redirected to a new location. This value is normally set by the WebKit.
#[deprecated]
#[unsafe(method(URLString))]
#[unsafe(method_family = none)]
pub unsafe fn URLString(&self) -> Retained<NSString>;
/// The title of the page represented by this item.
///
/// This title cannot be changed by the client. This value
/// is normally set by the WebKit when a page title for the item is received.
#[deprecated]
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Retained<NSString>;
/// The last time the page represented by this item was visited. The interval
/// is since the reference date as determined by NSDate. This value is normally set by
/// the WebKit.
#[deprecated]
#[unsafe(method(lastVisitedTimeInterval))]
#[unsafe(method_family = none)]
pub unsafe fn lastVisitedTimeInterval(&self) -> NSTimeInterval;
#[deprecated]
#[unsafe(method(alternateTitle))]
#[unsafe(method_family = none)]
pub unsafe fn alternateTitle(&self) -> Retained<NSString>;
/// Setter for [`alternateTitle`][Self::alternateTitle].
#[deprecated]
#[unsafe(method(setAlternateTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setAlternateTitle(&self, alternate_title: Option<&NSString>);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
/// The favorite icon of the page represented by this item.
///
/// This icon returned will be determined by the WebKit.
#[deprecated]
#[unsafe(method(icon))]
#[unsafe(method_family = none)]
pub unsafe fn icon(&self) -> Option<Retained<NSImage>>;
);
}
/// Methods declared on superclass `NSObject`.
impl WebHistoryItem {
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() -> Retained<Self>;
);
}