objc2_pencil_kit/generated/
PKInk.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-app-kit")]
6#[cfg(target_os = "macos")]
7use objc2_app_kit::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct PKInk;
19);
20
21unsafe impl Send for PKInk {}
22
23unsafe impl Sync for PKInk {}
24
25extern_conformance!(
26 unsafe impl NSCopying for PKInk {}
27);
28
29unsafe impl CopyingHelper for PKInk {
30 type Result = Self;
31}
32
33extern_conformance!(
34 unsafe impl NSObjectProtocol for PKInk {}
35);
36
37impl PKInk {
38 extern_methods!(
39 #[cfg(all(feature = "PKInkType", feature = "objc2-app-kit"))]
40 #[cfg(target_os = "macos")]
41 #[unsafe(method(initWithInkType:color:))]
42 #[unsafe(method_family = init)]
43 pub unsafe fn initWithInkType_color(
44 this: Allocated<Self>,
45 r#type: &PKInkType,
46 color: &NSColor,
47 ) -> Retained<Self>;
48
49 #[cfg(feature = "PKInkType")]
50 #[unsafe(method(inkType))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn inkType(&self) -> Retained<PKInkType>;
60
61 #[cfg(feature = "objc2-app-kit")]
62 #[cfg(target_os = "macos")]
63 #[unsafe(method(color))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn color(&self) -> Retained<NSColor>;
71
72 #[cfg(feature = "PKContentVersion")]
73 #[unsafe(method(requiredContentVersion))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn requiredContentVersion(&self) -> PKContentVersion;
83 );
84}
85
86impl PKInk {
88 extern_methods!(
89 #[unsafe(method(init))]
90 #[unsafe(method_family = init)]
91 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
92
93 #[unsafe(method(new))]
94 #[unsafe(method_family = new)]
95 pub unsafe fn new() -> Retained<Self>;
96 );
97}