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