objc2-browser-engine-kit 0.3.2

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

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/beautofilltextsuggestion?language=objc)
    #[unsafe(super(BETextSuggestion, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "BETextSuggestion")]
    pub struct BEAutoFillTextSuggestion;
);

#[cfg(feature = "BETextSuggestion")]
extern_conformance!(
    unsafe impl NSObjectProtocol for BEAutoFillTextSuggestion {}
);

#[cfg(feature = "BETextSuggestion")]
impl BEAutoFillTextSuggestion {
    extern_methods!(
        /// Mapping of UITextContentType to String for AutoFill insertion values
        #[unsafe(method(contents))]
        #[unsafe(method_family = none)]
        pub unsafe fn contents(&self) -> Retained<NSDictionary<UITextContentType, NSString>>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(&self) -> Retained<Self>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `BETextSuggestion`.
#[cfg(feature = "BETextSuggestion")]
impl BEAutoFillTextSuggestion {
    extern_methods!(
        /// Initializes a new text suggestion with the given input text.
        #[unsafe(method(initWithInputText:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithInputText(
            this: Allocated<Self>,
            input_text: &NSString,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "BETextSuggestion")]
impl BEAutoFillTextSuggestion {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new_class() -> Retained<Self>;
    );
}