objc2-ui-kit 0.3.2

Bindings to the UIKit 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/uikit/uipasteconfiguration?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIPasteConfiguration;
);

extern_conformance!(
    unsafe impl NSCoding for UIPasteConfiguration {}
);

extern_conformance!(
    unsafe impl NSCopying for UIPasteConfiguration {}
);

unsafe impl CopyingHelper for UIPasteConfiguration {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UIPasteConfiguration {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for UIPasteConfiguration {}
);

impl UIPasteConfiguration {
    extern_methods!(
        #[unsafe(method(acceptableTypeIdentifiers))]
        #[unsafe(method_family = none)]
        pub fn acceptableTypeIdentifiers(&self) -> Retained<NSArray<NSString>>;

        /// Setter for [`acceptableTypeIdentifiers`][Self::acceptableTypeIdentifiers].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setAcceptableTypeIdentifiers:))]
        #[unsafe(method_family = none)]
        pub fn setAcceptableTypeIdentifiers(&self, acceptable_type_identifiers: &NSArray<NSString>);

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

        #[unsafe(method(initWithAcceptableTypeIdentifiers:))]
        #[unsafe(method_family = init)]
        pub fn initWithAcceptableTypeIdentifiers(
            this: Allocated<Self>,
            acceptable_type_identifiers: &NSArray<NSString>,
        ) -> Retained<Self>;

        #[unsafe(method(addAcceptableTypeIdentifiers:))]
        #[unsafe(method_family = none)]
        pub fn addAcceptableTypeIdentifiers(&self, acceptable_type_identifiers: &NSArray<NSString>);

        /// # Safety
        ///
        /// `a_class` must implement NSItemProviderReading.
        #[unsafe(method(initWithTypeIdentifiersForAcceptingClass:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTypeIdentifiersForAcceptingClass(
            this: Allocated<Self>,
            a_class: &AnyClass,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `a_class` must implement NSItemProviderReading.
        #[unsafe(method(addTypeIdentifiersForAcceptingClass:))]
        #[unsafe(method_family = none)]
        pub unsafe fn addTypeIdentifiersForAcceptingClass(&self, a_class: &AnyClass);
    );
}

/// Methods declared on superclass `NSObject`.
impl UIPasteConfiguration {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}