use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKEraserType(pub NSInteger);
impl PKEraserType {
#[doc(alias = "PKEraserTypeVector")]
pub const Vector: Self = Self(0);
#[doc(alias = "PKEraserTypeBitmap")]
pub const Bitmap: Self = Self(1);
#[doc(alias = "PKEraserTypeFixedWidthBitmap")]
pub const FixedWidthBitmap: Self = Self(2);
}
unsafe impl Encode for PKEraserType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PKEraserType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(PKTool, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "PKTool")]
pub struct PKEraserTool;
);
#[cfg(feature = "PKTool")]
unsafe impl Send for PKEraserTool {}
#[cfg(feature = "PKTool")]
unsafe impl Sync for PKEraserTool {}
#[cfg(feature = "PKTool")]
extern_conformance!(
unsafe impl NSCopying for PKEraserTool {}
);
#[cfg(feature = "PKTool")]
unsafe impl CopyingHelper for PKEraserTool {
type Result = Self;
}
#[cfg(feature = "PKTool")]
extern_conformance!(
unsafe impl NSObjectProtocol for PKEraserTool {}
);
#[cfg(feature = "PKTool")]
impl PKEraserTool {
extern_methods!(
#[unsafe(method(eraserType))]
#[unsafe(method_family = none)]
pub unsafe fn eraserType(&self) -> PKEraserType;
#[unsafe(method(initWithEraserType:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithEraserType(
this: Allocated<Self>,
eraser_type: PKEraserType,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithEraserType:width:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithEraserType_width(
this: Allocated<Self>,
eraser_type: PKEraserType,
width: CGFloat,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(width))]
#[unsafe(method_family = none)]
pub unsafe fn width(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(defaultWidthForEraserType:))]
#[unsafe(method_family = none)]
pub unsafe fn defaultWidthForEraserType(eraser_type: PKEraserType) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(minimumWidthForEraserType:))]
#[unsafe(method_family = none)]
pub unsafe fn minimumWidthForEraserType(eraser_type: PKEraserType) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(maximumWidthForEraserType:))]
#[unsafe(method_family = none)]
pub unsafe fn maximumWidthForEraserType(eraser_type: PKEraserType) -> CGFloat;
);
}
#[cfg(feature = "PKTool")]
impl PKEraserTool {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "PKTool")]
impl PKEraserTool {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}