objc2_foundation/generated/
NSPointerArray.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSPointerArray;
14);
15
16#[cfg(feature = "NSObject")]
17extern_conformance!(
18 unsafe impl NSCoding for NSPointerArray {}
19);
20
21#[cfg(feature = "NSObject")]
22extern_conformance!(
23 unsafe impl NSCopying for NSPointerArray {}
24);
25
26#[cfg(feature = "NSObject")]
27unsafe impl CopyingHelper for NSPointerArray {
28 type Result = Self;
29}
30
31#[cfg(feature = "NSEnumerator")]
32extern_conformance!(
33 unsafe impl NSFastEnumeration for NSPointerArray {}
34);
35
36extern_conformance!(
37 unsafe impl NSObjectProtocol for NSPointerArray {}
38);
39
40#[cfg(feature = "NSObject")]
41extern_conformance!(
42 unsafe impl NSSecureCoding for NSPointerArray {}
43);
44
45impl NSPointerArray {
46 extern_methods!(
47 #[cfg(feature = "NSPointerFunctions")]
48 #[unsafe(method(initWithOptions:))]
49 #[unsafe(method_family = init)]
50 pub unsafe fn initWithOptions(
51 this: Allocated<Self>,
52 options: NSPointerFunctionsOptions,
53 ) -> Retained<Self>;
54
55 #[cfg(feature = "NSPointerFunctions")]
56 #[unsafe(method(initWithPointerFunctions:))]
57 #[unsafe(method_family = init)]
58 pub unsafe fn initWithPointerFunctions(
59 this: Allocated<Self>,
60 functions: &NSPointerFunctions,
61 ) -> Retained<Self>;
62
63 #[cfg(feature = "NSPointerFunctions")]
64 #[unsafe(method(pointerArrayWithOptions:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn pointerArrayWithOptions(
67 options: NSPointerFunctionsOptions,
68 ) -> Retained<NSPointerArray>;
69
70 #[cfg(feature = "NSPointerFunctions")]
71 #[unsafe(method(pointerArrayWithPointerFunctions:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn pointerArrayWithPointerFunctions(
74 functions: &NSPointerFunctions,
75 ) -> Retained<NSPointerArray>;
76
77 #[cfg(feature = "NSPointerFunctions")]
78 #[unsafe(method(pointerFunctions))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn pointerFunctions(&self) -> Retained<NSPointerFunctions>;
81
82 #[unsafe(method(pointerAtIndex:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void;
85
86 #[unsafe(method(addPointer:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn addPointer(&self, pointer: *mut c_void);
89
90 #[unsafe(method(removePointerAtIndex:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn removePointerAtIndex(&self, index: NSUInteger);
93
94 #[unsafe(method(insertPointer:atIndex:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger);
97
98 #[unsafe(method(replacePointerAtIndex:withPointer:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn replacePointerAtIndex_withPointer(
101 &self,
102 index: NSUInteger,
103 item: *mut c_void,
104 );
105
106 #[unsafe(method(compact))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn compact(&self);
109
110 #[unsafe(method(count))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn count(&self) -> NSUInteger;
113
114 #[unsafe(method(setCount:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setCount(&self, count: NSUInteger);
118 );
119}
120
121impl NSPointerArray {
123 extern_methods!(
124 #[unsafe(method(init))]
125 #[unsafe(method_family = init)]
126 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
127
128 #[unsafe(method(new))]
129 #[unsafe(method_family = new)]
130 pub unsafe fn new() -> Retained<Self>;
131 );
132}
133
134impl NSPointerArray {
136 extern_methods!(
137 #[deprecated = "GC no longer supported"]
138 #[unsafe(method(pointerArrayWithStrongObjects))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn pointerArrayWithStrongObjects() -> Retained<AnyObject>;
141
142 #[deprecated = "GC no longer supported"]
143 #[unsafe(method(pointerArrayWithWeakObjects))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn pointerArrayWithWeakObjects() -> Retained<AnyObject>;
146
147 #[unsafe(method(strongObjectsPointerArray))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn strongObjectsPointerArray() -> Retained<NSPointerArray>;
150
151 #[unsafe(method(weakObjectsPointerArray))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn weakObjectsPointerArray() -> Retained<NSPointerArray>;
154
155 #[cfg(feature = "NSArray")]
156 #[unsafe(method(allObjects))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn allObjects(&self) -> Retained<NSArray>;
159 );
160}