objc2_ui_kit/generated/
UIStringDrawing.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextattributefont?language=objc)
10    #[deprecated]
11    pub static UITextAttributeFont: Option<&'static NSString>;
12}
13
14extern "C" {
15    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextattributetextcolor?language=objc)
16    #[deprecated]
17    pub static UITextAttributeTextColor: Option<&'static NSString>;
18}
19
20extern "C" {
21    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextattributetextshadowcolor?language=objc)
22    #[deprecated = "Use NSShadowAttributeName with an NSShadow instance as the value"]
23    pub static UITextAttributeTextShadowColor: Option<&'static NSString>;
24}
25
26extern "C" {
27    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextattributetextshadowoffset?language=objc)
28    #[deprecated = "Use NSShadowAttributeName with an NSShadow instance as the value"]
29    pub static UITextAttributeTextShadowOffset: Option<&'static NSString>;
30}
31
32/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uilinebreakmode?language=objc)
33// NS_ENUM
34#[deprecated]
35#[repr(transparent)]
36#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
37pub struct UILineBreakMode(pub NSInteger);
38impl UILineBreakMode {
39    #[doc(alias = "UILineBreakModeWordWrap")]
40    #[deprecated]
41    pub const WordWrap: Self = Self(0);
42    #[doc(alias = "UILineBreakModeCharacterWrap")]
43    #[deprecated]
44    pub const CharacterWrap: Self = Self(1);
45    #[doc(alias = "UILineBreakModeClip")]
46    #[deprecated]
47    pub const Clip: Self = Self(2);
48    #[doc(alias = "UILineBreakModeHeadTruncation")]
49    #[deprecated]
50    pub const HeadTruncation: Self = Self(3);
51    #[doc(alias = "UILineBreakModeTailTruncation")]
52    #[deprecated]
53    pub const TailTruncation: Self = Self(4);
54    #[doc(alias = "UILineBreakModeMiddleTruncation")]
55    #[deprecated]
56    pub const MiddleTruncation: Self = Self(5);
57}
58
59unsafe impl Encode for UILineBreakMode {
60    const ENCODING: Encoding = NSInteger::ENCODING;
61}
62
63unsafe impl RefEncode for UILineBreakMode {
64    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
65}
66
67/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextalignment?language=objc)
68// NS_ENUM
69#[deprecated]
70#[repr(transparent)]
71#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
72pub struct UITextAlignment(pub NSInteger);
73impl UITextAlignment {
74    #[doc(alias = "UITextAlignmentLeft")]
75    #[deprecated]
76    pub const Left: Self = Self(0);
77    #[doc(alias = "UITextAlignmentCenter")]
78    #[deprecated]
79    pub const Center: Self = Self(1);
80    #[doc(alias = "UITextAlignmentRight")]
81    #[deprecated]
82    pub const Right: Self = Self(2);
83}
84
85unsafe impl Encode for UITextAlignment {
86    const ENCODING: Encoding = NSInteger::ENCODING;
87}
88
89unsafe impl RefEncode for UITextAlignment {
90    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
91}
92
93/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uibaselineadjustment?language=objc)
94// NS_ENUM
95#[repr(transparent)]
96#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
97pub struct UIBaselineAdjustment(pub NSInteger);
98impl UIBaselineAdjustment {
99    #[doc(alias = "UIBaselineAdjustmentAlignBaselines")]
100    pub const AlignBaselines: Self = Self(0);
101    #[doc(alias = "UIBaselineAdjustmentAlignCenters")]
102    pub const AlignCenters: Self = Self(1);
103    #[doc(alias = "UIBaselineAdjustmentNone")]
104    pub const None: Self = Self(2);
105}
106
107unsafe impl Encode for UIBaselineAdjustment {
108    const ENCODING: Encoding = NSInteger::ENCODING;
109}
110
111unsafe impl RefEncode for UIBaselineAdjustment {
112    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
113}