objc2_web_kit/generated/
DOMMutationEvent.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_modification?language=objc)
11#[deprecated]
12pub const DOM_MODIFICATION: c_uint = 1;
13/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_addition?language=objc)
14#[deprecated]
15pub const DOM_ADDITION: c_uint = 2;
16/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_removal?language=objc)
17#[deprecated]
18pub const DOM_REMOVAL: c_uint = 3;
19
20extern_class!(
21    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/dommutationevent?language=objc)
22    #[unsafe(super(DOMEvent, DOMObject, WebScriptObject, NSObject))]
23    #[derive(Debug, PartialEq, Eq, Hash)]
24    #[cfg(all(
25        feature = "DOMEvent",
26        feature = "DOMObject",
27        feature = "WebScriptObject"
28    ))]
29    #[deprecated]
30    pub struct DOMMutationEvent;
31);
32
33#[cfg(all(
34    feature = "DOMEvent",
35    feature = "DOMObject",
36    feature = "WebScriptObject"
37))]
38extern_conformance!(
39    unsafe impl NSCopying for DOMMutationEvent {}
40);
41
42#[cfg(all(
43    feature = "DOMEvent",
44    feature = "DOMObject",
45    feature = "WebScriptObject"
46))]
47unsafe impl CopyingHelper for DOMMutationEvent {
48    type Result = Self;
49}
50
51#[cfg(all(
52    feature = "DOMEvent",
53    feature = "DOMObject",
54    feature = "WebScriptObject"
55))]
56extern_conformance!(
57    unsafe impl NSObjectProtocol for DOMMutationEvent {}
58);
59
60#[cfg(all(
61    feature = "DOMEvent",
62    feature = "DOMObject",
63    feature = "WebScriptObject"
64))]
65impl DOMMutationEvent {
66    extern_methods!(
67        #[cfg(feature = "DOMNode")]
68        #[deprecated]
69        #[unsafe(method(relatedNode))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn relatedNode(&self) -> Option<Retained<DOMNode>>;
72
73        #[deprecated]
74        #[unsafe(method(prevValue))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn prevValue(&self) -> Retained<NSString>;
77
78        #[deprecated]
79        #[unsafe(method(newValue))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn newValue(&self) -> Retained<NSString>;
82
83        #[deprecated]
84        #[unsafe(method(attrName))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn attrName(&self) -> Retained<NSString>;
87
88        #[deprecated]
89        #[unsafe(method(attrChange))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn attrChange(&self) -> c_ushort;
92
93        #[cfg(feature = "DOMNode")]
94        /// # Safety
95        ///
96        /// - `type` might not allow `None`.
97        /// - `related_node` might not allow `None`.
98        /// - `prev_value` might not allow `None`.
99        /// - `new_value` might not allow `None`.
100        /// - `attr_name` might not allow `None`.
101        #[unsafe(method(initMutationEvent:canBubble:cancelable:relatedNode:prevValue:newValue:attrName:attrChange:))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn initMutationEvent_canBubble_cancelable_relatedNode_prevValue_newValue_attrName_attrChange(
104            &self,
105            r#type: Option<&NSString>,
106            can_bubble: bool,
107            cancelable: bool,
108            related_node: Option<&DOMNode>,
109            prev_value: Option<&NSString>,
110            new_value: Option<&NSString>,
111            attr_name: Option<&NSString>,
112            attr_change: c_ushort,
113        );
114    );
115}
116
117/// Methods declared on superclass `DOMObject`.
118#[cfg(all(
119    feature = "DOMEvent",
120    feature = "DOMObject",
121    feature = "WebScriptObject"
122))]
123impl DOMMutationEvent {
124    extern_methods!(
125        #[deprecated]
126        #[unsafe(method(init))]
127        #[unsafe(method_family = init)]
128        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
129    );
130}
131
132/// Methods declared on superclass `NSObject`.
133#[cfg(all(
134    feature = "DOMEvent",
135    feature = "DOMObject",
136    feature = "WebScriptObject"
137))]
138impl DOMMutationEvent {
139    extern_methods!(
140        #[unsafe(method(new))]
141        #[unsafe(method_family = new)]
142        pub unsafe fn new() -> Retained<Self>;
143    );
144}
145
146/// DOMMutationEventDeprecated.
147#[deprecated]
148#[cfg(all(
149    feature = "DOMEvent",
150    feature = "DOMObject",
151    feature = "WebScriptObject"
152))]
153impl DOMMutationEvent {
154    extern_methods!(
155        #[cfg(feature = "DOMNode")]
156        /// # Safety
157        ///
158        /// - `type` might not allow `None`.
159        /// - `related_node` might not allow `None`.
160        /// - `prev_value` might not allow `None`.
161        /// - `new_value` might not allow `None`.
162        /// - `attr_name` might not allow `None`.
163        #[deprecated]
164        #[unsafe(method(initMutationEvent::::::::))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn initMutationEvent(
167            &self,
168            r#type: Option<&NSString>,
169            can_bubble: bool,
170            cancelable: bool,
171            related_node: Option<&DOMNode>,
172            prev_value: Option<&NSString>,
173            new_value: Option<&NSString>,
174            attr_name: Option<&NSString>,
175            attr_change: c_ushort,
176        );
177    );
178}