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