objc2_foundation/generated/
NSGarbageCollector.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgarbagecollector?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[deprecated = "Building Garbage Collected apps is no longer supported."]
14    pub struct NSGarbageCollector;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for NSGarbageCollector {}
19);
20
21impl NSGarbageCollector {
22    extern_methods!(
23        #[deprecated = "Building Garbage Collected apps is no longer supported."]
24        #[unsafe(method(defaultCollector))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn defaultCollector() -> Retained<AnyObject>;
27
28        #[deprecated]
29        #[unsafe(method(isCollecting))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn isCollecting(&self) -> bool;
32
33        #[deprecated = "Building Garbage Collected apps is no longer supported."]
34        #[unsafe(method(disable))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn disable(&self);
37
38        #[deprecated = "Building Garbage Collected apps is no longer supported."]
39        #[unsafe(method(enable))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn enable(&self);
42
43        #[deprecated = "Building Garbage Collected apps is no longer supported."]
44        #[unsafe(method(isEnabled))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn isEnabled(&self) -> bool;
47
48        #[deprecated = "Building Garbage Collected apps is no longer supported."]
49        #[unsafe(method(collectIfNeeded))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn collectIfNeeded(&self);
52
53        #[deprecated = "Building Garbage Collected apps is no longer supported."]
54        #[unsafe(method(collectExhaustively))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn collectExhaustively(&self);
57
58        #[deprecated = "Building Garbage Collected apps is no longer supported."]
59        #[unsafe(method(disableCollectorForPointer:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull<c_void>);
62
63        #[deprecated = "Building Garbage Collected apps is no longer supported."]
64        #[unsafe(method(enableCollectorForPointer:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull<c_void>);
67
68        #[cfg(feature = "NSZone")]
69        #[deprecated = "Building Garbage Collected apps is no longer supported."]
70        #[unsafe(method(zone))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn zone(&self) -> NonNull<NSZone>;
73    );
74}
75
76/// Methods declared on superclass `NSObject`.
77impl NSGarbageCollector {
78    extern_methods!(
79        #[unsafe(method(init))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86    );
87}