objc2_core_foundation/generated/CFTree.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6use core::ptr::NonNull;
7#[cfg(feature = "objc2")]
8use objc2::__framework_prelude::*;
9
10use crate::*;
11
12/// Type of the callback function used to add a retain to the user-specified
13/// info parameter. This callback may returns the value to use whenever the
14/// info parameter is retained, which is usually the value parameter passed
15/// to this callback, but may be a different value if a different value
16/// should be used.
17///
18/// Parameter `info`: A user-supplied info parameter provided in a CFTreeContext.
19///
20/// Returns: The retained info parameter.
21///
22/// See also [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cftreeretaincallback?language=objc)
23pub type CFTreeRetainCallBack = Option<unsafe extern "C-unwind" fn(*const c_void) -> *const c_void>;
24
25/// Type of the callback function used to remove a retain previously
26/// added to the user-specified info parameter.
27///
28/// Parameter `info`: A user-supplied info parameter provided in a CFTreeContext.
29///
30/// See also [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cftreereleasecallback?language=objc)
31pub type CFTreeReleaseCallBack = Option<unsafe extern "C-unwind" fn(*const c_void)>;
32
33/// Type of the callback function used to provide a description of the
34/// user-specified info parameter.
35///
36/// Parameter `info`: A user-supplied info parameter provided in a CFTreeContext.
37///
38/// Returns: A description of the info parameter.
39///
40/// See also [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cftreecopydescriptioncallback?language=objc)
41pub type CFTreeCopyDescriptionCallBack =
42 Option<unsafe extern "C-unwind" fn(*const c_void) -> *const CFString>;
43
44/// Structure containing user-specified data and callbacks for a CFTree.
45/// Field: version The version number of the structure type being passed
46/// in as a parameter to the CFTree creation function.
47/// This structure is version 0.
48/// Field: info A C pointer to a user-specified block of data.
49/// Field: retain The callback used to add a retain for the info field.
50/// If this parameter is not a pointer to a function of the correct
51/// prototype, the behavior is undefined. The value may be NULL.
52/// Field: release The calllback used to remove a retain previously added
53/// for the info field. If this parameter is not a pointer to a
54/// function of the correct prototype, the behavior is undefined.
55/// The value may be NULL.
56/// Field: copyDescription The callback used to provide a description of
57/// the info field.
58///
59/// See also [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cftreecontext?language=objc)
60#[repr(C)]
61#[derive(Clone, Copy, Debug, PartialEq)]
62pub struct CFTreeContext {
63 pub version: CFIndex,
64 pub info: *mut c_void,
65 pub retain: CFTreeRetainCallBack,
66 pub release: CFTreeReleaseCallBack,
67 pub copyDescription: CFTreeCopyDescriptionCallBack,
68}
69
70#[cfg(feature = "objc2")]
71unsafe impl Encode for CFTreeContext {
72 const ENCODING: Encoding = Encoding::Struct(
73 "?",
74 &[
75 <CFIndex>::ENCODING,
76 <*mut c_void>::ENCODING,
77 <CFTreeRetainCallBack>::ENCODING,
78 <CFTreeReleaseCallBack>::ENCODING,
79 <CFTreeCopyDescriptionCallBack>::ENCODING,
80 ],
81 );
82}
83
84#[cfg(feature = "objc2")]
85unsafe impl RefEncode for CFTreeContext {
86 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
87}
88
89/// Type of the callback function used by the apply functions of
90/// CFTree.
91///
92/// Parameter `value`: The current value from the CFTree
93///
94/// Parameter `context`: The user-defined context parameter give to the apply
95/// function.
96///
97/// See also [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cftreeapplierfunction?language=objc)
98pub type CFTreeApplierFunction = Option<unsafe extern "C-unwind" fn(*const c_void, *mut c_void)>;
99
100/// This is the type of a reference to CFTrees.
101///
102/// See also [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cftree?language=objc)
103#[repr(C)]
104pub struct CFTree {
105 inner: [u8; 0],
106 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
107}
108
109cf_type!(
110 unsafe impl CFTree {}
111);
112#[cfg(feature = "objc2")]
113cf_objc2_type!(
114 unsafe impl RefEncode<"__CFTree"> for CFTree {}
115);
116
117unsafe impl ConcreteType for CFTree {
118 /// Returns the type identifier of all CFTree instances.
119 #[doc(alias = "CFTreeGetTypeID")]
120 #[inline]
121 fn type_id() -> CFTypeID {
122 extern "C-unwind" {
123 fn CFTreeGetTypeID() -> CFTypeID;
124 }
125 unsafe { CFTreeGetTypeID() }
126 }
127}
128
129impl CFTree {
130 /// Creates a new mutable tree.
131 ///
132 /// Parameter `allocator`: The CFAllocator which should be used to allocate
133 /// memory for the tree and storage for its children. This
134 /// parameter may be NULL in which case the current default
135 /// CFAllocator is used. If this reference is not a valid
136 /// CFAllocator, the behavior is undefined.
137 ///
138 /// Parameter `context`: A C pointer to a CFTreeContext structure to be copied
139 /// and used as the context of the new tree. The info parameter
140 /// will be retained by the tree if a retain function is provided.
141 /// If this value is not a valid C pointer to a CFTreeContext
142 /// structure-sized block of storage, the result is undefined.
143 /// If the version number of the storage is not a valid CFTreeContext
144 /// version number, the result is undefined.
145 ///
146 /// Returns: A reference to the new CFTree.
147 #[doc(alias = "CFTreeCreate")]
148 #[inline]
149 pub unsafe fn new(
150 allocator: Option<&CFAllocator>,
151 context: *const CFTreeContext,
152 ) -> Option<CFRetained<CFTree>> {
153 extern "C-unwind" {
154 fn CFTreeCreate(
155 allocator: Option<&CFAllocator>,
156 context: *const CFTreeContext,
157 ) -> Option<NonNull<CFTree>>;
158 }
159 let ret = unsafe { CFTreeCreate(allocator, context) };
160 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
161 }
162
163 /// Returns the parent of the specified tree.
164 ///
165 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
166 /// CFTree, the behavior is undefined.
167 ///
168 /// Returns: The parent of the tree.
169 #[doc(alias = "CFTreeGetParent")]
170 #[inline]
171 pub unsafe fn parent(self: &CFTree) -> Option<CFRetained<CFTree>> {
172 extern "C-unwind" {
173 fn CFTreeGetParent(tree: &CFTree) -> Option<NonNull<CFTree>>;
174 }
175 let ret = unsafe { CFTreeGetParent(self) };
176 ret.map(|ret| unsafe { CFRetained::retain(ret) })
177 }
178
179 /// Returns the sibling after the specified tree in the parent tree's list.
180 ///
181 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
182 /// CFTree, the behavior is undefined.
183 ///
184 /// Returns: The next sibling of the tree.
185 #[doc(alias = "CFTreeGetNextSibling")]
186 #[inline]
187 pub unsafe fn next_sibling(self: &CFTree) -> Option<CFRetained<CFTree>> {
188 extern "C-unwind" {
189 fn CFTreeGetNextSibling(tree: &CFTree) -> Option<NonNull<CFTree>>;
190 }
191 let ret = unsafe { CFTreeGetNextSibling(self) };
192 ret.map(|ret| unsafe { CFRetained::retain(ret) })
193 }
194
195 /// Returns the first child of the tree.
196 ///
197 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
198 /// CFTree, the behavior is undefined.
199 ///
200 /// Returns: The first child of the tree.
201 #[doc(alias = "CFTreeGetFirstChild")]
202 #[inline]
203 pub unsafe fn first_child(self: &CFTree) -> Option<CFRetained<CFTree>> {
204 extern "C-unwind" {
205 fn CFTreeGetFirstChild(tree: &CFTree) -> Option<NonNull<CFTree>>;
206 }
207 let ret = unsafe { CFTreeGetFirstChild(self) };
208 ret.map(|ret| unsafe { CFRetained::retain(ret) })
209 }
210
211 /// Returns the context of the specified tree.
212 ///
213 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
214 /// CFTree, the behavior is undefined.
215 ///
216 /// Parameter `context`: A C pointer to a CFTreeContext structure to be filled in with
217 /// the context of the specified tree. If this value is not a valid C
218 /// pointer to a CFTreeContext structure-sized block of storage, the
219 /// result is undefined. If the version number of the storage is not
220 /// a valid CFTreeContext version number, the result is undefined.
221 #[doc(alias = "CFTreeGetContext")]
222 #[inline]
223 pub unsafe fn context(self: &CFTree, context: *mut CFTreeContext) {
224 extern "C-unwind" {
225 fn CFTreeGetContext(tree: &CFTree, context: *mut CFTreeContext);
226 }
227 unsafe { CFTreeGetContext(self, context) }
228 }
229
230 /// Returns the number of children of the specified tree.
231 ///
232 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
233 /// CFTree, the behavior is undefined.
234 ///
235 /// Returns: The number of children.
236 #[doc(alias = "CFTreeGetChildCount")]
237 #[inline]
238 pub unsafe fn child_count(self: &CFTree) -> CFIndex {
239 extern "C-unwind" {
240 fn CFTreeGetChildCount(tree: &CFTree) -> CFIndex;
241 }
242 unsafe { CFTreeGetChildCount(self) }
243 }
244
245 /// Returns the nth child of the specified tree.
246 ///
247 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
248 /// CFTree, the behavior is undefined.
249 ///
250 /// Parameter `idx`: The index of the child tree to be returned. If this parameter
251 /// is less than zero or greater than the number of children of the
252 /// tree, the result is undefined.
253 ///
254 /// Returns: A reference to the specified child tree.
255 #[doc(alias = "CFTreeGetChildAtIndex")]
256 #[inline]
257 pub unsafe fn child_at_index(self: &CFTree, idx: CFIndex) -> Option<CFRetained<CFTree>> {
258 extern "C-unwind" {
259 fn CFTreeGetChildAtIndex(tree: &CFTree, idx: CFIndex) -> Option<NonNull<CFTree>>;
260 }
261 let ret = unsafe { CFTreeGetChildAtIndex(self, idx) };
262 ret.map(|ret| unsafe { CFRetained::retain(ret) })
263 }
264
265 /// Fills the buffer with children from the tree.
266 ///
267 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
268 /// CFTree, the behavior is undefined.
269 ///
270 /// Parameter `children`: A C array of pointer-sized values to be filled with
271 /// children from the tree. If this parameter is not a valid pointer to a
272 /// C array of at least CFTreeGetChildCount() pointers, the behavior is undefined.
273 #[doc(alias = "CFTreeGetChildren")]
274 #[inline]
275 pub unsafe fn children(self: &CFTree, children: *mut *mut CFTree) {
276 extern "C-unwind" {
277 fn CFTreeGetChildren(tree: &CFTree, children: *mut *mut CFTree);
278 }
279 unsafe { CFTreeGetChildren(self, children) }
280 }
281
282 /// Calls a function once for each child of the tree. Note that the applier
283 /// only operates one level deep, and does not operate on descendents further
284 /// removed than the immediate children of the tree.
285 ///
286 /// Parameter `tree`: The tree to be operated upon. If this parameter is not a
287 /// valid CFTree, the behavior is undefined.
288 ///
289 /// Parameter `applier`: The callback function to call once for each child of
290 /// the given tree. If this parameter is not a pointer to a
291 /// function of the correct prototype, the behavior is undefined.
292 /// If there are values in the tree which the applier function does
293 /// not expect or cannot properly apply to, the behavior is undefined.
294 ///
295 /// Parameter `context`: A pointer-sized user-defined value, which is passed
296 /// as the second parameter to the applier function, but is
297 /// otherwise unused by this function. If the context is not
298 /// what is expected by the applier function, the behavior is
299 /// undefined.
300 #[doc(alias = "CFTreeApplyFunctionToChildren")]
301 #[inline]
302 pub unsafe fn apply_function_to_children(
303 self: &CFTree,
304 applier: CFTreeApplierFunction,
305 context: *mut c_void,
306 ) {
307 extern "C-unwind" {
308 fn CFTreeApplyFunctionToChildren(
309 tree: &CFTree,
310 applier: CFTreeApplierFunction,
311 context: *mut c_void,
312 );
313 }
314 unsafe { CFTreeApplyFunctionToChildren(self, applier, context) }
315 }
316
317 /// Returns the root tree of which the specified tree is a descendent.
318 ///
319 /// Parameter `tree`: The tree to be queried. If this parameter is not a valid
320 /// CFTree, the behavior is undefined.
321 ///
322 /// Returns: A reference to the root of the tree.
323 #[doc(alias = "CFTreeFindRoot")]
324 #[inline]
325 pub unsafe fn find_root(self: &CFTree) -> Option<CFRetained<CFTree>> {
326 extern "C-unwind" {
327 fn CFTreeFindRoot(tree: &CFTree) -> Option<NonNull<CFTree>>;
328 }
329 let ret = unsafe { CFTreeFindRoot(self) };
330 ret.map(|ret| unsafe { CFRetained::retain(ret) })
331 }
332
333 /// Replaces the context of a tree. The tree releases its retain on the
334 /// info of the previous context, and retains the info of the new context.
335 ///
336 /// Parameter `tree`: The tree to be operated on. If this parameter is not a valid
337 /// CFTree, the behavior is undefined.
338 ///
339 /// Parameter `context`: A C pointer to a CFTreeContext structure to be copied
340 /// and used as the context of the new tree. The info parameter
341 /// will be retained by the tree if a retain function is provided.
342 /// If this value is not a valid C pointer to a CFTreeContext
343 /// structure-sized block of storage, the result is undefined.
344 /// If the version number of the storage is not a valid CFTreeContext
345 /// version number, the result is undefined.
346 #[doc(alias = "CFTreeSetContext")]
347 #[inline]
348 pub unsafe fn set_context(self: &CFTree, context: *const CFTreeContext) {
349 extern "C-unwind" {
350 fn CFTreeSetContext(tree: &CFTree, context: *const CFTreeContext);
351 }
352 unsafe { CFTreeSetContext(self, context) }
353 }
354
355 /// Adds the newChild to the specified tree as the first in its list of children.
356 ///
357 /// Parameter `tree`: The tree to be operated on. If this parameter is not a valid
358 /// CFTree, the behavior is undefined.
359 ///
360 /// Parameter `newChild`: The child to be added.
361 /// If this parameter is not a valid CFTree, the behavior is undefined.
362 /// If this parameter is a tree which is already a child of any tree,
363 /// the behavior is undefined.
364 #[doc(alias = "CFTreePrependChild")]
365 #[inline]
366 pub unsafe fn prepend_child(self: &CFTree, new_child: Option<&CFTree>) {
367 extern "C-unwind" {
368 fn CFTreePrependChild(tree: &CFTree, new_child: Option<&CFTree>);
369 }
370 unsafe { CFTreePrependChild(self, new_child) }
371 }
372
373 /// Adds the newChild to the specified tree as the last in its list of children.
374 ///
375 /// Parameter `tree`: The tree to be operated on. If this parameter is not a valid
376 /// CFTree, the behavior is undefined.
377 ///
378 /// Parameter `newChild`: The child to be added.
379 /// If this parameter is not a valid CFTree, the behavior is undefined.
380 /// If this parameter is a tree which is already a child of any tree,
381 /// the behavior is undefined.
382 #[doc(alias = "CFTreeAppendChild")]
383 #[inline]
384 pub unsafe fn append_child(self: &CFTree, new_child: Option<&CFTree>) {
385 extern "C-unwind" {
386 fn CFTreeAppendChild(tree: &CFTree, new_child: Option<&CFTree>);
387 }
388 unsafe { CFTreeAppendChild(self, new_child) }
389 }
390
391 /// Inserts newSibling into the the parent tree's linked list of children after
392 /// tree. The newSibling will have the same parent as tree.
393 ///
394 /// Parameter `tree`: The tree to insert newSibling after. If this parameter is not a valid
395 /// CFTree, the behavior is undefined. If the tree does not have a
396 /// parent, the behavior is undefined.
397 ///
398 /// Parameter `newSibling`: The sibling to be added.
399 /// If this parameter is not a valid CFTree, the behavior is undefined.
400 /// If this parameter is a tree which is already a child of any tree,
401 /// the behavior is undefined.
402 #[doc(alias = "CFTreeInsertSibling")]
403 #[inline]
404 pub unsafe fn insert_sibling(self: &CFTree, new_sibling: Option<&CFTree>) {
405 extern "C-unwind" {
406 fn CFTreeInsertSibling(tree: &CFTree, new_sibling: Option<&CFTree>);
407 }
408 unsafe { CFTreeInsertSibling(self, new_sibling) }
409 }
410
411 /// Removes the tree from its parent.
412 ///
413 /// Parameter `tree`: The tree to be removed. If this parameter is not a valid
414 /// CFTree, the behavior is undefined.
415 #[doc(alias = "CFTreeRemove")]
416 #[inline]
417 pub unsafe fn remove(self: &CFTree) {
418 extern "C-unwind" {
419 fn CFTreeRemove(tree: &CFTree);
420 }
421 unsafe { CFTreeRemove(self) }
422 }
423
424 /// Removes all the children of the tree.
425 ///
426 /// Parameter `tree`: The tree to remove all children from. If this parameter is not a valid
427 /// CFTree, the behavior is undefined.
428 #[doc(alias = "CFTreeRemoveAllChildren")]
429 #[inline]
430 pub unsafe fn remove_all_children(self: &CFTree) {
431 extern "C-unwind" {
432 fn CFTreeRemoveAllChildren(tree: &CFTree);
433 }
434 unsafe { CFTreeRemoveAllChildren(self) }
435 }
436
437 /// Sorts the children of the specified tree using the specified comparator function.
438 ///
439 /// Parameter `tree`: The tree to be operated on. If this parameter is not a valid
440 /// CFTree, the behavior is undefined.
441 ///
442 /// Parameter `comparator`: The function with the comparator function type
443 /// signature which is used in the sort operation to compare
444 /// children of the tree with the given value. If this parameter
445 /// is not a pointer to a function of the correct prototype, the
446 /// the behavior is undefined. The children of the tree are sorted
447 /// from least to greatest according to this function.
448 ///
449 /// Parameter `context`: A pointer-sized user-defined value, which is passed
450 /// as the third parameter to the comparator function, but is
451 /// otherwise unused by this function. If the context is not
452 /// what is expected by the comparator function, the behavior is
453 /// undefined.
454 #[doc(alias = "CFTreeSortChildren")]
455 #[inline]
456 pub unsafe fn sort_children(
457 self: &CFTree,
458 comparator: CFComparatorFunction,
459 context: *mut c_void,
460 ) {
461 extern "C-unwind" {
462 fn CFTreeSortChildren(
463 tree: &CFTree,
464 comparator: CFComparatorFunction,
465 context: *mut c_void,
466 );
467 }
468 unsafe { CFTreeSortChildren(self, comparator, context) }
469 }
470}
471
472#[deprecated = "renamed to `CFTree::new`"]
473#[inline]
474pub unsafe extern "C-unwind" fn CFTreeCreate(
475 allocator: Option<&CFAllocator>,
476 context: *const CFTreeContext,
477) -> Option<CFRetained<CFTree>> {
478 extern "C-unwind" {
479 fn CFTreeCreate(
480 allocator: Option<&CFAllocator>,
481 context: *const CFTreeContext,
482 ) -> Option<NonNull<CFTree>>;
483 }
484 let ret = unsafe { CFTreeCreate(allocator, context) };
485 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
486}
487
488#[deprecated = "renamed to `CFTree::parent`"]
489#[inline]
490pub unsafe extern "C-unwind" fn CFTreeGetParent(tree: &CFTree) -> Option<CFRetained<CFTree>> {
491 extern "C-unwind" {
492 fn CFTreeGetParent(tree: &CFTree) -> Option<NonNull<CFTree>>;
493 }
494 let ret = unsafe { CFTreeGetParent(tree) };
495 ret.map(|ret| unsafe { CFRetained::retain(ret) })
496}
497
498#[deprecated = "renamed to `CFTree::next_sibling`"]
499#[inline]
500pub unsafe extern "C-unwind" fn CFTreeGetNextSibling(tree: &CFTree) -> Option<CFRetained<CFTree>> {
501 extern "C-unwind" {
502 fn CFTreeGetNextSibling(tree: &CFTree) -> Option<NonNull<CFTree>>;
503 }
504 let ret = unsafe { CFTreeGetNextSibling(tree) };
505 ret.map(|ret| unsafe { CFRetained::retain(ret) })
506}
507
508#[deprecated = "renamed to `CFTree::first_child`"]
509#[inline]
510pub unsafe extern "C-unwind" fn CFTreeGetFirstChild(tree: &CFTree) -> Option<CFRetained<CFTree>> {
511 extern "C-unwind" {
512 fn CFTreeGetFirstChild(tree: &CFTree) -> Option<NonNull<CFTree>>;
513 }
514 let ret = unsafe { CFTreeGetFirstChild(tree) };
515 ret.map(|ret| unsafe { CFRetained::retain(ret) })
516}
517
518extern "C-unwind" {
519 #[deprecated = "renamed to `CFTree::context`"]
520 pub fn CFTreeGetContext(tree: &CFTree, context: *mut CFTreeContext);
521}
522
523extern "C-unwind" {
524 #[deprecated = "renamed to `CFTree::child_count`"]
525 pub fn CFTreeGetChildCount(tree: &CFTree) -> CFIndex;
526}
527
528#[deprecated = "renamed to `CFTree::child_at_index`"]
529#[inline]
530pub unsafe extern "C-unwind" fn CFTreeGetChildAtIndex(
531 tree: &CFTree,
532 idx: CFIndex,
533) -> Option<CFRetained<CFTree>> {
534 extern "C-unwind" {
535 fn CFTreeGetChildAtIndex(tree: &CFTree, idx: CFIndex) -> Option<NonNull<CFTree>>;
536 }
537 let ret = unsafe { CFTreeGetChildAtIndex(tree, idx) };
538 ret.map(|ret| unsafe { CFRetained::retain(ret) })
539}
540
541extern "C-unwind" {
542 #[deprecated = "renamed to `CFTree::children`"]
543 pub fn CFTreeGetChildren(tree: &CFTree, children: *mut *mut CFTree);
544}
545
546extern "C-unwind" {
547 #[deprecated = "renamed to `CFTree::apply_function_to_children`"]
548 pub fn CFTreeApplyFunctionToChildren(
549 tree: &CFTree,
550 applier: CFTreeApplierFunction,
551 context: *mut c_void,
552 );
553}
554
555#[deprecated = "renamed to `CFTree::find_root`"]
556#[inline]
557pub unsafe extern "C-unwind" fn CFTreeFindRoot(tree: &CFTree) -> Option<CFRetained<CFTree>> {
558 extern "C-unwind" {
559 fn CFTreeFindRoot(tree: &CFTree) -> Option<NonNull<CFTree>>;
560 }
561 let ret = unsafe { CFTreeFindRoot(tree) };
562 ret.map(|ret| unsafe { CFRetained::retain(ret) })
563}
564
565extern "C-unwind" {
566 #[deprecated = "renamed to `CFTree::set_context`"]
567 pub fn CFTreeSetContext(tree: &CFTree, context: *const CFTreeContext);
568}
569
570extern "C-unwind" {
571 #[deprecated = "renamed to `CFTree::prepend_child`"]
572 pub fn CFTreePrependChild(tree: &CFTree, new_child: Option<&CFTree>);
573}
574
575extern "C-unwind" {
576 #[deprecated = "renamed to `CFTree::append_child`"]
577 pub fn CFTreeAppendChild(tree: &CFTree, new_child: Option<&CFTree>);
578}
579
580extern "C-unwind" {
581 #[deprecated = "renamed to `CFTree::insert_sibling`"]
582 pub fn CFTreeInsertSibling(tree: &CFTree, new_sibling: Option<&CFTree>);
583}
584
585extern "C-unwind" {
586 #[deprecated = "renamed to `CFTree::remove`"]
587 pub fn CFTreeRemove(tree: &CFTree);
588}
589
590extern "C-unwind" {
591 #[deprecated = "renamed to `CFTree::remove_all_children`"]
592 pub fn CFTreeRemoveAllChildren(tree: &CFTree);
593}
594
595extern "C-unwind" {
596 #[deprecated = "renamed to `CFTree::sort_children`"]
597 pub fn CFTreeSortChildren(
598 tree: &CFTree,
599 comparator: CFComparatorFunction,
600 context: *mut c_void,
601 );
602}