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))]
49unsafe impl NSCopying for DOMWheelEvent {}
50
51#[cfg(all(
52    feature = "DOMEvent",
53    feature = "DOMMouseEvent",
54    feature = "DOMObject",
55    feature = "DOMUIEvent",
56    feature = "WebScriptObject"
57))]
58unsafe impl CopyingHelper for DOMWheelEvent {
59    type Result = Self;
60}
61
62#[cfg(all(
63    feature = "DOMEvent",
64    feature = "DOMMouseEvent",
65    feature = "DOMObject",
66    feature = "DOMUIEvent",
67    feature = "WebScriptObject"
68))]
69unsafe impl NSObjectProtocol for DOMWheelEvent {}
70
71#[cfg(all(
72    feature = "DOMEvent",
73    feature = "DOMMouseEvent",
74    feature = "DOMObject",
75    feature = "DOMUIEvent",
76    feature = "WebScriptObject"
77))]
78impl DOMWheelEvent {
79    extern_methods!(
80        #[unsafe(method(wheelDeltaX))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn wheelDeltaX(&self) -> c_int;
83
84        #[unsafe(method(wheelDeltaY))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn wheelDeltaY(&self) -> c_int;
87
88        #[deprecated]
89        #[unsafe(method(wheelDelta))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn wheelDelta(&self) -> c_int;
92
93        #[deprecated]
94        #[unsafe(method(isHorizontal))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn isHorizontal(&self) -> bool;
97
98        #[cfg(feature = "DOMAbstractView")]
99        #[unsafe(method(initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn initWheelEvent_wheelDeltaY_view_screenX_screenY_clientX_clientY_ctrlKey_altKey_shiftKey_metaKey(
102            &self,
103            wheel_delta_x: c_int,
104            wheel_delta_y: c_int,
105            view: Option<&DOMAbstractView>,
106            screen_x: c_int,
107            screen_y: c_int,
108            client_x: c_int,
109            client_y: c_int,
110            ctrl_key: bool,
111            alt_key: bool,
112            shift_key: bool,
113            meta_key: bool,
114        );
115    );
116}
117
118/// Methods declared on superclass `DOMObject`.
119#[cfg(all(
120    feature = "DOMEvent",
121    feature = "DOMMouseEvent",
122    feature = "DOMObject",
123    feature = "DOMUIEvent",
124    feature = "WebScriptObject"
125))]
126impl DOMWheelEvent {
127    extern_methods!(
128        #[deprecated]
129        #[unsafe(method(init))]
130        #[unsafe(method_family = init)]
131        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
132    );
133}
134
135/// Methods declared on superclass `NSObject`.
136#[cfg(all(
137    feature = "DOMEvent",
138    feature = "DOMMouseEvent",
139    feature = "DOMObject",
140    feature = "DOMUIEvent",
141    feature = "WebScriptObject"
142))]
143impl DOMWheelEvent {
144    extern_methods!(
145        #[unsafe(method(new))]
146        #[unsafe(method_family = new)]
147        pub unsafe fn new() -> Retained<Self>;
148    );
149}