objc2_application_services/generated/HIServices/AXTextAttributedString.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6use objc2_core_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 /// A dictionary (a
12 /// <code>
13 /// CFDictionaryRef
14 /// </code>
15 /// ) of two or more font keys.
16 ///
17 /// The dictionary associated with this attribute must contain the {
18 ///
19 /// ```text
20 /// kAXFontNameKey} and
21 /// {@link kAXFontSizeKey} font keys. It may also contain the {@link kAXFontFamilyKey} and
22 /// {@link kAXVisibleNameKey} font keys.
23 ///
24 ///
25 /// ```
26 ///
27 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxfonttextattribute?language=objc)
28 pub static kAXFontTextAttribute: &'static CFString;
29}
30
31extern "C" {
32 /// A
33 /// <code>
34 /// CGColorRef
35 /// </code>
36 /// value that describes the foreground color.
37 ///
38 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxforegroundcolortextattribute?language=objc)
39 pub static kAXForegroundColorTextAttribute: &'static CFString;
40}
41
42extern "C" {
43 /// A
44 /// <code>
45 /// CGColorRef
46 /// </code>
47 /// value that describes the background color.
48 ///
49 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxbackgroundcolortextattribute?language=objc)
50 pub static kAXBackgroundColorTextAttribute: &'static CFString;
51}
52
53extern "C" {
54 /// A
55 /// <code>
56 /// CGColorRef
57 /// </code>
58 /// value that describes the color of the underlining.
59 ///
60 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxunderlinecolortextattribute?language=objc)
61 pub static kAXUnderlineColorTextAttribute: &'static CFString;
62}
63
64extern "C" {
65 /// A
66 /// <code>
67 /// CGColorRef
68 /// </code>
69 /// value that describes the color of the strikethrough.
70 ///
71 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxstrikethroughcolortextattribute?language=objc)
72 pub static kAXStrikethroughColorTextAttribute: &'static CFString;
73}
74
75extern "C" {
76 /// A
77 /// <code>
78 /// CFNumberRef
79 /// </code>
80 /// value that describes the underline style (see {
81 ///
82 /// ```text
83 /// //apple_ref/c/tdef/AXUnderlineStyle AXUnderlineStyle} for possible values).
84 ///
85 ///
86 /// ```
87 ///
88 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxunderlinetextattribute?language=objc)
89 pub static kAXUnderlineTextAttribute: &'static CFString;
90}
91
92extern "C" {
93 /// A
94 /// <code>
95 /// CFNumberRef
96 /// </code>
97 /// value that indicates whether the text is superscript (value > 0) or subscript (value
98 /// <
99 /// 0).
100 ///
101 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxsuperscripttextattribute?language=objc)
102 pub static kAXSuperscriptTextAttribute: &'static CFString;
103}
104
105extern "C" {
106 /// A
107 /// <code>
108 /// CFBooleanRef
109 /// </code>
110 /// value that indicates whether the text displays strikethrough.
111 ///
112 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxstrikethroughtextattribute?language=objc)
113 pub static kAXStrikethroughTextAttribute: &'static CFString;
114}
115
116extern "C" {
117 /// A
118 /// <code>
119 /// CFBooleanRef
120 /// </code>
121 /// value that indicates whether the text displays shadow.
122 ///
123 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxshadowtextattribute?language=objc)
124 pub static kAXShadowTextAttribute: &'static CFString;
125}
126
127extern "C" {
128 /// An
129 /// <code>
130 /// AXUIElementRef
131 /// </code>
132 /// value for the accessibility object representing the text attachment.
133 ///
134 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxattachmenttextattribute?language=objc)
135 pub static kAXAttachmentTextAttribute: &'static CFString;
136}
137
138extern "C" {
139 /// An
140 /// <code>
141 /// AXUIElementRef
142 /// </code>
143 /// value used to access the object to which the specified range of text links.
144 ///
145 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxlinktextattribute?language=objc)
146 pub static kAXLinkTextAttribute: &'static CFString;
147}
148
149extern "C" {
150 /// A
151 /// <code>
152 /// CFStringRef
153 /// </code>
154 /// value that indicates the language in which the text will be spoken aloud by the system.
155 ///
156 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxnaturallanguagetextattribute?language=objc)
157 pub static kAXNaturalLanguageTextAttribute: &'static CFString;
158}
159
160extern "C" {
161 /// A
162 /// <code>
163 /// CFStringRef
164 /// </code>
165 /// value that indicates the string that will replace the text.
166 ///
167 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxreplacementstringtextattribute?language=objc)
168 pub static kAXReplacementStringTextAttribute: &'static CFString;
169}
170
171extern "C" {
172 /// A
173 /// <code>
174 /// CFBooleanRef
175 /// </code>
176 /// value that indicates whether the text is misspelled.
177 ///
178 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxmisspelledtextattribute?language=objc)
179 pub static kAXMisspelledTextAttribute: &'static CFString;
180}
181
182extern "C" {
183 /// A
184 /// <code>
185 /// CFBooleanRef
186 /// </code>
187 /// value that indicates whether the text is visibly shown as misspelled
188 /// (for example, with a squiggle underneath the text).
189 ///
190 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxmarkedmisspelledtextattribute?language=objc)
191 pub static kAXMarkedMisspelledTextAttribute: &'static CFString;
192}
193
194extern "C" {
195 /// A
196 /// <code>
197 /// CFBooleanRef
198 /// </code>
199 /// value that indicates whether the text was autocorrected.
200 ///
201 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxautocorrectedtextattribute?language=objc)
202 pub static kAXAutocorrectedTextAttribute: &'static CFString;
203}
204
205extern "C" {
206 /// A
207 /// <code>
208 /// CFAttributedStringRef
209 /// </code>
210 /// value that indicates the prepended string of the list item. If the string is a common unicode character (e.g. a bullet •), return that unicode character. For lists with images before the text, return a reasonable label of the image.
211 ///
212 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxlistitemprefixtextattribute?language=objc)
213 pub static kAXListItemPrefixTextAttribute: &'static CFString;
214}
215
216extern "C" {
217 /// A
218 /// <code>
219 /// CFNumberRef
220 /// </code>
221 /// value that indicates the line index. Each list item increments the index, even for unordered lists. The first item should have index 0.
222 ///
223 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxlistitemindextextattribute?language=objc)
224 pub static kAXListItemIndexTextAttribute: &'static CFString;
225}
226
227extern "C" {
228 /// A
229 /// <code>
230 /// CFNumberRef
231 /// </code>
232 /// value that indicates the indent level. Each sublist increments the level. The first item should have level 0.
233 ///
234 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxlistitemleveltextattribute?language=objc)
235 pub static kAXListItemLevelTextAttribute: &'static CFString;
236}
237
238extern "C" {
239 /// Required key of the {
240 ///
241 /// ```text
242 /// kAXFontTextAttribute} dictionary for the font name in a <code>CFStringRef</code>.
243 ///
244 ///
245 /// ```
246 ///
247 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxfontnamekey?language=objc)
248 pub static kAXFontNameKey: &'static CFString;
249}
250
251extern "C" {
252 /// Optional key of the {
253 ///
254 /// ```text
255 /// kAXFontTextAttribute} dictionary for the font family name in a <code>CFStringRef</code>.
256 ///
257 ///
258 /// ```
259 ///
260 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxfontfamilykey?language=objc)
261 pub static kAXFontFamilyKey: &'static CFString;
262}
263
264extern "C" {
265 /// Optional key of the {
266 ///
267 /// ```text
268 /// kAXFontTextAttribute} dictionary for the font display name in a <code>CFStringRef</code>.
269 ///
270 ///
271 /// ```
272 ///
273 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxvisiblenamekey?language=objc)
274 pub static kAXVisibleNameKey: &'static CFString;
275}
276
277extern "C" {
278 /// Required key of the {
279 ///
280 /// ```text
281 /// kAXFontTextAttribute} dictionary for the font size in a <code>CFNumberRef</code>.
282 ///
283 ///
284 /// ```
285 ///
286 /// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxfontsizekey?language=objc)
287 pub static kAXFontSizeKey: &'static CFString;
288}
289
290/// Values that describe the style of underlining (used with the {
291///
292/// ```text
293/// kAXUnderlineTextAttribute} attribute).
294///
295///
296/// ```
297///
298/// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/axunderlinestyle?language=objc)
299// NS_ENUM
300#[repr(transparent)]
301#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
302pub struct AXUnderlineStyle(pub u32);
303impl AXUnderlineStyle {
304 #[doc(alias = "kAXUnderlineStyleNone")]
305 pub const None: Self = Self(0x0);
306 #[doc(alias = "kAXUnderlineStyleSingle")]
307 pub const Single: Self = Self(0x1);
308 #[doc(alias = "kAXUnderlineStyleThick")]
309 pub const Thick: Self = Self(0x2);
310 #[doc(alias = "kAXUnderlineStyleDouble")]
311 pub const Double: Self = Self(0x9);
312}
313
314#[cfg(feature = "objc2")]
315unsafe impl Encode for AXUnderlineStyle {
316 const ENCODING: Encoding = u32::ENCODING;
317}
318
319#[cfg(feature = "objc2")]
320unsafe impl RefEncode for AXUnderlineStyle {
321 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
322}
323
324extern "C" {
325 /// [Apple's documentation](https://developer.apple.com/documentation/applicationservices/kaxforegoundcolortextattribute?language=objc)
326 pub static kAXForegoundColorTextAttribute: &'static CFString;
327}