icrate/generated/WebKit/
WebScriptObject.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::AppKit::*;
5use crate::Foundation::*;
6use crate::WebKit::*;
7
8extern_class!(
9    #[derive(Debug, PartialEq, Eq, Hash)]
10    #[cfg(feature = "WebKit_WebScriptObject")]
11    #[deprecated]
12    pub struct WebScriptObject;
13
14    #[cfg(feature = "WebKit_WebScriptObject")]
15    unsafe impl ClassType for WebScriptObject {
16        type Super = NSObject;
17        type Mutability = InteriorMutable;
18    }
19);
20
21#[cfg(feature = "WebKit_WebScriptObject")]
22unsafe impl NSObjectProtocol for WebScriptObject {}
23
24extern_methods!(
25    #[cfg(feature = "WebKit_WebScriptObject")]
26    unsafe impl WebScriptObject {
27        #[cfg(feature = "Foundation_NSString")]
28        #[deprecated]
29        #[method(throwException:)]
30        pub unsafe fn throwException(exception_message: Option<&NSString>) -> bool;
31
32        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
33        #[deprecated]
34        #[method_id(@__retain_semantics Other callWebScriptMethod:withArguments:)]
35        pub unsafe fn callWebScriptMethod_withArguments(
36            &self,
37            name: Option<&NSString>,
38            arguments: Option<&NSArray>,
39        ) -> Option<Id<AnyObject>>;
40
41        #[cfg(feature = "Foundation_NSString")]
42        #[deprecated]
43        #[method_id(@__retain_semantics Other evaluateWebScript:)]
44        pub unsafe fn evaluateWebScript(&self, script: Option<&NSString>) -> Option<Id<AnyObject>>;
45
46        #[cfg(feature = "Foundation_NSString")]
47        #[deprecated]
48        #[method(removeWebScriptKey:)]
49        pub unsafe fn removeWebScriptKey(&self, name: Option<&NSString>);
50
51        #[cfg(feature = "Foundation_NSString")]
52        #[deprecated]
53        #[method_id(@__retain_semantics Other stringRepresentation)]
54        pub unsafe fn stringRepresentation(&self) -> Option<Id<NSString>>;
55
56        #[deprecated]
57        #[method_id(@__retain_semantics Other webScriptValueAtIndex:)]
58        pub unsafe fn webScriptValueAtIndex(&self, index: c_uint) -> Option<Id<AnyObject>>;
59
60        #[deprecated]
61        #[method(setWebScriptValueAtIndex:value:)]
62        pub unsafe fn setWebScriptValueAtIndex_value(
63            &self,
64            index: c_uint,
65            value: Option<&AnyObject>,
66        );
67
68        #[cfg(feature = "Foundation_NSString")]
69        #[deprecated]
70        #[method(setException:)]
71        pub unsafe fn setException(&self, description: Option<&NSString>);
72
73        #[cfg(feature = "WebKit_JSValue")]
74        #[deprecated]
75        #[method_id(@__retain_semantics Other JSValue)]
76        pub unsafe fn JSValue(&self) -> Option<Id<JSValue>>;
77    }
78);
79
80extern_methods!(
81    /// Methods declared on superclass `NSObject`
82    #[cfg(feature = "WebKit_WebScriptObject")]
83    unsafe impl WebScriptObject {
84        #[method_id(@__retain_semantics Init init)]
85        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
86
87        #[method_id(@__retain_semantics New new)]
88        pub unsafe fn new() -> Id<Self>;
89    }
90);
91
92extern_class!(
93    #[derive(Debug, PartialEq, Eq, Hash)]
94    #[cfg(feature = "WebKit_WebUndefined")]
95    #[deprecated]
96    pub struct WebUndefined;
97
98    #[cfg(feature = "WebKit_WebUndefined")]
99    unsafe impl ClassType for WebUndefined {
100        type Super = NSObject;
101        type Mutability = InteriorMutable;
102    }
103);
104
105#[cfg(feature = "WebKit_WebUndefined")]
106unsafe impl NSCoding for WebUndefined {}
107
108#[cfg(feature = "WebKit_WebUndefined")]
109unsafe impl NSCopying for WebUndefined {}
110
111#[cfg(feature = "WebKit_WebUndefined")]
112unsafe impl NSObjectProtocol for WebUndefined {}
113
114extern_methods!(
115    #[cfg(feature = "WebKit_WebUndefined")]
116    unsafe impl WebUndefined {
117        #[deprecated]
118        #[method_id(@__retain_semantics Other undefined)]
119        pub unsafe fn undefined() -> Option<Id<WebUndefined>>;
120    }
121);
122
123extern_methods!(
124    /// Methods declared on superclass `NSObject`
125    #[cfg(feature = "WebKit_WebUndefined")]
126    unsafe impl WebUndefined {
127        #[method_id(@__retain_semantics Init init)]
128        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
129
130        #[method_id(@__retain_semantics New new)]
131        pub unsafe fn new() -> Id<Self>;
132    }
133);