use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
use objc2_quartz_core::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextBorderStyle(pub NSInteger);
impl UITextBorderStyle {
#[doc(alias = "UITextBorderStyleNone")]
pub const None: Self = Self(0);
#[doc(alias = "UITextBorderStyleLine")]
pub const Line: Self = Self(1);
#[doc(alias = "UITextBorderStyleBezel")]
pub const Bezel: Self = Self(2);
#[doc(alias = "UITextBorderStyleRoundedRect")]
pub const RoundedRect: Self = Self(3);
}
unsafe impl Encode for UITextBorderStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITextBorderStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextFieldViewMode(pub NSInteger);
impl UITextFieldViewMode {
#[doc(alias = "UITextFieldViewModeNever")]
pub const Never: Self = Self(0);
#[doc(alias = "UITextFieldViewModeWhileEditing")]
pub const WhileEditing: Self = Self(1);
#[doc(alias = "UITextFieldViewModeUnlessEditing")]
pub const UnlessEditing: Self = Self(2);
#[doc(alias = "UITextFieldViewModeAlways")]
pub const Always: Self = Self(3);
}
unsafe impl Encode for UITextFieldViewMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITextFieldViewMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextFieldDidEndEditingReason(pub NSInteger);
impl UITextFieldDidEndEditingReason {
#[doc(alias = "UITextFieldDidEndEditingReasonCommitted")]
pub const Committed: Self = Self(0);
#[doc(alias = "UITextFieldDidEndEditingReasonCancelled")]
pub const Cancelled: Self = Self(1);
}
unsafe impl Encode for UITextFieldDidEndEditingReason {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITextFieldDidEndEditingReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(UIControl, UIView, UIResponder, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
pub struct UITextField;
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UIView",
feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl CALayerDelegate for UITextField {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSCoding for UITextField {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UITextField {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIControl",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIAppearance for UITextField {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIControl",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UITextField {}
);
#[cfg(all(
feature = "UIContentSizeCategoryAdjusting",
feature = "UIControl",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIContentSizeCategoryAdjusting for UITextField {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UICoordinateSpace for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIDynamicBehavior",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIDynamicItem for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusItem for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusItemContainer for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UITextInput",
feature = "UITextInputTraits",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIKeyInput for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UILetterformAwareAdjusting",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UILetterformAwareAdjusting for UITextField {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UITextInput",
feature = "UITextInputTraits",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITextInput for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UITextInputTraits",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITextInputTraits for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UITextField {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UITextField {
extern_methods!(
#[unsafe(method(text))]
#[unsafe(method_family = none)]
pub fn text(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setText:))]
#[unsafe(method_family = none)]
pub fn setText(&self, text: Option<&NSString>);
#[unsafe(method(attributedText))]
#[unsafe(method_family = none)]
pub fn attributedText(&self) -> Option<Retained<NSAttributedString>>;
#[unsafe(method(setAttributedText:))]
#[unsafe(method_family = none)]
pub fn setAttributedText(&self, attributed_text: Option<&NSAttributedString>);
#[cfg(feature = "UIColor")]
#[unsafe(method(textColor))]
#[unsafe(method_family = none)]
pub fn textColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setTextColor:))]
#[unsafe(method_family = none)]
pub fn setTextColor(&self, text_color: Option<&UIColor>);
#[cfg(feature = "UIFont")]
#[unsafe(method(font))]
#[unsafe(method_family = none)]
pub fn font(&self) -> Option<Retained<UIFont>>;
#[cfg(feature = "UIFont")]
#[unsafe(method(setFont:))]
#[unsafe(method_family = none)]
pub fn setFont(&self, font: Option<&UIFont>);
#[cfg(feature = "NSText")]
#[unsafe(method(textAlignment))]
#[unsafe(method_family = none)]
pub fn textAlignment(&self) -> NSTextAlignment;
#[cfg(feature = "NSText")]
#[unsafe(method(setTextAlignment:))]
#[unsafe(method_family = none)]
pub fn setTextAlignment(&self, text_alignment: NSTextAlignment);
#[unsafe(method(borderStyle))]
#[unsafe(method_family = none)]
pub fn borderStyle(&self) -> UITextBorderStyle;
#[unsafe(method(setBorderStyle:))]
#[unsafe(method_family = none)]
pub fn setBorderStyle(&self, border_style: UITextBorderStyle);
#[unsafe(method(defaultTextAttributes))]
#[unsafe(method_family = none)]
pub fn defaultTextAttributes(
&self,
) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[unsafe(method(setDefaultTextAttributes:))]
#[unsafe(method_family = none)]
pub unsafe fn setDefaultTextAttributes(
&self,
default_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
);
#[unsafe(method(placeholder))]
#[unsafe(method_family = none)]
pub fn placeholder(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setPlaceholder:))]
#[unsafe(method_family = none)]
pub fn setPlaceholder(&self, placeholder: Option<&NSString>);
#[unsafe(method(attributedPlaceholder))]
#[unsafe(method_family = none)]
pub fn attributedPlaceholder(&self) -> Option<Retained<NSAttributedString>>;
#[unsafe(method(setAttributedPlaceholder:))]
#[unsafe(method_family = none)]
pub fn setAttributedPlaceholder(&self, attributed_placeholder: Option<&NSAttributedString>);
#[unsafe(method(clearsOnBeginEditing))]
#[unsafe(method_family = none)]
pub fn clearsOnBeginEditing(&self) -> bool;
#[unsafe(method(setClearsOnBeginEditing:))]
#[unsafe(method_family = none)]
pub fn setClearsOnBeginEditing(&self, clears_on_begin_editing: bool);
#[unsafe(method(adjustsFontSizeToFitWidth))]
#[unsafe(method_family = none)]
pub fn adjustsFontSizeToFitWidth(&self) -> bool;
#[unsafe(method(setAdjustsFontSizeToFitWidth:))]
#[unsafe(method_family = none)]
pub fn setAdjustsFontSizeToFitWidth(&self, adjusts_font_size_to_fit_width: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(minimumFontSize))]
#[unsafe(method_family = none)]
pub fn minimumFontSize(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setMinimumFontSize:))]
#[unsafe(method_family = none)]
pub fn setMinimumFontSize(&self, minimum_font_size: CGFloat);
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub fn delegate(&self) -> Option<Retained<ProtocolObject<dyn UITextFieldDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn UITextFieldDelegate>>);
#[cfg(feature = "UIImage")]
#[unsafe(method(background))]
#[unsafe(method_family = none)]
pub fn background(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setBackground:))]
#[unsafe(method_family = none)]
pub fn setBackground(&self, background: Option<&UIImage>);
#[cfg(feature = "UIImage")]
#[unsafe(method(disabledBackground))]
#[unsafe(method_family = none)]
pub fn disabledBackground(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setDisabledBackground:))]
#[unsafe(method_family = none)]
pub fn setDisabledBackground(&self, disabled_background: Option<&UIImage>);
#[unsafe(method(isEditing))]
#[unsafe(method_family = none)]
pub fn isEditing(&self) -> bool;
#[unsafe(method(allowsEditingTextAttributes))]
#[unsafe(method_family = none)]
pub fn allowsEditingTextAttributes(&self) -> bool;
#[unsafe(method(setAllowsEditingTextAttributes:))]
#[unsafe(method_family = none)]
pub fn setAllowsEditingTextAttributes(&self, allows_editing_text_attributes: bool);
#[unsafe(method(typingAttributes))]
#[unsafe(method_family = none)]
pub fn typingAttributes(
&self,
) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>;
#[unsafe(method(setTypingAttributes:))]
#[unsafe(method_family = none)]
pub unsafe fn setTypingAttributes(
&self,
typing_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
);
#[unsafe(method(clearButtonMode))]
#[unsafe(method_family = none)]
pub fn clearButtonMode(&self) -> UITextFieldViewMode;
#[unsafe(method(setClearButtonMode:))]
#[unsafe(method_family = none)]
pub fn setClearButtonMode(&self, clear_button_mode: UITextFieldViewMode);
#[unsafe(method(leftView))]
#[unsafe(method_family = none)]
pub fn leftView(&self) -> Option<Retained<UIView>>;
#[unsafe(method(setLeftView:))]
#[unsafe(method_family = none)]
pub fn setLeftView(&self, left_view: Option<&UIView>);
#[unsafe(method(leftViewMode))]
#[unsafe(method_family = none)]
pub fn leftViewMode(&self) -> UITextFieldViewMode;
#[unsafe(method(setLeftViewMode:))]
#[unsafe(method_family = none)]
pub fn setLeftViewMode(&self, left_view_mode: UITextFieldViewMode);
#[unsafe(method(rightView))]
#[unsafe(method_family = none)]
pub fn rightView(&self) -> Option<Retained<UIView>>;
#[unsafe(method(setRightView:))]
#[unsafe(method_family = none)]
pub fn setRightView(&self, right_view: Option<&UIView>);
#[unsafe(method(rightViewMode))]
#[unsafe(method_family = none)]
pub fn rightViewMode(&self) -> UITextFieldViewMode;
#[unsafe(method(setRightViewMode:))]
#[unsafe(method_family = none)]
pub fn setRightViewMode(&self, right_view_mode: UITextFieldViewMode);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(borderRectForBounds:))]
#[unsafe(method_family = none)]
pub fn borderRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(textRectForBounds:))]
#[unsafe(method_family = none)]
pub fn textRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(placeholderRectForBounds:))]
#[unsafe(method_family = none)]
pub fn placeholderRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(editingRectForBounds:))]
#[unsafe(method_family = none)]
pub fn editingRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(clearButtonRectForBounds:))]
#[unsafe(method_family = none)]
pub fn clearButtonRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(leftViewRectForBounds:))]
#[unsafe(method_family = none)]
pub fn leftViewRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(rightViewRectForBounds:))]
#[unsafe(method_family = none)]
pub fn rightViewRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[deprecated = "This method is no longer called."]
#[unsafe(method(drawTextInRect:))]
#[unsafe(method_family = none)]
pub fn drawTextInRect(&self, rect: CGRect);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(drawPlaceholderInRect:))]
#[unsafe(method_family = none)]
pub fn drawPlaceholderInRect(&self, rect: CGRect);
#[unsafe(method(inputView))]
#[unsafe(method_family = none)]
pub fn inputView(&self) -> Option<Retained<UIView>>;
#[unsafe(method(setInputView:))]
#[unsafe(method_family = none)]
pub fn setInputView(&self, input_view: Option<&UIView>);
#[unsafe(method(inputAccessoryView))]
#[unsafe(method_family = none)]
pub fn inputAccessoryView(&self) -> Option<Retained<UIView>>;
#[unsafe(method(setInputAccessoryView:))]
#[unsafe(method_family = none)]
pub fn setInputAccessoryView(&self, input_accessory_view: Option<&UIView>);
#[unsafe(method(clearsOnInsertion))]
#[unsafe(method_family = none)]
pub fn clearsOnInsertion(&self) -> bool;
#[unsafe(method(setClearsOnInsertion:))]
#[unsafe(method_family = none)]
pub fn setClearsOnInsertion(&self, clears_on_insertion: bool);
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UITextField {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[cfg(all(
feature = "UIAction",
feature = "UIMenuElement",
feature = "objc2-core-foundation"
))]
#[unsafe(method(initWithFrame:primaryAction:))]
#[unsafe(method_family = init)]
pub fn initWithFrame_primaryAction(
this: Allocated<Self>,
frame: CGRect,
primary_action: Option<&UIAction>,
) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UITextField {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UITextField {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UITextField {
extern_methods!();
}
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UITextDragging",
feature = "UITextInput",
feature = "UITextInputTraits",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITextDraggable for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIPasteConfigurationSupporting",
feature = "UIResponder",
feature = "UITextDropping",
feature = "UITextInput",
feature = "UITextInputTraits",
feature = "UITextPasteConfigurationSupporting",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITextDroppable for UITextField {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIPasteConfigurationSupporting",
feature = "UIResponder",
feature = "UITextPasteConfigurationSupporting",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITextPasteConfigurationSupporting for UITextField {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UITextField {
extern_methods!(
#[unsafe(method(interactionState))]
#[unsafe(method_family = none)]
pub fn interactionState(&self) -> Retained<AnyObject>;
#[unsafe(method(setInteractionState:))]
#[unsafe(method_family = none)]
pub unsafe fn setInteractionState(&self, interaction_state: &AnyObject);
);
}
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIView {
extern_methods!(
#[unsafe(method(endEditing:))]
#[unsafe(method_family = none)]
pub fn endEditing(&self, force: bool) -> bool;
);
}
extern_protocol!(
pub unsafe trait UITextFieldDelegate: NSObjectProtocol + MainThreadOnly {
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldShouldBeginEditing:))]
#[unsafe(method_family = none)]
fn textFieldShouldBeginEditing(&self, text_field: &UITextField) -> bool;
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldDidBeginEditing:))]
#[unsafe(method_family = none)]
fn textFieldDidBeginEditing(&self, text_field: &UITextField);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldShouldEndEditing:))]
#[unsafe(method_family = none)]
fn textFieldShouldEndEditing(&self, text_field: &UITextField) -> bool;
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldDidEndEditing:))]
#[unsafe(method_family = none)]
fn textFieldDidEndEditing(&self, text_field: &UITextField);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldDidEndEditing:reason:))]
#[unsafe(method_family = none)]
fn textFieldDidEndEditing_reason(
&self,
text_field: &UITextField,
reason: UITextFieldDidEndEditingReason,
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[deprecated]
#[optional]
#[unsafe(method(textField:shouldChangeCharactersInRange:replacementString:))]
#[unsafe(method_family = none)]
fn textField_shouldChangeCharactersInRange_replacementString(
&self,
text_field: &UITextField,
range: NSRange,
string: &NSString,
) -> bool;
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textField:shouldChangeCharactersInRanges:replacementString:))]
#[unsafe(method_family = none)]
fn textField_shouldChangeCharactersInRanges_replacementString(
&self,
text_field: &UITextField,
ranges: &NSArray<NSValue>,
string: &NSString,
) -> bool;
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldDidChangeSelection:))]
#[unsafe(method_family = none)]
fn textFieldDidChangeSelection(&self, text_field: &UITextField);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldShouldClear:))]
#[unsafe(method_family = none)]
fn textFieldShouldClear(&self, text_field: &UITextField) -> bool;
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[unsafe(method(textFieldShouldReturn:))]
#[unsafe(method_family = none)]
fn textFieldShouldReturn(&self, text_field: &UITextField) -> bool;
#[cfg(all(
feature = "UIControl",
feature = "UIMenu",
feature = "UIMenuElement",
feature = "UIResponder",
feature = "UIView"
))]
#[deprecated]
#[optional]
#[unsafe(method(textField:editMenuForCharactersInRange:suggestedActions:))]
#[unsafe(method_family = none)]
fn textField_editMenuForCharactersInRange_suggestedActions(
&self,
text_field: &UITextField,
range: NSRange,
suggested_actions: &NSArray<UIMenuElement>,
) -> Option<Retained<UIMenu>>;
#[cfg(all(
feature = "UIControl",
feature = "UIMenu",
feature = "UIMenuElement",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[unsafe(method(textField:editMenuForCharactersInRanges:suggestedActions:))]
#[unsafe(method_family = none)]
fn textField_editMenuForCharactersInRanges_suggestedActions(
&self,
text_field: &UITextField,
ranges: &NSArray<NSValue>,
suggested_actions: &NSArray<UIMenuElement>,
) -> Option<Retained<UIMenu>>;
#[cfg(all(
feature = "UIControl",
feature = "UIEditMenuInteraction",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[unsafe(method(textField:willPresentEditMenuWithAnimator:))]
#[unsafe(method_family = none)]
fn textField_willPresentEditMenuWithAnimator(
&self,
text_field: &UITextField,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
);
#[cfg(all(
feature = "UIControl",
feature = "UIEditMenuInteraction",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[unsafe(method(textField:willDismissEditMenuWithAnimator:))]
#[unsafe(method_family = none)]
fn textField_willDismissEditMenuWithAnimator(
&self,
text_field: &UITextField,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
);
#[cfg(all(
feature = "UIControl",
feature = "UIInputSuggestion",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[unsafe(method(textField:insertInputSuggestion:))]
#[unsafe(method_family = none)]
fn textField_insertInputSuggestion(
&self,
text_field: &UITextField,
input_suggestion: &UIInputSuggestion,
);
}
);
extern "C" {
pub static UITextFieldTextDidBeginEditingNotification: &'static NSNotificationName;
}
extern "C" {
pub static UITextFieldTextDidEndEditingNotification: &'static NSNotificationName;
}
extern "C" {
pub static UITextFieldTextDidChangeNotification: &'static NSNotificationName;
}
extern "C" {
pub static UITextFieldDidEndEditingReasonKey: &'static NSString;
}