objc2_web_kit/generated/
DOMProcessingInstruction.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domprocessinginstruction?language=objc)
11    #[unsafe(super(DOMCharacterData, DOMNode, DOMObject, WebScriptObject, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(all(
14        feature = "DOMCharacterData",
15        feature = "DOMNode",
16        feature = "DOMObject",
17        feature = "WebScriptObject"
18    ))]
19    #[deprecated]
20    pub struct DOMProcessingInstruction;
21);
22
23#[cfg(all(
24    feature = "DOMCharacterData",
25    feature = "DOMEventTarget",
26    feature = "DOMNode",
27    feature = "DOMObject",
28    feature = "WebScriptObject"
29))]
30unsafe impl DOMEventTarget for DOMProcessingInstruction {}
31
32#[cfg(all(
33    feature = "DOMCharacterData",
34    feature = "DOMNode",
35    feature = "DOMObject",
36    feature = "WebScriptObject"
37))]
38unsafe impl NSCopying for DOMProcessingInstruction {}
39
40#[cfg(all(
41    feature = "DOMCharacterData",
42    feature = "DOMNode",
43    feature = "DOMObject",
44    feature = "WebScriptObject"
45))]
46unsafe impl CopyingHelper for DOMProcessingInstruction {
47    type Result = Self;
48}
49
50#[cfg(all(
51    feature = "DOMCharacterData",
52    feature = "DOMNode",
53    feature = "DOMObject",
54    feature = "WebScriptObject"
55))]
56unsafe impl NSObjectProtocol for DOMProcessingInstruction {}
57
58#[cfg(all(
59    feature = "DOMCharacterData",
60    feature = "DOMNode",
61    feature = "DOMObject",
62    feature = "WebScriptObject"
63))]
64impl DOMProcessingInstruction {
65    extern_methods!(
66        #[deprecated]
67        #[unsafe(method(target))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn target(&self) -> Retained<NSString>;
70
71        #[cfg(feature = "DOMStyleSheet")]
72        #[unsafe(method(sheet))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn sheet(&self) -> Option<Retained<DOMStyleSheet>>;
75    );
76}
77
78/// Methods declared on superclass `DOMObject`.
79#[cfg(all(
80    feature = "DOMCharacterData",
81    feature = "DOMNode",
82    feature = "DOMObject",
83    feature = "WebScriptObject"
84))]
85impl DOMProcessingInstruction {
86    extern_methods!(
87        #[deprecated]
88        #[unsafe(method(init))]
89        #[unsafe(method_family = init)]
90        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91    );
92}
93
94/// Methods declared on superclass `NSObject`.
95#[cfg(all(
96    feature = "DOMCharacterData",
97    feature = "DOMNode",
98    feature = "DOMObject",
99    feature = "WebScriptObject"
100))]
101impl DOMProcessingInstruction {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new() -> Retained<Self>;
106    );
107}