objc2_app_kit/generated/
NSPredicateEditorRowTemplate.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-data")]
7#[cfg(target_vendor = "apple")]
8use objc2_core_data::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct NSPredicateEditorRowTemplate;
18);
19
20unsafe impl NSCoding for NSPredicateEditorRowTemplate {}
21
22unsafe impl NSCopying for NSPredicateEditorRowTemplate {}
23
24unsafe impl CopyingHelper for NSPredicateEditorRowTemplate {
25 type Result = Self;
26}
27
28unsafe impl NSObjectProtocol for NSPredicateEditorRowTemplate {}
29
30impl NSPredicateEditorRowTemplate {
31 extern_methods!(
32 #[unsafe(method(matchForPredicate:))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn matchForPredicate(&self, predicate: &NSPredicate) -> c_double;
35
36 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
37 #[unsafe(method(templateViews))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn templateViews(&self, mtm: MainThreadMarker) -> Retained<NSArray<NSView>>;
40
41 #[unsafe(method(setPredicate:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setPredicate(&self, predicate: &NSPredicate);
44
45 #[unsafe(method(predicateWithSubpredicates:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn predicateWithSubpredicates(
48 &self,
49 subpredicates: Option<&NSArray<NSPredicate>>,
50 ) -> Retained<NSPredicate>;
51
52 #[unsafe(method(displayableSubpredicatesOfPredicate:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn displayableSubpredicatesOfPredicate(
55 &self,
56 predicate: &NSPredicate,
57 ) -> Option<Retained<NSArray<NSPredicate>>>;
58
59 #[unsafe(method(initWithLeftExpressions:rightExpressions:modifier:operators:options:))]
60 #[unsafe(method_family = init)]
61 pub unsafe fn initWithLeftExpressions_rightExpressions_modifier_operators_options(
62 this: Allocated<Self>,
63 left_expressions: &NSArray<NSExpression>,
64 right_expressions: &NSArray<NSExpression>,
65 modifier: NSComparisonPredicateModifier,
66 operators: &NSArray<NSNumber>,
67 options: NSUInteger,
68 ) -> Retained<Self>;
69
70 #[cfg(feature = "objc2-core-data")]
71 #[cfg(target_vendor = "apple")]
72 #[unsafe(method(initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:))]
73 #[unsafe(method_family = init)]
74 pub unsafe fn initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options(
75 this: Allocated<Self>,
76 left_expressions: &NSArray<NSExpression>,
77 attribute_type: NSAttributeType,
78 modifier: NSComparisonPredicateModifier,
79 operators: &NSArray<NSNumber>,
80 options: NSUInteger,
81 ) -> Retained<Self>;
82
83 #[unsafe(method(initWithCompoundTypes:))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn initWithCompoundTypes(
86 this: Allocated<Self>,
87 compound_types: &NSArray<NSNumber>,
88 ) -> Retained<Self>;
89
90 #[unsafe(method(leftExpressions))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn leftExpressions(&self) -> Option<Retained<NSArray<NSExpression>>>;
93
94 #[unsafe(method(rightExpressions))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn rightExpressions(&self) -> Option<Retained<NSArray<NSExpression>>>;
97
98 #[cfg(feature = "objc2-core-data")]
99 #[cfg(target_vendor = "apple")]
100 #[unsafe(method(rightExpressionAttributeType))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn rightExpressionAttributeType(&self) -> NSAttributeType;
103
104 #[unsafe(method(modifier))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn modifier(&self) -> NSComparisonPredicateModifier;
107
108 #[unsafe(method(operators))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn operators(&self) -> Option<Retained<NSArray<NSNumber>>>;
111
112 #[unsafe(method(options))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn options(&self) -> NSUInteger;
115
116 #[unsafe(method(compoundTypes))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn compoundTypes(&self) -> Option<Retained<NSArray<NSNumber>>>;
119
120 #[cfg(feature = "objc2-core-data")]
121 #[cfg(target_vendor = "apple")]
122 #[unsafe(method(templatesWithAttributeKeyPaths:inEntityDescription:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn templatesWithAttributeKeyPaths_inEntityDescription(
125 key_paths: &NSArray<NSString>,
126 entity_description: &NSEntityDescription,
127 ) -> Retained<NSArray<NSPredicateEditorRowTemplate>>;
128 );
129}
130
131impl NSPredicateEditorRowTemplate {
133 extern_methods!(
134 #[unsafe(method(init))]
135 #[unsafe(method_family = init)]
136 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
137
138 #[unsafe(method(new))]
139 #[unsafe(method_family = new)]
140 pub unsafe fn new() -> Retained<Self>;
141 );
142}