objc2_app_kit/generated/
NSTreeNode.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct NSTreeNode;
15);
16
17unsafe impl NSObjectProtocol for NSTreeNode {}
18
19impl NSTreeNode {
20 extern_methods!(
21 #[unsafe(method(treeNodeWithRepresentedObject:))]
22 #[unsafe(method_family = none)]
23 pub unsafe fn treeNodeWithRepresentedObject(
24 model_object: Option<&AnyObject>,
25 ) -> Retained<Self>;
26
27 #[unsafe(method(initWithRepresentedObject:))]
28 #[unsafe(method_family = init)]
29 pub unsafe fn initWithRepresentedObject(
30 this: Allocated<Self>,
31 model_object: Option<&AnyObject>,
32 ) -> Retained<Self>;
33
34 #[unsafe(method(representedObject))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn representedObject(&self) -> Option<Retained<AnyObject>>;
37
38 #[unsafe(method(indexPath))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn indexPath(&self) -> Retained<NSIndexPath>;
41
42 #[unsafe(method(isLeaf))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn isLeaf(&self) -> bool;
45
46 #[unsafe(method(childNodes))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn childNodes(&self) -> Option<Retained<NSArray<NSTreeNode>>>;
49
50 #[unsafe(method(mutableChildNodes))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn mutableChildNodes(&self) -> Retained<NSMutableArray<NSTreeNode>>;
53
54 #[unsafe(method(descendantNodeAtIndexPath:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn descendantNodeAtIndexPath(
57 &self,
58 index_path: &NSIndexPath,
59 ) -> Option<Retained<NSTreeNode>>;
60
61 #[unsafe(method(parentNode))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn parentNode(&self) -> Option<Retained<NSTreeNode>>;
64
65 #[unsafe(method(sortWithSortDescriptors:recursively:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn sortWithSortDescriptors_recursively(
68 &self,
69 sort_descriptors: &NSArray<NSSortDescriptor>,
70 recursively: bool,
71 );
72 );
73}
74
75impl NSTreeNode {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new() -> Retained<Self>;
85 );
86}