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"))]
86unsafe impl NSCopying for NSXMLDTDNode {}
87
88#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
89unsafe impl CopyingHelper for NSXMLDTDNode {
90 type Result = Self;
91}
92
93#[cfg(feature = "NSXMLNode")]
94unsafe impl NSObjectProtocol for NSXMLDTDNode {}
95
96#[cfg(feature = "NSXMLNode")]
97impl NSXMLDTDNode {
98 extern_methods!(
99 #[cfg(feature = "NSString")]
100 #[unsafe(method(initWithXMLString:))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn initWithXMLString(
104 this: Allocated<Self>,
105 string: &NSString,
106 ) -> Option<Retained<Self>>;
107
108 #[cfg(feature = "NSXMLNodeOptions")]
109 #[unsafe(method(initWithKind:options:))]
110 #[unsafe(method_family = init)]
111 pub unsafe fn initWithKind_options(
112 this: Allocated<Self>,
113 kind: NSXMLNodeKind,
114 options: NSXMLNodeOptions,
115 ) -> Retained<Self>;
116
117 #[unsafe(method(init))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120
121 #[unsafe(method(DTDKind))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind;
125
126 #[unsafe(method(setDTDKind:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn setDTDKind(&self, dtd_kind: NSXMLDTDNodeKind);
130
131 #[unsafe(method(isExternal))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn isExternal(&self) -> bool;
135
136 #[cfg(feature = "NSString")]
137 #[unsafe(method(publicID))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn publicID(&self) -> Option<Retained<NSString>>;
141
142 #[cfg(feature = "NSString")]
143 #[unsafe(method(setPublicID:))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn setPublicID(&self, public_id: Option<&NSString>);
147
148 #[cfg(feature = "NSString")]
149 #[unsafe(method(systemID))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn systemID(&self) -> Option<Retained<NSString>>;
153
154 #[cfg(feature = "NSString")]
155 #[unsafe(method(setSystemID:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn setSystemID(&self, system_id: Option<&NSString>);
159
160 #[cfg(feature = "NSString")]
161 #[unsafe(method(notationName))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn notationName(&self) -> Option<Retained<NSString>>;
165
166 #[cfg(feature = "NSString")]
167 #[unsafe(method(setNotationName:))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn setNotationName(&self, notation_name: Option<&NSString>);
171 );
172}
173
174#[cfg(feature = "NSXMLNode")]
176impl NSXMLDTDNode {
177 extern_methods!(
178 #[unsafe(method(initWithKind:))]
186 #[unsafe(method_family = init)]
187 pub unsafe fn initWithKind(this: Allocated<Self>, kind: NSXMLNodeKind) -> Retained<Self>;
188 );
189}
190
191#[cfg(feature = "NSXMLNode")]
193impl NSXMLDTDNode {
194 extern_methods!(
195 #[unsafe(method(new))]
196 #[unsafe(method_family = new)]
197 pub unsafe fn new() -> Retained<Self>;
198 );
199}