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
144
145
146
147
148
149
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_category!(
    /// Category "WebScripting" on [`NSObject`].
    #[doc(alias = "WebScripting")]
    pub unsafe trait NSObjectWebScripting {
        #[method_id(@__retain_semantics Other webScriptNameForSelector:)]
        unsafe fn webScriptNameForSelector(selector: Option<Sel>) -> Option<Retained<NSString>>;

        #[method(isSelectorExcludedFromWebScript:)]
        unsafe fn isSelectorExcludedFromWebScript(selector: Option<Sel>) -> bool;

        #[method_id(@__retain_semantics Other webScriptNameForKey:)]
        unsafe fn webScriptNameForKey(name: *mut c_char) -> Option<Retained<NSString>>;

        #[method(isKeyExcludedFromWebScript:)]
        unsafe fn isKeyExcludedFromWebScript(name: *mut c_char) -> bool;

        #[method_id(@__retain_semantics Other invokeUndefinedMethodFromWebScript:withArguments:)]
        unsafe fn invokeUndefinedMethodFromWebScript_withArguments(
            &self,
            name: Option<&NSString>,
            arguments: Option<&NSArray>,
        ) -> Option<Retained<AnyObject>>;

        #[method_id(@__retain_semantics Other invokeDefaultMethodWithArguments:)]
        unsafe fn invokeDefaultMethodWithArguments(
            &self,
            arguments: Option<&NSArray>,
        ) -> Option<Retained<AnyObject>>;

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

    unsafe impl NSObjectWebScripting for NSObject {}
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated]
    pub struct WebScriptObject;

    unsafe impl ClassType for WebScriptObject {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for WebScriptObject {}

extern_methods!(
    unsafe impl WebScriptObject {
        #[deprecated]
        #[method(throwException:)]
        pub unsafe fn throwException(exception_message: Option<&NSString>) -> bool;

        #[deprecated]
        #[method_id(@__retain_semantics Other callWebScriptMethod:withArguments:)]
        pub unsafe fn callWebScriptMethod_withArguments(
            &self,
            name: Option<&NSString>,
            arguments: Option<&NSArray>,
        ) -> Option<Retained<AnyObject>>;

        #[deprecated]
        #[method_id(@__retain_semantics Other evaluateWebScript:)]
        pub unsafe fn evaluateWebScript(
            &self,
            script: Option<&NSString>,
        ) -> Option<Retained<AnyObject>>;

        #[deprecated]
        #[method(removeWebScriptKey:)]
        pub unsafe fn removeWebScriptKey(&self, name: Option<&NSString>);

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

        #[deprecated]
        #[method_id(@__retain_semantics Other webScriptValueAtIndex:)]
        pub unsafe fn webScriptValueAtIndex(&self, index: c_uint) -> Option<Retained<AnyObject>>;

        #[deprecated]
        #[method(setWebScriptValueAtIndex:value:)]
        pub unsafe fn setWebScriptValueAtIndex_value(
            &self,
            index: c_uint,
            value: Option<&AnyObject>,
        );

        #[deprecated]
        #[method(setException:)]
        pub unsafe fn setException(&self, description: Option<&NSString>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl WebScriptObject {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated]
    pub struct WebUndefined;

    unsafe impl ClassType for WebUndefined {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCoding for WebUndefined {}

unsafe impl NSCopying for WebUndefined {}

unsafe impl NSObjectProtocol for WebUndefined {}

extern_methods!(
    unsafe impl WebUndefined {
        #[deprecated]
        #[method_id(@__retain_semantics Other undefined)]
        pub unsafe fn undefined() -> Option<Retained<WebUndefined>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl WebUndefined {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);