use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(PKTool, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "PKTool")]
pub struct PKInkingTool;
);
#[cfg(feature = "PKTool")]
unsafe impl Send for PKInkingTool {}
#[cfg(feature = "PKTool")]
unsafe impl Sync for PKInkingTool {}
#[cfg(feature = "PKTool")]
extern_conformance!(
unsafe impl NSCopying for PKInkingTool {}
);
#[cfg(feature = "PKTool")]
unsafe impl CopyingHelper for PKInkingTool {
type Result = Self;
}
#[cfg(feature = "PKTool")]
extern_conformance!(
unsafe impl NSObjectProtocol for PKInkingTool {}
);
#[cfg(feature = "PKTool")]
impl PKInkingTool {
extern_methods!(
#[cfg(all(
feature = "PKInkType",
feature = "objc2-app-kit",
feature = "objc2-core-foundation"
))]
#[cfg(target_os = "macos")]
#[unsafe(method(initWithInkType:color:width:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType_color_width(
this: Allocated<Self>,
r#type: &PKInkType,
color: &NSColor,
width: CGFloat,
) -> Retained<Self>;
#[cfg(all(
feature = "PKInkType",
feature = "objc2-app-kit",
feature = "objc2-core-foundation"
))]
#[cfg(target_os = "macos")]
#[unsafe(method(initWithInkType:color:width:azimuth:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType_color_width_azimuth(
this: Allocated<Self>,
r#type: &PKInkType,
color: &NSColor,
width: CGFloat,
angle: CGFloat,
) -> Retained<Self>;
#[cfg(all(feature = "PKInkType", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[unsafe(method(initWithInkType:color:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType_color(
this: Allocated<Self>,
r#type: &PKInkType,
color: &NSColor,
) -> Retained<Self>;
#[cfg(all(feature = "PKInk", feature = "objc2-core-foundation"))]
#[unsafe(method(initWithInk:width:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInk_width(
this: Allocated<Self>,
ink: &PKInk,
width: CGFloat,
) -> Retained<Self>;
#[cfg(all(feature = "PKInkType", feature = "objc2-core-foundation"))]
#[unsafe(method(defaultWidthForInkType:))]
#[unsafe(method_family = none)]
pub unsafe fn defaultWidthForInkType(ink_type: &PKInkType) -> CGFloat;
#[cfg(all(feature = "PKInkType", feature = "objc2-core-foundation"))]
#[unsafe(method(minimumWidthForInkType:))]
#[unsafe(method_family = none)]
pub unsafe fn minimumWidthForInkType(ink_type: &PKInkType) -> CGFloat;
#[cfg(all(feature = "PKInkType", feature = "objc2-core-foundation"))]
#[unsafe(method(maximumWidthForInkType:))]
#[unsafe(method_family = none)]
pub unsafe fn maximumWidthForInkType(ink_type: &PKInkType) -> CGFloat;
#[cfg(feature = "PKInkType")]
#[unsafe(method(inkType))]
#[unsafe(method_family = none)]
pub unsafe fn inkType(&self) -> Retained<PKInkType>;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(invertColor:))]
#[unsafe(method_family = none)]
pub unsafe fn invertColor(color: &CGColor) -> Retained<CGColor>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(color))]
#[unsafe(method_family = none)]
pub unsafe fn color(&self) -> Retained<NSColor>;
#[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(azimuth))]
#[unsafe(method_family = none)]
pub unsafe fn azimuth(&self) -> CGFloat;
#[cfg(feature = "PKInk")]
#[unsafe(method(ink))]
#[unsafe(method_family = none)]
pub unsafe fn ink(&self) -> Retained<PKInk>;
#[cfg(feature = "PKContentVersion")]
#[unsafe(method(requiredContentVersion))]
#[unsafe(method_family = none)]
pub unsafe fn requiredContentVersion(&self) -> PKContentVersion;
);
}
#[cfg(feature = "PKTool")]
impl PKInkingTool {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "PKTool")]
impl PKInkingTool {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}