1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-data")]
#[cfg(target_vendor = "apple")]
use objc2_core_data::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSPredicateEditorRowTemplate;

    unsafe impl ClassType for NSPredicateEditorRowTemplate {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCoding for NSPredicateEditorRowTemplate {}

unsafe impl NSCopying for NSPredicateEditorRowTemplate {}

unsafe impl NSObjectProtocol for NSPredicateEditorRowTemplate {}

extern_methods!(
    unsafe impl NSPredicateEditorRowTemplate {
        #[method(matchForPredicate:)]
        pub unsafe fn matchForPredicate(&self, predicate: &NSPredicate) -> c_double;

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[method_id(@__retain_semantics Other templateViews)]
        pub unsafe fn templateViews(&self, mtm: MainThreadMarker) -> Retained<NSArray<NSView>>;

        #[method(setPredicate:)]
        pub unsafe fn setPredicate(&self, predicate: &NSPredicate);

        #[method_id(@__retain_semantics Other predicateWithSubpredicates:)]
        pub unsafe fn predicateWithSubpredicates(
            &self,
            subpredicates: Option<&NSArray<NSPredicate>>,
        ) -> Retained<NSPredicate>;

        #[method_id(@__retain_semantics Other displayableSubpredicatesOfPredicate:)]
        pub unsafe fn displayableSubpredicatesOfPredicate(
            &self,
            predicate: &NSPredicate,
        ) -> Option<Retained<NSArray<NSPredicate>>>;

        #[method_id(@__retain_semantics Init initWithLeftExpressions:rightExpressions:modifier:operators:options:)]
        pub unsafe fn initWithLeftExpressions_rightExpressions_modifier_operators_options(
            this: Allocated<Self>,
            left_expressions: &NSArray<NSExpression>,
            right_expressions: &NSArray<NSExpression>,
            modifier: NSComparisonPredicateModifier,
            operators: &NSArray<NSNumber>,
            options: NSUInteger,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-core-data")]
        #[cfg(target_vendor = "apple")]
        #[method_id(@__retain_semantics Init initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:)]
        pub unsafe fn initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options(
            this: Allocated<Self>,
            left_expressions: &NSArray<NSExpression>,
            attribute_type: NSAttributeType,
            modifier: NSComparisonPredicateModifier,
            operators: &NSArray<NSNumber>,
            options: NSUInteger,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithCompoundTypes:)]
        pub unsafe fn initWithCompoundTypes(
            this: Allocated<Self>,
            compound_types: &NSArray<NSNumber>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other leftExpressions)]
        pub unsafe fn leftExpressions(&self) -> Option<Retained<NSArray<NSExpression>>>;

        #[method_id(@__retain_semantics Other rightExpressions)]
        pub unsafe fn rightExpressions(&self) -> Option<Retained<NSArray<NSExpression>>>;

        #[cfg(feature = "objc2-core-data")]
        #[cfg(target_vendor = "apple")]
        #[method(rightExpressionAttributeType)]
        pub unsafe fn rightExpressionAttributeType(&self) -> NSAttributeType;

        #[method(modifier)]
        pub unsafe fn modifier(&self) -> NSComparisonPredicateModifier;

        #[method_id(@__retain_semantics Other operators)]
        pub unsafe fn operators(&self) -> Option<Retained<NSArray<NSNumber>>>;

        #[method(options)]
        pub unsafe fn options(&self) -> NSUInteger;

        #[method_id(@__retain_semantics Other compoundTypes)]
        pub unsafe fn compoundTypes(&self) -> Option<Retained<NSArray<NSNumber>>>;

        #[cfg(feature = "objc2-core-data")]
        #[cfg(target_vendor = "apple")]
        #[method_id(@__retain_semantics Other templatesWithAttributeKeyPaths:inEntityDescription:)]
        pub unsafe fn templatesWithAttributeKeyPaths_inEntityDescription(
            key_paths: &NSArray<NSString>,
            entity_description: &NSEntityDescription,
        ) -> Retained<NSArray<NSPredicateEditorRowTemplate>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSPredicateEditorRowTemplate {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);