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
51extern_conformance!(
52 unsafe impl NSObjectProtocol for WebHistory {}
53);
54
55impl WebHistory {
56 extern_methods!(
57 #[deprecated]
61 #[unsafe(method(optionalSharedHistory))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn optionalSharedHistory() -> Option<Retained<WebHistory>>;
64
65 #[deprecated]
67 #[unsafe(method(setOptionalSharedHistory:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn setOptionalSharedHistory(history: Option<&WebHistory>);
70
71 #[deprecated]
73 #[unsafe(method(addItems:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn addItems(&self, new_items: Option<&NSArray>);
76
77 #[deprecated]
79 #[unsafe(method(removeItems:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn removeItems(&self, items: Option<&NSArray>);
82
83 #[deprecated]
84 #[unsafe(method(removeAllItems))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn removeAllItems(&self);
87
88 #[deprecated]
93 #[unsafe(method(orderedLastVisitedDays))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn orderedLastVisitedDays(&self) -> Retained<NSArray>;
96
97 #[deprecated]
98 #[unsafe(method(orderedItemsLastVisitedOnDay:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn orderedItemsLastVisitedOnDay(
101 &self,
102 calendar_date: Option<&NSCalendarDate>,
103 ) -> Option<Retained<NSArray>>;
104
105 #[cfg(feature = "WebHistoryItem")]
106 #[deprecated]
112 #[unsafe(method(itemForURL:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn itemForURL(&self, url: Option<&NSURL>) -> Option<Retained<WebHistoryItem>>;
115
116 #[deprecated]
118 #[unsafe(method(historyItemLimit))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn historyItemLimit(&self) -> c_int;
121
122 #[deprecated]
124 #[unsafe(method(setHistoryItemLimit:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setHistoryItemLimit(&self, history_item_limit: c_int);
127
128 #[deprecated]
130 #[unsafe(method(historyAgeInDaysLimit))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn historyAgeInDaysLimit(&self) -> c_int;
133
134 #[deprecated]
136 #[unsafe(method(setHistoryAgeInDaysLimit:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn setHistoryAgeInDaysLimit(&self, history_age_in_days_limit: c_int);
139 );
140}
141
142impl WebHistory {
144 extern_methods!(
145 #[unsafe(method(init))]
146 #[unsafe(method_family = init)]
147 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
148
149 #[unsafe(method(new))]
150 #[unsafe(method_family = new)]
151 pub unsafe fn new() -> Retained<Self>;
152 );
153}