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 UIPasteControlDisplayMode(pub NSUInteger);
impl UIPasteControlDisplayMode {
#[doc(alias = "UIPasteControlDisplayModeIconAndLabel")]
pub const IconAndLabel: Self = Self(0);
#[doc(alias = "UIPasteControlDisplayModeIconOnly")]
pub const IconOnly: Self = Self(1);
#[doc(alias = "UIPasteControlDisplayModeLabelOnly")]
pub const LabelOnly: Self = Self(2);
#[doc(alias = "UIPasteControlDisplayModeArrowAndLabel")]
pub const ArrowAndLabel: Self = Self(3);
}
unsafe impl Encode for UIPasteControlDisplayMode {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for UIPasteControlDisplayMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIPasteControlConfiguration;
);
extern_conformance!(
unsafe impl NSCoding for UIPasteControlConfiguration {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIPasteControlConfiguration {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UIPasteControlConfiguration {}
);
impl UIPasteControlConfiguration {
extern_methods!(
#[unsafe(method(displayMode))]
#[unsafe(method_family = none)]
pub fn displayMode(&self) -> UIPasteControlDisplayMode;
#[unsafe(method(setDisplayMode:))]
#[unsafe(method_family = none)]
pub fn setDisplayMode(&self, display_mode: UIPasteControlDisplayMode);
#[cfg(feature = "UIButtonConfiguration")]
#[unsafe(method(cornerStyle))]
#[unsafe(method_family = none)]
pub fn cornerStyle(&self) -> UIButtonConfigurationCornerStyle;
#[cfg(feature = "UIButtonConfiguration")]
#[unsafe(method(setCornerStyle:))]
#[unsafe(method_family = none)]
pub fn setCornerStyle(&self, corner_style: UIButtonConfigurationCornerStyle);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(cornerRadius))]
#[unsafe(method_family = none)]
pub fn cornerRadius(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setCornerRadius:))]
#[unsafe(method_family = none)]
pub fn setCornerRadius(&self, corner_radius: CGFloat);
#[cfg(feature = "UIGeometry")]
#[unsafe(method(imagePlacement))]
#[unsafe(method_family = none)]
pub fn imagePlacement(&self) -> NSDirectionalRectEdge;
#[cfg(feature = "UIGeometry")]
#[unsafe(method(setImagePlacement:))]
#[unsafe(method_family = none)]
pub fn setImagePlacement(&self, image_placement: NSDirectionalRectEdge);
#[cfg(feature = "UIColor")]
#[unsafe(method(baseForegroundColor))]
#[unsafe(method_family = none)]
pub fn baseForegroundColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setBaseForegroundColor:))]
#[unsafe(method_family = none)]
pub fn setBaseForegroundColor(&self, base_foreground_color: Option<&UIColor>);
#[cfg(feature = "UIColor")]
#[unsafe(method(baseBackgroundColor))]
#[unsafe(method_family = none)]
pub fn baseBackgroundColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setBaseBackgroundColor:))]
#[unsafe(method_family = none)]
pub fn setBaseBackgroundColor(&self, base_background_color: Option<&UIColor>);
);
}
impl UIPasteControlConfiguration {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
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 UIPasteControl;
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UIView",
feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl CALayerDelegate for UIPasteControl {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSCoding for UIPasteControl {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UIPasteControl {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIControl",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIAppearance for UIPasteControl {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIControl",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UIPasteControl {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UICoordinateSpace for UIPasteControl {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIDynamicBehavior",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIDynamicItem for UIPasteControl {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UIPasteControl {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusItem for UIPasteControl {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusItemContainer for UIPasteControl {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UIPasteControl {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UIPasteControl {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UIPasteControl {
extern_methods!(
#[unsafe(method(configuration))]
#[unsafe(method_family = none)]
pub fn configuration(&self) -> Retained<UIPasteControlConfiguration>;
#[cfg(feature = "UIPasteConfigurationSupporting")]
#[unsafe(method(target))]
#[unsafe(method_family = none)]
pub fn target(
&self,
) -> Option<Retained<ProtocolObject<dyn UIPasteConfigurationSupporting>>>;
#[cfg(feature = "UIPasteConfigurationSupporting")]
#[unsafe(method(setTarget:))]
#[unsafe(method_family = none)]
pub fn setTarget(
&self,
target: Option<&ProtocolObject<dyn UIPasteConfigurationSupporting>>,
);
#[unsafe(method(initWithConfiguration:))]
#[unsafe(method_family = init)]
pub fn initWithConfiguration(
this: Allocated<Self>,
configuration: &UIPasteControlConfiguration,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UIPasteControl {
extern_methods!(
#[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 UIPasteControl {
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 UIPasteControl {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}