use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait UITextPasteDelegate: NSObjectProtocol + MainThreadOnly {
#[cfg(all(
feature = "UIPasteConfigurationSupporting",
feature = "UITextPasteConfigurationSupporting"
))]
#[optional]
#[unsafe(method(textPasteConfigurationSupporting:transformPasteItem:))]
#[unsafe(method_family = none)]
fn textPasteConfigurationSupporting_transformPasteItem(
&self,
text_paste_configuration_supporting: &ProtocolObject<
dyn UITextPasteConfigurationSupporting,
>,
item: &ProtocolObject<dyn UITextPasteItem>,
);
#[cfg(all(
feature = "UIPasteConfigurationSupporting",
feature = "UITextInput",
feature = "UITextPasteConfigurationSupporting"
))]
#[optional]
#[unsafe(method(textPasteConfigurationSupporting:combineItemAttributedStrings:forRange:))]
#[unsafe(method_family = none)]
fn textPasteConfigurationSupporting_combineItemAttributedStrings_forRange(
&self,
text_paste_configuration_supporting: &ProtocolObject<
dyn UITextPasteConfigurationSupporting,
>,
item_strings: &NSArray<NSAttributedString>,
text_range: &UITextRange,
) -> Retained<NSAttributedString>;
#[cfg(all(
feature = "UIPasteConfigurationSupporting",
feature = "UITextInput",
feature = "UITextPasteConfigurationSupporting"
))]
#[optional]
#[unsafe(method(textPasteConfigurationSupporting:performPasteOfAttributedString:toRange:))]
#[unsafe(method_family = none)]
fn textPasteConfigurationSupporting_performPasteOfAttributedString_toRange(
&self,
text_paste_configuration_supporting: &ProtocolObject<
dyn UITextPasteConfigurationSupporting,
>,
attributed_string: &NSAttributedString,
text_range: &UITextRange,
) -> Retained<UITextRange>;
#[cfg(all(
feature = "UIPasteConfigurationSupporting",
feature = "UITextInput",
feature = "UITextPasteConfigurationSupporting"
))]
#[optional]
#[unsafe(method(textPasteConfigurationSupporting:shouldAnimatePasteOfAttributedString:toRange:))]
#[unsafe(method_family = none)]
fn textPasteConfigurationSupporting_shouldAnimatePasteOfAttributedString_toRange(
&self,
text_paste_configuration_supporting: &ProtocolObject<
dyn UITextPasteConfigurationSupporting,
>,
attributed_string: &NSAttributedString,
text_range: &UITextRange,
) -> bool;
}
);
extern_protocol!(
pub unsafe trait UITextPasteItem: NSObjectProtocol + MainThreadOnly {
#[unsafe(method(itemProvider))]
#[unsafe(method_family = none)]
fn itemProvider(&self) -> Retained<NSItemProvider>;
#[unsafe(method(localObject))]
#[unsafe(method_family = none)]
fn localObject(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(defaultAttributes))]
#[unsafe(method_family = none)]
fn defaultAttributes(&self) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[unsafe(method(setStringResult:))]
#[unsafe(method_family = none)]
fn setStringResult(&self, string: &NSString);
#[unsafe(method(setAttributedStringResult:))]
#[unsafe(method_family = none)]
fn setAttributedStringResult(&self, string: &NSAttributedString);
#[cfg(feature = "NSTextAttachment")]
#[unsafe(method(setAttachmentResult:))]
#[unsafe(method_family = none)]
fn setAttachmentResult(&self, text_attachment: &NSTextAttachment);
#[unsafe(method(setNoResult))]
#[unsafe(method_family = none)]
fn setNoResult(&self);
#[unsafe(method(setDefaultResult))]
#[unsafe(method_family = none)]
fn setDefaultResult(&self);
}
);