//! 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::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgarbagecollector?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Building Garbage Collected apps is no longer supported."]
    pub struct NSGarbageCollector;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for NSGarbageCollector {}
);

impl NSGarbageCollector {
    extern_methods!(
        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(defaultCollector))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultCollector() -> Retained<AnyObject>;

        #[deprecated]
        #[unsafe(method(isCollecting))]
        #[unsafe(method_family = none)]
        pub unsafe fn isCollecting(&self) -> bool;

        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(disable))]
        #[unsafe(method_family = none)]
        pub unsafe fn disable(&self);

        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(enable))]
        #[unsafe(method_family = none)]
        pub unsafe fn enable(&self);

        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(isEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isEnabled(&self) -> bool;

        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(collectIfNeeded))]
        #[unsafe(method_family = none)]
        pub unsafe fn collectIfNeeded(&self);

        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(collectExhaustively))]
        #[unsafe(method_family = none)]
        pub unsafe fn collectExhaustively(&self);

        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(disableCollectorForPointer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull<c_void>);

        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(enableCollectorForPointer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull<c_void>);

        #[cfg(feature = "NSZone")]
        #[deprecated = "Building Garbage Collected apps is no longer supported."]
        #[unsafe(method(zone))]
        #[unsafe(method_family = none)]
        pub unsafe fn zone(&self) -> NonNull<NSZone>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSGarbageCollector {
    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>;
    );
}
