objc2_web_kit/generated/
DOMMouseEvent.rs

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