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 UIInputViewStyle(pub NSInteger);
impl UIInputViewStyle {
#[doc(alias = "UIInputViewStyleDefault")]
pub const Default: Self = Self(0);
#[doc(alias = "UIInputViewStyleKeyboard")]
pub const Keyboard: Self = Self(1);
}
unsafe impl Encode for UIInputViewStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UIInputViewStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(UIView, UIResponder, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
pub struct UIInputView;
);
#[cfg(all(
feature = "UIResponder",
feature = "UIView",
feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl CALayerDelegate for UIInputView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSCoding for UIInputView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UIInputView {}
);
#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIAppearance for UIInputView {}
);
#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UIInputView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UICoordinateSpace for UIInputView {}
);
#[cfg(all(
feature = "UIDynamicBehavior",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIDynamicItem for UIInputView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UIInputView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusItem for UIInputView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusItemContainer for UIInputView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UIInputView {}
);
#[cfg(all(
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UIInputView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIInputView {
extern_methods!(
#[unsafe(method(inputViewStyle))]
#[unsafe(method_family = none)]
pub fn inputViewStyle(&self) -> UIInputViewStyle;
#[unsafe(method(allowsSelfSizing))]
#[unsafe(method_family = none)]
pub fn allowsSelfSizing(&self) -> bool;
#[unsafe(method(setAllowsSelfSizing:))]
#[unsafe(method_family = none)]
pub fn setAllowsSelfSizing(&self, allows_self_sizing: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithFrame:inputViewStyle:))]
#[unsafe(method_family = init)]
pub fn initWithFrame_inputViewStyle(
this: Allocated<Self>,
frame: CGRect,
input_view_style: UIInputViewStyle,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIInputView {
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(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIInputView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}