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
133
134
135
136
137
138
139
140
141
142
143
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    #[deprecated]
    pub unsafe trait WebDocumentView: NSObjectProtocol {
        #[cfg(feature = "WebDataSource")]
        #[deprecated]
        #[method(setDataSource:)]
        unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>);

        #[cfg(feature = "WebDataSource")]
        #[deprecated]
        #[method(dataSourceUpdated:)]
        unsafe fn dataSourceUpdated(&self, data_source: Option<&WebDataSource>);

        #[deprecated]
        #[method(setNeedsLayout:)]
        unsafe fn setNeedsLayout(&self, flag: bool);

        #[deprecated]
        #[method(layout)]
        unsafe fn layout(&self);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[deprecated]
        #[method(viewWillMoveToHostWindow:)]
        unsafe fn viewWillMoveToHostWindow(&self, host_window: Option<&NSWindow>);

        #[deprecated]
        #[method(viewDidMoveToHostWindow)]
        unsafe fn viewDidMoveToHostWindow(&self);
    }

    unsafe impl ProtocolType for dyn WebDocumentView {}
);

extern_protocol!(
    #[deprecated]
    pub unsafe trait WebDocumentSearching: NSObjectProtocol {
        #[deprecated]
        #[method(searchFor:direction:caseSensitive:wrap:)]
        unsafe fn searchFor_direction_caseSensitive_wrap(
            &self,
            string: Option<&NSString>,
            forward: bool,
            case_flag: bool,
            wrap_flag: bool,
        ) -> bool;
    }

    unsafe impl ProtocolType for dyn WebDocumentSearching {}
);

extern_protocol!(
    #[deprecated]
    pub unsafe trait WebDocumentText: NSObjectProtocol {
        #[deprecated]
        #[method(supportsTextEncoding)]
        unsafe fn supportsTextEncoding(&self) -> bool;

        #[deprecated]
        #[method_id(@__retain_semantics Other string)]
        unsafe fn string(&self) -> Option<Retained<NSString>>;

        #[deprecated]
        #[method_id(@__retain_semantics Other attributedString)]
        unsafe fn attributedString(&self) -> Option<Retained<NSAttributedString>>;

        #[deprecated]
        #[method_id(@__retain_semantics Other selectedString)]
        unsafe fn selectedString(&self) -> Option<Retained<NSString>>;

        #[deprecated]
        #[method_id(@__retain_semantics Other selectedAttributedString)]
        unsafe fn selectedAttributedString(&self) -> Option<Retained<NSAttributedString>>;

        #[deprecated]
        #[method(selectAll)]
        unsafe fn selectAll(&self);

        #[deprecated]
        #[method(deselectAll)]
        unsafe fn deselectAll(&self);
    }

    unsafe impl ProtocolType for dyn WebDocumentText {}
);

extern_protocol!(
    #[deprecated]
    pub unsafe trait WebDocumentRepresentation: NSObjectProtocol {
        #[cfg(feature = "WebDataSource")]
        #[deprecated]
        #[method(setDataSource:)]
        unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>);

        #[cfg(feature = "WebDataSource")]
        #[deprecated]
        #[method(receivedData:withDataSource:)]
        unsafe fn receivedData_withDataSource(
            &self,
            data: Option<&NSData>,
            data_source: Option<&WebDataSource>,
        );

        #[cfg(feature = "WebDataSource")]
        #[deprecated]
        #[method(receivedError:withDataSource:)]
        unsafe fn receivedError_withDataSource(
            &self,
            error: Option<&NSError>,
            data_source: Option<&WebDataSource>,
        );

        #[cfg(feature = "WebDataSource")]
        #[deprecated]
        #[method(finishedLoadingWithDataSource:)]
        unsafe fn finishedLoadingWithDataSource(&self, data_source: Option<&WebDataSource>);

        #[deprecated]
        #[method(canProvideDocumentSource)]
        unsafe fn canProvideDocumentSource(&self) -> bool;

        #[deprecated]
        #[method_id(@__retain_semantics Other documentSource)]
        unsafe fn documentSource(&self) -> Option<Retained<NSString>>;

        #[deprecated]
        #[method_id(@__retain_semantics Other title)]
        unsafe fn title(&self) -> Option<Retained<NSString>>;
    }

    unsafe impl ProtocolType for dyn WebDocumentRepresentation {}
);