//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsopenstepunicodereservedbase?language=objc)
pub const NSOpenStepUnicodeReservedBase: c_uint = 0xF400;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nscharacterset?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCharacterSet;
);

#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSCharacterSet {
    type Result = Self;
}

#[cfg(feature = "NSObject")]
unsafe impl NSMutableCopying for NSCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl MutableCopyingHelper for NSCharacterSet {
    type Result = NSMutableCharacterSet;
}

unsafe impl NSObjectProtocol for NSCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSCharacterSet {}

impl NSCharacterSet {
    extern_methods!(
        #[unsafe(method(controlCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn controlCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(whitespaceCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn whitespaceCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(whitespaceAndNewlineCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn whitespaceAndNewlineCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(decimalDigitCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn decimalDigitCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(letterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn letterCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(lowercaseLetterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn lowercaseLetterCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(uppercaseLetterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn uppercaseLetterCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(nonBaseCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn nonBaseCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(alphanumericCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn alphanumericCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(decomposableCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn decomposableCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(illegalCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn illegalCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(punctuationCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn punctuationCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(capitalizedLetterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn capitalizedLetterCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(symbolCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn symbolCharacterSet() -> Retained<NSCharacterSet>;

        #[unsafe(method(newlineCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn newlineCharacterSet() -> Retained<NSCharacterSet>;

        #[cfg(feature = "NSRange")]
        #[unsafe(method(characterSetWithRange:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithRange(a_range: NSRange) -> Retained<NSCharacterSet>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(characterSetWithCharactersInString:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithCharactersInString(
            a_string: &NSString,
        ) -> Retained<NSCharacterSet>;

        #[cfg(feature = "NSData")]
        #[unsafe(method(characterSetWithBitmapRepresentation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithBitmapRepresentation(
            data: &NSData,
        ) -> Retained<NSCharacterSet>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(characterSetWithContentsOfFile:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithContentsOfFile(
            f_name: &NSString,
        ) -> Option<Retained<NSCharacterSet>>;

        #[cfg(feature = "NSCoder")]
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(characterIsMember:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterIsMember(&self, a_character: unichar) -> bool;

        #[cfg(feature = "NSData")]
        #[unsafe(method(bitmapRepresentation))]
        #[unsafe(method_family = none)]
        pub unsafe fn bitmapRepresentation(&self) -> Retained<NSData>;

        #[unsafe(method(invertedSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn invertedSet(&self) -> Retained<NSCharacterSet>;

        #[unsafe(method(longCharacterIsMember:))]
        #[unsafe(method_family = none)]
        pub unsafe fn longCharacterIsMember(&self, the_long_char: UTF32Char) -> bool;

        #[unsafe(method(isSupersetOfSet:))]
        #[unsafe(method_family = none)]
        pub unsafe fn isSupersetOfSet(&self, the_other_set: &NSCharacterSet) -> bool;

        #[unsafe(method(hasMemberInPlane:))]
        #[unsafe(method_family = none)]
        pub unsafe fn hasMemberInPlane(&self, the_plane: u8) -> bool;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSCharacterSet {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsmutablecharacterset?language=objc)
    #[unsafe(super(NSCharacterSet, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSMutableCharacterSet;
);

#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSMutableCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSMutableCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSMutableCharacterSet {
    type Result = NSCharacterSet;
}

#[cfg(feature = "NSObject")]
unsafe impl NSMutableCopying for NSMutableCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl MutableCopyingHelper for NSMutableCharacterSet {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSMutableCharacterSet {}

#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSMutableCharacterSet {}

impl NSMutableCharacterSet {
    extern_methods!(
        #[cfg(feature = "NSRange")]
        #[unsafe(method(addCharactersInRange:))]
        #[unsafe(method_family = none)]
        pub unsafe fn addCharactersInRange(&self, a_range: NSRange);

        #[cfg(feature = "NSRange")]
        #[unsafe(method(removeCharactersInRange:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeCharactersInRange(&self, a_range: NSRange);

        #[cfg(feature = "NSString")]
        #[unsafe(method(addCharactersInString:))]
        #[unsafe(method_family = none)]
        pub unsafe fn addCharactersInString(&self, a_string: &NSString);

        #[cfg(feature = "NSString")]
        #[unsafe(method(removeCharactersInString:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeCharactersInString(&self, a_string: &NSString);

        #[unsafe(method(formUnionWithCharacterSet:))]
        #[unsafe(method_family = none)]
        pub unsafe fn formUnionWithCharacterSet(&self, other_set: &NSCharacterSet);

        #[unsafe(method(formIntersectionWithCharacterSet:))]
        #[unsafe(method_family = none)]
        pub unsafe fn formIntersectionWithCharacterSet(&self, other_set: &NSCharacterSet);

        #[unsafe(method(invert))]
        #[unsafe(method_family = none)]
        pub unsafe fn invert(&self);

        #[unsafe(method(controlCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn controlCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(whitespaceCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn whitespaceCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(whitespaceAndNewlineCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn whitespaceAndNewlineCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(decimalDigitCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn decimalDigitCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(letterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn letterCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(lowercaseLetterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn lowercaseLetterCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(uppercaseLetterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn uppercaseLetterCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(nonBaseCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn nonBaseCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(alphanumericCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn alphanumericCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(decomposableCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn decomposableCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(illegalCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn illegalCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(punctuationCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn punctuationCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(capitalizedLetterCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn capitalizedLetterCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(symbolCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn symbolCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[unsafe(method(newlineCharacterSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn newlineCharacterSet() -> Retained<NSMutableCharacterSet>;

        #[cfg(feature = "NSRange")]
        #[unsafe(method(characterSetWithRange:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithRange(a_range: NSRange) -> Retained<NSMutableCharacterSet>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(characterSetWithCharactersInString:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithCharactersInString(
            a_string: &NSString,
        ) -> Retained<NSMutableCharacterSet>;

        #[cfg(feature = "NSData")]
        #[unsafe(method(characterSetWithBitmapRepresentation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithBitmapRepresentation(
            data: &NSData,
        ) -> Retained<NSMutableCharacterSet>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(characterSetWithContentsOfFile:))]
        #[unsafe(method_family = none)]
        pub unsafe fn characterSetWithContentsOfFile(
            f_name: &NSString,
        ) -> Option<Retained<NSMutableCharacterSet>>;
    );
}

/// Methods declared on superclass `NSCharacterSet`.
impl NSMutableCharacterSet {
    extern_methods!(
        #[cfg(feature = "NSCoder")]
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSMutableCharacterSet {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
