objc2-app-kit 0.3.2

Bindings to the AppKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspredicateeditor?language=objc)
    #[unsafe(super(NSRuleEditor, NSControl, NSView, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(
        feature = "NSControl",
        feature = "NSResponder",
        feature = "NSRuleEditor",
        feature = "NSView"
    ))]
    pub struct NSPredicateEditor;
);

#[cfg(all(
    feature = "NSAccessibilityProtocols",
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSAccessibility for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSAccessibilityProtocols",
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSAccessibilityElementProtocol for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSAnimation",
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSAnimatablePropertyContainer for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSAppearance",
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSAppearanceCustomization for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSCoding for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSControl",
    feature = "NSDragging",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSDraggingDestination for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSUserInterfaceItemIdentification",
    feature = "NSView"
))]
extern_conformance!(
    unsafe impl NSUserInterfaceItemIdentification for NSPredicateEditor {}
);

#[cfg(all(
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
impl NSPredicateEditor {
    extern_methods!(
        #[cfg(feature = "NSPredicateEditorRowTemplate")]
        #[unsafe(method(rowTemplates))]
        #[unsafe(method_family = none)]
        pub fn rowTemplates(&self) -> Retained<NSArray<NSPredicateEditorRowTemplate>>;

        #[cfg(feature = "NSPredicateEditorRowTemplate")]
        /// Setter for [`rowTemplates`][Self::rowTemplates].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setRowTemplates:))]
        #[unsafe(method_family = none)]
        pub fn setRowTemplates(&self, row_templates: &NSArray<NSPredicateEditorRowTemplate>);
    );
}

/// Methods declared on superclass `NSControl`.
#[cfg(all(
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
impl NSPredicateEditor {
    extern_methods!(
        #[unsafe(method(initWithFrame:))]
        #[unsafe(method_family = init)]
        pub fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSResponder`.
#[cfg(all(
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
impl NSPredicateEditor {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(
    feature = "NSControl",
    feature = "NSResponder",
    feature = "NSRuleEditor",
    feature = "NSView"
))]
impl NSPredicateEditor {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}