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