objc2_web_kit/generated/
DOMWheelEvent.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
10/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_dom_delta_pixel?language=objc)
11#[deprecated]
12pub const DOM_DOM_DELTA_PIXEL: c_uint = 0x00;
13/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_dom_delta_line?language=objc)
14#[deprecated]
15pub const DOM_DOM_DELTA_LINE: c_uint = 0x01;
16/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_dom_delta_page?language=objc)
17#[deprecated]
18pub const DOM_DOM_DELTA_PAGE: c_uint = 0x02;
19
20extern_class!(
21    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domwheelevent?language=objc)
22    #[unsafe(super(
23        DOMMouseEvent,
24        DOMUIEvent,
25        DOMEvent,
26        DOMObject,
27        WebScriptObject,
28        NSObject
29    ))]
30    #[derive(Debug, PartialEq, Eq, Hash)]
31    #[cfg(all(
32        feature = "DOMEvent",
33        feature = "DOMMouseEvent",
34        feature = "DOMObject",
35        feature = "DOMUIEvent",
36        feature = "WebScriptObject"
37    ))]
38    #[deprecated]
39    pub struct DOMWheelEvent;
40);
41
42#[cfg(all(
43    feature = "DOMEvent",
44    feature = "DOMMouseEvent",
45    feature = "DOMObject",
46    feature = "DOMUIEvent",
47    feature = "WebScriptObject"
48))]
49extern_conformance!(
50    unsafe impl NSCopying for DOMWheelEvent {}
51);
52
53#[cfg(all(
54    feature = "DOMEvent",
55    feature = "DOMMouseEvent",
56    feature = "DOMObject",
57    feature = "DOMUIEvent",
58    feature = "WebScriptObject"
59))]
60unsafe impl CopyingHelper for DOMWheelEvent {
61    type Result = Self;
62}
63
64#[cfg(all(
65    feature = "DOMEvent",
66    feature = "DOMMouseEvent",
67    feature = "DOMObject",
68    feature = "DOMUIEvent",
69    feature = "WebScriptObject"
70))]
71extern_conformance!(
72    unsafe impl NSObjectProtocol for DOMWheelEvent {}
73);
74
75#[cfg(all(
76    feature = "DOMEvent",
77    feature = "DOMMouseEvent",
78    feature = "DOMObject",
79    feature = "DOMUIEvent",
80    feature = "WebScriptObject"
81))]
82impl DOMWheelEvent {
83    extern_methods!(
84        #[unsafe(method(wheelDeltaX))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn wheelDeltaX(&self) -> c_int;
87
88        #[unsafe(method(wheelDeltaY))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn wheelDeltaY(&self) -> c_int;
91
92        #[deprecated]
93        #[unsafe(method(wheelDelta))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn wheelDelta(&self) -> c_int;
96
97        #[deprecated]
98        #[unsafe(method(isHorizontal))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn isHorizontal(&self) -> bool;
101
102        #[cfg(feature = "DOMAbstractView")]
103        #[unsafe(method(initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn initWheelEvent_wheelDeltaY_view_screenX_screenY_clientX_clientY_ctrlKey_altKey_shiftKey_metaKey(
106            &self,
107            wheel_delta_x: c_int,
108            wheel_delta_y: c_int,
109            view: Option<&DOMAbstractView>,
110            screen_x: c_int,
111            screen_y: c_int,
112            client_x: c_int,
113            client_y: c_int,
114            ctrl_key: bool,
115            alt_key: bool,
116            shift_key: bool,
117            meta_key: bool,
118        );
119    );
120}
121
122/// Methods declared on superclass `DOMObject`.
123#[cfg(all(
124    feature = "DOMEvent",
125    feature = "DOMMouseEvent",
126    feature = "DOMObject",
127    feature = "DOMUIEvent",
128    feature = "WebScriptObject"
129))]
130impl DOMWheelEvent {
131    extern_methods!(
132        #[deprecated]
133        #[unsafe(method(init))]
134        #[unsafe(method_family = init)]
135        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
136    );
137}
138
139/// Methods declared on superclass `NSObject`.
140#[cfg(all(
141    feature = "DOMEvent",
142    feature = "DOMMouseEvent",
143    feature = "DOMObject",
144    feature = "DOMUIEvent",
145    feature = "WebScriptObject"
146))]
147impl DOMWheelEvent {
148    extern_methods!(
149        #[unsafe(method(new))]
150        #[unsafe(method_family = new)]
151        pub unsafe fn new() -> Retained<Self>;
152    );
153}