ohos_drawing_sys/text_typography/
text_typography_ffi.rs

1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6#[cfg(feature = "api-12")]
7use crate::font::OH_Drawing_Font_Metrics;
8use crate::text_declaration::*;
9use crate::types::*;
10
11impl OH_Drawing_TextDirection {
12    /// Right to left (RTL)
13    pub const TEXT_DIRECTION_RTL: OH_Drawing_TextDirection = OH_Drawing_TextDirection(0);
14    /// Left to right (LTR)
15    pub const TEXT_DIRECTION_LTR: OH_Drawing_TextDirection = OH_Drawing_TextDirection(1);
16}
17#[repr(transparent)]
18/// Enumerates text directions.
19///
20///
21/// Available since API-level: 8
22///
23/// Version: 1.0
24#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
25pub struct OH_Drawing_TextDirection(pub ::core::ffi::c_uint);
26impl OH_Drawing_TextAlign {
27    /// Left-aligned
28    pub const TEXT_ALIGN_LEFT: OH_Drawing_TextAlign = OH_Drawing_TextAlign(0);
29    /// Right-aligned
30    pub const TEXT_ALIGN_RIGHT: OH_Drawing_TextAlign = OH_Drawing_TextAlign(1);
31    /// Center-aligned
32    pub const TEXT_ALIGN_CENTER: OH_Drawing_TextAlign = OH_Drawing_TextAlign(2);
33    /// Justified, which means that each line (except the last line) is stretched so that every line has equal width,
34    /// and the left and right margins are straight.
35    pub const TEXT_ALIGN_JUSTIFY: OH_Drawing_TextAlign = OH_Drawing_TextAlign(3);
36    /// <b>TEXT_ALIGN_START</b> achieves the same effect as <b>TEXT_ALIGN_LEFT</b>
37    /// when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;
38    /// it achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>
39    /// when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>.
40    pub const TEXT_ALIGN_START: OH_Drawing_TextAlign = OH_Drawing_TextAlign(4);
41    /// <b>TEXT_ALIGN_END</b> achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>
42    /// when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;
43    /// it achieves the same effect as <b>TEXT_ALIGN_LEFT</b>
44    /// when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>.
45    pub const TEXT_ALIGN_END: OH_Drawing_TextAlign = OH_Drawing_TextAlign(5);
46}
47#[repr(transparent)]
48/// Enumerates text alignment modes.
49///
50///
51/// Available since API-level: 8
52///
53/// Version: 1.0
54#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
55pub struct OH_Drawing_TextAlign(pub ::core::ffi::c_uint);
56impl OH_Drawing_FontWeight {
57    /// Thin
58    pub const FONT_WEIGHT_100: OH_Drawing_FontWeight = OH_Drawing_FontWeight(0);
59    /// Extra-light
60    pub const FONT_WEIGHT_200: OH_Drawing_FontWeight = OH_Drawing_FontWeight(1);
61    /// Light
62    pub const FONT_WEIGHT_300: OH_Drawing_FontWeight = OH_Drawing_FontWeight(2);
63    /// Normal/Regular
64    pub const FONT_WEIGHT_400: OH_Drawing_FontWeight = OH_Drawing_FontWeight(3);
65    /// Medium
66    pub const FONT_WEIGHT_500: OH_Drawing_FontWeight = OH_Drawing_FontWeight(4);
67    /// Semi-bold
68    pub const FONT_WEIGHT_600: OH_Drawing_FontWeight = OH_Drawing_FontWeight(5);
69    /// Bold
70    pub const FONT_WEIGHT_700: OH_Drawing_FontWeight = OH_Drawing_FontWeight(6);
71    /// Extra-bold
72    pub const FONT_WEIGHT_800: OH_Drawing_FontWeight = OH_Drawing_FontWeight(7);
73    /// Black
74    pub const FONT_WEIGHT_900: OH_Drawing_FontWeight = OH_Drawing_FontWeight(8);
75}
76#[repr(transparent)]
77/// Enumerates font weights.
78///
79///
80/// Available since API-level: 8
81///
82/// Version: 1.0
83#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
84pub struct OH_Drawing_FontWeight(pub ::core::ffi::c_uint);
85impl OH_Drawing_TextBaseline {
86    /// Alphabetic, where the letters in alphabets like English sit on.
87    pub const TEXT_BASELINE_ALPHABETIC: OH_Drawing_TextBaseline = OH_Drawing_TextBaseline(0);
88    /// Ideographic. The baseline is at the bottom of the text area.
89    pub const TEXT_BASELINE_IDEOGRAPHIC: OH_Drawing_TextBaseline = OH_Drawing_TextBaseline(1);
90}
91#[repr(transparent)]
92/// Enumerates text baselines.
93///
94///
95/// Available since API-level: 8
96///
97/// Version: 1.0
98#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
99pub struct OH_Drawing_TextBaseline(pub ::core::ffi::c_uint);
100impl OH_Drawing_TextDecoration {
101    /// No decoration.
102    pub const TEXT_DECORATION_NONE: OH_Drawing_TextDecoration = OH_Drawing_TextDecoration(0);
103    /// A underline is used for decoration.
104    pub const TEXT_DECORATION_UNDERLINE: OH_Drawing_TextDecoration = OH_Drawing_TextDecoration(1);
105    /// An overline is used for decoration.
106    pub const TEXT_DECORATION_OVERLINE: OH_Drawing_TextDecoration = OH_Drawing_TextDecoration(2);
107    /// A strikethrough is used for decoration.
108    pub const TEXT_DECORATION_LINE_THROUGH: OH_Drawing_TextDecoration =
109        OH_Drawing_TextDecoration(4);
110}
111#[repr(transparent)]
112/// Enumerates text decorations.
113///
114///
115/// Available since API-level: 8
116///
117/// Version: 1.0
118#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
119pub struct OH_Drawing_TextDecoration(pub ::core::ffi::c_uint);
120impl OH_Drawing_FontStyle {
121    /// Normal style
122    pub const FONT_STYLE_NORMAL: OH_Drawing_FontStyle = OH_Drawing_FontStyle(0);
123    /// Italic style
124    pub const FONT_STYLE_ITALIC: OH_Drawing_FontStyle = OH_Drawing_FontStyle(1);
125    /// Oblique style
126    pub const FONT_STYLE_OBLIQUE: OH_Drawing_FontStyle = OH_Drawing_FontStyle(2);
127}
128#[repr(transparent)]
129/// Enumerates font styles.
130///
131///
132/// Available since API-level: 8
133///
134/// Version: 1.0
135#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
136pub struct OH_Drawing_FontStyle(pub ::core::ffi::c_uint);
137#[cfg(feature = "api-11")]
138#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
139impl OH_Drawing_PlaceholderVerticalAlignment {
140    /// Offset At Baseline
141    pub const ALIGNMENT_OFFSET_AT_BASELINE: OH_Drawing_PlaceholderVerticalAlignment =
142        OH_Drawing_PlaceholderVerticalAlignment(0);
143    /// Above Baseline
144    pub const ALIGNMENT_ABOVE_BASELINE: OH_Drawing_PlaceholderVerticalAlignment =
145        OH_Drawing_PlaceholderVerticalAlignment(1);
146    /// Below Baseline
147    pub const ALIGNMENT_BELOW_BASELINE: OH_Drawing_PlaceholderVerticalAlignment =
148        OH_Drawing_PlaceholderVerticalAlignment(2);
149    /// Top of Row Box
150    pub const ALIGNMENT_TOP_OF_ROW_BOX: OH_Drawing_PlaceholderVerticalAlignment =
151        OH_Drawing_PlaceholderVerticalAlignment(3);
152    /// Bottom of Row Box
153    pub const ALIGNMENT_BOTTOM_OF_ROW_BOX: OH_Drawing_PlaceholderVerticalAlignment =
154        OH_Drawing_PlaceholderVerticalAlignment(4);
155    /// Center of Row Box
156    pub const ALIGNMENT_CENTER_OF_ROW_BOX: OH_Drawing_PlaceholderVerticalAlignment =
157        OH_Drawing_PlaceholderVerticalAlignment(5);
158    /// Follow paragraph setting
159    ///
160    /// Available since API-level: 20
161    #[cfg(feature = "api-20")]
162    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
163    pub const ALIGNMENT_FOLLOW_PARAGRAPH: OH_Drawing_PlaceholderVerticalAlignment =
164        OH_Drawing_PlaceholderVerticalAlignment(6);
165}
166#[repr(transparent)]
167/// Enumerates placeholder vertical alignment.
168///
169///
170/// Available since API-level: 11
171///
172/// Version: 1.0
173#[cfg(feature = "api-11")]
174#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
175#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
176pub struct OH_Drawing_PlaceholderVerticalAlignment(pub ::core::ffi::c_uint);
177/// Defines the placeholder span.
178///
179///
180/// Available since API-level: 11
181///
182/// Version: 1.0
183#[cfg(feature = "api-11")]
184#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
185#[repr(C)]
186#[derive(Debug, Copy, Clone)]
187pub struct OH_Drawing_PlaceholderSpan {
188    /// width of placeholder
189    pub width: f64,
190    /// height of placeholder
191    pub height: f64,
192    /// alignment of placeholder
193    pub alignment: OH_Drawing_PlaceholderVerticalAlignment,
194    /// baseline of placeholder
195    pub baseline: OH_Drawing_TextBaseline,
196    /// baselineoffset of placeholder
197    pub baselineOffset: f64,
198}
199#[cfg(feature = "api-11")]
200#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
201impl OH_Drawing_TextDecorationStyle {
202    /// Solid style
203    pub const TEXT_DECORATION_STYLE_SOLID: OH_Drawing_TextDecorationStyle =
204        OH_Drawing_TextDecorationStyle(0);
205    /// Double style
206    pub const TEXT_DECORATION_STYLE_DOUBLE: OH_Drawing_TextDecorationStyle =
207        OH_Drawing_TextDecorationStyle(1);
208    /// Dotted style
209    pub const TEXT_DECORATION_STYLE_DOTTED: OH_Drawing_TextDecorationStyle =
210        OH_Drawing_TextDecorationStyle(2);
211    /// Dashed style
212    pub const TEXT_DECORATION_STYLE_DASHED: OH_Drawing_TextDecorationStyle =
213        OH_Drawing_TextDecorationStyle(3);
214    /// Wavy style
215    pub const TEXT_DECORATION_STYLE_WAVY: OH_Drawing_TextDecorationStyle =
216        OH_Drawing_TextDecorationStyle(4);
217}
218#[repr(transparent)]
219/// Enumerates text decoration style.
220///
221///
222/// Available since API-level: 11
223///
224/// Version: 1.0
225#[cfg(feature = "api-11")]
226#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
227#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
228pub struct OH_Drawing_TextDecorationStyle(pub ::core::ffi::c_uint);
229#[cfg(feature = "api-11")]
230#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
231impl OH_Drawing_EllipsisModal {
232    /// Head modal
233    pub const ELLIPSIS_MODAL_HEAD: OH_Drawing_EllipsisModal = OH_Drawing_EllipsisModal(0);
234    /// Middle modal
235    pub const ELLIPSIS_MODAL_MIDDLE: OH_Drawing_EllipsisModal = OH_Drawing_EllipsisModal(1);
236    /// Tail modal
237    pub const ELLIPSIS_MODAL_TAIL: OH_Drawing_EllipsisModal = OH_Drawing_EllipsisModal(2);
238}
239#[repr(transparent)]
240/// Enumerates ellipsis modal.
241///
242///
243/// Available since API-level: 11
244///
245/// Version: 1.0
246#[cfg(feature = "api-11")]
247#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
248#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
249pub struct OH_Drawing_EllipsisModal(pub ::core::ffi::c_uint);
250#[cfg(feature = "api-11")]
251#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
252impl OH_Drawing_BreakStrategy {
253    /// Greedy strategy
254    pub const BREAK_STRATEGY_GREEDY: OH_Drawing_BreakStrategy = OH_Drawing_BreakStrategy(0);
255    /// Quality strategy
256    pub const BREAK_STRATEGY_HIGH_QUALITY: OH_Drawing_BreakStrategy = OH_Drawing_BreakStrategy(1);
257    /// Balanced strategy
258    pub const BREAK_STRATEGY_BALANCED: OH_Drawing_BreakStrategy = OH_Drawing_BreakStrategy(2);
259}
260#[repr(transparent)]
261/// Enumerates break strategy.
262///
263///
264/// Available since API-level: 11
265///
266/// Version: 1.0
267#[cfg(feature = "api-11")]
268#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
269#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
270pub struct OH_Drawing_BreakStrategy(pub ::core::ffi::c_uint);
271#[cfg(feature = "api-11")]
272#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
273impl OH_Drawing_WordBreakType {
274    /// Normal type
275    pub const WORD_BREAK_TYPE_NORMAL: OH_Drawing_WordBreakType = OH_Drawing_WordBreakType(0);
276    /// Break All type
277    pub const WORD_BREAK_TYPE_BREAK_ALL: OH_Drawing_WordBreakType = OH_Drawing_WordBreakType(1);
278    /// Break Word type
279    pub const WORD_BREAK_TYPE_BREAK_WORD: OH_Drawing_WordBreakType = OH_Drawing_WordBreakType(2);
280    /// Break word with hyphens
281    ///
282    /// Available since API-level: 18
283    #[cfg(feature = "api-18")]
284    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
285    pub const WORD_BREAK_TYPE_BREAK_HYPHEN: OH_Drawing_WordBreakType = OH_Drawing_WordBreakType(3);
286}
287#[repr(transparent)]
288/// Enumerates word break type.
289///
290///
291/// Available since API-level: 11
292///
293/// Version: 1.0
294#[cfg(feature = "api-11")]
295#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
296#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
297pub struct OH_Drawing_WordBreakType(pub ::core::ffi::c_uint);
298#[cfg(feature = "api-11")]
299#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
300impl OH_Drawing_RectHeightStyle {
301    /// Tight style
302    pub const RECT_HEIGHT_STYLE_TIGHT: OH_Drawing_RectHeightStyle = OH_Drawing_RectHeightStyle(0);
303    /// Max style
304    pub const RECT_HEIGHT_STYLE_MAX: OH_Drawing_RectHeightStyle = OH_Drawing_RectHeightStyle(1);
305    /// Includelinespacemiddle style
306    pub const RECT_HEIGHT_STYLE_INCLUDELINESPACEMIDDLE: OH_Drawing_RectHeightStyle =
307        OH_Drawing_RectHeightStyle(2);
308    /// Includelinespacetop style
309    pub const RECT_HEIGHT_STYLE_INCLUDELINESPACETOP: OH_Drawing_RectHeightStyle =
310        OH_Drawing_RectHeightStyle(3);
311    /// Includelinespacebottom style
312    pub const RECT_HEIGHT_STYLE_INCLUDELINESPACEBOTTOM: OH_Drawing_RectHeightStyle =
313        OH_Drawing_RectHeightStyle(4);
314    /// Struct style
315    pub const RECT_HEIGHT_STYLE_STRUCT: OH_Drawing_RectHeightStyle = OH_Drawing_RectHeightStyle(5);
316}
317#[repr(transparent)]
318/// Enumerates rect height style.
319///
320///
321/// Available since API-level: 11
322///
323/// Version: 1.0
324#[cfg(feature = "api-11")]
325#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
326#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
327pub struct OH_Drawing_RectHeightStyle(pub ::core::ffi::c_uint);
328#[cfg(feature = "api-11")]
329#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
330impl OH_Drawing_RectWidthStyle {
331    /// Tight style
332    pub const RECT_WIDTH_STYLE_TIGHT: OH_Drawing_RectWidthStyle = OH_Drawing_RectWidthStyle(0);
333    /// Max style
334    pub const RECT_WIDTH_STYLE_MAX: OH_Drawing_RectWidthStyle = OH_Drawing_RectWidthStyle(1);
335}
336#[repr(transparent)]
337/// Enumerates rect Width style.
338///
339///
340/// Available since API-level: 11
341///
342/// Version: 1.0
343#[cfg(feature = "api-11")]
344#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
345#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
346pub struct OH_Drawing_RectWidthStyle(pub ::core::ffi::c_uint);
347#[cfg(feature = "api-12")]
348#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
349impl OH_Drawing_FontConfigInfoErrorCode {
350    /// The list of system font configuration information was successfully obtained
351    pub const SUCCESS_FONT_CONFIG_INFO: OH_Drawing_FontConfigInfoErrorCode =
352        OH_Drawing_FontConfigInfoErrorCode(0);
353    /// Unknown error
354    pub const UNKNOWN: OH_Drawing_FontConfigInfoErrorCode = OH_Drawing_FontConfigInfoErrorCode(1);
355    /// Parse system config file error
356    pub const PARSE_FILE: OH_Drawing_FontConfigInfoErrorCode =
357        OH_Drawing_FontConfigInfoErrorCode(2);
358    /// Alloc memory error
359    pub const ALLOC_MEMORY: OH_Drawing_FontConfigInfoErrorCode =
360        OH_Drawing_FontConfigInfoErrorCode(3);
361    /// Copy string data error
362    pub const COPY_STRING_DATA: OH_Drawing_FontConfigInfoErrorCode =
363        OH_Drawing_FontConfigInfoErrorCode(4);
364}
365#[repr(transparent)]
366/// Gets system font configuration information list result enum.
367///
368///
369/// Available since API-level: 12
370///
371/// Version: 1.0
372#[cfg(feature = "api-12")]
373#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
374#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
375pub struct OH_Drawing_FontConfigInfoErrorCode(pub ::core::ffi::c_uint);
376/// Fallback font information.
377///
378///
379/// Available since API-level: 12
380///
381/// Version: 1.0
382#[cfg(feature = "api-12")]
383#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
384#[repr(C)]
385#[derive(Debug, Copy, Clone)]
386pub struct OH_Drawing_FontFallbackInfo {
387    /// The type of language supported by the font set. The language format is bcp47
388    pub language: *mut ::core::ffi::c_char,
389    /// Font family name
390    pub familyName: *mut ::core::ffi::c_char,
391}
392/// Fallback font group.
393///
394///
395/// Available since API-level: 12
396///
397/// Version: 1.0
398#[cfg(feature = "api-12")]
399#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
400#[repr(C)]
401pub struct OH_Drawing_FontFallbackGroup {
402    /// The name of the font set corresponding to the fallback font set. If the value is null,
403    /// all fonts can be set using the fallback font set list.
404    pub groupName: *mut ::core::ffi::c_char,
405    /// Fallback font Info Size
406    pub fallbackInfoSize: usize,
407    /// A list of font sets for fallback fonts
408    pub fallbackInfoSet: *mut OH_Drawing_FontFallbackInfo,
409}
410/// Font weight mapping information.
411///
412///
413/// Available since API-level: 12
414///
415/// Version: 1.0
416#[cfg(feature = "api-12")]
417#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
418#[repr(C)]
419#[derive(Debug, Copy, Clone)]
420pub struct OH_Drawing_FontAdjustInfo {
421    /// The font's original weight value
422    pub weight: ::core::ffi::c_int,
423    /// The font weight displayed in the application
424    pub to: ::core::ffi::c_int,
425}
426/// Alias font information.
427///
428///
429/// Available since API-level: 12
430///
431/// Version: 1.0
432#[cfg(feature = "api-12")]
433#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
434#[repr(C)]
435#[derive(Debug, Copy, Clone)]
436pub struct OH_Drawing_FontAliasInfo {
437    /// Font family name
438    pub familyName: *mut ::core::ffi::c_char,
439    /// Font weight value. When the weight value is greater than 0,
440    /// the font set contains only fonts with the specified weight.
441    /// When the weight value is equal to 0, the font set contains all fonts.
442    pub weight: ::core::ffi::c_int,
443}
444/// General font set information supported by the system.
445///
446///
447/// Available since API-level: 12
448///
449/// Version: 1.0
450#[cfg(feature = "api-12")]
451#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
452#[repr(C)]
453pub struct OH_Drawing_FontGenericInfo {
454    /// Font family name
455    pub familyName: *mut ::core::ffi::c_char,
456    /// The size of alias font lists
457    pub aliasInfoSize: usize,
458    /// The size of font weight mapping information lists
459    pub adjustInfoSize: usize,
460    /// List of alias fonts
461    pub aliasInfoSet: *mut OH_Drawing_FontAliasInfo,
462    /// Font weight mapping information lists
463    pub adjustInfoSet: *mut OH_Drawing_FontAdjustInfo,
464}
465/// System font configuration information.
466///
467///
468/// Available since API-level: 12
469///
470/// Version: 1.0
471#[cfg(feature = "api-12")]
472#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
473#[repr(C)]
474pub struct OH_Drawing_FontConfigInfo {
475    /// Count of system font file paths
476    pub fontDirSize: usize,
477    /// List size of generic font sets
478    pub fontGenericInfoSize: usize,
479    /// Count of fallback font set lists
480    pub fallbackGroupSize: usize,
481    /// List of system font file paths
482    pub fontDirSet: *mut *mut ::core::ffi::c_char,
483    /// List of generic font sets
484    pub fontGenericInfoSet: *mut OH_Drawing_FontGenericInfo,
485    /// List of fallback font sets
486    pub fallbackGroupSet: *mut OH_Drawing_FontFallbackGroup,
487}
488/// Describes the font information.
489///
490///
491/// Available since API-level: 12
492///
493/// Version: 1.0
494#[cfg(feature = "api-12")]
495#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
496#[repr(C)]
497#[derive(Debug, Copy, Clone)]
498pub struct OH_Drawing_FontDescriptor {
499    /// The file path of System font
500    pub path: *mut ::core::ffi::c_char,
501    /// A name that uniquely identifies the font
502    pub postScriptName: *mut ::core::ffi::c_char,
503    /// The name of System font
504    pub fullName: *mut ::core::ffi::c_char,
505    /// The family of System font
506    pub fontFamily: *mut ::core::ffi::c_char,
507    /// The subfont family of the system font
508    pub fontSubfamily: *mut ::core::ffi::c_char,
509    /// The weight of System font
510    pub weight: ::core::ffi::c_int,
511    /// The width of System font
512    pub width: ::core::ffi::c_int,
513    /// Whether the system font is tilted
514    pub italic: ::core::ffi::c_int,
515    /// Whether the system font is compact
516    pub monoSpace: bool,
517    /// whether symbolic fonts are supported
518    pub symbolic: bool,
519}
520/// The metrics of line.
521///
522///
523/// Available since API-level: 12
524///
525/// Version: 1.0
526#[cfg(feature = "api-12")]
527#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
528#[repr(C)]
529pub struct OH_Drawing_LineMetrics {
530    /// Text ascender height
531    pub ascender: f64,
532    /// Tex descender height
533    pub descender: f64,
534    /// The height of a capital letter
535    pub capHeight: f64,
536    /// The height of a lowercase letter
537    pub xHeight: f64,
538    /// Text width
539    pub width: f64,
540    /// Line height
541    pub height: f64,
542    /// The distance from the left end of the text to the left end of the container,
543    /// aligned to 0, is the width of the container minus the width of the line of text
544    pub x: f64,
545    /// The height from the top of the text to the top of the container, the first line is 0,
546    /// and the second line is the height of the first line
547    pub y: f64,
548    /// Start Index
549    pub startIndex: usize,
550    /// End Index
551    pub endIndex: usize,
552    /// The metrics information of the first character
553    pub firstCharMetrics: OH_Drawing_Font_Metrics,
554}
555#[cfg(feature = "api-12")]
556#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
557impl OH_Drawing_TextHeightBehavior {
558    /// both ascend of first row and last row style
559    pub const TEXT_HEIGHT_ALL: OH_Drawing_TextHeightBehavior = OH_Drawing_TextHeightBehavior(0);
560    /// forbidding ascend of first row style
561    pub const TEXT_HEIGHT_DISABLE_FIRST_ASCENT: OH_Drawing_TextHeightBehavior =
562        OH_Drawing_TextHeightBehavior(1);
563    /// forbidding ascend of last row style
564    pub const TEXT_HEIGHT_DISABLE_LAST_ASCENT: OH_Drawing_TextHeightBehavior =
565        OH_Drawing_TextHeightBehavior(2);
566    /// neither ascend of first row nor last row style
567    pub const TEXT_HEIGHT_DISABLE_ALL: OH_Drawing_TextHeightBehavior =
568        OH_Drawing_TextHeightBehavior(3);
569}
570#[repr(transparent)]
571/// Enumerates of heightmode of text.
572///
573///
574/// Available since API-level: 12
575///
576/// Version: 1.0
577#[cfg(feature = "api-12")]
578#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
579#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
580pub struct OH_Drawing_TextHeightBehavior(pub ::core::ffi::c_uint);
581#[cfg(feature = "api-12")]
582#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
583impl OH_Drawing_TextStyleType {
584    /// None style
585    pub const TEXT_STYLE_NONE: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(0);
586    /// All attributes style
587    pub const TEXT_STYLE_ALL_ATTRIBUTES: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(1);
588    /// Font style
589    pub const TEXT_STYLE_FONT: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(2);
590    /// Foreground style
591    pub const TEXT_STYLE_FOREGROUND: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(3);
592    /// Background style
593    pub const TEXT_STYLE_BACKGROUND: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(4);
594    /// Shadow style
595    pub const TEXT_STYLE_SHADOW: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(5);
596    /// Decorations style
597    pub const TEXT_STYLE_DECORATIONS: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(6);
598    /// Letter spacing style
599    pub const TEXT_STYLE_LETTER_SPACING: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(7);
600    /// Word spacing style
601    pub const TEXT_STYLE_WORD_SPACING: OH_Drawing_TextStyleType = OH_Drawing_TextStyleType(8);
602}
603#[repr(transparent)]
604/// Enumerates text style type.
605///
606///
607/// Available since API-level: 12
608///
609/// Version: 1.0
610#[cfg(feature = "api-12")]
611#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
612#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
613pub struct OH_Drawing_TextStyleType(pub ::core::ffi::c_uint);
614#[cfg(feature = "api-12")]
615#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
616impl OH_Drawing_FontWidth {
617    pub const FONT_WIDTH_ULTRA_CONDENSED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(1);
618    pub const FONT_WIDTH_EXTRA_CONDENSED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(2);
619    pub const FONT_WIDTH_CONDENSED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(3);
620    pub const FONT_WIDTH_SEMI_CONDENSED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(4);
621    pub const FONT_WIDTH_NORMAL: OH_Drawing_FontWidth = OH_Drawing_FontWidth(5);
622    pub const FONT_WIDTH_SEMI_EXPANDED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(6);
623    pub const FONT_WIDTH_EXPANDED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(7);
624    pub const FONT_WIDTH_EXTRA_EXPANDED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(8);
625    pub const FONT_WIDTH_ULTRA_EXPANDED: OH_Drawing_FontWidth = OH_Drawing_FontWidth(9);
626}
627#[repr(transparent)]
628/// Enumerates font width.
629///
630///
631/// Available since API-level: 12
632///
633/// Version: 1.0
634#[cfg(feature = "api-12")]
635#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
636#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
637pub struct OH_Drawing_FontWidth(pub ::core::ffi::c_uint);
638#[cfg(feature = "api-21")]
639#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
640impl OH_Drawing_TextStyleAttributeId {
641    /// Line height maximum
642    pub const TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM: OH_Drawing_TextStyleAttributeId =
643        OH_Drawing_TextStyleAttributeId(0);
644    /// Line height minimum
645    pub const TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM: OH_Drawing_TextStyleAttributeId =
646        OH_Drawing_TextStyleAttributeId(1);
647    /// Line height style
648    pub const TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE: OH_Drawing_TextStyleAttributeId =
649        OH_Drawing_TextStyleAttributeId(2);
650    /// Font width
651    pub const TEXT_STYLE_ATTR_I_FONT_WIDTH: OH_Drawing_TextStyleAttributeId =
652        OH_Drawing_TextStyleAttributeId(3);
653}
654#[repr(transparent)]
655/// Enumerates text style attribute.
656///
657///
658/// Available since API-level: 21
659#[cfg(feature = "api-21")]
660#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
661#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
662pub struct OH_Drawing_TextStyleAttributeId(pub ::core::ffi::c_uint);
663#[cfg(feature = "api-21")]
664#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
665impl OH_Drawing_LineHeightStyle {
666    /// Use the font size as the scale factor for line height scaling
667    pub const TEXT_LINE_HEIGHT_BY_FONT_SIZE: OH_Drawing_LineHeightStyle =
668        OH_Drawing_LineHeightStyle(0);
669    /// Use the text height after shaping as the scale factor for line height scaling
670    pub const TEXT_LINE_HEIGHT_BY_FONT_HEIGHT: OH_Drawing_LineHeightStyle =
671        OH_Drawing_LineHeightStyle(1);
672}
673#[repr(transparent)]
674/// Enumerates line height's scaling type.
675///
676///
677/// Available since API-level: 21
678#[cfg(feature = "api-21")]
679#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
680#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
681pub struct OH_Drawing_LineHeightStyle(pub ::core::ffi::c_uint);
682#[cfg(feature = "api-21")]
683#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
684impl OH_Drawing_TypographyStyleAttributeId {
685    /// Line height maximum
686    pub const TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM: OH_Drawing_TypographyStyleAttributeId =
687        OH_Drawing_TypographyStyleAttributeId(0);
688    /// Line height minimum
689    pub const TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM: OH_Drawing_TypographyStyleAttributeId =
690        OH_Drawing_TypographyStyleAttributeId(1);
691    /// Line spacing
692    pub const TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING: OH_Drawing_TypographyStyleAttributeId =
693        OH_Drawing_TypographyStyleAttributeId(2);
694    /// Line height style
695    pub const TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE: OH_Drawing_TypographyStyleAttributeId =
696        OH_Drawing_TypographyStyleAttributeId(3);
697    /// Font width
698    pub const TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH: OH_Drawing_TypographyStyleAttributeId =
699        OH_Drawing_TypographyStyleAttributeId(4);
700}
701#[repr(transparent)]
702/// Enumerates typography style attribute.
703///
704///
705/// Available since API-level: 21
706#[cfg(feature = "api-21")]
707#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
708#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
709pub struct OH_Drawing_TypographyStyleAttributeId(pub ::core::ffi::c_uint);
710#[cfg(feature = "api-20")]
711#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
712impl OH_Drawing_TextBadgeType {
713    /// No badge
714    pub const TEXT_BADGE_NONE: OH_Drawing_TextBadgeType = OH_Drawing_TextBadgeType(0);
715    /// Superscript
716    pub const TEXT_SUPERSCRIPT: OH_Drawing_TextBadgeType = OH_Drawing_TextBadgeType(1);
717    /// Subscript
718    pub const TEXT_SUBSCRIPT: OH_Drawing_TextBadgeType = OH_Drawing_TextBadgeType(2);
719}
720#[repr(transparent)]
721/// Type of badge.
722///
723///
724/// Available since API-level: 20
725///
726/// Version: 1.0
727#[cfg(feature = "api-20")]
728#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
729#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
730pub struct OH_Drawing_TextBadgeType(pub ::core::ffi::c_uint);
731#[cfg(feature = "api-20")]
732#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
733impl OH_Drawing_TextVerticalAlignment {
734    /// Baseline of text line
735    pub const TEXT_VERTICAL_ALIGNMENT_BASELINE: OH_Drawing_TextVerticalAlignment =
736        OH_Drawing_TextVerticalAlignment(0);
737    /// Bottom of text line
738    pub const TEXT_VERTICAL_ALIGNMENT_BOTTOM: OH_Drawing_TextVerticalAlignment =
739        OH_Drawing_TextVerticalAlignment(1);
740    /// Center of text line
741    pub const TEXT_VERTICAL_ALIGNMENT_CENTER: OH_Drawing_TextVerticalAlignment =
742        OH_Drawing_TextVerticalAlignment(2);
743    /// Top of text line
744    pub const TEXT_VERTICAL_ALIGNMENT_TOP: OH_Drawing_TextVerticalAlignment =
745        OH_Drawing_TextVerticalAlignment(3);
746}
747#[repr(transparent)]
748/// Type of vertical alignment.
749///
750///
751/// Available since API-level: 20
752///
753/// Version: 1.0
754#[cfg(feature = "api-20")]
755#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
756#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
757pub struct OH_Drawing_TextVerticalAlignment(pub ::core::ffi::c_uint);
758/// Defines the font style struct.
759///
760///
761/// Available since API-level: 12
762///
763/// Version: 1.0
764#[cfg(feature = "api-12")]
765#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
766#[repr(C)]
767#[derive(Debug, Copy, Clone)]
768pub struct OH_Drawing_FontStyleStruct {
769    /// Font weight
770    pub weight: OH_Drawing_FontWeight,
771    /// Font width
772    pub width: OH_Drawing_FontWidth,
773    /// Font slant
774    pub slant: OH_Drawing_FontStyle,
775}
776/// Defines the fontfeature.
777///
778///
779/// Available since API-level: 12
780///
781/// Version: 1.0
782#[cfg(feature = "api-12")]
783#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
784#[repr(C)]
785#[derive(Debug, Copy, Clone)]
786pub struct OH_Drawing_FontFeature {
787    /// key of fontfeature
788    pub tag: *mut ::core::ffi::c_char,
789    /// value of fontfeature
790    pub value: ::core::ffi::c_int,
791}
792/// Defines StrutStyle info struct.
793///
794///
795/// Available since API-level: 12
796///
797/// Version: 1.0
798#[cfg(feature = "api-12")]
799#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
800#[repr(C)]
801pub struct OH_Drawing_StrutStyle {
802    /// The font weight to use when calculating the strut
803    pub weight: OH_Drawing_FontWeight,
804    /// The font style to use when calculating the strut
805    pub style: OH_Drawing_FontStyle,
806    /// The size of the ascent plus descent in logical pixels
807    pub size: f64,
808    /// The minimum height of the strut, as a multiple of fontSize
809    pub heightScale: f64,
810    /// Whether the height is override
811    pub heightOverride: bool,
812    /// Whether the halfleading is enable
813    pub halfLeading: bool,
814    /// The additional leading to apply to the strut as a multiple of Size
815    pub leading: f64,
816    /// Whether the strut height should be forced
817    pub forceStrutHeight: bool,
818    /// The size of font families
819    pub familiesSize: usize,
820    /// The families of the font to use when calculating the strut
821    pub families: *mut *mut ::core::ffi::c_char,
822}
823extern "C" {
824    /// Sets double value to the text style attribute.
825    ///
826    /// # Arguments
827    ///
828    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
829    ///
830    /// * `id` - Indicates the attribute id.
831    ///
832    /// * `value` - Indicates the value to set.
833    ///
834    /// # Returns
835    ///
836    /// * Returns the error code.
837    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
838    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
839    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
840    /// Returns [`OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE`] if the value corresponding to the attribute id
841    /// exceeds the allowable range.
842    ///
843    /// Available since API-level: 21
844    #[cfg(feature = "api-21")]
845    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
846    pub fn OH_Drawing_SetTextStyleAttributeDouble(
847        style: *mut OH_Drawing_TextStyle,
848        id: OH_Drawing_TextStyleAttributeId,
849        value: f64,
850    ) -> crate::error_code::DrawingResult;
851    /// Gets the double type property's value from the text style.
852    ///
853    /// # Arguments
854    ///
855    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
856    ///
857    /// * `id` - Indicates the attribute id.
858    ///
859    /// * `value` - Indicates the return value of the interface.
860    ///
861    /// # Returns
862    ///
863    /// * Returns the error code.
864    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
865    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
866    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
867    ///
868    /// Available since API-level: 21
869    #[cfg(feature = "api-21")]
870    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
871    pub fn OH_Drawing_GetTextStyleAttributeDouble(
872        style: *mut OH_Drawing_TextStyle,
873        id: OH_Drawing_TextStyleAttributeId,
874        value: *mut f64,
875    ) -> crate::error_code::DrawingResult;
876    /// Sets int value to the text style attribute.
877    ///
878    /// # Arguments
879    ///
880    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
881    ///
882    /// * `id` - Indicates the attribute id.
883    ///
884    /// * `value` - Indicates the value to set.
885    ///
886    /// # Returns
887    ///
888    /// * Returns the error code.
889    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
890    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
891    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
892    /// Returns [`OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE`] if the value corresponding to the attribute id
893    /// exceeds the allowable range.
894    ///
895    /// Available since API-level: 21
896    #[cfg(feature = "api-21")]
897    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
898    pub fn OH_Drawing_SetTextStyleAttributeInt(
899        style: *mut OH_Drawing_TextStyle,
900        id: OH_Drawing_TextStyleAttributeId,
901        value: ::core::ffi::c_int,
902    ) -> crate::error_code::DrawingResult;
903    /// Gets the int type property's value from the text style.
904    ///
905    /// # Arguments
906    ///
907    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
908    ///
909    /// * `id` - Indicates the attribute id.
910    ///
911    /// * `value` - Indicates the return value of the interface.
912    ///
913    /// # Returns
914    ///
915    /// * Returns the error code.
916    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
917    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
918    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
919    ///
920    /// Available since API-level: 21
921    #[cfg(feature = "api-21")]
922    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
923    pub fn OH_Drawing_GetTextStyleAttributeInt(
924        style: *mut OH_Drawing_TextStyle,
925        id: OH_Drawing_TextStyleAttributeId,
926        value: *mut ::core::ffi::c_int,
927    ) -> crate::error_code::DrawingResult;
928    /// Sets double value to the typography style attribute.
929    ///
930    /// # Arguments
931    ///
932    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
933    ///
934    /// * `id` - Indicates the attribute id.
935    ///
936    /// * `value` - Indicates the value to set.
937    ///
938    /// # Returns
939    ///
940    /// * Returns the error code.
941    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
942    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
943    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
944    /// Returns [`OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE`] if the value corresponding to the attribute id
945    /// exceeds the allowable range.
946    ///
947    /// Available since API-level: 21
948    #[cfg(feature = "api-21")]
949    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
950    pub fn OH_Drawing_SetTypographyStyleAttributeDouble(
951        style: *mut OH_Drawing_TypographyStyle,
952        id: OH_Drawing_TypographyStyleAttributeId,
953        value: f64,
954    ) -> crate::error_code::DrawingResult;
955    /// Gets the double type property's value from the typography style.
956    ///
957    /// # Arguments
958    ///
959    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
960    ///
961    /// * `id` - Indicates the attribute id.
962    ///
963    /// * `value` - Indicates the return value of the interface.
964    ///
965    /// # Returns
966    ///
967    /// * Returns the error code.
968    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
969    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
970    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
971    ///
972    /// Available since API-level: 21
973    #[cfg(feature = "api-21")]
974    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
975    pub fn OH_Drawing_GetTypographyStyleAttributeDouble(
976        style: *mut OH_Drawing_TypographyStyle,
977        id: OH_Drawing_TypographyStyleAttributeId,
978        value: *mut f64,
979    ) -> crate::error_code::DrawingResult;
980    /// Sets int value to the typography style attribute.
981    ///
982    /// # Arguments
983    ///
984    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
985    ///
986    /// * `id` - Indicates the attribute id.
987    ///
988    /// * `value` - Indicates the value to set.
989    ///
990    /// # Returns
991    ///
992    /// * Returns the error code.
993    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
994    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
995    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
996    /// Returns [`OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE`] if the value corresponding to the attribute id
997    /// exceeds the allowable range.
998    ///
999    /// Available since API-level: 21
1000    #[cfg(feature = "api-21")]
1001    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
1002    pub fn OH_Drawing_SetTypographyStyleAttributeInt(
1003        style: *mut OH_Drawing_TypographyStyle,
1004        id: OH_Drawing_TypographyStyleAttributeId,
1005        value: ::core::ffi::c_int,
1006    ) -> crate::error_code::DrawingResult;
1007    /// Gets the int type property's value from the typography style.
1008    ///
1009    /// # Arguments
1010    ///
1011    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1012    ///
1013    /// * `id` - Indicates the attribute id.
1014    ///
1015    /// * `value` - Indicates the return value of the interface.
1016    ///
1017    /// # Returns
1018    ///
1019    /// * Returns the error code.
1020    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
1021    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if the style is nullptr.
1022    /// Returns [`OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH`] if the attribute id is not recognized or supported.
1023    ///
1024    /// Available since API-level: 21
1025    #[cfg(feature = "api-21")]
1026    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
1027    pub fn OH_Drawing_GetTypographyStyleAttributeInt(
1028        style: *mut OH_Drawing_TypographyStyle,
1029        id: OH_Drawing_TypographyStyleAttributeId,
1030        value: *mut ::core::ffi::c_int,
1031    ) -> crate::error_code::DrawingResult;
1032    /// Creates an <b>OH_Drawing_TypographyStyle</b> object.
1033    ///
1034    ///
1035    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1036    ///
1037    /// # Returns
1038    ///
1039    /// * Returns the pointer to the <b>OH_Drawing_TypographyStyle</b> object created.
1040    ///
1041    /// Available since API-level: 8
1042    ///
1043    /// Version: 1.0
1044    pub fn OH_Drawing_CreateTypographyStyle() -> *mut OH_Drawing_TypographyStyle;
1045    /// Releases the memory occupied by an <b>OH_Drawing_TypographyStyle</b> object.
1046    ///
1047    ///
1048    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1049    /// # Arguments
1050    ///
1051    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1052    ///
1053    /// Available since API-level: 8
1054    ///
1055    /// Version: 1.0
1056    pub fn OH_Drawing_DestroyTypographyStyle(style: *mut OH_Drawing_TypographyStyle);
1057    /// Sets the text direction.
1058    ///
1059    ///
1060    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1061    /// # Arguments
1062    ///
1063    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1064    ///
1065    /// * `direction` - Indicates the text direction to set. For details, see the enum <b>OH_Drawing_TextDirection</b>.
1066    ///
1067    /// Available since API-level: 8
1068    ///
1069    /// Version: 1.0
1070    pub fn OH_Drawing_SetTypographyTextDirection(
1071        style: *mut OH_Drawing_TypographyStyle,
1072        direction: ::core::ffi::c_int,
1073    );
1074    /// Sets the text alignment mode.
1075    ///
1076    ///
1077    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1078    /// # Arguments
1079    ///
1080    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1081    ///
1082    /// * `align` - Indicates the text alignment mode to set. For details, see the enum <b>OH_Drawing_TextAlign</b>.
1083    ///
1084    /// Available since API-level: 8
1085    ///
1086    /// Version: 1.0
1087    pub fn OH_Drawing_SetTypographyTextAlign(
1088        style: *mut OH_Drawing_TypographyStyle,
1089        align: ::core::ffi::c_int,
1090    );
1091    /// Sets the maximum number of lines in a text file.
1092    ///
1093    ///
1094    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1095    /// # Arguments
1096    ///
1097    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1098    ///
1099    /// * `lineNumber` - Indicates the maximum number of lines to set.
1100    ///
1101    /// Available since API-level: 8
1102    ///
1103    /// Version: 1.0
1104    pub fn OH_Drawing_SetTypographyTextMaxLines(
1105        style: *mut OH_Drawing_TypographyStyle,
1106        lineNumber: ::core::ffi::c_int,
1107    );
1108    /// Creates an <b>OH_Drawing_TextStyle</b> object.
1109    ///
1110    ///
1111    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1112    ///
1113    /// # Returns
1114    ///
1115    /// * Returns the pointer to the <b>OH_Drawing_TextStyle</b> object created.
1116    ///
1117    /// Available since API-level: 8
1118    ///
1119    /// Version: 1.0
1120    pub fn OH_Drawing_CreateTextStyle() -> *mut OH_Drawing_TextStyle;
1121    /// Releases the memory occupied by an <b>OH_Drawing_TextStyle</b> object.
1122    ///
1123    ///
1124    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1125    /// # Arguments
1126    ///
1127    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1128    ///
1129    /// Available since API-level: 8
1130    ///
1131    /// Version: 1.0
1132    pub fn OH_Drawing_DestroyTextStyle(style: *mut OH_Drawing_TextStyle);
1133    /// Sets the text color.
1134    ///
1135    ///
1136    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1137    /// # Arguments
1138    ///
1139    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1140    ///
1141    /// * `color` - Indicates the color to set.
1142    ///
1143    /// Available since API-level: 8
1144    ///
1145    /// Version: 1.0
1146    pub fn OH_Drawing_SetTextStyleColor(style: *mut OH_Drawing_TextStyle, color: u32);
1147    /// Sets the font size.
1148    ///
1149    ///
1150    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1151    /// # Arguments
1152    ///
1153    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1154    ///
1155    /// * `fontSize` - Indicates the font size to set.
1156    ///
1157    /// Available since API-level: 8
1158    ///
1159    /// Version: 1.0
1160    pub fn OH_Drawing_SetTextStyleFontSize(style: *mut OH_Drawing_TextStyle, fontSize: f64);
1161    /// Sets the font weight.
1162    ///
1163    ///
1164    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1165    /// # Arguments
1166    ///
1167    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1168    ///
1169    /// * `fontWeight` - Indicates the font weight to set. For details, see the enum <b>OH_Drawing_FontWeight</b>.
1170    ///
1171    /// Available since API-level: 8
1172    ///
1173    /// Version: 1.0
1174    pub fn OH_Drawing_SetTextStyleFontWeight(
1175        style: *mut OH_Drawing_TextStyle,
1176        fontWeight: ::core::ffi::c_int,
1177    );
1178    /// Sets the text baseline.
1179    ///
1180    ///
1181    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1182    /// # Arguments
1183    ///
1184    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1185    ///
1186    /// * `baseline` - Indicates the text baseline to set. For details, see the enum <b>OH_Drawing_TextBaseline</b>.
1187    ///
1188    /// Available since API-level: 8
1189    ///
1190    /// Version: 1.0
1191    pub fn OH_Drawing_SetTextStyleBaseLine(
1192        style: *mut OH_Drawing_TextStyle,
1193        baseline: ::core::ffi::c_int,
1194    );
1195    /// Sets the text decoration.
1196    ///
1197    ///
1198    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1199    /// # Arguments
1200    ///
1201    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1202    ///
1203    /// * `decoration` - Indicates the text decoration to set. For details, see the enum <b>OH_Drawing_TextDecoration</b>.
1204    ///
1205    /// Available since API-level: 8
1206    ///
1207    /// Version: 1.0
1208    pub fn OH_Drawing_SetTextStyleDecoration(
1209        style: *mut OH_Drawing_TextStyle,
1210        decoration: ::core::ffi::c_int,
1211    );
1212    /// Add the text decoration.
1213    ///
1214    ///
1215    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1216    /// # Arguments
1217    ///
1218    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1219    ///
1220    /// * `decoration` - Indicates the text decoration to add. For details, see the enum <b>OH_Drawing_TextDecoration</b>.
1221    ///
1222    /// Available since API-level: 18
1223    ///
1224    /// Version: 1.0
1225    #[cfg(feature = "api-18")]
1226    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1227    pub fn OH_Drawing_AddTextStyleDecoration(
1228        style: *mut OH_Drawing_TextStyle,
1229        decoration: ::core::ffi::c_int,
1230    );
1231    /// Remove the text decoration.
1232    ///
1233    ///
1234    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1235    /// # Arguments
1236    ///
1237    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1238    ///
1239    /// * `decoration` - Indicates the text decoration to remove, shoud be match existing text decorations.
1240    /// For details, see the enum <b>OH_Drawing_TextDecoration</b>.
1241    ///
1242    /// Available since API-level: 18
1243    ///
1244    /// Version: 1.0
1245    #[cfg(feature = "api-18")]
1246    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1247    pub fn OH_Drawing_RemoveTextStyleDecoration(
1248        style: *mut OH_Drawing_TextStyle,
1249        decoration: ::core::ffi::c_int,
1250    );
1251    /// Sets the color for the text decoration.
1252    ///
1253    ///
1254    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1255    /// # Arguments
1256    ///
1257    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1258    ///
1259    /// * `color` - Indicates the color to set.
1260    ///
1261    /// Available since API-level: 8
1262    ///
1263    /// Version: 1.0
1264    pub fn OH_Drawing_SetTextStyleDecorationColor(style: *mut OH_Drawing_TextStyle, color: u32);
1265    /// Sets the font height.
1266    ///
1267    ///
1268    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1269    /// # Arguments
1270    ///
1271    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1272    ///
1273    /// * `fontHeight` - Indicates the font height to set.
1274    ///
1275    /// Available since API-level: 8
1276    ///
1277    /// Version: 1.0
1278    pub fn OH_Drawing_SetTextStyleFontHeight(style: *mut OH_Drawing_TextStyle, fontHeight: f64);
1279    /// Sets the font families.
1280    ///
1281    ///
1282    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1283    /// # Arguments
1284    ///
1285    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1286    ///
1287    /// * `fontFamiliesNumber` - Indicates the number of font families to set.
1288    ///
1289    /// * `fontFamilies` - Indicates the pointer to the font families to set.
1290    ///
1291    /// Available since API-level: 8
1292    ///
1293    /// Version: 1.0
1294    pub fn OH_Drawing_SetTextStyleFontFamilies(
1295        style: *mut OH_Drawing_TextStyle,
1296        fontFamiliesNumber: ::core::ffi::c_int,
1297        fontFamilies: *mut *const ::core::ffi::c_char,
1298    );
1299    /// Sets the font style.
1300    ///
1301    ///
1302    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1303    /// # Arguments
1304    ///
1305    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1306    ///
1307    /// * `fontStyle` - Indicates the font style to set. For details, see the enum <b>OH_Drawing_FontStyle</b>.
1308    ///
1309    /// Available since API-level: 8
1310    ///
1311    /// Version: 1.0
1312    pub fn OH_Drawing_SetTextStyleFontStyle(
1313        style: *mut OH_Drawing_TextStyle,
1314        fontStyle: ::core::ffi::c_int,
1315    );
1316    /// Sets the locale.
1317    ///
1318    ///
1319    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1320    /// # Arguments
1321    ///
1322    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1323    ///
1324    /// * `locale` - Indicates the pointer to the locale to set.
1325    ///
1326    /// Available since API-level: 8
1327    ///
1328    /// Version: 1.0
1329    pub fn OH_Drawing_SetTextStyleLocale(
1330        style: *mut OH_Drawing_TextStyle,
1331        locale: *const ::core::ffi::c_char,
1332    );
1333    /// Sets the foreground brush style.
1334    ///
1335    ///
1336    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1337    /// # Arguments
1338    ///
1339    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1340    ///
1341    /// * `foregroundBrush` - Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.
1342    ///
1343    /// Available since API-level: 12
1344    ///
1345    /// Version: 1.0
1346    #[cfg(feature = "api-12")]
1347    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1348    pub fn OH_Drawing_SetTextStyleForegroundBrush(
1349        style: *mut OH_Drawing_TextStyle,
1350        foregroundBrush: *mut OH_Drawing_Brush,
1351    );
1352    /// Gets the foreground brush style.
1353    ///
1354    ///
1355    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1356    /// # Arguments
1357    ///
1358    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1359    ///
1360    /// * `foregroundBrush` - Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.
1361    ///
1362    /// Available since API-level: 12
1363    ///
1364    /// Version: 1.0
1365    #[cfg(feature = "api-12")]
1366    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1367    pub fn OH_Drawing_TextStyleGetForegroundBrush(
1368        style: *mut OH_Drawing_TextStyle,
1369        foregroundBrush: *mut OH_Drawing_Brush,
1370    );
1371    /// Sets the foreground pen style.
1372    ///
1373    ///
1374    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1375    /// # Arguments
1376    ///
1377    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1378    ///
1379    /// * `foregroundPen` - Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.
1380    ///
1381    /// Available since API-level: 12
1382    ///
1383    /// Version: 1.0
1384    #[cfg(feature = "api-12")]
1385    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1386    pub fn OH_Drawing_SetTextStyleForegroundPen(
1387        style: *mut OH_Drawing_TextStyle,
1388        foregroundPen: *mut OH_Drawing_Pen,
1389    );
1390    /// Gets the foreground pen style.
1391    ///
1392    ///
1393    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1394    /// # Arguments
1395    ///
1396    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1397    ///
1398    /// * `foregroundPen` - Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.
1399    ///
1400    /// Available since API-level: 12
1401    ///
1402    /// Version: 1.0
1403    #[cfg(feature = "api-12")]
1404    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1405    pub fn OH_Drawing_TextStyleGetForegroundPen(
1406        style: *mut OH_Drawing_TextStyle,
1407        foregroundPen: *mut OH_Drawing_Pen,
1408    );
1409    /// Sets the background brush style.
1410    ///
1411    ///
1412    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1413    /// # Arguments
1414    ///
1415    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1416    ///
1417    /// * `foregroundPen` - Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.
1418    ///
1419    /// Available since API-level: 12
1420    ///
1421    /// Version: 1.0
1422    #[cfg(feature = "api-12")]
1423    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1424    pub fn OH_Drawing_SetTextStyleBackgroundBrush(
1425        style: *mut OH_Drawing_TextStyle,
1426        foregroundPen: *mut OH_Drawing_Brush,
1427    );
1428    /// Gets the background brush style.
1429    ///
1430    ///
1431    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1432    /// # Arguments
1433    ///
1434    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1435    ///
1436    /// * `backgroundBrush` - Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.
1437    ///
1438    /// Available since API-level: 12
1439    ///
1440    /// Version: 1.0
1441    #[cfg(feature = "api-12")]
1442    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1443    pub fn OH_Drawing_TextStyleGetBackgroundBrush(
1444        style: *mut OH_Drawing_TextStyle,
1445        backgroundBrush: *mut OH_Drawing_Brush,
1446    );
1447    /// Sets the background pen style.
1448    ///
1449    ///
1450    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1451    /// # Arguments
1452    ///
1453    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1454    ///
1455    /// * `backgroundPen` - Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.
1456    ///
1457    /// Available since API-level: 12
1458    ///
1459    /// Version: 1.0
1460    #[cfg(feature = "api-12")]
1461    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1462    pub fn OH_Drawing_SetTextStyleBackgroundPen(
1463        style: *mut OH_Drawing_TextStyle,
1464        backgroundPen: *mut OH_Drawing_Pen,
1465    );
1466    /// Gets the background pen style.
1467    ///
1468    ///
1469    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1470    /// # Arguments
1471    ///
1472    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
1473    ///
1474    /// * `backgroundPen` - Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.
1475    ///
1476    /// Available since API-level: 12
1477    ///
1478    /// Version: 1.0
1479    #[cfg(feature = "api-12")]
1480    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1481    pub fn OH_Drawing_TextStyleGetBackgroundPen(
1482        style: *mut OH_Drawing_TextStyle,
1483        backgroundPen: *mut OH_Drawing_Pen,
1484    );
1485    /// Creates a pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1486    ///
1487    ///
1488    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1489    /// # Arguments
1490    ///
1491    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1492    ///
1493    /// * `fontCollection` - Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.
1494    ///
1495    /// # Returns
1496    ///
1497    /// * Returns the pointer to the <b>OH_Drawing_TypographyCreate</b> object created.
1498    ///
1499    /// Available since API-level: 8
1500    ///
1501    /// Version: 1.0
1502    pub fn OH_Drawing_CreateTypographyHandler(
1503        style: *mut OH_Drawing_TypographyStyle,
1504        fontCollection: *mut OH_Drawing_FontCollection,
1505    ) -> *mut OH_Drawing_TypographyCreate;
1506    /// Releases the memory occupied by an <b>OH_Drawing_TypographyCreate</b> object.
1507    ///
1508    ///
1509    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1510    /// # Arguments
1511    ///
1512    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1513    ///
1514    /// Available since API-level: 8
1515    ///
1516    /// Version: 1.0
1517    pub fn OH_Drawing_DestroyTypographyHandler(handler: *mut OH_Drawing_TypographyCreate);
1518    /// Sets the text style.
1519    ///
1520    ///
1521    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1522    /// # Arguments
1523    ///
1524    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1525    ///
1526    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1527    ///
1528    /// Available since API-level: 8
1529    ///
1530    /// Version: 1.0
1531    pub fn OH_Drawing_TypographyHandlerPushTextStyle(
1532        handler: *mut OH_Drawing_TypographyCreate,
1533        style: *mut OH_Drawing_TextStyle,
1534    );
1535    /// Sets the text content.
1536    ///
1537    ///
1538    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1539    /// # Arguments
1540    ///
1541    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1542    ///
1543    /// * `text` - Indicates the pointer to the text content to set.
1544    ///
1545    /// Available since API-level: 8
1546    ///
1547    /// Version: 1.0
1548    pub fn OH_Drawing_TypographyHandlerAddText(
1549        handler: *mut OH_Drawing_TypographyCreate,
1550        text: *const ::core::ffi::c_char,
1551    );
1552    /// Removes the topmost style in the stack, leaving the remaining styles in effect.
1553    ///
1554    ///
1555    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1556    /// # Arguments
1557    ///
1558    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1559    ///
1560    /// Available since API-level: 8
1561    ///
1562    /// Version: 1.0
1563    pub fn OH_Drawing_TypographyHandlerPopTextStyle(handler: *mut OH_Drawing_TypographyCreate);
1564    /// Creates an <b>OH_Drawing_Typography</b> object.
1565    ///
1566    ///
1567    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1568    /// # Arguments
1569    ///
1570    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1571    ///
1572    /// # Returns
1573    ///
1574    /// * Returns the pointer to the <b>OH_Drawing_Typography</b> object created.
1575    ///
1576    /// Available since API-level: 8
1577    ///
1578    /// Version: 1.0
1579    pub fn OH_Drawing_CreateTypography(
1580        handler: *mut OH_Drawing_TypographyCreate,
1581    ) -> *mut OH_Drawing_Typography;
1582    /// Releases the memory occupied by an <b>OH_Drawing_Typography</b> object.
1583    ///
1584    ///
1585    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1586    /// # Arguments
1587    ///
1588    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1589    ///
1590    /// Available since API-level: 8
1591    ///
1592    /// Version: 1.0
1593    pub fn OH_Drawing_DestroyTypography(typography: *mut OH_Drawing_Typography);
1594    /// Lays out the typography.
1595    ///
1596    ///
1597    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1598    /// # Arguments
1599    ///
1600    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1601    ///
1602    /// * `maxWidth` - Indicates the maximum text width to set.
1603    ///
1604    /// Available since API-level: 8
1605    ///
1606    /// Version: 1.0
1607    pub fn OH_Drawing_TypographyLayout(typography: *mut OH_Drawing_Typography, maxWidth: f64);
1608    /// Paints text on the canvas.
1609    ///
1610    ///
1611    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1612    /// # Arguments
1613    ///
1614    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1615    ///
1616    /// * `canvas` - Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
1617    ///
1618    /// * `potisionX` - Indicates the x coordinate.
1619    ///
1620    /// * `potisionY` - Indicates the y coordinate.
1621    ///
1622    /// Available since API-level: 8
1623    ///
1624    /// Version: 1.0
1625    pub fn OH_Drawing_TypographyPaint(
1626        typography: *mut OH_Drawing_Typography,
1627        canvas: *mut OH_Drawing_Canvas,
1628        potisionX: f64,
1629        potisionY: f64,
1630    );
1631    /// Paints path text on the canvas.
1632    ///
1633    ///
1634    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1635    /// # Arguments
1636    ///
1637    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1638    ///
1639    /// * `canvas` - Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
1640    ///
1641    /// * `path` - Indicates path information.
1642    ///
1643    /// * `hOffset` - Indicates the distance along the path to add to the text's starting position.
1644    ///
1645    /// * `vOffset` - Indicates the distance above(-) or below(+) the path to position the text.
1646    ///
1647    /// Available since API-level: 12
1648    ///
1649    /// Version: 1.0
1650    #[cfg(feature = "api-12")]
1651    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1652    pub fn OH_Drawing_TypographyPaintOnPath(
1653        typography: *mut OH_Drawing_Typography,
1654        canvas: *mut OH_Drawing_Canvas,
1655        path: *mut OH_Drawing_Path,
1656        hOffset: f64,
1657        vOffset: f64,
1658    );
1659    /// Gets the max width.
1660    ///
1661    ///
1662    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1663    /// # Arguments
1664    ///
1665    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1666    ///
1667    /// # Returns
1668    ///
1669    /// * Returns the max width.
1670    ///
1671    /// Available since API-level: 9
1672    ///
1673    /// Version: 1.1
1674    pub fn OH_Drawing_TypographyGetMaxWidth(typography: *mut OH_Drawing_Typography) -> f64;
1675    /// Gets the height.
1676    ///
1677    ///
1678    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1679    /// # Arguments
1680    ///
1681    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1682    ///
1683    /// # Returns
1684    ///
1685    /// * Returns the height.
1686    ///
1687    /// Available since API-level: 9
1688    ///
1689    /// Version: 1.1
1690    pub fn OH_Drawing_TypographyGetHeight(typography: *mut OH_Drawing_Typography) -> f64;
1691    /// Obtains the width of the longest line. You are advised to round up the return value in actual use.
1692    /// When the text content is empty, the minimum float value,
1693    /// that is, -340282346638528859811704183484516925440.000000, is returned.
1694    ///
1695    ///
1696    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1697    /// # Arguments
1698    ///
1699    /// * `typography` - Pointer to an <b>OH_Drawing_Typography</b> object, which is obtained by
1700    /// [`OH_Drawing_CreateTypography`].
1701    ///
1702    /// # Returns
1703    ///
1704    /// * Returns the width of the longest line.
1705    ///
1706    /// Available since API-level: 9
1707    ///
1708    /// Version: 1.1
1709    pub fn OH_Drawing_TypographyGetLongestLine(typography: *mut OH_Drawing_Typography) -> f64;
1710    /// Obtains the width of the longest line with indent. You are advised to
1711    /// round up the return value in actual use. When the text content is empty, the
1712    /// minimum float value, that is, 0.0, is returned.
1713    ///
1714    ///
1715    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1716    /// # Arguments
1717    ///
1718    /// * `typography` - Pointer to an <b>OH_Drawing_Typography</b> object, which is obtained by
1719    /// [`OH_Drawing_CreateTypography`].
1720    ///
1721    /// # Returns
1722    ///
1723    /// * Returns the width of the longest line with indent.
1724    ///
1725    /// Available since API-level: 13
1726    ///
1727    /// Version: 1.1
1728    #[cfg(feature = "api-13")]
1729    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
1730    pub fn OH_Drawing_TypographyGetLongestLineWithIndent(
1731        typography: *mut OH_Drawing_Typography,
1732    ) -> f64;
1733    /// Gets the min intrinsic width.
1734    ///
1735    ///
1736    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1737    /// # Arguments
1738    ///
1739    /// * `typography` - the pointer to an <b>OH_Drawing_Typography</b> object.
1740    ///
1741    /// # Returns
1742    ///
1743    /// * Returns the min intrinsic width.
1744    ///
1745    /// Available since API-level: 9
1746    ///
1747    /// Version: 1.1
1748    pub fn OH_Drawing_TypographyGetMinIntrinsicWidth(typography: *mut OH_Drawing_Typography)
1749        -> f64;
1750    /// Gets the max intrinsic width.
1751    ///
1752    ///
1753    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1754    /// # Arguments
1755    ///
1756    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1757    ///
1758    /// # Returns
1759    ///
1760    /// * Returns the max intrinsic width.
1761    ///
1762    /// Available since API-level: 9
1763    ///
1764    /// Version: 1.1
1765    pub fn OH_Drawing_TypographyGetMaxIntrinsicWidth(typography: *mut OH_Drawing_Typography)
1766        -> f64;
1767    /// Gets the alphabetic baseline.
1768    ///
1769    ///
1770    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1771    /// # Arguments
1772    ///
1773    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1774    ///
1775    /// # Returns
1776    ///
1777    /// * Returns the alphabetic baseline.
1778    ///
1779    /// Available since API-level: 9
1780    ///
1781    /// Version: 1.1
1782    pub fn OH_Drawing_TypographyGetAlphabeticBaseline(
1783        typography: *mut OH_Drawing_Typography,
1784    ) -> f64;
1785    /// Gets the ideographic baseline.
1786    ///
1787    ///
1788    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1789    /// # Arguments
1790    ///
1791    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1792    ///
1793    /// # Returns
1794    ///
1795    /// * Returns the ideographic baseline.
1796    ///
1797    /// Available since API-level: 9
1798    ///
1799    /// Version: 1.1
1800    pub fn OH_Drawing_TypographyGetIdeographicBaseline(
1801        typography: *mut OH_Drawing_Typography,
1802    ) -> f64;
1803    /// Sets the placeholder.
1804    ///
1805    ///
1806    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1807    /// # Arguments
1808    ///
1809    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1810    ///
1811    /// * `span` - Indicates the pointer to an <b>OH_Drawing_PlaceholderSpan</b> object.
1812    ///
1813    /// Available since API-level: 11
1814    ///
1815    /// Version: 1.0
1816    #[cfg(feature = "api-11")]
1817    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1818    pub fn OH_Drawing_TypographyHandlerAddPlaceholder(
1819        handler: *mut OH_Drawing_TypographyCreate,
1820        span: *mut OH_Drawing_PlaceholderSpan,
1821    );
1822    /// Gets the exceed maxLines.
1823    ///
1824    ///
1825    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1826    /// # Arguments
1827    ///
1828    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1829    ///
1830    /// # Returns
1831    ///
1832    /// * Returns the exceed maxLines.
1833    ///
1834    /// Available since API-level: 11
1835    ///
1836    /// Version: 1.0
1837    #[cfg(feature = "api-11")]
1838    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1839    pub fn OH_Drawing_TypographyDidExceedMaxLines(typography: *mut OH_Drawing_Typography) -> bool;
1840    /// Gets the rects for range.
1841    ///
1842    ///
1843    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1844    /// # Arguments
1845    ///
1846    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1847    ///
1848    /// * `start` - Indicates the start of range to set.
1849    ///
1850    /// * `end` - Indicates the end of range to set.
1851    ///
1852    /// * `heightStyle` - Indicates the height style to set.
1853    /// For details, see the enum <b>OH_Drawing_RectHeightStyle</b>.
1854    ///
1855    /// * `widthStyle` - Indicates the width style to set.
1856    /// For details, see the enum <b>OH_Drawing_RectWidthStyle</b>.
1857    ///
1858    /// # Returns
1859    ///
1860    /// * Returns the rects for range.
1861    ///
1862    /// Available since API-level: 11
1863    ///
1864    /// Version: 1.0
1865    #[cfg(feature = "api-11")]
1866    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1867    pub fn OH_Drawing_TypographyGetRectsForRange(
1868        typography: *mut OH_Drawing_Typography,
1869        start: usize,
1870        end: usize,
1871        heightStyle: OH_Drawing_RectHeightStyle,
1872        widthStyle: OH_Drawing_RectWidthStyle,
1873    ) -> *mut OH_Drawing_TextBox;
1874    /// Gets the rects for placeholders.
1875    ///
1876    ///
1877    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1878    /// # Arguments
1879    ///
1880    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1881    ///
1882    /// # Returns
1883    ///
1884    /// * Returns the rects for placeholders.
1885    ///
1886    /// Available since API-level: 11
1887    ///
1888    /// Version: 1.0
1889    #[cfg(feature = "api-11")]
1890    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1891    pub fn OH_Drawing_TypographyGetRectsForPlaceholders(
1892        typography: *mut OH_Drawing_Typography,
1893    ) -> *mut OH_Drawing_TextBox;
1894    /// Gets left from textbox.
1895    ///
1896    ///
1897    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1898    /// # Arguments
1899    ///
1900    /// * `textbox` - Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1901    ///
1902    /// * `index` - Indicates the index of textbox.
1903    ///
1904    /// # Returns
1905    ///
1906    /// * Returns left from textbox.
1907    ///
1908    /// Available since API-level: 11
1909    ///
1910    /// Version: 1.0
1911    #[cfg(feature = "api-11")]
1912    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1913    pub fn OH_Drawing_GetLeftFromTextBox(
1914        textbox: *mut OH_Drawing_TextBox,
1915        index: ::core::ffi::c_int,
1916    ) -> f32;
1917    /// Gets right from textbox.
1918    ///
1919    ///
1920    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1921    /// # Arguments
1922    ///
1923    /// * `textbox` - Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1924    ///
1925    /// * `index` - Indicates the index of textbox.
1926    ///
1927    /// # Returns
1928    ///
1929    /// * Returns right from textbox.
1930    ///
1931    /// Available since API-level: 11
1932    ///
1933    /// Version: 1.0
1934    #[cfg(feature = "api-11")]
1935    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1936    pub fn OH_Drawing_GetRightFromTextBox(
1937        textbox: *mut OH_Drawing_TextBox,
1938        index: ::core::ffi::c_int,
1939    ) -> f32;
1940    /// Gets top from textbox.
1941    ///
1942    ///
1943    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1944    /// # Arguments
1945    ///
1946    /// * `textbox` - Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1947    ///
1948    /// * `index` - Indicates the index of textbox.
1949    ///
1950    /// # Returns
1951    ///
1952    /// * Returns top from textbox.
1953    ///
1954    /// Available since API-level: 11
1955    ///
1956    /// Version: 1.0
1957    #[cfg(feature = "api-11")]
1958    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1959    pub fn OH_Drawing_GetTopFromTextBox(
1960        textbox: *mut OH_Drawing_TextBox,
1961        index: ::core::ffi::c_int,
1962    ) -> f32;
1963    /// Gets bottom from textbox.
1964    ///
1965    ///
1966    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1967    /// # Arguments
1968    ///
1969    /// * `textbox` - Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1970    ///
1971    /// * `index` - Indicates the index of textbox.
1972    ///
1973    /// # Returns
1974    ///
1975    /// * Returns bottom from textbox.
1976    ///
1977    /// Available since API-level: 11
1978    ///
1979    /// Version: 1.0
1980    #[cfg(feature = "api-11")]
1981    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1982    pub fn OH_Drawing_GetBottomFromTextBox(
1983        textbox: *mut OH_Drawing_TextBox,
1984        index: ::core::ffi::c_int,
1985    ) -> f32;
1986    /// Gets direction from textbox.
1987    ///
1988    ///
1989    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1990    /// # Arguments
1991    ///
1992    /// * `textbox` - Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1993    ///
1994    /// * `index` - Indicates the index of textbox.
1995    ///
1996    /// # Returns
1997    ///
1998    /// * Returns direction from textbox.
1999    ///
2000    /// Available since API-level: 11
2001    ///
2002    /// Version: 1.0
2003    #[cfg(feature = "api-11")]
2004    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2005    pub fn OH_Drawing_GetTextDirectionFromTextBox(
2006        textbox: *mut OH_Drawing_TextBox,
2007        index: ::core::ffi::c_int,
2008    ) -> ::core::ffi::c_int;
2009    /// Gets size of textBox.
2010    ///
2011    ///
2012    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2013    /// # Arguments
2014    ///
2015    /// * `textBox` - Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
2016    ///
2017    /// # Returns
2018    ///
2019    /// * Returns size of textBox.
2020    ///
2021    /// Available since API-level: 11
2022    ///
2023    /// Version: 1.0
2024    #[cfg(feature = "api-11")]
2025    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2026    pub fn OH_Drawing_GetSizeOfTextBox(textBox: *mut OH_Drawing_TextBox) -> usize;
2027    /// Gets the glyphposition at coordinate.
2028    ///
2029    ///
2030    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2031    /// # Arguments
2032    ///
2033    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
2034    ///
2035    /// * `dx` - Indicates the positionX of typography to set.
2036    ///
2037    /// * `dy` - Indicates the positionY of typography to set.
2038    ///
2039    /// # Returns
2040    ///
2041    /// * Returns the glyphposition at coordinate.
2042    ///
2043    /// Available since API-level: 11
2044    ///
2045    /// Version: 1.0
2046    ///
2047    /// **Deprecated** since 18
2048    /// OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster
2049    #[cfg(feature = "api-11")]
2050    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2051    #[deprecated(since = "18")]
2052    pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinate(
2053        typography: *mut OH_Drawing_Typography,
2054        dx: f64,
2055        dy: f64,
2056    ) -> *mut OH_Drawing_PositionAndAffinity;
2057    /// Gets the glyphposition at coordinate with cluster.
2058    ///
2059    ///
2060    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2061    /// # Arguments
2062    ///
2063    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
2064    ///
2065    /// * `dx` - Indicates the positionX of typography to set.
2066    ///
2067    /// * `dy` - Indicates the positionY of typography to set.
2068    ///
2069    /// # Returns
2070    ///
2071    /// * Returns the glyphposition at coordinate with cluster.
2072    ///
2073    /// Available since API-level: 11
2074    ///
2075    /// Version: 1.0
2076    #[cfg(feature = "api-11")]
2077    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2078    pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster(
2079        typography: *mut OH_Drawing_Typography,
2080        dx: f64,
2081        dy: f64,
2082    ) -> *mut OH_Drawing_PositionAndAffinity;
2083    /// Gets position from position and affinity.
2084    ///
2085    ///
2086    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2087    /// # Arguments
2088    ///
2089    /// * `positionAndAffinity` - Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.
2090    ///
2091    /// # Returns
2092    ///
2093    /// * Returns position from position and affinity.
2094    ///
2095    /// Available since API-level: 11
2096    ///
2097    /// Version: 1.0
2098    #[cfg(feature = "api-11")]
2099    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2100    pub fn OH_Drawing_GetPositionFromPositionAndAffinity(
2101        positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
2102    ) -> usize;
2103    /// Gets affinity from position and affinity.
2104    ///
2105    ///
2106    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2107    /// # Arguments
2108    ///
2109    /// * `positionandaffinity` - Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.
2110    ///
2111    /// # Returns
2112    ///
2113    /// * Returns affinity from position and affinity.
2114    ///
2115    /// Available since API-level: 11
2116    ///
2117    /// Version: 1.0
2118    #[cfg(feature = "api-11")]
2119    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2120    pub fn OH_Drawing_GetAffinityFromPositionAndAffinity(
2121        positionandaffinity: *mut OH_Drawing_PositionAndAffinity,
2122    ) -> ::core::ffi::c_int;
2123    /// Gets the word boundary.
2124    ///
2125    ///
2126    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2127    /// # Arguments
2128    ///
2129    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
2130    ///
2131    /// * `offset` - Indicates the size of text to set.
2132    ///
2133    /// # Returns
2134    ///
2135    /// * Returns the word boundary.
2136    ///
2137    /// Available since API-level: 11
2138    ///
2139    /// Version: 1.0
2140    #[cfg(feature = "api-11")]
2141    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2142    pub fn OH_Drawing_TypographyGetWordBoundary(
2143        typography: *mut OH_Drawing_Typography,
2144        offset: usize,
2145    ) -> *mut OH_Drawing_Range;
2146    /// Gets start from range.
2147    ///
2148    ///
2149    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2150    /// # Arguments
2151    ///
2152    /// * `range` - Indicates the pointer to an <b>OH_Drawing_Range</b> object.
2153    ///
2154    /// # Returns
2155    ///
2156    /// * Returns start from range.
2157    ///
2158    /// Available since API-level: 11
2159    ///
2160    /// Version: 1.0
2161    #[cfg(feature = "api-11")]
2162    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2163    pub fn OH_Drawing_GetStartFromRange(range: *mut OH_Drawing_Range) -> usize;
2164    /// Gets end from range.
2165    ///
2166    ///
2167    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2168    /// # Arguments
2169    ///
2170    /// * `range` - Indicates the pointer to an <b>OH_Drawing_Range</b> object.
2171    ///
2172    /// # Returns
2173    ///
2174    /// * Returns end from range.
2175    ///
2176    /// Available since API-level: 11
2177    ///
2178    /// Version: 1.0
2179    #[cfg(feature = "api-11")]
2180    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2181    pub fn OH_Drawing_GetEndFromRange(range: *mut OH_Drawing_Range) -> usize;
2182    /// Gets the line count.
2183    ///
2184    ///
2185    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2186    /// # Arguments
2187    ///
2188    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
2189    ///
2190    /// # Returns
2191    ///
2192    /// * Returns the line count.
2193    ///
2194    /// Available since API-level: 11
2195    ///
2196    /// Version: 1.0
2197    #[cfg(feature = "api-11")]
2198    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2199    pub fn OH_Drawing_TypographyGetLineCount(typography: *mut OH_Drawing_Typography) -> usize;
2200    /// Sets the decoration style.
2201    ///
2202    ///
2203    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2204    /// # Arguments
2205    ///
2206    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2207    ///
2208    /// * `decorationStyle` - Indicates the text decoration style to set.
2209    /// For details, see the enum <b>OH_Drawing_TextDecorationStyle</b>.
2210    ///
2211    /// Available since API-level: 11
2212    ///
2213    /// Version: 1.0
2214    #[cfg(feature = "api-11")]
2215    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2216    pub fn OH_Drawing_SetTextStyleDecorationStyle(
2217        style: *mut OH_Drawing_TextStyle,
2218        decorationStyle: ::core::ffi::c_int,
2219    );
2220    /// Sets the decoration thickness scale.
2221    ///
2222    ///
2223    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2224    /// # Arguments
2225    ///
2226    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2227    ///
2228    /// * `decorationThicknessScale` - Indicates the thickness scale of text decoration to set.
2229    ///
2230    /// Available since API-level: 11
2231    ///
2232    /// Version: 1.0
2233    #[cfg(feature = "api-11")]
2234    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2235    pub fn OH_Drawing_SetTextStyleDecorationThicknessScale(
2236        style: *mut OH_Drawing_TextStyle,
2237        decorationThicknessScale: f64,
2238    );
2239    /// Sets the letter spacing.
2240    ///
2241    ///
2242    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2243    /// # Arguments
2244    ///
2245    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2246    ///
2247    /// * `letterSpacing` - Indicates the letter space to set.
2248    ///
2249    /// Available since API-level: 11
2250    ///
2251    /// Version: 1.0
2252    #[cfg(feature = "api-11")]
2253    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2254    pub fn OH_Drawing_SetTextStyleLetterSpacing(
2255        style: *mut OH_Drawing_TextStyle,
2256        letterSpacing: f64,
2257    );
2258    /// Sets the word spacing.
2259    ///
2260    ///
2261    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2262    /// # Arguments
2263    ///
2264    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2265    ///
2266    /// * `wordSpacing` - Indicates the word space to set.
2267    ///
2268    /// Available since API-level: 11
2269    ///
2270    /// Version: 1.0
2271    #[cfg(feature = "api-11")]
2272    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2273    pub fn OH_Drawing_SetTextStyleWordSpacing(style: *mut OH_Drawing_TextStyle, wordSpacing: f64);
2274    /// Sets the half leading.
2275    ///
2276    ///
2277    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2278    /// # Arguments
2279    ///
2280    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2281    ///
2282    /// * `halfLeading` - Indicates the half leading to set.
2283    ///
2284    /// Available since API-level: 11
2285    ///
2286    /// Version: 1.0
2287    #[cfg(feature = "api-11")]
2288    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2289    pub fn OH_Drawing_SetTextStyleHalfLeading(style: *mut OH_Drawing_TextStyle, halfLeading: bool);
2290    /// Sets the ellipsis.
2291    ///
2292    ///
2293    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2294    /// # Arguments
2295    ///
2296    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2297    ///
2298    /// * `ellipsis` - Indicates the pointer to ellipsis style.
2299    ///
2300    /// Available since API-level: 11
2301    ///
2302    /// Version: 1.0
2303    ///
2304    /// **Deprecated** since 18
2305    /// OH_Drawing_SetTypographyTextEllipsis
2306    #[cfg(feature = "api-11")]
2307    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2308    #[deprecated(since = "18")]
2309    pub fn OH_Drawing_SetTextStyleEllipsis(
2310        style: *mut OH_Drawing_TextStyle,
2311        ellipsis: *const ::core::ffi::c_char,
2312    );
2313    /// Sets the ellipsis modal.
2314    ///
2315    ///
2316    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2317    /// # Arguments
2318    ///
2319    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2320    ///
2321    /// * `ellipsisModal` - Indicates the ellipsis model to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.
2322    ///
2323    /// Available since API-level: 11
2324    ///
2325    /// Version: 1.0
2326    ///
2327    /// **Deprecated** since 18
2328    /// OH_Drawing_SetTypographyTextEllipsisModal
2329    #[cfg(feature = "api-11")]
2330    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2331    #[deprecated(since = "18")]
2332    pub fn OH_Drawing_SetTextStyleEllipsisModal(
2333        style: *mut OH_Drawing_TextStyle,
2334        ellipsisModal: ::core::ffi::c_int,
2335    );
2336    /// Sets the break strategy.
2337    ///
2338    ///
2339    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2340    /// # Arguments
2341    ///
2342    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2343    ///
2344    /// * `breakStrategy` - Indicates the break strategy to set. For details, see the enum <b>OH_Drawing_BreakStrategy</b>.
2345    ///
2346    /// Available since API-level: 11
2347    ///
2348    /// Version: 1.0
2349    #[cfg(feature = "api-11")]
2350    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2351    pub fn OH_Drawing_SetTypographyTextBreakStrategy(
2352        style: *mut OH_Drawing_TypographyStyle,
2353        breakStrategy: ::core::ffi::c_int,
2354    );
2355    /// Sets the word break type.
2356    ///
2357    ///
2358    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2359    /// # Arguments
2360    ///
2361    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2362    ///
2363    /// * `wordBreakType` - Indicates the word break type to set. For details, see the enum <b>OH_Drawing_WordBreakType</b>.
2364    ///
2365    /// Available since API-level: 11
2366    ///
2367    /// Version: 1.0
2368    #[cfg(feature = "api-11")]
2369    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2370    pub fn OH_Drawing_SetTypographyTextWordBreakType(
2371        style: *mut OH_Drawing_TypographyStyle,
2372        wordBreakType: ::core::ffi::c_int,
2373    );
2374    /// Sets the ellipsis modal.
2375    ///
2376    ///
2377    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2378    /// # Arguments
2379    ///
2380    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2381    ///
2382    /// * `ellipsisModal` - Indicates the ellipsis modal to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.
2383    ///
2384    /// Available since API-level: 11
2385    ///
2386    /// Version: 1.0
2387    #[cfg(feature = "api-11")]
2388    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2389    pub fn OH_Drawing_SetTypographyTextEllipsisModal(
2390        style: *mut OH_Drawing_TypographyStyle,
2391        ellipsisModal: ::core::ffi::c_int,
2392    );
2393    /// get line height.
2394    ///
2395    ///
2396    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2397    /// # Arguments
2398    ///
2399    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
2400    ///
2401    /// * `lineNumber` - Indicates the line number.
2402    ///
2403    /// # Returns
2404    ///
2405    /// * Returns line height.
2406    ///
2407    /// Available since API-level: 11
2408    ///
2409    /// Version: 1.0
2410    #[cfg(feature = "api-11")]
2411    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2412    pub fn OH_Drawing_TypographyGetLineHeight(
2413        typography: *mut OH_Drawing_Typography,
2414        lineNumber: ::core::ffi::c_int,
2415    ) -> f64;
2416    /// get line width.
2417    ///
2418    ///
2419    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2420    /// # Arguments
2421    ///
2422    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
2423    ///
2424    /// * `lineNumber` - Indicates the line number.
2425    ///
2426    /// # Returns
2427    ///
2428    /// * Returns line width.
2429    ///
2430    /// Available since API-level: 11
2431    ///
2432    /// Version: 1.0
2433    #[cfg(feature = "api-11")]
2434    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
2435    pub fn OH_Drawing_TypographyGetLineWidth(
2436        typography: *mut OH_Drawing_Typography,
2437        lineNumber: ::core::ffi::c_int,
2438    ) -> f64;
2439    /// get line text range.
2440    ///
2441    ///
2442    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2443    /// # Arguments
2444    ///
2445    /// * `typography` - Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
2446    ///
2447    /// * `lineNumber` - Indicates the line number.
2448    ///
2449    /// * `includeSpaces` - Indicates whether spaces are contained.
2450    ///
2451    /// # Returns
2452    ///
2453    /// * Returns line text range.
2454    ///
2455    /// Available since API-level: 12
2456    ///
2457    /// Version: 1.0
2458    #[cfg(feature = "api-12")]
2459    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2460    pub fn OH_Drawing_TypographyGetLineTextRange(
2461        typography: *mut OH_Drawing_Typography,
2462        lineNumber: ::core::ffi::c_int,
2463        includeSpaces: bool,
2464    ) -> *mut OH_Drawing_Range;
2465    /// Creates an <b>OH_Drawing_FontDescriptor</b> object.
2466    ///
2467    ///
2468    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2469    ///
2470    /// # Returns
2471    ///
2472    /// * Returns the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b> created.
2473    ///
2474    /// Available since API-level: 12
2475    ///
2476    /// Version: 1.0
2477    #[cfg(feature = "api-12")]
2478    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2479    pub fn OH_Drawing_CreateFontDescriptor() -> *mut OH_Drawing_FontDescriptor;
2480    /// Releases the memory occupied by an <b>OH_Drawing_FontDescriptor</b> object.
2481    ///
2482    ///
2483    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2484    /// # Arguments
2485    ///
2486    /// * `descriptor` - the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b>.
2487    ///
2488    /// Available since API-level: 12
2489    ///
2490    /// Version: 1.0
2491    #[cfg(feature = "api-12")]
2492    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2493    pub fn OH_Drawing_DestroyFontDescriptor(descriptor: *mut OH_Drawing_FontDescriptor);
2494    /// Creates an <b>OH_Drawing_FontParser</b> object.
2495    ///
2496    ///
2497    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2498    ///
2499    /// # Returns
2500    ///
2501    /// * Returns the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
2502    ///
2503    /// Available since API-level: 12
2504    ///
2505    /// Version: 1.0
2506    #[cfg(feature = "api-12")]
2507    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2508    pub fn OH_Drawing_CreateFontParser() -> *mut OH_Drawing_FontParser;
2509    /// Releases the memory occupied by an <b>OH_Drawing_FontParser</b> object.
2510    ///
2511    ///
2512    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2513    /// # Arguments
2514    ///
2515    /// * `parser` - Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
2516    ///
2517    /// Available since API-level: 12
2518    ///
2519    /// Version: 1.0
2520    #[cfg(feature = "api-12")]
2521    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2522    pub fn OH_Drawing_DestroyFontParser(parser: *mut OH_Drawing_FontParser);
2523    /// Gets a list of system font names.
2524    ///
2525    ///
2526    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2527    /// # Arguments
2528    ///
2529    /// * `fontParser` - Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
2530    ///
2531    /// * `num` - Returns the number of obtained system font names.
2532    ///
2533    /// # Returns
2534    ///
2535    /// * Returns a list of obtained system fonts.
2536    ///
2537    /// Available since API-level: 12
2538    ///
2539    /// Version: 1.0
2540    #[cfg(feature = "api-12")]
2541    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2542    pub fn OH_Drawing_FontParserGetSystemFontList(
2543        fontParser: *mut OH_Drawing_FontParser,
2544        num: *mut usize,
2545    ) -> *mut *mut ::core::ffi::c_char;
2546    /// Releases the memory occupied by a list of system font names.
2547    ///
2548    ///
2549    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2550    /// # Arguments
2551    ///
2552    /// * `fontList` - Indicates the pointer to a list of system font names.
2553    ///
2554    /// * `num` - The number of obtained system font names.
2555    ///
2556    /// Available since API-level: 12
2557    ///
2558    /// Version: 1.0
2559    #[cfg(feature = "api-12")]
2560    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2561    pub fn OH_Drawing_DestroySystemFontList(fontList: *mut *mut ::core::ffi::c_char, num: usize);
2562    /// Gets information about the system font by font name.
2563    ///
2564    ///
2565    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2566    /// # Arguments
2567    ///
2568    /// * `fontParser` - Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
2569    ///
2570    /// * `name` - font name.
2571    ///
2572    /// # Returns
2573    ///
2574    /// * Returns system fonts information.
2575    ///
2576    /// Available since API-level: 12
2577    ///
2578    /// Version: 1.0
2579    #[cfg(feature = "api-12")]
2580    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2581    pub fn OH_Drawing_FontParserGetFontByName(
2582        fontParser: *mut OH_Drawing_FontParser,
2583        name: *const ::core::ffi::c_char,
2584    ) -> *mut OH_Drawing_FontDescriptor;
2585    /// Get line metrics information.
2586    ///
2587    ///
2588    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2589    /// # Arguments
2590    ///
2591    /// * `typography` - Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
2592    ///
2593    /// # Returns
2594    ///
2595    /// * Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
2596    ///
2597    /// Available since API-level: 12
2598    ///
2599    /// Version: 1.0
2600    #[cfg(feature = "api-12")]
2601    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2602    pub fn OH_Drawing_TypographyGetLineMetrics(
2603        typography: *mut OH_Drawing_Typography,
2604    ) -> *mut OH_Drawing_LineMetrics;
2605    /// Get the number of lines.
2606    ///
2607    ///
2608    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2609    /// # Arguments
2610    ///
2611    /// * `lineMetrics` - Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
2612    ///
2613    /// # Returns
2614    ///
2615    /// * Returns the number of lines.
2616    ///
2617    /// Available since API-level: 12
2618    ///
2619    /// Version: 1.0
2620    #[cfg(feature = "api-12")]
2621    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2622    pub fn OH_Drawing_LineMetricsGetSize(lineMetrics: *mut OH_Drawing_LineMetrics) -> usize;
2623    /// Releases the memory occupied by line metrics.
2624    ///
2625    ///
2626    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2627    /// # Arguments
2628    ///
2629    /// * `lineMetrics` - Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
2630    ///
2631    /// Available since API-level: 12
2632    ///
2633    /// Version: 1.0
2634    #[cfg(feature = "api-12")]
2635    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2636    pub fn OH_Drawing_DestroyLineMetrics(lineMetrics: *mut OH_Drawing_LineMetrics);
2637    /// Gets the specified line by line number.
2638    ///
2639    ///
2640    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2641    /// # Arguments
2642    ///
2643    /// * `typography` - Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
2644    ///
2645    /// * `lineNumber` - Line number.
2646    ///
2647    /// * `lineMetric` - Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
2648    ///
2649    /// # Returns
2650    ///
2651    /// * Whether the line metrics was obtained.
2652    ///
2653    /// Available since API-level: 12
2654    ///
2655    /// Version: 1.0
2656    #[cfg(feature = "api-12")]
2657    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2658    pub fn OH_Drawing_TypographyGetLineMetricsAt(
2659        typography: *mut OH_Drawing_Typography,
2660        lineNumber: ::core::ffi::c_int,
2661        lineMetric: *mut OH_Drawing_LineMetrics,
2662    ) -> bool;
2663    /// Sets the ellipsis of lines in a text file.
2664    ///
2665    ///
2666    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2667    /// # Arguments
2668    ///
2669    /// * `style` - Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
2670    ///
2671    /// * `ellipsis` - Indicates the line textellipsis.
2672    ///
2673    /// Available since API-level: 12
2674    ///
2675    /// Version: 1.0
2676    #[cfg(feature = "api-12")]
2677    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2678    pub fn OH_Drawing_SetTypographyTextEllipsis(
2679        style: *mut OH_Drawing_TypographyStyle,
2680        ellipsis: *const ::core::ffi::c_char,
2681    );
2682    /// Sets the locale of lines in a text file.
2683    ///
2684    ///
2685    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2686    /// # Arguments
2687    ///
2688    /// * `style` - Indicates the pointer to a typography style object
2689    /// <b>OH_Drawing_TypographyStyle</b>.
2690    ///
2691    /// * `locale` - Indicates the pointer to the locale to set.
2692    ///
2693    /// Available since API-level: 12
2694    ///
2695    /// Version: 1.0
2696    #[cfg(feature = "api-12")]
2697    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2698    pub fn OH_Drawing_SetTypographyTextLocale(
2699        style: *mut OH_Drawing_TypographyStyle,
2700        locale: *const ::core::ffi::c_char,
2701    );
2702    /// Sets the textSplitRatio of lines in a text file.
2703    ///
2704    ///
2705    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2706    /// # Arguments
2707    ///
2708    /// * `style` - Indicates the pointer to a typography style object
2709    /// <b>OH_Drawing_TypographyStyle</b>.
2710    ///
2711    /// * `textSplitRatio` - Indicates the textSplitRatio of lines to set.
2712    ///
2713    /// Available since API-level: 12
2714    ///
2715    /// Version: 1.0
2716    #[cfg(feature = "api-12")]
2717    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2718    pub fn OH_Drawing_SetTypographyTextSplitRatio(
2719        style: *mut OH_Drawing_TypographyStyle,
2720        textSplitRatio: f32,
2721    );
2722    /// Gets the TextStyle of lines in a text file.
2723    ///
2724    ///
2725    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2726    /// # Arguments
2727    ///
2728    /// * `style` - Indicates the pointer to a typography style object
2729    /// <b>OH_Drawing_TypographyStyle</b>.
2730    ///
2731    /// # Returns
2732    ///
2733    /// * Returns line text textstyle.
2734    ///
2735    /// Available since API-level: 12
2736    ///
2737    /// Version: 1.0
2738    #[cfg(feature = "api-12")]
2739    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2740    pub fn OH_Drawing_TypographyGetTextStyle(
2741        style: *mut OH_Drawing_TypographyStyle,
2742    ) -> *mut OH_Drawing_TextStyle;
2743    /// Gets the EffectiveAlign of lines in a text file.
2744    ///
2745    ///
2746    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2747    /// # Arguments
2748    ///
2749    /// * `style` - Indicates the pointer to a typography style object
2750    /// <b>OH_Drawing_TypographyStyle</b>.
2751    ///
2752    /// # Returns
2753    ///
2754    /// * Returns line text align.
2755    ///
2756    /// Available since API-level: 12
2757    ///
2758    /// Version: 1.0
2759    ///
2760    /// **Deprecated** since 18
2761    /// OH_Drawing_TypographyStyleGetEffectiveAlignment
2762    #[cfg(feature = "api-12")]
2763    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2764    #[deprecated(since = "18")]
2765    pub fn OH_Drawing_TypographyGetEffectiveAlignment(
2766        style: *mut OH_Drawing_TypographyStyle,
2767    ) -> ::core::ffi::c_int;
2768    /// Gets the UnlimitedLines of lines in a text file.
2769    ///
2770    ///
2771    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2772    /// # Arguments
2773    ///
2774    /// * `style` - Indicates the pointer to a typography style object
2775    /// <b>OH_Drawing_TypographyStyle</b>.
2776    ///
2777    /// # Returns
2778    ///
2779    /// * Returns whether the text has a maximum line limit,
2780    /// with true indicating a maximum line limit and false indicating no maximum line limit.
2781    ///
2782    /// Available since API-level: 12
2783    ///
2784    /// Version: 1.0
2785    #[cfg(feature = "api-12")]
2786    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2787    pub fn OH_Drawing_TypographyIsLineUnlimited(style: *mut OH_Drawing_TypographyStyle) -> bool;
2788    /// Gets the IsEllipsized of lines in a text file.
2789    ///
2790    ///
2791    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2792    /// # Arguments
2793    ///
2794    /// * `style` - Indicates the pointer to a typography style object
2795    /// <b>OH_Drawing_TypographyStyle</b>.
2796    ///
2797    /// # Returns
2798    ///
2799    /// * Returns whether the text has ellipsis,
2800    /// true meaning there is an ellipsis and false meaning there is no ellipsis.
2801    ///
2802    /// Available since API-level: 12
2803    ///
2804    /// Version: 1.0
2805    #[cfg(feature = "api-12")]
2806    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2807    pub fn OH_Drawing_TypographyIsEllipsized(style: *mut OH_Drawing_TypographyStyle) -> bool;
2808    /// set line textstyle.
2809    ///
2810    ///
2811    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2812    /// # Arguments
2813    ///
2814    /// * `handler` - Indicates the pointer to a typography style object
2815    /// <b>OH_Drawing_TypographyStyle</b>.
2816    ///
2817    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
2818    ///
2819    /// Available since API-level: 12
2820    ///
2821    /// Version: 1.0
2822    #[cfg(feature = "api-12")]
2823    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2824    pub fn OH_Drawing_SetTypographyTextStyle(
2825        handler: *mut OH_Drawing_TypographyStyle,
2826        style: *mut OH_Drawing_TextStyle,
2827    );
2828    /// get line fontmetrics.
2829    ///
2830    ///
2831    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2832    /// # Arguments
2833    ///
2834    /// * `typography` - Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
2835    ///
2836    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
2837    ///
2838    /// * `fontmetrics` - Indicates the pointer to a font metrics object <b>OH_Drawing_Font_Metrics</b>.
2839    ///
2840    /// # Returns
2841    ///
2842    /// * Whether the font metrics was obtained.
2843    ///
2844    /// Available since API-level: 12
2845    ///
2846    /// Version: 1.0
2847    #[cfg(feature = "api-12")]
2848    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2849    pub fn OH_Drawing_TextStyleGetFontMetrics(
2850        typography: *mut OH_Drawing_Typography,
2851        style: *mut OH_Drawing_TextStyle,
2852        fontmetrics: *mut OH_Drawing_Font_Metrics,
2853    ) -> bool;
2854    /// Gets the position of the specified line or the first text of the specified line.
2855    ///
2856    ///
2857    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2858    /// # Arguments
2859    ///
2860    /// * `typography` - Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
2861    ///
2862    /// * `lineNumber` - Line number.
2863    ///
2864    /// * `oneLine` - True is the information for the whole line, and false is the information to get the first character
2865    ///
2866    /// * `includeWhitespace` - Whether the text width contains whitespace.
2867    ///
2868    /// * `drawingLineMetrics` - Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
2869    ///
2870    /// # Returns
2871    ///
2872    /// * return whether the information was successfully fetched.
2873    ///
2874    /// Available since API-level: 12
2875    ///
2876    /// Version: 1.0
2877    #[cfg(feature = "api-12")]
2878    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2879    pub fn OH_Drawing_TypographyGetLineInfo(
2880        typography: *mut OH_Drawing_Typography,
2881        lineNumber: ::core::ffi::c_int,
2882        oneLine: bool,
2883        includeWhitespace: bool,
2884        drawingLineMetrics: *mut OH_Drawing_LineMetrics,
2885    ) -> bool;
2886    /// Sets the font weight of text typography.
2887    ///
2888    ///
2889    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2890    /// # Arguments
2891    ///
2892    /// * `style` - Indicates the pointer to a typography style object
2893    /// <b>OH_Drawing_TypographyStyle</b>.
2894    ///
2895    /// * `weight` - Indicates the font weight of text typography to set. For details,
2896    /// see the enum <b>OH_Drawing_FontWeight</b>.
2897    ///
2898    /// Available since API-level: 12
2899    ///
2900    /// Version: 1.0
2901    #[cfg(feature = "api-12")]
2902    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2903    pub fn OH_Drawing_SetTypographyTextFontWeight(
2904        style: *mut OH_Drawing_TypographyStyle,
2905        weight: ::core::ffi::c_int,
2906    );
2907    /// Sets the font style of text typography.
2908    ///
2909    ///
2910    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2911    /// # Arguments
2912    ///
2913    /// * `style` - Indicates the pointer to a typography style object
2914    /// <b>OH_Drawing_TypographyStyle</b>.
2915    ///
2916    /// * `fontStyle` - Indicates the font style of text typography to set. For details,
2917    /// see the enum <b>OH_Drawing_FontStyle</b>.
2918    ///
2919    /// Available since API-level: 12
2920    ///
2921    /// Version: 1.0
2922    #[cfg(feature = "api-12")]
2923    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2924    pub fn OH_Drawing_SetTypographyTextFontStyle(
2925        style: *mut OH_Drawing_TypographyStyle,
2926        fontStyle: ::core::ffi::c_int,
2927    );
2928    /// Sets the font family of text typography.
2929    ///
2930    ///
2931    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2932    /// # Arguments
2933    ///
2934    /// * `style` - Indicates the pointer to a typography style object
2935    /// <b>OH_Drawing_TypographyStyle</b>.
2936    ///
2937    /// * `fontFamily` - Indicates the pointer to the font family of text typography to set.
2938    ///
2939    /// Available since API-level: 12
2940    ///
2941    /// Version: 1.0
2942    #[cfg(feature = "api-12")]
2943    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2944    pub fn OH_Drawing_SetTypographyTextFontFamily(
2945        style: *mut OH_Drawing_TypographyStyle,
2946        fontFamily: *const ::core::ffi::c_char,
2947    );
2948    /// Sets the font size of text typography.
2949    ///
2950    ///
2951    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2952    /// # Arguments
2953    ///
2954    /// * `style` - Indicates the pointer to a typography style object
2955    /// <b>OH_Drawing_TypographyStyle</b>.
2956    ///
2957    /// * `fontSize` - Indicates the font size of text typography to set.
2958    ///
2959    /// Available since API-level: 12
2960    ///
2961    /// Version: 1.0
2962    #[cfg(feature = "api-12")]
2963    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2964    pub fn OH_Drawing_SetTypographyTextFontSize(
2965        style: *mut OH_Drawing_TypographyStyle,
2966        fontSize: f64,
2967    );
2968    /// Sets the font height of text typography.
2969    ///
2970    ///
2971    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2972    /// # Arguments
2973    ///
2974    /// * `style` - Indicates the pointer to a typography style object
2975    /// <b>OH_Drawing_TypographyStyle</b>.
2976    ///
2977    /// * `fontHeight` - Indicates the font height of text typography to set.
2978    ///
2979    /// Available since API-level: 12
2980    ///
2981    /// Version: 1.0
2982    #[cfg(feature = "api-12")]
2983    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2984    pub fn OH_Drawing_SetTypographyTextFontHeight(
2985        style: *mut OH_Drawing_TypographyStyle,
2986        fontHeight: f64,
2987    );
2988    /// Sets the half leading of text typography.
2989    ///
2990    ///
2991    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
2992    /// # Arguments
2993    ///
2994    /// * `style` - Indicates the pointer to a typography style object
2995    /// <b>OH_Drawing_TypographyStyle</b>.
2996    ///
2997    /// * `halfLeading` - Indicates the half leading of text typography to set.
2998    ///
2999    /// Available since API-level: 12
3000    ///
3001    /// Version: 1.0
3002    #[cfg(feature = "api-12")]
3003    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3004    pub fn OH_Drawing_SetTypographyTextHalfLeading(
3005        style: *mut OH_Drawing_TypographyStyle,
3006        halfLeading: bool,
3007    );
3008    /// Sets whether to enable line style for text typography.
3009    ///
3010    ///
3011    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3012    /// # Arguments
3013    ///
3014    /// * `style` - Indicates the pointer to a typography style object
3015    /// <b>OH_Drawing_TypographyStyle</b>.
3016    ///
3017    /// * `useLineStyle` - Indicates whether the line style for text typography is used.
3018    ///
3019    /// Available since API-level: 12
3020    ///
3021    /// Version: 1.0
3022    #[cfg(feature = "api-12")]
3023    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3024    pub fn OH_Drawing_SetTypographyTextUseLineStyle(
3025        style: *mut OH_Drawing_TypographyStyle,
3026        useLineStyle: bool,
3027    );
3028    /// Sets the font weight of line style for text typography.
3029    ///
3030    ///
3031    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3032    /// # Arguments
3033    ///
3034    /// * `style` - Indicates the pointer to a typography style object
3035    /// <b>OH_Drawing_TypographyStyle</b>.
3036    ///
3037    /// * `weight` - Indicates the font weight of line style for text typography to set.
3038    /// For details, see the enum <b>OH_Drawing_FontWeight</b>.
3039    ///
3040    /// Available since API-level: 12
3041    ///
3042    /// Version: 1.0
3043    #[cfg(feature = "api-12")]
3044    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3045    pub fn OH_Drawing_SetTypographyTextLineStyleFontWeight(
3046        style: *mut OH_Drawing_TypographyStyle,
3047        weight: ::core::ffi::c_int,
3048    );
3049    /// Sets the font style of line style for text typography.
3050    ///
3051    ///
3052    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3053    /// # Arguments
3054    ///
3055    /// * `style` - Indicates the pointer to a typography style object
3056    /// <b>OH_Drawing_TypographyStyle</b>.
3057    ///
3058    /// * `fontStyle` - Indicates the font style of line style for text typography to set. For details,
3059    /// see the enum <b>OH_Drawing_FontStyle</b>.
3060    ///
3061    /// Available since API-level: 12
3062    ///
3063    /// Version: 1.0
3064    #[cfg(feature = "api-12")]
3065    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3066    pub fn OH_Drawing_SetTypographyTextLineStyleFontStyle(
3067        style: *mut OH_Drawing_TypographyStyle,
3068        fontStyle: ::core::ffi::c_int,
3069    );
3070    /// Sets the font families of line style for text typography.
3071    ///
3072    ///
3073    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3074    /// # Arguments
3075    ///
3076    /// * `style` - Indicates the pointer to a typography style object
3077    /// <b>OH_Drawing_TypographyStyle</b>.
3078    ///
3079    /// * `fontFamiliesNumber` - Indicates the number of font families to set.
3080    ///
3081    /// * `fontFamilies` - Indicates the pointer to the font families of line style for text typography to set.
3082    ///
3083    /// Available since API-level: 12
3084    ///
3085    /// Version: 1.0
3086    #[cfg(feature = "api-12")]
3087    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3088    pub fn OH_Drawing_SetTypographyTextLineStyleFontFamilies(
3089        style: *mut OH_Drawing_TypographyStyle,
3090        fontFamiliesNumber: ::core::ffi::c_int,
3091        fontFamilies: *mut *const ::core::ffi::c_char,
3092    );
3093    /// Sets the font size of line style for text typography.
3094    ///
3095    ///
3096    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3097    /// # Arguments
3098    ///
3099    /// * `style` - Indicates the pointer to a typography style object
3100    /// <b>OH_Drawing_TypographyStyle</b>.
3101    ///
3102    /// * `lineStyleFontSize` - Indicates the font size of line style for text typography to set.
3103    ///
3104    /// Available since API-level: 12
3105    ///
3106    /// Version: 1.0
3107    #[cfg(feature = "api-12")]
3108    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3109    pub fn OH_Drawing_SetTypographyTextLineStyleFontSize(
3110        style: *mut OH_Drawing_TypographyStyle,
3111        lineStyleFontSize: f64,
3112    );
3113    /// Sets the font height of line style for text typography.
3114    ///
3115    ///
3116    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3117    /// # Arguments
3118    ///
3119    /// * `style` - Indicates the pointer to a typography style object
3120    /// <b>OH_Drawing_TypographyStyle</b>.
3121    ///
3122    /// * `lineStyleFontHeight` - Indicates the font height of line style for text typography to set.
3123    ///
3124    /// Available since API-level: 12
3125    ///
3126    /// Version: 1.0
3127    #[cfg(feature = "api-12")]
3128    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3129    pub fn OH_Drawing_SetTypographyTextLineStyleFontHeight(
3130        style: *mut OH_Drawing_TypographyStyle,
3131        lineStyleFontHeight: f64,
3132    );
3133    /// Sets the half leading of line style for text typography.
3134    ///
3135    ///
3136    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3137    /// # Arguments
3138    ///
3139    /// * `style` - Indicates the pointer to a typography style object
3140    /// <b>OH_Drawing_TypographyStyle</b>.
3141    ///
3142    /// * `lineStyleHalfLeading` - Indicates the half leading of line for text typography to set.
3143    ///
3144    /// Available since API-level: 12
3145    ///
3146    /// Version: 1.0
3147    #[cfg(feature = "api-12")]
3148    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3149    pub fn OH_Drawing_SetTypographyTextLineStyleHalfLeading(
3150        style: *mut OH_Drawing_TypographyStyle,
3151        lineStyleHalfLeading: bool,
3152    );
3153    /// Sets the spacing scale of line style for text typography.
3154    ///
3155    ///
3156    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3157    /// # Arguments
3158    ///
3159    /// * `style` - Indicates the pointer to a typography style object
3160    /// <b>OH_Drawing_TypographyStyle</b>.
3161    ///
3162    /// * `spacingScale` - Indicates the space scale of line for text typography to set.
3163    ///
3164    /// Available since API-level: 12
3165    ///
3166    /// Version: 1.0
3167    #[cfg(feature = "api-12")]
3168    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3169    pub fn OH_Drawing_SetTypographyTextLineStyleSpacingScale(
3170        style: *mut OH_Drawing_TypographyStyle,
3171        spacingScale: f64,
3172    );
3173    /// Sets whether only line style is enabled for text typography.
3174    ///
3175    ///
3176    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3177    /// # Arguments
3178    ///
3179    /// * `style` - Indicates the pointer to a typography style object
3180    /// <b>OH_Drawing_TypographyStyle</b>.
3181    ///
3182    /// * `lineStyleOnly` - Indicates the line style for text typography to set only.
3183    ///
3184    /// Available since API-level: 12
3185    ///
3186    /// Version: 1.0
3187    #[cfg(feature = "api-12")]
3188    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3189    pub fn OH_Drawing_SetTypographyTextLineStyleOnly(
3190        style: *mut OH_Drawing_TypographyStyle,
3191        lineStyleOnly: bool,
3192    );
3193    /// Creates an <b>OH_Drawing_TextShadow</b> object.
3194    ///
3195    ///
3196    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3197    ///
3198    /// # Returns
3199    ///
3200    /// * Returns the pointer to the text shadow object created <b>OH_Drawing_TextShadow</b>.
3201    ///
3202    /// Available since API-level: 12
3203    ///
3204    /// Version: 1.0
3205    #[cfg(feature = "api-12")]
3206    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3207    pub fn OH_Drawing_CreateTextShadow() -> *mut OH_Drawing_TextShadow;
3208    /// Releases the memory occupied by the text shadow object <b>OH_Drawing_TextShadow</b>.
3209    ///
3210    ///
3211    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3212    /// # Arguments
3213    ///
3214    /// * `shadow` - Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.
3215    ///
3216    /// Available since API-level: 12
3217    ///
3218    /// Version: 1.0
3219    #[cfg(feature = "api-12")]
3220    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3221    pub fn OH_Drawing_DestroyTextShadow(shadow: *mut OH_Drawing_TextShadow);
3222    /// Gets the vector of TextShadow in TextStyle.
3223    ///
3224    ///
3225    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3226    /// # Arguments
3227    ///
3228    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
3229    ///
3230    /// * `int` - Indicates the number in vector to set.
3231    ///
3232    /// * `style` - Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.
3233    ///
3234    /// # Returns
3235    ///
3236    /// * Returns the vector of TextShadow.
3237    ///
3238    /// Available since API-level: 12
3239    ///
3240    /// Version: 1.0
3241    #[cfg(feature = "api-12")]
3242    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3243    pub fn OH_Drawing_TextStyleGetShadows(
3244        style: *mut OH_Drawing_TextStyle,
3245    ) -> *mut OH_Drawing_TextShadow;
3246    /// Gets the size of vector of TextShadow in TextStyle.
3247    ///
3248    ///
3249    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3250    /// # Arguments
3251    ///
3252    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
3253    ///
3254    /// # Returns
3255    ///
3256    /// * Returns the size of vector.
3257    ///
3258    /// Available since API-level: 12
3259    ///
3260    /// Version: 1.0
3261    #[cfg(feature = "api-12")]
3262    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3263    pub fn OH_Drawing_TextStyleGetShadowCount(
3264        style: *mut OH_Drawing_TextStyle,
3265    ) -> ::core::ffi::c_int;
3266    /// Adds element in vector of TextShadow in TextStyle.
3267    ///
3268    ///
3269    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3270    /// # Arguments
3271    ///
3272    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
3273    ///
3274    /// * `shadow` - Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.
3275    ///
3276    /// Available since API-level: 12
3277    ///
3278    /// Version: 1.0
3279    #[cfg(feature = "api-12")]
3280    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3281    pub fn OH_Drawing_TextStyleAddShadow(
3282        style: *mut OH_Drawing_TextStyle,
3283        shadow: *const OH_Drawing_TextShadow,
3284    );
3285    /// clear elements in vector of TextShadow in TextStyle.
3286    ///
3287    ///
3288    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3289    /// # Arguments
3290    ///
3291    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
3292    ///
3293    /// Available since API-level: 12
3294    ///
3295    /// Version: 1.0
3296    #[cfg(feature = "api-12")]
3297    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3298    pub fn OH_Drawing_TextStyleClearShadows(style: *mut OH_Drawing_TextStyle);
3299    /// Gets element in vector of TextShadow with index.
3300    ///
3301    ///
3302    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3303    /// # Arguments
3304    ///
3305    /// * `style` - Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.
3306    ///
3307    /// * `index` - Indicates the index to set.
3308    ///
3309    /// # Returns
3310    ///
3311    /// * Returns the pointer to element with the index in vector of the text style object
3312    /// <b>OH_Drawing_TextStyle</b>.
3313    ///
3314    /// Available since API-level: 12
3315    ///
3316    /// Version: 1.0
3317    #[cfg(feature = "api-12")]
3318    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3319    pub fn OH_Drawing_TextStyleGetShadowWithIndex(
3320        style: *mut OH_Drawing_TextStyle,
3321        index: ::core::ffi::c_int,
3322    ) -> *mut OH_Drawing_TextShadow;
3323    /// Set indents of the typography.
3324    ///
3325    ///
3326    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3327    /// # Arguments
3328    ///
3329    /// * `typography` - Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
3330    ///
3331    /// * `indentsNumber` - Indicates the pointer to the indents to set.
3332    ///
3333    /// * `indents` - Indicates the pointer to the indents to set.
3334    ///
3335    /// Available since API-level: 12
3336    ///
3337    /// Version: 1.0
3338    #[cfg(feature = "api-12")]
3339    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3340    pub fn OH_Drawing_TypographySetIndents(
3341        typography: *mut OH_Drawing_Typography,
3342        indentsNumber: ::core::ffi::c_int,
3343        indents: *const f32,
3344    );
3345    /// Gets element with index in vector of Indents.
3346    ///
3347    ///
3348    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3349    /// # Arguments
3350    ///
3351    /// * `typography` - Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
3352    ///
3353    /// * `index` - Indicates the index to set.
3354    ///
3355    /// # Returns
3356    ///
3357    /// * float Indicates the element with the index in vector of Indents.
3358    ///
3359    /// Available since API-level: 12
3360    ///
3361    /// Version: 1.0
3362    #[cfg(feature = "api-12")]
3363    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3364    pub fn OH_Drawing_TypographyGetIndentsWithIndex(
3365        typography: *mut OH_Drawing_Typography,
3366        index: ::core::ffi::c_int,
3367    ) -> f32;
3368    /// Releases the memory occupied by vector with the text shadow object <b>OH_Drawing_TextShadow</b>.
3369    ///
3370    ///
3371    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3372    /// # Arguments
3373    ///
3374    /// * `shadow` - the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.
3375    ///
3376    /// Available since API-level: 12
3377    ///
3378    /// Version: 1.0
3379    #[cfg(feature = "api-12")]
3380    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3381    pub fn OH_Drawing_DestroyTextShadows(shadow: *mut OH_Drawing_TextShadow);
3382    /// Set mode of applying the leading over and under text.
3383    ///
3384    ///
3385    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3386    /// # Arguments
3387    ///
3388    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
3389    ///
3390    /// * `heightMode` - Indicates the mode to set.
3391    ///
3392    /// Available since API-level: 12
3393    ///
3394    /// Version: 1.0
3395    #[cfg(feature = "api-12")]
3396    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3397    pub fn OH_Drawing_TypographyTextSetHeightBehavior(
3398        style: *mut OH_Drawing_TypographyStyle,
3399        heightMode: OH_Drawing_TextHeightBehavior,
3400    );
3401    /// Get mode of applying the leading over and under text.
3402    ///
3403    ///
3404    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3405    /// # Arguments
3406    ///
3407    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
3408    ///
3409    /// # Returns
3410    ///
3411    /// * Returns the mode.
3412    ///
3413    /// Available since API-level: 12
3414    ///
3415    /// Version: 1.0
3416    #[cfg(feature = "api-12")]
3417    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3418    pub fn OH_Drawing_TypographyTextGetHeightBehavior(
3419        style: *mut OH_Drawing_TypographyStyle,
3420    ) -> OH_Drawing_TextHeightBehavior;
3421    /// Set struct of background rect and styleId of text.
3422    ///
3423    ///
3424    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3425    /// # Arguments
3426    ///
3427    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3428    ///
3429    /// * `rectStyleInfo` - Indicates the pointer to an <b>OH_Drawing_RectStyle_Info</b> object.
3430    ///
3431    /// * `styleId` - Indicates the styleId of text to set.
3432    ///
3433    /// Available since API-level: 12
3434    ///
3435    /// Version: 1.0
3436    #[cfg(feature = "api-12")]
3437    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3438    pub fn OH_Drawing_TextStyleSetBackgroundRect(
3439        style: *mut OH_Drawing_TextStyle,
3440        rectStyleInfo: *const OH_Drawing_RectStyle_Info,
3441        styleId: ::core::ffi::c_int,
3442    );
3443    /// Add symbols in creating typography.
3444    ///
3445    ///
3446    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3447    /// # Arguments
3448    ///
3449    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
3450    ///
3451    /// * `symbol` - Indicates the symbol to set.
3452    ///
3453    /// Available since API-level: 12
3454    ///
3455    /// Version: 1.0
3456    #[cfg(feature = "api-12")]
3457    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3458    pub fn OH_Drawing_TypographyHandlerAddSymbol(
3459        handler: *mut OH_Drawing_TypographyCreate,
3460        symbol: u32,
3461    );
3462    /// Add font feature.
3463    ///
3464    ///
3465    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3466    /// # Arguments
3467    ///
3468    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3469    ///
3470    /// * `tag` - Indicates the pointer to the tag to set.
3471    ///
3472    /// * `value` - Indicates the value to set.
3473    ///
3474    /// Available since API-level: 12
3475    ///
3476    /// Version: 1.0
3477    #[cfg(feature = "api-12")]
3478    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3479    pub fn OH_Drawing_TextStyleAddFontFeature(
3480        style: *mut OH_Drawing_TextStyle,
3481        tag: *const ::core::ffi::c_char,
3482        value: ::core::ffi::c_int,
3483    );
3484    /// Add font variation.
3485    ///
3486    ///
3487    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3488    /// # Arguments
3489    ///
3490    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3491    ///
3492    /// * `axis` - Indicates the pointer to font variation axis.
3493    ///
3494    /// * `value` - Indicates the font variation value to set.
3495    ///
3496    /// Available since API-level: 12
3497    ///
3498    /// Version: 1.0
3499    #[cfg(feature = "api-12")]
3500    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3501    pub fn OH_Drawing_TextStyleAddFontVariation(
3502        style: *mut OH_Drawing_TextStyle,
3503        axis: *const ::core::ffi::c_char,
3504        value: f32,
3505    );
3506    /// Get all font features.
3507    ///
3508    ///
3509    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3510    /// # Arguments
3511    ///
3512    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3513    ///
3514    /// # Returns
3515    ///
3516    /// * OH_Drawing_FontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature.
3517    /// Get size of font feature by OH_Drawing_TextStyleGetFontFeatureSize.
3518    ///
3519    /// Available since API-level: 12
3520    ///
3521    /// Version: 1.0
3522    #[cfg(feature = "api-12")]
3523    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3524    pub fn OH_Drawing_TextStyleGetFontFeatures(
3525        style: *mut OH_Drawing_TextStyle,
3526    ) -> *mut OH_Drawing_FontFeature;
3527    /// Release the memory occupied by array of structures of font features.
3528    ///
3529    ///
3530    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3531    /// # Arguments
3532    ///
3533    /// * `fontFeature` - Indicates the pointer to an array of structures of OH_Drawing_FontFeature.
3534    ///
3535    /// * `fontFeatureSize` - Indicates the size of array of structures of OH_Drawing_FontFeature.
3536    ///
3537    /// Available since API-level: 12
3538    ///
3539    /// Version: 1.0
3540    #[cfg(feature = "api-12")]
3541    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3542    pub fn OH_Drawing_TextStyleDestroyFontFeatures(
3543        fontFeature: *mut OH_Drawing_FontFeature,
3544        fontFeatureSize: usize,
3545    );
3546    /// Get size of font features.
3547    ///
3548    ///
3549    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3550    /// # Arguments
3551    ///
3552    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3553    ///
3554    /// # Returns
3555    ///
3556    /// * Returns the size of fontfeatures map.
3557    ///
3558    /// Available since API-level: 12
3559    ///
3560    /// Version: 1.0
3561    #[cfg(feature = "api-12")]
3562    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3563    pub fn OH_Drawing_TextStyleGetFontFeatureSize(style: *mut OH_Drawing_TextStyle) -> usize;
3564    /// Clear font features.
3565    ///
3566    ///
3567    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3568    /// # Arguments
3569    ///
3570    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3571    ///
3572    /// Available since API-level: 12
3573    ///
3574    /// Version: 1.0
3575    #[cfg(feature = "api-12")]
3576    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3577    pub fn OH_Drawing_TextStyleClearFontFeature(style: *mut OH_Drawing_TextStyle);
3578    /// Set baseline shift of text.
3579    ///
3580    ///
3581    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3582    /// # Arguments
3583    ///
3584    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3585    ///
3586    /// * `lineShift` - Indicates the baseline shift to set.
3587    ///
3588    /// Available since API-level: 12
3589    ///
3590    /// Version: 1.0
3591    #[cfg(feature = "api-12")]
3592    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3593    pub fn OH_Drawing_TextStyleSetBaselineShift(style: *mut OH_Drawing_TextStyle, lineShift: f64);
3594    /// Get baseline shift of text.
3595    ///
3596    ///
3597    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3598    /// # Arguments
3599    ///
3600    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3601    ///
3602    /// # Returns
3603    ///
3604    /// * Returns the baseline shift.
3605    ///
3606    /// Available since API-level: 12
3607    ///
3608    /// Version: 1.0
3609    #[cfg(feature = "api-12")]
3610    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3611    pub fn OH_Drawing_TextStyleGetBaselineShift(style: *mut OH_Drawing_TextStyle) -> f64;
3612    /// Gets the text color.
3613    ///
3614    ///
3615    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3616    /// # Arguments
3617    ///
3618    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3619    ///
3620    /// # Returns
3621    ///
3622    /// * Returns the text color.
3623    ///
3624    /// Available since API-level: 12
3625    ///
3626    /// Version: 1.0
3627    #[cfg(feature = "api-12")]
3628    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3629    pub fn OH_Drawing_TextStyleGetColor(style: *mut OH_Drawing_TextStyle) -> u32;
3630    /// Gets text decoration style.
3631    ///
3632    ///
3633    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3634    /// # Arguments
3635    ///
3636    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3637    ///
3638    /// # Returns
3639    ///
3640    /// * Returns text decoration style.
3641    ///
3642    /// Available since API-level: 12
3643    ///
3644    /// Version: 1.0
3645    #[cfg(feature = "api-12")]
3646    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3647    pub fn OH_Drawing_TextStyleGetDecorationStyle(
3648        style: *mut OH_Drawing_TextStyle,
3649    ) -> OH_Drawing_TextDecorationStyle;
3650    /// Gets font weight.
3651    ///
3652    ///
3653    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3654    /// # Arguments
3655    ///
3656    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3657    ///
3658    /// # Returns
3659    ///
3660    /// * Returns font Weight.
3661    ///
3662    /// Available since API-level: 12
3663    ///
3664    /// Version: 1.0
3665    #[cfg(feature = "api-12")]
3666    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3667    pub fn OH_Drawing_TextStyleGetFontWeight(
3668        style: *mut OH_Drawing_TextStyle,
3669    ) -> OH_Drawing_FontWeight;
3670    /// Gets font style.
3671    ///
3672    ///
3673    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3674    /// # Arguments
3675    ///
3676    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3677    ///
3678    /// # Returns
3679    ///
3680    /// * Returns font style.
3681    ///
3682    /// Available since API-level: 12
3683    ///
3684    /// Version: 1.0
3685    #[cfg(feature = "api-12")]
3686    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3687    pub fn OH_Drawing_TextStyleGetFontStyle(
3688        style: *mut OH_Drawing_TextStyle,
3689    ) -> OH_Drawing_FontStyle;
3690    /// Gets the font baseline.
3691    ///
3692    ///
3693    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3694    /// # Arguments
3695    ///
3696    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3697    ///
3698    /// # Returns
3699    ///
3700    /// * Returns the font baseline.
3701    ///
3702    /// Available since API-level: 12
3703    ///
3704    /// Version: 1.0
3705    #[cfg(feature = "api-12")]
3706    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3707    pub fn OH_Drawing_TextStyleGetBaseline(
3708        style: *mut OH_Drawing_TextStyle,
3709    ) -> OH_Drawing_TextBaseline;
3710    /// Gets a list of font families.
3711    ///
3712    ///
3713    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3714    /// # Arguments
3715    ///
3716    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3717    ///
3718    /// * `num` - Indicates count of font families result.
3719    ///
3720    /// # Returns
3721    ///
3722    /// * Returns a list of font families.
3723    ///
3724    /// Available since API-level: 12
3725    ///
3726    /// Version: 1.0
3727    #[cfg(feature = "api-12")]
3728    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3729    pub fn OH_Drawing_TextStyleGetFontFamilies(
3730        style: *mut OH_Drawing_TextStyle,
3731        num: *mut usize,
3732    ) -> *mut *mut ::core::ffi::c_char;
3733    /// Releases the memory occupied by a list of font families.
3734    ///
3735    ///
3736    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3737    /// # Arguments
3738    ///
3739    /// * `fontFamilies` - Indicates the pointer to a list of font families.
3740    ///
3741    /// * `num` - Indicates the count of obtained font families.
3742    ///
3743    /// Available since API-level: 12
3744    ///
3745    /// Version: 1.0
3746    #[cfg(feature = "api-12")]
3747    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3748    pub fn OH_Drawing_TextStyleDestroyFontFamilies(
3749        fontFamilies: *mut *mut ::core::ffi::c_char,
3750        num: usize,
3751    );
3752    /// Gets font size.
3753    ///
3754    ///
3755    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3756    /// # Arguments
3757    ///
3758    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3759    ///
3760    /// # Returns
3761    ///
3762    /// * Returns font size.
3763    ///
3764    /// Available since API-level: 12
3765    ///
3766    /// Version: 1.0
3767    #[cfg(feature = "api-12")]
3768    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3769    pub fn OH_Drawing_TextStyleGetFontSize(style: *mut OH_Drawing_TextStyle) -> f64;
3770    /// Gets the letter spacing of the text.
3771    ///
3772    ///
3773    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3774    /// # Arguments
3775    ///
3776    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3777    ///
3778    /// # Returns
3779    ///
3780    /// * Returns the size of the letter spacing.
3781    ///
3782    /// Available since API-level: 12
3783    ///
3784    /// Version: 1.0
3785    #[cfg(feature = "api-12")]
3786    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3787    pub fn OH_Drawing_TextStyleGetLetterSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
3788    /// Gets the word spacing of the text.
3789    ///
3790    ///
3791    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3792    /// # Arguments
3793    ///
3794    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3795    ///
3796    /// # Returns
3797    ///
3798    /// * Returns word spacing size.
3799    ///
3800    /// Available since API-level: 12
3801    ///
3802    /// Version: 1.0
3803    #[cfg(feature = "api-12")]
3804    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3805    pub fn OH_Drawing_TextStyleGetWordSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
3806    /// Gets font height.
3807    ///
3808    ///
3809    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3810    /// # Arguments
3811    ///
3812    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3813    ///
3814    /// # Returns
3815    ///
3816    /// * Returns font height.
3817    ///
3818    /// Available since API-level: 12
3819    ///
3820    /// Version: 1.0
3821    #[cfg(feature = "api-12")]
3822    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3823    pub fn OH_Drawing_TextStyleGetFontHeight(style: *mut OH_Drawing_TextStyle) -> f64;
3824    /// Gets whether to set the text to half line spacing.
3825    ///
3826    ///
3827    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3828    /// # Arguments
3829    ///
3830    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3831    ///
3832    /// # Returns
3833    ///
3834    /// * Returns true indicates that the spacing takes effect,
3835    /// false indicates that the spacing does not take effect.
3836    ///
3837    /// Available since API-level: 12
3838    ///
3839    /// Version: 1.0
3840    #[cfg(feature = "api-12")]
3841    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3842    pub fn OH_Drawing_TextStyleGetHalfLeading(style: *mut OH_Drawing_TextStyle) -> bool;
3843    /// Sets the typography vertical alignment mode.
3844    ///
3845    ///
3846    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3847    /// # Arguments
3848    ///
3849    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
3850    ///
3851    /// * `align` - Indicates the typography vertical alignment mode. For details,
3852    /// see the enum <b>OH_Drawing_TextVerticalAlignment</b>.
3853    ///
3854    /// Available since API-level: 20
3855    ///
3856    /// Version: 1.0
3857    #[cfg(feature = "api-20")]
3858    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
3859    pub fn OH_Drawing_SetTypographyVerticalAlignment(
3860        style: *mut OH_Drawing_TypographyStyle,
3861        align: OH_Drawing_TextVerticalAlignment,
3862    );
3863    /// Gets the locale.
3864    ///
3865    ///
3866    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3867    /// # Arguments
3868    ///
3869    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3870    ///
3871    /// # Returns
3872    ///
3873    /// * Returns a locale of data type as a pointer to a char. As with the TextStyle lifecycle.
3874    /// No release is required and the return value is invalidated after the set method is called.
3875    ///
3876    /// Available since API-level: 12
3877    ///
3878    /// Version: 1.0
3879    #[cfg(feature = "api-12")]
3880    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3881    pub fn OH_Drawing_TextStyleGetLocale(
3882        style: *mut OH_Drawing_TextStyle,
3883    ) -> *const ::core::ffi::c_char;
3884    /// Sets whether to use superscript or subscript in text layout.
3885    ///
3886    ///
3887    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3888    /// # Arguments
3889    ///
3890    /// * `style` - Pointer to an OH_Drawing_TextStyle object.
3891    ///
3892    /// * `textBadgeType` - Superscript or subscript to use.
3893    ///
3894    /// Available since API-level: 20
3895    #[cfg(feature = "api-20")]
3896    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
3897    pub fn OH_Drawing_SetTextStyleBadgeType(
3898        style: *mut OH_Drawing_TextStyle,
3899        textBadgeType: OH_Drawing_TextBadgeType,
3900    );
3901    /// Sets the text style, including font weight, font width and font slant.
3902    ///
3903    ///
3904    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3905    /// # Arguments
3906    ///
3907    /// * `drawingTextStyle` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3908    ///
3909    /// * `fontStyle` - Indicates an <b>OH_Drawing_FontStyleStruct</b> object.
3910    ///
3911    /// Available since API-level: 12
3912    ///
3913    /// Version: 1.0
3914    #[cfg(feature = "api-12")]
3915    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3916    pub fn OH_Drawing_SetTextStyleFontStyleStruct(
3917        drawingTextStyle: *mut OH_Drawing_TextStyle,
3918        fontStyle: OH_Drawing_FontStyleStruct,
3919    );
3920    /// Gets the text style, including font weight, font width and font slant.
3921    ///
3922    ///
3923    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3924    /// # Arguments
3925    ///
3926    /// * `drawingTextStyle` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
3927    ///
3928    /// # Returns
3929    ///
3930    /// * Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.
3931    ///
3932    /// Available since API-level: 12
3933    ///
3934    /// Version: 1.0
3935    #[cfg(feature = "api-12")]
3936    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3937    pub fn OH_Drawing_TextStyleGetFontStyleStruct(
3938        drawingTextStyle: *mut OH_Drawing_TextStyle,
3939    ) -> OH_Drawing_FontStyleStruct;
3940    /// Sets the typography style, including font weight, font width and font slant.
3941    ///
3942    ///
3943    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3944    /// # Arguments
3945    ///
3946    /// * `drawingStyle` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
3947    ///
3948    /// * `fontStyle` - Indicates an <b>OH_Drawing_FontStyleStruct</b> object.
3949    ///
3950    /// Available since API-level: 12
3951    ///
3952    /// Version: 1.0
3953    #[cfg(feature = "api-12")]
3954    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3955    pub fn OH_Drawing_SetTypographyStyleFontStyleStruct(
3956        drawingStyle: *mut OH_Drawing_TypographyStyle,
3957        fontStyle: OH_Drawing_FontStyleStruct,
3958    );
3959    /// Gets the typography style, including font weight, font width and font slant.
3960    ///
3961    ///
3962    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3963    /// # Arguments
3964    ///
3965    /// * `drawingStyle` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
3966    ///
3967    /// # Returns
3968    ///
3969    /// * Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.
3970    ///
3971    /// Available since API-level: 12
3972    ///
3973    /// Version: 1.0
3974    #[cfg(feature = "api-12")]
3975    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3976    pub fn OH_Drawing_TypographyStyleGetFontStyleStruct(
3977        drawingStyle: *mut OH_Drawing_TypographyStyle,
3978    ) -> OH_Drawing_FontStyleStruct;
3979    /// Gets whether the two TextStyle objects are equal.
3980    ///
3981    ///
3982    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
3983    /// # Arguments
3984    ///
3985    /// * `style` - Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.
3986    ///
3987    /// * `comparedStyle` - Indicates comparison <b>OH_Drawing_TextStyle</b> object.
3988    ///
3989    /// # Returns
3990    ///
3991    /// * Compare result.
3992    ///
3993    /// Available since API-level: 12
3994    ///
3995    /// Version: 1.0
3996    #[cfg(feature = "api-12")]
3997    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3998    pub fn OH_Drawing_TextStyleIsEqual(
3999        style: *const OH_Drawing_TextStyle,
4000        comparedStyle: *const OH_Drawing_TextStyle,
4001    ) -> bool;
4002    /// Gets whether the font properties of two TextStyle objects are equal.
4003    ///
4004    ///
4005    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4006    /// # Arguments
4007    ///
4008    /// * `style` - Indicates source of <b>comparison OH_Drawing_TextStyle</b> object.
4009    ///
4010    /// * `comparedStyle` - Indicates comparison <b>OH_Drawing_TextStyle</b> object.
4011    ///
4012    /// # Returns
4013    ///
4014    /// * Compare result.
4015    ///
4016    /// Available since API-level: 12
4017    ///
4018    /// Version: 1.0
4019    #[cfg(feature = "api-12")]
4020    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4021    pub fn OH_Drawing_TextStyleIsEqualByFont(
4022        style: *const OH_Drawing_TextStyle,
4023        comparedStyle: *const OH_Drawing_TextStyle,
4024    ) -> bool;
4025    /// Gets whether two TextStyle objects match attributes
4026    ///
4027    ///
4028    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4029    /// # Arguments
4030    ///
4031    /// * `style` - Indicates enumerates of text style type.
4032    ///
4033    /// * `comparedStyle` - Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.
4034    ///
4035    /// * `textStyleType` - Indicates comparison <b>OH_Drawing_TextStyle</b> object.
4036    ///
4037    /// # Returns
4038    ///
4039    /// * Match attributes result.
4040    ///
4041    /// Available since API-level: 12
4042    ///
4043    /// Version: 1.0
4044    #[cfg(feature = "api-12")]
4045    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4046    pub fn OH_Drawing_TextStyleIsAttributeMatched(
4047        style: *const OH_Drawing_TextStyle,
4048        comparedStyle: *const OH_Drawing_TextStyle,
4049        textStyleType: OH_Drawing_TextStyleType,
4050    ) -> bool;
4051    /// Set placeholder of TextStyle.
4052    ///
4053    ///
4054    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4055    /// # Arguments
4056    ///
4057    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
4058    ///
4059    /// Available since API-level: 12
4060    ///
4061    /// Version: 1.0
4062    #[cfg(feature = "api-12")]
4063    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4064    pub fn OH_Drawing_TextStyleSetPlaceholder(style: *mut OH_Drawing_TextStyle);
4065    /// Gets whether placeholder is enable.
4066    ///
4067    ///
4068    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4069    /// # Arguments
4070    ///
4071    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
4072    ///
4073    /// # Returns
4074    ///
4075    /// * Whether placeholder is enable.
4076    ///
4077    /// Available since API-level: 12
4078    ///
4079    /// Version: 1.0
4080    #[cfg(feature = "api-12")]
4081    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4082    pub fn OH_Drawing_TextStyleIsPlaceholder(style: *mut OH_Drawing_TextStyle) -> bool;
4083    /// Gets text alignment mode.
4084    ///
4085    ///
4086    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4087    /// # Arguments
4088    ///
4089    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
4090    ///
4091    /// # Returns
4092    ///
4093    /// * Returns text alignment mode.
4094    ///
4095    /// Available since API-level: 12
4096    ///
4097    /// Version: 1.0
4098    #[cfg(feature = "api-12")]
4099    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4100    pub fn OH_Drawing_TypographyStyleGetEffectiveAlignment(
4101        style: *mut OH_Drawing_TypographyStyle,
4102    ) -> OH_Drawing_TextAlign;
4103    /// Gets whether the hinting is enabled.
4104    ///
4105    ///
4106    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4107    /// # Arguments
4108    ///
4109    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
4110    ///
4111    /// # Returns
4112    ///
4113    /// * True, if the hinting takes effect; False, if the hinting does not take effect.
4114    ///
4115    /// Available since API-level: 12
4116    ///
4117    /// Version: 1.0
4118    #[cfg(feature = "api-12")]
4119    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4120    pub fn OH_Drawing_TypographyStyleIsHintEnabled(style: *mut OH_Drawing_TypographyStyle) -> bool;
4121    /// Gets system font configuration information.
4122    ///
4123    ///
4124    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4125    /// # Arguments
4126    ///
4127    /// * `errorCode` - Indicates error code returned, based on the error code to
4128    /// release the memory of system font configuration information.
4129    /// For details, see the enum <b>OH_Drawing_FontConfigInfoErrorCode</b>.
4130    ///
4131    /// # Returns
4132    ///
4133    /// * Returns a pointer to system font configuration information.
4134    /// Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.
4135    ///
4136    /// Available since API-level: 12
4137    ///
4138    /// Version: 1.0
4139    #[cfg(feature = "api-12")]
4140    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4141    pub fn OH_Drawing_GetSystemFontConfigInfo(
4142        errorCode: *mut OH_Drawing_FontConfigInfoErrorCode,
4143    ) -> *mut OH_Drawing_FontConfigInfo;
4144    /// Releases the memory occupied by system font configuration information.
4145    ///
4146    ///
4147    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4148    /// # Arguments
4149    ///
4150    /// * `drawFontCfgInfo` - Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.
4151    ///
4152    /// Available since API-level: 12
4153    ///
4154    /// Version: 1.0
4155    #[cfg(feature = "api-12")]
4156    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4157    pub fn OH_Drawing_DestroySystemFontConfigInfo(drawFontCfgInfo: *mut OH_Drawing_FontConfigInfo);
4158    /// Sets the strut style for text typography.
4159    ///
4160    ///
4161    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4162    /// # Arguments
4163    ///
4164    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
4165    ///
4166    /// * `strutstyle` - Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.
4167    ///
4168    /// Available since API-level: 12
4169    ///
4170    /// Version: 1.0
4171    #[cfg(feature = "api-12")]
4172    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4173    pub fn OH_Drawing_SetTypographyStyleTextStrutStyle(
4174        style: *mut OH_Drawing_TypographyStyle,
4175        strutstyle: *mut OH_Drawing_StrutStyle,
4176    );
4177    /// Releases the memory occupied by an <b>OH_Drawing_StrutStyle</b> object.
4178    ///
4179    ///
4180    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4181    /// # Arguments
4182    ///
4183    /// * `strutstyle` - Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.
4184    ///
4185    /// Available since API-level: 12
4186    ///
4187    /// Version: 1.0
4188    #[cfg(feature = "api-12")]
4189    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4190    pub fn OH_Drawing_TypographyStyleDestroyStrutStyle(strutstyle: *mut OH_Drawing_StrutStyle);
4191    /// Gets the strut style for text typography.
4192    ///
4193    ///
4194    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4195    /// # Arguments
4196    ///
4197    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
4198    ///
4199    /// # Returns
4200    ///
4201    /// * Returns the pointer of <b>OH_Drawing_StrutStyle</b> object.
4202    ///
4203    /// Available since API-level: 12
4204    ///
4205    /// Version: 1.0
4206    #[cfg(feature = "api-12")]
4207    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4208    pub fn OH_Drawing_TypographyStyleGetStrutStyle(
4209        style: *mut OH_Drawing_TypographyStyle,
4210    ) -> *mut OH_Drawing_StrutStyle;
4211    /// Overriding the struct StrutStyle equals operator.
4212    ///
4213    ///
4214    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4215    /// # Arguments
4216    ///
4217    /// * `from` - Indicates source of comparison object.
4218    ///
4219    /// * `to` - Indicates comparison object.
4220    ///
4221    /// Available since API-level: 12
4222    ///
4223    /// Version: 1.0
4224    #[cfg(feature = "api-12")]
4225    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4226    pub fn OH_Drawing_TypographyStyleStrutStyleEquals(
4227        from: *mut OH_Drawing_StrutStyle,
4228        to: *mut OH_Drawing_StrutStyle,
4229    ) -> bool;
4230    /// Sets the hinting of text typography.
4231    ///
4232    ///
4233    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4234    /// # Arguments
4235    ///
4236    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
4237    ///
4238    /// * `hintsEnabled` - Indicates the hinting of text typography..
4239    ///
4240    /// Available since API-level: 12
4241    ///
4242    /// Version: 1.0
4243    #[cfg(feature = "api-12")]
4244    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4245    pub fn OH_Drawing_TypographyStyleSetHintsEnabled(
4246        style: *mut OH_Drawing_TypographyStyle,
4247        hintsEnabled: bool,
4248    );
4249    /// Getting all font metrics from target row.
4250    ///
4251    ///
4252    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4253    /// # Arguments
4254    ///
4255    /// * `typography` - Indicates a pointer to a typesetting object.
4256    ///
4257    /// * `lineNumber` - Indicates specifies the number of rows.
4258    ///
4259    /// * `fontMetricsSize` - Indicates the return size of font metrics struct from current line.
4260    ///
4261    /// # Returns
4262    ///
4263    /// * Returns all character measures for the current row.
4264    ///
4265    /// Available since API-level: 12
4266    ///
4267    /// Version: 1.0
4268    #[cfg(feature = "api-12")]
4269    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4270    pub fn OH_Drawing_TypographyGetLineFontMetrics(
4271        typography: *mut OH_Drawing_Typography,
4272        lineNumber: usize,
4273        fontMetricsSize: *mut usize,
4274    ) -> *mut OH_Drawing_Font_Metrics;
4275    /// Free up all the space taken up by the lineFontMetric.
4276    ///
4277    ///
4278    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4279    /// # Arguments
4280    ///
4281    /// * `lineFontMetric` - Indicates the first address of the lineFontMetric gather to be destroyed.
4282    ///
4283    /// Available since API-level: 12
4284    ///
4285    /// Version: 1.0
4286    #[cfg(feature = "api-12")]
4287    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4288    pub fn OH_Drawing_TypographyDestroyLineFontMetrics(
4289        lineFontMetric: *mut OH_Drawing_Font_Metrics,
4290    );
4291    /// Mark the Typography as dirty, and initially state the Typography.
4292    ///
4293    ///
4294    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4295    /// # Arguments
4296    ///
4297    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4298    ///
4299    /// Available since API-level: 12
4300    ///
4301    /// Version: 1.0
4302    #[cfg(feature = "api-12")]
4303    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4304    pub fn OH_Drawing_TypographyMarkDirty(typography: *mut OH_Drawing_Typography);
4305    /// Get the unresolved Glyphs count of lines in a text.
4306    ///
4307    ///
4308    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4309    /// # Arguments
4310    ///
4311    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4312    ///
4313    /// # Returns
4314    ///
4315    /// * Returns unresolved Glyphs count.
4316    ///
4317    /// Available since API-level: 12
4318    ///
4319    /// Version: 1.0
4320    #[cfg(feature = "api-12")]
4321    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4322    pub fn OH_Drawing_TypographyGetUnresolvedGlyphsCount(
4323        typography: *mut OH_Drawing_Typography,
4324    ) -> i32;
4325    /// Update the font size of lines in a text.
4326    ///
4327    ///
4328    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4329    /// # Arguments
4330    ///
4331    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4332    ///
4333    /// * `from` - Indicates the source of the original font size.
4334    ///
4335    /// * `to` - Indicates the destination of the updated font size.
4336    ///
4337    /// * `fontSize` - Indicates the size of the font.
4338    ///
4339    /// Available since API-level: 12
4340    ///
4341    /// Version: 1.0
4342    #[cfg(feature = "api-12")]
4343    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4344    pub fn OH_Drawing_TypographyUpdateFontSize(
4345        typography: *mut OH_Drawing_Typography,
4346        from: usize,
4347        to: usize,
4348        fontSize: f32,
4349    );
4350    /// Update the font color of the typography
4351    ///
4352    ///
4353    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4354    /// # Arguments
4355    ///
4356    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4357    ///
4358    /// * `color` - Indicates the color to update.
4359    ///
4360    /// Available since API-level: 20
4361    ///
4362    /// Version: 1.0
4363    #[cfg(feature = "api-20")]
4364    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
4365    pub fn OH_Drawing_TypographyUpdateFontColor(typography: *mut OH_Drawing_Typography, color: u32);
4366    /// Update the decoration of the typography.
4367    ///
4368    ///
4369    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4370    /// # Arguments
4371    ///
4372    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4373    ///
4374    /// * `decoration` - Indicates the text decoration to update. For details, see the enum
4375    /// <b>OH_Drawing_TextDecoration</b>.
4376    ///
4377    /// Available since API-level: 20
4378    ///
4379    /// Version: 1.0
4380    #[cfg(feature = "api-20")]
4381    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
4382    pub fn OH_Drawing_TypographyUpdateDecoration(
4383        typography: *mut OH_Drawing_Typography,
4384        decoration: OH_Drawing_TextDecoration,
4385    );
4386    /// Update the decoration thickness scale of the typography.
4387    ///
4388    ///
4389    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4390    /// # Arguments
4391    ///
4392    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4393    ///
4394    /// * `decorationThicknessScale` - Indicates the thickness scale of the text decoration to update.
4395    ///
4396    /// Available since API-level: 20
4397    ///
4398    /// Version: 1.0
4399    #[cfg(feature = "api-20")]
4400    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
4401    pub fn OH_Drawing_TypographyUpdateDecorationThicknessScale(
4402        typography: *mut OH_Drawing_Typography,
4403        decorationThicknessScale: f64,
4404    );
4405    /// Update the decoration style of typography.
4406    ///
4407    ///
4408    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4409    /// # Arguments
4410    ///
4411    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4412    ///
4413    /// * `decorationStyle` - Indicates the text decoration style to update.
4414    /// For details, see the enum <b>OH_Drawing_TextDecorationStyle</b>.
4415    ///
4416    /// Available since API-level: 20
4417    ///
4418    /// Version: 1.0
4419    #[cfg(feature = "api-20")]
4420    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
4421    pub fn OH_Drawing_TypographyUpdateDecorationStyle(
4422        typography: *mut OH_Drawing_Typography,
4423        decorationStyle: OH_Drawing_TextDecorationStyle,
4424    );
4425    /// Updates the decoration color of the paragraph.
4426    ///
4427    ///
4428    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4429    /// # Arguments
4430    ///
4431    /// * `typography` - Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
4432    ///
4433    /// * `color` - Indicates the text decoration color to update.
4434    ///
4435    /// Available since API-level: 20
4436    ///
4437    /// Version: 1.0
4438    #[cfg(feature = "api-20")]
4439    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
4440    pub fn OH_Drawing_TypographyUpdateDecorationColor(
4441        typography: *mut OH_Drawing_Typography,
4442        color: u32,
4443    );
4444    /// Get whether the text layout enables line styles.
4445    ///
4446    ///
4447    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4448    /// # Arguments
4449    ///
4450    /// * `style` - Indicates the pointer to the text <b>OH_Drawing_TypographyStyle</b> object.
4451    ///
4452    /// # Returns
4453    ///
4454    /// * Whether or not to enable line styles in text layout only, true means enable, false means disable.
4455    ///
4456    /// Available since API-level: 12
4457    ///
4458    /// Version: 1.0
4459    #[cfg(feature = "api-12")]
4460    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4461    pub fn OH_Drawing_TypographyTextGetLineStyle(style: *mut OH_Drawing_TypographyStyle) -> bool;
4462    /// Get the font weight of line style for text typography.
4463    ///
4464    ///
4465    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4466    /// # Arguments
4467    ///
4468    /// * `style` - Indicates the pointer to a typography style object
4469    /// <b>OH_Drawing_TypographyStyle</b>.
4470    ///
4471    /// # Returns
4472    ///
4473    /// * Return the font weight of line style for text typography.
4474    /// For details, see the enum <b>OH_Drawing_FontWeight</b>.
4475    ///
4476    /// Available since API-level: 12
4477    ///
4478    /// Version: 1.0
4479    #[cfg(feature = "api-12")]
4480    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4481    pub fn OH_Drawing_TypographyTextlineStyleGetFontWeight(
4482        style: *mut OH_Drawing_TypographyStyle,
4483    ) -> OH_Drawing_FontWeight;
4484    /// Get the font style of line style for text typography.
4485    ///
4486    ///
4487    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4488    /// # Arguments
4489    ///
4490    /// * `style` - Indicates the pointer to a typography style object
4491    /// <b>OH_Drawing_TypographyStyle</b>.
4492    ///
4493    /// # Returns
4494    ///
4495    /// * Return the font style of line style for text typography.
4496    /// For details, see the enum <b>OH_Drawing_FontStyle</b>.
4497    ///
4498    /// Available since API-level: 12
4499    ///
4500    /// Version: 1.0
4501    #[cfg(feature = "api-12")]
4502    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4503    pub fn OH_Drawing_TypographyTextlineStyleGetFontStyle(
4504        style: *mut OH_Drawing_TypographyStyle,
4505    ) -> OH_Drawing_FontStyle;
4506    /// Get the font families of line style for text typography.
4507    ///
4508    ///
4509    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4510    /// # Arguments
4511    ///
4512    /// * `style` - Indicates the pointer to a typography style object
4513    /// <b>OH_Drawing_TypographyStyle</b>.
4514    ///
4515    /// * `num` - The number of obtained font names.
4516    ///
4517    /// # Returns
4518    ///
4519    /// * Return the font families of line style for text typography.
4520    ///
4521    /// Available since API-level: 12
4522    ///
4523    /// Version: 1.0
4524    #[cfg(feature = "api-12")]
4525    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4526    pub fn OH_Drawing_TypographyTextlineStyleGetFontFamilies(
4527        style: *mut OH_Drawing_TypographyStyle,
4528        num: *mut usize,
4529    ) -> *mut *mut ::core::ffi::c_char;
4530    /// Releases the memory occupied by a list of font families names.
4531    ///
4532    ///
4533    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4534    /// # Arguments
4535    ///
4536    /// * `fontFamilies` - Indicates the pointer to a list of font families names.
4537    ///
4538    /// * `fontFamiliesNum` - Indicates the number of obtained font names.
4539    ///
4540    /// Available since API-level: 12
4541    ///
4542    /// Version: 1.0
4543    #[cfg(feature = "api-12")]
4544    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4545    pub fn OH_Drawing_TypographyTextlineStyleDestroyFontFamilies(
4546        fontFamilies: *mut *mut ::core::ffi::c_char,
4547        fontFamiliesNum: usize,
4548    );
4549    /// Get the font size of font size for text typography.
4550    ///
4551    ///
4552    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4553    /// # Arguments
4554    ///
4555    /// * `style` - Indicates the pointer to a typography style object
4556    /// <b>OH_Drawing_TypographyStyle</b>.
4557    ///
4558    /// # Returns
4559    ///
4560    /// * Return the font size of font size for text typography.
4561    ///
4562    /// Available since API-level: 12
4563    ///
4564    /// Version: 1.0
4565    #[cfg(feature = "api-12")]
4566    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4567    pub fn OH_Drawing_TypographyTextlineStyleGetFontSize(
4568        style: *mut OH_Drawing_TypographyStyle,
4569    ) -> f64;
4570    /// Get the font height scale in text layout.
4571    ///
4572    ///
4573    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4574    /// # Arguments
4575    ///
4576    /// * `style` - Indicates the pointer to a typography style object
4577    /// <b>OH_Drawing_TypographyStyle</b>.
4578    ///
4579    /// # Returns
4580    ///
4581    /// * Retrun the font height scale in text layout.
4582    ///
4583    /// Available since API-level: 12
4584    ///
4585    /// Version: 1.0
4586    #[cfg(feature = "api-12")]
4587    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4588    pub fn OH_Drawing_TypographyTextlineStyleGetHeightScale(
4589        style: *mut OH_Drawing_TypographyStyle,
4590    ) -> f64;
4591    /// Get whether to enable font height for line styles in text layout only.
4592    ///
4593    ///
4594    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4595    /// # Arguments
4596    ///
4597    /// * `style` - Indicates the pointer to a typography style object
4598    /// <b>OH_Drawing_TypographyStyle</b>.
4599    ///
4600    /// # Returns
4601    ///
4602    /// * Whether or not to enable the font height for line styles in text layout only,
4603    /// true means enable, false means disable.
4604    ///
4605    /// Available since API-level: 12
4606    ///
4607    /// Version: 1.0
4608    #[cfg(feature = "api-12")]
4609    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4610    pub fn OH_Drawing_TypographyTextlineStyleGetHeightOnly(
4611        style: *mut OH_Drawing_TypographyStyle,
4612    ) -> bool;
4613    /// Get the half leading of line style for text typography.
4614    ///
4615    ///
4616    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4617    /// # Arguments
4618    ///
4619    /// * `style` - Indicates the pointer to a typography style object
4620    /// <b>OH_Drawing_TypographyStyle</b>.
4621    ///
4622    /// # Returns
4623    ///
4624    /// * Whether to enable the text line half leading style, true means enable, false means disable.
4625    ///
4626    /// Available since API-level: 12
4627    ///
4628    /// Version: 1.0
4629    #[cfg(feature = "api-12")]
4630    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4631    pub fn OH_Drawing_TypographyTextlineStyleGetHalfLeading(
4632        style: *mut OH_Drawing_TypographyStyle,
4633    ) -> bool;
4634    /// Get the spacing scale of line style for text typography.
4635    ///
4636    ///
4637    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4638    /// # Arguments
4639    ///
4640    /// * `style` - Indicates the pointer to a typography style object
4641    /// <b>OH_Drawing_TypographyStyle</b>.
4642    ///
4643    /// # Returns
4644    ///
4645    /// * Return the spacing scale of line style for text typography.
4646    ///
4647    /// Available since API-level: 12
4648    ///
4649    /// Version: 1.0
4650    #[cfg(feature = "api-12")]
4651    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4652    pub fn OH_Drawing_TypographyTextlineStyleGetSpacingScale(
4653        style: *mut OH_Drawing_TypographyStyle,
4654    ) -> f64;
4655    /// Get whether only line style is enabled for text typography.
4656    ///
4657    ///
4658    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4659    /// # Arguments
4660    ///
4661    /// * `style` - Indicates the pointer to a typography style object
4662    /// <b>OH_Drawing_TypographyStyle</b>.
4663    ///
4664    /// # Returns
4665    ///
4666    /// * Returns whether only line style is enabled for text layout, true means it is enabled,
4667    /// false means it is not.
4668    ///
4669    /// Available since API-level: 12
4670    ///
4671    /// Version: 1.0
4672    #[cfg(feature = "api-12")]
4673    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4674    pub fn OH_Drawing_TypographyTextlineGetStyleOnly(
4675        style: *mut OH_Drawing_TypographyStyle,
4676    ) -> bool;
4677    /// Get the text alignment mode.
4678    ///
4679    ///
4680    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4681    /// # Arguments
4682    ///
4683    /// * `style` - Indicates the pointer to a typography style object
4684    /// <b>OH_Drawing_TypographyStyle</b>.
4685    ///
4686    /// # Returns
4687    ///
4688    /// * Return the text alignment mode. For details, see the enum <b>OH_Drawing_TextAlign</b>.
4689    ///
4690    /// Available since API-level: 12
4691    ///
4692    /// Version: 1.0
4693    #[cfg(feature = "api-12")]
4694    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4695    pub fn OH_Drawing_TypographyGetTextAlign(
4696        style: *mut OH_Drawing_TypographyStyle,
4697    ) -> OH_Drawing_TextAlign;
4698    /// Get the text direction.
4699    ///
4700    ///
4701    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4702    /// # Arguments
4703    ///
4704    /// * `style` - Indicates the pointer to a typography style object
4705    /// <b>OH_Drawing_TypographyStyle</b>.
4706    ///
4707    /// # Returns
4708    ///
4709    /// * Return the text direction. For details, see the enum <b>OH_Drawing_TextDirection</b>.
4710    ///
4711    /// Available since API-level: 12
4712    ///
4713    /// Version: 1.0
4714    #[cfg(feature = "api-12")]
4715    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4716    pub fn OH_Drawing_TypographyGetTextDirection(
4717        style: *mut OH_Drawing_TypographyStyle,
4718    ) -> OH_Drawing_TextDirection;
4719    /// Sets the maximum number of lines in a text.
4720    ///
4721    ///
4722    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4723    /// # Arguments
4724    ///
4725    /// * `style` - Indicates the pointer to a typography style object
4726    /// <b>OH_Drawing_TypographyStyle</b>.
4727    ///
4728    /// # Returns
4729    ///
4730    /// * Return the maximum number of lines in a text.
4731    ///
4732    /// Available since API-level: 12
4733    ///
4734    /// Version: 1.0
4735    #[cfg(feature = "api-12")]
4736    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4737    pub fn OH_Drawing_TypographyGetTextMaxLines(style: *mut OH_Drawing_TypographyStyle) -> usize;
4738    /// Get the ellipsis of lines in a text.
4739    ///
4740    ///
4741    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4742    /// # Arguments
4743    ///
4744    /// * `style` - Indicates the pointer to a typography style object
4745    /// <b>OH_Drawing_TypographyStyle</b>.
4746    ///
4747    /// # Returns
4748    ///
4749    /// * Return the ellipsis of lines in a text.
4750    ///
4751    /// Available since API-level: 12
4752    ///
4753    /// Version: 1.0
4754    #[cfg(feature = "api-12")]
4755    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4756    pub fn OH_Drawing_TypographyGetTextEllipsis(
4757        style: *mut OH_Drawing_TypographyStyle,
4758    ) -> *mut ::core::ffi::c_char;
4759    /// Releases the memory occupied by a list of Ellipsis names.
4760    ///
4761    ///
4762    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4763    /// # Arguments
4764    ///
4765    /// * `ellipsis` - Indicates the pointer to a list of Ellipsis names.
4766    ///
4767    /// Available since API-level: 12
4768    ///
4769    /// Version: 1.0
4770    #[cfg(feature = "api-12")]
4771    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4772    pub fn OH_Drawing_TypographyDestroyEllipsis(ellipsis: *mut ::core::ffi::c_char);
4773    /// Overriding the class ParagraphStyle equals operator.
4774    ///
4775    ///
4776    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4777    /// # Arguments
4778    ///
4779    /// * `from` - Indicates source of comparison object.
4780    ///
4781    /// * `to` - Indicates comparison object.
4782    ///
4783    /// # Returns
4784    ///
4785    /// * Compare result.
4786    ///
4787    /// Available since API-level: 12
4788    ///
4789    /// Version: 1.0
4790    #[cfg(feature = "api-12")]
4791    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4792    pub fn OH_Drawing_TypographyStyleEquals(
4793        from: *mut OH_Drawing_TypographyStyle,
4794        to: *mut OH_Drawing_TypographyStyle,
4795    ) -> bool;
4796    /// Releases the memory occupied by text box.
4797    ///
4798    ///
4799    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4800    /// # Arguments
4801    ///
4802    /// * `textBox` - Indicates the pointer to a text box object <b>OH_Drawing_TextBox</b>.
4803    ///
4804    /// Available since API-level: 12
4805    ///
4806    /// Version: 1.0
4807    #[cfg(feature = "api-12")]
4808    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4809    pub fn OH_Drawing_TypographyDestroyTextBox(textBox: *mut OH_Drawing_TextBox);
4810    /// Sets the parameter of text-shadow.
4811    ///
4812    ///
4813    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4814    /// # Arguments
4815    ///
4816    /// * `shadow` - Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.
4817    ///
4818    /// * `color` - Indicates the color setting of text-shadow.
4819    ///
4820    /// * `offset` - Indicates the pointer to an <b>OH_Drawing_Point</b> object.
4821    ///
4822    /// * `blurRadius` - Indicates the radius of blur for text-shadow.
4823    ///
4824    /// Available since API-level: 12
4825    ///
4826    /// Version: 1.0
4827    #[cfg(feature = "api-12")]
4828    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4829    pub fn OH_Drawing_SetTextShadow(
4830        shadow: *mut OH_Drawing_TextShadow,
4831        color: u32,
4832        offset: *mut OH_Drawing_Point,
4833        blurRadius: f64,
4834    );
4835    /// Creates an <b>OH_Drawing_TextTab</b> object.
4836    ///
4837    ///
4838    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4839    /// # Arguments
4840    ///
4841    /// * `alignment` - Indicates enumerates text tab alignment modes. TAB alignment, Support left alignment
4842    /// right alignment center alignment, other enumeration values are left alignment effect.
4843    ///
4844    /// * `location` - Indicates location of text tab.
4845    ///
4846    /// # Returns
4847    ///
4848    /// * Returns the pointer to the <b>OH_Drawing_TextTab</b> object created. If the object returns NULL,
4849    /// the creation failed. The possible cause of the failure is that the application address space is used up.
4850    /// As a result, space cannot be allocated.
4851    ///
4852    /// Available since API-level: 18
4853    ///
4854    /// Version: 1.0
4855    #[cfg(feature = "api-18")]
4856    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
4857    pub fn OH_Drawing_CreateTextTab(
4858        alignment: OH_Drawing_TextAlign,
4859        location: f32,
4860    ) -> *mut OH_Drawing_TextTab;
4861    /// Releases the memory occupied by an <b>OH_Drawing_TextTab</b> object.
4862    ///
4863    ///
4864    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4865    /// # Arguments
4866    ///
4867    /// * `tab` - Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.
4868    ///
4869    /// Available since API-level: 18
4870    ///
4871    /// Version: 1.0
4872    #[cfg(feature = "api-18")]
4873    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
4874    pub fn OH_Drawing_DestroyTextTab(tab: *mut OH_Drawing_TextTab);
4875    /// Get alignment of an <b>OH_Drawing_TextTab</b> object.
4876    ///
4877    ///
4878    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4879    /// # Arguments
4880    ///
4881    /// * `tab` - Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.
4882    ///
4883    /// # Returns
4884    ///
4885    /// * Returns align of an <b>OH_Drawing_TextTab</b> object.
4886    ///
4887    /// Available since API-level: 18
4888    ///
4889    /// Version: 1.0
4890    #[cfg(feature = "api-18")]
4891    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
4892    pub fn OH_Drawing_GetTextTabAlignment(tab: *mut OH_Drawing_TextTab) -> OH_Drawing_TextAlign;
4893    /// Get location of an <b>OH_Drawing_TextTab</b> object.
4894    ///
4895    ///
4896    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4897    /// # Arguments
4898    ///
4899    /// * `tab` - Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.
4900    ///
4901    /// # Returns
4902    ///
4903    /// * Returns location of an <b>OH_Drawing_TextTab</b> object.
4904    ///
4905    /// Available since API-level: 18
4906    ///
4907    /// Version: 1.0
4908    #[cfg(feature = "api-18")]
4909    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
4910    pub fn OH_Drawing_GetTextTabLocation(tab: *mut OH_Drawing_TextTab) -> f32;
4911    /// Sets the text tab of <b>OH_Drawing_TypographyStyle</b> object.
4912    /// Tab alignment does not take effect when text alignment is also set, Or when the ellipsis style is configured.
4913    /// When the tab is not set or the tab's location property is less than or equal to 0, it is the default space effect.
4914    /// And all tabs in the paragraph after the setting are aligned according to this tab effect.
4915    ///
4916    ///
4917    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4918    /// # Arguments
4919    ///
4920    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
4921    ///
4922    /// * `tab` - Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.
4923    ///
4924    /// Available since API-level: 18
4925    ///
4926    /// Version: 1.0
4927    #[cfg(feature = "api-18")]
4928    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
4929    pub fn OH_Drawing_SetTypographyTextTab(
4930        style: *mut OH_Drawing_TypographyStyle,
4931        tab: *mut OH_Drawing_TextTab,
4932    );
4933    /// Get DrawingArray size.
4934    ///
4935    ///
4936    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4937    /// # Arguments
4938    ///
4939    /// * `drawingArray` - Indicates the pointer to the array object <b>OH_Drawing_Array</b>.
4940    ///
4941    /// # Returns
4942    ///
4943    /// * Size of array.
4944    ///
4945    /// Available since API-level: 14
4946    ///
4947    /// Version: 1.0
4948    #[cfg(feature = "api-14")]
4949    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
4950    pub fn OH_Drawing_GetDrawingArraySize(drawingArray: *mut OH_Drawing_Array) -> usize;
4951    /// Sets whether to optimize whitespace at the end of each line for text typography.
4952    ///
4953    ///
4954    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4955    /// # Arguments
4956    ///
4957    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
4958    ///
4959    /// * `trailingSpaceOptimized` - Boolean value indicating whether to optimize whitespace at the end of each line
4960    /// for text typography to set.
4961    ///
4962    /// Available since API-level: 20
4963    ///
4964    /// Version: 1.0
4965    #[cfg(feature = "api-20")]
4966    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
4967    pub fn OH_Drawing_SetTypographyTextTrailingSpaceOptimized(
4968        style: *mut OH_Drawing_TypographyStyle,
4969        trailingSpaceOptimized: bool,
4970    );
4971    /// Sets the text content. The content supports UTF-8, UTF-16, and UTF-32 formats.
4972    ///
4973    ///
4974    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
4975    /// # Arguments
4976    ///
4977    /// * `handler` - Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
4978    ///
4979    /// * `text` - Indicates the pointer to the text content to set.
4980    ///
4981    /// * `byteLength` - Set the byte length of the text content.
4982    ///
4983    /// * `textEncodingType` - Indicates the text encoding type <b>OH_Drawing_TextEncoding</b>.
4984    ///
4985    /// Available since API-level: 20
4986    ///
4987    /// Version: 1.0
4988    #[cfg(feature = "api-20")]
4989    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
4990    pub fn OH_Drawing_TypographyHandlerAddEncodedText(
4991        handler: *mut OH_Drawing_TypographyCreate,
4992        text: *const ::core::ffi::c_void,
4993        byteLength: usize,
4994        textEncodingType: OH_Drawing_TextEncoding,
4995    );
4996    /// Set whether to enable automatic spacing between Chinese and English for paragraph.
4997    ///
4998    ///
4999    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
5000    /// # Arguments
5001    ///
5002    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
5003    ///
5004    /// * `enableAutoSpace` - Indicates Whether to enable automatic spacing between Chinese and English.
5005    ///
5006    /// Available since API-level: 20
5007    #[cfg(feature = "api-20")]
5008    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
5009    pub fn OH_Drawing_SetTypographyTextAutoSpace(
5010        style: *mut OH_Drawing_TypographyStyle,
5011        enableAutoSpace: bool,
5012    );
5013    /// Copy a typography style object.
5014    ///
5015    ///
5016    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
5017    /// # Arguments
5018    ///
5019    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
5020    ///
5021    /// # Returns
5022    ///
5023    /// * Returns the pointer to the copied <b>OH_Drawing_TypographyStyle</b> object.
5024    ///
5025    /// Available since API-level: 20
5026    ///
5027    /// Version: 1.0
5028    #[cfg(feature = "api-20")]
5029    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
5030    pub fn OH_Drawing_CopyTypographyStyle(
5031        style: *mut OH_Drawing_TypographyStyle,
5032    ) -> *mut OH_Drawing_TypographyStyle;
5033    /// Copy a text style object.
5034    ///
5035    ///
5036    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
5037    /// # Arguments
5038    ///
5039    /// * `style` - Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
5040    ///
5041    /// # Returns
5042    ///
5043    /// * Returns the pointer to the copied <b>OH_Drawing_TextStyle</b> object.
5044    ///
5045    /// Available since API-level: 20
5046    ///
5047    /// Version: 1.0
5048    #[cfg(feature = "api-20")]
5049    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
5050    pub fn OH_Drawing_CopyTextStyle(style: *mut OH_Drawing_TextStyle) -> *mut OH_Drawing_TextStyle;
5051    /// Copy a text shadow object.
5052    ///
5053    ///
5054    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
5055    /// # Arguments
5056    ///
5057    /// * `shadow` - Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.
5058    ///
5059    /// # Returns
5060    ///
5061    /// * Returns the pointer to the copied <b>OH_Drawing_TextShadow</b> object.
5062    ///
5063    /// Available since API-level: 20
5064    ///
5065    /// Version: 1.0
5066    #[cfg(feature = "api-20")]
5067    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
5068    pub fn OH_Drawing_CopyTextShadow(
5069        shadow: *mut OH_Drawing_TextShadow,
5070    ) -> *mut OH_Drawing_TextShadow;
5071}