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