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
17unsafe impl NSObjectProtocol for NSGarbageCollector {}
18
19impl NSGarbageCollector {
20    extern_methods!(
21        #[deprecated = "Building Garbage Collected apps is no longer supported."]
22        #[unsafe(method(defaultCollector))]
23        #[unsafe(method_family = none)]
24        pub unsafe fn defaultCollector() -> Retained<AnyObject>;
25
26        #[deprecated]
27        #[unsafe(method(isCollecting))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn isCollecting(&self) -> bool;
30
31        #[deprecated = "Building Garbage Collected apps is no longer supported."]
32        #[unsafe(method(disable))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn disable(&self);
35
36        #[deprecated = "Building Garbage Collected apps is no longer supported."]
37        #[unsafe(method(enable))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn enable(&self);
40
41        #[deprecated = "Building Garbage Collected apps is no longer supported."]
42        #[unsafe(method(isEnabled))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn isEnabled(&self) -> bool;
45
46        #[deprecated = "Building Garbage Collected apps is no longer supported."]
47        #[unsafe(method(collectIfNeeded))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn collectIfNeeded(&self);
50
51        #[deprecated = "Building Garbage Collected apps is no longer supported."]
52        #[unsafe(method(collectExhaustively))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn collectExhaustively(&self);
55
56        #[deprecated = "Building Garbage Collected apps is no longer supported."]
57        #[unsafe(method(disableCollectorForPointer:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull<c_void>);
60
61        #[deprecated = "Building Garbage Collected apps is no longer supported."]
62        #[unsafe(method(enableCollectorForPointer:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull<c_void>);
65
66        #[cfg(feature = "NSZone")]
67        #[deprecated = "Building Garbage Collected apps is no longer supported."]
68        #[unsafe(method(zone))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn zone(&self) -> NonNull<NSZone>;
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75impl NSGarbageCollector {
76    extern_methods!(
77        #[unsafe(method(init))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81        #[unsafe(method(new))]
82        #[unsafe(method_family = new)]
83        pub unsafe fn new() -> Retained<Self>;
84    );
85}