use core::ffi::*;
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::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(PKToolPickerItem, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "PKToolPickerItem")]
pub struct PKToolPickerInkingItem;
);
#[cfg(feature = "PKToolPickerItem")]
extern_conformance!(
unsafe impl NSCopying for PKToolPickerInkingItem {}
);
#[cfg(feature = "PKToolPickerItem")]
unsafe impl CopyingHelper for PKToolPickerInkingItem {
type Result = Self;
}
#[cfg(feature = "PKToolPickerItem")]
extern_conformance!(
unsafe impl NSObjectProtocol for PKToolPickerInkingItem {}
);
#[cfg(feature = "PKToolPickerItem")]
impl PKToolPickerInkingItem {
extern_methods!(
#[cfg(feature = "PKInkType")]
#[unsafe(method(initWithInkType:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType(
this: Allocated<Self>,
ink_type: &PKInkType,
) -> 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>,
ink_type: &PKInkType,
color: &NSColor,
) -> Retained<Self>;
#[cfg(all(feature = "PKInkType", feature = "objc2-core-foundation"))]
#[unsafe(method(initWithInkType:width:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType_width(
this: Allocated<Self>,
ink_type: &PKInkType,
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:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType_color_width(
this: Allocated<Self>,
ink_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:identifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType_color_width_identifier(
this: Allocated<Self>,
ink_type: &PKInkType,
color: &NSColor,
width: CGFloat,
identifier: Option<&NSString>,
) -> Retained<Self>;
#[cfg(all(
feature = "PKInkType",
feature = "objc2-app-kit",
feature = "objc2-core-foundation"
))]
#[cfg(target_os = "macos")]
#[unsafe(method(initWithInkType:color:width:azimuth:identifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInkType_color_width_azimuth_identifier(
this: Allocated<Self>,
ink_type: &PKInkType,
color: &NSColor,
width: CGFloat,
azimuth: CGFloat,
identifier: Option<&NSString>,
) -> Retained<Self>;
#[cfg(all(feature = "PKInkingTool", feature = "PKTool"))]
#[unsafe(method(inkingTool))]
#[unsafe(method_family = none)]
pub unsafe fn inkingTool(&self) -> Retained<PKInkingTool>;
#[unsafe(method(allowsColorSelection))]
#[unsafe(method_family = none)]
pub unsafe fn allowsColorSelection(&self) -> bool;
#[unsafe(method(setAllowsColorSelection:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsColorSelection(&self, allows_color_selection: bool);
);
}
#[cfg(feature = "PKToolPickerItem")]
impl PKToolPickerInkingItem {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "PKToolPickerItem")]
impl PKToolPickerInkingItem {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}