objc2_web_kit/generated/
WebHistory.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 pub static WebHistoryItemsAddedNotification: Option<&'static NSString>;
13}
14
15extern "C" {
16 pub static WebHistoryItemsRemovedNotification: Option<&'static NSString>;
18}
19
20extern "C" {
21 pub static WebHistoryAllItemsRemovedNotification: Option<&'static NSString>;
23}
24
25extern "C" {
26 pub static WebHistoryLoadedNotification: Option<&'static NSString>;
28}
29
30extern "C" {
31 pub static WebHistorySavedNotification: Option<&'static NSString>;
33}
34
35extern "C" {
36 pub static WebHistoryItemsKey: Option<&'static NSString>;
38}
39
40extern_class!(
41 #[unsafe(super(NSObject))]
46 #[derive(Debug, PartialEq, Eq, Hash)]
47 #[deprecated]
48 pub struct WebHistory;
49);
50
51unsafe impl NSObjectProtocol for WebHistory {}
52
53impl WebHistory {
54 extern_methods!(
55 #[deprecated]
59 #[unsafe(method(optionalSharedHistory))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn optionalSharedHistory() -> Option<Retained<WebHistory>>;
62
63 #[deprecated]
65 #[unsafe(method(setOptionalSharedHistory:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setOptionalSharedHistory(history: Option<&WebHistory>);
68
69 #[deprecated]
71 #[unsafe(method(addItems:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn addItems(&self, new_items: Option<&NSArray>);
74
75 #[deprecated]
77 #[unsafe(method(removeItems:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn removeItems(&self, items: Option<&NSArray>);
80
81 #[deprecated]
82 #[unsafe(method(removeAllItems))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn removeAllItems(&self);
85
86 #[deprecated]
91 #[unsafe(method(orderedLastVisitedDays))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn orderedLastVisitedDays(&self) -> Retained<NSArray>;
94
95 #[deprecated]
96 #[unsafe(method(orderedItemsLastVisitedOnDay:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn orderedItemsLastVisitedOnDay(
99 &self,
100 calendar_date: Option<&NSCalendarDate>,
101 ) -> Option<Retained<NSArray>>;
102
103 #[cfg(feature = "WebHistoryItem")]
104 #[deprecated]
110 #[unsafe(method(itemForURL:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn itemForURL(&self, url: Option<&NSURL>) -> Option<Retained<WebHistoryItem>>;
113
114 #[deprecated]
116 #[unsafe(method(historyItemLimit))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn historyItemLimit(&self) -> c_int;
119
120 #[deprecated]
122 #[unsafe(method(setHistoryItemLimit:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn setHistoryItemLimit(&self, history_item_limit: c_int);
125
126 #[deprecated]
128 #[unsafe(method(historyAgeInDaysLimit))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn historyAgeInDaysLimit(&self) -> c_int;
131
132 #[deprecated]
134 #[unsafe(method(setHistoryAgeInDaysLimit:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn setHistoryAgeInDaysLimit(&self, history_age_in_days_limit: c_int);
137 );
138}
139
140impl WebHistory {
142 extern_methods!(
143 #[unsafe(method(init))]
144 #[unsafe(method_family = init)]
145 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
146
147 #[unsafe(method(new))]
148 #[unsafe(method_family = new)]
149 pub unsafe fn new() -> Retained<Self>;
150 );
151}