objc2_foundation/generated/
NSXMLDTDNode.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[repr(transparent)]
14#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
15pub struct NSXMLDTDNodeKind(pub NSUInteger);
16impl NSXMLDTDNodeKind {
17 pub const NSXMLEntityGeneralKind: Self = Self(1);
18 pub const NSXMLEntityParsedKind: Self = Self(2);
19 pub const NSXMLEntityUnparsedKind: Self = Self(3);
20 pub const NSXMLEntityParameterKind: Self = Self(4);
21 pub const NSXMLEntityPredefined: Self = Self(5);
22 pub const NSXMLAttributeCDATAKind: Self = Self(6);
23 pub const NSXMLAttributeIDKind: Self = Self(7);
24 pub const NSXMLAttributeIDRefKind: Self = Self(8);
25 pub const NSXMLAttributeIDRefsKind: Self = Self(9);
26 pub const NSXMLAttributeEntityKind: Self = Self(10);
27 pub const NSXMLAttributeEntitiesKind: Self = Self(11);
28 pub const NSXMLAttributeNMTokenKind: Self = Self(12);
29 pub const NSXMLAttributeNMTokensKind: Self = Self(13);
30 pub const NSXMLAttributeEnumerationKind: Self = Self(14);
31 pub const NSXMLAttributeNotationKind: Self = Self(15);
32 pub const NSXMLElementDeclarationUndefinedKind: Self = Self(16);
33 pub const NSXMLElementDeclarationEmptyKind: Self = Self(17);
34 pub const NSXMLElementDeclarationAnyKind: Self = Self(18);
35 pub const NSXMLElementDeclarationMixedKind: Self = Self(19);
36 pub const NSXMLElementDeclarationElementKind: Self = Self(20);
37}
38
39unsafe impl Encode for NSXMLDTDNodeKind {
40 const ENCODING: Encoding = NSUInteger::ENCODING;
41}
42
43unsafe impl RefEncode for NSXMLDTDNodeKind {
44 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
45}
46
47extern_class!(
48 #[unsafe(super(NSXMLNode, NSObject))]
80 #[derive(Debug, PartialEq, Eq, Hash)]
81 #[cfg(feature = "NSXMLNode")]
82 pub struct NSXMLDTDNode;
83);
84
85#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
86extern_conformance!(
87 unsafe impl NSCopying for NSXMLDTDNode {}
88);
89
90#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
91unsafe impl CopyingHelper for NSXMLDTDNode {
92 type Result = Self;
93}
94
95#[cfg(feature = "NSXMLNode")]
96extern_conformance!(
97 unsafe impl NSObjectProtocol for NSXMLDTDNode {}
98);
99
100#[cfg(feature = "NSXMLNode")]
101impl NSXMLDTDNode {
102 extern_methods!(
103 #[cfg(feature = "NSString")]
104 #[unsafe(method(initWithXMLString:))]
106 #[unsafe(method_family = init)]
107 pub fn initWithXMLString(
108 this: Allocated<Self>,
109 string: &NSString,
110 ) -> Option<Retained<Self>>;
111
112 #[cfg(feature = "NSXMLNodeOptions")]
113 #[unsafe(method(initWithKind:options:))]
114 #[unsafe(method_family = init)]
115 pub fn initWithKind_options(
116 this: Allocated<Self>,
117 kind: NSXMLNodeKind,
118 options: NSXMLNodeOptions,
119 ) -> Retained<Self>;
120
121 #[unsafe(method(init))]
122 #[unsafe(method_family = init)]
123 pub fn init(this: Allocated<Self>) -> Retained<Self>;
124
125 #[unsafe(method(DTDKind))]
127 #[unsafe(method_family = none)]
128 pub fn DTDKind(&self) -> NSXMLDTDNodeKind;
129
130 #[unsafe(method(setDTDKind:))]
132 #[unsafe(method_family = none)]
133 pub fn setDTDKind(&self, dtd_kind: NSXMLDTDNodeKind);
134
135 #[unsafe(method(isExternal))]
137 #[unsafe(method_family = none)]
138 pub fn isExternal(&self) -> bool;
139
140 #[cfg(feature = "NSString")]
141 #[unsafe(method(publicID))]
143 #[unsafe(method_family = none)]
144 pub fn publicID(&self) -> Option<Retained<NSString>>;
145
146 #[cfg(feature = "NSString")]
147 #[unsafe(method(setPublicID:))]
151 #[unsafe(method_family = none)]
152 pub fn setPublicID(&self, public_id: Option<&NSString>);
153
154 #[cfg(feature = "NSString")]
155 #[unsafe(method(systemID))]
157 #[unsafe(method_family = none)]
158 pub fn systemID(&self) -> Option<Retained<NSString>>;
159
160 #[cfg(feature = "NSString")]
161 #[unsafe(method(setSystemID:))]
165 #[unsafe(method_family = none)]
166 pub fn setSystemID(&self, system_id: Option<&NSString>);
167
168 #[cfg(feature = "NSString")]
169 #[unsafe(method(notationName))]
171 #[unsafe(method_family = none)]
172 pub fn notationName(&self) -> Option<Retained<NSString>>;
173
174 #[cfg(feature = "NSString")]
175 #[unsafe(method(setNotationName:))]
179 #[unsafe(method_family = none)]
180 pub fn setNotationName(&self, notation_name: Option<&NSString>);
181 );
182}
183
184#[cfg(feature = "NSXMLNode")]
186impl NSXMLDTDNode {
187 extern_methods!(
188 #[unsafe(method(initWithKind:))]
196 #[unsafe(method_family = init)]
197 pub fn initWithKind(this: Allocated<Self>, kind: NSXMLNodeKind) -> Retained<Self>;
198 );
199}
200
201#[cfg(feature = "NSXMLNode")]
203impl NSXMLDTDNode {
204 extern_methods!(
205 #[unsafe(method(new))]
206 #[unsafe(method_family = new)]
207 pub fn new() -> Retained<Self>;
208 );
209}
210
211#[cfg(feature = "NSXMLNode")]
212impl DefaultRetained for NSXMLDTDNode {
213 #[inline]
214 fn default_retained() -> Retained<Self> {
215 Self::new()
216 }
217}