use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSXMLDTDNodeKind(pub NSUInteger);
impl NSXMLDTDNodeKind {
pub const NSXMLEntityGeneralKind: Self = Self(1);
pub const NSXMLEntityParsedKind: Self = Self(2);
pub const NSXMLEntityUnparsedKind: Self = Self(3);
pub const NSXMLEntityParameterKind: Self = Self(4);
pub const NSXMLEntityPredefined: Self = Self(5);
pub const NSXMLAttributeCDATAKind: Self = Self(6);
pub const NSXMLAttributeIDKind: Self = Self(7);
pub const NSXMLAttributeIDRefKind: Self = Self(8);
pub const NSXMLAttributeIDRefsKind: Self = Self(9);
pub const NSXMLAttributeEntityKind: Self = Self(10);
pub const NSXMLAttributeEntitiesKind: Self = Self(11);
pub const NSXMLAttributeNMTokenKind: Self = Self(12);
pub const NSXMLAttributeNMTokensKind: Self = Self(13);
pub const NSXMLAttributeEnumerationKind: Self = Self(14);
pub const NSXMLAttributeNotationKind: Self = Self(15);
pub const NSXMLElementDeclarationUndefinedKind: Self = Self(16);
pub const NSXMLElementDeclarationEmptyKind: Self = Self(17);
pub const NSXMLElementDeclarationAnyKind: Self = Self(18);
pub const NSXMLElementDeclarationMixedKind: Self = Self(19);
pub const NSXMLElementDeclarationElementKind: Self = Self(20);
}
unsafe impl Encode for NSXMLDTDNodeKind {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSXMLDTDNodeKind {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSXMLNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSXMLNode")]
pub struct NSXMLDTDNode;
);
#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
extern_conformance!(
unsafe impl NSCopying for NSXMLDTDNode {}
);
#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
unsafe impl CopyingHelper for NSXMLDTDNode {
type Result = Self;
}
#[cfg(feature = "NSXMLNode")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSXMLDTDNode {}
);
#[cfg(feature = "NSXMLNode")]
impl NSXMLDTDNode {
extern_methods!(
#[cfg(feature = "NSString")]
#[unsafe(method(initWithXMLString:))]
#[unsafe(method_family = init)]
pub fn initWithXMLString(
this: Allocated<Self>,
string: &NSString,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSXMLNodeOptions")]
#[unsafe(method(initWithKind:options:))]
#[unsafe(method_family = init)]
pub fn initWithKind_options(
this: Allocated<Self>,
kind: NSXMLNodeKind,
options: NSXMLNodeOptions,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(DTDKind))]
#[unsafe(method_family = none)]
pub fn DTDKind(&self) -> NSXMLDTDNodeKind;
#[unsafe(method(setDTDKind:))]
#[unsafe(method_family = none)]
pub fn setDTDKind(&self, dtd_kind: NSXMLDTDNodeKind);
#[unsafe(method(isExternal))]
#[unsafe(method_family = none)]
pub fn isExternal(&self) -> bool;
#[cfg(feature = "NSString")]
#[unsafe(method(publicID))]
#[unsafe(method_family = none)]
pub fn publicID(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setPublicID:))]
#[unsafe(method_family = none)]
pub fn setPublicID(&self, public_id: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(systemID))]
#[unsafe(method_family = none)]
pub fn systemID(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setSystemID:))]
#[unsafe(method_family = none)]
pub fn setSystemID(&self, system_id: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(notationName))]
#[unsafe(method_family = none)]
pub fn notationName(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setNotationName:))]
#[unsafe(method_family = none)]
pub fn setNotationName(&self, notation_name: Option<&NSString>);
);
}
#[cfg(feature = "NSXMLNode")]
impl NSXMLDTDNode {
extern_methods!(
#[unsafe(method(initWithKind:))]
#[unsafe(method_family = init)]
pub fn initWithKind(this: Allocated<Self>, kind: NSXMLNodeKind) -> Retained<Self>;
);
}
#[cfg(feature = "NSXMLNode")]
impl NSXMLDTDNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
#[cfg(feature = "NSXMLNode")]
impl DefaultRetained for NSXMLDTDNode {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}