use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct UIPointerAccessoryPosition {
pub offset: CGFloat,
pub angle: CGFloat,
}
unsafe impl Encode for UIPointerAccessoryPosition {
const ENCODING: Encoding = Encoding::Struct("?", &[<CGFloat>::ENCODING, <CGFloat>::ENCODING]);
}
unsafe impl RefEncode for UIPointerAccessoryPosition {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
unsafe impl Send for UIPointerAccessoryPosition {}
unsafe impl Sync for UIPointerAccessoryPosition {}
extern "C" {
pub static UIPointerAccessoryPositionTop: UIPointerAccessoryPosition;
}
extern "C" {
pub static UIPointerAccessoryPositionTopRight: UIPointerAccessoryPosition;
}
extern "C" {
pub static UIPointerAccessoryPositionRight: UIPointerAccessoryPosition;
}
extern "C" {
pub static UIPointerAccessoryPositionBottomRight: UIPointerAccessoryPosition;
}
extern "C" {
pub static UIPointerAccessoryPositionBottom: UIPointerAccessoryPosition;
}
extern "C" {
pub static UIPointerAccessoryPositionBottomLeft: UIPointerAccessoryPosition;
}
extern "C" {
pub static UIPointerAccessoryPositionLeft: UIPointerAccessoryPosition;
}
extern "C" {
pub static UIPointerAccessoryPositionTopLeft: UIPointerAccessoryPosition;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIPointerAccessory;
unsafe impl ClassType for UIPointerAccessory {
type Super = NSObject;
type Mutability = MainThreadOnly;
}
);
unsafe impl NSCopying for UIPointerAccessory {}
unsafe impl NSObjectProtocol for UIPointerAccessory {}
extern_methods!(
unsafe impl UIPointerAccessory {
#[cfg(feature = "UIPointerStyle")]
#[method_id(@__retain_semantics Other shape)]
pub unsafe fn shape(&self) -> Retained<UIPointerShape>;
#[method(position)]
pub unsafe fn position(&self) -> UIPointerAccessoryPosition;
#[method(orientationMatchesAngle)]
pub unsafe fn orientationMatchesAngle(&self) -> bool;
#[method(setOrientationMatchesAngle:)]
pub unsafe fn setOrientationMatchesAngle(&self, orientation_matches_angle: bool);
#[cfg(feature = "UIPointerStyle")]
#[method_id(@__retain_semantics Other accessoryWithShape:position:)]
pub unsafe fn accessoryWithShape_position(
shape: &UIPointerShape,
position: UIPointerAccessoryPosition,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other arrowAccessoryWithPosition:)]
pub unsafe fn arrowAccessoryWithPosition(
position: UIPointerAccessoryPosition,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
}
);