objc2_web_kit/generated/
DOMUIEvent.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/domuievent?language=objc)
12    #[unsafe(super(DOMEvent, DOMObject, WebScriptObject, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(
15        feature = "DOMEvent",
16        feature = "DOMObject",
17        feature = "WebScriptObject"
18    ))]
19    #[deprecated]
20    pub struct DOMUIEvent;
21);
22
23#[cfg(all(
24    feature = "DOMEvent",
25    feature = "DOMObject",
26    feature = "WebScriptObject"
27))]
28unsafe impl NSCopying for DOMUIEvent {}
29
30#[cfg(all(
31    feature = "DOMEvent",
32    feature = "DOMObject",
33    feature = "WebScriptObject"
34))]
35unsafe impl CopyingHelper for DOMUIEvent {
36    type Result = Self;
37}
38
39#[cfg(all(
40    feature = "DOMEvent",
41    feature = "DOMObject",
42    feature = "WebScriptObject"
43))]
44unsafe impl NSObjectProtocol for DOMUIEvent {}
45
46#[cfg(all(
47    feature = "DOMEvent",
48    feature = "DOMObject",
49    feature = "WebScriptObject"
50))]
51impl DOMUIEvent {
52    extern_methods!(
53        #[cfg(feature = "DOMAbstractView")]
54        #[deprecated]
55        #[unsafe(method(view))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn view(&self) -> Option<Retained<DOMAbstractView>>;
58
59        #[deprecated]
60        #[unsafe(method(detail))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn detail(&self) -> c_int;
63
64        #[unsafe(method(keyCode))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn keyCode(&self) -> c_int;
67
68        #[unsafe(method(charCode))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn charCode(&self) -> c_int;
71
72        #[deprecated]
73        #[unsafe(method(layerX))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn layerX(&self) -> c_int;
76
77        #[deprecated]
78        #[unsafe(method(layerY))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn layerY(&self) -> c_int;
81
82        #[unsafe(method(pageX))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn pageX(&self) -> c_int;
85
86        #[unsafe(method(pageY))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn pageY(&self) -> c_int;
89
90        #[unsafe(method(which))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn which(&self) -> c_int;
93
94        #[cfg(feature = "DOMAbstractView")]
95        #[unsafe(method(initUIEvent:canBubble:cancelable:view:detail:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn initUIEvent_canBubble_cancelable_view_detail(
98            &self,
99            r#type: Option<&NSString>,
100            can_bubble: bool,
101            cancelable: bool,
102            view: Option<&DOMAbstractView>,
103            detail: c_int,
104        );
105    );
106}
107
108/// Methods declared on superclass `DOMObject`.
109#[cfg(all(
110    feature = "DOMEvent",
111    feature = "DOMObject",
112    feature = "WebScriptObject"
113))]
114impl DOMUIEvent {
115    extern_methods!(
116        #[deprecated]
117        #[unsafe(method(init))]
118        #[unsafe(method_family = init)]
119        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120    );
121}
122
123/// Methods declared on superclass `NSObject`.
124#[cfg(all(
125    feature = "DOMEvent",
126    feature = "DOMObject",
127    feature = "WebScriptObject"
128))]
129impl DOMUIEvent {
130    extern_methods!(
131        #[unsafe(method(new))]
132        #[unsafe(method_family = new)]
133        pub unsafe fn new() -> Retained<Self>;
134    );
135}
136
137/// DOMUIEventDeprecated.
138#[cfg(all(
139    feature = "DOMEvent",
140    feature = "DOMObject",
141    feature = "WebScriptObject"
142))]
143impl DOMUIEvent {
144    extern_methods!(
145        #[cfg(feature = "DOMAbstractView")]
146        #[deprecated]
147        #[unsafe(method(initUIEvent:::::))]
148        #[unsafe(method_family = none)]
149        pub unsafe fn initUIEvent(
150            &self,
151            r#type: Option<&NSString>,
152            can_bubble: bool,
153            cancelable: bool,
154            view: Option<&DOMAbstractView>,
155            detail: c_int,
156        );
157    );
158}