objc2_web_kit/generated/
DOMMouseEvent.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(DOMUIEvent, DOMEvent, DOMObject, WebScriptObject, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(all(
15 feature = "DOMEvent",
16 feature = "DOMObject",
17 feature = "DOMUIEvent",
18 feature = "WebScriptObject"
19 ))]
20 #[deprecated]
21 pub struct DOMMouseEvent;
22);
23
24#[cfg(all(
25 feature = "DOMEvent",
26 feature = "DOMObject",
27 feature = "DOMUIEvent",
28 feature = "WebScriptObject"
29))]
30extern_conformance!(
31 unsafe impl NSCopying for DOMMouseEvent {}
32);
33
34#[cfg(all(
35 feature = "DOMEvent",
36 feature = "DOMObject",
37 feature = "DOMUIEvent",
38 feature = "WebScriptObject"
39))]
40unsafe impl CopyingHelper for DOMMouseEvent {
41 type Result = Self;
42}
43
44#[cfg(all(
45 feature = "DOMEvent",
46 feature = "DOMObject",
47 feature = "DOMUIEvent",
48 feature = "WebScriptObject"
49))]
50extern_conformance!(
51 unsafe impl NSObjectProtocol for DOMMouseEvent {}
52);
53
54#[cfg(all(
55 feature = "DOMEvent",
56 feature = "DOMObject",
57 feature = "DOMUIEvent",
58 feature = "WebScriptObject"
59))]
60impl DOMMouseEvent {
61 extern_methods!(
62 #[deprecated]
63 #[unsafe(method(screenX))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn screenX(&self) -> c_int;
66
67 #[deprecated]
68 #[unsafe(method(screenY))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn screenY(&self) -> c_int;
71
72 #[deprecated]
73 #[unsafe(method(clientX))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn clientX(&self) -> c_int;
76
77 #[deprecated]
78 #[unsafe(method(clientY))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn clientY(&self) -> c_int;
81
82 #[deprecated]
83 #[unsafe(method(ctrlKey))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn ctrlKey(&self) -> bool;
86
87 #[deprecated]
88 #[unsafe(method(shiftKey))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn shiftKey(&self) -> bool;
91
92 #[deprecated]
93 #[unsafe(method(altKey))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn altKey(&self) -> bool;
96
97 #[deprecated]
98 #[unsafe(method(metaKey))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn metaKey(&self) -> bool;
101
102 #[deprecated]
103 #[unsafe(method(button))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn button(&self) -> c_short;
106
107 #[cfg(feature = "DOMEventTarget")]
108 #[deprecated]
109 #[unsafe(method(relatedTarget))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn relatedTarget(&self) -> Option<Retained<ProtocolObject<dyn DOMEventTarget>>>;
112
113 #[unsafe(method(offsetX))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn offsetX(&self) -> c_int;
116
117 #[unsafe(method(offsetY))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn offsetY(&self) -> c_int;
120
121 #[unsafe(method(x))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn x(&self) -> c_int;
124
125 #[unsafe(method(y))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn y(&self) -> c_int;
128
129 #[cfg(feature = "DOMNode")]
130 #[unsafe(method(fromElement))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn fromElement(&self) -> Option<Retained<DOMNode>>;
133
134 #[cfg(feature = "DOMNode")]
135 #[unsafe(method(toElement))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn toElement(&self) -> Option<Retained<DOMNode>>;
138
139 #[cfg(all(feature = "DOMAbstractView", feature = "DOMEventTarget"))]
140 #[unsafe(method(initMouseEvent:canBubble:cancelable:view:detail:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:button:relatedTarget:))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn initMouseEvent_canBubble_cancelable_view_detail_screenX_screenY_clientX_clientY_ctrlKey_altKey_shiftKey_metaKey_button_relatedTarget(
143 &self,
144 r#type: Option<&NSString>,
145 can_bubble: bool,
146 cancelable: bool,
147 view: Option<&DOMAbstractView>,
148 detail: c_int,
149 screen_x: c_int,
150 screen_y: c_int,
151 client_x: c_int,
152 client_y: c_int,
153 ctrl_key: bool,
154 alt_key: bool,
155 shift_key: bool,
156 meta_key: bool,
157 button: c_ushort,
158 related_target: Option<&ProtocolObject<dyn DOMEventTarget>>,
159 );
160 );
161}
162
163#[cfg(all(
165 feature = "DOMEvent",
166 feature = "DOMObject",
167 feature = "DOMUIEvent",
168 feature = "WebScriptObject"
169))]
170impl DOMMouseEvent {
171 extern_methods!(
172 #[deprecated]
173 #[unsafe(method(init))]
174 #[unsafe(method_family = init)]
175 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
176 );
177}
178
179#[cfg(all(
181 feature = "DOMEvent",
182 feature = "DOMObject",
183 feature = "DOMUIEvent",
184 feature = "WebScriptObject"
185))]
186impl DOMMouseEvent {
187 extern_methods!(
188 #[unsafe(method(new))]
189 #[unsafe(method_family = new)]
190 pub unsafe fn new() -> Retained<Self>;
191 );
192}
193
194#[cfg(all(
196 feature = "DOMEvent",
197 feature = "DOMObject",
198 feature = "DOMUIEvent",
199 feature = "WebScriptObject"
200))]
201impl DOMMouseEvent {
202 extern_methods!(
203 #[cfg(all(feature = "DOMAbstractView", feature = "DOMEventTarget"))]
204 #[deprecated]
205 #[unsafe(method(initMouseEvent:::::::::::::::))]
206 #[unsafe(method_family = none)]
207 pub unsafe fn initMouseEvent(
208 &self,
209 r#type: Option<&NSString>,
210 can_bubble: bool,
211 cancelable: bool,
212 view: Option<&DOMAbstractView>,
213 detail: c_int,
214 screen_x: c_int,
215 screen_y: c_int,
216 client_x: c_int,
217 client_y: c_int,
218 ctrl_key: bool,
219 alt_key: bool,
220 shift_key: bool,
221 meta_key: bool,
222 button: c_ushort,
223 related_target: Option<&ProtocolObject<dyn DOMEventTarget>>,
224 );
225 );
226}