objc2_pencil_kit/generated/
PKContentVersion.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// A version specifying which PencilKit features are used/allowed.
8///
9/// See also [Apple's documentation](https://developer.apple.com/documentation/pencilkit/pkcontentversion?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct PKContentVersion(pub NSInteger);
14impl PKContentVersion {
15    /// Version for inks introduced in iOS 14.0.
16    ///
17    /// Inks included are Pen, Pencil, and Marker.
18    #[doc(alias = "PKContentVersion1")]
19    pub const Version1: Self = Self(1);
20    /// Version for inks introduced in iOS 17.0.
21    ///
22    /// Inks included are Pen, Pencil, Marker, Monoline, Fountain Pen, Watercolor, and Crayon.
23    #[doc(alias = "PKContentVersion2")]
24    pub const Version2: Self = Self(2);
25    /// New Fountain Pen
26    #[doc(alias = "PKContentVersion3")]
27    pub const Version3: Self = Self(3);
28    /// New Reed Pen
29    #[doc(alias = "PKContentVersion4")]
30    pub const Version4: Self = Self(4);
31    /// The latest version including all features.
32    #[doc(alias = "PKContentVersionLatest")]
33    pub const VersionLatest: Self = Self(4);
34}
35
36unsafe impl Encode for PKContentVersion {
37    const ENCODING: Encoding = NSInteger::ENCODING;
38}
39
40unsafe impl RefEncode for PKContentVersion {
41    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
42}