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 unsafe 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 unsafe 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 unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
124
125 #[unsafe(method(DTDKind))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind;
129
130 #[unsafe(method(setDTDKind:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setDTDKind(&self, dtd_kind: NSXMLDTDNodeKind);
134
135 #[unsafe(method(isExternal))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn isExternal(&self) -> bool;
139
140 #[cfg(feature = "NSString")]
141 #[unsafe(method(publicID))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn publicID(&self) -> Option<Retained<NSString>>;
145
146 #[cfg(feature = "NSString")]
147 #[unsafe(method(setPublicID:))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn setPublicID(&self, public_id: Option<&NSString>);
151
152 #[cfg(feature = "NSString")]
153 #[unsafe(method(systemID))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn systemID(&self) -> Option<Retained<NSString>>;
157
158 #[cfg(feature = "NSString")]
159 #[unsafe(method(setSystemID:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn setSystemID(&self, system_id: Option<&NSString>);
163
164 #[cfg(feature = "NSString")]
165 #[unsafe(method(notationName))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn notationName(&self) -> Option<Retained<NSString>>;
169
170 #[cfg(feature = "NSString")]
171 #[unsafe(method(setNotationName:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn setNotationName(&self, notation_name: Option<&NSString>);
175 );
176}
177
178#[cfg(feature = "NSXMLNode")]
180impl NSXMLDTDNode {
181 extern_methods!(
182 #[unsafe(method(initWithKind:))]
190 #[unsafe(method_family = init)]
191 pub unsafe fn initWithKind(this: Allocated<Self>, kind: NSXMLNodeKind) -> Retained<Self>;
192 );
193}
194
195#[cfg(feature = "NSXMLNode")]
197impl NSXMLDTDNode {
198 extern_methods!(
199 #[unsafe(method(new))]
200 #[unsafe(method_family = new)]
201 pub unsafe fn new() -> Retained<Self>;
202 );
203}