arkui_sys/native_node/native_node_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)]
6use crate::native_type::*;
7use crate::ui_input_event::ArkUI_UIInputEvent;
8
9#[cfg(feature = "api-12")]
10#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11impl ArkUI_NodeType {
12 /// Custom node.
13 pub const ARKUI_NODE_CUSTOM: ArkUI_NodeType = ArkUI_NodeType(0);
14}
15#[cfg(feature = "api-12")]
16#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
17impl ArkUI_NodeType {
18 /// Text.
19 pub const ARKUI_NODE_TEXT: ArkUI_NodeType = ArkUI_NodeType(1);
20}
21#[cfg(feature = "api-12")]
22#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
23impl ArkUI_NodeType {
24 /// Text span.
25 pub const ARKUI_NODE_SPAN: ArkUI_NodeType = ArkUI_NodeType(2);
26}
27#[cfg(feature = "api-12")]
28#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
29impl ArkUI_NodeType {
30 /// Image span.
31 pub const ARKUI_NODE_IMAGE_SPAN: ArkUI_NodeType = ArkUI_NodeType(3);
32}
33#[cfg(feature = "api-12")]
34#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
35impl ArkUI_NodeType {
36 /// Image.
37 pub const ARKUI_NODE_IMAGE: ArkUI_NodeType = ArkUI_NodeType(4);
38}
39#[cfg(feature = "api-12")]
40#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
41impl ArkUI_NodeType {
42 /// Toggle.
43 pub const ARKUI_NODE_TOGGLE: ArkUI_NodeType = ArkUI_NodeType(5);
44}
45#[cfg(feature = "api-12")]
46#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
47impl ArkUI_NodeType {
48 /// Loading icon.
49 pub const ARKUI_NODE_LOADING_PROGRESS: ArkUI_NodeType = ArkUI_NodeType(6);
50}
51#[cfg(feature = "api-12")]
52#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
53impl ArkUI_NodeType {
54 /// Single-line text input.
55 pub const ARKUI_NODE_TEXT_INPUT: ArkUI_NodeType = ArkUI_NodeType(7);
56}
57#[cfg(feature = "api-12")]
58#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
59impl ArkUI_NodeType {
60 /// Multi-line text input.
61 pub const ARKUI_NODE_TEXT_AREA: ArkUI_NodeType = ArkUI_NodeType(8);
62}
63#[cfg(feature = "api-12")]
64#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
65impl ArkUI_NodeType {
66 /// Button.
67 pub const ARKUI_NODE_BUTTON: ArkUI_NodeType = ArkUI_NodeType(9);
68}
69#[cfg(feature = "api-12")]
70#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
71impl ArkUI_NodeType {
72 /// Progress indicator.
73 pub const ARKUI_NODE_PROGRESS: ArkUI_NodeType = ArkUI_NodeType(10);
74}
75#[cfg(feature = "api-12")]
76#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
77impl ArkUI_NodeType {
78 /// Check box.
79 pub const ARKUI_NODE_CHECKBOX: ArkUI_NodeType = ArkUI_NodeType(11);
80}
81#[cfg(feature = "api-12")]
82#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
83impl ArkUI_NodeType {
84 /// XComponent.
85 pub const ARKUI_NODE_XCOMPONENT: ArkUI_NodeType = ArkUI_NodeType(12);
86}
87#[cfg(feature = "api-12")]
88#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
89impl ArkUI_NodeType {
90 /// Date picker.
91 pub const ARKUI_NODE_DATE_PICKER: ArkUI_NodeType = ArkUI_NodeType(13);
92}
93#[cfg(feature = "api-12")]
94#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
95impl ArkUI_NodeType {
96 /// Time picker.
97 pub const ARKUI_NODE_TIME_PICKER: ArkUI_NodeType = ArkUI_NodeType(14);
98}
99#[cfg(feature = "api-12")]
100#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
101impl ArkUI_NodeType {
102 /// Text picker.
103 pub const ARKUI_NODE_TEXT_PICKER: ArkUI_NodeType = ArkUI_NodeType(15);
104}
105#[cfg(feature = "api-12")]
106#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
107impl ArkUI_NodeType {
108 /// Calendar picker.
109 pub const ARKUI_NODE_CALENDAR_PICKER: ArkUI_NodeType = ArkUI_NodeType(16);
110}
111#[cfg(feature = "api-12")]
112#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
113impl ArkUI_NodeType {
114 /// Slider.
115 pub const ARKUI_NODE_SLIDER: ArkUI_NodeType = ArkUI_NodeType(17);
116}
117#[cfg(feature = "api-12")]
118#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
119impl ArkUI_NodeType {
120 /// Radio
121 pub const ARKUI_NODE_RADIO: ArkUI_NodeType = ArkUI_NodeType(18);
122}
123#[cfg(feature = "api-12")]
124#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
125impl ArkUI_NodeType {
126 /// Image animator.
127 pub const ARKUI_NODE_IMAGE_ANIMATOR: ArkUI_NodeType = ArkUI_NodeType(19);
128}
129#[cfg(feature = "api-12")]
130#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
131impl ArkUI_NodeType {
132 /// Stack container.
133 pub const ARKUI_NODE_STACK: ArkUI_NodeType = ArkUI_NodeType(1000);
134}
135#[cfg(feature = "api-12")]
136#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
137impl ArkUI_NodeType {
138 /// Swiper.
139 pub const ARKUI_NODE_SWIPER: ArkUI_NodeType = ArkUI_NodeType(1001);
140}
141#[cfg(feature = "api-12")]
142#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
143impl ArkUI_NodeType {
144 /// Scrolling container.
145 pub const ARKUI_NODE_SCROLL: ArkUI_NodeType = ArkUI_NodeType(1002);
146}
147#[cfg(feature = "api-12")]
148#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
149impl ArkUI_NodeType {
150 /// List.
151 pub const ARKUI_NODE_LIST: ArkUI_NodeType = ArkUI_NodeType(1003);
152}
153#[cfg(feature = "api-12")]
154#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
155impl ArkUI_NodeType {
156 /// List item.
157 pub const ARKUI_NODE_LIST_ITEM: ArkUI_NodeType = ArkUI_NodeType(1004);
158}
159#[cfg(feature = "api-12")]
160#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
161impl ArkUI_NodeType {
162 /// List item group.
163 pub const ARKUI_NODE_LIST_ITEM_GROUP: ArkUI_NodeType = ArkUI_NodeType(1005);
164}
165#[cfg(feature = "api-12")]
166#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
167impl ArkUI_NodeType {
168 /// Column container.
169 pub const ARKUI_NODE_COLUMN: ArkUI_NodeType = ArkUI_NodeType(1006);
170}
171#[cfg(feature = "api-12")]
172#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
173impl ArkUI_NodeType {
174 /// Row container.
175 pub const ARKUI_NODE_ROW: ArkUI_NodeType = ArkUI_NodeType(1007);
176}
177#[cfg(feature = "api-12")]
178#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
179impl ArkUI_NodeType {
180 /// Flex container.
181 pub const ARKUI_NODE_FLEX: ArkUI_NodeType = ArkUI_NodeType(1008);
182}
183#[cfg(feature = "api-12")]
184#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
185impl ArkUI_NodeType {
186 /// Refresh component.
187 pub const ARKUI_NODE_REFRESH: ArkUI_NodeType = ArkUI_NodeType(1009);
188}
189#[cfg(feature = "api-12")]
190#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
191impl ArkUI_NodeType {
192 /// Water flow container.
193 pub const ARKUI_NODE_WATER_FLOW: ArkUI_NodeType = ArkUI_NodeType(1010);
194}
195#[cfg(feature = "api-12")]
196#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
197impl ArkUI_NodeType {
198 /// Water flow item.
199 pub const ARKUI_NODE_FLOW_ITEM: ArkUI_NodeType = ArkUI_NodeType(1011);
200}
201#[cfg(feature = "api-12")]
202#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
203impl ArkUI_NodeType {
204 /// Relative layout component.
205 pub const ARKUI_NODE_RELATIVE_CONTAINER: ArkUI_NodeType = ArkUI_NodeType(1012);
206}
207#[cfg(feature = "api-12")]
208#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
209impl ArkUI_NodeType {
210 /// Grid.
211 pub const ARKUI_NODE_GRID: ArkUI_NodeType = ArkUI_NodeType(1013);
212}
213#[cfg(feature = "api-12")]
214#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
215impl ArkUI_NodeType {
216 /// Grid item.
217 pub const ARKUI_NODE_GRID_ITEM: ArkUI_NodeType = ArkUI_NodeType(1014);
218}
219#[cfg(feature = "api-12")]
220#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
221impl ArkUI_NodeType {
222 /// Custom span.
223 pub const ARKUI_NODE_CUSTOM_SPAN: ArkUI_NodeType = ArkUI_NodeType(1015);
224}
225#[repr(transparent)]
226/// Enumerates ArkUI component types that can be created on the native side.
227///
228///
229/// Available since API-level: 12
230#[cfg(feature = "api-12")]
231#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
232#[derive(Clone, Hash, PartialEq, Eq)]
233pub struct ArkUI_NodeType(pub ::core::ffi::c_uint);
234/// Defines the general input parameter structure of the [`setAttribute`] function.
235///
236///
237/// Available since API-level: 12
238#[cfg(feature = "api-12")]
239#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
240#[repr(C)]
241pub struct ArkUI_AttributeItem {
242 /// Numeric array.
243 pub value: *const ArkUI_NumberValue,
244 /// Size of the numeric array.
245 pub size: i32,
246 /// String type.
247 pub string: *const ::core::ffi::c_char,
248 /// Object type.
249 pub object: *mut ::core::ffi::c_void,
250}
251#[cfg(feature = "api-12")]
252#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
253impl ArkUI_NodeAttributeType {
254 /// Defines the width attribute, which can be set, reset, and obtained as required through APIs.
255 ///
256 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
257 ///
258 /// .value[0].f32: width, in vp.
259 ///
260 ///
261 ///
262 /// Format of the return value [`ArkUI_AttributeItem`]:
263 ///
264 /// .value[0].f32: width, in vp.
265 pub const NODE_WIDTH: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(0);
266}
267#[cfg(feature = "api-12")]
268#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
269impl ArkUI_NodeAttributeType {
270 /// Defines the height attribute, which can be set, reset, and obtained as required through APIs.
271 ///
272 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
273 ///
274 /// .value[0].f32: height, in vp.
275 ///
276 ///
277 ///
278 /// Format of the return value [`ArkUI_AttributeItem`]:
279 ///
280 /// .value[0].f32: height, in vp.
281 pub const NODE_HEIGHT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1);
282}
283#[cfg(feature = "api-12")]
284#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
285impl ArkUI_NodeAttributeType {
286 /// Defines the background color attribute, which can be set, reset, and obtained as required through APIs.
287 ///
288 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
289 ///
290 /// .value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.
291 ///
292 ///
293 ///
294 /// Format of the return value [`ArkUI_AttributeItem`]:
295 ///
296 /// .value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.
297 pub const NODE_BACKGROUND_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(2);
298}
299#[cfg(feature = "api-12")]
300#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
301impl ArkUI_NodeAttributeType {
302 /// Defines the background image attribute, which can be set, reset, and obtained as required through APIs.
303 ///
304 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
305 ///
306 /// .string: image address;
307 ///
308 /// .value[0]?.i32: whether to repeat the image. Optional. The parameter type is [`ArkUI_ImageRepeat`].
309 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`]. Either .string or .object must be set.
310 ///
311 /// The default value is <b>ARKUI_IMAGE_REPEAT_NONE</b>.
312 ///
313 ///
314 ///
315 /// Format of the return value [`ArkUI_AttributeItem`]:
316 ///
317 /// .string: image address;
318 ///
319 /// .value[0].i32: whether to repeat the image. The parameter type is [`ArkUI_ImageRepeat`].
320 ///
321 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`].
322 pub const NODE_BACKGROUND_IMAGE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(3);
323}
324#[cfg(feature = "api-12")]
325#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
326impl ArkUI_NodeAttributeType {
327 /// Defines the padding attribute, which can be set, reset, and obtained as required through APIs.
328 ///
329 /// There are two formats of [`ArkUI_AttributeItem`] for setting the attribute value:
330 ///
331 /// 1: Specify the same padding for the four directions.
332 ///
333 /// .value[0].f32: padding, in vp.
334 ///
335 /// 2: Specify different paddings for different directions.
336 ///
337 /// .value[0].f32: top padding, in vp.
338 ///
339 /// .value[1].f32: right padding, in vp.
340 ///
341 /// .value[2].f32: bottom padding, in vp.
342 ///
343 /// .value[3].f32: left padding, in vp.
344 ///
345 ///
346 ///
347 /// Format of the return value [`ArkUI_AttributeItem`]:
348 ///
349 /// .value[0].f32: top padding, in vp.
350 ///
351 /// .value[1].f32: right padding, in vp.
352 ///
353 /// .value[2].f32: bottom padding, in vp.
354 ///
355 /// .value[3].f32: left padding, in vp.
356 pub const NODE_PADDING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4);
357}
358#[cfg(feature = "api-12")]
359#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
360impl ArkUI_NodeAttributeType {
361 /// Defines the component ID attribute, which can be set, reset, and obtained as required through APIs.
362 ///
363 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
364 ///
365 /// .string: component ID.
366 ///
367 ///
368 ///
369 /// Format of the return value [`ArkUI_AttributeItem`]:
370 ///
371 /// .string: component ID.
372 pub const NODE_ID: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(5);
373}
374#[cfg(feature = "api-12")]
375#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
376impl ArkUI_NodeAttributeType {
377 /// Defines the interactivity attribute, which can be set, reset, and obtained as required through APIs.
378 ///
379 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
380 ///
381 /// .value[0].i32: The value <b>true</b> means that the component can interact with users, and <b>false</b> means the opposite.
382 ///
383 ///
384 ///
385 /// Format of the return value [`ArkUI_AttributeItem`]:
386 ///
387 /// .value[0].i32: The value <b>1</b> means that the component can interact with users, and <b>0</b> means the opposite.
388 pub const NODE_ENABLED: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(6);
389}
390#[cfg(feature = "api-12")]
391#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
392impl ArkUI_NodeAttributeType {
393 /// Defines the margin attribute, which can be set, reset, and obtained as required through APIs.
394 ///
395 /// There are two formats of [`ArkUI_AttributeItem`] for setting the attribute value:
396 ///
397 /// 1: Specify the same margin for the four directions.
398 ///
399 /// .value[0].f32: margin, in vp.
400 ///
401 /// 2: Specify different margins for different directions.
402 ///
403 /// .value[0].f32: top margin, in vp.
404 ///
405 /// .value[1].f32: right margin, in vp.
406 ///
407 /// .value[2].f32: bottom margin, in vp.
408 ///
409 /// .value[3].f32: left margin, in vp.
410 ///
411 ///
412 ///
413 /// Format of the return value [`ArkUI_AttributeItem`]:
414 ///
415 /// .value[0].f32: top margin, in vp.
416 ///
417 /// .value[1].f32: right margin, in vp.
418 ///
419 /// .value[2].f32: bottom margin, in vp.
420 ///
421 /// .value[3].f32: left margin, in vp.
422 pub const NODE_MARGIN: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7);
423}
424#[cfg(feature = "api-12")]
425#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
426impl ArkUI_NodeAttributeType {
427 /// Defines the translate attribute, which can be set, reset, and obtained as required through APIs.
428 ///
429 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
430 ///
431 /// .value[0].f32: distance to translate along the x-axis, in vp. The default value is <b>0</b>.
432 ///
433 /// .value[1].f32: distance to translate along the y-axis, in vp. The default value is <b>0</b>.
434 ///
435 /// .value[2].f32: distance to translate along the z-axis, in vp. The default value is <b>0</b>.
436 ///
437 ///
438 ///
439 /// Format of the return value [`ArkUI_AttributeItem`]:
440 ///
441 /// .value[0].f32: distance to translate along the x-axis, in vp.
442 ///
443 /// .value[1].f32: distance to translate along the y-axis, in vp.
444 ///
445 /// .value[2].f32: distance to translate along the z-axis, in vp.
446 pub const NODE_TRANSLATE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8);
447}
448#[cfg(feature = "api-12")]
449#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
450impl ArkUI_NodeAttributeType {
451 /// Defines the scale attribute, which can be set, reset, and obtained as required through APIs.
452 ///
453 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
454 ///
455 /// .value[0].f32: scale factor along the x-axis. The default value is <b>1</b>.
456 ///
457 /// .value[1].f32: scale factor along the y-axis. The default value is <b>1</b>.
458 ///
459 ///
460 ///
461 /// Format of the return value [`ArkUI_AttributeItem`]:
462 ///
463 /// .value[0].f32: scale factor along the x-axis.
464 ///
465 /// .value[1].f32: scale factor along the y-axis.
466 pub const NODE_SCALE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(9);
467}
468#[cfg(feature = "api-12")]
469#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
470impl ArkUI_NodeAttributeType {
471 /// Defines the rotate attribute, which can be set, reset, and obtained as required through APIs.
472 ///
473 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
474 ///
475 /// .value[0].f32: X coordinate of the rotation axis vector. The default value is <b>0</b>.
476 ///
477 /// .value[1].f32: Y coordinate of the rotation axis vector. The default value is <b>0</b>.
478 ///
479 /// .value[2].f32: Z coordinate of the rotation axis vector. The default value is <b>0</b>.
480 ///
481 /// .value[3].f32: rotation angle. The default value is <b>0</b>.
482 ///
483 /// .value[4].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in vp.
484 /// The default value is <b>0</b>.
485 ///
486 ///
487 ///
488 /// Format of the return value [`ArkUI_AttributeItem`]:
489 ///
490 /// .value[0].f32: X coordinate of the rotation axis vector.
491 ///
492 /// .value[1].f32: Y coordinate of the rotation axis vector.
493 ///
494 /// .value[2].f32: Z coordinate of the rotation axis vector.
495 ///
496 /// .value[3].f32: rotation angle.
497 ///
498 /// .value[4].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in vp.
499 pub const NODE_ROTATE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(10);
500}
501#[cfg(feature = "api-12")]
502#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
503impl ArkUI_NodeAttributeType {
504 /// Sets the brightness attribute, which can be set, reset, and obtained as required through APIs.
505 ///
506 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
507 ///
508 /// .value[0].f32: brightness value. The default value is <b>1.0</b>, and the recommended value range is [0, 2].
509 ///
510 ///
511 ///
512 /// Format of the return value [`ArkUI_AttributeItem`]:
513 ///
514 /// .value[0].f32: brightness value.
515 pub const NODE_BRIGHTNESS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(11);
516}
517#[cfg(feature = "api-12")]
518#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
519impl ArkUI_NodeAttributeType {
520 /// Sets the saturation attribute, which can be set, reset, and obtained as required through APIs.
521 ///
522 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
523 ///
524 /// .value[0].f32: saturation value. The default value is <b>1.0</b>, and the recommended value range is [0, 50).
525 ///
526 ///
527 ///
528 /// Format of the return value [`ArkUI_AttributeItem`]:
529 ///
530 /// .value[0].f32: saturation value.
531 pub const NODE_SATURATION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(12);
532}
533#[cfg(feature = "api-12")]
534#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
535impl ArkUI_NodeAttributeType {
536 /// Sets the blur attribute, which can be set, reset, and obtained as required through APIs.
537 ///
538 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
539 ///
540 /// .value[0].f32: blur radius. A larger value indicates a higher blur degree. If the value is <b>0</b>,
541 /// the component is not blurred. The unit is vp. The default value is <b>0.0</b>.
542 ///
543 ///
544 ///
545 /// Format of the return value [`ArkUI_AttributeItem`]:
546 ///
547 /// .value[0].f32: blur radius. The larger the fuzzy radius, the more blurred the image. If the value is <b>0</b>,
548 /// the image is not blurred. The unit is vp.
549 pub const NODE_BLUR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(13);
550}
551#[cfg(feature = "api-12")]
552#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
553impl ArkUI_NodeAttributeType {
554 /// Sets the gradient attribute, which can be set, reset, and obtained as required through APIs.
555 ///
556 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
557 ///
558 /// .value[0].f32: start angle of the linear gradient. This attribute takes effect only when
559 /// [`ArkUI_LinearGradientDirection`] is set to <b>ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM</b>.
560 /// A positive value indicates a clockwise rotation from the origin, (0, 0). The default value is <b>180</b>.
561 ///
562 /// .value[1].i32: direction of the linear gradient. When it is set, the <b>angle</b> attribute does not take effect.
563 /// The parameter type is [`ArkUI_LinearGradientDirection`]:
564 ///
565 /// .value[2].i32: whether the colors are repeated. The default value is <b>false</b>.
566 ///
567 /// .object: array of color stops, each of which consists of a color and its stop position.
568 /// Invalid colors are automatically skipped.
569 ///
570 /// colors: colors of the color stops.
571 ///
572 /// stops: stop positions of the color stops.
573 ///
574 /// size: number of colors.
575 ///
576 ///
577 ///
578 /// Format of the return value [`ArkUI_AttributeItem`]:
579 ///
580 /// .value[0].f32: start angle of the linear gradient.
581 ///
582 /// .value[1].i32: direction of the linear gradient. It does not take effect when <b>angle</b> is set.
583 ///
584 /// .value[2].i32: whether the colors are repeated.
585 ///
586 /// .object: array of color stops, each of which consists of a color and its stop position.
587 /// Invalid colors are automatically skipped.
588 ///
589 /// colors: colors of the color stops.
590 ///
591 /// stops: stop positions of the color stops.
592 ///
593 /// size: number of colors.
594 pub const NODE_LINEAR_GRADIENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(14);
595}
596#[cfg(feature = "api-12")]
597#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
598impl ArkUI_NodeAttributeType {
599 /// Sets the alignment attribute, which can be set, reset, and obtained as required through APIs.
600 ///
601 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
602 ///
603 /// .value[0].i32: alignment mode. The data type is [`ArkUI_Alignment`].
604 /// The default value is <b>ARKUI_ALIGNMENT_CENTER</b>.
605 ///
606 ///
607 ///
608 /// Format of the return value [`ArkUI_AttributeItem`]:
609 ///
610 /// .value[0].i32: alignment mode. The data type is [`ArkUI_Alignment`].
611 pub const NODE_ALIGNMENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(15);
612}
613#[cfg(feature = "api-12")]
614#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
615impl ArkUI_NodeAttributeType {
616 /// Defines the opacity attribute, which can be set, reset, and obtained as required through APIs.
617 ///
618 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
619 ///
620 /// .value[0].f32: opacity value. The value ranges from 0 to 1.
621 ///
622 ///
623 ///
624 /// Format of the return value [`ArkUI_AttributeItem`]:
625 ///
626 /// .value[0].f32: opacity value. The value ranges from 0 to 1.
627 pub const NODE_OPACITY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(16);
628}
629#[cfg(feature = "api-12")]
630#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
631impl ArkUI_NodeAttributeType {
632 /// Defines the border width attribute, which can be set, reset, and obtained as required through APIs.
633 ///
634 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
635 ///
636 /// 1: .value[0].f32: width of the four borders.
637 ///
638 /// 2: .value[0].f32: width of the top border.
639 ///
640 /// .value[1].f32: width of the right border.
641 ///
642 /// .value[2].f32: width of the bottom border.
643 ///
644 /// .value[3].f32: width of the left border.
645 ///
646 ///
647 ///
648 /// Format of the return value [`ArkUI_AttributeItem`]:
649 ///
650 /// .value[0].f32: width of the top border.
651 ///
652 /// .value[1].f32: width of the right border.
653 ///
654 /// .value[2].f32: width of the bottom border.
655 ///
656 /// .value[3].f32: width of the left border.
657 pub const NODE_BORDER_WIDTH: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17);
658}
659#[cfg(feature = "api-12")]
660#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
661impl ArkUI_NodeAttributeType {
662 /// Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs.
663 ///
664 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
665 ///
666 /// 1: .value[0].f32: radius of the four corners.
667 ///
668 /// 2: .value[0].f32: radius of the upper left corner.
669 ///
670 /// .value[1].f32: radius of the upper right corner.
671 ///
672 /// .value[2].f32: radius of the lower left corner.
673 ///
674 /// .value[3].f32: radius of the lower right corner.
675 ///
676 ///
677 ///
678 /// Format of the return value [`ArkUI_AttributeItem`]:
679 ///
680 /// .value[0].f32: radius of the upper left corner.
681 ///
682 /// .value[1].f32: radius of the upper right corner.
683 ///
684 /// .value[2].f32: radius of the lower left corner.
685 ///
686 /// .value[3].f32: radius of the lower right corner.
687 pub const NODE_BORDER_RADIUS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(18);
688}
689#[cfg(feature = "api-12")]
690#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
691impl ArkUI_NodeAttributeType {
692 /// Defines the border color attribute, which can be set, reset, and obtained as required through APIs.
693 ///
694 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
695 ///
696 /// 1: .value[0].u32: color of the four borders, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
697 ///
698 /// 2: .value[0].u32: color of the top border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
699 ///
700 /// .value[1].u32: color of the right border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
701 ///
702 /// .value[2].u32: color of the lower border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
703 ///
704 /// .value[3].u32: color of the left border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
705 ///
706 ///
707 ///
708 /// Format of the return value [`ArkUI_AttributeItem`]:
709 ///
710 /// .value[0].u32: color of the top border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
711 ///
712 /// .value[1].u32: color of the right border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
713 ///
714 /// .value[2].u32: color of the lower border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
715 ///
716 /// .value[3].u32: color of the left border, in 0xARGB format, for example, <b>0xFFFF11FF</b>.
717 pub const NODE_BORDER_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(19);
718}
719#[cfg(feature = "api-12")]
720#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
721impl ArkUI_NodeAttributeType {
722 /// Defines the border line style attribute, which can be set, reset, and obtained as required through APIs.
723 ///
724 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
725 ///
726 /// 1: .value[0].i32: line style of the four borders. The parameter type is [`ArkUI_BorderStyle`].
727 /// The default value is <b>ARKUI_BORDER_STYLE_SOLID</b>.
728 ///
729 /// 2: .value[0].i32: line style of the top border. The parameter type is [`ArkUI_BorderStyle`].
730 /// The default value is <b>ARKUI_BORDER_STYLE_SOLID</b>.
731 ///
732 /// .value[1].i32: line style of the right border. The parameter type is [`ArkUI_BorderStyle`].
733 /// The default value is <b>ARKUI_BORDER_STYLE_SOLID</b>.
734 ///
735 /// .value[2].i32: line style of the bottom border. The parameter type is [`ArkUI_BorderStyle`].
736 /// The default value is <b>ARKUI_BORDER_STYLE_SOLID</b>.
737 ///
738 /// .value[3].i32: line style of the left border. The parameter type is [`ArkUI_BorderStyle`].
739 /// The default value is <b>ARKUI_BORDER_STYLE_SOLID</b>.
740 ///
741 ///
742 ///
743 /// Format of the return value [`ArkUI_AttributeItem`]:
744 ///
745 /// .value[0].i32: line style of the top border.
746 ///
747 /// .value[1].i32: line style of the right border.
748 ///
749 /// .value[2].i32: line style of the bottom border.
750 ///
751 /// .value[3].i32: line style of the left border.
752 pub const NODE_BORDER_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(20);
753}
754#[cfg(feature = "api-12")]
755#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
756impl ArkUI_NodeAttributeType {
757 /// Defines the z-index attribute for the stack sequence.
758 /// This attribute can be set, reset, and obtained as required through APIs.
759 ///
760 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
761 ///
762 /// .value[0].i32: z-index value.
763 ///
764 ///
765 ///
766 /// Format of the return value [`ArkUI_AttributeItem`]:
767 ///
768 /// .value[0].i32: z-index value.
769 pub const NODE_Z_INDEX: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(21);
770}
771#[cfg(feature = "api-12")]
772#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
773impl ArkUI_NodeAttributeType {
774 /// Defines the visibility attribute, which can be set, reset, and obtained as required through APIs.
775 ///
776 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
777 ///
778 /// .value[0].i32: whether to show or hide the component. The parameter type is [`ArkUI_Visibility`].
779 /// The default value is <b>ARKUI_VISIBILITY_VISIBLE</b>.
780 ///
781 ///
782 ///
783 /// Format of the return value [`ArkUI_AttributeItem`]:
784 ///
785 /// .value[0].i32: whether to show or hide the component. The parameter type is [`ArkUI_Visibility`].
786 /// The default value is <b>ARKUI_VISIBILITY_VISIBLE</b>.
787 pub const NODE_VISIBILITY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(22);
788}
789#[cfg(feature = "api-12")]
790#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
791impl ArkUI_NodeAttributeType {
792 /// Defines the clipping and masking attribute, which can be set, reset, and obtained as required through
793 /// APIs.
794 ///
795 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
796 ///
797 /// .value[0].i32: whether to clip the component based on the parent container bounds.
798 /// The value <b>1</b> means to clip the component, and <b>0</b> means the opposite.
799 ///
800 ///
801 ///
802 /// Format of the return value [`ArkUI_AttributeItem`]:
803 ///
804 /// .value[0].i32: whether to clip the component based on the parent container bounds.
805 /// The value <b>1</b> means to clip the component, and <b>0</b> means the opposite.
806 pub const NODE_CLIP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(23);
807}
808#[cfg(feature = "api-12")]
809#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
810impl ArkUI_NodeAttributeType {
811 /// Defines the clipping region on the component.
812 /// This attribute can be set and obtained as required through APIs.
813 ///
814 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute,
815 /// which supports five types of shapes:
816 ///
817 /// 1. Rectangle:
818 ///
819 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
820 /// The value is <b>ARKUI_CLIP_TYPE_RECTANGLE</b> for the rectangle shape.
821 ///
822 /// .value[1].f32: width of the rectangle.
823 ///
824 /// .value[2].f32: height of rectangle.
825 ///
826 /// .value[3].f32: width of the rounded corner of the rectangle.
827 ///
828 /// .value[4].f32: height of the rounded corner of the rectangle.
829 ///
830 /// .value[5]?.f32: radius of the top left corner of the rectangular shape.
831 ///
832 /// .value[6]?.f32: radius of the bottom left corner of the rectangular shape.
833 ///
834 /// .value[7]?.f32: radius of the top right corner of the rectangular shape.
835 ///
836 /// .value[8]?.f32: radius of the bottom right corner of the rectangular shape.
837 ///
838 /// 2. Circle:
839 ///
840 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
841 /// The value is <b>ARKUI_CLIP_TYPE_CIRCLE</b> for the circle shape.
842 ///
843 /// .value[1].f32: width of the circle.
844 ///
845 /// .value[2].f32: height of the circle.
846 ///
847 /// 3.Ellipse:
848 ///
849 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
850 /// The value is <b>ARKUI_CLIP_TYPE_ELLIPSE</b> for the ellipse shape.
851 ///
852 /// .value[1].f32: width of the ellipse.
853 ///
854 /// .value[2].f32: height of the ellipse.
855 ///
856 /// 4. Path:
857 ///
858 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
859 /// The value is <b>ARKUI_CLIP_TYPE_PATH</b> for the path shape.
860 ///
861 /// .value[1].f32: width of the path.
862 ///
863 /// .value[2].f32: height of the path.
864 ///
865 /// .string: command for drawing the path.
866 ///
867 /// Format of the return value [`ArkUI_AttributeItem`], which supports five types of shapes:
868 ///
869 /// 1. Rectangle:
870 ///
871 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
872 /// The value is <b>ARKUI_CLIP_TYPE_RECTANGLE</b> for the rectangle shape.
873 ///
874 /// .value[1].f32: width of the rectangle.
875 ///
876 /// .value[2].f32: height of rectangle.
877 ///
878 /// .value[3].f32: width of the rounded corner of the rectangle.
879 ///
880 /// .value[4].f32: height of the rounded corner of the rectangle.
881 ///
882 /// .value[5].f32: radius of the top left corner of the rectangular shape;
883 ///
884 /// .value[6].f32: radius of the bottom left corner of the rectangular shape;
885 ///
886 /// .value[7].f32: radius of the top right corner of the rectangular shape;
887 ///
888 /// .value[8].f32: radius of the bottom right corner of the rectangular shape;
889 ///
890 /// 2. Circle:
891 ///
892 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
893 /// The value is <b>ARKUI_CLIP_TYPE_CIRCLE</b> for the circle shape.
894 ///
895 /// .value[1].f32: width of the circle.
896 ///
897 /// .value[2].f32: height of the circle.
898 ///
899 /// 3.Ellipse:
900 ///
901 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
902 /// The value is <b>ARKUI_CLIP_TYPE_ELLIPSE</b> for the ellipse shape.
903 ///
904 /// .value[1].f32: width of the ellipse.
905 ///
906 /// .value[2].f32: height of the ellipse.
907 ///
908 /// 4. Path:
909 ///
910 /// .value[0].i32: type of shape. The parameter type is [`ArkUI_ClipType`].
911 /// The value is <b>ARKUI_CLIP_TYPE_PATH</b> for the path shape.
912 ///
913 /// .value[1].f32: width of the path.
914 ///
915 /// .value[2].f32: height of the path.
916 ///
917 /// .string: command for drawing the path.
918 pub const NODE_CLIP_SHAPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(24);
919}
920#[cfg(feature = "api-12")]
921#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
922impl ArkUI_NodeAttributeType {
923 /// Defines the transform attribute, which can be used to translate, rotate, and scale images.
924 /// This attribute can be set, reset, and obtained as required through APIs.
925 ///
926 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
927 ///
928 /// .value[0...15].f32: 16 floating-point numbers.
929 ///
930 ///
931 ///
932 /// Format of the return value [`ArkUI_AttributeItem`]:
933 ///
934 /// .value[0...15].f32: 16 floating-point numbers.
935 pub const NODE_TRANSFORM: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(25);
936}
937#[cfg(feature = "api-12")]
938#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
939impl ArkUI_NodeAttributeType {
940 /// Defines the hit test behavior attribute, which can be set, reset, and obtained as required through APIs.
941 ///
942 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
943 ///
944 /// .value[0].i32: hit test mode. The parameter type is [`ArkUI_HitTestMode`].
945 /// The default value is <b>ARKUI_HIT_TEST_MODE_DEFAULT</b>.
946 ///
947 ///
948 ///
949 /// Format of the return value [`ArkUI_AttributeItem`]:
950 ///
951 /// .value[0].i32: hit test mode. The parameter type is [`ArkUI_HitTestMode`].
952 /// The default value is <b>ARKUI_HIT_TEST_MODE_DEFAULT</b>.
953 pub const NODE_HIT_TEST_BEHAVIOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(26);
954}
955#[cfg(feature = "api-12")]
956#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
957impl ArkUI_NodeAttributeType {
958 /// Defines the offset attribute, which specifies the offset of the component's upper left corner relative
959 /// to the parent container's. This attribute can be set, reset, and obtained as required through APIs.
960 ///
961 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
962 ///
963 /// .value[0].f32: X coordinate.
964 ///
965 /// .value[1].f32: Y coordinate.
966 ///
967 ///
968 ///
969 /// Format of the return value [`ArkUI_AttributeItem`]:
970 ///
971 /// .value[0].f32: X coordinate.
972 ///
973 /// .value[1].f32: Y coordinate.
974 pub const NODE_POSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(27);
975}
976#[cfg(feature = "api-12")]
977#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
978impl ArkUI_NodeAttributeType {
979 /// Defines the shadow attribute, which can be set, reset, and obtained as required through APIs.
980 ///
981 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
982 ///
983 /// .value[0].i32: shadow effect. The parameter type is [`ArkUI_ShadowStyle`].
984 ///
985 ///
986 ///
987 /// Format of the return value [`ArkUI_AttributeItem`]:
988 ///
989 /// .value[0].i32: shadow effect. The parameter type is [`ArkUI_ShadowStyle`].
990 pub const NODE_SHADOW: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(28);
991}
992#[cfg(feature = "api-12")]
993#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
994impl ArkUI_NodeAttributeType {
995 /// Defines the custom shadow effect. This attribute can be set, reset, and obtained as required through APIs.
996 ///
997 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
998 ///
999 /// .value[0]?.f32: blur radius of the shadow, in vp.
1000 ///
1001 /// .value[1]?.i32: whether to enable the coloring strategy. The value <b>1</b> means to enable the coloring
1002 /// strategy, and <b>0</b> (default value) means the opposite.
1003 ///
1004 /// .value[2]?.f32: offset of the shadow along the x-axis, in px.
1005 ///
1006 /// .value[3]?.f32: offset of the shadow along the y-axis, in px.
1007 ///
1008 /// .value[4]?.i32: shadow type [`ArkUI_ShadowType`]. The default value is <b>ARKUI_SHADOW_TYPE_COLOR</b>.
1009 ///
1010 /// .value[5]?.u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
1011 ///
1012 /// .value[6]?.u32: whether to fill the shadow. The value <b>1</b> means to fill the shadow, and <b>0</b>
1013 /// means the opposite.
1014 ///
1015 ///
1016 ///
1017 ///
1018 /// Format of the return value [`ArkUI_AttributeItem`]:
1019 ///
1020 /// .value[0].f32: blur radius of the shadow, in vp.
1021 ///
1022 /// .value[1].i32: whether to enable the coloring strategy.
1023 ///
1024 /// .value[2].f32: offset of the shadow along the x-axis, in px.
1025 ///
1026 /// .value[3].f32: offset of the shadow along the y-axis, in px.
1027 ///
1028 /// .value[4].i32: shadow type [`ArkUI_ShadowType`]. The default value is <b>ARKUI_SHADOW_TYPE_COLOR</b>.
1029 ///
1030 /// .value[5].u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
1031 ///
1032 /// .value[6].u32: whether to fill the shadow. The value <b>1</b> means to fill the shadow, and <b>0</b>
1033 /// means the opposite.
1034 pub const NODE_CUSTOM_SHADOW: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(29);
1035}
1036#[cfg(feature = "api-12")]
1037#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1038impl ArkUI_NodeAttributeType {
1039 /// Defines the background image width and height.
1040 /// This attribute can be set, reset, and obtained as required through APIs.
1041 ///
1042 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1043 ///
1044 /// .value[0].f32: width of the image. The value range is [0, +∞), and the unit is vp.
1045 ///
1046 /// .value[1].f32: height of the image. The value range is [0, +∞), and the unit is vp.
1047 ///
1048 ///
1049 ///
1050 /// Format of the return value [`ArkUI_AttributeItem`]:
1051 ///
1052 /// .value[0].f32: width of the image, in vp.
1053 ///
1054 /// .value[1].f32: height of the image, in vp.
1055 pub const NODE_BACKGROUND_IMAGE_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(30);
1056}
1057#[cfg(feature = "api-12")]
1058#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1059impl ArkUI_NodeAttributeType {
1060 /// Defines the background image size.
1061 /// This attribute can be set, reset, and obtained as required through APIs.
1062 ///
1063 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1064 ///
1065 /// .value[0].i32: size of the background image. The value is an enum of [`ArkUI_ImageSize`].
1066 ///
1067 ///
1068 ///
1069 /// Format of the return value [`ArkUI_AttributeItem`]:
1070 ///
1071 /// .value[0].i32: size of the background image. The value is an enum of [`ArkUI_ImageSize`].
1072 pub const NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE: ArkUI_NodeAttributeType =
1073 ArkUI_NodeAttributeType(31);
1074}
1075#[cfg(feature = "api-12")]
1076#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1077impl ArkUI_NodeAttributeType {
1078 /// Defines the background blur attribute, which can be set, reset, and obtained as required through APIs.
1079 ///
1080 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1081 ///
1082 /// .value[0].i32: blue type. The value is an enum of [`ArkUI_BlurStyle`].
1083 ///
1084 /// .value[1]?.i32: color mode. The value is an enum of [`ArkUI_ColorMode`].
1085 ///
1086 /// .value[2]?.i32: adaptive color mode. The value is an enum of [`ArkUI_AdaptiveColor`].
1087 ///
1088 /// .value[3]?.f32: blur degree. The value range is [0.0, 1.0].
1089 ///
1090 /// .value[4]?.f32: start boundary of grayscale blur.
1091 ///
1092 /// .value[5]?.f32: end boundary of grayscale blur.
1093 ///
1094 ///
1095 ///
1096 /// Format of the return value [`ArkUI_AttributeItem`]:
1097 ///
1098 /// .value[0].i32: blue type. The value is an enum of [`ArkUI_BlurStyle`].
1099 ///
1100 /// .value[1].i32: color mode. The value is an enum of [`ArkUI_ColorMode`].
1101 ///
1102 /// .value[2].i32: adaptive color mode. The value is an enum of [`ArkUI_AdaptiveColor`].
1103 ///
1104 /// .value[3].f32: blur degree. The value range is [0.0, 1.0].
1105 ///
1106 /// .value[4].f32: start boundary of grayscale blur.
1107 ///
1108 /// .value[5].f32: end boundary of grayscale blur.
1109 pub const NODE_BACKGROUND_BLUR_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(32);
1110}
1111#[cfg(feature = "api-12")]
1112#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1113impl ArkUI_NodeAttributeType {
1114 /// Defines the transform center attribute, which can be set, reset, and obtained as required through APIs.
1115 ///
1116 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1117 ///
1118 /// .value[0]?.f32: X coordinate of the center point, in vp.
1119 ///
1120 /// .value[1]?.f32: Y coordinate of the center point, in vp.
1121 ///
1122 /// .value[2]?.f32: Z coordinate of the center point, in vp.
1123 ///
1124 /// .value[3]?.f32 : X coordinate of the center point, expressed in a number that represents a percentage.
1125 /// For example, 0.2 indicates 20%. This attribute overwrites value[0].f32. The default value is <b>0.5f</b>.
1126 ///
1127 /// .value[4]?.f32 : Y coordinate of the center point, expressed in a number that represents a percentage.
1128 /// For example, 0.2 indicates 20%. This attribute overwrites value[1].f32. The default value is <b>0.5f</b>.
1129 ///
1130 /// .value[5]?.f32 : Z coordinate of the center point, expressed in a number that represents a percentage.
1131 /// For example, 0.2 indicates 20%. This attribute overwrites value[2].f32. The default value is <b>0.0f</b>.
1132 ///
1133 ///
1134 ///
1135 /// Format of the return value [`ArkUI_AttributeItem`]:
1136 ///
1137 /// .value[0].f32: X coordinate of the center point, in vp.
1138 ///
1139 /// .value[1].f32: Y coordinate of the center point, in vp.
1140 ///
1141 /// .value[2].f32: Z coordinate of the center point, in vp.
1142 ///
1143 /// Note: If the coordinate is expressed in a number that represents a percentage, the attribute obtaining API
1144 /// returns the calculated value in vp.
1145 pub const NODE_TRANSFORM_CENTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(33);
1146}
1147#[cfg(feature = "api-12")]
1148#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1149impl ArkUI_NodeAttributeType {
1150 /// Defines the transition opacity attribute, which can be set, reset, and obtained as required through APIs.
1151 ///
1152 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1153 ///
1154 /// .value[0].f32: opacity values of the start and end points.
1155 ///
1156 /// .value[1].i32: animation duration, in milliseconds.
1157 ///
1158 /// .value[2].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1159 ///
1160 /// .value[3]?.i32: animation delay duration, in milliseconds.
1161 ///
1162 /// .value[4]?.i32: number of times that the animation is played.
1163 ///
1164 /// .value[5]?.i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1165 ///
1166 /// .value[6]?.f32: animation playback speed.
1167 ///
1168 ///
1169 ///
1170 /// Format of the return value [`ArkUI_AttributeItem`]:
1171 ///
1172 /// .value[0].f32: opacity values of the start and end points.
1173 ///
1174 /// .value[1].i32: animation duration, in milliseconds.
1175 ///
1176 /// .value[2].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1177 ///
1178 /// .value[3].i32: animation delay duration, in milliseconds.
1179 ///
1180 /// .value[4].i32: number of times that the animation is played.
1181 ///
1182 /// .value[5].i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1183 ///
1184 /// .value[6].f32: animation playback speed.
1185 pub const NODE_OPACITY_TRANSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(34);
1186}
1187#[cfg(feature = "api-12")]
1188#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1189impl ArkUI_NodeAttributeType {
1190 /// Defines the transition rotation attribute, which can be set, reset, and obtained as required through APIs.
1191 ///
1192 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1193 ///
1194 /// .value[0].f32: X-component of the rotation vector.
1195 ///
1196 /// .value[1].f32: Y-component of the rotation vector.
1197 ///
1198 /// .value[2].f32: Z-component of the rotation vector
1199 ///
1200 /// .value[3].f32: angle.
1201 ///
1202 /// .value[4].f32: line of sight. The default value is <b>0.0f</b>.
1203 ///
1204 /// .value[5].i32: animation duration, in milliseconds.
1205 ///
1206 /// .value[6].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1207 ///
1208 ///
1209 /// .value[7]?.i32: animation delay duration, in milliseconds.
1210 ///
1211 /// .value[8]?.i32: number of times that the animation is played.
1212 ///
1213 /// .value[9]?.i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1214 ///
1215 /// .value[10]?.f32: animation playback speed.
1216 ///
1217 ///
1218 ///
1219 /// Format of the return value [`ArkUI_AttributeItem`]:
1220 ///
1221 /// .value[0].f32: X-component of the rotation vector.
1222 ///
1223 /// .value[1].f32: Y-component of the rotation vector.
1224 ///
1225 /// .value[2].f32: Z-component of the rotation vector
1226 ///
1227 /// .value[3].f32: angle.
1228 ///
1229 /// .value[4].f32: line of sight.
1230 ///
1231 /// .value[5].i32: animation duration, in milliseconds.
1232 ///
1233 /// .value[6].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1234 ///
1235 ///
1236 /// .value[7].i32: animation delay duration, in milliseconds.
1237 ///
1238 /// .value[8].i32: number of times that the animation is played.
1239 ///
1240 /// .value[9].i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1241 ///
1242 /// .value[10].f32: animation playback speed.
1243 pub const NODE_ROTATE_TRANSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(35);
1244}
1245#[cfg(feature = "api-12")]
1246#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1247impl ArkUI_NodeAttributeType {
1248 /// Defines the transition scaling attribute, which can be set, reset, and obtained as required through APIs.
1249 ///
1250 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1251 ///
1252 /// .value[0].f32: scale factor along the x-axis.
1253 ///
1254 /// .value[1].f32: scale factor along the y-axis.
1255 ///
1256 /// .value[2].f32: scale factor along the z-axis.
1257 ///
1258 /// .value[3].i32: animation duration, in milliseconds.
1259 ///
1260 /// .value[4].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1261 ///
1262 ///
1263 /// .value[5]?.i32: animation delay duration, in milliseconds.
1264 ///
1265 /// .value[6]?.i32: number of times that the animation is played.
1266 ///
1267 /// .value[7]?.i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1268 ///
1269 /// .value[8]?.f32: animation playback speed.
1270 ///
1271 ///
1272 ///
1273 /// Format of the return value [`ArkUI_AttributeItem`]:
1274 ///
1275 /// .value[0].f32: scale factor along the x-axis.
1276 ///
1277 /// .value[1].f32: scale factor along the y-axis.
1278 ///
1279 /// .value[2].f32: scale factor along the z-axis.
1280 ///
1281 /// .value[3].i32: animation duration, in milliseconds.
1282 ///
1283 /// .value[4].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1284 ///
1285 ///
1286 /// .value[5].i32: animation delay duration, in milliseconds.
1287 ///
1288 /// .value[6].i32: number of times that the animation is played.
1289 ///
1290 /// .value[7].i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1291 ///
1292 /// .value[8].f32: animation playback speed.
1293 pub const NODE_SCALE_TRANSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(36);
1294}
1295#[cfg(feature = "api-12")]
1296#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1297impl ArkUI_NodeAttributeType {
1298 /// Defines the transition translation attribute.
1299 /// This attribute can be set, reset, and obtained as required through APIs.
1300 ///
1301 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1302 ///
1303 /// value[0].f32: translation distance along the x-axis, in vp.
1304 ///
1305 /// value[1].f32: translation distance along the y-axis, in vp.
1306 ///
1307 /// value[2].f32: translation distance along the z-axis, in vp.
1308 ///
1309 /// value[3].i32: animation duration, in milliseconds.
1310 ///
1311 /// value[4].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1312 ///
1313 ///
1314 /// value[5]?.i32: animation delay duration, in milliseconds.
1315 ///
1316 /// value[6]?.i32: number of times that the animation is played.
1317 ///
1318 /// value[7]?.i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1319 ///
1320 /// value[8]?.f32: animation playback speed.
1321 ///
1322 ///
1323 ///
1324 /// Format of the return value [`ArkUI_AttributeItem`]:
1325 ///
1326 /// value[0].f32: translation distance along the x-axis, in vp.
1327 ///
1328 /// value[1].f32: translation distance along the y-axis, in vp.
1329 ///
1330 /// value[2].f32: translation distance along the z-axis, in vp.
1331 ///
1332 /// value[3].i32: animation duration, in milliseconds.
1333 ///
1334 /// value[4].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1335 ///
1336 ///
1337 /// value[5].i32: animation delay duration, in milliseconds.
1338 ///
1339 /// value[6].i32: number of times that the animation is played.
1340 ///
1341 /// value[7].i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1342 ///
1343 /// value[8].f32: animation playback speed.
1344 pub const NODE_TRANSLATE_TRANSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(37);
1345}
1346#[cfg(feature = "api-12")]
1347#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1348impl ArkUI_NodeAttributeType {
1349 /// Defines the slide-in and slide-out of the component from the screen edge during transition.
1350 /// This attribute can be set, reset, and obtained as required through APIs.
1351 ///
1352 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1353 ///
1354 /// .value[0].i32: The parameter type is [`ArkUI_TransitionEdge`].
1355 ///
1356 /// .value[1].i32: animation duration, in milliseconds.
1357 ///
1358 /// .value[2].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1359 ///
1360 /// .value[3]?.i32: animation delay duration, in milliseconds.
1361 ///
1362 /// .value[4]?.i32: number of times that the animation is played.
1363 ///
1364 /// .value[5]?.i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1365 ///
1366 /// .value[6]?.f32: animation playback speed.
1367 ///
1368 ///
1369 ///
1370 /// Format of the return value [`ArkUI_AttributeItem`]:
1371 ///
1372 /// .value[0].i32: The parameter type is [`ArkUI_TransitionEdge`].
1373 ///
1374 /// .value[1].i32: animation duration, in milliseconds.
1375 ///
1376 /// .value[2].i32: animation curve type. The value is an enum of [`ArkUI_AnimationCurve`].
1377 ///
1378 /// .value[3].i32: animation delay duration, in milliseconds.
1379 ///
1380 /// .value[4].i32: number of times that the animation is played.
1381 ///
1382 /// .value[5].i32: animation playback mode. The value is an enum of [`ArkUI_AnimationPlayMode`].
1383 ///
1384 /// .value[6].f32: animation playback speed.
1385 pub const NODE_MOVE_TRANSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(38);
1386}
1387#[cfg(feature = "api-12")]
1388#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1389impl ArkUI_NodeAttributeType {
1390 /// Defines the focus attribute, which can be set, reset, and obtained as required through APIs.
1391 ///
1392 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1393 ///
1394 /// .value[0].i32: The parameter type is 1 or 0.
1395 ///
1396 ///
1397 /// Format of the return value [`ArkUI_AttributeItem`]:
1398 ///
1399 /// .value[0].i32: The parameter type is 1 or 0.
1400 pub const NODE_FOCUSABLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(39);
1401}
1402#[cfg(feature = "api-12")]
1403#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1404impl ArkUI_NodeAttributeType {
1405 /// Defines the default focus attribute, which can be set, reset, and obtained as required through APIs.
1406 ///
1407 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1408 ///
1409 /// value[0].i32: The parameter type is 1 or 0.
1410 ///
1411 ///
1412 /// Format of the return value [`ArkUI_AttributeItem`]:
1413 ///
1414 /// value[0].i32: The parameter type is 1 or 0.
1415 pub const NODE_DEFAULT_FOCUS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(40);
1416}
1417#[cfg(feature = "api-12")]
1418#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1419impl ArkUI_NodeAttributeType {
1420 /// Defines the touch target attribute, which can be set, reset, and obtained as required through APIs.
1421 ///
1422 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1423 ///
1424 /// .data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.
1425 ///
1426 /// .data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.
1427 ///
1428 /// .data[2].f32: width of the touch target, in %.
1429 ///
1430 /// .data[3].f32: height of the touch target, in %.
1431 ///
1432 /// .data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.
1433 ///
1434 ///
1435 /// Format of the return value [`ArkUI_AttributeItem`]:
1436 ///
1437 /// .data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.
1438 ///
1439 /// .data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.
1440 ///
1441 /// .data[2].f32: width of the touch target, in %.
1442 ///
1443 /// .data[3].f32: height of the touch target, in %.
1444 ///
1445 /// .data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.
1446 pub const NODE_RESPONSE_REGION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(41);
1447}
1448#[cfg(feature = "api-12")]
1449#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1450impl ArkUI_NodeAttributeType {
1451 /// Defines the overlay attribute, which can be set, reset, and obtained as required through APIs.
1452 ///
1453 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1454 ///
1455 /// .string: mask text.
1456 ///
1457 /// .value[0]?.i32: position of the overlay relative to the component. Optional.
1458 /// The parameter type is [`ArkUI_Alignment`].
1459 /// The default value is <b>ARKUI_ALIGNMENT_TOP_START.</b>
1460 ///
1461 /// .value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. Optional.
1462 ///
1463 /// .value[2]?.f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. Optional.
1464 ///
1465 ///
1466 /// Format of the return value [`ArkUI_AttributeItem`]:
1467 ///
1468 /// .string: mask text.
1469 ///
1470 /// .value[0].i32: position of the overlay relative to the component.
1471 /// The parameter type is [`ArkUI_Alignment`].
1472 /// The default value is <b>ARKUI_ALIGNMENT_TOP_START.</b>
1473 ///
1474 /// .value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp.
1475 ///
1476 /// .value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp.
1477 pub const NODE_OVERLAY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(42);
1478}
1479#[cfg(feature = "api-12")]
1480#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1481impl ArkUI_NodeAttributeType {
1482 /// Defines the sweep gradient effect.
1483 /// This attribute can be set, reset, and obtained as required through APIs.
1484 ///
1485 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1486 ///
1487 /// .value[0]?.f32: X coordinate of the sweep gradient center relative to the upper left corner of the component.
1488 ///
1489 /// .value[1]?.f32: Y coordinate of the sweep gradient center relative to the upper left corner of the component.
1490 ///
1491 /// .value[2]?.f32: start point of the sweep gradient. The default value is <b>0</b>.
1492 ///
1493 /// .value[3]?.f32: end point of the sweep gradient. The default value is <b>0</b>.
1494 ///
1495 /// .value[4]?.f32: rotation angle of the sweep gradient. The default value is <b>0</b>.
1496 ///
1497 /// .value[5]?.i32: whether the colors are repeated. The value <b>1</b> means that the colors are repeated,
1498 /// and <b>0</b> means the opposite.
1499 ///
1500 /// .object: array of color stops, each of which consists of a color and its stop position. Invalid colors are
1501 /// automatically skipped.
1502 ///
1503 /// colors: colors of the color stops.
1504 ///
1505 /// stops: stop positions of the color stops.
1506 ///
1507 /// size: number of colors.
1508 ///
1509 ///
1510 ///
1511 /// Format of the return value [`ArkUI_AttributeItem`]:
1512 ///
1513 /// .value[0].f32: X coordinate of the sweep gradient center relative to the upper left corner of the component.
1514 ///
1515 /// .value[1].f32: Y coordinate of the sweep gradient center relative to the upper left corner of the component.
1516 ///
1517 /// .value[2].f32: start point of the sweep gradient. The default value is <b>0</b>.
1518 ///
1519 /// .value[3].f32: end point of the sweep gradient. The default value is <b>0</b>.
1520 ///
1521 /// .value[4].f32: rotation angle of the sweep gradient. The default value is <b>0</b>.
1522 ///
1523 /// .value[5].i32: whether the colors are repeated. The value <b>1</b> means that the colors are repeated,
1524 /// and <b>0</b> means the opposite.
1525 ///
1526 /// .object: array of color stops, each of which consists of a color and its stop position. Invalid colors are
1527 /// automatically skipped.
1528 ///
1529 /// colors: colors of the color stops.
1530 ///
1531 /// stops: stop positions of the color stops.
1532 ///
1533 /// size: number of colors.
1534 pub const NODE_SWEEP_GRADIENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(43);
1535}
1536#[cfg(feature = "api-12")]
1537#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1538impl ArkUI_NodeAttributeType {
1539 /// Defines the radial gradient effect.
1540 /// This attribute can be set, reset, and obtained as required through APIs.
1541 ///
1542 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1543 ///
1544 /// .value[0]?.f32: X coordinate of the radial gradient center relative to the upper left corner of the component.
1545 ///
1546 /// .value[1]?.f32: Y coordinate of the radial gradient center relative to the upper left corner of the component.
1547 ///
1548 /// .value[2]?.f32: radius of the radial gradient. The default value is <b>0</b>.
1549 ///
1550 /// .value[3]?.i32: whether the colors are repeated. The value <b>1</b> means that the colors are repeated,
1551 /// and <b>0</b> means the opposite.
1552 ///
1553 /// .object: array of color stops, each of which consists of a color and its stop position. Invalid colors are
1554 /// automatically skipped.
1555 ///
1556 /// colors: colors of the color stops.
1557 ///
1558 /// stops: stop positions of the color stops.
1559 ///
1560 /// size: number of colors.
1561 ///
1562 ///
1563 ///
1564 /// Format of the return value [`ArkUI_AttributeItem`]:
1565 ///
1566 /// .value[0].f32: X coordinate of the radial gradient center relative to the upper left corner of the component.
1567 ///
1568 /// .value[1].f32: Y coordinate of the radial gradient center relative to the upper left corner of the component.
1569 ///
1570 /// .value[2].f32: radius of the radial gradient. The default value is <b>0</b>.
1571 ///
1572 /// .value[3].i32: whether the colors are repeated. The value <b>1</b> means that the colors are repeated,
1573 /// and <b>0</b> means the opposite.
1574 ///
1575 /// .object: array of color stops, each of which consists of a color and its stop position. Invalid colors are
1576 /// automatically skipped.
1577 ///
1578 /// colors: colors of the color stops.
1579 ///
1580 /// stops: stop positions of the color stops.
1581 ///
1582 /// size: number of colors.
1583 pub const NODE_RADIAL_GRADIENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(44);
1584}
1585#[cfg(feature = "api-12")]
1586#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1587impl ArkUI_NodeAttributeType {
1588 /// Adds a mask of the specified shape to the component.
1589 /// This attribute can be set, reset, and obtained as required through APIs.
1590 ///
1591 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute, which supports five types of
1592 /// shapes:
1593 ///
1594 /// 1. Rectangle:
1595 ///
1596 /// .value[0].u32 fill color, in 0xARGB format.
1597 ///
1598 /// .value[1].u32: stroke color, in 0xARGB format.
1599 ///
1600 /// .value[2].f32: stroke width, in vp.
1601 ///
1602 /// .value[3].i32: mask type. The parameter type is [`ArkUI_MaskType`].
1603 /// The value is <b>ARKUI_MASK_TYPE_RECTANGLE</b> for the rectangle shape.
1604 ///
1605 /// .value[4].f32: width of the rectangle.
1606 ///
1607 /// .value[5].f32: height of the rectangle.
1608 ///
1609 /// .value[6].f32: width of the rounded corner of the rectangle.
1610 ///
1611 /// .value[7].f32: height of the rounded corner of the rectangle.
1612 ///
1613 /// .value[8]?.f32: radius of the top left corner of the rectangular shape.
1614 ///
1615 /// .value[9]?.f32: radius of the bottom left corner of the rectangular shape.
1616 ///
1617 /// .value[10]?.f32: radius of the top right corner of the rectangular shape.
1618 ///
1619 /// .value[11]?.f32: radius of the bottom right corner of the rectangular shape.
1620 ///
1621 /// 2. Circle:
1622 ///
1623 /// .value[0].u32 fill color, in 0xARGB format.
1624 ///
1625 /// .value[1].u32: stroke color, in 0xARGB format.
1626 ///
1627 /// .value[2].f32: stroke width, in vp.
1628 ///
1629 /// .value[3].i32: mask type. The parameter type is [`ArkUI_MaskType`].
1630 /// The value is <b>ARKUI_MASK_TYPE_CIRCLE</b> for the circle shape.
1631 ///
1632 /// .value[4].f32: width of the circle.
1633 ///
1634 /// .value[5].f32: height of the circle.
1635 ///
1636 /// 3. Ellipse:
1637 ///
1638 /// .value[0].u32 fill color, in 0xARGB format.
1639 ///
1640 /// .value[1].u32: stroke color, in 0xARGB format.
1641 ///
1642 /// .value[2].f32: stroke width, in vp.
1643 ///
1644 /// .value[3].i32: mask type. The parameter type is [`ArkUI_MaskType`].
1645 /// The value is <b>ARKUI_MASK_TYPE_ELLIPSE</b> for the ellipse shape.
1646 ///
1647 /// .value[4].f32: width of the ellipse.
1648 ///
1649 /// .value[5].f32: height of the ellipse.
1650 ///
1651 /// 4. Path:
1652 ///
1653 /// .value[0].u32 fill color, in 0xARGB format.
1654 ///
1655 /// .value[1].u32: stroke color, in 0xARGB format.
1656 ///
1657 /// .value[2].f32: stroke width, in vp.
1658 ///
1659 /// .value[3].i32: mask type. The parameter type is [`ArkUI_MaskType`].
1660 /// The value is <b>ARKUI_MASK_TYPE_PATH</b> for the path shape.
1661 ///
1662 /// .value[4].f32: width of the path.
1663 ///
1664 /// .value[5].f32: height of the path.
1665 ///
1666 /// .string: command for drawing the path.
1667 ///
1668 /// 5. Progress:
1669 ///
1670 /// .value[0].i32: mask type. The parameter type is [`ArkUI_MaskType`].
1671 /// The value is <b>ARKUI_MASK_TYPE_PROGRESS</b> for the progress shape.
1672 ///
1673 /// .value[1].f32: current value of the progress indicator.
1674 ///
1675 /// .value[2].f32: maximum value of the progress indicator.
1676 ///
1677 /// .value[3].u32: color of the progress indicator, in 0xARGB format.
1678 ///
1679 ///
1680 ///
1681 /// Format of the return value [`ArkUI_AttributeItem`], which supports five types of shapes:
1682 ///
1683 /// 1. Rectangle:
1684 ///
1685 /// .value[0].u32 fill color, in 0xARGB format.
1686 ///
1687 /// .value[1].u32: stroke color, in 0xARGB format.
1688 ///
1689 /// .value[2].f32: stroke width, in vp.
1690 ///
1691 /// .value[3].i32: mask type.
1692 ///
1693 /// .value[4].f32: width of the rectangle.
1694 ///
1695 /// .value[5].f32: height of the rectangle.
1696 ///
1697 /// .value[6].f32: width of the rounded corner of the rectangle.
1698 ///
1699 /// .value[7].f32: height of the rounded corner of the rectangle.
1700 ///
1701 /// .value[8].f32: radius of the top left corner of the rectangular shape.
1702 ///
1703 /// .value[9].f32: radius of the bottom left corner of the rectangular shape.
1704 ///
1705 /// .value[10].f32: radius of the top right corner of the rectangular shape.
1706 ///
1707 /// .value[11].f32: radius of the bottom right corner of the rectangular shape.
1708 ///
1709 /// 2. Circle:
1710 ///
1711 /// .value[0].u32 fill color, in 0xARGB format.
1712 ///
1713 /// .value[1].u32: stroke color, in 0xARGB format.
1714 ///
1715 /// .value[2].f32: stroke width, in vp.
1716 ///
1717 /// .value[3].i32: mask type.
1718 ///
1719 /// .value[4].f32: width of the circle.
1720 ///
1721 /// .value[5].f32: height of the circle.
1722 ///
1723 /// 3. Ellipse:
1724 ///
1725 /// .value[0].u32 fill color, in 0xARGB format.
1726 ///
1727 /// .value[1].u32: stroke color, in 0xARGB format.
1728 ///
1729 /// .value[2].f32: stroke width, in vp.
1730 ///
1731 /// .value[3].i32: mask type.
1732 ///
1733 /// .value[4].f32: width of the ellipse.
1734 ///
1735 /// .value[5].f32: height of the ellipse.
1736 ///
1737 /// 4. Path:
1738 ///
1739 /// .value[0].u32 fill color, in 0xARGB format.
1740 ///
1741 /// .value[1].u32: stroke color, in 0xARGB format.
1742 ///
1743 /// .value[2].f32: stroke width, in vp.
1744 ///
1745 /// .value[3].i32: mask type.
1746 ///
1747 /// .value[4].f32: width of the path.
1748 ///
1749 /// .value[5].f32: height of the path.
1750 ///
1751 /// .string: command for drawing the path.
1752 ///
1753 /// 5. Progress:
1754 ///
1755 /// .value[0].i32: mask type.
1756 ///
1757 /// .value[1].f32: current value of the progress indicator.
1758 ///
1759 /// .value[2].f32: maximum value of the progress indicator.
1760 ///
1761 /// .value[3].u32: color of the progress indicator.
1762 pub const NODE_MASK: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(45);
1763}
1764#[cfg(feature = "api-12")]
1765#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1766impl ArkUI_NodeAttributeType {
1767 /// Blends the component's background with the content of the component's child node.
1768 /// This attribute can be set, reset, and obtained as required through APIs.
1769 ///
1770 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1771 ///
1772 /// .value[0].i32: blend mode. The parameter type is [`ArkUI_BlendMode`]. The default value is
1773 /// <b>ARKUI_BLEND_MODE_NONE</b>.
1774 ///
1775 /// .value[1].?i32: how the specified blend mode is applied. The parameter type is [`ArkUI_BlendApplyType`].
1776 /// The default value is <b>ARKUI_BLEND_APPLY_TYPE_FAST</b>.
1777 ///
1778 ///
1779 ///
1780 /// Format of the return value [`ArkUI_AttributeItem`]:
1781 ///
1782 /// .value[0].i32: blend mode. The parameter type is [`ArkUI_BlendMode`]. The default value is
1783 /// <b>ARKUI_BLEND_MODE_NONE</b>.
1784 ///
1785 /// .value[1].i32: how the specified blend mode is applied. The parameter type is [`ArkUI_BlendApplyType`].
1786 /// The default value is <b>ARKUI_BLEND_APPLY_TYPE_FAST</b>.
1787 pub const NODE_BLEND_MODE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(46);
1788}
1789#[cfg(feature = "api-12")]
1790#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1791impl ArkUI_NodeAttributeType {
1792 /// Sets the direction of the main axis.
1793 /// This attribute can be set, reset, and obtained as required through APIs.
1794 ///
1795 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1796 ///
1797 /// .value[0].i32: direction of the main axis.
1798 ///
1799 /// The parameter type is [`ArkUI_Direction`]. The default value is <b>ARKUI_DIRECTION_AUTO</b>.
1800 ///
1801 ///
1802 ///
1803 /// Format of the return value [`ArkUI_AttributeItem`]:
1804 ///
1805 /// .value[0].i32: direction of the main axis.
1806 ///
1807 /// The parameter type is [`ArkUI_Direction`]. The default value is <b>ARKUI_DIRECTION_AUTO</b>.
1808 pub const NODE_DIRECTION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(47);
1809}
1810#[cfg(feature = "api-12")]
1811#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1812impl ArkUI_NodeAttributeType {
1813 /// Defines the size constraints.
1814 /// This attribute can be set, reset, and obtained as required through APIs.
1815 ///
1816 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1817 ///
1818 /// .value[0].f32: minimum width, in vp.
1819 ///
1820 /// .value[1].f32: maximum width, in vp.
1821 ///
1822 /// .value[2].f32: minimum height, in vp.
1823 ///
1824 /// .value[3].f32: maximum height, in vp.
1825 ///
1826 ///
1827 ///
1828 /// Format of the return value [`ArkUI_AttributeItem`]:
1829 ///
1830 /// .value[0].f32: minimum width, in vp.
1831 ///
1832 /// .value[1].f32: maximum width, in vp.
1833 ///
1834 /// .value[2].f32: minimum height, in vp.
1835 ///
1836 /// .value[3].f32: maximum height, in vp.
1837 pub const NODE_CONSTRAINT_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(48);
1838}
1839#[cfg(feature = "api-12")]
1840#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1841impl ArkUI_NodeAttributeType {
1842 /// Defines the grayscale effect.
1843 /// This attribute can be set, reset, and obtained as required through APIs.
1844 ///
1845 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1846 ///
1847 /// .value[0].f32: grayscale conversion ratio. The value ranges from 0 to 1.
1848 /// For example, 0.5 indicates a 50% grayscale conversion ratio.
1849 ///
1850 ///
1851 ///
1852 /// Format of the return value [`ArkUI_AttributeItem`]:
1853 ///
1854 /// .value[0].f32: grayscale conversion ratio. The value ranges from 0 to 1.
1855 pub const NODE_GRAY_SCALE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(49);
1856}
1857#[cfg(feature = "api-12")]
1858#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1859impl ArkUI_NodeAttributeType {
1860 /// Inverts the image.
1861 /// This attribute can be set, reset, and obtained as required through APIs.
1862 ///
1863 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1864 ///
1865 /// .value[0].f32: image inversion ratio. The value ranges from 0 to 1.
1866 /// For example, 0.5 indicates a 50% image inversion ratio.
1867 ///
1868 ///
1869 ///
1870 /// Format of the return value [`ArkUI_AttributeItem`]:
1871 ///
1872 /// .value[0].f32: image inversion ratio. The value ranges from 0 to 1.
1873 pub const NODE_INVERT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(50);
1874}
1875#[cfg(feature = "api-12")]
1876#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1877impl ArkUI_NodeAttributeType {
1878 /// Defines the sepia conversion ratio.
1879 /// This attribute can be set, reset, and obtained as required through APIs.
1880 ///
1881 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1882 ///
1883 /// .value[0].f32: sepia conversion ratio. The value ranges from 0 to 1.
1884 /// For example, 0.5 indicates that a 50% sepia conversion ratio.
1885 ///
1886 ///
1887 ///
1888 /// Format of the return value [`ArkUI_AttributeItem`]:
1889 ///
1890 /// .value[0].f32: sepia conversion ratio. The value ranges from 0 to 1.
1891 pub const NODE_SEPIA: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(51);
1892}
1893#[cfg(feature = "api-12")]
1894#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1895impl ArkUI_NodeAttributeType {
1896 /// Defines the contrast attribute, which can be set, reset, and obtained as required through APIs.
1897 ///
1898 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1899 ///
1900 /// .value[0].f32: contrast. If the value is <b>1</b>, the source image is displayed.
1901 /// A larger value indicates a higher contrast. Value range: [0, 10).
1902 ///
1903 ///
1904 ///
1905 /// Format of the return value [`ArkUI_AttributeItem`]:
1906 ///
1907 /// .value[0].f32: contrast. Value range: [0, 10).
1908 pub const NODE_CONTRAST: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(52);
1909}
1910#[cfg(feature = "api-12")]
1911#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1912impl ArkUI_NodeAttributeType {
1913 /// Defines the foreground color attribute, which can be set, reset, and obtained as required through APIs.
1914 ///
1915 /// There are two formats of [`ArkUI_AttributeItem`] for setting the attribute value:
1916 ///
1917 /// 1: .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
1918 ///
1919 /// 2: .value[0].i32: color enum [`ArkUI_ColoringStrategy`].
1920 ///
1921 ///
1922 ///
1923 /// Format of the return value [`ArkUI_AttributeItem`]:
1924 ///
1925 /// .value[0].u32: color value, in 0xARGB format.
1926 pub const NODE_FOREGROUND_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(53);
1927}
1928#[cfg(feature = "api-12")]
1929#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1930impl ArkUI_NodeAttributeType {
1931 /// Defines the offset of the component's child relative to the component.
1932 /// This attribute can be set, reset, and obtained as required through APIs.
1933 ///
1934 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1935 ///
1936 /// .value[0].f32 : offset along the x-axis, in vp.
1937 ///
1938 /// .value[1].f32 : offset along the y-axis, in vp.
1939 ///
1940 ///
1941 ///
1942 /// Format of the return value [`ArkUI_AttributeItem`]:
1943 ///
1944 /// .value[0].f32 : offset along the x-axis, in vp.
1945 ///
1946 /// .value[1].f32 : offset along the y-axis, in vp.
1947 pub const NODE_OFFSET: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(54);
1948}
1949#[cfg(feature = "api-12")]
1950#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1951impl ArkUI_NodeAttributeType {
1952 /// Sets the anchor for locating the component's child.
1953 /// This attribute can be set, reset, and obtained as required through APIs.
1954 ///
1955 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1956 ///
1957 /// .value[0].f32: X coordinate of the anchor, in vp.
1958 ///
1959 /// .value[1].f32: Y coordinate of the anchor, in vp.
1960 ///
1961 ///
1962 ///
1963 /// Format of the return value [`ArkUI_AttributeItem`]:
1964 ///
1965 /// .value[0].f32: X coordinate of the anchor, in vp.
1966 ///
1967 /// .value[1].f32: Y coordinate of the anchor, in vp.
1968 pub const NODE_MARK_ANCHOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(55);
1969}
1970#[cfg(feature = "api-12")]
1971#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1972impl ArkUI_NodeAttributeType {
1973 /// Defines the position of the background image in the component, that is, the coordinates relative to
1974 /// the upper left corner of the component. This attribute can be set, reset, and obtained as required through APIs.
1975 ///
1976 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1977 ///
1978 /// .value[0].f32: position along the x-axis, in px.
1979 ///
1980 /// .value[1].f32: position along the y-axis, in px.
1981 ///
1982 ///
1983 ///
1984 /// Format of the return value [`ArkUI_AttributeItem`]:
1985 ///
1986 /// .value[0].f32: position along the x-axis, in px.
1987 ///
1988 /// .value[1].f32: position along the y-axis, in px.
1989 pub const NODE_BACKGROUND_IMAGE_POSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(56);
1990}
1991#[cfg(feature = "api-12")]
1992#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1993impl ArkUI_NodeAttributeType {
1994 /// Sets the alignment rules in the relative container.
1995 /// This attribute can be set, reset, and obtained as required through APIs.
1996 ///
1997 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
1998 ///
1999 /// .object: Use the [`ArkUI_AlignmentRuleOption`] object as the component’s alignment rule.
2000 ///
2001 ///
2002 ///
2003 /// Format of the return value [`ArkUI_AttributeItem`]:
2004 ///
2005 /// .object: Use the [`ArkUI_AlignmentRuleOption`] object as the component’s alignment rule.
2006 pub const NODE_ALIGN_RULES: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(57);
2007}
2008#[cfg(feature = "api-12")]
2009#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2010impl ArkUI_NodeAttributeType {
2011 /// Sets the alignment mode of the child components along the cross axis of the parent container.
2012 /// This attribute can be set, reset, and obtained as required through APIs.
2013 ///
2014 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2015 ///
2016 /// .value[0].i32: alignment mode of the child components along the cross axis of the parent container.
2017 ///
2018 /// The parameter type is [`ArkUI_ItemAlignment`]. The default value is <b>ARKUI_ITEM_ALIGNMENT_AUTO</b>.
2019 ///
2020 ///
2021 ///
2022 /// Format of the return value [`ArkUI_AttributeItem`]:
2023 ///
2024 /// .value[0].i32: alignment mode of the child components along the cross axis of the parent container.
2025 ///
2026 /// The parameter type is [`ArkUI_ItemAlignment`]. The default value is <b>ARKUI_ITEM_ALIGNMENT_AUTO</b>.
2027 pub const NODE_ALIGN_SELF: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(58);
2028}
2029#[cfg(feature = "api-12")]
2030#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2031impl ArkUI_NodeAttributeType {
2032 /// Sets the percentage of the parent container's remaining space that is allocated to the component.
2033 /// This attribute can be set, reset, and obtained as required through APIs.
2034 ///
2035 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2036 ///
2037 /// .value[0].f32: percentage of the parent container's remaining space that is allocated to the component.
2038 ///
2039 ///
2040 ///
2041 /// Format of the return value [`ArkUI_AttributeItem`]:
2042 ///
2043 /// .value[0].f32: percentage of the parent container's remaining space that is allocated to the component.
2044 pub const NODE_FLEX_GROW: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(59);
2045}
2046#[cfg(feature = "api-12")]
2047#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2048impl ArkUI_NodeAttributeType {
2049 /// Sets the percentage of the parent container's shrink size that is allocated to the component.
2050 /// This attribute can be set, reset, and obtained as required through APIs.
2051 ///
2052 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2053 ///
2054 /// .value[0].f32: percentage of the parent container's shrink size that is allocated to the component.
2055 ///
2056 ///
2057 ///
2058 /// Format of the return value [`ArkUI_AttributeItem`]:
2059 ///
2060 /// .value[0].f32: percentage of the parent container's shrink size that is allocated to the component.
2061 pub const NODE_FLEX_SHRINK: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(60);
2062}
2063#[cfg(feature = "api-12")]
2064#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2065impl ArkUI_NodeAttributeType {
2066 /// Sets the base size of the component.
2067 /// This attribute can be set, reset, and obtained as required through APIs.
2068 ///
2069 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2070 ///
2071 /// .value[0].f32: percentage of the parent container's remaining space that is allocated to the component.
2072 ///
2073 ///
2074 ///
2075 /// Format of the return value [`ArkUI_AttributeItem`]:
2076 ///
2077 /// .value[0].f32: percentage of the parent container's remaining space that is allocated to the component.
2078 pub const NODE_FLEX_BASIS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(61);
2079}
2080#[cfg(feature = "api-12")]
2081#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2082impl ArkUI_NodeAttributeType {
2083 /// Sets the accessibility group. This attribute can be set, reset, and obtained as required through APIs.
2084 ///
2085 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2086 ///
2087 /// .value[0].i32: Accessibility group. The value <b>1</b> means that the component and all its child components
2088 /// form an entire selectable component.
2089 /// In this case, the accessibility service will no longer be available for the content of its child components.
2090 /// The value is <b>1</b> or <b>0</b>.
2091 ///
2092 ///
2093 /// Format of the return value [`ArkUI_AttributeItem`]:
2094 ///
2095 /// .value[0].i32: Accessibility group. The value <b>1</b> means that the component and all its child components
2096 /// form an entire selectable component.
2097 /// In this case, the accessibility service will no longer be available for the content of its child components.
2098 /// The value is <b>1</b> or <b>0</b>.
2099 pub const NODE_ACCESSIBILITY_GROUP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(62);
2100}
2101#[cfg(feature = "api-12")]
2102#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2103impl ArkUI_NodeAttributeType {
2104 /// Sets the accessibility text. This attribute can be set, reset, and obtained as required through APIs.
2105 ///
2106 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2107 ///
2108 /// .string: accessibility text.
2109 ///
2110 ///
2111 /// Format of the return value [`ArkUI_AttributeItem`]:
2112 ///
2113 /// .string: accessibility text.
2114 pub const NODE_ACCESSIBILITY_TEXT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(63);
2115}
2116#[cfg(feature = "api-12")]
2117#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2118impl ArkUI_NodeAttributeType {
2119 /// Sets the accessibility service model. This attribute can be set, reset, and obtained as required through APIs.
2120 ///
2121 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2122 ///
2123 /// .value[0].i32: accessibility service model. The parameter type is [`ArkUI_AccessibilityMode`].
2124 ///
2125 ///
2126 /// Format of the return value [`ArkUI_AttributeItem`]:
2127 ///
2128 /// .value[0].i32: accessibility service model. The parameter type is [`ArkUI_AccessibilityMode`].
2129 pub const NODE_ACCESSIBILITY_MODE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(64);
2130}
2131#[cfg(feature = "api-12")]
2132#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2133impl ArkUI_NodeAttributeType {
2134 /// Sets the accessibility description.
2135 /// This attribute can be set, reset, and obtained as required through APIs.
2136 ///
2137 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2138 ///
2139 /// .string: accessibility description.
2140 ///
2141 ///
2142 /// Format of the return value [`ArkUI_AttributeItem`]:
2143 ///
2144 /// .string: accessibility description.
2145 pub const NODE_ACCESSIBILITY_DESCRIPTION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(65);
2146}
2147#[cfg(feature = "api-12")]
2148#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2149impl ArkUI_NodeAttributeType {
2150 /// Defines the focused state. This attribute can be set and obtained as required through APIs.
2151 ///
2152 /// **Note:** Setting the parameter to <b>0</b> shifts focus from the currently focused component on the current level
2153 /// of the page to the root container.
2154 ///
2155 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2156 ///
2157 /// .value[0].i32: The parameter type is 1 or 0.
2158 ///
2159 ///
2160 /// Format of the return value [`ArkUI_AttributeItem`]:
2161 ///
2162 /// .value[0].i32: The parameter type is 1 or 0.
2163 pub const NODE_FOCUS_STATUS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(66);
2164}
2165#[cfg(feature = "api-12")]
2166#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2167impl ArkUI_NodeAttributeType {
2168 /// Defines the aspect ratio attribute, which can be set, reset, and obtained as required through APIs.
2169 ///
2170 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2171 ///
2172 /// .value[0].f32: aspect ratio of the component, in width/height format.
2173 ///
2174 ///
2175 ///
2176 /// Format of the return value [`ArkUI_AttributeItem`]:
2177 ///
2178 /// .value[0].f32: aspect ratio of the component, in width/height format.
2179 pub const NODE_ASPECT_RATIO: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(67);
2180}
2181#[cfg(feature = "api-12")]
2182#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2183impl ArkUI_NodeAttributeType {
2184 /// Defines the weight of the component within its row, column, or flex container for proportional
2185 /// distribution of available space within the container.
2186 /// This attribute can be set, reset, and obtained as required through APIs.
2187 ///
2188 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2189 ///
2190 /// .value[0].u32: weight of the component along the main axis.
2191 ///
2192 ///
2193 ///
2194 /// Format of the return value [`ArkUI_AttributeItem`]:
2195 ///
2196 /// .value[0].u32: weight of the component along the main axis.
2197 pub const NODE_LAYOUT_WEIGHT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(68);
2198}
2199#[cfg(feature = "api-12")]
2200#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2201impl ArkUI_NodeAttributeType {
2202 /// Sets the display priority for the component in the row, column, or flex (single-line) container.
2203 /// This attribute can be set, reset, and obtained as required through APIs.
2204 ///
2205 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2206 ///
2207 /// .value[0].u32: display priority of the component in the container.
2208 ///
2209 ///
2210 ///
2211 /// Format of the return value [`ArkUI_AttributeItem`]:
2212 ///
2213 /// .value[0].u32: display priority of the component in the container.
2214 pub const NODE_DISPLAY_PRIORITY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(69);
2215}
2216#[cfg(feature = "api-12")]
2217#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2218impl ArkUI_NodeAttributeType {
2219 /// Sets the thickness of an element's outline.
2220 ///
2221 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2222 ///
2223 /// .value[0].f32: thickness of the left outline.
2224 ///
2225 /// .value[1].f32: thickness of the top outline.
2226 ///
2227 /// .value[2].f32: thickness of the right outline.
2228 ///
2229 /// .value[3].f32: thickness of the bottom outline.
2230 ///
2231 ///
2232 ///
2233 /// Format of the return value [`ArkUI_AttributeItem`]:
2234 ///
2235 /// .value[0].f32: thickness of the left outline.
2236 ///
2237 /// .value[1].f32: thickness of the top outline.
2238 ///
2239 /// .value[2].f32: thickness of the right outline.
2240 ///
2241 /// .value[3].f32: thickness of the bottom outline.
2242 pub const NODE_OUTLINE_WIDTH: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(70);
2243}
2244#[cfg(feature = "api-12")]
2245#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2246impl ArkUI_NodeAttributeType {
2247 /// Defines the width attribute, which can be set, reset, and obtained as required through APIs.
2248 ///
2249 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2250 ///
2251 /// .value[0].f32: width, in percentage.
2252 ///
2253 ///
2254 ///
2255 /// Format of the return value [`ArkUI_AttributeItem`]:
2256 ///
2257 /// .value[0].f32: width, in percentage.
2258 pub const NODE_WIDTH_PERCENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(71);
2259}
2260#[cfg(feature = "api-12")]
2261#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2262impl ArkUI_NodeAttributeType {
2263 /// Defines the height attribute, which can be set, reset, and obtained as required through APIs.
2264 ///
2265 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2266 ///
2267 /// .value[0].f32: height, in percentage.
2268 ///
2269 ///
2270 ///
2271 /// Format of the return value [`ArkUI_AttributeItem`]:
2272 ///
2273 /// .value[0].f32: height, in percentage.
2274 pub const NODE_HEIGHT_PERCENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(72);
2275}
2276#[cfg(feature = "api-12")]
2277#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2278impl ArkUI_NodeAttributeType {
2279 /// Defines the padding attribute, which can be set, reset, and obtained as required through APIs.
2280 ///
2281 /// There are two formats of [`ArkUI_AttributeItem`] for setting the attribute value:
2282 ///
2283 /// 1: Specify the same padding for the four directions.
2284 ///
2285 /// .value[0].f32: padding, in percentage.
2286 ///
2287 /// 2: Specify different paddings for different directions.
2288 ///
2289 /// .value[0].f32: top padding, in percentage.
2290 ///
2291 /// .value[1].f32: right padding, in percentage.
2292 ///
2293 /// .value[2].f32: bottom padding, in percentage.
2294 ///
2295 /// .value[3].f32: left padding, in percentage.
2296 ///
2297 ///
2298 ///
2299 /// Format of the return value [`ArkUI_AttributeItem`]:
2300 ///
2301 /// .value[0].f32: top padding, in percentage.
2302 ///
2303 /// .value[1].f32: right padding, in percentage.
2304 ///
2305 /// .value[2].f32: bottom padding, in percentage.
2306 ///
2307 /// .value[3].f32: left padding, in percentage.
2308 pub const NODE_PADDING_PERCENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(73);
2309}
2310#[cfg(feature = "api-12")]
2311#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2312impl ArkUI_NodeAttributeType {
2313 /// Defines the margin attribute, which can be set, reset, and obtained as required through APIs.
2314 ///
2315 /// There are two formats of [`ArkUI_AttributeItem`] for setting the attribute value:
2316 ///
2317 /// 1: Specify the same margin for the four directions.
2318 ///
2319 /// .value[0].f32: margin, in percentage.
2320 ///
2321 /// 2: Specify different margins for different directions.
2322 ///
2323 /// .value[0].f32: top margin, in percentage.
2324 ///
2325 /// .value[1].f32: right margin, in percentage.
2326 ///
2327 /// .value[2].f32: bottom margin, in percentage.
2328 ///
2329 /// .value[3].f32: left margin, in percentage.
2330 ///
2331 ///
2332 ///
2333 /// Format of the return value [`ArkUI_AttributeItem`]:
2334 ///
2335 /// .value[0].f32: top margin, in percentage.
2336 ///
2337 /// .value[1].f32: right margin, in percentage.
2338 ///
2339 /// .value[2].f32: bottom margin, in percentage.
2340 ///
2341 /// .value[3].f32: left margin, in percentage.
2342 pub const NODE_MARGIN_PERCENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(74);
2343}
2344#[cfg(feature = "api-12")]
2345#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2346impl ArkUI_NodeAttributeType {
2347 /// The implicit shared element transition within the component supports attribute setting,
2348 /// attribute reset, and attribute acquisition interfaces.
2349 ///
2350 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
2351 ///
2352 /// .value[0]?.i32: The parameter type is 1 or 0. 2 components that share element bindings,
2353 /// Whether to continue to participate in the shared element animation when the appearance element is not deleted,
2354 /// the default is false, and the original position will remain unchanged if not involved.
2355 ///
2356 /// .string is used to set the binding relationship. Set the id to "" to
2357 /// clear the binding relationship to avoid participating in sharing behavior.
2358 ///
2359 /// The id can be changed and the binding relationship re-established.
2360 /// The same ID can only be bound to two components and they are in/out roles of different types.
2361 /// Multiple components cannot be bound to the same id.
2362 ///
2363 ///
2364 ///
2365 /// Attribute acquisition method return value [`ArkUI_AttributeItem`] format:
2366 ///
2367 /// .value[0].i32: The parameter type is 1 or 0. 2 components that share element bindings,
2368 /// Whether to continue to participate in the shared element animation when the appearance element is not deleted,
2369 /// the default is not false, if not involved, the original position will remain unchanged.
2370 ///
2371 /// .string is used to set the binding relationship. Set the id to "" to
2372 /// clear the binding relationship to avoid participating in sharing behavior.
2373 ///
2374 /// The id can be changed and the binding relationship re-established.
2375 /// The same ID can only be bound to two components and they are in/out roles of different types.
2376 /// Multiple components cannot be bound to the same id.
2377 pub const NODE_GEOMETRY_TRANSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(75);
2378}
2379#[cfg(feature = "api-12")]
2380#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2381impl ArkUI_NodeAttributeType {
2382 /// specifies the parameters of the chain formed by this component as the chain head,
2383 /// and supports attribute setting, attribute reset and attribute acquisition interfaces.
2384 ///
2385 /// Only takes effect when the parent container is RelativeContainer
2386 ///
2387 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
2388 ///
2389 /// .value[0].i32: The direction of the chain. Enum [`ArkUI_Axis`].
2390 ///
2391 /// .value[1].i32: Chain style. Enum [`ArkUI_RelativeLayoutChainStyle`].
2392 ///
2393 ///
2394 ///
2395 /// .value[0].i32: The direction of the chain. Enum [`ArkUI_Axis`].
2396 ///
2397 /// .value[1].i32: Chain style. Enum [`ArkUI_RelativeLayoutChainStyle`].
2398 pub const NODE_RELATIVE_LAYOUT_CHAIN_MODE: ArkUI_NodeAttributeType =
2399 ArkUI_NodeAttributeType(76);
2400}
2401#[cfg(feature = "api-12")]
2402#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2403impl ArkUI_NodeAttributeType {
2404 /// Set the component content filling method in the process of width and height animation,
2405 /// support property setting, property reset, property acquisition interface.
2406 ///
2407 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2408 ///
2409 /// .value[0].i32 Content filling mode [`ArkUI_RenderFit`].
2410 ///
2411 ///
2412 ///
2413 /// Format of the return value [`ArkUI_AttributeItem`]:
2414 ///
2415 /// .value[0].i32 Content filling mode [`ArkUI_RenderFit`].
2416 pub const NODE_RENDER_FIT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(77);
2417}
2418#[cfg(feature = "api-12")]
2419#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2420impl ArkUI_NodeAttributeType {
2421 /// External stroke color properties, support property setting,
2422 /// property reset and property acquisition interface.
2423 ///
2424 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2425 ///
2426 /// 1: .value[0].u32: Set the border color of the four sides uniformly, using 0xargb, such as 0xFFFF11FF.
2427 ///
2428 /// 2: .value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF.
2429 ///
2430 /// .value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF.
2431 ///
2432 /// .value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF.
2433 ///
2434 /// .value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF.
2435 ///
2436 ///
2437 ///
2438 /// Format of the return value [`ArkUI_AttributeItem`]:
2439 ///
2440 /// .value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF.
2441 ///
2442 /// .value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF.
2443 ///
2444 /// .value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF.
2445 ///
2446 /// .value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF.
2447 pub const NODE_OUTLINE_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(78);
2448}
2449#[cfg(feature = "api-12")]
2450#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2451impl ArkUI_NodeAttributeType {
2452 /// Set the height and width dimensions, support property setting,
2453 /// property reset and property acquisition interface.
2454 ///
2455 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2456 ///
2457 /// .value[0].f32: Width value, unit is vp;
2458 ///
2459 /// .value[1].f32: Height value, unit is vp;
2460 ///
2461 ///
2462 ///
2463 /// Format of the return value [`ArkUI_AttributeItem`]:
2464 ///
2465 /// .value[0].f32: Width value, unit is vp;
2466 ///
2467 /// .value[1].f32: Height value, unit is vp;
2468 pub const NODE_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(79);
2469}
2470#[cfg(feature = "api-12")]
2471#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2472impl ArkUI_NodeAttributeType {
2473 /// Set whether the current component and child component are
2474 /// rendered off the screen first and then fused with the parent control,
2475 /// supporting property setting, property reset and property acquisition.
2476 ///
2477 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2478 ///
2479 /// .value[0].i32: The parameter type is 1 or 0.
2480 ///
2481 ///
2482 /// Format of the return value [`ArkUI_AttributeItem`]:
2483 ///
2484 /// .value[0].i32: The parameter type is 1 or 0.
2485 pub const NODE_RENDER_GROUP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(80);
2486}
2487#[cfg(feature = "api-12")]
2488#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2489impl ArkUI_NodeAttributeType {
2490 /// Add color overlay effect to components, support property setting,
2491 /// property reset and property acquisition interface.
2492 ///
2493 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2494 ///
2495 /// .value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF.
2496 ///
2497 ///
2498 ///
2499 /// Format of the return value [`ArkUI_AttributeItem`]:
2500 ///
2501 /// .value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF.
2502 pub const NODE_COLOR_BLEND: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(81);
2503}
2504#[cfg(feature = "api-12")]
2505#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2506impl ArkUI_NodeAttributeType {
2507 /// Provide content ambiguity capability for the current component,
2508 /// support property setting, property reset, property acquisition interface.
2509 ///
2510 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2511 ///
2512 /// .value[0].i32 Represents the content blurring style, and uses the [`ArkUI_BlurStyle`] enumeration value.
2513 ///
2514 /// .value[1]?.i32 Represents the dark and light mode used by the content blur effect,
2515 ///
2516 /// with the [`ArkUI_ThemeColorMode`] enumeration value.
2517 ///
2518 /// .value[2]?.i32 The color extraction mode used to represent the content blur effect takes
2519 ///
2520 /// the [`ArkUI_AdaptiveColor`] enumeration value.
2521 ///
2522 /// .value[3]?.f32: blur degree. The value range is [0.0, 1.0].
2523 ///
2524 /// .value[4]?.f32 It is a gray-level fuzzy parameter. The value range is [0,127].
2525 ///
2526 /// .value[5]?.f32 It is a gray-level fuzzy parameter. The value range is [0,127].
2527 ///
2528 ///
2529 ///
2530 /// Format of the return value [`ArkUI_AttributeItem`]:
2531 ///
2532 /// .value[0].i32 Represents the content blurring style, and uses the [`ArkUI_BlurStyle`] enumeration value.
2533 ///
2534 /// .value[1].i32 Represents the dark and light mode used by the content blur effect,
2535 ///
2536 /// with the [`ArkUI_ThemeColorMode`] enumeration value.
2537 ///
2538 /// .value[2].i32 The color extraction mode used to represent the content blur effect takes
2539 ///
2540 /// the [`ArkUI_AdaptiveColor`] enumeration value.
2541 ///
2542 /// .value[3].f32: blur degree. The value range is [0.0, 1.0].
2543 ///
2544 /// .value[4].f32 It is a gray-level fuzzy parameter. The value range is [0,127].
2545 ///
2546 /// .value[5].f32 It is a gray-level fuzzy parameter. The value range is [0,127].
2547 pub const NODE_FOREGROUND_BLUR_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(82);
2548}
2549#[cfg(feature = "api-12")]
2550#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2551impl ArkUI_NodeAttributeType {
2552 /// Defines layout rect attribute, which can be set, reset, and obtained as required through APIs.
2553 ///
2554 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2555 ///
2556 /// .value[0].i32: x position of the component.
2557 /// .value[1].i32: y position of the component.
2558 /// .value[2].i32: width of the component.
2559 /// .value[3].i32: height of the component.
2560 ///
2561 ///
2562 /// Format of the return value [`ArkUI_AttributeItem`]:
2563 ///
2564 /// .value[0].i32: x position of the component.
2565 /// .value[1].i32: y position of the component.
2566 /// .value[2].i32: width of the component.
2567 /// .value[3].i32: height of the component.
2568 pub const NODE_LAYOUT_RECT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(83);
2569}
2570#[cfg(feature = "api-12")]
2571#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2572impl ArkUI_NodeAttributeType {
2573 /// Whether the current component supports click-to-focus capability,
2574 /// which can be set, reset, and obtained as required through APIs.
2575 ///
2576 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2577 ///
2578 /// .value[0].i32: The parameter type is 1 or 0.
2579 ///
2580 ///
2581 /// Format of the return value [`ArkUI_AttributeItem`]:
2582 ///
2583 /// .value[0].i32: The parameter type is 1 or 0.
2584 pub const NODE_FOCUS_ON_TOUCH: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(84);
2585}
2586#[cfg(feature = "api-12")]
2587#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2588impl ArkUI_NodeAttributeType {
2589 /// Defines the border width attribute, which can be set, reset, and obtained as required through APIs.
2590 ///
2591 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2592 ///
2593 /// 1: .value[0].f32: width of the four borders, in percentage.
2594 ///
2595 /// 2: .value[0].f32: width of the top border, in percentage.
2596 ///
2597 /// .value[1].f32: width of the right border, in percentage.
2598 ///
2599 /// .value[2].f32: width of the bottom border, in percentage.
2600 ///
2601 /// .value[3].f32: width of the left border, in percentage.
2602 ///
2603 ///
2604 ///
2605 /// Format of the return value [`ArkUI_AttributeItem`]:
2606 ///
2607 /// .value[0].f32: width of the top border, in percentage.
2608 ///
2609 /// .value[1].f32: width of the right border, in percentage.
2610 ///
2611 /// .value[2].f32: width of the bottom border, in percentage.
2612 ///
2613 /// .value[3].f32: width of the left border, in percentage.
2614 pub const NODE_BORDER_WIDTH_PERCENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(85);
2615}
2616#[cfg(feature = "api-12")]
2617#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2618impl ArkUI_NodeAttributeType {
2619 /// Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs.
2620 ///
2621 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2622 ///
2623 /// 1: .value[0].f32: radius of the four corners, in percentage.
2624 ///
2625 /// 2: .value[0].f32: radius of the upper left corner, in percentage.
2626 ///
2627 /// .value[1].f32: radius of the upper right corner, in percentage.
2628 ///
2629 /// .value[2].f32: radius of the lower left corner, in percentage.
2630 ///
2631 /// .value[3].f32: radius of the lower right corner, in percentage.
2632 ///
2633 ///
2634 ///
2635 /// Format of the return value [`ArkUI_AttributeItem`]:
2636 ///
2637 /// .value[0].f32: radius of the upper left corner, in percentage.
2638 ///
2639 /// .value[1].f32: radius of the upper right corner, in percentage.
2640 ///
2641 /// .value[2].f32: radius of the lower left corner, in percentage.
2642 ///
2643 /// .value[3].f32: radius of the lower right corner, in percentage.
2644 pub const NODE_BORDER_RADIUS_PERCENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(86);
2645}
2646#[cfg(feature = "api-12")]
2647#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2648impl ArkUI_NodeAttributeType {
2649 /// Accessible ID, which can be obtained as required through APIs.
2650 ///
2651 /// Format of the return value [`ArkUI_AttributeItem`]:
2652 ///
2653 /// .value[0].i32:Accessible ID。
2654 pub const NODE_ACCESSIBILITY_ID: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(87);
2655}
2656#[cfg(feature = "api-12")]
2657#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2658impl ArkUI_NodeAttributeType {
2659 /// Define accessible actions, which can be set, reset, and obtained as required through APIs.
2660 ///
2661 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2662 ///
2663 /// .value[0].u32:accessible action types,and uses the [`ArkUI_AccessibilityActionType`] enumeration value.
2664 ///
2665 ///
2666 ///
2667 /// Format of the return value [`ArkUI_AttributeItem`]:
2668 ///
2669 /// .value[0].u32:accessible action types,and uses the [`ArkUI_AccessibilityActionType`] enumeration value.
2670 pub const NODE_ACCESSIBILITY_ACTIONS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(88);
2671}
2672#[cfg(feature = "api-12")]
2673#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2674impl ArkUI_NodeAttributeType {
2675 /// Define accessible role, which can be set, reset, and obtained as required through APIs.
2676 ///
2677 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2678 ///
2679 /// .value[0].u32:accessible role type,and uses the [`ArkUI_NodeType`] enumeration value.
2680 ///
2681 ///
2682 ///
2683 /// Format of the return value [`ArkUI_AttributeItem`]:
2684 ///
2685 /// .value[0].u32:accessible role type,and uses the [`ArkUI_NodeType`] enumeration value.
2686 pub const NODE_ACCESSIBILITY_ROLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(89);
2687}
2688#[cfg(feature = "api-12")]
2689#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2690impl ArkUI_NodeAttributeType {
2691 /// Define accessible state, which can be set, reset, and obtained as required through APIs.
2692 ///
2693 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2694 ///
2695 /// .object:the parameter type is [`ArkUI_AccessibilityState`].
2696 ///
2697 ///
2698 ///
2699 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2700 ///
2701 /// .object:the parameter type is [`ArkUI_AccessibilityState`].
2702 pub const NODE_ACCESSIBILITY_STATE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(90);
2703}
2704#[cfg(feature = "api-12")]
2705#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2706impl ArkUI_NodeAttributeType {
2707 /// Define accessible value, which can be set, reset, and obtained as required through APIs.
2708 ///
2709 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2710 ///
2711 /// .object:the parameter type is [`ArkUI_AccessibilityValue`].
2712 ///
2713 ///
2714 ///
2715 /// Format of the return value [`ArkUI_AttributeItem`]:
2716 ///
2717 /// .object:the parameter type is [`ArkUI_AccessibilityValue`].
2718 pub const NODE_ACCESSIBILITY_VALUE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(91);
2719}
2720#[cfg(feature = "api-12")]
2721#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2722impl ArkUI_NodeAttributeType {
2723 /// defines control components to extend their security zones,
2724 /// supporting property setting, property reset, and property fetching.
2725 ///
2726 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
2727 ///
2728 /// .value[0]? .u32: Set of extended security zone enumerated values [`ArkUI_SafeAreaType`],
2729 /// For example, ARKUI_SAFE_AREA_TYPE_SYSTEM | ARKUI_SAFE_AREA_TYPE_CUTOUT;
2730 ///
2731 /// .value[1]? .u32: set of directional enum values for extended security zones [`ArkUI_SafeAreaEdge`];
2732 ///
2733 /// For example: ARKUI_SAFE_AREA_EDGE_TOP | ARKUI_SAFE_AREA_EDGE_BOTTOM;
2734 ///
2735 ///
2736 ///
2737 /// Attribute fetch method return value [`ArkUI_AttributeItem`] format:
2738 ///
2739 /// .value[0].u32: extends the security zone.
2740 /// .
2741 ///
2742 /// .value[1].u32: indicates the direction to extend the security zone.
2743 /// .
2744 pub const NODE_EXPAND_SAFE_AREA: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(92);
2745}
2746#[cfg(feature = "api-12")]
2747#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2748impl ArkUI_NodeAttributeType {
2749 /// Defines the visible area ratio (visible area/total area of the component) threshold for invoking the
2750 /// visible area change event of the component.
2751 ///
2752 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2753 ///
2754 /// .value[...].f32: threshold array. The value range is 0 to 1.
2755 ///
2756 ///
2757 /// Format of the return value [`ArkUI_AttributeItem`]:
2758 ///
2759 /// .value[...].f32: threshold array.
2760 pub const NODE_VISIBLE_AREA_CHANGE_RATIO: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(93);
2761}
2762#[cfg(feature = "api-12")]
2763#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2764impl ArkUI_NodeAttributeType {
2765 /// Sets the transition effect when the component is inserted or deleted.
2766 /// This attribute can be set, and obtained as required through APIs.
2767 ///
2768 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2769 ///
2770 /// .object: transition effect. The parameter type is [`ArkUI_TransitionEffect`].
2771 ///
2772 ///
2773 ///
2774 /// Format of the return value [`ArkUI_AttributeItem`]:
2775 ///
2776 /// .object: transition effect. The parameter type is [`ArkUI_TransitionEffect`].
2777 pub const NODE_TRANSITION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(94);
2778}
2779#[cfg(feature = "api-12")]
2780#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2781impl ArkUI_NodeAttributeType {
2782 /// Defines the component ID.
2783 /// This attribute can be obtained through APIs.
2784 ///
2785 /// Format of the [`ArkUI_AttributeItem`] parameter for obtaining the attribute:
2786 ///
2787 /// .value[0].i32: component ID.
2788 pub const NODE_UNIQUE_ID: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(95);
2789}
2790#[cfg(feature = "api-12")]
2791#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2792impl ArkUI_NodeAttributeType {
2793 /// Set the current component system focus box style.
2794 ///
2795 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2796 ///
2797 /// .value[0].f32: The distance between the focus box and the edge of the component.
2798 ///
2799 /// Positive numbers represent the outer side, negative numbers represent the inner side.
2800 ///
2801 /// Percentage is not supported.
2802 ///
2803 /// .value[1].f32: Focus box width. Negative numbers and percentages are not supported.
2804 ///
2805 /// .value[2].u32: Focus box color.
2806 ///
2807 ///
2808 pub const NODE_FOCUS_BOX: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(96);
2809}
2810#[cfg(feature = "api-12")]
2811#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2812impl ArkUI_NodeAttributeType {
2813 /// Defines the moving distance limit for the component-bound tap gesture.
2814 /// This attribute can be set as required through APIs.
2815 ///
2816 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2817 ///
2818 /// .value[0].f32: allowed moving distance of a finger, in vp.
2819 pub const NODE_CLICK_DISTANCE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(97);
2820}
2821#[cfg(feature = "api-12")]
2822#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2823impl ArkUI_NodeAttributeType {
2824 /// Sets whether the focus can be placed on this component.
2825 /// This attribute can be set, reset, and obtained as required through APIs.
2826 ///
2827 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2828 ///
2829 /// .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.
2830 ///
2831 ///
2832 /// Format of the return value [`ArkUI_AttributeItem`]:
2833 ///
2834 /// .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.
2835 ///
2836 ///
2837 /// Available since API-level: 14
2838 #[cfg(feature = "api-14")]
2839 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2840 pub const NODE_TAB_STOP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(98);
2841}
2842#[cfg(feature = "api-12")]
2843#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2844impl ArkUI_NodeAttributeType {
2845 /// Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
2846 ///
2847 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2848 ///
2849 /// .string: text content.
2850 ///
2851 ///
2852 ///
2853 /// Format of the return value [`ArkUI_AttributeItem`]:
2854 ///
2855 /// .string: text content.
2856 pub const NODE_TEXT_CONTENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1000);
2857}
2858#[cfg(feature = "api-12")]
2859#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2860impl ArkUI_NodeAttributeType {
2861 /// Defines the font color attribute, which can be set, reset, and obtained as required through APIs.
2862 ///
2863 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2864 ///
2865 /// .value[0].u32: font color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
2866 ///
2867 ///
2868 ///
2869 /// Format of the return value [`ArkUI_AttributeItem`]:
2870 ///
2871 /// .value[0].u32: font color value, in 0xARGB format.
2872 pub const NODE_FONT_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001);
2873}
2874#[cfg(feature = "api-12")]
2875#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2876impl ArkUI_NodeAttributeType {
2877 /// Defines the font size attribute, which can be set, reset, and obtained as required through APIs.
2878 ///
2879 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2880 ///
2881 /// .value[0].f32: font size, in fp.
2882 ///
2883 ///
2884 ///
2885 /// Format of the return value [`ArkUI_AttributeItem`]:
2886 ///
2887 /// .value[0].f32: font size, in fp.
2888 pub const NODE_FONT_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002);
2889}
2890#[cfg(feature = "api-12")]
2891#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2892impl ArkUI_NodeAttributeType {
2893 /// Defines the font style attribute, which can be set, reset, and obtained as required through APIs.
2894 ///
2895 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2896 ///
2897 /// .value[0].i32: font style [`ArkUI_FontStyle`]. The default value is <b>ARKUI_FONT_STYLE_NORMAL</b>.
2898 ///
2899 ///
2900 ///
2901 /// Format of the return value [`ArkUI_AttributeItem`]:
2902 ///
2903 /// .value[0].i32: font style [`ArkUI_FontStyle`].
2904 pub const NODE_FONT_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003);
2905}
2906#[cfg(feature = "api-12")]
2907#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2908impl ArkUI_NodeAttributeType {
2909 /// Defines the font weight attribute, which can be set, reset, and obtained as required through APIs.
2910 ///
2911 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2912 ///
2913 /// .value[0].i32: font weight [`ArkUI_FontWeight`]. The default value is <b>ARKUI_FONT_WEIGHT_NORMAL</b>.
2914 ///
2915 ///
2916 ///
2917 /// Format of the return value [`ArkUI_AttributeItem`]:
2918 ///
2919 /// .value[0].i32: font weight [`ArkUI_FontWeight`].
2920 pub const NODE_FONT_WEIGHT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1004);
2921}
2922#[cfg(feature = "api-12")]
2923#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2924impl ArkUI_NodeAttributeType {
2925 /// Defines the text line height attribute, which can be set, reset, and obtained as required through APIs.
2926 ///
2927 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2928 ///
2929 /// .value[0].f32: line height, in fp.
2930 ///
2931 ///
2932 ///
2933 /// Format of the return value [`ArkUI_AttributeItem`]:
2934 ///
2935 /// .value[0].f32: line height, in fp.
2936 pub const NODE_TEXT_LINE_HEIGHT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1005);
2937}
2938#[cfg(feature = "api-12")]
2939#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2940impl ArkUI_NodeAttributeType {
2941 /// Defines the text decoration style and color.
2942 /// This attribute can be set, reset, and obtained as required through APIs.
2943 ///
2944 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2945 ///
2946 /// .value[0].i32: text decoration type [`ArkUI_TextDecorationType`].
2947 /// The default value is <b>ARKUI_TEXT_DECORATION_TYPE_NONE</b>.
2948 ///
2949 /// .value[1]?.u32: text decoration color, in 0xARGB format. For example, 0xFFFF0000 indicates red. Optional.
2950 ///
2951 /// .value[2]?.i32: text decoration style [`ArkUI_TextDecorationStyle`].
2952 ///
2953 ///
2954 ///
2955 /// Format of the return value [`ArkUI_AttributeItem`]:
2956 ///
2957 /// .value[0].i32: text decoration type [`ArkUI_TextDecorationType`].
2958 ///
2959 /// .value[1].u32: text decoration color, in 0xARGB format.
2960 ///
2961 /// .value[2].i32: text decoration style [`ArkUI_TextDecorationStyle`].
2962 pub const NODE_TEXT_DECORATION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1006);
2963}
2964#[cfg(feature = "api-12")]
2965#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2966impl ArkUI_NodeAttributeType {
2967 /// Defines the text case attribute, which can be set, reset, and obtained as required through APIs.
2968 ///
2969 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2970 ///
2971 /// .value[0].i32: text case.
2972 ///
2973 ///
2974 ///
2975 /// Format of the return value [`ArkUI_AttributeItem`]:
2976 ///
2977 /// .value[0].i32: text case.
2978 pub const NODE_TEXT_CASE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1007);
2979}
2980#[cfg(feature = "api-12")]
2981#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2982impl ArkUI_NodeAttributeType {
2983 /// Defines the letter spacing attribute, which can be set, reset, and obtained as required through APIs.
2984 ///
2985 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
2986 ///
2987 /// .value[0].f32: letter spacing, in fp.
2988 ///
2989 ///
2990 ///
2991 /// Format of the return value [`ArkUI_AttributeItem`]:
2992 ///
2993 /// .value[0].f32: letter spacing, in fp.
2994 pub const NODE_TEXT_LETTER_SPACING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1008);
2995}
2996#[cfg(feature = "api-12")]
2997#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2998impl ArkUI_NodeAttributeType {
2999 /// Sets the maximum number of lines in the text.
3000 /// This attribute can be set, reset, and obtained as required through APIs.
3001 ///
3002 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3003 ///
3004 /// .value[0].i32: maximum number of lines in the text.
3005 ///
3006 ///
3007 ///
3008 /// Format of the return value [`ArkUI_AttributeItem`]:
3009 ///
3010 /// .value[0].i32: maximum number of lines in the text.
3011 pub const NODE_TEXT_MAX_LINES: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1009);
3012}
3013#[cfg(feature = "api-12")]
3014#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3015impl ArkUI_NodeAttributeType {
3016 /// Horizontal alignment mode of the text.
3017 /// This attribute can be set, reset, and obtained as required through APIs.
3018 ///
3019 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3020 ///
3021 /// .value[0].i32: horizontal alignment mode of the text. The value is an enum of [`ArkUI_TextAlignment`].
3022 ///
3023 ///
3024 ///
3025 /// Format of the return value [`ArkUI_AttributeItem`]:
3026 ///
3027 /// .value[0].i32: horizontal alignment mode of the text. The value is an enum of [`ArkUI_TextAlignment`].
3028 pub const NODE_TEXT_ALIGN: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1010);
3029}
3030#[cfg(feature = "api-12")]
3031#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3032impl ArkUI_NodeAttributeType {
3033 /// Defines the text overflow attribute, which can be set, reset, and obtained as required through APIs.
3034 ///
3035 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3036 ///
3037 /// .value[0].i32: display mode when the text is too long. [`ArkUI_TextOverflow`]
3038 ///
3039 ///
3040 ///
3041 /// Format of the return value [`ArkUI_AttributeItem`]:
3042 ///
3043 /// .value[0].i32: display mode when the text is too long. [`ArkUI_TextOverflow`]
3044 pub const NODE_TEXT_OVERFLOW: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1011);
3045}
3046#[cfg(feature = "api-12")]
3047#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3048impl ArkUI_NodeAttributeType {
3049 /// Defines the font family attribute, which can be set, reset, and obtained as required through APIs.
3050 ///
3051 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3052 ///
3053 /// .string: fonts, separated by commas (,).
3054 ///
3055 ///
3056 /// Format of the return value [`ArkUI_AttributeItem`]:
3057 ///
3058 /// .string: fonts, separated by commas (,).
3059 pub const NODE_FONT_FAMILY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1012);
3060}
3061#[cfg(feature = "api-12")]
3062#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3063impl ArkUI_NodeAttributeType {
3064 /// Defines the copy option attribute, which can be set, reset, and obtained as required through APIs.
3065 ///
3066 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3067 ///
3068 /// .value[0].i32: copy option [`ArkUI_CopyOptions`]. The default value is <b>ARKUI_COPY_OPTIONS_NONE</b>.
3069 ///
3070 ///
3071 ///
3072 /// Format of the return value [`ArkUI_AttributeItem`]:
3073 ///
3074 /// .value[0].i32: copy option [`ArkUI_CopyOptions.`]
3075 pub const NODE_TEXT_COPY_OPTION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1013);
3076}
3077#[cfg(feature = "api-12")]
3078#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3079impl ArkUI_NodeAttributeType {
3080 /// Defines the text baseline offset attribute
3081 /// This attribute can be set, reset, and obtained as required through APIs.
3082 ///
3083 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3084 ///
3085 /// .value[0].f32: baseline offset, in fp.
3086 ///
3087 ///
3088 ///
3089 /// Format of the return value [`ArkUI_AttributeItem`]:
3090 ///
3091 /// .value[0].f32: baseline offset, in fp.
3092 pub const NODE_TEXT_BASELINE_OFFSET: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1014);
3093}
3094#[cfg(feature = "api-12")]
3095#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3096impl ArkUI_NodeAttributeType {
3097 /// Defines the text shadow attribute, which can be set, reset, and obtained as required through APIs.
3098 ///
3099 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3100 ///
3101 /// .value[0].f32: blur radius of the shadow, in vp.
3102 ///
3103 /// .value[1].i32: shadow type [`ArkUI_ShadowType`]. The default value is <b>ARKUI_SHADOW_TYPE_COLOR</b>.
3104 ///
3105 /// .value[2].u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3106 ///
3107 /// .value[3].f32: offset of the shadow along the x-axis, in vp.
3108 ///
3109 /// .value[4].f32: offset of the shadow along the y-axis, in vp.
3110 ///
3111 ///
3112 ///
3113 /// Format of the return value [`ArkUI_AttributeItem`]:
3114 ///
3115 /// .value[0].f32: blur radius of the shadow, in vp.
3116 ///
3117 /// .value[1].i32: shadow type [`ArkUI_ShadowType`].
3118 ///
3119 /// .value[2].u32: shadow color, in 0xARGB format.
3120 ///
3121 /// .value[3].f32: offset of the shadow along the x-axis, in vp.
3122 ///
3123 /// .value[4].f32: offset of the shadow along the y-axis, in vp.
3124 pub const NODE_TEXT_TEXT_SHADOW: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1015);
3125}
3126#[cfg(feature = "api-12")]
3127#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3128impl ArkUI_NodeAttributeType {
3129 /// Defines the minimum font size attribute, which can be set, reset, and obtained as required through APIs.
3130 ///
3131 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3132 ///
3133 /// .value[0].f32: minimum font size, in fp.
3134 ///
3135 ///
3136 /// Format of the return value [`ArkUI_AttributeItem`]:
3137 ///
3138 /// .value[0].f32: minimum font size, in fp.
3139 pub const NODE_TEXT_MIN_FONT_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1016);
3140}
3141#[cfg(feature = "api-12")]
3142#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3143impl ArkUI_NodeAttributeType {
3144 /// Defines the maximum font size attribute, which can be set, reset, and obtained as required through APIs.
3145 ///
3146 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3147 ///
3148 /// .value[0].f32: maximum font size, in fp.
3149 ///
3150 ///
3151 /// Format of the return value [`ArkUI_AttributeItem`]:
3152 ///
3153 /// .value[0].f32: maximum font size, in fp.
3154 pub const NODE_TEXT_MAX_FONT_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1017);
3155}
3156#[cfg(feature = "api-12")]
3157#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3158impl ArkUI_NodeAttributeType {
3159 /// Defines the text style attribute, which can be set, reset, and obtained as required through APIs.
3160 ///
3161 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3162 ///
3163 /// .string?: font family. Optional. Use commas (,) to separate multiple fonts.
3164 ///
3165 /// .value[0].f32: font size, in fp.
3166 ///
3167 /// .value[1]?.i32: font weight. Optional. The parameter type is [`ArkUI_FontWeight`].
3168 /// The default value is <b>ARKUI_FONT_WEIGHT_NORMAL</b>.
3169 ///
3170 /// .value[2]?.i32: font style. Optional. The parameter type is [`ArkUI_FontStyle`].
3171 /// The default value is <b>ARKUI_FONT_STYLE_NORMAL</b>.
3172 ///
3173 ///
3174 /// Format of the return value [`ArkUI_AttributeItem`]:
3175 ///
3176 /// .string: font family. Use commas (,) to separate multiple fonts.
3177 ///
3178 /// .value[0].f32: font size, in fp.
3179 ///
3180 /// .value[1].i32: font weight. The parameter type is [`ArkUI_FontWeight`].
3181 /// The default value is <b>ARKUI_FONT_WEIGHT_NORMAL</b>.
3182 ///
3183 /// .value[2].i32: font style. The parameter type is [`ArkUI_FontStyle`].
3184 /// The default value is <b>ARKUI_FONT_STYLE_NORMAL</b>.
3185 pub const NODE_TEXT_FONT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1018);
3186}
3187#[cfg(feature = "api-12")]
3188#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3189impl ArkUI_NodeAttributeType {
3190 /// Defines how the adaptive height is determined for the text.
3191 /// This attribute can be set, reset, and obtained as required through APIs.
3192 ///
3193 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3194 ///
3195 /// .value[0].i32: how the adaptive height is determined for the text.
3196 /// The parameter type is [`ArkUI_TextHeightAdaptivePolicy`].
3197 ///
3198 ///
3199 /// Format of the return value [`ArkUI_AttributeItem`]:
3200 ///
3201 /// .value[0].i32: how the adaptive height is determined for the text.
3202 /// The parameter type is [`ArkUI_TextHeightAdaptivePolicy`]
3203 pub const NODE_TEXT_HEIGHT_ADAPTIVE_POLICY: ArkUI_NodeAttributeType =
3204 ArkUI_NodeAttributeType(1019);
3205}
3206#[cfg(feature = "api-12")]
3207#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3208impl ArkUI_NodeAttributeType {
3209 /// Defines the indentation of the first line.
3210 /// This attribute can be set, reset, and obtained as required through APIs.
3211 ///
3212 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3213 ///
3214 /// .value[0].f32: indentation of the first line.
3215 ///
3216 ///
3217 ///
3218 /// Format of the return value [`ArkUI_AttributeItem`]:
3219 ///
3220 /// .value[0].f32: indentation of the first line.
3221 pub const NODE_TEXT_INDENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1020);
3222}
3223#[cfg(feature = "api-12")]
3224#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3225impl ArkUI_NodeAttributeType {
3226 /// Defines the line break rule. This attribute can be set, reset, and obtained as required through APIs.
3227 ///
3228 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3229 ///
3230 /// .value[0].i32: The parameter type is [`ArkUI_WordBreak`].
3231 ///
3232 ///
3233 ///
3234 /// Format of the return value [`ArkUI_AttributeItem`]:
3235 ///
3236 /// .value[0].i32: The parameter type is [`ArkUI_WordBreak`].
3237 pub const NODE_TEXT_WORD_BREAK: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1021);
3238}
3239#[cfg(feature = "api-12")]
3240#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3241impl ArkUI_NodeAttributeType {
3242 /// Defines the ellipsis position. This attribute can be set, reset, and obtained as required through APIs.
3243 ///
3244 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3245 ///
3246 /// .value[0].i32: The parameter type is [`ArkUI_EllipsisMode`].
3247 ///
3248 ///
3249 ///
3250 /// Format of the return value [`ArkUI_AttributeItem`]:
3251 ///
3252 /// .value[0].i32: The parameter type is [`ArkUI_EllipsisMode`].
3253 pub const NODE_TEXT_ELLIPSIS_MODE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1022);
3254}
3255#[cfg(feature = "api-12")]
3256#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3257impl ArkUI_NodeAttributeType {
3258 /// Defines the text line spacing attribute, which can be set, reset, and obtained as required through APIs.
3259 ///
3260 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3261 ///
3262 /// .value[0].f32: line spacing, in fp.
3263 ///
3264 ///
3265 ///
3266 /// Format of the return value [`ArkUI_AttributeItem`]:
3267 ///
3268 /// .value[0].f32: line spacing, in fp.
3269 pub const NODE_TEXT_LINE_SPACING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1023);
3270}
3271#[cfg(feature = "api-12")]
3272#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3273impl ArkUI_NodeAttributeType {
3274 /// Set the text feature effect and the NODE_FONT_FEATURE attribute,
3275 /// NODE_FONT_FEATURE is the advanced typesetting capability of OpenType
3276 /// Features such as ligatures and equal-width digits are generally used in customized fonts.
3277 ///
3278 /// The capabilities need to be supported by the fonts,
3279 ///
3280 /// Interfaces for setting, resetting, and obtaining attributes are supported.
3281 ///
3282 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
3283 ///
3284 /// .string: complies with the text feature format. The format is normal |
3285 ///
3286 /// is in the format of [ | on | off],
3287 /// .
3288 /// There can be multiple values separated by commas (,).
3289 ///
3290 /// For example, the input format of a number with the same width is ss01 on.
3291 ///
3292 ///
3293 ///
3294 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
3295 ///
3296 /// .string indicates the content of the text feature. Multiple text features are separated by commas (,).
3297 pub const NODE_FONT_FEATURE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1024);
3298}
3299#[cfg(feature = "api-12")]
3300#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3301impl ArkUI_NodeAttributeType {
3302 /// Setting Enable Text Recognition.
3303 ///
3304 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3305 ///
3306 /// .value[0].i32:Enable text recognition, default value false.
3307 ///
3308 ///
3309 ///
3310 /// Format of the return value [`ArkUI_AttributeItem`]:
3311 ///
3312 /// .value[0].i32:Enable Text Recognition
3313 pub const NODE_TEXT_ENABLE_DATA_DETECTOR: ArkUI_NodeAttributeType =
3314 ArkUI_NodeAttributeType(1025);
3315}
3316#[cfg(feature = "api-12")]
3317#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3318impl ArkUI_NodeAttributeType {
3319 /// Set the text recognition configuration.
3320 ///
3321 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3322 ///
3323 /// .value[0...].i32: Array of entity types, parameter types[`ArkUI_TextDataDetectorType`]。
3324 ///
3325 ///
3326 ///
3327 /// Format of the return value [`ArkUI_AttributeItem`]:
3328 ///
3329 /// .value[0...].i32:Array of entity types, parameter types[`ArkUI_TextDataDetectorType`]。
3330 pub const NODE_TEXT_ENABLE_DATA_DETECTOR_CONFIG: ArkUI_NodeAttributeType =
3331 ArkUI_NodeAttributeType(1026);
3332}
3333#[cfg(feature = "api-12")]
3334#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3335impl ArkUI_NodeAttributeType {
3336 /// Defines the background color of the selected text.
3337 /// This attribute can be set, reset, and obtained as required through APIs.
3338 ///
3339 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3340 ///
3341 /// .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3342 ///
3343 ///
3344 ///
3345 /// Format of the return value [`ArkUI_AttributeItem`]:
3346 ///
3347 /// .value[0].u32: color value, in 0xARGB format.
3348 pub const NODE_TEXT_SELECTED_BACKGROUND_COLOR: ArkUI_NodeAttributeType =
3349 ArkUI_NodeAttributeType(1027);
3350}
3351#[cfg(feature = "api-12")]
3352#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3353impl ArkUI_NodeAttributeType {
3354 /// The text component uses a formatted string object to set text content properties,
3355 /// and supports property setting, property reset, and property acquisition interfaces.
3356 ///
3357 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3358 ///
3359 /// .object indicates ArkUI_StyledString formatted string data. The parameter type is [`ArkUI_StyledString`].
3360 ///
3361 ///
3362 ///
3363 /// Format of the return value [`ArkUI_AttributeItem`]:
3364 ///
3365 /// .object indicates ArkUI_StyledString formatted string data. The parameter type is [`ArkUI_StyledString`].
3366 pub const NODE_TEXT_CONTENT_WITH_STYLED_STRING: ArkUI_NodeAttributeType =
3367 ArkUI_NodeAttributeType(1028);
3368}
3369#[cfg(feature = "api-12")]
3370#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3371impl ArkUI_NodeAttributeType {
3372 /// Sets whether to center text vertically in the text component.
3373 ///
3374 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3375 ///
3376 /// .value[0].i32: whether to center text vertically. The default value is <b>false</b>.
3377 ///
3378 ///
3379 ///
3380 /// Format of the return value [`ArkUI_AttributeItem`]:
3381 ///
3382 /// .value[0].i32: whether to center text vertically.
3383 pub const NODE_TEXT_HALF_LEADING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1029);
3384}
3385#[cfg(feature = "api-12")]
3386#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3387impl ArkUI_NodeAttributeType {
3388 /// Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
3389 ///
3390 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3391 ///
3392 /// .string: content of the text span.
3393 ///
3394 ///
3395 ///
3396 /// Format of the return value [`ArkUI_AttributeItem`]:
3397 ///
3398 /// .string: content of the text span.
3399 pub const NODE_SPAN_CONTENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(2000);
3400}
3401#[cfg(feature = "api-12")]
3402#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3403impl ArkUI_NodeAttributeType {
3404 /// Defines the text background style.
3405 /// This attribute can be set, reset, and obtained as required through APIs.
3406 ///
3407 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3408 ///
3409 /// .value[0].u32: color of the text background, in 0xARGB format, for example, <b>0xFFFF0000</b> indicating red.
3410 ///
3411 /// The second parameter indicates the rounded corners of the text background. Two setting modes are available:
3412 ///
3413 /// 1: .value[1].f32: radius of the four corners, in vp.
3414 ///
3415 /// 2: .value[1].f32: radius of the upper left corner, in vp.
3416 ///
3417 /// .value[2].f32: radius of the upper right corner, in vp.
3418 ///
3419 /// .value[3].f32: radius of the lower left corner, in vp.
3420 ///
3421 /// .value[4].f32: radius of the lower right corner, in vp.
3422 ///
3423 ///
3424 ///
3425 /// Format of the return value [`ArkUI_AttributeItem`]:
3426 ///
3427 /// .value[0].u32: color of the text background, in 0xARGB format.
3428 ///
3429 /// .value[1].f32: radius of the upper left corner, in vp.
3430 ///
3431 /// .value[2].f32: radius of the upper right corner, in vp.
3432 ///
3433 /// .value[3].f32: radius of the lower left corner, in vp.
3434 ///
3435 /// .value[4].f32: radius of the lower right corner, in vp.
3436 pub const NODE_SPAN_TEXT_BACKGROUND_STYLE: ArkUI_NodeAttributeType =
3437 ArkUI_NodeAttributeType(2001);
3438}
3439#[cfg(feature = "api-12")]
3440#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3441impl ArkUI_NodeAttributeType {
3442 /// Defines the text baseline offset attribute
3443 /// This attribute can be set, reset, and obtained as required through APIs.
3444 ///
3445 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3446 ///
3447 /// .value[0].f32: baseline offset, in fp.
3448 ///
3449 ///
3450 ///
3451 /// Format of the return value [`ArkUI_AttributeItem`]:
3452 ///
3453 /// .value[0].f32: baseline offset, in fp.
3454 pub const NODE_SPAN_BASELINE_OFFSET: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(2002);
3455}
3456#[cfg(feature = "api-12")]
3457#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3458impl ArkUI_NodeAttributeType {
3459 /// Defines the image source of the image span.
3460 /// This attribute can be set, reset, and obtained as required through APIs.
3461 ///
3462 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3463 ///
3464 /// .string: image address of the image span.
3465 ///
3466 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`]. Either .string or .object must be set.
3467 ///
3468 ///
3469 ///
3470 /// Format of the return value [`ArkUI_AttributeItem`]:
3471 ///
3472 /// .string: image address of the image span.
3473 ///
3474 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`].
3475 pub const NODE_IMAGE_SPAN_SRC: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(3000);
3476}
3477#[cfg(feature = "api-12")]
3478#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3479impl ArkUI_NodeAttributeType {
3480 /// Defines the alignment mode of the image with the text.
3481 /// This attribute can be set, reset, and obtained as required through APIs.
3482 ///
3483 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3484 ///
3485 /// .value[0].i32: alignment mode of the image with the text.
3486 /// The value is an enum of [`ArkUI_ImageSpanAlignment`].
3487 ///
3488 ///
3489 ///
3490 /// Format of the return value [`ArkUI_AttributeItem`]:
3491 ///
3492 /// .value[0].i32: alignment mode of the image with the text.
3493 /// The value is an enum of [`ArkUI_ImageSpanAlignment`].
3494 pub const NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT: ArkUI_NodeAttributeType =
3495 ArkUI_NodeAttributeType(3001);
3496}
3497#[cfg(feature = "api-12")]
3498#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3499impl ArkUI_NodeAttributeType {
3500 /// Defines the placeholder image source.
3501 /// This attribute can be set, reset, and obtained as required through APIs.
3502 ///
3503 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3504 ///
3505 /// .string: placeholder image source.
3506 ///
3507 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`]. Either .string or .object must be set.
3508 ///
3509 ///
3510 ///
3511 /// Format of the return value [`ArkUI_AttributeItem`]:
3512 ///
3513 /// .string: placeholder image source.
3514 ///
3515 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`].
3516 pub const NODE_IMAGE_SPAN_ALT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(3002);
3517}
3518#[cfg(feature = "api-12")]
3519#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3520impl ArkUI_NodeAttributeType {
3521 /// Defines the baseline offset attribute of the <b>ImageSpan</b> component.
3522 /// This attribute can be set, reset, and obtained as required through APIs.
3523 /// A positive value means an upward offset, while a negative value means a downward offset.
3524 /// The default value is <b>0</b>, and the unit is fp.
3525 ///
3526 ///
3527 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3528 ///
3529 /// .value[0].f32: baseline offset, in fp.
3530 ///
3531 ///
3532 ///
3533 /// Format of the return value [`ArkUI_AttributeItem`]:
3534 ///
3535 /// .value[0].f32: baseline offset, in fp.
3536 ///
3537 ///
3538 ///
3539 /// Available since API-level: 13
3540 #[cfg(feature = "api-13")]
3541 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3542 pub const NODE_IMAGE_SPAN_BASELINE_OFFSET: ArkUI_NodeAttributeType =
3543 ArkUI_NodeAttributeType(3003);
3544}
3545#[cfg(feature = "api-12")]
3546#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3547impl ArkUI_NodeAttributeType {
3548 /// Defines the image source of the <Image> component.
3549 /// This attribute can be set, reset, and obtained as required through APIs.
3550 ///
3551 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3552 ///
3553 /// .string: image source.
3554 ///
3555 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`]. Either .string or .object must be set.
3556 ///
3557 ///
3558 ///
3559 /// Format of the return value [`ArkUI_AttributeItem`]:
3560 ///
3561 /// .string: image source.
3562 ///
3563 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`].
3564 pub const NODE_IMAGE_SRC: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4000);
3565}
3566#[cfg(feature = "api-12")]
3567#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3568impl ArkUI_NodeAttributeType {
3569 /// Defines how the image is resized to fit its container.
3570 /// This attribute can be set, reset, and obtained as required through APIs.
3571 ///
3572 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3573 ///
3574 /// .value[0].i32: how the image is resized to fit its container. The value is an enum of [`ArkUI_ObjectFit`].
3575 ///
3576 ///
3577 ///
3578 /// Format of the return value [`ArkUI_AttributeItem`]:
3579 ///
3580 /// .value[0].i32: how the image is resized to fit its container. The value is an enum of [`ArkUI_ObjectFit`].
3581 pub const NODE_IMAGE_OBJECT_FIT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4001);
3582}
3583#[cfg(feature = "api-12")]
3584#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3585impl ArkUI_NodeAttributeType {
3586 /// Defines the interpolation effect of the image.
3587 /// This attribute can be set, reset, and obtained as required through APIs.
3588 ///
3589 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3590 ///
3591 /// .value[0].i32: interpolation effect of the image. The value is an enum of [`ArkUI_ImageInterpolation`].
3592 ///
3593 ///
3594 ///
3595 /// Format of the return value [`ArkUI_AttributeItem`]:
3596 ///
3597 /// .value[0].i32: interpolation effect of the image. The value is an enum of [`ArkUI_ImageInterpolation`].
3598 pub const NODE_IMAGE_INTERPOLATION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4002);
3599}
3600#[cfg(feature = "api-12")]
3601#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3602impl ArkUI_NodeAttributeType {
3603 /// Defines how the image is repeated.
3604 /// This attribute can be set, reset, and obtained as required through APIs.
3605 ///
3606 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3607 ///
3608 /// .value[0].i32: how the image is repeated. The value is an enum of [`ArkUI_ImageRepeat`].
3609 ///
3610 ///
3611 ///
3612 /// Format of the return value [`ArkUI_AttributeItem`]:
3613 ///
3614 /// .value[0].i32: how the image is repeated. The value is an enum of [`ArkUI_ImageRepeat`].
3615 pub const NODE_IMAGE_OBJECT_REPEAT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4003);
3616}
3617#[cfg(feature = "api-12")]
3618#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3619impl ArkUI_NodeAttributeType {
3620 /// Defines the color filter of the image.
3621 /// This attribute can be set, reset, and obtained as required through APIs.
3622 ///
3623 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3624 ///
3625 /// .value[0].f32 to .value[19].f32: filter matrix array.
3626 ///
3627 /// .size: 5 x 4 filter array size.
3628 ///
3629 /// .object: the pointer to OH_Drawing_ColorFilter. Either .value or .object is set.
3630 ///
3631 ///
3632 ///
3633 /// Format of the return value [`ArkUI_AttributeItem`]:
3634 ///
3635 /// .value[0].f32 to .value[19].f32: filter matrix array.
3636 ///
3637 /// .size: 5 x 4 filter array size.
3638 ///
3639 /// .object: the pointer to OH_Drawing_ColorFilter.
3640 pub const NODE_IMAGE_COLOR_FILTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4004);
3641}
3642#[cfg(feature = "api-12")]
3643#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3644impl ArkUI_NodeAttributeType {
3645 /// Defines the auto resize attribute, which can be set, reset, and obtained as required through APIs.
3646 ///
3647 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3648 ///
3649 /// .value[0].i32 : whether to resize the image source.
3650 ///
3651 ///
3652 ///
3653 /// Format of the return value [`ArkUI_AttributeItem`]:
3654 ///
3655 /// .value[0].i32 : whether to resize the image source.
3656 pub const NODE_IMAGE_AUTO_RESIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4005);
3657}
3658#[cfg(feature = "api-12")]
3659#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3660impl ArkUI_NodeAttributeType {
3661 /// Defines the placeholder image source.
3662 /// This attribute can be set, reset, and obtained as required through APIs.
3663 ///
3664 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3665 ///
3666 /// .string: placeholder image source.
3667 ///
3668 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`]. Either .string or .object must be set.
3669 ///
3670 ///
3671 ///
3672 /// Format of the return value [`ArkUI_AttributeItem`]:
3673 ///
3674 /// .string: placeholder image source.
3675 ///
3676 /// .object: The parameter type is [`ArkUI_DrawableDescriptor`].
3677 pub const NODE_IMAGE_ALT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4006);
3678}
3679#[cfg(feature = "api-12")]
3680#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3681impl ArkUI_NodeAttributeType {
3682 /// Defines whether the image is draggable.
3683 /// This attribute can be set, reset, and obtained as required through APIs.
3684 ///
3685 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3686 ///
3687 /// .value[0].i32: whether the image is draggable. The value <b>true</b> means that the image is draggable.
3688 ///
3689 ///
3690 ///
3691 /// Format of the return value [`ArkUI_AttributeItem`]:
3692 ///
3693 /// .value[0].i32: whether the image is draggable.
3694 pub const NODE_IMAGE_DRAGGABLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4007);
3695}
3696#[cfg(feature = "api-12")]
3697#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3698impl ArkUI_NodeAttributeType {
3699 /// Defines the image rendering mode. This attribute can be set, reset, and obtained as required through APIs.
3700 ///
3701 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3702 ///
3703 /// .value[0].i32: The parameter type is [`ArkUI_ImageRenderMode`].
3704 ///
3705 ///
3706 ///
3707 /// Format of the return value [`ArkUI_AttributeItem`]:
3708 ///
3709 /// .value[0].i32: The parameter type is [`ArkUI_ImageRenderMode`].
3710 pub const NODE_IMAGE_RENDER_MODE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4008);
3711}
3712#[cfg(feature = "api-12")]
3713#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3714impl ArkUI_NodeAttributeType {
3715 /// Defines whether the image display size follows the image source size.
3716 /// This attribute can be set, reset, and obtained as required through APIs.
3717 ///
3718 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3719 ///
3720 /// .value[0].i32: wheter to follow, true means to follow.
3721 ///
3722 ///
3723 ///
3724 /// Format of the return value [`ArkUI_AttributeItem`]:
3725 ///
3726 /// .value[0].i32: wheter to follow, true means to follow.
3727 pub const NODE_IMAGE_FIT_ORIGINAL_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4009);
3728}
3729#[cfg(feature = "api-12")]
3730#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3731impl ArkUI_NodeAttributeType {
3732 /// Defines the fill color of the swiper.
3733 /// This attribute can be set, reset, and obtained as required through APIs.
3734 ///
3735 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3736 ///
3737 /// .value[0].u32: fill color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3738 ///
3739 ///
3740 ///
3741 /// Format of the return value [`ArkUI_AttributeItem`]:
3742 ///
3743 /// .value[0].u32: fill color, in 0xARGB format.
3744 pub const NODE_IMAGE_FILL_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4010);
3745}
3746#[cfg(feature = "api-12")]
3747#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3748impl ArkUI_NodeAttributeType {
3749 /// Sets the resizable image options.
3750 ///
3751 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3752 ///
3753 /// .value[0].f32: width of the left edge. The unit is vp.
3754 ///
3755 /// .value[1].f32: width of the top edge. The unit is vp.
3756 ///
3757 /// .value[2].f32: width of the right edge. The unit is vp.
3758 ///
3759 /// .value[3].f32: width of the bottom edge. The unit is vp.
3760 ///
3761 ///
3762 ///
3763 /// Format of the return value [`ArkUI_AttributeItem`]:
3764 ///
3765 /// .value[0].f32: width of the left edge. The unit is vp.
3766 ///
3767 /// .value[1].f32: width of the top edge. The unit is vp.
3768 ///
3769 /// .value[2].f32: width of the right edge. The unit is vp.
3770 ///
3771 /// .value[3].f32: width of the bottom edge. The unit is vp.
3772 pub const NODE_IMAGE_RESIZABLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(4011);
3773}
3774#[cfg(feature = "api-12")]
3775#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3776impl ArkUI_NodeAttributeType {
3777 /// Defines the color of the component when it is selected.
3778 /// This attribute can be set, reset, and obtained as required through APIs.
3779 ///
3780 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3781 ///
3782 /// .value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3783 ///
3784 ///
3785 ///
3786 /// Format of the return value [`ArkUI_AttributeItem`]:
3787 ///
3788 /// .value[0].u32: background color, in 0xARGB format.
3789 pub const NODE_TOGGLE_SELECTED_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(5000);
3790}
3791#[cfg(feature = "api-12")]
3792#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3793impl ArkUI_NodeAttributeType {
3794 /// Defines the color of the circular slider for the component of the switch type.
3795 /// This attribute can be set, reset, and obtained as required through APIs.
3796 ///
3797 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3798 ///
3799 /// .value[0].u32: color of the circular slider, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3800 ///
3801 ///
3802 ///
3803 /// Format of the return value [`ArkUI_AttributeItem`]:
3804 ///
3805 /// .value[0].u32: color of the circular slider, in 0xARGB format.
3806 pub const NODE_TOGGLE_SWITCH_POINT_COLOR: ArkUI_NodeAttributeType =
3807 ArkUI_NodeAttributeType(5001);
3808}
3809#[cfg(feature = "api-12")]
3810#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3811impl ArkUI_NodeAttributeType {
3812 /// Defines the toggle switch value. This attribute can be set, reset, and obtained as required through APIs.
3813 ///
3814 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3815 ///
3816 /// .value[0].i32: whether to enable the toggle. The value <b>true</b> means to enable the toggle.
3817 ///
3818 ///
3819 ///
3820 /// Format of the return value [`ArkUI_AttributeItem`]:
3821 ///
3822 /// .value[0].i32: whether to enable the toggle.
3823 pub const NODE_TOGGLE_VALUE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(5002);
3824}
3825#[cfg(feature = "api-12")]
3826#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3827impl ArkUI_NodeAttributeType {
3828 /// Defines the color of the component when it is deselected.
3829 /// This attribute can be set, reset, and obtained as required through APIs.
3830 ///
3831 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3832 ///
3833 /// .value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3834 ///
3835 ///
3836 ///
3837 /// Format of the return value [`ArkUI_AttributeItem`]:
3838 ///
3839 /// .value[0].u32: background color, in 0xARGB format.
3840 pub const NODE_TOGGLE_UNSELECTED_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(5003);
3841}
3842#[cfg(feature = "api-12")]
3843#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3844impl ArkUI_NodeAttributeType {
3845 /// Defines the foreground color of the loading progress bar.
3846 /// This attribute can be set, reset, and obtained as required through APIs.
3847 ///
3848 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3849 ///
3850 /// .value[0].u32: foreground color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3851 ///
3852 ///
3853 ///
3854 /// Format of the return value [`ArkUI_AttributeItem`]:
3855 ///
3856 /// .value[0].u32: foreground color, in 0xARGB format.
3857 pub const NODE_LOADING_PROGRESS_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(6000);
3858}
3859#[cfg(feature = "api-12")]
3860#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3861impl ArkUI_NodeAttributeType {
3862 /// Defines whether to show the loading animation for the <LoadingProgress> component.
3863 /// This attribute can be set, reset, and obtained as required through APIs.
3864 ///
3865 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3866 ///
3867 /// .value[0].i32: whether to show the loading animation.
3868 /// The value <b>true</b> means to show the loading animation, and <b>false</b> means the opposite.
3869 ///
3870 ///
3871 ///
3872 /// Format of the return value [`ArkUI_AttributeItem`]:
3873 ///
3874 /// .value[0].i32: The value <b>1</b> means to show the loading animation, and <b>0</b> means the opposite.
3875 pub const NODE_LOADING_PROGRESS_ENABLE_LOADING: ArkUI_NodeAttributeType =
3876 ArkUI_NodeAttributeType(6001);
3877}
3878#[cfg(feature = "api-12")]
3879#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3880impl ArkUI_NodeAttributeType {
3881 /// Defines the default placeholder text of the single-line text box.
3882 /// This attribute can be set, reset, and obtained as required through APIs.
3883 ///
3884 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3885 ///
3886 /// .string: default placeholder text.
3887 ///
3888 ///
3889 ///
3890 /// Format of the return value [`ArkUI_AttributeItem`]:
3891 ///
3892 /// .string: default placeholder text.
3893 pub const NODE_TEXT_INPUT_PLACEHOLDER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7000);
3894}
3895#[cfg(feature = "api-12")]
3896#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3897impl ArkUI_NodeAttributeType {
3898 /// Defines the default text content of the single-line text box.
3899 /// This attribute can be set, reset, and obtained as required through APIs.
3900 ///
3901 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3902 ///
3903 /// .string: default text content.
3904 ///
3905 ///
3906 ///
3907 /// Format of the return value [`ArkUI_AttributeItem`]:
3908 ///
3909 /// .string: default text content.
3910 pub const NODE_TEXT_INPUT_TEXT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7001);
3911}
3912#[cfg(feature = "api-12")]
3913#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3914impl ArkUI_NodeAttributeType {
3915 /// Defines the caret color attribute.
3916 /// This attribute can be set, reset, and obtained as required through APIs.
3917 ///
3918 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3919 ///
3920 /// .value[0].u32: caret color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
3921 ///
3922 ///
3923 ///
3924 /// Format of the return value [`ArkUI_AttributeItem`]:
3925 ///
3926 /// .value[0].u32: caret color, in 0xARGB format.
3927 pub const NODE_TEXT_INPUT_CARET_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7002);
3928}
3929#[cfg(feature = "api-12")]
3930#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3931impl ArkUI_NodeAttributeType {
3932 /// Defines the caret style attribute.
3933 /// This attribute can be set, reset, and obtained as required through APIs.
3934 ///
3935 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3936 ///
3937 /// .value[0].f32: caret width, in vp.
3938 ///
3939 ///
3940 ///
3941 /// Format of the return value [`ArkUI_AttributeItem`]:
3942 ///
3943 /// .value[0].f32: caret width, in vp.
3944 pub const NODE_TEXT_INPUT_CARET_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7003);
3945}
3946#[cfg(feature = "api-12")]
3947#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3948impl ArkUI_NodeAttributeType {
3949 /// Defines the underline attribute of the single-line text box.
3950 /// This attribute can be set, reset, and obtained as required through APIs.
3951 ///
3952 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3953 ///
3954 /// .value[0].i32: whether to show an underline.
3955 /// The value <b>true</b> means to show an underline, and <b>false</b> means the opposite.
3956 ///
3957 ///
3958 ///
3959 /// Format of the return value [`ArkUI_AttributeItem`]:
3960 ///
3961 /// .value[0].i32: The value <b>1</b> means to show an underline, and <b>0</b> means the opposite.
3962 pub const NODE_TEXT_INPUT_SHOW_UNDERLINE: ArkUI_NodeAttributeType =
3963 ArkUI_NodeAttributeType(7004);
3964}
3965#[cfg(feature = "api-12")]
3966#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3967impl ArkUI_NodeAttributeType {
3968 /// Defines the maximum number of characters in the text input.
3969 /// This attribute can be set, reset, and obtained as required through APIs.
3970 ///
3971 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3972 ///
3973 /// .value[0].i32: maximum number of characters in the text input, without a unit.
3974 ///
3975 ///
3976 ///
3977 /// Format of the return value [`ArkUI_AttributeItem`]:
3978 ///
3979 /// .value[0].i32: maximum number of characters in the text input.
3980 pub const NODE_TEXT_INPUT_MAX_LENGTH: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7005);
3981}
3982#[cfg(feature = "api-12")]
3983#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
3984impl ArkUI_NodeAttributeType {
3985 /// Defines the type of the Enter key.
3986 /// This attribute can be set, reset, and obtained as required through APIs.
3987 ///
3988 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
3989 ///
3990 /// .value[0].i32: type of the Enter key[`ArkUI_EnterKeyType`]. The default value is <b>ARKUI_ENTER_KEY_TYPE_DONE</b>.
3991 ///
3992 ///
3993 ///
3994 /// Format of the return value [`ArkUI_AttributeItem`]:
3995 ///
3996 /// .value[0].i32: type of the Enter key[`ArkUI_EnterKeyType`].
3997 pub const NODE_TEXT_INPUT_ENTER_KEY_TYPE: ArkUI_NodeAttributeType =
3998 ArkUI_NodeAttributeType(7006);
3999}
4000#[cfg(feature = "api-12")]
4001#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4002impl ArkUI_NodeAttributeType {
4003 /// Defines the placeholder text color.
4004 /// This attribute can be set, reset, and obtained as required through APIs.
4005 ///
4006 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4007 ///
4008 /// .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
4009 ///
4010 ///
4011 ///
4012 /// Format of the return value [`ArkUI_AttributeItem`]:
4013 ///
4014 /// .value[0].u32: color value, in 0xARGB format.
4015 pub const NODE_TEXT_INPUT_PLACEHOLDER_COLOR: ArkUI_NodeAttributeType =
4016 ArkUI_NodeAttributeType(7007);
4017}
4018#[cfg(feature = "api-12")]
4019#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4020impl ArkUI_NodeAttributeType {
4021 /// Defines the placeholder text font.
4022 /// This attribute can be set, reset, and obtained as required through APIs.
4023 ///
4024 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4025 ///
4026 /// .value[0]?.f32: font size, in fp. Optional. The default value is <b>16.0</b>.
4027 ///
4028 /// .value[1]?.i32: font style [`ArkUI_FontStyle`]. Optional.
4029 /// The default value is <b>ARKUI_FONT_STYLE_NORMAL</b>.
4030 ///
4031 /// .value[2]?.i32: font weight [`ArkUI_FontWeight`]. Optional.
4032 /// The default value is <b>ARKUI_FONT_WEIGHT_NORMAL</b>.
4033 ///
4034 /// ?.string: font family. Multiple font families are separated by commas (,).
4035 /// Example: "font weight; font family 1, font family 2".
4036 ///
4037 ///
4038 ///
4039 /// Format of the return value [`ArkUI_AttributeItem`]:
4040 ///
4041 /// .value[0].f32: font size, in fp.
4042 ///
4043 /// .value[1].i32: font style [`ArkUI_FontStyle`].
4044 ///
4045 /// .value[2].i32: font weight [`ArkUI_FontWeight`].
4046 ///
4047 /// .string: font family. Multiple font families are separated by commas (,).
4048 pub const NODE_TEXT_INPUT_PLACEHOLDER_FONT: ArkUI_NodeAttributeType =
4049 ArkUI_NodeAttributeType(7008);
4050}
4051#[cfg(feature = "api-12")]
4052#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4053impl ArkUI_NodeAttributeType {
4054 /// Defines whether to enable the input method when the component obtains focus.
4055 /// This attribute can be set, reset, and obtained as required through APIs.
4056 ///
4057 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4058 ///
4059 /// .value[0].i32: whether to enable the input method when the component obtains focus.
4060 /// The value <b>true</b> means to enable the input method, and <b>false</b> means the opposite.
4061 ///
4062 ///
4063 ///
4064 ///
4065 /// Format of the return value [`ArkUI_AttributeItem`]:
4066 ///
4067 /// .value[0].i32: The value <b>1</b> means to enable the input method when the component obtains focus,
4068 /// and <b>0</b> means the opposite.
4069 pub const NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType =
4070 ArkUI_NodeAttributeType(7009);
4071}
4072#[cfg(feature = "api-12")]
4073#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4074impl ArkUI_NodeAttributeType {
4075 /// Defines the text box type. This attribute can be set, reset, and obtained as required through APIs.
4076 ///
4077 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4078 ///
4079 /// .value[0].i32: text box type [`ArkUI_TextInputType`].
4080 /// The default value is <b>ARKUI_TEXTINPUT_TYPE_NORMAL</b>.
4081 ///
4082 ///
4083 ///
4084 /// Format of the return value [`ArkUI_AttributeItem`]:
4085 ///
4086 /// .value[0].i32: text box type [`ArkUI_TextInputType`].
4087 pub const NODE_TEXT_INPUT_TYPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7010);
4088}
4089#[cfg(feature = "api-12")]
4090#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4091impl ArkUI_NodeAttributeType {
4092 /// Defines the background color of the selected text.
4093 /// This attribute can be set, reset, and obtained as required through APIs.
4094 ///
4095 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4096 ///
4097 /// .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
4098 ///
4099 ///
4100 ///
4101 /// Format of the return value [`ArkUI_AttributeItem`]:
4102 ///
4103 /// .value[0].u32: color value, in 0xARGB format.
4104 pub const NODE_TEXT_INPUT_SELECTED_BACKGROUND_COLOR: ArkUI_NodeAttributeType =
4105 ArkUI_NodeAttributeType(7011);
4106}
4107#[cfg(feature = "api-12")]
4108#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4109impl ArkUI_NodeAttributeType {
4110 /// Defines whether to display the password icon at the end of the password text box.
4111 /// This attribute can be set, reset, and obtained as required through APIs.
4112 ///
4113 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4114 ///
4115 /// .value[0].i32: whether to display the password icon at the end of the password text box.
4116 /// The value <b>true</b> means to display the password icon, and <b>false</b> means the opposite.
4117 ///
4118 ///
4119 ///
4120 /// Format of the return value [`ArkUI_AttributeItem`]:
4121 ///
4122 /// .value[0].i32: The value <b>1</b> means to display the password icon at the end of the password text box,
4123 /// and <b>0</b> means the opposite.
4124 pub const NODE_TEXT_INPUT_SHOW_PASSWORD_ICON: ArkUI_NodeAttributeType =
4125 ArkUI_NodeAttributeType(7012);
4126}
4127#[cfg(feature = "api-12")]
4128#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4129impl ArkUI_NodeAttributeType {
4130 /// Defines the editable state for the single-line text box.
4131 /// This attribute can be set as required through APIs.
4132 ///
4133 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4134 ///
4135 /// .value[0].i32: whether to remain in the editable state. The value
4136 /// <b>true</b> means to remain in the editable state, and <b>false</b> means to exit the editable state.
4137 ///
4138 ///
4139 ///
4140 /// Format of the [`ArkUI_AttributeItem`] parameter for obtaining the attribute:
4141 /// .value[0].i32: whether to remain in the editable state. The value <b>true</b> means to remain in the editable
4142 /// state, and <b>false</b> means to exit the editable state.
4143 pub const NODE_TEXT_INPUT_EDITING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7013);
4144}
4145#[cfg(feature = "api-12")]
4146#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4147impl ArkUI_NodeAttributeType {
4148 /// Defines the style of the cancel button on the right of the single-line text box.
4149 /// This attribute can be set, reset, and obtained as required through APIs.
4150 ///
4151 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4152 ///
4153 /// .value[0].i32: button style [`ArkUI_CancelButtonStyle`].
4154 /// The default value is <b>ARKUI_CANCELBUTTON_STYLE_INPUT</b>.
4155 ///
4156 /// .value[1]?.f32: button icon size, in vp.
4157 ///
4158 /// .value[2]?.u32: button icon color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
4159 ///
4160 /// ?.string: button icon image source. The value is the local address of the image, for example, /pages/icon.png.
4161 ///
4162 ///
4163 ///
4164 /// Format of the return value [`ArkUI_AttributeItem`]:
4165 ///
4166 /// .value[0].i32: button style [`ArkUI_CancelButtonStyle`].
4167 ///
4168 /// .value[1].f32: icon size, in vp.
4169 ///
4170 /// .value[2].u32: button icon color, in 0xARGB format.
4171 ///
4172 /// .string: button icon image source.
4173 pub const NODE_TEXT_INPUT_CANCEL_BUTTON: ArkUI_NodeAttributeType =
4174 ArkUI_NodeAttributeType(7014);
4175}
4176#[cfg(feature = "api-12")]
4177#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4178impl ArkUI_NodeAttributeType {
4179 /// Sets the text selection area, which will be highlighted.
4180 /// This attribute can be set, reset, and obtained as required through APIs.
4181 ///
4182 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4183 ///
4184 /// .value[0].i32: start position of the text selection.
4185 ///
4186 /// .value[1].i32: end position of the text selection.
4187 ///
4188 ///
4189 ///
4190 /// Format of the return value [`ArkUI_AttributeItem`]:
4191 ///
4192 /// .value[0].i32: start position of the text selection.
4193 ///
4194 /// .value[1].i32: end position of the text selection.
4195 pub const NODE_TEXT_INPUT_TEXT_SELECTION: ArkUI_NodeAttributeType =
4196 ArkUI_NodeAttributeType(7015);
4197}
4198#[cfg(feature = "api-12")]
4199#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4200impl ArkUI_NodeAttributeType {
4201 /// Sets the color of the text underline when it is enabled.
4202 ///
4203 /// The default underline color configured for the theme is <b>'0x33182431'</b>.
4204 ///
4205 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4206 ///
4207 /// .value[0].u32: color of the underline applied to the text being typed in.
4208 /// The value is in 0xARGB format.
4209 ///
4210 /// .value[1].u32: color of the underline applied to the text in the normal state.
4211 /// The value is in 0xARGB format.
4212 ///
4213 /// .value[2].u32: color of the underline applied to the text when an error is detected.
4214 /// The value is in 0xARGB format.
4215 ///
4216 /// .value[3].u32: color of the underline applied to the text when it is disabled.
4217 /// The value is in 0xARGB format.
4218 ///
4219 ///
4220 ///
4221 /// Format of the return value [`ArkUI_AttributeItem`]:
4222 ///
4223 /// .value[0].u32: color of the underline applied to the text being typed in. The value is in 0xARGB format.
4224 ///
4225 /// .value[1].u32: color of the underline applied to the text in the normal state. The value is in 0xARGB format.
4226 ///
4227 /// .value[2].u32: color of the underline applied to the text when an error is detected.
4228 /// The value is in 0xARGB format.
4229 ///
4230 /// .value[3].u32: color of the underline applied to the text when it is disabled. The value is in 0xARGB format.
4231 pub const NODE_TEXT_INPUT_UNDERLINE_COLOR: ArkUI_NodeAttributeType =
4232 ArkUI_NodeAttributeType(7016);
4233}
4234#[cfg(feature = "api-12")]
4235#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4236impl ArkUI_NodeAttributeType {
4237 /// Sets whether to enable autofill.
4238 ///
4239 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4240 ///
4241 /// .value[0].i32: whether to enable autofill. The default value is <b>true</b>.
4242 ///
4243 ///
4244 ///
4245 /// Format of the return value [`ArkUI_AttributeItem`]:
4246 ///
4247 /// .value[0].i32: whether to enable autofill.
4248 pub const NODE_TEXT_INPUT_ENABLE_AUTO_FILL: ArkUI_NodeAttributeType =
4249 ArkUI_NodeAttributeType(7017);
4250}
4251#[cfg(feature = "api-12")]
4252#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4253impl ArkUI_NodeAttributeType {
4254 /// Sets the autofill type.
4255 ///
4256 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4257 ///
4258 /// .value[0].i32: autofill type. The parameter type is [`ArkUI_TextInputContentType`].
4259 ///
4260 ///
4261 ///
4262 /// Format of the return value [`ArkUI_AttributeItem`]:
4263 ///
4264 /// .value[0].i32: autofill type. The parameter type is [`ArkUI_TextInputContentType`].
4265 pub const NODE_TEXT_INPUT_CONTENT_TYPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7018);
4266}
4267#[cfg(feature = "api-12")]
4268#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4269impl ArkUI_NodeAttributeType {
4270 /// Defines the rules for generating passwords. When autofill is used, these rules are transparently
4271 /// transmitted to Password Vault for generating a new password.
4272 ///
4273 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4274 ///
4275 /// .string: rules for generating passwords.
4276 ///
4277 ///
4278 ///
4279 /// Format of the return value [`ArkUI_AttributeItem`]:
4280 ///
4281 /// .string: rules for generating passwords.
4282 pub const NODE_TEXT_INPUT_PASSWORD_RULES: ArkUI_NodeAttributeType =
4283 ArkUI_NodeAttributeType(7019);
4284}
4285#[cfg(feature = "api-12")]
4286#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4287impl ArkUI_NodeAttributeType {
4288 /// Sets whether to select all text in the initial state. The inline mode is not supported.
4289 ///
4290 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4291 ///
4292 /// .value[0].i32: whether to select all text in the initial state. The default value is b>false</b>.
4293 ///
4294 ///
4295 ///
4296 /// Format of the return value [`ArkUI_AttributeItem`]:
4297 ///
4298 /// .value[0].i32: whether to select all text in the initial state.
4299 pub const NODE_TEXT_INPUT_SELECT_ALL: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7020);
4300}
4301#[cfg(feature = "api-12")]
4302#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4303impl ArkUI_NodeAttributeType {
4304 /// Sets the regular expression for input filtering.
4305 /// Only inputs that comply with the regular expression can be displayed.
4306 /// Other inputs are filtered out. The specified regular expression can match single characters,
4307 /// but not strings.
4308 ///
4309 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4310 ///
4311 /// .string: regular expression.
4312 ///
4313 ///
4314 ///
4315 /// Format of the return value [`ArkUI_AttributeItem`]:
4316 ///
4317 /// .string: regular expression.
4318 pub const NODE_TEXT_INPUT_INPUT_FILTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7021);
4319}
4320#[cfg(feature = "api-12")]
4321#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4322impl ArkUI_NodeAttributeType {
4323 /// Sets the text box to the default style or inline input style.
4324 ///
4325 /// For the inline input style, only <b>InputType.Normal</b> is supported.
4326 ///
4327 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4328 ///
4329 /// .value[0].i32: text input style. The parameter type is [`ArkUI_TextInputStyle`].
4330 ///
4331 ///
4332 ///
4333 /// Format of the return value [`ArkUI_AttributeItem`]:
4334 ///
4335 /// .value[0].i32: text input style. The parameter type is [`ArkUI_TextInputStyle`].
4336 pub const NODE_TEXT_INPUT_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7022);
4337}
4338#[cfg(feature = "api-12")]
4339#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4340impl ArkUI_NodeAttributeType {
4341 /// Sets or obtains the caret position.
4342 ///
4343 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4344 ///
4345 /// In the case of setting the caret position:
4346 /// .value[0].i32: character count from the beginning of a string to the caret position.
4347 ///
4348 ///
4349 /// Format of the return value [`ArkUI_AttributeItem`]:
4350 ///
4351 /// In the case of obtaining the caret position: If this API is called when the caret position is updated in the
4352 /// current frame, it will not take effect.
4353 /// .value[0].i32: index of the caret position.
4354 ///
4355 /// .value[1].f32: X coordinate of the caret relative to the text box.
4356 ///
4357 /// .value[2].f32: Y coordinate of the caret relative to the text box.
4358 pub const NODE_TEXT_INPUT_CARET_OFFSET: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7023);
4359}
4360#[cfg(feature = "api-12")]
4361#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4362impl ArkUI_NodeAttributeType {
4363 /// Obtains the position of the edited text area relative to the component and its size.
4364 ///
4365 /// Format of the return value [`ArkUI_AttributeItem`]:
4366 ///
4367 /// .value[0].f32: horizontal coordinate.
4368 ///
4369 /// .value[1].f32: vertical coordinate.
4370 ///
4371 /// .value[2].f32: content width.
4372 ///
4373 /// .value[3].f32: content height.
4374 pub const NODE_TEXT_INPUT_CONTENT_RECT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7024);
4375}
4376#[cfg(feature = "api-12")]
4377#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4378impl ArkUI_NodeAttributeType {
4379 /// Obtains the number of lines of the edited text.
4380 ///
4381 /// Format of the return value [`ArkUI_AttributeItem`]:
4382 ///
4383 /// .value[0].i32: number of lines of the edited text.
4384 pub const NODE_TEXT_INPUT_CONTENT_LINE_COUNT: ArkUI_NodeAttributeType =
4385 ArkUI_NodeAttributeType(7025);
4386}
4387#[cfg(feature = "api-12")]
4388#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4389impl ArkUI_NodeAttributeType {
4390 /// Sets whether to hide the text selection menu when the text box is long-pressed, double-click, or
4391 /// right-clicked. This attribute can be set, reset, and obtained as required through APIs.
4392 ///
4393 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4394 ///
4395 /// .value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, or
4396 /// right-clicked. The default value is <b>false</b>.
4397 ///
4398 ///
4399 ///
4400 /// Format of the return value [`ArkUI_AttributeItem`]:
4401 ///
4402 /// .value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, or
4403 /// right-clicked.
4404 pub const NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN: ArkUI_NodeAttributeType =
4405 ArkUI_NodeAttributeType(7026);
4406}
4407#[cfg(feature = "api-12")]
4408#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4409impl ArkUI_NodeAttributeType {
4410 /// Sets whether the text box loses focus after the Enter key is pressed to submit information.
4411 ///
4412 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4413 ///
4414 /// .value[0].i32: whether the text box loses focus.
4415 ///
4416 ///
4417 ///
4418 /// Format of the return value [`ArkUI_AttributeItem`]:
4419 ///
4420 /// .value[0].i32: whether the text box loses focus.
4421 pub const NODE_TEXT_INPUT_BLUR_ON_SUBMIT: ArkUI_NodeAttributeType =
4422 ArkUI_NodeAttributeType(7027);
4423}
4424#[cfg(feature = "api-12")]
4425#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4426impl ArkUI_NodeAttributeType {
4427 /// Set up a custom keyboard.
4428 ///
4429 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4430 ///
4431 /// .object:custom keyboard,The parameter type is[`ArkUI_NodeHandle`]。
4432 ///
4433 /// .value[0]?.i32:Sets whether the custom keyboard supports the avoidance feature, default value false.
4434 ///
4435 ///
4436 ///
4437 /// Format of the return value [`ArkUI_AttributeItem`]:
4438 ///
4439 /// .object:custom keyboard,The parameter type is[`ArkUI_NodeHandle`]。
4440 ///
4441 /// .value[0].i32:Set whether the custom keyboard supports the avoidance function.
4442 pub const NODE_TEXT_INPUT_CUSTOM_KEYBOARD: ArkUI_NodeAttributeType =
4443 ArkUI_NodeAttributeType(7028);
4444}
4445#[cfg(feature = "api-12")]
4446#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4447impl ArkUI_NodeAttributeType {
4448 /// Defines the line break rule. This attribute can be set, reset, and obtained as required through APIs.
4449 ///
4450 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4451 ///
4452 /// .value[0].i32: The parameter type is [`ArkUI_WordBreak`].
4453 ///
4454 ///
4455 ///
4456 /// Format of the return value [`ArkUI_AttributeItem`]:
4457 ///
4458 /// .value[0].i32: The parameter type is [`ArkUI_WordBreak`].
4459 pub const NODE_TEXT_INPUT_WORD_BREAK: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(7029);
4460}
4461#[cfg(feature = "api-12")]
4462#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4463impl ArkUI_NodeAttributeType {
4464 /// Sets whether the keyboard pops up when the input box gains focus.
4465 /// It supports property setting, property reset and property acquisition interfaces.
4466 ///
4467 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
4468 ///
4469 /// .value[0].i32: Whether to pop up the keyboard.
4470 ///
4471 ///
4472 ///
4473 /// Attribute acquisition method return value [`ArkUI_AttributeItem`] format:
4474 ///
4475 /// .value[0].i32: Whether to pop up the keyboard.
4476 pub const NODE_TEXT_INPUT_SHOW_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType =
4477 ArkUI_NodeAttributeType(7030);
4478}
4479#[cfg(feature = "api-12")]
4480#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4481impl ArkUI_NodeAttributeType {
4482 /// When this property is set, the height of the textInput component is calculated using this property.
4483 ///
4484 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4485 ///
4486 /// .value[0].i32: set the value of numberOfLines.
4487 ///
4488 ///
4489 ///
4490 /// Format of the return value [`ArkUI_AttributeItem`]:
4491 ///
4492 /// .value[0].i32: the value of numberOfLines.
4493 pub const NODE_TEXT_INPUT_NUMBER_OF_LINES: ArkUI_NodeAttributeType =
4494 ArkUI_NodeAttributeType(7031);
4495}
4496#[cfg(feature = "api-12")]
4497#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4498impl ArkUI_NodeAttributeType {
4499 /// Defines the default placeholder text for the multi-line text box.
4500 /// This attribute can be set, reset, and obtained as required through APIs.
4501 ///
4502 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4503 ///
4504 /// .string: default placeholder text.
4505 ///
4506 ///
4507 ///
4508 /// Format of the return value [`ArkUI_AttributeItem`]:
4509 ///
4510 /// .string: default placeholder text.
4511 pub const NODE_TEXT_AREA_PLACEHOLDER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8000);
4512}
4513#[cfg(feature = "api-12")]
4514#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4515impl ArkUI_NodeAttributeType {
4516 /// Defines the default text content for the multi-line text box.
4517 /// This attribute can be set, reset, and obtained as required through APIs.
4518 ///
4519 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4520 ///
4521 /// .string: default text content.
4522 ///
4523 ///
4524 ///
4525 /// Format of the return value [`ArkUI_AttributeItem`]:
4526 ///
4527 /// .string: default text content.
4528 pub const NODE_TEXT_AREA_TEXT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8001);
4529}
4530#[cfg(feature = "api-12")]
4531#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4532impl ArkUI_NodeAttributeType {
4533 /// Defines the maximum number of characters in the text input.
4534 /// This attribute can be set, reset, and obtained as required through APIs.
4535 ///
4536 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4537 ///
4538 /// .value[0].i32: maximum number of characters in the text input.
4539 ///
4540 ///
4541 ///
4542 /// Format of the return value [`ArkUI_AttributeItem`]:
4543 ///
4544 /// .value[0].i32: maximum number of characters in the text input.
4545 pub const NODE_TEXT_AREA_MAX_LENGTH: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8002);
4546}
4547#[cfg(feature = "api-12")]
4548#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4549impl ArkUI_NodeAttributeType {
4550 /// Defines the placeholder text color.
4551 /// This attribute can be set, reset, and obtained as required through APIs.
4552 ///
4553 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4554 ///
4555 /// .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
4556 ///
4557 ///
4558 ///
4559 /// Format of the return value [`ArkUI_AttributeItem`]:
4560 ///
4561 /// .value[0].u32: color value, in 0xARGB format.
4562 pub const NODE_TEXT_AREA_PLACEHOLDER_COLOR: ArkUI_NodeAttributeType =
4563 ArkUI_NodeAttributeType(8003);
4564}
4565#[cfg(feature = "api-12")]
4566#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4567impl ArkUI_NodeAttributeType {
4568 /// Defines the placeholder text font.
4569 /// This attribute can be set, reset, and obtained as required through APIs.
4570 ///
4571 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4572 ///
4573 /// .value[0]?.f32: font size, in fp. Optional. The default value is <b>16.0</b>.
4574 ///
4575 /// .value[1]?.i32: font style [`ArkUI_FontStyle`]. Optional. The default value is <b>ARKUI_FONT_STYLE_NORMAL</b>.
4576 ///
4577 /// .value[2]?.i32: font weight [`ArkUI_FontWeight`]. Optional. The default value is <b>ARKUI_FONT_WEIGHT_NORMAL</b>.
4578 ///
4579 /// ?.string: font family. Multiple font families are separated by commas (,). For example, "font weight; font family 1, font family 2".
4580 ///
4581 ///
4582 ///
4583 /// Format of the return value [`ArkUI_AttributeItem`]:
4584 ///
4585 /// .value[0].f32: font size, in fp.
4586 ///
4587 /// .value[1].i32: font style [`ArkUI_FontStyle`].
4588 ///
4589 /// .value[2].i32: font weight [`ArkUI_FontWeight`].
4590 ///
4591 /// .string: font family. Multiple font families are separated by commas (,).
4592 pub const NODE_TEXT_AREA_PLACEHOLDER_FONT: ArkUI_NodeAttributeType =
4593 ArkUI_NodeAttributeType(8004);
4594}
4595#[cfg(feature = "api-12")]
4596#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4597impl ArkUI_NodeAttributeType {
4598 /// Defines the caret color attribute.
4599 /// This attribute can be set, reset, and obtained as required through APIs.
4600 ///
4601 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4602 ///
4603 /// .value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
4604 ///
4605 ///
4606 ///
4607 /// Format of the return value [`ArkUI_AttributeItem`]:
4608 ///
4609 /// .value[0].u32: background color, in 0xARGB format.
4610 pub const NODE_TEXT_AREA_CARET_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8005);
4611}
4612#[cfg(feature = "api-12")]
4613#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4614impl ArkUI_NodeAttributeType {
4615 /// Defines the editable state for the multi-line text box.
4616 /// This attribute can be set as required through APIs.
4617 ///
4618 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4619 ///
4620 /// .value[0].i32: whether to remain in the editable state. The value <b>true</b> means to remain in the
4621 /// editable state, and <b>false</b> means to exit the editable state.
4622 ///
4623 ///
4624 ///
4625 ///
4626 /// Format of the [`ArkUI_AttributeItem`] parameter for obtaining the attribute:
4627 /// .value[0].i32: whether to remain in the editable state. The value <b>true</b> means to remain in the editable
4628 /// state, and <b>false</b> means to exit the editable state.
4629 ///
4630 pub const NODE_TEXT_AREA_EDITING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8006);
4631}
4632#[cfg(feature = "api-12")]
4633#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4634impl ArkUI_NodeAttributeType {
4635 /// Defines the text box type. This attribute can be set, reset, and obtained as required through APIs.
4636 ///
4637 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4638 ///
4639 /// .value[0].i32: text box type [`ArkUI_TextAreaType`].
4640 /// The default value is <b>ARKUI_TEXTAREA_TYPE_NORMAL</b>.
4641 ///
4642 ///
4643 ///
4644 /// Format of the return value [`ArkUI_AttributeItem`]:
4645 ///
4646 /// .value[0].i32: text box type [`ArkUI_TextAreaType`].
4647 pub const NODE_TEXT_AREA_TYPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8007);
4648}
4649#[cfg(feature = "api-12")]
4650#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4651impl ArkUI_NodeAttributeType {
4652 /// Defines the counter settings. This attribute can be set, reset, and obtained as required through APIs.
4653 ///
4654 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4655 ///
4656 /// .value[0].i32: whether to show a character counter. The value <b>true</b> means to show a character counter.
4657 ///
4658 /// .value[1]?.f32: threshold percentage for displaying the character counter. The character counter is displayed
4659 /// when the number of characters that have been entered is greater than the maximum number of characters multiplied
4660 /// by the threshold percentage value. The value range is 1 to 100. If the value is a decimal, it is rounded down.
4661 ///
4662 /// .value[2]?.i32: whether to highlight the border when the number of entered characters reaches the maximum.
4663 ///
4664 ///
4665 ///
4666 /// Format of the return value [`ArkUI_AttributeItem`]:
4667 ///
4668 /// .value[0].i32: whether to show a character counter.
4669 ///
4670 /// .value[1].f32: threshold percentage for displaying the character counter. The character counter is displayed
4671 /// when the number of characters that have been entered is greater than the maximum number of characters multiplied
4672 /// by the threshold percentage value. The value range is 1 to 100.
4673 ///
4674 /// .value[2].i32: whether to highlight the border when the number of entered characters reaches the maximum.
4675 /// The default value is <b>true</b>.
4676 pub const NODE_TEXT_AREA_SHOW_COUNTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8008);
4677}
4678#[cfg(feature = "api-12")]
4679#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4680impl ArkUI_NodeAttributeType {
4681 /// Sets whether to hide the text selection menu when the text box is long-pressed, double-click,
4682 /// or right-clicked. This attribute can be set, reset, and obtained as required through APIs.
4683 ///
4684 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4685 ///
4686 /// .value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click,
4687 /// or right-clicked. The default value is <b>false</b>.
4688 ///
4689 ///
4690 ///
4691 /// Format of the return value [`ArkUI_AttributeItem`]:
4692 ///
4693 /// .value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click,
4694 /// or right-clicked.
4695 pub const NODE_TEXT_AREA_SELECTION_MENU_HIDDEN: ArkUI_NodeAttributeType =
4696 ArkUI_NodeAttributeType(8009);
4697}
4698#[cfg(feature = "api-12")]
4699#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4700impl ArkUI_NodeAttributeType {
4701 /// Sets whether the multi-line text box loses focus after the Enter key is pressed to submit information.
4702 ///
4703 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4704 ///
4705 /// .value[0].i32: whether the text box loses focus.
4706 ///
4707 ///
4708 ///
4709 /// Format of the return value [`ArkUI_AttributeItem`]:
4710 ///
4711 /// .value[0].i32: whether the text box loses focus.
4712 pub const NODE_TEXT_AREA_BLUR_ON_SUBMIT: ArkUI_NodeAttributeType =
4713 ArkUI_NodeAttributeType(8010);
4714}
4715#[cfg(feature = "api-12")]
4716#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4717impl ArkUI_NodeAttributeType {
4718 /// Sets the regular expression for input filtering.
4719 /// Only inputs that comply with the regular expression can be displayed.
4720 /// Other inputs are filtered out. The specified regular expression can match single characters,
4721 /// but not strings.
4722 ///
4723 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4724 ///
4725 /// .string: regular expression.
4726 ///
4727 ///
4728 ///
4729 /// Format of the return value [`ArkUI_AttributeItem`]:
4730 ///
4731 /// .string: regular expression.
4732 pub const NODE_TEXT_AREA_INPUT_FILTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8011);
4733}
4734#[cfg(feature = "api-12")]
4735#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4736impl ArkUI_NodeAttributeType {
4737 /// Defines the background color of the selected text.
4738 /// This attribute can be set, reset, and obtained as required through APIs.
4739 ///
4740 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4741 ///
4742 /// .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
4743 ///
4744 ///
4745 ///
4746 /// Format of the return value [`ArkUI_AttributeItem`]:
4747 ///
4748 /// .value[0].u32: color value, in 0xARGB format.
4749 pub const NODE_TEXT_AREA_SELECTED_BACKGROUND_COLOR: ArkUI_NodeAttributeType =
4750 ArkUI_NodeAttributeType(8012);
4751}
4752#[cfg(feature = "api-12")]
4753#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4754impl ArkUI_NodeAttributeType {
4755 /// Defines the type of the Enter key.
4756 /// This attribute can be set, reset, and obtained as required through APIs.
4757 ///
4758 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4759 ///
4760 /// .value[0].i32: type of the Enter key[`ArkUI_EnterKeyType`]. The default value is <b>ARKUI_ENTER_KEY_TYPE_DONE</b>.
4761 ///
4762 ///
4763 ///
4764 /// Format of the return value [`ArkUI_AttributeItem`]:
4765 ///
4766 /// .value[0].i32: type of the Enter key[`ArkUI_EnterKeyType`].
4767 pub const NODE_TEXT_AREA_ENTER_KEY_TYPE: ArkUI_NodeAttributeType =
4768 ArkUI_NodeAttributeType(8013);
4769}
4770#[cfg(feature = "api-12")]
4771#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4772impl ArkUI_NodeAttributeType {
4773 /// Defines whether to enable the input method when the component obtains focus.
4774 /// This attribute can be set, reset, and obtained as required through APIs.
4775 ///
4776 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4777 ///
4778 /// .value[0].i32: whether to enable the input method when the component obtains focus.
4779 /// The value <b>true</b> means to enable the input method, and <b>false</b> means the opposite.
4780 ///
4781 ///
4782 ///
4783 ///
4784 /// Format of the return value [`ArkUI_AttributeItem`]:
4785 ///
4786 /// .value[0].i32: The value <b>1</b> means to enable the input method when the component obtains focus,
4787 /// and <b>0</b> means the opposite.
4788 pub const NODE_TEXT_AREA_ENABLE_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType =
4789 ArkUI_NodeAttributeType(8014);
4790}
4791#[cfg(feature = "api-12")]
4792#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4793impl ArkUI_NodeAttributeType {
4794 /// Defines whether to enable the input method when the component obtains focus.
4795 /// This attribute can be set, reset, and obtained as required through APIs.
4796 ///
4797 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4798 ///
4799 /// .value[0].i32: whether to enable the input method when the component obtains focus.
4800 /// The value <b>true</b> means to enable the input method, and <b>false</b> means the opposite.
4801 ///
4802 ///
4803 ///
4804 ///
4805 /// Format of the return value [`ArkUI_AttributeItem`]:
4806 ///
4807 /// .value[0].i32: The value <b>1</b> means to enable the input method when the component obtains focus,
4808 /// and <b>0</b> means the opposite.
4809 pub const NODE_TEXT_AREA_CARET_OFFSET: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8015);
4810}
4811#[cfg(feature = "api-12")]
4812#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4813impl ArkUI_NodeAttributeType {
4814 /// Obtains the position of the edited text area relative to the component and its size.
4815 ///
4816 /// Format of the return value [`ArkUI_AttributeItem`]:
4817 ///
4818 /// .value[0].f32: horizontal coordinate.
4819 ///
4820 /// .value[1].f32: vertical coordinate.
4821 ///
4822 /// .value[2].f32: content width.
4823 ///
4824 /// .value[3].f32: content height.
4825 pub const NODE_TEXT_AREA_CONTENT_RECT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8016);
4826}
4827#[cfg(feature = "api-12")]
4828#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4829impl ArkUI_NodeAttributeType {
4830 /// Obtains the number of lines of the edited text.
4831 ///
4832 /// Format of the return value [`ArkUI_AttributeItem`]:
4833 ///
4834 /// .value[0].i32: number of lines of the edited text.
4835 pub const NODE_TEXT_AREA_CONTENT_LINE_COUNT: ArkUI_NodeAttributeType =
4836 ArkUI_NodeAttributeType(8017);
4837}
4838#[cfg(feature = "api-12")]
4839#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4840impl ArkUI_NodeAttributeType {
4841 /// Sets the text selection area, which will be highlighted.
4842 /// This attribute can be set, reset, and obtained as required through APIs.
4843 ///
4844 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4845 ///
4846 /// .value[0].i32: start position of the text selection.
4847 ///
4848 /// .value[1].i32: end position of the text selection.
4849 ///
4850 ///
4851 ///
4852 /// Format of the return value [`ArkUI_AttributeItem`]:
4853 ///
4854 /// .value[0].i32: start position of the text selection.
4855 ///
4856 /// .value[1].i32: end position of the text selection.
4857 pub const NODE_TEXT_AREA_TEXT_SELECTION: ArkUI_NodeAttributeType =
4858 ArkUI_NodeAttributeType(8018);
4859}
4860#[cfg(feature = "api-12")]
4861#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4862impl ArkUI_NodeAttributeType {
4863 /// Sets whether to enable autofill.
4864 ///
4865 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4866 ///
4867 /// .value[0].i32: whether to enable autofill. The default value is <b>true</b>.
4868 ///
4869 ///
4870 ///
4871 /// Format of the return value [`ArkUI_AttributeItem`]:
4872 ///
4873 /// .value[0].i32: whether to enable autofill.
4874 pub const NODE_TEXT_AREA_ENABLE_AUTO_FILL: ArkUI_NodeAttributeType =
4875 ArkUI_NodeAttributeType(8019);
4876}
4877#[cfg(feature = "api-12")]
4878#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4879impl ArkUI_NodeAttributeType {
4880 /// Sets the autofill type.
4881 ///
4882 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4883 ///
4884 /// .value[0].i32: autofill type. The parameter type is [`ArkUI_TextInputContentType`].
4885 ///
4886 ///
4887 ///
4888 /// Format of the return value [`ArkUI_AttributeItem`]:
4889 ///
4890 /// .value[0].i32: autofill type. The parameter type is [`ArkUI_TextInputContentType`].
4891 pub const NODE_TEXT_AREA_CONTENT_TYPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(8020);
4892}
4893#[cfg(feature = "api-12")]
4894#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4895impl ArkUI_NodeAttributeType {
4896 /// Sets whether the keyboard pops up when the input box gains focus.
4897 /// It supports property setting, property reset and property acquisition interfaces.
4898 ///
4899 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
4900 ///
4901 /// .value[0].i32: Whether to pop up the keyboard.
4902 ///
4903 ///
4904 ///
4905 /// Attribute acquisition method return value [`ArkUI_AttributeItem`] format:
4906 ///
4907 /// .value[0].i32: Whether to pop up the keyboard.
4908 pub const NODE_TEXT_AREA_SHOW_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType =
4909 ArkUI_NodeAttributeType(8021);
4910}
4911#[cfg(feature = "api-12")]
4912#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4913impl ArkUI_NodeAttributeType {
4914 /// When this property is set, the height of the textArea component is calculated using this property.
4915 ///
4916 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4917 ///
4918 /// .value[0].i32: set the value of numberOfLines.
4919 ///
4920 ///
4921 ///
4922 /// Format of the return value [`ArkUI_AttributeItem`]:
4923 ///
4924 /// .value[0].i32: Set the value of numberOfLines
4925 pub const NODE_TEXT_AREA_NUMBER_OF_LINES: ArkUI_NodeAttributeType =
4926 ArkUI_NodeAttributeType(8022);
4927}
4928#[cfg(feature = "api-12")]
4929#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4930impl ArkUI_NodeAttributeType {
4931 /// Defines the button text content. This attribute can be set, reset, and obtained as required through APIs.
4932 ///
4933 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4934 ///
4935 /// .string: default text content.
4936 ///
4937 ///
4938 ///
4939 /// Format of the return value [`ArkUI_AttributeItem`]:
4940 ///
4941 /// .string: default text content.
4942 pub const NODE_BUTTON_LABEL: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(9000);
4943}
4944#[cfg(feature = "api-12")]
4945#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4946impl ArkUI_NodeAttributeType {
4947 /// Sets the button type. This attribute can be set, reset, and obtained as required through APIs.
4948 ///
4949 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4950 ///
4951 /// .value[0].i32: button type. The parameter type is [`ArkUI_ButtonType`].
4952 /// The default value is <b>ARKUI_BUTTON_TYPE_CAPSULE</b>.
4953 ///
4954 ///
4955 ///
4956 /// Format of the return value [`ArkUI_AttributeItem`]:
4957 ///
4958 /// .value[0].i32: button type. The parameter type is [`ArkUI_ButtonType`].
4959 /// The default value is <b>ARKUI_BUTTON_TYPE_CAPSULE</b>.
4960 pub const NODE_BUTTON_TYPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(9001);
4961}
4962#[cfg(feature = "api-12")]
4963#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4964impl ArkUI_NodeAttributeType {
4965 /// Defines the current value of the progress indicator.
4966 /// This attribute can be set, reset, and obtained as required through APIs.
4967 ///
4968 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4969 ///
4970 /// .value[0].f32: current value of the progress indicator.
4971 ///
4972 ///
4973 ///
4974 /// Format of the return value [`ArkUI_AttributeItem`]:
4975 ///
4976 /// .value[0].f32: current value of the progress indicator.
4977 pub const NODE_PROGRESS_VALUE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(10000);
4978}
4979#[cfg(feature = "api-12")]
4980#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4981impl ArkUI_NodeAttributeType {
4982 /// Defines the total value of the progress indicator.
4983 /// This attribute can be set, reset, and obtained as required through APIs.
4984 ///
4985 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
4986 ///
4987 /// .value[0].f32: total value of the progress indicator.
4988 ///
4989 ///
4990 ///
4991 /// Format of the return value [`ArkUI_AttributeItem`]:
4992 ///
4993 /// .value[0].f32: total value of the progress indicator.
4994 pub const NODE_PROGRESS_TOTAL: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(10001);
4995}
4996#[cfg(feature = "api-12")]
4997#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
4998impl ArkUI_NodeAttributeType {
4999 /// Defines the color for the progress value on the progress indicator.
5000 /// This attribute can be set, reset, and obtained as required through APIs.
5001 ///
5002 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5003 ///
5004 /// .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
5005 ///
5006 ///
5007 ///
5008 /// Format of the return value [`ArkUI_AttributeItem`]:
5009 ///
5010 /// .value[0].u32: color value, in 0xARGB format.
5011 pub const NODE_PROGRESS_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(10002);
5012}
5013#[cfg(feature = "api-12")]
5014#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5015impl ArkUI_NodeAttributeType {
5016 /// Defines the type of the progress indicator.
5017 /// This attribute can be set, reset, and obtained as required through APIs.
5018 ///
5019 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5020 ///
5021 /// .value[0].i32: type of the progress indicator [`ArkUI_ProgressType`].
5022 /// The default value is <b>ARKUI_PROGRESS_TYPE_LINEAR</b>.
5023 ///
5024 ///
5025 ///
5026 /// Format of the return value [`ArkUI_AttributeItem`]:
5027 ///
5028 /// .value[0].i32: type of the progress indicator [`ArkUI_ProgressType`].
5029 pub const NODE_PROGRESS_TYPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(10003);
5030}
5031#[cfg(feature = "api-12")]
5032#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5033impl ArkUI_NodeAttributeType {
5034 /// Defines whether the check box is selected.
5035 /// This attribute can be set, reset, and obtained as required through APIs.
5036 ///
5037 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5038 ///
5039 /// .value[0].i32: whether the check box is selected.
5040 /// The value <b>1</b> means that the check box is selected, and <b>0</b> means the opposite.
5041 ///
5042 ///
5043 ///
5044 /// Format of the return value [`ArkUI_AttributeItem`]:
5045 ///
5046 /// .value[0].i32: The value <b>1</b> means that the check box is selected, and <b>0</b> means the opposite.
5047 pub const NODE_CHECKBOX_SELECT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(11000);
5048}
5049#[cfg(feature = "api-12")]
5050#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5051impl ArkUI_NodeAttributeType {
5052 /// Defines the color of the check box when it is selected.
5053 /// This attribute can be set, reset, and obtained as required through APIs.
5054 ///
5055 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5056 ///
5057 /// .value[0].u32: color of the check box when it is selected, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5058 ///
5059 ///
5060 ///
5061 /// Format of the return value [`ArkUI_AttributeItem`]:
5062 ///
5063 /// .value[0].u32: color of the check box when it is selected, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5064 pub const NODE_CHECKBOX_SELECT_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(11001);
5065}
5066#[cfg(feature = "api-12")]
5067#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5068impl ArkUI_NodeAttributeType {
5069 /// Defines the border color of the check box when it is not selected.
5070 /// This attribute can be set, reset, and obtained as required through APIs.
5071 ///
5072 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5073 ///
5074 /// .value[0].u32: border color, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5075 ///
5076 ///
5077 ///
5078 /// Format of the return value [`ArkUI_AttributeItem`]:
5079 ///
5080 /// .value[0].u32: border color, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5081 pub const NODE_CHECKBOX_UNSELECT_COLOR: ArkUI_NodeAttributeType =
5082 ArkUI_NodeAttributeType(11002);
5083}
5084#[cfg(feature = "api-12")]
5085#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5086impl ArkUI_NodeAttributeType {
5087 /// Defines the internal icon style of the check box.
5088 /// This attribute can be set, reset, and obtained as required through APIs.
5089 ///
5090 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5091 ///
5092 /// .value[0].u32: border color, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5093 ///
5094 /// .value[1]?.f32: size of the internal mark, in vp. Optional.
5095 ///
5096 /// .value[2]?.f32: stroke width of the internal mark, in vp. Optional. The default value is <b>2</b>.
5097 ///
5098 ///
5099 ///
5100 /// Format of the return value [`ArkUI_AttributeItem`]:
5101 ///
5102 /// .value[0].u32: border color, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5103 ///
5104 /// .value[1].f32: size of the internal mark, in vp.
5105 ///
5106 /// .value[2].f32: stroke width of the internal mark, in vp. The default value is <b>2</b>.
5107 pub const NODE_CHECKBOX_MARK: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(11003);
5108}
5109#[cfg(feature = "api-12")]
5110#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5111impl ArkUI_NodeAttributeType {
5112 /// Defines the shape of the check box.
5113 /// This attribute can be set, reset, and obtained as required through APIs.
5114 ///
5115 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5116 ///
5117 /// .value[0].i32: component shape. The parameter type is [`ArkUI_CheckboxShape`].
5118 ///
5119 ///
5120 ///
5121 /// Format of the return value [`ArkUI_AttributeItem`]:
5122 ///
5123 /// .value[0].i32: component shape. The parameter type is [`ArkUI_CheckboxShape`].
5124 pub const NODE_CHECKBOX_SHAPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(11004);
5125}
5126#[cfg(feature = "api-12")]
5127#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5128impl ArkUI_NodeAttributeType {
5129 /// Defines the ID of the <b><XComponent></b> component.
5130 /// This attribute can be set and obtained as required through APIs.
5131 ///
5132 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5133 ///
5134 /// .string: component ID.
5135 ///
5136 ///
5137 ///
5138 /// Format of the return value [`ArkUI_AttributeItem`]:
5139 ///
5140 /// .string: component ID.
5141 pub const NODE_XCOMPONENT_ID: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(12000);
5142}
5143#[cfg(feature = "api-12")]
5144#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5145impl ArkUI_NodeAttributeType {
5146 /// Defines the type of the <b><XComponent></b> component.
5147 /// This attribute can be set, reset, and obtained as required through APIs.
5148 ///
5149 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5150 ///
5151 /// .value[0].i32: type [`ArkUI_XComponentType`]. The default value is <b>ARKUI_XCOMPONENT_TYPE_SURFACE</b>.
5152 ///
5153 ///
5154 ///
5155 /// Format of the return value [`ArkUI_AttributeItem`]:
5156 ///
5157 /// .value[0].i32: type [`ArkUI_XComponentType`].
5158 pub const NODE_XCOMPONENT_TYPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(12001);
5159}
5160#[cfg(feature = "api-12")]
5161#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5162impl ArkUI_NodeAttributeType {
5163 /// Defines the width and height of the <b><XComponent></b> component.
5164 /// This attribute can be set and obtained as required through APIs.
5165 ///
5166 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5167 ///
5168 /// .value[0].u32: width, in px.
5169 ///
5170 /// .value[1].u32: height, in px.
5171 ///
5172 ///
5173 ///
5174 /// Format of the return value [`ArkUI_AttributeItem`]:
5175 ///
5176 /// .value[0].u32: width, in px.
5177 ///
5178 /// .value[1].u32: height, in px.
5179 pub const NODE_XCOMPONENT_SURFACE_SIZE: ArkUI_NodeAttributeType =
5180 ArkUI_NodeAttributeType(12002);
5181}
5182#[cfg(feature = "api-12")]
5183#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5184impl ArkUI_NodeAttributeType {
5185 /// Defines whether to display the lunar calendar in the date picker.
5186 /// This attribute can be set, reset, and obtained as required through APIs.
5187 ///
5188 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5189 ///
5190 /// .value[0].i32: whether to display the lunar calendar in the date picker. The default value is <b>false</b>.
5191 ///
5192 ///
5193 ///
5194 /// Format of the return value [`ArkUI_AttributeItem`]:
5195 ///
5196 /// .value[0].i32: whether to display the lunar calendar in the date picker.
5197 pub const NODE_DATE_PICKER_LUNAR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(13000);
5198}
5199#[cfg(feature = "api-12")]
5200#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5201impl ArkUI_NodeAttributeType {
5202 /// Defines the start date of the date picker.
5203 /// This attribute can be set, reset, and obtained as required through APIs.
5204 ///
5205 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5206 ///
5207 /// .string: date. The default value is <b>"1970-1-1"</b>.
5208 ///
5209 ///
5210 ///
5211 /// Format of the return value [`ArkUI_AttributeItem`]:
5212 ///
5213 /// .string: date.
5214 pub const NODE_DATE_PICKER_START: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(13001);
5215}
5216#[cfg(feature = "api-12")]
5217#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5218impl ArkUI_NodeAttributeType {
5219 /// Defines the end date of the date picker.
5220 /// This attribute can be set, reset, and obtained as required through APIs.
5221 ///
5222 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5223 ///
5224 /// .string: date. The default value is <b>"2100-12-31"</b>.
5225 ///
5226 ///
5227 ///
5228 /// Format of the return value [`ArkUI_AttributeItem`]:
5229 ///
5230 /// .string: date.
5231 pub const NODE_DATE_PICKER_END: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(13002);
5232}
5233#[cfg(feature = "api-12")]
5234#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5235impl ArkUI_NodeAttributeType {
5236 /// Defines the selected date of the date picker.
5237 /// This attribute can be set, reset, and obtained as required through APIs.
5238 ///
5239 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5240 ///
5241 /// .string: date. The default value is <b>"2024-01-22"</b>.
5242 ///
5243 ///
5244 ///
5245 /// Format of the return value [`ArkUI_AttributeItem`]:
5246 ///
5247 /// .string: date.
5248 pub const NODE_DATE_PICKER_SELECTED: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(13003);
5249}
5250#[cfg(feature = "api-12")]
5251#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5252impl ArkUI_NodeAttributeType {
5253 /// Defines the font color, font size, and font weight for the top and bottom items in the date picker.
5254 /// This attribute can be set, reset, and obtained as required through APIs.
5255 ///
5256 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5257 ///
5258 /// .string: array of five parameters of the string type, separated by semicolons (;).
5259 ///
5260 /// Parameter 1: font color, in #ARGB format.
5261 ///
5262 /// Parameter 2: font size, in fp. The value is a number.
5263 ///
5264 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5265 /// .
5266 /// Parameter 4: fonts, separated by commas (,).
5267 ///
5268 /// Parameter 5: font style. Available options are ("normal", "italic").
5269 ///
5270 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5271 ///
5272 ///
5273 ///
5274 /// Format of the return value [`ArkUI_AttributeItem`]:
5275 ///
5276 /// .string: array of five parameters of the string type, separated by semicolons (;).
5277 ///
5278 /// Parameter 1: font color, in #ARGB format.
5279 ///
5280 /// Parameter 2: font size, in fp. The value is a number.
5281 ///
5282 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5283 /// .
5284 /// Parameter 4: fonts, separated by commas (,).
5285 ///
5286 /// Parameter 5: font style. Available options are ("normal", "italic").
5287 ///
5288 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5289 pub const NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE: ArkUI_NodeAttributeType =
5290 ArkUI_NodeAttributeType(13004);
5291}
5292#[cfg(feature = "api-12")]
5293#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5294impl ArkUI_NodeAttributeType {
5295 /// Defines the font color, font size, and font weight of all items except the top, bottom, and selected
5296 /// items in the date picker. This attribute can be set, reset, and obtained as required through APIs.
5297 ///
5298 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5299 ///
5300 /// .string: array of five parameters of the string type, separated by semicolons (;).
5301 ///
5302 /// Parameter 1: font color, in #ARGB format.
5303 ///
5304 /// Parameter 2: font size, in fp. The value is a number.
5305 ///
5306 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5307 /// .
5308 /// Parameter 4: fonts, separated by commas (,).
5309 ///
5310 /// Parameter 5: font style. Available options are ("normal", "italic").
5311 ///
5312 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5313 ///
5314 ///
5315 ///
5316 /// Format of the return value [`ArkUI_AttributeItem`]:
5317 ///
5318 /// .string: array of five parameters of the string type, separated by semicolons (;).
5319 ///
5320 /// Parameter 1: font color, in #ARGB format.
5321 ///
5322 /// Parameter 2: font size, in fp. The value is a number.
5323 ///
5324 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5325 /// .
5326 /// Parameter 4: fonts, separated by commas (,).
5327 ///
5328 /// Parameter 5: font style. Available options are ("normal", "italic").
5329 ///
5330 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5331 pub const NODE_DATE_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(13005);
5332}
5333#[cfg(feature = "api-12")]
5334#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5335impl ArkUI_NodeAttributeType {
5336 /// Defines the font color, font size, and font weight of the selected item in the date picker.
5337 /// This attribute can be set, reset, and obtained as required through APIs.
5338 ///
5339 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5340 ///
5341 /// .string: array of five parameters of the string type, separated by semicolons (;).
5342 ///
5343 /// Parameter 1: font color, in #ARGB format.
5344 ///
5345 /// Parameter 2: font size, in fp. The value is a number.
5346 ///
5347 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5348 /// .
5349 /// Parameter 4: fonts, separated by commas (,).
5350 ///
5351 /// Parameter 5: font style. Available options are ("normal", "italic").
5352 ///
5353 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5354 ///
5355 ///
5356 ///
5357 /// Format of the return value [`ArkUI_AttributeItem`]:
5358 ///
5359 /// .string: array of five parameters of the string type, separated by semicolons (;).
5360 ///
5361 /// Parameter 1: font color, in #ARGB format.
5362 ///
5363 /// Parameter 2: font size, in fp. The value is a number.
5364 ///
5365 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5366 /// .
5367 /// Parameter 4: fonts, separated by commas (,).
5368 ///
5369 /// Parameter 5: font style. Available options are ("normal", "italic").
5370 ///
5371 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5372 pub const NODE_DATE_PICKER_SELECTED_TEXT_STYLE: ArkUI_NodeAttributeType =
5373 ArkUI_NodeAttributeType(13006);
5374}
5375#[cfg(feature = "api-12")]
5376#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5377impl ArkUI_NodeAttributeType {
5378 /// Defines the time of the selected item. in the timer picker.
5379 /// This attribute can be set, reset, and obtained as required through APIs.
5380 ///
5381 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5382 ///
5383 /// .string: time. The default value is the current system time.
5384 ///
5385 ///
5386 ///
5387 /// Format of the return value [`ArkUI_AttributeItem`]:
5388 ///
5389 /// .string: time.
5390 pub const NODE_TIME_PICKER_SELECTED: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(14000);
5391}
5392#[cfg(feature = "api-12")]
5393#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5394impl ArkUI_NodeAttributeType {
5395 /// Defines whether the display time is in 24-hour format.
5396 /// This attribute can be set, reset, and obtained as required through APIs.
5397 ///
5398 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5399 ///
5400 /// .value[0].i32: whether the display time is in 24-hour format. The default value is <b>false</b>.
5401 ///
5402 ///
5403 ///
5404 /// Format of the return value [`ArkUI_AttributeItem`]:
5405 ///
5406 /// .value[0].i32: whether the display time is in 24-hour format.
5407 pub const NODE_TIME_PICKER_USE_MILITARY_TIME: ArkUI_NodeAttributeType =
5408 ArkUI_NodeAttributeType(14001);
5409}
5410#[cfg(feature = "api-12")]
5411#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5412impl ArkUI_NodeAttributeType {
5413 /// Defines the font color, font size, and font weight for the top and bottom items in the time picker.
5414 /// This attribute can be set, reset, and obtained as required through APIs.
5415 ///
5416 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5417 ///
5418 /// .string: array of five parameters of the string type, separated by semicolons (;).
5419 ///
5420 /// Parameter 1: font color, in #ARGB format.
5421 ///
5422 /// Parameter 2: font size, in fp. The value is a number.
5423 ///
5424 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5425 /// .
5426 /// Parameter 4: fonts, separated by commas (,).
5427 ///
5428 /// Parameter 5: font style. Available options are ("normal", "italic").
5429 ///
5430 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5431 ///
5432 ///
5433 ///
5434 /// Format of the return value [`ArkUI_AttributeItem`]:
5435 ///
5436 /// .string: array of five parameters of the string type, separated by semicolons (;).
5437 ///
5438 /// Parameter 1: font color, in #ARGB format.
5439 ///
5440 /// Parameter 2: font size, in fp. The value is a number.
5441 ///
5442 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5443 /// .
5444 /// Parameter 4: fonts, separated by commas (,).
5445 ///
5446 /// Parameter 5: font style. Available options are ("normal", "italic").
5447 ///
5448 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5449 pub const NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE: ArkUI_NodeAttributeType =
5450 ArkUI_NodeAttributeType(14002);
5451}
5452#[cfg(feature = "api-12")]
5453#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5454impl ArkUI_NodeAttributeType {
5455 /// Defines the font color, font size, and font weight of all items except the top, bottom, and selected items
5456 /// in the time picker. This attribute can be set, reset, and obtained as required through APIs.
5457 ///
5458 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5459 ///
5460 /// .string: array of five parameters of the string type, separated by semicolons (;).
5461 ///
5462 /// Parameter 1: font color, in #ARGB format.
5463 ///
5464 /// Parameter 2: font size, in fp. The value is a number.
5465 ///
5466 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5467 /// .
5468 /// Parameter 4: fonts, separated by commas (,).
5469 ///
5470 /// Parameter 5: font style. Available options are ("normal", "italic").
5471 ///
5472 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5473 ///
5474 ///
5475 ///
5476 /// Format of the return value [`ArkUI_AttributeItem`]:
5477 ///
5478 /// .string: array of five parameters of the string type, separated by semicolons (;).
5479 ///
5480 /// Parameter 1: font color, in #ARGB format.
5481 ///
5482 /// Parameter 2: font size, in fp. The value is a number.
5483 ///
5484 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5485 /// .
5486 /// Parameter 4: fonts, separated by commas (,).
5487 ///
5488 /// Parameter 5: font style. Available options are ("normal", "italic").
5489 ///
5490 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5491 pub const NODE_TIME_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(14003);
5492}
5493#[cfg(feature = "api-12")]
5494#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5495impl ArkUI_NodeAttributeType {
5496 /// Defines the font color, font size, and font weight of the selected item in the time picker.
5497 /// This attribute can be set, reset, and obtained as required through APIs.
5498 ///
5499 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5500 ///
5501 /// .string: array of five parameters of the string type, separated by semicolons (;).
5502 ///
5503 /// Parameter 1: font color, in #ARGB format.
5504 ///
5505 /// Parameter 2: font size, in fp. The value is a number.
5506 ///
5507 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5508 /// .
5509 /// Parameter 4: fonts, separated by commas (,).
5510 ///
5511 /// Parameter 5: font style. Available options are ("normal", "italic").
5512 ///
5513 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5514 ///
5515 ///
5516 ///
5517 /// Format of the return value [`ArkUI_AttributeItem`]:
5518 ///
5519 /// .string: array of five parameters of the string type, separated by semicolons (;).
5520 ///
5521 /// Parameter 1: font color, in #ARGB format.
5522 ///
5523 /// Parameter 2: font size, in fp. The value is a number.
5524 ///
5525 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5526 /// .
5527 /// Parameter 4: fonts, separated by commas (,).
5528 ///
5529 /// Parameter 5: font style. Available options are ("normal", "italic").
5530 ///
5531 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5532 pub const NODE_TIME_PICKER_SELECTED_TEXT_STYLE: ArkUI_NodeAttributeType =
5533 ArkUI_NodeAttributeType(14004);
5534}
5535#[cfg(feature = "api-12")]
5536#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5537impl ArkUI_NodeAttributeType {
5538 /// Defines the data selection range of the text picker.
5539 /// This attribute can be set, reset, and obtained as required through APIs.
5540 ///
5541 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5542 ///
5543 /// .value[0].i32: type of the text picker [`ArkUI_TextPickerRangeType`].
5544 /// The default value is <b>ARKUI_TEXTPICKER_RANGETYPE_SINGLE</b>.
5545 ///
5546 /// ?.string: string input, whose format varies by picker type.
5547 ///
5548 /// 1: single-column picker. The input format is a group of strings separated by semicolons (;).
5549 ///
5550 /// 2: multi-column picker. Multiple pairs of plain text strings are supported. The pairs are separated by
5551 /// semicolons (;), and strings within each pair are separated by commas (,).
5552 ///
5553 /// ?.object: Object input, whose format varies by picker type.
5554 ///
5555 /// 1: single-column picker with image support. The input structure is [`ARKUI_TextPickerRangeContent`].
5556 ///
5557 /// 2: multi-column interconnected picker. The input structure is [`ARKUI_TextPickerCascadeRangeContent`].
5558 ///
5559 ///
5560 ///
5561 /// Format of the return value [`ArkUI_AttributeItem`]:
5562 ///
5563 /// .value[0].i32: type of the text picker [`ArkUI_TextPickerRangeType`].
5564 ///
5565 /// ?.string: string output, whose format varies by picker type.
5566 ///
5567 /// 1: single-column picker. The output format is a group of strings separated by semicolons (;).
5568 ///
5569 /// 2: multi-column picker. Multiple pairs of plain text strings are supported. The pairs are separated by
5570 /// semicolons (;), and strings within each pair are separated by commas (,).
5571 ///
5572 /// ?.string: Object output, whose format varies by picker type.
5573 ///
5574 /// 1: single-column picker with image support. The output structure is [`ARKUI_TextPickerRangeContent`].
5575 ///
5576 /// 2: multi-column interconnected picker. The output structure is [`ARKUI_TextPickerCascadeRangeContent`].
5577 pub const NODE_TEXT_PICKER_OPTION_RANGE: ArkUI_NodeAttributeType =
5578 ArkUI_NodeAttributeType(15000);
5579}
5580#[cfg(feature = "api-12")]
5581#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5582impl ArkUI_NodeAttributeType {
5583 /// Defines the index of the default selected item in the data selection range of the text picker.
5584 /// This attribute can be set, reset, and obtained as required through APIs.
5585 ///
5586 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5587 ///
5588 /// .value[0].u32: index. If there are multiple index values, add them one by one.
5589 ///
5590 ///
5591 ///
5592 /// Format of the return value [`ArkUI_AttributeItem`]:
5593 ///
5594 /// .value[0].u32: index. If there are multiple index values, add them one by one.
5595 pub const NODE_TEXT_PICKER_OPTION_SELECTED: ArkUI_NodeAttributeType =
5596 ArkUI_NodeAttributeType(15001);
5597}
5598#[cfg(feature = "api-12")]
5599#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5600impl ArkUI_NodeAttributeType {
5601 /// Defines the value of the default selected item in the text picker.
5602 /// This attribute can be set, reset, and obtained as required through APIs.
5603 ///
5604 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5605 ///
5606 /// .string: value of the selected item. If there are multiple values, add them one by one and
5607 /// separate them with semicolons (;).
5608 ///
5609 ///
5610 ///
5611 /// Format of the return value [`ArkUI_AttributeItem`]:
5612 ///
5613 /// .string: value of the selected item. If there are multiple values, add them one by one and
5614 /// separate them with semicolons (;).
5615 pub const NODE_TEXT_PICKER_OPTION_VALUE: ArkUI_NodeAttributeType =
5616 ArkUI_NodeAttributeType(15002);
5617}
5618#[cfg(feature = "api-12")]
5619#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5620impl ArkUI_NodeAttributeType {
5621 /// Defines the font color, font size, and font weight for the top and bottom items in the text picker.
5622 /// This attribute can be set, reset, and obtained as required through APIs.
5623 ///
5624 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5625 ///
5626 /// .string: array of five parameters of the string type, separated by semicolons (;).
5627 ///
5628 /// Parameter 1: font color, in #ARGB format.
5629 ///
5630 /// Parameter 2: font size, in fp. The value is a number.
5631 ///
5632 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5633 /// .
5634 /// Parameter 4: fonts, separated by commas (,).
5635 ///
5636 /// Parameter 5: font style. Available options are ("normal", "italic").
5637 ///
5638 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5639 ///
5640 ///
5641 ///
5642 /// Format of the return value [`ArkUI_AttributeItem`]:
5643 ///
5644 /// .string: array of five parameters of the string type, separated by semicolons (;).
5645 ///
5646 /// Parameter 1: font color, in #ARGB format.
5647 ///
5648 /// Parameter 2: font size, in fp. The value is a number.
5649 ///
5650 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5651 /// .
5652 /// Parameter 4: fonts, separated by commas (,).
5653 ///
5654 /// Parameter 5: font style. Available options are ("normal", "italic").
5655 ///
5656 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5657 pub const NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE: ArkUI_NodeAttributeType =
5658 ArkUI_NodeAttributeType(15003);
5659}
5660#[cfg(feature = "api-12")]
5661#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5662impl ArkUI_NodeAttributeType {
5663 /// Defines the font color, font size, and font weight for all items except the top, bottom, and selected
5664 /// items in the text picker. This attribute can be set, reset, and obtained as required through APIs.
5665 ///
5666 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5667 ///
5668 /// .string: array of five parameters of the string type, separated by semicolons (;).
5669 ///
5670 /// Parameter 1: font color, in #ARGB format.
5671 ///
5672 /// Parameter 2: font size, in fp. The value is a number.
5673 ///
5674 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5675 /// .
5676 /// Parameter 4: fonts, separated by commas (,).
5677 ///
5678 /// Parameter 5: font style. Available options are ("normal", "italic").
5679 ///
5680 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5681 ///
5682 ///
5683 ///
5684 /// Format of the return value [`ArkUI_AttributeItem`]:
5685 ///
5686 /// .string: array of five parameters of the string type, separated by semicolons (;).
5687 ///
5688 /// Parameter 1: font color, in #ARGB format.
5689 ///
5690 /// Parameter 2: font size, in fp. The value is a number.
5691 ///
5692 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5693 /// .
5694 /// Parameter 4: fonts, separated by commas (,).
5695 ///
5696 /// Parameter 5: font style. Available options are ("normal", "italic").
5697 ///
5698 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5699 pub const NODE_TEXT_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(15004);
5700}
5701#[cfg(feature = "api-12")]
5702#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5703impl ArkUI_NodeAttributeType {
5704 /// Defines the font color, font size, and font weight for the selected item in the text picker.
5705 /// This attribute can be set, reset, and obtained as required through APIs.
5706 ///
5707 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5708 ///
5709 /// .string: array of five parameters of the string type, separated by semicolons (;).
5710 ///
5711 /// Parameter 1: font color, in #ARGB format.
5712 ///
5713 /// Parameter 2: font size, in fp. The value is a number.
5714 ///
5715 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5716 /// .
5717 /// Parameter 4: fonts, separated by commas (,).
5718 ///
5719 /// Parameter 5: font style. Available options are ("normal", "italic").
5720 ///
5721 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5722 ///
5723 ///
5724 ///
5725 /// Format of the return value [`ArkUI_AttributeItem`]:
5726 ///
5727 /// .string: array of five parameters of the string type, separated by semicolons (;).
5728 ///
5729 /// Parameter 1: font color, in #ARGB format.
5730 ///
5731 /// Parameter 2: font size, in fp. The value is a number.
5732 ///
5733 /// Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
5734 /// .
5735 /// Parameter 4: fonts, separated by commas (,).
5736 ///
5737 /// Parameter 5: font style. Available options are ("normal", "italic").
5738 ///
5739 /// Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
5740 pub const NODE_TEXT_PICKER_SELECTED_TEXT_STYLE: ArkUI_NodeAttributeType =
5741 ArkUI_NodeAttributeType(15005);
5742}
5743#[cfg(feature = "api-12")]
5744#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5745impl ArkUI_NodeAttributeType {
5746 /// Defines the index of the default selected item in the data selection range of the text picker.
5747 /// This attribute can be set, reset, and obtained as required through APIs.
5748 ///
5749 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5750 ///
5751 /// .value[0...].i32: index of the default item in the data selection range.
5752 pub const NODE_TEXT_PICKER_SELECTED_INDEX: ArkUI_NodeAttributeType =
5753 ArkUI_NodeAttributeType(15006);
5754}
5755#[cfg(feature = "api-12")]
5756#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5757impl ArkUI_NodeAttributeType {
5758 /// Defines whether to support scroll looping for the text picker.
5759 /// This attribute can be set, reset, and obtained as required through APIs.
5760 ///
5761 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5762 ///
5763 /// .value[0].i32: whether to support scroll looping. The value <b>true</b> means to support scroll looping, and
5764 /// <b>false</b> means the opposite.
5765 ///
5766 ///
5767 ///
5768 ///
5769 /// Format of the return value [`ArkUI_AttributeItem`]:
5770 ///
5771 /// value[0].i32: The value <b>1</b> means to support scroll looping, and <b>0</b> means the opposite.
5772 pub const NODE_TEXT_PICKER_CAN_LOOP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(15007);
5773}
5774#[cfg(feature = "api-12")]
5775#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5776impl ArkUI_NodeAttributeType {
5777 /// Defines the height of each item in the picker. This attribute can be set, reset, and obtained as required
5778 /// through APIs.
5779 ///
5780 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5781 ///
5782 /// .value[0].f32: item height, in vp.
5783 ///
5784 ///
5785 ///
5786 /// Format of the return value [`ArkUI_AttributeItem`]:
5787 ///
5788 /// value[0].f32: item height, in vp.
5789 pub const NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT: ArkUI_NodeAttributeType =
5790 ArkUI_NodeAttributeType(15008);
5791}
5792#[cfg(feature = "api-12")]
5793#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5794impl ArkUI_NodeAttributeType {
5795 /// Defines the style of the background in the selected state of the calendar picker.
5796 /// This attribute can be set, reset, and obtained as required through APIs.
5797 ///
5798 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5799 ///
5800 /// .value[0].f32: style of the background in the selected state of the calendar picker.
5801 /// The value range is [0, +∞). If the value is <b>0</b>, the background is a rectangle with square corners.
5802 /// If the value is in the 0–16 range, the background is a rectangle with rounded corners. If the value is equal to
5803 /// or greater than 16, the background is a circle.
5804 ///
5805 ///
5806 ///
5807 /// Format of the return value [`ArkUI_AttributeItem`]:
5808 ///
5809 /// .value[0].f32: style of the background in the selected state of the calendar picker. The value range is [0, +∞).
5810 /// If the value is <b>0</b>, the background is a rectangle with square corners.
5811 /// If the value is in the 0–16 range, the background is a rectangle with rounded corners. If the value is equal to or
5812 /// greater than 16, the background is a circle.
5813 pub const NODE_CALENDAR_PICKER_HINT_RADIUS: ArkUI_NodeAttributeType =
5814 ArkUI_NodeAttributeType(16000);
5815}
5816#[cfg(feature = "api-12")]
5817#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5818impl ArkUI_NodeAttributeType {
5819 /// Defines the date of the selected item in the calendar picker.
5820 /// This attribute can be set, reset, and obtained as required through APIs.
5821 ///
5822 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5823 ///
5824 /// .value[0].u32: year of the selected date.
5825 ///
5826 /// .value[1].u32: month of the selected date.
5827 ///
5828 /// .value[2].u32: day of the selected date.
5829 ///
5830 ///
5831 ///
5832 /// Format of the return value [`ArkUI_AttributeItem`]:
5833 ///
5834 /// .value[0].u32: year of the selected date.
5835 ///
5836 /// .value[1].u32: month of the selected date.
5837 ///
5838 /// .value[2].u32: day of the selected date.
5839 pub const NODE_CALENDAR_PICKER_SELECTED_DATE: ArkUI_NodeAttributeType =
5840 ArkUI_NodeAttributeType(16001);
5841}
5842#[cfg(feature = "api-12")]
5843#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5844impl ArkUI_NodeAttributeType {
5845 /// Defines how the calendar picker is aligned with the entry component.
5846 /// This attribute can be set, reset, and obtained as required through APIs.
5847 ///
5848 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5849 ///
5850 /// .value[0].i32: alignment mode. The parameter type is [`ArkUI_CalendarAlignment`].
5851 ///
5852 /// .value[1]?.f32: offset of the picker relative to the entry component along the x-axis after alignment based on
5853 /// the specified alignment mode.
5854 ///
5855 /// .value[2]?.f32: offset of the picker relative to the entry component along the y-axis after alignment based on
5856 /// the specified alignment mode.
5857 ///
5858 ///
5859 ///
5860 /// Format of the return value [`ArkUI_AttributeItem`]:
5861 ///
5862 /// .value[0].i32: alignment mode. The parameter type is [`ArkUI_CalendarAlignment`].
5863 ///
5864 /// .value[1]?.f32: offset of the picker relative to the entry component along the x-axis after alignment based on
5865 /// the specified alignment mode.
5866 ///
5867 /// .value[2]?.f32: offset of the picker relative to the entry component along the y-axis after alignment based on
5868 /// the specified alignment mode.
5869 pub const NODE_CALENDAR_PICKER_EDGE_ALIGNMENT: ArkUI_NodeAttributeType =
5870 ArkUI_NodeAttributeType(16002);
5871}
5872#[cfg(feature = "api-12")]
5873#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5874impl ArkUI_NodeAttributeType {
5875 /// Defines the font color, font size, and font weight in the entry area of the calendar picker.
5876 ///
5877 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5878 ///
5879 /// .value[0]?.u32: font color of the entry area.
5880 ///
5881 /// .value[1]?.f32: font size of the entry area, in fp.
5882 ///
5883 /// .value[2]?.i32: font weight of the entry area. The parameter type is [`ArkUI_FontWeight`].
5884 ///
5885 ///
5886 ///
5887 /// Format of the return value [`ArkUI_AttributeItem`]:
5888 ///
5889 /// .value[0].u32: font color of the entry area.
5890 ///
5891 /// .value[1].f32: font size of the entry area, in fp.
5892 ///
5893 /// .value[2].i32: font weight of the entry area. The parameter type is [`ArkUI_FontWeight`].
5894 pub const NODE_CALENDAR_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType =
5895 ArkUI_NodeAttributeType(16003);
5896}
5897#[cfg(feature = "api-12")]
5898#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5899impl ArkUI_NodeAttributeType {
5900 /// Defines the color of the slider. This attribute can be set, reset, and obtained as required through APIs.
5901 ///
5902 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5903 ///
5904 /// .value[0].u32: color of the slider, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5905 ///
5906 ///
5907 /// Format of the return value [`ArkUI_AttributeItem`]:
5908 ///
5909 /// .value[0].u32: color of the slider, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5910 pub const NODE_SLIDER_BLOCK_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17000);
5911}
5912#[cfg(feature = "api-12")]
5913#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5914impl ArkUI_NodeAttributeType {
5915 /// Defines the background color of the slider. This attribute can be set, reset, and obtained as required
5916 /// through APIs.
5917 ///
5918 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5919 ///
5920 /// .value[0].u32: background color, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5921 ///
5922 ///
5923 ///
5924 /// Format of the return value [`ArkUI_AttributeItem`]:
5925 ///
5926 /// .value[0].u32: background color, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5927 pub const NODE_SLIDER_TRACK_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17001);
5928}
5929#[cfg(feature = "api-12")]
5930#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5931impl ArkUI_NodeAttributeType {
5932 /// Defines the color of the selected part of the slider track. This attribute can be set, reset, and obtained
5933 /// as required through APIs.
5934 ///
5935 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5936 ///
5937 /// .value[0].u32: color of the selected part of the slider track, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5938 ///
5939 ///
5940 ///
5941 /// Format of the return value [`ArkUI_AttributeItem`]:
5942 ///
5943 /// .value[0].u32: color of the selected part of the slider track, in 0xARGB format, for example, <b>0xFF1122FF</b>.
5944 pub const NODE_SLIDER_SELECTED_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17002);
5945}
5946#[cfg(feature = "api-12")]
5947#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5948impl ArkUI_NodeAttributeType {
5949 /// Sets whether to display the stepping value. This attribute can be set, reset, and obtained as required
5950 /// through APIs.
5951 ///
5952 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5953 ///
5954 /// .value[0].i32: whether to display the stepping value. The value <b>1</b> means to display the stepping value,
5955 /// and <b>0</b> (default value) means the opposite.
5956 ///
5957 ///
5958 ///
5959 /// Format of the return value [`ArkUI_AttributeItem`]:
5960 ///
5961 /// .value[0].i32: whether to display the stepping value. The value <b>1</b> means to display the stepping value,
5962 /// and <b>0</b> (default value) means the opposite.
5963 pub const NODE_SLIDER_SHOW_STEPS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17003);
5964}
5965#[cfg(feature = "api-12")]
5966#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
5967impl ArkUI_NodeAttributeType {
5968 /// Defines the slider shape, which can be set, reset, and obtained as required through APIs.
5969 ///
5970 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
5971 ///
5972 /// .value[0].i32: shape. The parameter type is [`ArkUI_SliderBlockStyle`].
5973 ///
5974 /// .string?: depending on the shape. Optional.
5975 ///
5976 /// ARKUI_SLIDER_BLOCK_STYLE_IMAGE: image resource of the slider. Example: /pages/common/icon.png.
5977 ///
5978 /// ARKUI_SLIDER_BLOCK_STYLE_SHAPE: custom shape of the slider.
5979 ///
5980 /// There are five types:
5981 ///
5982 /// 1. Rectangle:
5983 ///
5984 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
5985 /// The value is <b>ARKUI_SHAPE_TYPE_RECTANGLE</b> for the rectangle shape.
5986 ///
5987 /// .value[2].f32: width of the rectangle.
5988 ///
5989 /// .value[3].f32: height of the rectangle.
5990 ///
5991 /// .value[4].f32: width of the rounded corner of the rectangle.
5992 ///
5993 /// .value[5].f32: height of the rounded corner of the rectangle.
5994 ///
5995 /// 2. Circle:
5996 ///
5997 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
5998 /// The value is <b>ARKUI_SHAPE_TYPE_CIRCLE</b> for the circle shape.
5999 ///
6000 /// .value[2].f32: width of the circle.
6001 ///
6002 /// .value[3].f32: height of the circle.
6003 ///
6004 /// 3.Ellipse:
6005 ///
6006 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
6007 /// The value is <b>ARKUI_SHAPE_TYPE_ELLIPSE</b> for the ellipse shape.
6008 ///
6009 /// .value[2].f32: width of the ellipse.
6010 ///
6011 /// .value[3].f32: height of the ellipse;
6012 ///
6013 /// 4. Path:
6014 ///
6015 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
6016 /// The value is <b>ARKUI_SHAPE_TYPE_PATH</b> for the path shape.
6017 ///
6018 /// .value[2].f32: width of the path.
6019 ///
6020 /// .value[3].f32: height of the path.
6021 ///
6022 /// .string: command for drawing the path.
6023 ///
6024 ///
6025 ///
6026 /// Format of the return value [`ArkUI_AttributeItem`]:
6027 ///
6028 /// .value[0].i32: shape. The parameter type is [`ArkUI_SliderBlockStyle`].
6029 ///
6030 /// .string?: depending on the shape. Optional.
6031 ///
6032 /// ARKUI_SLIDER_BLOCK_STYLE_IMAGE: image resource of the slider. Example: /pages/common/icon.png.
6033 ///
6034 /// ARKUI_SLIDER_BLOCK_STYLE_SHAPE: custom shape of the slider.
6035 ///
6036 /// There are five types:
6037 ///
6038 /// 1. Rectangle:
6039 ///
6040 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
6041 /// The value is <b>ARKUI_SHAPE_TYPE_RECTANGLE</b> for the rectangle shape.
6042 ///
6043 /// .value[2].f32: width of the rectangle.
6044 ///
6045 /// .value[3].f32: height of the rectangle.
6046 ///
6047 /// .value[4].f32: width of the rounded corner of the rectangle.
6048 ///
6049 /// .value[5].f32: height of the rounded corner of the rectangle.
6050 ///
6051 /// 2. Circle:
6052 ///
6053 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
6054 /// The value is <b>ARKUI_SHAPE_TYPE_CIRCLE</b> for the circle shape.
6055 ///
6056 /// .value[2].f32: width of the circle.
6057 ///
6058 /// .value[3].f32: height of the circle.
6059 ///
6060 /// 3.Ellipse:
6061 ///
6062 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
6063 /// The value is <b>ARKUI_SHAPE_TYPE_ELLIPSE</b> for the ellipse shape.
6064 ///
6065 /// .value[2].f32: width of the ellipse.
6066 ///
6067 /// .value[3].f32: height of the ellipse;
6068 ///
6069 /// 4. Path:
6070 ///
6071 /// .value[1].i32: type of shape. The parameter type is [`ArkUI_ShapeType`].
6072 /// The value is <b>ARKUI_SHAPE_TYPE_PATH</b> for the path shape.
6073 ///
6074 /// .value[2].f32: width of the path.
6075 ///
6076 /// .value[3].f32: height of the path.
6077 ///
6078 /// .string: command for drawing the path.
6079 pub const NODE_SLIDER_BLOCK_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17004);
6080}
6081#[cfg(feature = "api-12")]
6082#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6083impl ArkUI_NodeAttributeType {
6084 /// Defines the current value of the slider. This attribute can be set, reset, and obtained as required
6085 /// through APIs.
6086 ///
6087 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6088 ///
6089 /// .value[0].f32: current value.
6090 ///
6091 ///
6092 ///
6093 /// Format of the return value [`ArkUI_AttributeItem`]:
6094 ///
6095 /// .value[0].f32: current value.
6096 pub const NODE_SLIDER_VALUE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17005);
6097}
6098#[cfg(feature = "api-12")]
6099#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6100impl ArkUI_NodeAttributeType {
6101 /// Defines the minimum value of the slider. This attribute can be set, reset, and obtained as required
6102 /// through APIs.
6103 ///
6104 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6105 ///
6106 /// .value[0].f32: minimum value.
6107 ///
6108 ///
6109 ///
6110 /// Format of the return value [`ArkUI_AttributeItem`]:
6111 ///
6112 /// .value[0].f32: minimum value.
6113 pub const NODE_SLIDER_MIN_VALUE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17006);
6114}
6115#[cfg(feature = "api-12")]
6116#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6117impl ArkUI_NodeAttributeType {
6118 /// Defines the maximum value of the slider. This attribute can be set, reset, and obtained as required
6119 /// through APIs.
6120 ///
6121 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6122 ///
6123 /// .value[0].f32: maximum value.
6124 ///
6125 ///
6126 ///
6127 /// Format of the return value [`ArkUI_AttributeItem`]:
6128 ///
6129 /// .value[0].f32: maximum value.
6130 pub const NODE_SLIDER_MAX_VALUE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17007);
6131}
6132#[cfg(feature = "api-12")]
6133#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6134impl ArkUI_NodeAttributeType {
6135 /// Defines the step of the slider. This attribute can be set, reset, and obtained as required through APIs.
6136 ///
6137 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6138 ///
6139 /// .value[0].f32: step. The value range is [0.01, 100].
6140 ///
6141 ///
6142 ///
6143 /// Format of the return value [`ArkUI_AttributeItem`]:
6144 ///
6145 /// .value[0].f32: step. The value range is [0.01, 100].
6146 pub const NODE_SLIDER_STEP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17008);
6147}
6148#[cfg(feature = "api-12")]
6149#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6150impl ArkUI_NodeAttributeType {
6151 /// Defines whether the slider moves horizontally or vertically. This attribute can be set, reset, and
6152 /// obtained as required through APIs.
6153 ///
6154 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6155 ///
6156 /// .value[0].i32: whether the slider moves horizontally or vertically.
6157 /// The parameter type is [`ArkUI_SliderDirection`].
6158 ///
6159 ///
6160 ///
6161 /// Format of the return value [`ArkUI_AttributeItem`]:
6162 ///
6163 /// .value[0].i32: whether the slider moves horizontally or vertically.
6164 pub const NODE_SLIDER_DIRECTION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17009);
6165}
6166#[cfg(feature = "api-12")]
6167#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6168impl ArkUI_NodeAttributeType {
6169 /// Defines whether the slider values are reversed. This attribute can be set, reset, and obtained as required
6170 /// through APIs.
6171 ///
6172 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6173 ///
6174 /// .value[0].i32: whether the slider values are reversed. The value <b>1</b> means that the slider values are
6175 /// reversed, and <b>0</b> means the opposite.
6176 ///
6177 ///
6178 ///
6179 /// Format of the return value [`ArkUI_AttributeItem`]:
6180 ///
6181 /// .value[0].i32: whether the slider values are reversed. The value <b>1</b> means that the slider values are
6182 /// reversed, and <b>0</b> means the opposite.
6183 pub const NODE_SLIDER_REVERSE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17010);
6184}
6185#[cfg(feature = "api-12")]
6186#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6187impl ArkUI_NodeAttributeType {
6188 /// Defines the style of the slider thumb and track. This attribute can be set, reset, and obtained
6189 /// as required through APIs.
6190 ///
6191 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6192 ///
6193 /// .value[0].i32: style of the slider thumb and track. The parameter type is [`ArkUI_SliderStyle`].
6194 ///
6195 ///
6196 ///
6197 /// Format of the return value [`ArkUI_AttributeItem`]:
6198 ///
6199 /// .value[0].i32: style of the slider thumb and track. The parameter type is [`ArkUI_SliderStyle`].
6200 pub const NODE_SLIDER_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17011);
6201}
6202#[cfg(feature = "api-12")]
6203#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6204impl ArkUI_NodeAttributeType {
6205 /// Sets the track thickness of the slider.
6206 /// This attribute can be set, reset, and obtained as required through APIs.
6207 ///
6208 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6209 ///
6210 /// .value[0].f32: track thickness of the slider, in vp. The default value is 4.0 vp when <b>NODE_SLIDER_STYLE</b>
6211 /// is set to <b>ARKUI_SLIDER_STYLE_OUT_SET</b> and 20.0 vp when <b>NODE_SLIDER_STYLE</b> is set to
6212 /// <b>ARKUI_SLIDER_STYLE_IN_SET</b>.
6213 ///
6214 ///
6215 ///
6216 /// Format of the return value [`ArkUI_AttributeItem`]:
6217 ///
6218 /// .value[0].f32: track thickness of the slider, in vp.
6219 pub const NODE_SLIDER_TRACK_THICKNESS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(17012);
6220}
6221#[cfg(feature = "api-12")]
6222#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6223impl ArkUI_NodeAttributeType {
6224 /// Set the selection status of an option button. Attribute setting,
6225 /// attribute resetting, and attribute obtaining are supported.
6226 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6227 ///
6228 /// .value[0].i32: check status of an option button. The default value is false.
6229 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6230 ///
6231 /// .value[0].i32: selection status of an option button.
6232 pub const NODE_RADIO_CHECKED: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(18000);
6233}
6234#[cfg(feature = "api-12")]
6235#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6236impl ArkUI_NodeAttributeType {
6237 /// Set the styles of the selected and deselected states of the option button.
6238 /// The attribute setting, attribute resetting, and attribute obtaining are supported.
6239 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6240 ///
6241 /// .value[0]?. u32: color of the mother board in enabled state.
6242 ///
6243 /// The type is 0xARGB, and the default value is 0xFF007DFF.
6244 ///
6245 /// .value[1]?. u32: stroke color in the close state. The type is 0xARGB,
6246 ///
6247 /// and the default value is 0xFF182431.
6248 ///
6249 /// .value[2]?. u32: color of the internal round pie in the enabled state.
6250 ///
6251 /// The type is 0xARGB, and the default value is 0xFFFFFFFF.
6252 ///
6253 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6254 ///
6255 /// .value[0]. u32: color of the mother board in enabled state.
6256 ///
6257 /// The type is 0xARGB, and the default value is 0xFF007DFF.
6258 ///
6259 /// .value[1]. u32: stroke color in the close state. The type is 0xARGB,
6260 ///
6261 /// and the default value is 0xFF182431.
6262 ///
6263 /// .value[2]. u32: color of the internal round pie in the enabled state.
6264 ///
6265 /// The type is 0xARGB, and the default value is 0xFFFFFFF.
6266 pub const NODE_RADIO_STYLE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(18001);
6267}
6268#[cfg(feature = "api-12")]
6269#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6270impl ArkUI_NodeAttributeType {
6271 /// Sets the value of the current radio.
6272 /// This attribute can be set, reset, and obtained as required through APIs.
6273 ///
6274 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6275 ///
6276 /// .string: radio value.
6277 ///
6278 ///
6279 ///
6280 /// Format of the return value [`ArkUI_AttributeItem`]:
6281 ///
6282 /// .string: radio value.
6283 pub const NODE_RADIO_VALUE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(18002);
6284}
6285#[cfg(feature = "api-12")]
6286#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6287impl ArkUI_NodeAttributeType {
6288 /// Set the group name of the current Radio group, only one radio of the same group can be selected.
6289 /// This attribute can be set, reset, and obtained as required through APIs.
6290 ///
6291 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6292 ///
6293 /// .string: name of the group to which the current option box belongs.
6294 ///
6295 ///
6296 ///
6297 /// Format of the return value [`ArkUI_AttributeItem`]:
6298 ///
6299 /// .string: name of the group to which the current option box belongs.
6300 pub const NODE_RADIO_GROUP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(18003);
6301}
6302#[cfg(feature = "api-12")]
6303#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6304impl ArkUI_NodeAttributeType {
6305 /// Set the image frames for the image animator. Dynamic updates is not supported.
6306 /// This attribute can be set, reset, and obtained as required through APIs.
6307 ///
6308 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6309 ///
6310 /// .size: number of the images.
6311 ///
6312 /// .object: array of the images, the type is [`ArkUI_ImageAnimatorFrameInfo`] array.
6313 ///
6314 ///
6315 ///
6316 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6317 ///
6318 /// .size: number of the images.
6319 ///
6320 /// .object: array of the images, the type is [`ArkUI_ImageAnimatorFrameInfo`] array.
6321 pub const NODE_IMAGE_ANIMATOR_IMAGES: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(19000);
6322}
6323#[cfg(feature = "api-12")]
6324#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6325impl ArkUI_NodeAttributeType {
6326 /// Set the playback status of the animation for the image animator.
6327 /// This attribute can be set, reset, and obtained as required through APIs.
6328 ///
6329 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6330 ///
6331 /// .value[0].i32: the playback status of the animation, the type is [`ArkUI_AnimationStatus`],
6332 /// and the default value is ARKUI_ANIMATION_STATUS_INITIAL.
6333 ///
6334 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6335 ///
6336 /// .value[0].i32: the playback status of the animation, the type is [`ArkUI_AnimationStatus`].
6337 pub const NODE_IMAGE_ANIMATOR_STATE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(19001);
6338}
6339#[cfg(feature = "api-12")]
6340#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6341impl ArkUI_NodeAttributeType {
6342 /// Set the playback duration for the image animator. When the duration is 0, no image is played.
6343 /// The value change takes effect only at the beginning of the next cycle.
6344 /// When a separate duration is set in images, the setting of this attribute is invalid.
6345 /// This attribute can be set, reset, and obtained as required through APIs.
6346 ///
6347 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6348 ///
6349 /// .value[0].i32: the playback duration, the unit is ms and the default value is 1000.
6350 ///
6351 ///
6352 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6353 ///
6354 /// .value[0].i32: the playback duration, the unit is ms.
6355 pub const NODE_IMAGE_ANIMATOR_DURATION: ArkUI_NodeAttributeType =
6356 ArkUI_NodeAttributeType(19002);
6357}
6358#[cfg(feature = "api-12")]
6359#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6360impl ArkUI_NodeAttributeType {
6361 /// Set the playback direction for the image animator.
6362 /// This attribute can be set, reset, and obtained as required through APIs.
6363 ///
6364 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6365 ///
6366 /// .value[0].i32: the playback direction. 0 indicates that images are played from the first one to the last one,
6367 /// and 1 indicates that images are played from the last one to the first one.
6368 ///
6369 ///
6370 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6371 ///
6372 /// .value[0].i32: the playback direction. 0 indicates that images are played from the first one to the last one,
6373 /// and 1 indicates that images are played from the last one to the first one.
6374 pub const NODE_IMAGE_ANIMATOR_REVERSE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(19003);
6375}
6376#[cfg(feature = "api-12")]
6377#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6378impl ArkUI_NodeAttributeType {
6379 /// Set whether the image size is the same as the component size.
6380 /// This attribute can be set, reset, and obtained as required through APIs.
6381 ///
6382 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6383 ///
6384 /// .value[0].i32: whether the image size is the same as the component size.
6385 /// 1 indicates the image size is the same as the component size.
6386 /// In this case, the width, height, top, and left attributes of the image are invalid.
6387 /// 0 indicates the image size is customized.
6388 /// The width, height, top, and left attributes of each image must be set separately.
6389 ///
6390 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6391 ///
6392 /// .value[0].i32: whether the image size is the same as the component size.
6393 /// 1 indicates the image size is the same as the component size.
6394 /// 0 indicates the image size is customized.
6395 pub const NODE_IMAGE_ANIMATOR_FIXED_SIZE: ArkUI_NodeAttributeType =
6396 ArkUI_NodeAttributeType(19004);
6397}
6398#[cfg(feature = "api-12")]
6399#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6400impl ArkUI_NodeAttributeType {
6401 /// Set the status before and after execution of the animation in the current playback direction.
6402 /// This attribute can be set, reset, and obtained as required through APIs.
6403 ///
6404 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6405 ///
6406 /// .value[0].i32: the status before and after execution of the animation in the current playback direction,
6407 /// the type is {ArkUI_AnimationFillMode} and the default value is ARKUI_ANIMATION_FILL_MODE_FORWARDS.
6408 ///
6409 ///
6410 /// Attribute obtaining method return value [`ArkUI_AttributeItem`] format:
6411 ///
6412 /// .value[0].i32: the status before and after execution of the animation in the current playback direction,
6413 /// the type is {ArkUI_AnimationFillMode}.
6414 pub const NODE_IMAGE_ANIMATOR_FILL_MODE: ArkUI_NodeAttributeType =
6415 ArkUI_NodeAttributeType(19005);
6416}
6417#[cfg(feature = "api-12")]
6418#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6419impl ArkUI_NodeAttributeType {
6420 /// Set the number of times that the animation is played.
6421 /// This attribute can be set, reset, and obtained as required through APIs.
6422 ///
6423 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6424 ///
6425 /// .value[0].i32: the number of times that the animation is played.
6426 ///
6427 ///
6428 /// Attribute setting method [`ArkUI_AttributeItem`] Parameter format:
6429 ///
6430 /// .value[0].i32: the number of times that the animation is played.
6431 pub const NODE_IMAGE_ANIMATOR_ITERATION: ArkUI_NodeAttributeType =
6432 ArkUI_NodeAttributeType(19006);
6433}
6434#[cfg(feature = "api-12")]
6435#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6436impl ArkUI_NodeAttributeType {
6437 /// Defines the alignment mode of the child components in the container. This attribute can be set, reset,
6438 /// and obtained as required through APIs.
6439 ///
6440 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6441 ///
6442 /// .value[0].i32: alignment mode. The data type is [`ArkUI_Alignment`].
6443 /// The default value is <b>ARKUI_ALIGNMENT_CENTER</b>.
6444 ///
6445 ///
6446 ///
6447 /// Format of the return value [`ArkUI_AttributeItem`]:
6448 ///
6449 /// .value[0].i32: alignment mode. The data type is [`ArkUI_Alignment`].
6450 pub const NODE_STACK_ALIGN_CONTENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1000000);
6451}
6452#[cfg(feature = "api-12")]
6453#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6454impl ArkUI_NodeAttributeType {
6455 /// Defines the scrollbar status. This attribute can be set, reset, and obtained as required through APIs.
6456 ///
6457 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6458 ///
6459 /// .value[0].i32: scrollbar status. The parameter type is [`ArkUI_ScrollBarDisplayMode`]. The default value is
6460 /// <b>ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO</b>.
6461 ///
6462 ///
6463 ///
6464 /// Format of the return value [`ArkUI_AttributeItem`]:
6465 ///
6466 /// .value[0].i32: scrollbar status. The parameter type is [`ArkUI_ScrollBarDisplayMode`].
6467 pub const NODE_SCROLL_BAR_DISPLAY_MODE: ArkUI_NodeAttributeType =
6468 ArkUI_NodeAttributeType(1002000);
6469}
6470#[cfg(feature = "api-12")]
6471#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6472impl ArkUI_NodeAttributeType {
6473 /// Defines the width of the scrollbar. This attribute can be set, reset, and obtained as required
6474 /// through APIs.
6475 ///
6476 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6477 ///
6478 /// .value[0].f32: width of the scrollbar, in vp. The default value is <b>4</b>.
6479 ///
6480 ///
6481 ///
6482 /// Format of the return value [`ArkUI_AttributeItem`]:
6483 ///
6484 /// .value[0].f32: width of the scrollbar, in vp.
6485 pub const NODE_SCROLL_BAR_WIDTH: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002001);
6486}
6487#[cfg(feature = "api-12")]
6488#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6489impl ArkUI_NodeAttributeType {
6490 /// Defines the color of the scrollbar. This attribute can be set, reset, and obtained as required
6491 /// through APIs.
6492 ///
6493 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6494 ///
6495 /// .data[0].u32: color of the scrollbar, in 0xARGB format.
6496 ///
6497 ///
6498 ///
6499 /// Format of the return value [`ArkUI_AttributeItem`]:
6500 ///
6501 /// .data[0].u32: color of the scrollbar, in 0xARGB format.
6502 pub const NODE_SCROLL_BAR_COLOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002002);
6503}
6504#[cfg(feature = "api-12")]
6505#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6506impl ArkUI_NodeAttributeType {
6507 /// Defines the scroll direction. This attribute can be set, reset, and obtained as required through APIs.
6508 ///
6509 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6510 ///
6511 /// .value[0].i32: scroll direction. The parameter type is [`ArkUI_ScrollDirection`].
6512 /// The default value is <b>ARKUI_SCROLL_DIRECTION_VERTICAL</b>.
6513 ///
6514 ///
6515 ///
6516 /// Format of the return value [`ArkUI_AttributeItem`]:
6517 ///
6518 /// .value[0].i32: scroll direction. The parameter type is [`ArkUI_ScrollDirection`].
6519 pub const NODE_SCROLL_SCROLL_DIRECTION: ArkUI_NodeAttributeType =
6520 ArkUI_NodeAttributeType(1002003);
6521}
6522#[cfg(feature = "api-12")]
6523#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6524impl ArkUI_NodeAttributeType {
6525 /// Defines the effect used at the edges of the component when the boundary of the scrollable content is
6526 /// reached. This attribute can be set, reset, and obtained as required through APIs.
6527 ///
6528 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6529 ///
6530 /// .value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached.
6531 /// The parameter type is [`ArkUI_EdgeEffect`]. The default value is <b>ARKUI_EDGE_EFFECT_NONE</b>.
6532 ///
6533 /// .value[1]?.i32: whether to enable the scroll effect when the component content size is smaller than the
6534 /// component itself. Optional. The value <b>1</b> means to enable the scroll effect, and <b>0</b> means the
6535 /// opposite. The default value is <b>1</b>.
6536 ///
6537 ///
6538 ///
6539 /// Format of the return value [`ArkUI_AttributeItem`]:
6540 ///
6541 /// .value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached.
6542 /// The parameter type is [`ArkUI_EdgeEffect`].
6543 ///
6544 /// .value[1].i32: whether to enable the scroll effect when the component content size is smaller than the component
6545 /// itself. Optional. The value <b>1</b> means to enable the scroll effect, and <b>0</b> means the opposite.
6546 pub const NODE_SCROLL_EDGE_EFFECT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002004);
6547}
6548#[cfg(feature = "api-12")]
6549#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6550impl ArkUI_NodeAttributeType {
6551 /// Defines whether to support scroll gestures. When this attribute is set to <b>false</b>, scrolling by
6552 /// finger or mouse is not supported, but the scroll controller API is not affected.
6553 ///
6554 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6555 ///
6556 /// .value[0].i32: whether to support scroll gestures. The default value is <b>true</b>.
6557 ///
6558 ///
6559 ///
6560 /// Format of the return value [`ArkUI_AttributeItem`]:
6561 ///
6562 /// .value[0].i32: whether to support scroll gestures.
6563 pub const NODE_SCROLL_ENABLE_SCROLL_INTERACTION: ArkUI_NodeAttributeType =
6564 ArkUI_NodeAttributeType(1002005);
6565}
6566#[cfg(feature = "api-12")]
6567#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6568impl ArkUI_NodeAttributeType {
6569 /// Defines the friction coefficient. It applies only to gestures in the scrolling area, and it affects only
6570 /// indirectly the scroll chaining during the inertial scrolling process.
6571 ///
6572 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6573 ///
6574 /// .value[0].f32: friction coefficient. The default value is <b>0.6</b> for non-wearable devices and <b>0.9</b>
6575 /// for wearable devices.
6576 ///
6577 ///
6578 ///
6579 /// Format of the return value [`ArkUI_AttributeItem`]:
6580 ///
6581 /// .value[0].f32: friction coefficient.
6582 pub const NODE_SCROLL_FRICTION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002006);
6583}
6584#[cfg(feature = "api-12")]
6585#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6586impl ArkUI_NodeAttributeType {
6587 /// Defines the scroll snapping mode. This attribute can be set, reset, and obtained as required through APIs.
6588 ///
6589 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6590 ///
6591 /// .value[0].i32: alignment mode for the scroll snap position. The parameter type is [`ArkUI_ScrollSnapAlign`].
6592 /// The default value is <b>ARKUI_SCROLL_SNAP_ALIGN_NONE</b>.
6593 ///
6594 /// .value[1].i32: whether to enable the snap to start feature. When scroll snapping is defined for the
6595 /// <b><Scroll></b> component, setting this attribute to <b>false</b> enables the component to scroll between the
6596 /// start edge and the first snap point. The default value is <b>true</b>. It is valid only when there are multiple
6597 /// snap points.
6598 ///
6599 /// .value[2].i32: Whether to enable the snap to end feature. When scroll snapping is defined for the
6600 /// <b><Scroll></b> component, setting this attribute to <b>false</b> enables the component to scroll between the
6601 /// end edge and the last snap point. The default value is <b>true</b>. It is valid only when there are multiple
6602 /// snap points.
6603 ///
6604 /// .value[3...].f32: snap points for the <b><Scroll></b> component. Each snap point defines the offset from an
6605 /// edge to which the <b><Scroll></b> component can scroll.
6606 ///
6607 ///
6608 ///
6609 /// Format of the return value [`ArkUI_AttributeItem`]:
6610 ///
6611 /// .value[0].i32: alignment mode for the scroll snap position. The parameter type is [`ArkUI_ScrollSnapAlign`].
6612 ///
6613 /// .value[1].i32: whether to enable the snap to start feature. When scroll snapping is defined for the
6614 /// <b><Scroll></b> component, setting this attribute to <b>false</b> enables the component to scroll between the
6615 /// start edge and the first snap point.
6616 ///
6617 /// .value[2].i32: Whether to enable the snap to end feature. When scroll snapping is defined for the
6618 /// <b><Scroll></b> component, setting this attribute to <b>false</b> enables the component to scroll between the
6619 /// end edge and the last snap point.
6620 ///
6621 /// .value[3...].f32: snap points for the <b><Scroll></b> component. Each snap point defines the offset from an edge
6622 /// to which the <b><Scroll></b> component can scroll.
6623 pub const NODE_SCROLL_SNAP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002007);
6624}
6625#[cfg(feature = "api-12")]
6626#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6627impl ArkUI_NodeAttributeType {
6628 /// Defines the nested scrolling options. This attribute can be set, reset, and obtained as required
6629 /// through APIs.
6630 ///
6631 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6632 ///
6633 /// .value[0].i32: nested scrolling option when the component scrolls forward.
6634 /// The parameter type is [`ArkUI_ScrollNestedMode`].
6635 ///
6636 /// .value[1].i32: nested scrolling option when the component scrolls backward.
6637 /// The parameter type is [`ArkUI_ScrollNestedMode`].
6638 ///
6639 ///
6640 ///
6641 /// Format of the return value [`ArkUI_AttributeItem`]:
6642 ///
6643 /// .value[0].i32: nested scrolling option when the component scrolls forward.
6644 /// The parameter type is [`ArkUI_ScrollNestedMode`].
6645 ///
6646 /// .value[1].i32: nested scrolling option when the component scrolls backward.
6647 /// The parameter type is [`ArkUI_ScrollNestedMode`].
6648 pub const NODE_SCROLL_NESTED_SCROLL: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002008);
6649}
6650#[cfg(feature = "api-12")]
6651#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6652impl ArkUI_NodeAttributeType {
6653 /// Defines the specified position to scroll to. This attribute can be set, reset, and obtained as required
6654 /// through APIs.
6655 ///
6656 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6657 ///
6658 /// .value[0].f32: horizontal scrolling offset, in vp.
6659 ///
6660 /// .value[1].f32: vertical scrolling offset, in vp.
6661 ///
6662 /// .value[2]?.i32: scrolling duration, in milliseconds. Optional.
6663 ///
6664 /// .value[3]?.i32: scrolling curve. Optional. The parameter type is [`ArkUI_AnimationCurve`].
6665 /// The default value is <b>ARKUI_CURVE_EASE</b>.
6666 ///
6667 /// .value[4]?.i32: whether to enable the default spring animation. Optional. The default value <b>0</b> means not
6668 /// to enable the default spring animation.
6669 ///
6670 /// .value[5]?.i32: Optional value, sets whether scrolling can cross the boundary.
6671 ///
6672 ///
6673 ///
6674 /// Format of the return value [`ArkUI_AttributeItem`]:
6675 ///
6676 /// .value[0].f32: horizontal scrolling offset, in vp.
6677 ///
6678 /// .value[1].f32: vertical scrolling offset, in vp.
6679 pub const NODE_SCROLL_OFFSET: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002009);
6680}
6681#[cfg(feature = "api-12")]
6682#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6683impl ArkUI_NodeAttributeType {
6684 /// Defines the edge position to scroll to. This attribute can be set and obtained as required through APIs.
6685 ///
6686 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6687 ///
6688 /// .value[0].i32: edge position to scroll to. The parameter type is [`ArkUI_ScrollEdge`].
6689 ///
6690 ///
6691 ///
6692 /// Format of the return value [`ArkUI_AttributeItem`]:
6693 ///
6694 /// .value[0].i32: whether the container at the edge position. The value <b>-1</b> means that the container is not
6695 /// at the edge position. If the container is at the edge position, the parameter type is [`ArkUI_ScrollEdge`].
6696 pub const NODE_SCROLL_EDGE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002010);
6697}
6698#[cfg(feature = "api-12")]
6699#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6700impl ArkUI_NodeAttributeType {
6701 /// Defines whether to enable the swipe-to-turn-pages feature. This attribute can be set, reset, and obtained
6702 /// as required through APIs.
6703 ///
6704 /// If both <b>enablePaging</b> and <b>scrollSnap</b> are set, <b>scrollSnap</b> takes effect, but
6705 /// <b>enablePaging</b> does not.
6706 ///
6707 ///
6708 ///
6709 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6710 ///
6711 /// .value[0].i32: whether to enable the swipe-to-turn-pages feature. The default value is <b>false</b>.
6712 ///
6713 ///
6714 ///
6715 /// Format of the return value [`ArkUI_AttributeItem`]:
6716 ///
6717 /// .value[0].i32: whether to enable the swipe-to-turn-pages feature.
6718 pub const NODE_SCROLL_ENABLE_PAGING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002011);
6719}
6720#[cfg(feature = "api-12")]
6721#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6722impl ArkUI_NodeAttributeType {
6723 /// Scroll to the next or previous page.
6724 ///
6725 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6726 ///
6727 /// .value[0].i32 Indicates whether to scroll to next page. Value 0 indicates scroll to next page and value 1
6728 /// indicates scroll to previous page.
6729 ///
6730 /// .value[1]?.i32 Indicates whether to enable animation. Value 1 indicates enable and 0 indicates disable.
6731 pub const NODE_SCROLL_PAGE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002012);
6732}
6733#[cfg(feature = "api-12")]
6734#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6735impl ArkUI_NodeAttributeType {
6736 /// Scroll a specified distance.
6737 ///
6738 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6739 ///
6740 /// .value[0].f32:Horizontal scrolling distance in vp;
6741 ///
6742 /// .value[1].f32: Vertical scrolling distance in vp;
6743 pub const NODE_SCROLL_BY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002013);
6744}
6745#[cfg(feature = "api-12")]
6746#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6747impl ArkUI_NodeAttributeType {
6748 /// Performs inertial scrolling based on the initial velocity passed in.
6749 ///
6750 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6751 ///
6752 /// .value[0].f32: Initial velocity of inertial scrolling. Unit: vp/s. If the value specified is 0, it is
6753 /// considered as invalid, and the scrolling for this instance will not take effect. If the value is positive,
6754 /// the scroll will move downward; if the value is negative, the scroll will move upward.
6755 ///
6756 ///
6757 ///
6758 /// Available since API-level: 13
6759 #[cfg(feature = "api-13")]
6760 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
6761 pub const NODE_SCROLL_FLING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002014);
6762}
6763#[cfg(feature = "api-12")]
6764#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6765impl ArkUI_NodeAttributeType {
6766 /// Sets the fading effect for the edges of scrollable components.
6767 ///
6768 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6769 /// .value[0].i32: whether to enable the fading effect on edges. The value 0 means to disable the fading effect,
6770 /// and 1 means to enable it.
6771 /// .value[1]?.f32: length of the fading effect on edges, in vp. Default value: 32.
6772 ///
6773 /// Format of the return value [`ArkUI_AttributeItem`]:
6774 /// .value[0].i32: whether the fading effect on edges is enabled. The value 0 means that the fading effect is
6775 /// disabled, and 1 means that it is enabled.
6776 /// .value[1].f32: length of the fading effect on edges, in vp.
6777 ///
6778 ///
6779 /// Available since API-level: 14
6780 #[cfg(feature = "api-14")]
6781 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
6782 pub const NODE_SCROLL_FADING_EDGE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002015);
6783}
6784#[cfg(feature = "api-12")]
6785#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6786impl ArkUI_NodeAttributeType {
6787 /// Obtains the total size of all child components when fully expanded in the scrollable component.
6788 ///
6789 /// Format of the return value [`ArkUI_AttributeItem`]:
6790 ///
6791 /// .value[0].f32: total width of all child components when fully expanded in the scrollable component.
6792 /// The default unit is vp.
6793 ///
6794 /// .value[1].f32: total height of all child components when fully expanded in the scrollable component.
6795 /// The default unit is vp.
6796 ///
6797 /// When <b>NODE_PADDING</b>, <b>NODE_MARGIN</b>, or <b>NODE_BORDER_WIDTH</b> is set, the values are rounded to the
6798 /// nearest pixel when being converted from vp to px.
6799 /// The returned values are calculated based on these rounded pixel values.
6800 ///
6801 ///
6802 ///
6803 /// Available since API-level: 14
6804 #[cfg(feature = "api-14")]
6805 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
6806 pub const NODE_SCROLL_SIZE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1002016);
6807}
6808#[cfg(feature = "api-12")]
6809#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6810impl ArkUI_NodeAttributeType {
6811 /// Defines the direction in which the list items are arranged. This attribute can be set, reset, and
6812 /// obtained as required through APIs.
6813 ///
6814 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6815 ///
6816 /// .value[0].i32: direction in which the list items are arranged. The parameter type is [`ArkUI_Axis`].
6817 /// The default value is <b>ARKUI_AXIS_VERTICAL</b>.
6818 ///
6819 ///
6820 ///
6821 /// Format of the return value [`ArkUI_AttributeItem`]:
6822 ///
6823 /// .value[0].i32: direction in which the list items are arranged. The parameter type is [`ArkUI_Axis`].
6824 pub const NODE_LIST_DIRECTION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003000);
6825}
6826#[cfg(feature = "api-12")]
6827#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6828impl ArkUI_NodeAttributeType {
6829 /// Defines whether to pin the header to the top or the footer to the bottom in the <b><ListItemGroup></b>
6830 /// component. This attribute can be set, reset, and obtained as required through APIs.
6831 ///
6832 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6833 ///
6834 /// .value[0].i32: whether to pin the header to the top or the footer to the bottom in the <b><ListItemGroup></b>
6835 /// component. It is used together with the <b><ListItemGroup></b> component. The parameter type is
6836 /// [`ArkUI_StickyStyle`]. The default value is <b>ARKUI_STICKY_STYLE_NONE</b>.
6837 ///
6838 ///
6839 ///
6840 /// Format of the return value [`ArkUI_AttributeItem`]:
6841 ///
6842 /// .value[0].i32: whether to pin the header to the top or the footer to the bottom in the <b><ListItemGroup></b>
6843 /// component. It is used together with the <b><ListItemGroup></b> component. The parameter type is
6844 /// [`ArkUI_StickyStyle`].
6845 pub const NODE_LIST_STICKY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003001);
6846}
6847#[cfg(feature = "api-12")]
6848#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6849impl ArkUI_NodeAttributeType {
6850 /// Defines the spacing between list items. This attribute can be set, reset, and obtained as required
6851 /// through APIs.
6852 ///
6853 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6854 ///
6855 /// .value[0].f32: spacing between list items along the main axis. The default value is <b>0</b>.
6856 ///
6857 ///
6858 ///
6859 /// Format of the return value [`ArkUI_AttributeItem`]:
6860 ///
6861 /// .value[0].f32: spacing between list items along the main axis.
6862 pub const NODE_LIST_SPACE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003002);
6863}
6864#[cfg(feature = "api-12")]
6865#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6866impl ArkUI_NodeAttributeType {
6867 /// Defines the list adapter. The attribute can be set, reset, and obtained as required through APIs.
6868 ///
6869 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6870 ///
6871 /// .object: [`ArkUI_NodeAdapter`] object as the adapter.
6872 pub const NODE_LIST_NODE_ADAPTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003003);
6873}
6874#[cfg(feature = "api-12")]
6875#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6876impl ArkUI_NodeAttributeType {
6877 /// Sets the number of cached items in the list adapter.
6878 /// This attribute can be set, reset, and obtained as required through APIs.
6879 ///
6880 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6881 ///
6882 /// .value[0].i32: number of cached items in the list adapter.
6883 pub const NODE_LIST_CACHED_COUNT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003004);
6884}
6885#[cfg(feature = "api-12")]
6886#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6887impl ArkUI_NodeAttributeType {
6888 /// Scroll to the specified index.
6889 ///
6890 /// When activating the smooth animation, all items passed through will be loaded and layout calculated, which can
6891 /// lead to performance issues when loading a large number of items.
6892 ///
6893 ///
6894 ///
6895 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6896 ///
6897 /// .value[0].i32:The index value of the target element to be slid to in the current container.
6898 ///
6899 /// .value[1]?.i32:Set whether there is an action when sliding to the index value of a list item in the list, where
6900 /// 1 indicates an action and 0 indicates no action. Default value: 0。
6901 ///
6902 /// .value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is
6903 /// [`ArkUI_ScrollAlignment`], default value is ARKUI_SCROLL_ALIGNMENT_START.
6904 pub const NODE_LIST_SCROLL_TO_INDEX: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003005);
6905}
6906#[cfg(feature = "api-12")]
6907#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6908impl ArkUI_NodeAttributeType {
6909 /// Sets the alignment mode of list items along the cross axis when the cross-axis width of the list is
6910 /// greater than the cross-axis width of list items multiplied by the value of lanes.
6911 /// This attribute can be set, reset, and obtained as required through APIs.
6912 ///
6913 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6914 ///
6915 /// .value[0].i32: alignment mode of list items along the cross axis.
6916 /// The parameter type is [`ArkUI_ListItemAlignment`].
6917 ///
6918 ///
6919 ///
6920 /// Format of the return value [`ArkUI_AttributeItem`]:
6921 ///
6922 /// .value[0].i32: alignment mode of list items along the cross axis.
6923 /// The parameter type is [`ArkUI_ListItemAlignment`].
6924 pub const NODE_LIST_ALIGN_LIST_ITEM: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003006);
6925}
6926#[cfg(feature = "api-12")]
6927#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6928impl ArkUI_NodeAttributeType {
6929 /// Set the default spindle size for the List subcomponent.
6930 ///
6931 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6932 ///
6933 /// .object: The parameter format is [`ArkUI-ListChildrenMainSize`]
6934 ///
6935 ///
6936 ///
6937 /// Format of the return value [`ArkUI_AttributeItem`]:
6938 ///
6939 /// .object: The parameter format is [`ArkUI-ListChildrenMainSize`]
6940 pub const NODE_LIST_CHILDREN_MAIN_SIZE: ArkUI_NodeAttributeType =
6941 ArkUI_NodeAttributeType(1003007);
6942}
6943#[cfg(feature = "api-12")]
6944#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6945impl ArkUI_NodeAttributeType {
6946 /// Set the index value of the item displayed at the start of the viewport
6947 /// when the current List is first loaded.This attribute can be set, reset, and obtained as required through APIs.
6948 ///
6949 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6950 ///
6951 /// .value[0].i32: index value of the item displayed at
6952 /// the start of the viewport when the current List is loaded for the first time. Default value: 0.
6953 ///
6954 ///
6955 ///
6956 /// Format of the return value [`ArkUI_AttributeItem`]:
6957 ///
6958 /// .value[0].i32: index value of the item displayed at
6959 /// the start of the viewport when the current List is loaded for the first time. Default value: 0.
6960 pub const NODE_LIST_INITIAL_INDEX: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003008);
6961}
6962#[cfg(feature = "api-12")]
6963#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6964impl ArkUI_NodeAttributeType {
6965 /// sets the ListItem splitter style. By default, there is no splitter.
6966 /// This attribute can be set, reset, and obtained as required through APIs.
6967 ///
6968 /// Attribute setting method parameter [`ArkUI_AttributeItem`] Format:
6969 ///
6970 /// .value[0].u32: divider color, type 0xargb;
6971 ///
6972 /// .value[1].f32: dividing line width;
6973 ///
6974 /// .value[2].f32: the distance between the divider and the beginning of the side of the list, unit vp;
6975 ///
6976 /// .value[3].f32: the distance between the divider and the end of the side of the list (unit: vp).
6977 ///
6978 ///
6979 ///
6980 /// Attribute fetch method return value [`ArkUI_AttributeItem`] format:
6981 ///
6982 /// .value[0].u32: divider color, type 0xargb;
6983 ///
6984 /// .value[1].f32: dividing line width;
6985 ///
6986 /// .value[2].f32: the distance between the divider and the beginning of the side of the list, unit vp;
6987 ///
6988 /// .value[3].f32: the distance between the divider and the end of the side of the list (unit: vp).
6989 pub const NODE_LIST_DIVIDER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1003009);
6990}
6991#[cfg(feature = "api-12")]
6992#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
6993impl ArkUI_NodeAttributeType {
6994 /// Defines whether to enable loop playback for the swiper.
6995 /// This attribute can be set, reset, and obtained as required through APIs.
6996 ///
6997 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
6998 ///
6999 /// .value[0].i32: whether to enable loop playback. The value <b>1</b> means to enable loop playback, and <b>0</b>
7000 /// means the opposite. The default value is <b>1/b>.
7001 ///
7002 ///
7003 ///
7004 /// Format of the return value [`ArkUI_AttributeItem`]:
7005 ///
7006 /// .value[0].i32: whether to enable loop playback. The value <b>1</b> means to enable loop playback, and <b>0</b>
7007 /// means the opposite. The default value is <b>1</b>.
7008 pub const NODE_SWIPER_LOOP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001000);
7009}
7010#[cfg(feature = "api-12")]
7011#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7012impl ArkUI_NodeAttributeType {
7013 /// Defines whether to enable automatic playback for child component switching in the swiper.
7014 /// This attribute can be set, reset, and obtained as required through APIs.
7015 ///
7016 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7017 ///
7018 /// .value[0].i32: whether to enable automatic playback for child component switching. The value <b>1</b>
7019 /// means to enable automatic playback, and <b>0</b> means the opposite. The default value is <b>0</b>.
7020 ///
7021 ///
7022 ///
7023 /// Format of the return value [`ArkUI_AttributeItem`]:
7024 ///
7025 /// .value[0].i32: whether to enable automatic playback for child component switching. The value <b>1</b> means
7026 /// to enable automatic playback, and <b>0</b> means the opposite. The default value is <b>0</b>.
7027 pub const NODE_SWIPER_AUTO_PLAY: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001001);
7028}
7029#[cfg(feature = "api-12")]
7030#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7031impl ArkUI_NodeAttributeType {
7032 /// Defines whether to enable the navigation point indicator for the swiper. This attribute can be set,
7033 /// reset, and obtained as required through APIs.
7034 ///
7035 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7036 ///
7037 /// .value[0].i32: whether to enable the navigation point indicator. The value <b>1</b> means to enable the
7038 /// navigation point indicator, and <b>0</b> means the opposite. The default value is <b>1</b>.
7039 ///
7040 ///
7041 ///
7042 /// Format of the return value [`ArkUI_AttributeItem`]:
7043 ///
7044 /// .value[0].i32: whether to enable the navigation point indicator. The value <b>1</b> means to enable the
7045 /// navigation point indicator, and <b>0</b> means the opposite. The default value is <b>1</b>.
7046 pub const NODE_SWIPER_SHOW_INDICATOR: ArkUI_NodeAttributeType =
7047 ArkUI_NodeAttributeType(1001002);
7048}
7049#[cfg(feature = "api-12")]
7050#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7051impl ArkUI_NodeAttributeType {
7052 /// Defines the interval for automatic playback. This attribute can be set, reset, and obtained as required
7053 /// through APIs.
7054 ///
7055 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7056 ///
7057 /// .value[0].f32: interval for automatic playback, in milliseconds.
7058 ///
7059 ///
7060 ///
7061 /// Format of the return value [`ArkUI_AttributeItem`]:
7062 ///
7063 /// .value[0].f32: interval for automatic playback, in milliseconds.
7064 pub const NODE_SWIPER_INTERVAL: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001003);
7065}
7066#[cfg(feature = "api-12")]
7067#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7068impl ArkUI_NodeAttributeType {
7069 /// Defines whether vertical swiping is used for the swiper. This attribute can be set, reset, and obtained
7070 /// as required through APIs.
7071 ///
7072 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7073 ///
7074 /// .value[0].i32: whether vertical swiping is used. The value <b>1</b> means that vertical swiping is used, and
7075 /// <b>0</b> means the opposite. The default value is <b>0</b>.
7076 ///
7077 ///
7078 ///
7079 /// Format of the return value [`ArkUI_AttributeItem`]:
7080 ///
7081 /// .value[0].i32: whether vertical swiping is used. The value <b>1</b> means that vertical swiping is used, and
7082 /// <b>0</b> means the opposite. The default value is <b>0</b>.
7083 pub const NODE_SWIPER_VERTICAL: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001004);
7084}
7085#[cfg(feature = "api-12")]
7086#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7087impl ArkUI_NodeAttributeType {
7088 /// Defines the duration of the animation for switching child components. This attribute can be set, reset,
7089 /// and obtained as required through APIs.
7090 ///
7091 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7092 ///
7093 /// .value[0].f32: duration of the animation for switching child components, in milliseconds. The default value is
7094 /// <b>400</b>.
7095 ///
7096 ///
7097 ///
7098 /// Format of the return value [`ArkUI_AttributeItem`]:
7099 ///
7100 /// .value[0].f32: duration of the animation for switching child components, in milliseconds. The default value is
7101 /// <b>400</b>.
7102 pub const NODE_SWIPER_DURATION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001005);
7103}
7104#[cfg(feature = "api-12")]
7105#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7106impl ArkUI_NodeAttributeType {
7107 /// Defines the animation curve for the swiper. This attribute can be set, reset, and obtained as required
7108 /// through APIs.
7109 ///
7110 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7111 ///
7112 /// .value[0].i32: animation curve. The parameter type is [`ArkUI_AnimationCurve`].
7113 /// The default value is <b>ARKUI_CURVE_LINEAR</b>.
7114 ///
7115 ///
7116 ///
7117 /// Format of the return value [`ArkUI_AttributeItem`]:
7118 ///
7119 /// .value[0].i32: animation curve. The parameter type is [`ArkUI_AnimationCurve`].
7120 /// The default value is <b>ARKUI_CURVE_LINEAR</b>.
7121 pub const NODE_SWIPER_CURVE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001006);
7122}
7123#[cfg(feature = "api-12")]
7124#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7125impl ArkUI_NodeAttributeType {
7126 /// Defines the spacing between child components in the swiper.
7127 /// This attribute can be set, reset, and obtained as required through APIs.
7128 ///
7129 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7130 ///
7131 /// .value[0].f32: spacing between child components.
7132 ///
7133 ///
7134 ///
7135 /// Format of the return value [`ArkUI_AttributeItem`]:
7136 ///
7137 /// .value[0].f32: spacing between child components.
7138 pub const NODE_SWIPER_ITEM_SPACE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001007);
7139}
7140#[cfg(feature = "api-12")]
7141#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7142impl ArkUI_NodeAttributeType {
7143 /// Defines the index of the child component currently displayed in the swiper.
7144 /// This attribute can be set, reset, and obtained as required through APIs.
7145 ///
7146 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7147 ///
7148 /// .value[0].i32: index value of the child component.
7149 ///
7150 ///
7151 ///
7152 /// Format of the return value [`ArkUI_AttributeItem`]:
7153 ///
7154 /// .value[0].i32: index value of the child component.
7155 pub const NODE_SWIPER_INDEX: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001008);
7156}
7157#[cfg(feature = "api-12")]
7158#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7159impl ArkUI_NodeAttributeType {
7160 /// Defines the number of elements to display per page.
7161 /// This attribute can be set, reset, and obtained as required through APIs.
7162 ///
7163 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7164 ///
7165 /// .value[0].i32: index value of the child component.
7166 ///
7167 ///
7168 ///
7169 /// Format of the return value [`ArkUI_AttributeItem`]:
7170 ///
7171 /// .value[0].i32: index value of the child component.
7172 pub const NODE_SWIPER_DISPLAY_COUNT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001009);
7173}
7174#[cfg(feature = "api-12")]
7175#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7176impl ArkUI_NodeAttributeType {
7177 /// Defines whether to disable the swipe feature.
7178 /// This attribute can be set, reset, and obtained as required through APIs.
7179 ///
7180 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7181 ///
7182 /// .value[0].i32: whether to disable the swipe feature. The value <b>1</b> means to disable
7183 /// the swipe feature, and <b>0</b> means the opposite. The default value is <b>0</b>.
7184 ///
7185 ///
7186 ///
7187 /// Format of the return value [`ArkUI_AttributeItem`]:
7188 ///
7189 /// .value[0].i32: whether to disable the swipe feature. The value <b>1</b> means to disable the swipe
7190 /// feature, and <b>0</b> means the opposite. The default value is <b>0</b>.
7191 pub const NODE_SWIPER_DISABLE_SWIPE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001010);
7192}
7193#[cfg(feature = "api-12")]
7194#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7195impl ArkUI_NodeAttributeType {
7196 /// Defines whether to show the arrow when the mouse pointer hovers over the navigation point indicator.
7197 /// This attribute can be set, reset, and obtained as required through APIs.
7198 ///
7199 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7200 ///
7201 /// .value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator.
7202 /// The parameter type is [`ArkUI_SwiperArrow`].
7203 ///
7204 /// The default value is <b>ARKUI_SWIPER_ARROW_HIDE</b>.
7205 ///
7206 ///
7207 ///
7208 /// Format of the return value [`ArkUI_AttributeItem`]:
7209 ///
7210 /// .value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator.
7211 /// The parameter type is [`ArkUI_SwiperArrow`].
7212 ///
7213 /// The default value is <b>ARKUI_SWIPER_ARROW_HIDE</b>.
7214 pub const NODE_SWIPER_SHOW_DISPLAY_ARROW: ArkUI_NodeAttributeType =
7215 ArkUI_NodeAttributeType(1001011);
7216}
7217#[cfg(feature = "api-12")]
7218#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7219impl ArkUI_NodeAttributeType {
7220 /// Defines the effect used at the edges of the swiper when the boundary of the scrollable content is reached.
7221 /// This attribute can be set, reset, and obtained as required through APIs.
7222 ///
7223 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7224 ///
7225 /// .value[0].i32: effect used at the edges of the swiper when the boundary of the scrollable content is reached.
7226 /// The parameter type is [`ArkUI_EdgeEffect`].
7227 ///
7228 /// The default value is <b>ARKUI_EDGE_EFFECT_SPRING</b>.
7229 ///
7230 ///
7231 ///
7232 /// Format of the return value [`ArkUI_AttributeItem`]:
7233 ///
7234 /// .value[0].i32: effect used at the edges of the swiper when the boundary of the scrollable content is reached.
7235 /// The parameter type is [`ArkUI_EdgeEffect`].
7236 pub const NODE_SWIPER_EDGE_EFFECT_MODE: ArkUI_NodeAttributeType =
7237 ArkUI_NodeAttributeType(1001012);
7238}
7239#[cfg(feature = "api-12")]
7240#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7241impl ArkUI_NodeAttributeType {
7242 /// Defines the swiper adapter. The attribute can be set, reset, and obtained as required through APIs.
7243 ///
7244 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7245 ///
7246 /// .object: [`ArkUI_NodeAdapter`] object as the adapter.
7247 pub const NODE_SWIPER_NODE_ADAPTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001013);
7248}
7249#[cfg(feature = "api-12")]
7250#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7251impl ArkUI_NodeAttributeType {
7252 /// Sets the number of cached items in the swiper adapter.
7253 /// This attribute can be set, reset, and obtained as required through APIs.
7254 ///
7255 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7256 ///
7257 /// .value[0].i32: number of cached items in the swiper adapter.
7258 pub const NODE_SWIPER_CACHED_COUNT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001014);
7259}
7260#[cfg(feature = "api-12")]
7261#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7262impl ArkUI_NodeAttributeType {
7263 /// Defines the front margin of the wiper.
7264 /// The attribute can be set, reset, and obtained as required through APIs.
7265 ///
7266 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7267 ///
7268 /// .value[0].f32: the front margin. The unit is vp. The default value is <b>0.0</b>
7269 ///
7270 /// .value[1]?.i32: whether to ignore blanks, the default value is 0.
7271 /// The value <b>1</b> means to ignore blank areas, and <b>0</b> means the opposite.
7272 ///
7273 /// Format of the return value [`ArkUI_AttributeItem`]:
7274 ///
7275 /// .value[0].f32: the front margin, the unit is vp.
7276 ///
7277 /// .value[1].i32: whether to ignore blank areas. The value <b>1</b> means to ignore blank areas, and <b>0</b> means
7278 /// the opposite.
7279 pub const NODE_SWIPER_PREV_MARGIN: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001015);
7280}
7281#[cfg(feature = "api-12")]
7282#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7283impl ArkUI_NodeAttributeType {
7284 /// Defines the back margin of the wiper.
7285 /// The attribute can be set, reset, and obtained as required through APIs.
7286 ///
7287 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7288 ///
7289 /// .value[0].f32: the back margin. The unit is vp. The default value is <b>0.0</b>
7290 ///
7291 /// .value[1]?.i32: whether to ignore blanks, the default value is 0.
7292 /// The value <b>1</b> means to ignore blank areas, and <b>0</b> means the opposite.
7293 ///
7294 /// Format of the return value [`ArkUI_AttributeItem`]:
7295 ///
7296 /// .value[0].f32: the back margin, the unit is vp.
7297 ///
7298 /// .value[1].i32: whether to ignore blank areas. The value <b>1</b> means to ignore blank areas, and <b>0</b> means
7299 /// the opposite.
7300 pub const NODE_SWIPER_NEXT_MARGIN: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001016);
7301}
7302#[cfg(feature = "api-12")]
7303#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7304impl ArkUI_NodeAttributeType {
7305 /// Defines the navigation indicator type of the swiper.
7306 /// The attribute can be set, reset, and obtained as required through APIs.
7307 ///
7308 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7309 ///
7310 /// .value[0].i32: navigation indicator type, the parameter type is [`ArkUI_SwiperIndicatorType`].
7311 ///
7312 /// .object: The parameter type is [`ArkUI_SwiperIndicator`].
7313 ///
7314 /// Format of the return value [`ArkUI_AttributeItem`]:
7315 ///
7316 /// .value[0].i32: navigation indicator type, the parameter type is [`ArkUI_SwiperIndicatorType`].
7317 ///
7318 /// .object: The parameter type is [`ArkUI_SwiperIndicator`].
7319 pub const NODE_SWIPER_INDICATOR: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001017);
7320}
7321#[cfg(feature = "api-12")]
7322#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7323impl ArkUI_NodeAttributeType {
7324 /// Set the nested scrolling mode for the Swiper component and parent component.
7325 ///
7326 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7327 ///
7328 /// .value[0].i32:Nested scrolling patterns for Swiper components and parent components. The parameter type is
7329 /// [`ArkUI_SwiperNestedScrollMode`]
7330 ///
7331 /// The default value is <b>ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY<b>
7332 ///
7333 ///
7334 ///
7335 /// Format of the return value [`ArkUI_AttributeItem`]:
7336 ///
7337 /// .value[0].i32:Nested scrolling patterns for Swiper components and parent components. The parameter type is
7338 /// [`ArkUI_SwiperNestedScrollMode`]
7339 pub const NODE_SWIPER_NESTED_SCROLL: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1001018);
7340}
7341#[cfg(feature = "api-12")]
7342#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7343impl ArkUI_NodeAttributeType {
7344 /// Set the switcher component to flip to the specified page.
7345 ///
7346 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7347 ///
7348 /// .value[0].i32:Specify the index value of the page in Swiper.
7349 ///
7350 /// .value[1]?.i32:Set whether there is an animation effect when flipping to the specified page. 1 indicates active
7351 /// effect, 0 indicates no active effect, default value is 0。
7352 pub const NODE_SWIPER_SWIPE_TO_INDEX: ArkUI_NodeAttributeType =
7353 ArkUI_NodeAttributeType(1001019);
7354}
7355#[cfg(feature = "api-12")]
7356#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7357impl ArkUI_NodeAttributeType {
7358 /// Set to disable component navigation point interaction function。
7359 ///
7360 /// Property setting method parameter [`ArkUI-AttributeItem`] format:
7361 ///
7362 /// .value[0].i32:Set to disable the interaction function of component navigation points. When set to true, it
7363 /// indicates that the navigation points are interactive. The default value is true.
7364 ///
7365 /// The return value of the attribute acquisition method is in the format of [`ArkUI-AttributeItem`]:
7366 ///
7367 /// .value[0].i32:Set to disable component navigation point interaction.
7368 pub const NODE_SWIPER_INDICATOR_INTERACTIVE: ArkUI_NodeAttributeType =
7369 ArkUI_NodeAttributeType(1001020);
7370}
7371#[cfg(feature = "api-12")]
7372#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7373impl ArkUI_NodeAttributeType {
7374 /// Set the delineation component of the ListItem, supporting property settings, property resets, and
7375 /// property acquisition interfaces.
7376 ///
7377 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
7378 ///
7379 /// .object: Construct using the [`ArkUI_ListitemSwipeActionOption`] object.
7380 ///
7381 ///
7382 ///
7383 /// The return value of the attribute acquisition method [`ArkUI_AttributeItem`] format:
7384 ///
7385 /// .object: Construct using the [`ArkUI_ListitemSwipeActionOption`] object.
7386 pub const NODE_LIST_ITEM_SWIPE_ACTION: ArkUI_NodeAttributeType =
7387 ArkUI_NodeAttributeType(1004000);
7388}
7389#[cfg(feature = "api-12")]
7390#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7391impl ArkUI_NodeAttributeType {
7392 /// Defines the header of the list item group.
7393 /// This attribute can be set, reset, and obtained as required through APIs.
7394 ///
7395 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7396 ///
7397 /// .object: [`ArkUI_NodeHandle`] object to be used as the header of the list item group.
7398 ///
7399 ///
7400 ///
7401 /// Format of the return value [`ArkUI_AttributeItem`]:
7402 ///
7403 /// .object: [`ArkUI_NodeHandle`] object to be used as the header of the list item group.
7404 pub const NODE_LIST_ITEM_GROUP_SET_HEADER: ArkUI_NodeAttributeType =
7405 ArkUI_NodeAttributeType(1005000);
7406}
7407#[cfg(feature = "api-12")]
7408#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7409impl ArkUI_NodeAttributeType {
7410 /// Defines the footer of the list item group. This attribute can be set, reset, and obtained as
7411 /// required through APIs.
7412 ///
7413 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7414 ///
7415 /// .object: [`ArkUI_NodeHandle`] object to be used as the footer of the list item group.
7416 ///
7417 ///
7418 ///
7419 /// Format of the return value [`ArkUI_AttributeItem`]:
7420 ///
7421 /// .object: [`ArkUI_NodeHandle`] object to be used as the footer of the list item group.
7422 pub const NODE_LIST_ITEM_GROUP_SET_FOOTER: ArkUI_NodeAttributeType =
7423 ArkUI_NodeAttributeType(1005001);
7424}
7425#[cfg(feature = "api-12")]
7426#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7427impl ArkUI_NodeAttributeType {
7428 /// Defines the style of the divider for the list items. This attribute can be set, reset, and obtained
7429 /// as required through APIs.
7430 ///
7431 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7432 ///
7433 /// .value[0].u32: color of the divider, in 0xARGB format.
7434 ///
7435 /// .value[1].f32: stroke width of the divider, in vp.
7436 ///
7437 /// .value[2].f32: distance between the divider and the start of the list, in vp.
7438 ///
7439 /// .value[3].f32: distance between the divider and the end of the list, in vp.
7440 ///
7441 ///
7442 ///
7443 ///
7444 /// Format of the return value [`ArkUI_AttributeItem`]:
7445 ///
7446 /// .value[0].u32: color of the divider, in 0xARGB format.
7447 ///
7448 /// .value[1].f32: stroke width of the divider, in vp.
7449 ///
7450 /// .value[2].f32: distance between the divider and the start of the list, in vp.
7451 ///
7452 /// .value[3].f32: distance between the divider and the end of the list, in vp.
7453 ///
7454 pub const NODE_LIST_ITEM_GROUP_SET_DIVIDER: ArkUI_NodeAttributeType =
7455 ArkUI_NodeAttributeType(1005002);
7456}
7457#[cfg(feature = "api-12")]
7458#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7459impl ArkUI_NodeAttributeType {
7460 /// Set the default spindle size for the ListItem Group subcomponent.
7461 ///
7462 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7463 ///
7464 /// .object: The parameter format is [`ArkUI-ListChildrenMainSize`]
7465 ///
7466 ///
7467 ///
7468 /// Format of the return value [`ArkUI_AttributeItem`]:
7469 ///
7470 /// .object: The parameter format is [`ArkUI-ListChildrenMainSize`]
7471 pub const NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE: ArkUI_NodeAttributeType =
7472 ArkUI_NodeAttributeType(1005003);
7473}
7474#[cfg(feature = "api-12")]
7475#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7476impl ArkUI_NodeAttributeType {
7477 /// Defines the horizontal alignment mode of child components in the column.
7478 /// This attribute can be set, reset, and obtained as required through APIs.
7479 ///
7480 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7481 ///
7482 /// .value[0].i32: horizontal alignment mode of child components.
7483 /// The parameter type is [`ArkUI_HorizontalAlignment`].
7484 ///
7485 /// Default value: <b>ARKUI_HORIZONTAL_ALIGNMENT_CENTER</b>.
7486 ///
7487 ///
7488 ///
7489 /// Format of the return value [`ArkUI_AttributeItem`]:
7490 ///
7491 /// .value[0].i32: horizontal alignment mode of child components.
7492 /// The parameter type is [`ArkUI_HorizontalAlignment`].
7493 pub const NODE_COLUMN_ALIGN_ITEMS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1006000);
7494}
7495#[cfg(feature = "api-12")]
7496#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7497impl ArkUI_NodeAttributeType {
7498 /// Defines the vertical alignment mode of child components in the column.
7499 /// This attribute can be set, reset, and obtained as required through APIs.
7500 ///
7501 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7502 ///
7503 /// .value[0].i32: vertical alignment mode of child components. The parameter type is [`ArkUI_FlexAlignment`].
7504 ///
7505 /// Default value: <b>ARKUI_FLEX_ALIGNMENT_START</b>.
7506 ///
7507 ///
7508 ///
7509 /// Format of the return value [`ArkUI_AttributeItem`]:
7510 ///
7511 /// .value[0].i32: vertical alignment mode of child components. The parameter type is [`ArkUI_FlexAlignment`].
7512 pub const NODE_COLUMN_JUSTIFY_CONTENT: ArkUI_NodeAttributeType =
7513 ArkUI_NodeAttributeType(1006001);
7514}
7515#[cfg(feature = "api-12")]
7516#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7517impl ArkUI_NodeAttributeType {
7518 /// Defines the vertical alignment mode of child components in the row.
7519 /// This attribute can be set, reset, and obtained as required through APIs.
7520 ///
7521 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7522 ///
7523 /// .value[0].i32: vertical alignment mode of child components.
7524 /// The parameter type is [`ArkUI_VerticalAlignment`].
7525 ///
7526 /// Default value: <b>ARKUI_VERTICAL_ALIGNMENT_CENTER</b>.
7527 ///
7528 ///
7529 ///
7530 /// Format of the return value [`ArkUI_AttributeItem`]:
7531 ///
7532 /// .value[0].i32: vertical alignment mode of child components.
7533 /// The parameter type is [`ArkUI_VerticalAlignment`].
7534 pub const NODE_ROW_ALIGN_ITEMS: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1007000);
7535}
7536#[cfg(feature = "api-12")]
7537#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7538impl ArkUI_NodeAttributeType {
7539 /// Defines the horizontal alignment mode of child components in the row.
7540 /// This attribute can be set, reset, and obtained as required through APIs.
7541 ///
7542 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7543 ///
7544 /// .value[0].i32: horizontal alignment mode of child components.
7545 /// The parameter type is [`ArkUI_FlexAlignment`].
7546 ///
7547 /// Default value: <b>ARKUI_FLEX_ALIGNMENT_START</b>.
7548 ///
7549 ///
7550 ///
7551 /// Format of the return value [`ArkUI_AttributeItem`]:
7552 ///
7553 /// .value[0].i32: horizontal alignment mode of child components.
7554 /// The parameter type is [`ArkUI_FlexAlignment`].
7555 pub const NODE_ROW_JUSTIFY_CONTENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1007001);
7556}
7557#[cfg(feature = "api-12")]
7558#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7559impl ArkUI_NodeAttributeType {
7560 /// Defines the flex attribute. This attribute can be set, reset, and obtained as required through APIs.
7561 ///
7562 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7563 ///
7564 /// .value[0]?.i32: direction in which flex items are arranged. The parameter type is [`ArkUI_FlexDirection`].
7565 /// The default value is <b>ARKUI_FLEX_DIRECTION_ROW</b>.
7566 ///
7567 /// .value[1]?.i32: how the flex items are wrapped. The parameter type is [`ArkUI_FlexWrap`].
7568 /// The default value is <b>ARKUI_FLEX_WRAP_NO_WRAP</b>.
7569 ///
7570 /// .value[2]?.i32: alignment mode along the main axis. The parameter type is [`ArkUI_FlexAlignment`].
7571 /// The default value is <b>ARKUI_FLEX_ALIGNMENT_START</b>.
7572 ///
7573 /// .value[3]?.i32: alignment mode along the cross axis. The parameter type is [`ArkUI_ItemAlignment`].
7574 /// The default value is <b>ARKUI_ITEM_ALIGNMENT_START</b>.
7575 ///
7576 /// .value[4]?.i32: alignment mode along the cross axis for multi-line content. The parameter type is
7577 /// [`ArkUI_FlexAlignment`]. The default value is <b>ARKUI_FLEX_ALIGNMENT_START</b>.
7578 ///
7579 ///
7580 ///
7581 /// Format of the return value [`ArkUI_AttributeItem`]:
7582 ///
7583 /// .value[0].i32: direction in which flex items are arranged.
7584 ///
7585 /// .value[1].i32: how the flex items are wrapped.
7586 ///
7587 /// .value[2].i32: alignment mode along the main axis.
7588 ///
7589 /// .value[3].i32: alignment mode along the cross axis.
7590 ///
7591 /// .value[4].i32: alignment mode along the cross axis for multi-line content.
7592 pub const NODE_FLEX_OPTION: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1008000);
7593}
7594#[cfg(feature = "api-12")]
7595#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7596impl ArkUI_NodeAttributeType {
7597 /// Sets whether the component is being refreshed.
7598 /// This attribute can be set and obtained as required through APIs.
7599 ///
7600 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7601 ///
7602 /// .value[0].i32: The parameter type is 1 or 0.
7603 ///
7604 ///
7605 /// Format of the return value [`ArkUI_AttributeItem`]:
7606 ///
7607 /// .value[0].i32: The parameter type is 1 or 0.
7608 pub const NODE_REFRESH_REFRESHING: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1009000);
7609}
7610#[cfg(feature = "api-12")]
7611#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7612impl ArkUI_NodeAttributeType {
7613 /// Sets the custom content in the pull-down area.
7614 /// This attribute can be set, reset, and obtained as required through APIs.
7615 ///
7616 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7617 ///
7618 /// .object: The parameter type is [`ArkUI_NodeHandle`].
7619 pub const NODE_REFRESH_CONTENT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1009001);
7620}
7621#[cfg(feature = "api-12")]
7622#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7623impl ArkUI_NodeAttributeType {
7624 /// Set the pull-down hand coefficient.
7625 /// This attribute can be set, reset, and obtained as required through APIs.
7626 ///
7627 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7628 ///
7629 /// .value[0].f32:Pull-down hand coefficient, valid value between 0 and 1.
7630 ///
7631 ///
7632 /// Format of the return value [`ArkUI_AttributeItem`]:
7633 ///
7634 /// .value[0].f32:Pull-down hand coefficient, valid value between 0 and 1.
7635 pub const NODE_REFRESH_PULL_DOWN_RATIO: ArkUI_NodeAttributeType =
7636 ArkUI_NodeAttributeType(1009002);
7637}
7638#[cfg(feature = "api-12")]
7639#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7640impl ArkUI_NodeAttributeType {
7641 /// Sets the pull-down offset that initiates a refresh.
7642 /// This attribute can be set, reset, and obtained as required through APIs.
7643 ///
7644 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7645 ///
7646 /// .value[0].f32: pull-down offset, in vp. The default value is <b>64vp</b>.
7647 ///
7648 ///
7649 /// Format of the return value [`ArkUI_AttributeItem`]:
7650 ///
7651 /// .value[0].f32: pull-down offset, in vp. The default value is <b>64vp</b>.
7652 pub const NODE_REFRESH_OFFSET: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1009003);
7653}
7654#[cfg(feature = "api-12")]
7655#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7656impl ArkUI_NodeAttributeType {
7657 /// Sets whether to initiate a refresh when the pull-down distance exceeds the value of <b>refreshOffset</b>.
7658 /// This attribute can be set, reset, and obtained as required through APIs.
7659 ///
7660 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7661 ///
7662 /// .value[0].i32: whether to initiate a refresh. The value <b>true</b> means to initiate a refresh, and
7663 /// <b>false</b> means the opposite.
7664 ///
7665 ///
7666 /// Format of the return value [`ArkUI_AttributeItem`]:
7667 ///
7668 /// .value[0].i32: whether to initiate a refresh. The value <b>1</b> means to initiate a refresh, and
7669 /// <b>0</b> means the opposite.
7670 pub const NODE_REFRESH_PULL_TO_REFRESH: ArkUI_NodeAttributeType =
7671 ArkUI_NodeAttributeType(1009004);
7672}
7673#[cfg(feature = "api-12")]
7674#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7675impl ArkUI_NodeAttributeType {
7676 /// Defines the main axis direction of the <b><WaterFlow></b> component layout.
7677 /// This attribute can be set, reset, and obtained as required through APIs.
7678 ///
7679 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7680 ///
7681 /// .value[0].i32: main axis direction. The parameter type is [`ArkUI_FlexDirection`].
7682 ///
7683 ///
7684 /// Format of the return value [`ArkUI_AttributeItem`]:
7685 ///
7686 /// .value[0].i32: main axis direction. The parameter type is [`ArkUI_FlexDirection`].
7687 pub const NODE_WATER_FLOW_LAYOUT_DIRECTION: ArkUI_NodeAttributeType =
7688 ArkUI_NodeAttributeType(1010000);
7689}
7690#[cfg(feature = "api-12")]
7691#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7692impl ArkUI_NodeAttributeType {
7693 /// Sets the number of columns in the water flow layout. If this parameter is not set, one column is used
7694 /// by default. This attribute can be set, reset, and obtained as required through APIs.
7695 /// For example, <b>'1fr 1fr 2fr'</b> indicates three columns, with the first column taking up 1/4 of the parent
7696 /// component's full width, the second column 1/4, and the third column 2/4.
7697 /// You can use <b>columnsTemplate('repeat(auto-fill,track-size)')</b> to automatically calculate the number of
7698 /// columns based on the specified column width <b>track-size</b>.
7699 /// <b>repeat</b> and <b>auto-fill</b> are keywords. The units for <b>track-size</b> can be px, vp (default), %,
7700 /// or a valid number.
7701 ///
7702 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7703 ///
7704 /// .string: number of columns in the layout.
7705 ///
7706 ///
7707 ///
7708 /// Format of the return value [`ArkUI_AttributeItem`]:
7709 ///
7710 /// .string: number of columns in the layout.
7711 pub const NODE_WATER_FLOW_COLUMN_TEMPLATE: ArkUI_NodeAttributeType =
7712 ArkUI_NodeAttributeType(1010001);
7713}
7714#[cfg(feature = "api-12")]
7715#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7716impl ArkUI_NodeAttributeType {
7717 /// Sets the number of rows in the water flow layout. If this parameter is not set, one row is used
7718 /// by default. This attribute can be set, reset, and obtained as required through APIs.
7719 /// For example, <b>'1fr 1fr 2fr'</b> indicates three rows, with the first row taking up 1/4 of the parent
7720 /// component's full height, the second row 1/4, and the third row 2/4.
7721 /// You can use <b>rowsTemplate('repeat(auto-fill,track-size)')</b> to automatically calculate the number of rows
7722 /// based on the specified row height <b>track-size</b>.
7723 /// <b>repeat</b> and <b>auto-fill</b> are keywords. The units for <b>track-size</b> can be px, vp (default), %,
7724 /// or a valid number.
7725 ///
7726 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7727 ///
7728 /// .string: number of rows in the layout.
7729 ///
7730 ///
7731 ///
7732 /// Format of the return value [`ArkUI_AttributeItem`]:
7733 ///
7734 /// .string: number of rows in the layout.
7735 pub const NODE_WATER_FLOW_ROW_TEMPLATE: ArkUI_NodeAttributeType =
7736 ArkUI_NodeAttributeType(1010002);
7737}
7738#[cfg(feature = "api-12")]
7739#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7740impl ArkUI_NodeAttributeType {
7741 /// Sets the gap between columns.
7742 /// This attribute can be set, reset, and obtained as required through APIs.
7743 ///
7744 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7745 ///
7746 /// .value[0].f32: gap between columns, in vp.
7747 ///
7748 ///
7749 ///
7750 /// Format of the return value [`ArkUI_AttributeItem`]:
7751 ///
7752 /// .value[0].f32: gap between columns, in vp.
7753 pub const NODE_WATER_FLOW_COLUMN_GAP: ArkUI_NodeAttributeType =
7754 ArkUI_NodeAttributeType(1010003);
7755}
7756#[cfg(feature = "api-12")]
7757#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7758impl ArkUI_NodeAttributeType {
7759 /// Sets the gap between rows.
7760 /// This attribute can be set, reset, and obtained as required through APIs.
7761 ///
7762 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7763 ///
7764 /// .value[0].f32: gap between lines, in vp.
7765 ///
7766 ///
7767 ///
7768 /// Format of the return value [`ArkUI_AttributeItem`]:
7769 ///
7770 /// .value[0].f32: gap between lines, in vp.
7771 pub const NODE_WATER_FLOW_ROW_GAP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1010004);
7772}
7773#[cfg(feature = "api-12")]
7774#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7775impl ArkUI_NodeAttributeType {
7776 /// Defines the water flow section configuration.
7777 /// This attribute can be set, reset, and obtained as required through APIs.
7778 ///
7779 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7780 ///
7781 /// .value[0].i32: An index calculated from 0 is converted to an integer,
7782 /// indicating that you want to start changing the position of the group.
7783 /// .object: [`ArkUI_WaterFlowSectionOption`] object.
7784 ///
7785 ///
7786 ///
7787 /// Format of the return value [`ArkUI_AttributeItem`]:
7788 ///
7789 /// .object: [`ArkUI_WaterFlowSectionOption`] object.
7790 pub const NODE_WATER_FLOW_SECTION_OPTION: ArkUI_NodeAttributeType =
7791 ArkUI_NodeAttributeType(1010005);
7792}
7793#[cfg(feature = "api-12")]
7794#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7795impl ArkUI_NodeAttributeType {
7796 /// Defines the water flow adapter. The attribute can be set, reset, and obtained as required through APIs.
7797 ///
7798 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7799 ///
7800 /// .object: [`ArkUI_NodeAdapter`] object as the adapter.
7801 pub const NODE_WATER_FLOW_NODE_ADAPTER: ArkUI_NodeAttributeType =
7802 ArkUI_NodeAttributeType(1010006);
7803}
7804#[cfg(feature = "api-12")]
7805#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7806impl ArkUI_NodeAttributeType {
7807 /// Sets the number of cached items in the water flow adapter.
7808 /// This attribute can be set, reset, and obtained as required through APIs.
7809 ///
7810 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7811 ///
7812 /// .value[0].i32: number of cached items in the water flowadapter.
7813 pub const NODE_WATER_FLOW_CACHED_COUNT: ArkUI_NodeAttributeType =
7814 ArkUI_NodeAttributeType(1010007);
7815}
7816#[cfg(feature = "api-12")]
7817#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7818impl ArkUI_NodeAttributeType {
7819 /// Set the custom display component at the end of the waterfall flow component.
7820 ///
7821 /// Attribute setting method [`ArkUI_AttributeItem`] parameter format:
7822 ///
7823 /// .object: Parameter type [`ArkUI_NodeHandle`].
7824 pub const NODE_WATER_FLOW_FOOTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1010008);
7825}
7826#[cfg(feature = "api-12")]
7827#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7828impl ArkUI_NodeAttributeType {
7829 /// Scroll to the specified index.
7830 ///
7831 /// When activating the smooth animation, all items passed through will be loaded and layout calculated, which can
7832 /// lead to performance issues when loading a large number of items.
7833 ///
7834 ///
7835 ///
7836 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7837 ///
7838 /// .value[0].i32:The index value of the target element to be slid to in the current container.
7839 ///
7840 /// .value[1]?.i32:Set whether there is an action when sliding to the index value of a list item in the list, where
7841 /// 1 indicates an action and 0 indicates no action. Default value is 0。
7842 ///
7843 /// .value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is
7844 /// [`ArkUI_ScrollAlignment`]. Default value is </b>ARKUI_SCROLL_ALIGNMENT_START</b>。
7845 pub const NODE_WATER_FLOW_SCROLL_TO_INDEX: ArkUI_NodeAttributeType =
7846 ArkUI_NodeAttributeType(1010009);
7847}
7848#[cfg(feature = "api-12")]
7849#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7850impl ArkUI_NodeAttributeType {
7851 /// Defines the size constraints to apply to water flow items.
7852 /// This attribute can be set, reset, and obtained as required through APIs.
7853 ///
7854 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7855 ///
7856 /// .value[0].f32: minimum width, in vp.
7857 ///
7858 /// .value[1].f32: maximum width, in vp.
7859 ///
7860 /// .value[2].f32: minimum height, in vp.
7861 ///
7862 /// .value[3].f32: maximum height, in vp.
7863 ///
7864 ///
7865 ///
7866 /// Format of the return value [`ArkUI_AttributeItem`]:
7867 ///
7868 /// .value[0].f32: minimum width, in vp.
7869 ///
7870 /// .value[1].f32: maximum width, in vp.
7871 ///
7872 /// .value[2].f32: minimum height, in vp.
7873 ///
7874 /// .value[3].f32: maximum height, in vp.
7875 pub const NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE: ArkUI_NodeAttributeType =
7876 ArkUI_NodeAttributeType(1010010);
7877}
7878#[cfg(feature = "api-12")]
7879#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7880impl ArkUI_NodeAttributeType {
7881 /// Set the auxiliary line in the RelativeContaine container, supporting property setting,
7882 /// property reset and property acquisition interfaces.
7883 ///
7884 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
7885 ///
7886 /// .object: Auxiliary lines within the RelativeContaine container:
7887 ///
7888 ///
7889 ///
7890 /// Attribute acquisition method return value [`ArkUI_AttributeItem`] format:
7891 ///
7892 /// .object: Auxiliary lines within the RelativeContaine container:
7893 pub const NODE_RELATIVE_CONTAINER_GUIDE_LINE: ArkUI_NodeAttributeType =
7894 ArkUI_NodeAttributeType(1012000);
7895}
7896#[cfg(feature = "api-12")]
7897#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7898impl ArkUI_NodeAttributeType {
7899 /// Sets the barrier within the RelativeContaine container and supports property setting,
7900 /// property reset and property acquisition interfaces.
7901 ///
7902 /// Attribute setting method parameter [`ArkUI_AttributeItem`] format:
7903 ///
7904 /// .object: Auxiliary lines within the RelativeContaine container:
7905 ///
7906 ///
7907 ///
7908 /// Attribute acquisition method return value [`ArkUI_AttributeItem`] format:
7909 ///
7910 /// .object: Barrier within the RelativeContaine container:
7911 pub const NODE_RELATIVE_CONTAINER_BARRIER: ArkUI_NodeAttributeType =
7912 ArkUI_NodeAttributeType(1012001);
7913}
7914#[cfg(feature = "api-12")]
7915#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7916impl ArkUI_NodeAttributeType {
7917 /// Sets the number of columns in the grid layout. If this parameter is not set, one column is used
7918 /// by default. This attribute can be set, reset, and obtained as required through APIs.
7919 /// For example, <b>'1fr 1fr 2fr'</b> indicates three columns, with the first column taking up 1/4 of the parent
7920 /// component's full width, the second column 1/4, and the third column 2/4.
7921 /// You can use <b>columnsTemplate('repeat(auto-fill,track-size)')</b> to automatically calculate the number of
7922 /// columns based on the specified column width <b>track-size</b>.
7923 /// <b>repeat</b> and <b>auto-fill</b> are keywords. The units for <b>track-size</b> can be px, vp (default), %,
7924 /// or a valid number.
7925 ///
7926 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7927 ///
7928 /// .string: number of columns in the layout.
7929 ///
7930 ///
7931 ///
7932 /// Format of the return value [`ArkUI_AttributeItem`]:
7933 ///
7934 /// .string: number of columns in the layout.
7935 pub const NODE_GRID_COLUMN_TEMPLATE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1013000);
7936}
7937#[cfg(feature = "api-12")]
7938#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7939impl ArkUI_NodeAttributeType {
7940 /// Sets the number of rows in the grid layout. If this parameter is not set, one row is used
7941 /// by default. This attribute can be set, reset, and obtained as required through APIs.
7942 /// For example, <b>'1fr 1fr 2fr'</b> indicates three rows, with the first row taking up 1/4 of the parent
7943 /// component's full height, the second row 1/4, and the third row 2/4.
7944 /// You can use <b>rowsTemplate('repeat(auto-fill,track-size)')</b> to automatically calculate the number of rows
7945 /// based on the specified row height <b>track-size</b>.
7946 /// <b>repeat</b> and <b>auto-fill</b> are keywords. The units for <b>track-size</b> can be px, vp (default), %,
7947 /// or a valid number.
7948 ///
7949 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7950 ///
7951 /// .string: number of rows in the layout.
7952 ///
7953 ///
7954 ///
7955 /// Format of the return value [`ArkUI_AttributeItem`]:
7956 ///
7957 /// .string: number of rows in the layout.
7958 pub const NODE_GRID_ROW_TEMPLATE: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1013001);
7959}
7960#[cfg(feature = "api-12")]
7961#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7962impl ArkUI_NodeAttributeType {
7963 /// Sets the gap between columns. This attribute can be set, reset, and obtained as required through APIs.
7964 ///
7965 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7966 ///
7967 /// .value[0].f32: gap between columns, in vp.
7968 ///
7969 ///
7970 ///
7971 /// Format of the return value [`ArkUI_AttributeItem`]:
7972 ///
7973 /// .value[0].f32: gap between columns, in vp.
7974 pub const NODE_GRID_COLUMN_GAP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1013002);
7975}
7976#[cfg(feature = "api-12")]
7977#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7978impl ArkUI_NodeAttributeType {
7979 /// Sets the gap between rows. This attribute can be set, reset, and obtained as required through APIs.
7980 ///
7981 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7982 ///
7983 /// .value[0].f32: gap between lines, in vp.
7984 ///
7985 ///
7986 ///
7987 /// Format of the return value [`ArkUI_AttributeItem`]:
7988 ///
7989 /// .value[0].f32: gap between lines, in vp.
7990 pub const NODE_GRID_ROW_GAP: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1013003);
7991}
7992#[cfg(feature = "api-12")]
7993#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
7994impl ArkUI_NodeAttributeType {
7995 /// Defines the grid adapter. The attribute can be set, reset, and obtained as required through APIs.
7996 ///
7997 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
7998 ///
7999 /// .object: [`ArkUI_NodeAdapter`] object as the adapter.
8000 pub const NODE_GRID_NODE_ADAPTER: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1013004);
8001}
8002#[cfg(feature = "api-12")]
8003#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8004impl ArkUI_NodeAttributeType {
8005 /// Sets the number of cached items in the grid adapter.
8006 /// This attribute can be set, reset, and obtained as required through APIs.
8007 ///
8008 /// Format of the [`ArkUI_AttributeItem`] parameter for setting the attribute:
8009 ///
8010 /// .value[0].i32: number of cached items in the grid adapter.
8011 pub const NODE_GRID_CACHED_COUNT: ArkUI_NodeAttributeType = ArkUI_NodeAttributeType(1013005);
8012}
8013#[repr(transparent)]
8014/// Defines the ArkUI style attributes that can be set on the native side.
8015///
8016///
8017/// Available since API-level: 12
8018#[cfg(feature = "api-12")]
8019#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8020#[derive(Clone, Hash, PartialEq, Eq)]
8021pub struct ArkUI_NodeAttributeType(pub ::core::ffi::c_uint);
8022/// Defines the parameter type of the component callback event.
8023///
8024///
8025/// Available since API-level: 12
8026#[cfg(feature = "api-12")]
8027#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8028#[repr(C)]
8029pub struct ArkUI_NodeComponentEvent {
8030 /// Data array object.
8031 pub data: [ArkUI_NumberValue; 12usize],
8032}
8033/// Defines the string type parameter used by the component callback event.
8034///
8035///
8036/// Available since API-level: 12
8037#[cfg(feature = "api-12")]
8038#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8039#[repr(C)]
8040pub struct ArkUI_StringAsyncEvent {
8041 /// String.
8042 pub pStr: *const ::core::ffi::c_char,
8043}
8044#[cfg(feature = "api-12")]
8045#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8046impl ArkUI_NodeEventType {
8047 /// Defines the gesture event type.
8048 ///
8049 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8050 /// [`ArkUI_UIInputEvent`].
8051 pub const NODE_TOUCH_EVENT: ArkUI_NodeEventType = ArkUI_NodeEventType(0);
8052}
8053#[cfg(feature = "api-12")]
8054#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8055impl ArkUI_NodeEventType {
8056 /// Defines the mount event.
8057 ///
8058 /// This event is triggered when the component is mounted and displayed.
8059 ///
8060 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8061 /// [`ArkUI_NodeComponentEvent`].
8062 ///
8063 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
8064 pub const NODE_EVENT_ON_APPEAR: ArkUI_NodeEventType = ArkUI_NodeEventType(1);
8065}
8066#[cfg(feature = "api-12")]
8067#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8068impl ArkUI_NodeEventType {
8069 /// Defines the unmount event.
8070 ///
8071 /// This event is triggered when the component is unmounted and hidden.
8072 ///
8073 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8074 /// [`ArkUI_NodeComponentEvent`].
8075 ///
8076 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
8077 pub const NODE_EVENT_ON_DISAPPEAR: ArkUI_NodeEventType = ArkUI_NodeEventType(2);
8078}
8079#[cfg(feature = "api-12")]
8080#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8081impl ArkUI_NodeEventType {
8082 /// Defines the area change event.
8083 ///
8084 /// This event is triggered when the component's size, position, or any other attribute that may
8085 /// affect its display area changes.
8086 ///
8087 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8088 /// [`ArkUI_NodeComponentEvent`].
8089 ///
8090 /// [`ArkUI_NodeComponentEvent`] contains 12 parameters:
8091 ///
8092 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: original width of the target element, in vp.
8093 /// The value type is number.
8094 ///
8095 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: original height of the target element, in vp.
8096 /// The value type is number.
8097 ///
8098 /// <b>ArkUI_NodeComponentEvent.data[2].f32</b>: original X coordinate of the target element's upper left corner
8099 /// relative to the parent element's, in vp. The value type is number.
8100 ///
8101 /// <b>ArkUI_NodeComponentEvent.data[3].f32</b>: original Y coordinate of the target element's upper left corner
8102 /// relative to the parent element's, in vp. The value type is number.
8103 ///
8104 /// <b>ArkUI_NodeComponentEvent.data[4].f32</b>: original X coordinate of the target element's upper left corner
8105 /// relative to the page's, in vp. The value type is number.
8106 ///
8107 /// <b>ArkUI_NodeComponentEvent.data[5].f32</b>: original Y coordinate of the target element's upper left corner
8108 /// relative to the page's, in vp. The value type is number.
8109 ///
8110 /// <b>ArkUI_NodeComponentEvent.data[6].f32</b>: new width of the target element, in vp. The value is a number.
8111 ///
8112 /// <b>ArkUI_NodeComponentEvent.data[7].f32</b>: new height of the target element, in vp. The value is a number.
8113 ///
8114 /// <b>ArkUI_NodeComponentEvent.data[8].f32</b>: new X coordinate of the target element's upper left corner relative
8115 /// to the parent element's, in vp. The value type is number.
8116 ///
8117 /// <b>ArkUI_NodeComponentEvent.data[9].f32</b>: new Y coordinate of the target element's upper left corner relative
8118 /// to the parent element's, in vp. The value type is number.
8119 ///
8120 /// <b>ArkUI_NodeComponentEvent.data[10].f32</b>: new X coordinate of the target element's upper left corner relative
8121 /// to the page's, in vp. The value type is number.
8122 ///
8123 /// <b>ArkUI_NodeComponentEvent.data[11].f32</b>: new Y coordinate of the target element's upper left corner relative
8124 /// to the page's, in vp. The value type is number.
8125 pub const NODE_EVENT_ON_AREA_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(3);
8126}
8127#[cfg(feature = "api-12")]
8128#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8129impl ArkUI_NodeEventType {
8130 /// Defines the focus event.
8131 ///
8132 /// This event is triggered when the component obtains the focus.
8133 ///
8134 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8135 /// [`ArkUI_NodeComponentEvent`].
8136 ///
8137 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
8138 pub const NODE_ON_FOCUS: ArkUI_NodeEventType = ArkUI_NodeEventType(4);
8139}
8140#[cfg(feature = "api-12")]
8141#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8142impl ArkUI_NodeEventType {
8143 /// Defines the blur event.
8144 ///
8145 /// This event is triggered when the component loses the focus.
8146 ///
8147 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8148 /// [`ArkUI_NodeComponentEvent`].
8149 ///
8150 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
8151 pub const NODE_ON_BLUR: ArkUI_NodeEventType = ArkUI_NodeEventType(5);
8152}
8153#[cfg(feature = "api-12")]
8154#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8155impl ArkUI_NodeEventType {
8156 /// Defines the click event.
8157 ///
8158 /// This event is triggered when the component is clicked.
8159 ///
8160 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8161 /// [`ArkUI_NodeComponentEvent`].
8162 ///
8163 /// [`ArkUI_NodeComponentEvent`] contains 12 parameters:
8164 ///
8165 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: X coordinate of the click relative to the upper left corner of the
8166 /// clicked component's original area, in vp.
8167 ///
8168 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: Y coordinate of the click relative to the upper left corner of the
8169 /// clicked component's original area, in vp.
8170 ///
8171 /// <b>ArkUI_NodeComponentEvent.data[2].f32</b>: event timestamp. It is the interval between the time when the event
8172 /// is triggered and the time when the system starts, in microseconds.
8173 ///
8174 /// <b>ArkUI_NodeComponentEvent.data[3].i32</b>: event input device. The value <b>1</b> indicates the mouse,
8175 /// <b>2</b> indicates the touchscreen, and <b>4</b> indicates the key.
8176 ///
8177 /// <b>ArkUI_NodeComponentEvent.data[4].f32</b>: X coordinate of the click relative to the upper left corner of the
8178 /// application window, in vp.
8179 ///
8180 /// <b>ArkUI_NodeComponentEvent.data[5].f32</b>: Y coordinate of the click relative to the upper left corner of the
8181 /// application window, in vp.
8182 ///
8183 /// <b>ArkUI_NodeComponentEvent.data[6].f32</b>: X coordinate of the click relative to the upper left corner of the
8184 /// application screen, in vp.
8185 ///
8186 /// <b>ArkUI_NodeComponentEvent.data[7].f32</b>: Y coordinate of the click relative to the upper left corner of the
8187 /// application screen, in vp.
8188 pub const NODE_ON_CLICK: ArkUI_NodeEventType = ArkUI_NodeEventType(6);
8189}
8190#[cfg(feature = "api-12")]
8191#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8192impl ArkUI_NodeEventType {
8193 /// Defines event interception.
8194 ///
8195 /// This event is triggered when the component is touched.
8196 ///
8197 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8198 /// [`ArkUI_UIInputEvent`].
8199 pub const NODE_ON_TOUCH_INTERCEPT: ArkUI_NodeEventType = ArkUI_NodeEventType(7);
8200}
8201#[cfg(feature = "api-12")]
8202#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8203impl ArkUI_NodeEventType {
8204 /// Defines the visible area change event.
8205 ///
8206 /// This event is triggered when the ratio of the component's visible area to its total area is greater than or less
8207 /// than the threshold.
8208 /// Before registering this event, you must set <b>NODE_VISIBLE_AREA_CHANGE_RATIO</b>.
8209 ///
8210 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8211 /// [`ArkUI_NodeComponentEvent`].
8212 ///
8213 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
8214 ///
8215 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: how the ratio of the component's visible area to its total area
8216 /// changes compared to the previous one. The value <b>1</b> indicates an increase, and <b>0</b> indicates a
8217 /// decrease.
8218 ///
8219 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: ratio of the component's visible area to its total area when this
8220 /// callback is invoked.
8221 pub const NODE_EVENT_ON_VISIBLE_AREA_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(8);
8222}
8223#[cfg(feature = "api-12")]
8224#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8225impl ArkUI_NodeEventType {
8226 /// Defines the event triggered when the mouse pointer is moved over or away from the component.
8227 ///
8228 ///
8229 ///
8230 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8231 /// [`ArkUI_NodeComponentEvent`].
8232 ///
8233 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8234 ///
8235 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: whether the mouse pointer is hovered over the component.
8236 /// The value <b>1</b> indicates that the mouse pointer is hovered over the component, and <b>0</b> indicates that
8237 /// the mouse pointer is moved away from the component.
8238 pub const NODE_ON_HOVER: ArkUI_NodeEventType = ArkUI_NodeEventType(9);
8239}
8240#[cfg(feature = "api-12")]
8241#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8242impl ArkUI_NodeEventType {
8243 /// Defines the click event.
8244 ///
8245 /// This event is triggered when the component is clicked by a mouse device button or when the mouse pointer moves
8246 /// within the component.
8247 ///
8248 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8249 /// [`ArkUI_UIInputEvent`].
8250 pub const NODE_ON_MOUSE: ArkUI_NodeEventType = ArkUI_NodeEventType(10);
8251}
8252#[cfg(feature = "api-12")]
8253#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8254impl ArkUI_NodeEventType {
8255 /// Defines the attach event.
8256 ///
8257 /// This event is triggered when the component is attached.
8258 ///
8259 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8260 /// [`ArkUI_NodeComponentEvent`].
8261 ///
8262 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
8263 pub const NODE_EVENT_ON_ATTACH: ArkUI_NodeEventType = ArkUI_NodeEventType(11);
8264}
8265#[cfg(feature = "api-12")]
8266#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8267impl ArkUI_NodeEventType {
8268 /// Defines the detach event.
8269 ///
8270 /// This event is triggered when the component is detached.
8271 ///
8272 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8273 /// [`ArkUI_NodeComponentEvent`].
8274 ///
8275 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
8276 pub const NODE_EVENT_ON_DETACH: ArkUI_NodeEventType = ArkUI_NodeEventType(12);
8277}
8278#[cfg(feature = "api-12")]
8279#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8280impl ArkUI_NodeEventType {
8281 /// Defines the accessibility action event.
8282 ///
8283 /// This event is triggered when The accessibility operation type has been set and
8284 /// corresponding operations have been carried out.
8285 ///
8286 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8287 /// [`ArkUI_NodeComponentEvent`].
8288 ///
8289 /// [`ArkUI_NodeComponentEvent`] contains one parameters:
8290 ///
8291 /// <b>ArkUI_NodeComponentEvent.data[0].u32</b>: accessibility action type,the union type is
8292 /// [`ArkUI_AccessibilityActionType`]
8293 pub const NODE_ON_ACCESSIBILITY_ACTIONS: ArkUI_NodeEventType = ArkUI_NodeEventType(13);
8294}
8295#[cfg(feature = "api-12")]
8296#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8297impl ArkUI_NodeEventType {
8298 /// Notifies the listener of the interaction state prior to a drop and drop operation.
8299 ///
8300 /// This event is triggered when a drag operation is about to start on a draggable item.
8301 ///
8302 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8303 /// [`ArkUI_NodeComponentEvent`].
8304 ///
8305 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8306 ///
8307 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: corresponds to [`ArkUI_PreDragStatus`].
8308 pub const NODE_ON_PRE_DRAG: ArkUI_NodeEventType = ArkUI_NodeEventType(14);
8309}
8310#[cfg(feature = "api-12")]
8311#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8312impl ArkUI_NodeEventType {
8313 /// Called when the user starts to drag an ite
8314 ///
8315 /// A drag operation is recognized only when the dragged item is moved far enough.
8316 ///
8317 /// When the event callback occurs, the [`ArkUI_DragEvent`] object can be obtained from the
8318 /// [`ArkUI_NodeEvent`] object.
8319 pub const NODE_ON_DRAG_START: ArkUI_NodeEventType = ArkUI_NodeEventType(15);
8320}
8321#[cfg(feature = "api-12")]
8322#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8323impl ArkUI_NodeEventType {
8324 /// Called when a dragged item enters the boundaries of the current component.
8325 ///
8326 /// The current component refers to the component that listens for this event.
8327 ///
8328 /// When the event callback occurs, the [`ArkUI_DragEvent`] object can be obtained from the
8329 /// [`ArkUI_NodeEvent`] object.
8330 pub const NODE_ON_DRAG_ENTER: ArkUI_NodeEventType = ArkUI_NodeEventType(16);
8331}
8332#[cfg(feature = "api-12")]
8333#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8334impl ArkUI_NodeEventType {
8335 /// Called when a dragged item moves in the current component.
8336 ///
8337 /// The current component refers to the component that listens for this event.
8338 ///
8339 /// When the event callback occurs, the [`ArkUI_DragEvent`] object can be obtained from the
8340 /// [`ArkUI_NodeEvent`] object.
8341 pub const NODE_ON_DRAG_MOVE: ArkUI_NodeEventType = ArkUI_NodeEventType(17);
8342}
8343#[cfg(feature = "api-12")]
8344#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8345impl ArkUI_NodeEventType {
8346 /// Called when a dragged item leaves the boundaries of the current component.
8347 ///
8348 /// The current component refers to the component that listens for this event.
8349 ///
8350 /// When the event callback occurs, the [`ArkUI_DragEvent`] object can be obtained from the
8351 /// [`ArkUI_NodeEvent`] object.
8352 pub const NODE_ON_DRAG_LEAVE: ArkUI_NodeEventType = ArkUI_NodeEventType(18);
8353}
8354#[cfg(feature = "api-12")]
8355#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8356impl ArkUI_NodeEventType {
8357 /// Called when a dragged item is dropped on the current component.
8358 /// The component can obtain the drag data for processing through the callback.
8359 ///
8360 /// The current component refers to the component that listens for this event.
8361 ///
8362 /// When the event callback occurs, the [`ArkUI_DragEvent`] object can be obtained from the
8363 /// [`ArkUI_NodeEvent`] object.
8364 pub const NODE_ON_DROP: ArkUI_NodeEventType = ArkUI_NodeEventType(19);
8365}
8366#[cfg(feature = "api-12")]
8367#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8368impl ArkUI_NodeEventType {
8369 /// Called when a drag operation ends.
8370 /// The drag source can obtain the drag result by registering this callback.
8371 ///
8372 /// A drag operation ends when the dragged item is released.
8373 /// When the event callback occurs, the [`ArkUI_DragEvent`] object can be obtained from the
8374 /// [`ArkUI_NodeEvent`] object.
8375 pub const NODE_ON_DRAG_END: ArkUI_NodeEventType = ArkUI_NodeEventType(20);
8376}
8377#[cfg(feature = "api-12")]
8378#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8379impl ArkUI_NodeEventType {
8380 /// Defines the event triggered when a key event occurs.
8381 ///
8382 /// The callback can be triggered during interactions with a focused window using an external keyboard or other input
8383 /// device.
8384 ///
8385 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8386 /// [`ArkUI_NodeComponentEvent`].
8387 ///
8388 ///
8389 ///
8390 /// Available since API-level: 14
8391 #[cfg(feature = "api-14")]
8392 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
8393 pub const NODE_ON_KEY_EVENT: ArkUI_NodeEventType = ArkUI_NodeEventType(21);
8394}
8395#[cfg(feature = "api-12")]
8396#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8397impl ArkUI_NodeEventType {
8398 /// Defines the event triggered before the input method responds to the key action.
8399 ///
8400 /// If the return value of this callback is <b>true</b>, it is considered that the key event has been consumed, and
8401 /// subsequent event callbacks (<b>keyboardShortcut</b>, input method events, <b>onKeyEvent</b>) will be intercepted
8402 /// and no longer triggered.
8403 /// The callback can be triggered during interactions with a focused window using an external keyboard or other input
8404 /// device.
8405 ///
8406 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8407 /// [`ArkUI_NodeComponentEvent`].
8408 ///
8409 ///
8410 ///
8411 /// Available since API-level: 14
8412 #[cfg(feature = "api-14")]
8413 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
8414 pub const NODE_ON_KEY_PRE_IME: ArkUI_NodeEventType = ArkUI_NodeEventType(22);
8415}
8416#[cfg(feature = "api-12")]
8417#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8418impl ArkUI_NodeEventType {
8419 /// Triggers onDetectResultUpdate callback
8420 /// when the text is set to TextDataDetectorConfig and recognized successfully.
8421 ///
8422 /// Trigger this event when TextDataDetectorConfig is set and recognized successfully.
8423 ///
8424 /// When the event callback occurs, the event parameter[`ArkUI_NodeEvent`]The union type in the object is
8425 /// [`ArkUI_StringAsyncEvent`].
8426 ///
8427 /// [`ArkUI_StringAsyncEvent`]contains 1 parameter
8428 ///
8429 /// <b>ArkUI_StringAsyncEvent.pStr</b>:Indicates the result of text recognition, in Json format.
8430 pub const NODE_TEXT_ON_DETECT_RESULT_UPDATE: ArkUI_NodeEventType = ArkUI_NodeEventType(1000);
8431}
8432#[cfg(feature = "api-12")]
8433#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8434impl ArkUI_NodeEventType {
8435 /// Defines the image loading success event.
8436 ///
8437 /// This event is triggered when an image is successfully loaded or decoded.
8438 ///
8439 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8440 /// [`ArkUI_NodeComponentEvent`].
8441 ///
8442 /// [`ArkUI_NodeComponentEvent`] contains nine parameters:
8443 ///
8444 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: loading status. The value <b>0</b> indicates that the image is
8445 /// loaded successfully, and the value <b>1</b> indicates that the image is decoded successfully.
8446 ///
8447 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: width of the image, in px.
8448 ///
8449 /// <b>ArkUI_NodeComponentEvent.data[2].f32</b>: height of the image, in px.
8450 ///
8451 /// <b>ArkUI_NodeComponentEvent.data[3].f32</b>: width of the component, in px.
8452 ///
8453 /// <b>ArkUI_NodeComponentEvent.data[4].f32</b>: height of the component, in px.
8454 ///
8455 /// <b>ArkUI_NodeComponentEvent.data[5].f32</b>: offset of the rendered content relative to the component on the
8456 /// x-axis, in px.
8457 ///
8458 /// <b>ArkUI_NodeComponentEvent.data[6].f32</b>: offset of the rendered content relative to the component on the
8459 /// y-axis, in px.
8460 ///
8461 /// <b>ArkUI_NodeComponentEvent.data[7].f32</b>: actual rendered width of the image, in px.
8462 ///
8463 /// <b>ArkUI_NodeComponentEvent.data[8].f32</b>: actual rendered height of the image, in px.
8464 pub const NODE_IMAGE_ON_COMPLETE: ArkUI_NodeEventType = ArkUI_NodeEventType(4000);
8465}
8466#[cfg(feature = "api-12")]
8467#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8468impl ArkUI_NodeEventType {
8469 /// Defines the image loading failure event.
8470 ///
8471 /// This event is triggered when an error occurs during image loading.
8472 ///
8473 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8474 /// [`ArkUI_NodeComponentEvent`].
8475 ///
8476 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8477 ///
8478 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>error code:
8479 ///
8480 /// 401: The image could not be obtained because the image path is invalid.
8481 ///
8482 /// 103101: The image format is not supported.
8483 pub const NODE_IMAGE_ON_ERROR: ArkUI_NodeEventType = ArkUI_NodeEventType(4001);
8484}
8485#[cfg(feature = "api-12")]
8486#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8487impl ArkUI_NodeEventType {
8488 /// Defines the SVG animation playback completion event.
8489 ///
8490 /// This event is triggered when the animation playback in the loaded SVG image is complete.
8491 ///
8492 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8493 /// [`ArkUI_NodeComponentEvent`].
8494 ///
8495 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
8496 pub const NODE_IMAGE_ON_SVG_PLAY_FINISH: ArkUI_NodeEventType = ArkUI_NodeEventType(4002);
8497}
8498#[cfg(feature = "api-12")]
8499#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8500impl ArkUI_NodeEventType {
8501 /// Defines image download process event.
8502 ///
8503 /// This event is triggered when downloading webpage images from page components.
8504 ///
8505 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8506 /// [`ArkUI_NodeComponentEvent`].
8507 ///
8508 /// [`ArkUI_NodeComponentEvent`] contains two parameter:
8509 ///
8510 /// <b>ArkUI_NodeComponentEvent.data[0].u32</b>: the num of bytes downloaded.
8511 ///
8512 /// <b>ArkUI_NodeComponentEvent.data[1].u32</b>: the total number of bytes to download.
8513 pub const NODE_IMAGE_ON_DOWNLOAD_PROGRESS: ArkUI_NodeEventType = ArkUI_NodeEventType(4003);
8514}
8515#[cfg(feature = "api-12")]
8516#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8517impl ArkUI_NodeEventType {
8518 /// Defines the event triggered when the toggle status changes.
8519 ///
8520 ///
8521 ///
8522 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8523 /// [`ArkUI_NodeComponentEvent`].
8524 ///
8525 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8526 ///
8527 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: toggle status. <b>1</b>: on; <b>0</b>: off.
8528 pub const NODE_TOGGLE_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(5000);
8529}
8530#[cfg(feature = "api-12")]
8531#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8532impl ArkUI_NodeEventType {
8533 /// Defines the event triggered when the text input content changes.
8534 ///
8535 ///
8536 ///
8537 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8538 /// [`ArkUI_StringAsyncEvent`].
8539 ///
8540 /// [`ArkUI_StringAsyncEvent`] contains one parameter:
8541 ///
8542 /// <b>ArkUI_StringAsyncEvent.pStr</b>: text input.
8543 pub const NODE_TEXT_INPUT_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(7000);
8544}
8545#[cfg(feature = "api-12")]
8546#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8547impl ArkUI_NodeEventType {
8548 /// Defines the event triggered when the Enter key of the text input method is pressed.
8549 ///
8550 ///
8551 ///
8552 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8553 /// [`ArkUI_NodeComponentEvent`].
8554 ///
8555 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8556 ///
8557 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: Enter key type of the input method.
8558 pub const NODE_TEXT_INPUT_ON_SUBMIT: ArkUI_NodeEventType = ArkUI_NodeEventType(7001);
8559}
8560#[cfg(feature = "api-12")]
8561#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8562impl ArkUI_NodeEventType {
8563 /// Defines the event triggered when the cut button on the pasteboard, which displays when the text box
8564 /// is long pressed, is clicked.
8565 ///
8566 ///
8567 ///
8568 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8569 /// [`ArkUI_StringAsyncEvent`].
8570 ///
8571 /// [`ArkUI_StringAsyncEvent`] contains one parameter:
8572 ///
8573 /// <b>ArkUI_StringAsyncEvent.pStr</b>: text that is cut.
8574 pub const NODE_TEXT_INPUT_ON_CUT: ArkUI_NodeEventType = ArkUI_NodeEventType(7002);
8575}
8576#[cfg(feature = "api-12")]
8577#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8578impl ArkUI_NodeEventType {
8579 /// Defines the event triggered when the paste button on the pasteboard, which displays when the text box
8580 /// is long pressed, is clicked.
8581 ///
8582 ///
8583 ///
8584 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8585 /// [`ArkUI_StringAsyncEvent`].
8586 ///
8587 /// [`ArkUI_StringAsyncEvent`] contains one parameter:
8588 ///
8589 /// <b>ArkUI_StringAsyncEvent.pStr</b>: text that is pasted
8590 pub const NODE_TEXT_INPUT_ON_PASTE: ArkUI_NodeEventType = ArkUI_NodeEventType(7003);
8591}
8592#[cfg(feature = "api-12")]
8593#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8594impl ArkUI_NodeEventType {
8595 /// Defines the event triggered when the text selection position changes.
8596 ///
8597 ///
8598 ///
8599 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8600 /// [`ArkUI_NodeComponentEvent`].
8601 ///
8602 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
8603 ///
8604 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: start position of the text selection area.
8605 ///
8606 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: end position of the text selection area.
8607 pub const NODE_TEXT_INPUT_ON_TEXT_SELECTION_CHANGE: ArkUI_NodeEventType =
8608 ArkUI_NodeEventType(7004);
8609}
8610#[cfg(feature = "api-12")]
8611#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8612impl ArkUI_NodeEventType {
8613 /// Defines the event triggered when the input status changes.
8614 ///
8615 ///
8616 ///
8617 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8618 /// [`ArkUI_NodeComponentEvent`].
8619 ///
8620 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8621 ///
8622 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: <b>true</b> indicates that text input is in progress.
8623 pub const NODE_TEXT_INPUT_ON_EDIT_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(7005);
8624}
8625#[cfg(feature = "api-12")]
8626#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8627impl ArkUI_NodeEventType {
8628 /// textInput This event is triggered when the input content changes.
8629 ///
8630 /// Conditions for triggering this event: When the input content changes.
8631 ///
8632 /// When the event callback occurs, the union type in the event parameter
8633 /// [`ArkUI_NodeEvent`] object is [`ArkUI_NodeComponentEvent`].
8634 ///
8635 /// [`ArkUI_NodeComponentEvent`] contains 2 parameters:
8636 ///
8637 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: Indicates the width of the text.
8638 ///
8639 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: Indicates the height of the text.
8640 pub const NODE_TEXT_INPUT_ON_CONTENT_SIZE_CHANGE: ArkUI_NodeEventType =
8641 ArkUI_NodeEventType(7006);
8642}
8643#[cfg(feature = "api-12")]
8644#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8645impl ArkUI_NodeEventType {
8646 /// Defines the event triggered when matching with the regular expression specified by
8647 /// <b>NODE_TEXT_INPUT_INPUT_FILTER</b> fails.
8648 ///
8649 ///
8650 ///
8651 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8652 /// [`ArkUI_StringAsyncEvent`].
8653 ///
8654 /// [`ArkUI_StringAsyncEvent`] contains one parameter:
8655 ///
8656 /// <b>ArkUI_StringAsyncEvent.pStr</b>: content that is filtered out when regular expression matching fails.
8657 pub const NODE_TEXT_INPUT_ON_INPUT_FILTER_ERROR: ArkUI_NodeEventType =
8658 ArkUI_NodeEventType(7007);
8659}
8660#[cfg(feature = "api-12")]
8661#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8662impl ArkUI_NodeEventType {
8663 /// This callback is triggered when the text content is scrolled.
8664 ///
8665 ///
8666 ///
8667 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8668 /// [`ArkUI_NodeComponentEvent`].
8669 ///
8670 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
8671 ///
8672 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: Indicates the horizontal offset of the text in the content area.
8673 ///
8674 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: Indicates the vertical coordinate offset of
8675 ///
8676 /// the text in the content area.
8677 pub const NODE_TEXT_INPUT_ON_CONTENT_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(7008);
8678}
8679#[cfg(feature = "api-12")]
8680#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8681impl ArkUI_NodeEventType {
8682 /// Defines the event triggered when text is about to be entered.
8683 ///
8684 /// The event parameter is [`ArkUI_NodeEvent`].
8685 ///
8686 /// value.f32: position of the text, with the index of <b>0</b>; obtained using
8687 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8688 ///
8689 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8690 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8691 ///
8692 /// # Returns
8693 ///
8694 /// * Returns <b>true</b> if the text is entered; returns <b>false</b> otherwise.
8695 /// You can set the return value using <b>OH_ArkUI_NodeEvent_SetReturnNumberValue</b>.
8696 pub const NODE_TEXT_INPUT_ON_WILL_INSERT: ArkUI_NodeEventType = ArkUI_NodeEventType(7009);
8697}
8698#[cfg(feature = "api-12")]
8699#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8700impl ArkUI_NodeEventType {
8701 /// Defines the event triggered when text is entered.
8702 ///
8703 /// The event parameter is [`ArkUI_NodeEvent`].
8704 ///
8705 /// value.f32: position of the text, with the index of <b>0</b>; obtained using
8706 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8707 ///
8708 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8709 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8710 pub const NODE_TEXT_INPUT_ON_DID_INSERT: ArkUI_NodeEventType = ArkUI_NodeEventType(7010);
8711}
8712#[cfg(feature = "api-12")]
8713#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8714impl ArkUI_NodeEventType {
8715 /// Defines the event triggered when text is about to be deleted.
8716 ///
8717 /// The event parameter is [`ArkUI_NodeEvent`].
8718 ///
8719 /// value.f32: position of the text to delete, with the index of <b>0</b>; obtained using
8720 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8721 ///
8722 /// value.i32: direction for deleting the text, with the index of <b>1</b>; obtained using
8723 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>. The value <b>0</b> indicates backward-delete, and <b>1</b> indicates
8724 /// forward-delete.
8725 ///
8726 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8727 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8728 ///
8729 /// # Returns
8730 ///
8731 /// * Returns <b>true</b> if the text is deleted; returns <b>false</b> otherwise.
8732 ///
8733 /// You can set the return value using <b>OH_ArkUI_NodeEvent_SetReturnNumberValue</b>.
8734 pub const NODE_TEXT_INPUT_ON_WILL_DELETE: ArkUI_NodeEventType = ArkUI_NodeEventType(7011);
8735}
8736#[cfg(feature = "api-12")]
8737#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8738impl ArkUI_NodeEventType {
8739 /// Defines the event triggered when text is deleted.
8740 ///
8741 /// The event parameter is [`ArkUI_NodeEvent`].
8742 ///
8743 /// value.f32: position of the text deleted, with the index of <b>0</b>; obtained using
8744 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8745 ///
8746 /// value.i32: direction for deleting the text, with the index of <b>1</b>; obtained using
8747 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>. The value <b>0</b> indicates backward-delete, and <b>1</b> indicates
8748 /// forward-delete.
8749 ///
8750 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8751 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8752 pub const NODE_TEXT_INPUT_ON_DID_DELETE: ArkUI_NodeEventType = ArkUI_NodeEventType(7012);
8753}
8754#[cfg(feature = "api-12")]
8755#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8756impl ArkUI_NodeEventType {
8757 /// Defines the event triggered when the input in the text box changes.
8758 ///
8759 ///
8760 ///
8761 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8762 /// [`ArkUI_StringAsyncEvent`].
8763 ///
8764 /// [`ArkUI_StringAsyncEvent`] contains one parameter:
8765 ///
8766 /// <b>ArkUI_StringAsyncEvent.pStr</b>: text entered.
8767 pub const NODE_TEXT_AREA_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(8000);
8768}
8769#[cfg(feature = "api-12")]
8770#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8771impl ArkUI_NodeEventType {
8772 /// Defines the event triggered when the paste button on the pasteboard, which displays when the text box is
8773 /// long pressed, is clicked.
8774 ///
8775 ///
8776 ///
8777 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8778 /// [`ArkUI_StringAsyncEvent`].
8779 ///
8780 /// [`ArkUI_StringAsyncEvent`] contains one parameter:
8781 ///
8782 /// <b>ArkUI_StringAsyncEvent.pStr</b>: text that is pasted
8783 pub const NODE_TEXT_AREA_ON_PASTE: ArkUI_NodeEventType = ArkUI_NodeEventType(8001);
8784}
8785#[cfg(feature = "api-12")]
8786#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8787impl ArkUI_NodeEventType {
8788 /// Defines the event triggered when the text selection position changes.
8789 ///
8790 ///
8791 ///
8792 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8793 /// [`ArkUI_NodeComponentEvent`].
8794 ///
8795 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
8796 ///
8797 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: start position of the text selection area.
8798 ///
8799 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: end position of the text selection area.
8800 pub const NODE_TEXT_AREA_ON_TEXT_SELECTION_CHANGE: ArkUI_NodeEventType =
8801 ArkUI_NodeEventType(8002);
8802}
8803#[cfg(feature = "api-12")]
8804#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8805impl ArkUI_NodeEventType {
8806 /// Defines the event triggered when matching with the regular expression specified by
8807 /// <b>NODE_TEXT_AREA_INPUT_FILTER</b> fails.
8808 ///
8809 ///
8810 ///
8811 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8812 /// [`ArkUI_StringAsyncEvent`].
8813 ///
8814 /// [`ArkUI_StringAsyncEvent`] contains one parameter:
8815 ///
8816 /// <b>ArkUI_StringAsyncEvent.pStr</b>: content that is filtered out when regular expression matching fails.
8817 pub const NODE_TEXT_AREA_ON_INPUT_FILTER_ERROR: ArkUI_NodeEventType = ArkUI_NodeEventType(8003);
8818}
8819#[cfg(feature = "api-12")]
8820#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8821impl ArkUI_NodeEventType {
8822 /// This callback is triggered when the text content is scrolled.
8823 ///
8824 ///
8825 ///
8826 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8827 /// [`ArkUI_NodeComponentEvent`].
8828 ///
8829 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
8830 ///
8831 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: Indicates the horizontal offset of the text in the content area.
8832 ///
8833 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: Indicates the vertical coordinate offset of
8834 ///
8835 /// the text in the content area.
8836 pub const NODE_TEXT_AREA_ON_CONTENT_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(8004);
8837}
8838#[cfg(feature = "api-12")]
8839#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8840impl ArkUI_NodeEventType {
8841 /// Defines the event triggered when the input status changes.
8842 ///
8843 ///
8844 ///
8845 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8846 ///
8847 /// [`ArkUI_NodeComponentEvent`].
8848 ///
8849 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8850 ///
8851 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: <b>true</b> indicates that text input is in progress.
8852 pub const NODE_TEXT_AREA_ON_EDIT_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(8005);
8853}
8854#[cfg(feature = "api-12")]
8855#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8856impl ArkUI_NodeEventType {
8857 /// Defines the event triggered when the Enter key on the keyboard is pressed for the multi-line text box.
8858 ///
8859 /// This event is not triggered when <b>keyType</b> is <b>ARKUI_ENTER_KEY_TYPE_NEW_LINE</b>.
8860 ///
8861 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8862 ///
8863 /// [`ArkUI_NodeComponentEvent`].
8864 ///
8865 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
8866 ///
8867 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: type of the Enter key.
8868 pub const NODE_TEXT_AREA_ON_SUBMIT: ArkUI_NodeEventType = ArkUI_NodeEventType(8006);
8869}
8870#[cfg(feature = "api-12")]
8871#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8872impl ArkUI_NodeEventType {
8873 /// textArea This event is triggered when the input content changes.
8874 ///
8875 /// Conditions for triggering this event: When the input content changes.
8876 ///
8877 /// When the event callback occurs, the union type in the event parameter [`ArkUI_NodeEvent`] object is
8878 ///
8879 /// [`ArkUI_NodeComponentEvent`].
8880 ///
8881 /// [`ArkUI_NodeComponentEvent`] contains 2 parameters:
8882 ///
8883 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: Indicates the width of the text.
8884 ///
8885 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: Indicates the height of the text.
8886 pub const NODE_TEXT_AREA_ON_CONTENT_SIZE_CHANGE: ArkUI_NodeEventType =
8887 ArkUI_NodeEventType(8007);
8888}
8889#[cfg(feature = "api-12")]
8890#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8891impl ArkUI_NodeEventType {
8892 /// Defines the event triggered when text is about to be entered.
8893 ///
8894 /// The event parameter is [`ArkUI_NodeEvent`].
8895 ///
8896 /// value.f32: position of the text, with the index of <b>0</b>; obtained using
8897 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8898 ///
8899 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8900 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8901 ///
8902 /// # Returns
8903 ///
8904 /// * Returns <b>true</b> if the text is entered; returns <b>false</b> otherwise.
8905 /// You can set the return value using <b>OH_ArkUI_NodeEvent_SetReturnNumberValue</b>.
8906 pub const NODE_TEXT_AREA_ON_WILL_INSERT: ArkUI_NodeEventType = ArkUI_NodeEventType(8008);
8907}
8908#[cfg(feature = "api-12")]
8909#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8910impl ArkUI_NodeEventType {
8911 /// Defines the event triggered when text is entered.
8912 ///
8913 /// The event parameter is [`ArkUI_NodeEvent`].
8914 ///
8915 /// value.f32: position of the text, with the index of <b>0</b>; obtained using
8916 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8917 ///
8918 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8919 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8920 pub const NODE_TEXT_AREA_ON_DID_INSERT: ArkUI_NodeEventType = ArkUI_NodeEventType(8009);
8921}
8922#[cfg(feature = "api-12")]
8923#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8924impl ArkUI_NodeEventType {
8925 /// Defines the event triggered when text is about to be deleted.
8926 ///
8927 /// The event parameter is [`ArkUI_NodeEvent`].
8928 ///
8929 /// value.f32: position of the text to delete, with the index of <b>0</b>; obtained using
8930 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8931 ///
8932 /// value.i32: direction for deleting the text, with the index of <b>1</b>; obtained using
8933 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>. The value <b>0</b> indicates backward-delete, and <b>1</b> indicates
8934 /// forward-delete.
8935 ///
8936 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8937 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8938 ///
8939 /// # Returns
8940 ///
8941 /// * Returns <b>true</b> if the text is deleted; returns <b>false</b> otherwise.
8942 ///
8943 /// You can set the return value using <b>OH_ArkUI_NodeEvent_SetReturnNumberValue</b>.
8944 pub const NODE_TEXT_AREA_ON_WILL_DELETE: ArkUI_NodeEventType = ArkUI_NodeEventType(8010);
8945}
8946#[cfg(feature = "api-12")]
8947#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8948impl ArkUI_NodeEventType {
8949 /// Defines the event triggered when text is deleted.
8950 ///
8951 /// The event parameter is [`ArkUI_NodeEvent`].
8952 ///
8953 /// value.f32: position of the text deleted, with the index of <b>0</b>; obtained using
8954 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>.
8955 ///
8956 /// value.i32: direction for deleting the text, with the index of <b>1</b>; obtained using
8957 /// <b>OH_ArkUI_NodeEvent_GetNumberValue</b>. The value <b>0</b> indicates backward-delete, and <b>1</b> indicates
8958 /// forward-delete.
8959 ///
8960 /// buffer: string value of the text, with the index of <b>0</b>; obtained using
8961 /// <b>OH_ArkUI_NodeEvent_GetStringValue</b>.
8962 pub const NODE_TEXT_AREA_ON_DID_DELETE: ArkUI_NodeEventType = ArkUI_NodeEventType(8011);
8963}
8964#[cfg(feature = "api-12")]
8965#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8966impl ArkUI_NodeEventType {
8967 /// Defines the event triggered when the selected status of the <b>ARKUI_NODE_CHECKBOX</b> component changes.
8968 ///
8969 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8970 /// [`ArkUI_NodeComponentEvent`].
8971 ///
8972 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b><b>1</b>: selected; <b>0</b>: not selected.
8973 pub const NODE_CHECKBOX_EVENT_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(11000);
8974}
8975#[cfg(feature = "api-12")]
8976#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8977impl ArkUI_NodeEventType {
8978 /// Defines the event triggered when a date is selected in the <b>ARKUI_NODE_DATE_PICKER</b> component.
8979 ///
8980 ///
8981 ///
8982 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
8983 /// [`ArkUI_NodeComponentEvent`].
8984 ///
8985 /// [`ArkUI_NodeComponentEvent`] contains three parameters:
8986 ///
8987 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: year of the selected date.
8988 ///
8989 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: month of the selected date. Value range: [0-11].
8990 ///
8991 /// <b>ArkUI_NodeComponentEvent.data[2].i32</b>: day of the selected date.
8992 pub const NODE_DATE_PICKER_EVENT_ON_DATE_CHANGE: ArkUI_NodeEventType =
8993 ArkUI_NodeEventType(13000);
8994}
8995#[cfg(feature = "api-12")]
8996#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
8997impl ArkUI_NodeEventType {
8998 /// Defines the event triggered when a time is selected in the <b>ARKUI_NODE_TIME_PICKER</b> component.
8999 ///
9000 ///
9001 ///
9002 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9003 /// [`ArkUI_NodeComponentEvent`].
9004 ///
9005 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9006 ///
9007 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: hour of the selected time. Value range: [0-23].
9008 ///
9009 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: minute of the selected time. Value range: [0-59].
9010 pub const NODE_TIME_PICKER_EVENT_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(14000);
9011}
9012#[cfg(feature = "api-12")]
9013#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9014impl ArkUI_NodeEventType {
9015 /// Defines the event triggered when an item is selected in the <b>ARKUI_NODE_TEXT_PICKER</b> component.
9016 ///
9017 ///
9018 ///
9019 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9020 /// [`ArkUI_NodeComponentEvent`].
9021 ///
9022 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
9023 ///
9024 /// <b>ArkUI_NodeComponentEvent.data[0...11].i32</b>: value of the selected item.
9025 pub const NODE_TEXT_PICKER_EVENT_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(15000);
9026}
9027#[cfg(feature = "api-12")]
9028#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9029impl ArkUI_NodeEventType {
9030 /// Defines the event triggered when an item is selected and scrolling has stopped in the
9031 /// <b>ARKUI_NODE_TEXT_PICKER</b> component.
9032 ///
9033 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9034 /// [`ArkUI_NodeComponentEvent`].
9035 ///
9036 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
9037 ///
9038 /// <b>ArkUI_NodeComponentEvent.data[0...11].i32</b>: value of the selected item.
9039 ///
9040 ///
9041 ///
9042 /// Available since API-level: 14
9043 #[cfg(feature = "api-14")]
9044 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
9045 pub const NODE_TEXT_PICKER_EVENT_ON_SCROLL_STOP: ArkUI_NodeEventType =
9046 ArkUI_NodeEventType(15001);
9047}
9048#[cfg(feature = "api-12")]
9049#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9050impl ArkUI_NodeEventType {
9051 /// Defines the event triggered when a date is selected in the <b>NODE_CALENDAR_PICKER</b>.
9052 ///
9053 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9054 /// [`ArkUI_NodeComponentEvent`].
9055 ///
9056 /// <b>ArkUI_NodeComponent.data[0].u32</b>: year of the selected date.
9057 ///
9058 /// <b>ArkUI_NodeComponent.data[1].u32</b>: month of the selected date.
9059 ///
9060 /// <b>ArkUI_NodeComponent.data[2].u32</b>: day of the selected date.
9061 pub const NODE_CALENDAR_PICKER_EVENT_ON_CHANGE: ArkUI_NodeEventType =
9062 ArkUI_NodeEventType(16000);
9063}
9064#[cfg(feature = "api-12")]
9065#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9066impl ArkUI_NodeEventType {
9067 /// Defines the event triggered when the <b>ARKUI_NODE_SLIDER</b> component is dragged or clicked.
9068 ///
9069 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9070 /// [`ArkUI_NodeComponentEvent`].
9071 ///
9072 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9073 ///
9074 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: current slider value.
9075 ///
9076 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: state triggered by the event.
9077 pub const NODE_SLIDER_EVENT_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(17000);
9078}
9079#[cfg(feature = "api-12")]
9080#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9081impl ArkUI_NodeEventType {
9082 /// Defines the event callback function triggered when an object is dragged or clicked by ARKUI_NODE_RADIO.
9083 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9084 ///
9085 /// [`ArkUI_NodeComponentEvent`].
9086 ///
9087 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
9088 ///
9089 /// ArkUI_NodeComponentEvent.data[0].i32: option button status.
9090 pub const NODE_RADIO_EVENT_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(18000);
9091}
9092#[cfg(feature = "api-12")]
9093#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9094impl ArkUI_NodeEventType {
9095 /// Defines the event callback function triggered when the animation starts to play.
9096 ///
9097 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9098 ///
9099 /// [`ArkUI_NodeComponentEvent`].
9100 ///
9101 /// [`ArkUI_NodeComponentEvent`] contains no parameter:
9102 pub const NODE_IMAGE_ANIMATOR_EVENT_ON_START: ArkUI_NodeEventType = ArkUI_NodeEventType(19000);
9103}
9104#[cfg(feature = "api-12")]
9105#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9106impl ArkUI_NodeEventType {
9107 /// Defines the event callback function triggered when the animation playback is paused.
9108 ///
9109 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9110 ///
9111 /// [`ArkUI_NodeComponentEvent`].
9112 ///
9113 /// [`ArkUI_NodeComponentEvent`] contains no parameter:
9114 pub const NODE_IMAGE_ANIMATOR_EVENT_ON_PAUSE: ArkUI_NodeEventType = ArkUI_NodeEventType(19001);
9115}
9116#[cfg(feature = "api-12")]
9117#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9118impl ArkUI_NodeEventType {
9119 /// Defines the event callback function triggered when the animation playback is repeated.
9120 ///
9121 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9122 ///
9123 /// [`ArkUI_NodeComponentEvent`].
9124 ///
9125 /// [`ArkUI_NodeComponentEvent`] contains no parameter:
9126 pub const NODE_IMAGE_ANIMATOR_EVENT_ON_REPEAT: ArkUI_NodeEventType = ArkUI_NodeEventType(19002);
9127}
9128#[cfg(feature = "api-12")]
9129#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9130impl ArkUI_NodeEventType {
9131 /// Defines the event callback function when the animation playback returns to the initial state.
9132 ///
9133 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9134 ///
9135 /// [`ArkUI_NodeComponentEvent`].
9136 ///
9137 /// [`ArkUI_NodeComponentEvent`] contains no parameter:
9138 pub const NODE_IMAGE_ANIMATOR_EVENT_ON_CANCEL: ArkUI_NodeEventType = ArkUI_NodeEventType(19003);
9139}
9140#[cfg(feature = "api-12")]
9141#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9142impl ArkUI_NodeEventType {
9143 /// Defines the event callback function triggered when the animation playback is complete or stopped.
9144 ///
9145 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9146 ///
9147 /// [`ArkUI_NodeComponentEvent`].
9148 ///
9149 /// [`ArkUI_NodeComponentEvent`] contains no parameter:
9150 pub const NODE_IMAGE_ANIMATOR_EVENT_ON_FINISH: ArkUI_NodeEventType = ArkUI_NodeEventType(19004);
9151}
9152#[cfg(feature = "api-12")]
9153#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9154impl ArkUI_NodeEventType {
9155 /// Defines the event triggered when the index of the currently displayed element of this
9156 /// <b>ARKUI_NODE_SWIPER</b> instance changes.
9157 ///
9158 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9159 /// [`ArkUI_NodeComponentEvent`].
9160 ///
9161 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
9162 ///
9163 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: index of the currently displayed element.
9164 pub const NODE_SWIPER_EVENT_ON_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(1001000);
9165}
9166#[cfg(feature = "api-12")]
9167#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9168impl ArkUI_NodeEventType {
9169 /// Defines the event triggered when the switching animation of this <b>ARKUI_NODE_SWIPER</b> instance starts.
9170 ///
9171 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9172 /// [`ArkUI_NodeComponentEvent`].
9173 ///
9174 /// [`ArkUI_NodeComponentEvent`] contains five parameters:
9175 ///
9176 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: index of the currently displayed element.
9177 ///
9178 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: index of the target element to switch to.
9179 ///
9180 /// <b>ArkUI_NodeComponentEvent.data[2].f32</b>: offset of the currently displayed element relative to the
9181 /// start position of the swiper along the main axis.
9182 ///
9183 /// <b>ArkUI_NodeComponentEvent.data[3].f32</b>: offset of the target element relative to the start position
9184 /// of the swiper along the main axis.
9185 ///
9186 /// <b>ArkUI_NodeComponentEvent.data[4].f32</b>: hands-off velocity.
9187 pub const NODE_SWIPER_EVENT_ON_ANIMATION_START: ArkUI_NodeEventType =
9188 ArkUI_NodeEventType(1001001);
9189}
9190#[cfg(feature = "api-12")]
9191#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9192impl ArkUI_NodeEventType {
9193 /// Defines the event triggered when the switching animation of this <b>ARKUI_NODE_SWIPER</b> instance ends.
9194 ///
9195 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9196 /// [`ArkUI_NodeComponentEvent`].
9197 ///
9198 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9199 ///
9200 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: index of the currently displayed element.
9201 ///
9202 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: offset of the currently displayed element relative to the
9203 /// start position of the swiper along the main axis.
9204 pub const NODE_SWIPER_EVENT_ON_ANIMATION_END: ArkUI_NodeEventType =
9205 ArkUI_NodeEventType(1001002);
9206}
9207#[cfg(feature = "api-12")]
9208#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9209impl ArkUI_NodeEventType {
9210 /// Defines the event triggered on a frame-by-frame basis when the page is turned by a swipe in this
9211 /// <b>ARKUI_NODE_SWIPER</b> instance.
9212 ///
9213 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9214 /// [`ArkUI_NodeComponentEvent`].
9215 ///
9216 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9217 ///
9218 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: index of the currently displayed element.
9219 ///
9220 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: offset of the currently displayed element relative to the
9221 /// start position of the swiper along the main axis.
9222 pub const NODE_SWIPER_EVENT_ON_GESTURE_SWIPE: ArkUI_NodeEventType =
9223 ArkUI_NodeEventType(1001003);
9224}
9225#[cfg(feature = "api-12")]
9226#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9227impl ArkUI_NodeEventType {
9228 /// Define the <b>ARKUI_NODE_SWIPER</b> to listen for Swiper page slide events.
9229 /// Instruction:
9230 ///
9231 /// 1. If the [`ArkUI_SwiperDisplayModeType`] attribute is set to
9232 ///
9233 /// ARKUI_SWIPER_DISPLAY_MODE_AUTO_LINEAR, the interface does not take effect.
9234 ///
9235 /// 2, circular scenario, set prevMargin and nextMargin attributes,
9236 ///
9237 /// so that Swiper front and back end display the same page, the interface does not take effect.
9238 ///
9239 /// 3. During page sliding, the ContentDidScrollCallback callback is
9240 ///
9241 /// triggered frame-by-frame for all pages in the window.
9242 ///
9243 /// For example, when there are two pages in the window with subscripts 0 and 1,
9244 ///
9245 /// callbacks with index values 0 and 1 are triggered twice per frame.
9246 ///
9247 /// 4, set the swipeByGroup parameter of the displayCount property to
9248 ///
9249 /// true if at least one page in the same group is in the window,
9250 ///
9251 /// A callback is triggered for all pages in the group.
9252 ///
9253 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9254 /// [`ArkUI_NodeComponentEvent`].
9255 ///
9256 /// [`ArkUI_NodeComponentEvent`] contains four parameters:
9257 ///
9258 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b> : indicates the index of the Swiper component,
9259 ///
9260 /// which is consistent with the index change in the onChange event.
9261 ///
9262 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b> : The index of a page in the window.
9263 ///
9264 /// <b>ArkUI_NodeComponentEvent.data[2].f32</b> : The proportion of page movement relative to
9265 ///
9266 /// the start position of the Swiper spindle (selectedIndex corresponds to the start position of the page).
9267 ///
9268 /// <b>ArkUI_NodeComponentEvent.data[3].f32</b> : The length of the page in the axis direction.
9269 pub const NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL: ArkUI_NodeEventType =
9270 ArkUI_NodeEventType(1001004);
9271}
9272#[cfg(feature = "api-12")]
9273#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9274impl ArkUI_NodeEventType {
9275 /// Defines the event triggered when the <b>ARKUI_NODE_SCROLL</b> component scrolls.
9276 ///
9277 /// Notes for triggering the event:
9278 ///
9279 /// 1. This event is triggered when scrolling is started by the <b>ARKUI_NODE_SCROLL</b> component or other input
9280 /// settings, such as keyboard and mouse operations.
9281 ///
9282 /// 2. Scrolling can be initiated by calling the controller API.
9283 ///
9284 /// 3. The out-of-bounds bounce effect is supported.
9285 ///
9286 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9287 /// [`ArkUI_NodeComponentEvent`].
9288 ///
9289 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9290 ///
9291 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: horizontal scrolling offset.
9292 ///
9293 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: vertical scrolling offset.
9294 pub const NODE_SCROLL_EVENT_ON_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(1002000);
9295}
9296#[cfg(feature = "api-12")]
9297#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9298impl ArkUI_NodeEventType {
9299 /// Defines the event triggered when each frame scrolling starts in the <b>ARKUI_NODE_SCROLL</b> component.
9300 ///
9301 /// Notes for triggering the event:
9302 ///
9303 /// 1. This event is triggered when scrolling is started by the <b>ARKUI_NODE_SCROLL</b> component or other input
9304 /// settings, such as keyboard and mouse operations.
9305 ///
9306 /// 2. This event is not triggered when the controller API is called.
9307 ///
9308 /// 3. This event does not support the out-of-bounds bounce effect.
9309 ///
9310 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9311 /// [`ArkUI_NodeComponentEvent`].
9312 ///
9313 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9314 ///
9315 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: amount to scroll by.
9316 ///
9317 /// <b>ArkUI_NodeComponentEvent.data[1].i32</b>: current scrolling state.
9318 ///
9319 /// <b>::ArkUI_NodeComponentEvent</b> contains one return value:
9320 ///
9321 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: The event handler can work out the amount by which the component
9322 /// needs to scroll based on the real-world situation and return the result in this parameter.
9323 pub const NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN: ArkUI_NodeEventType =
9324 ArkUI_NodeEventType(1002001);
9325}
9326#[cfg(feature = "api-12")]
9327#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9328impl ArkUI_NodeEventType {
9329 /// Define the enumeration value of the pre sliding trigger event for the scrolling container component.
9330 ///
9331 /// The conditions that trigger this event:
9332 ///
9333 /// 1. When the scrolling component triggers scrolling, it supports input settings such as keyboard and mouse
9334 /// operations that trigger scrolling.
9335 ///
9336 /// 2. Called through the rolling controller API interface.
9337 ///
9338 /// 3. Cross boundary rebound.
9339 ///
9340 /// When an event callback occurs, the union type in the event parameter [`ArkUI_NodeEvent`] object is
9341 /// [`ArkUI_NodeComponentEvent`].
9342 ///
9343 /// [`ArkUI_NodeComponentEvent`] contains four parameters:
9344 ///
9345 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: The offset for each frame of scrolling is positive when scrolling to
9346 /// the left and negative when scrolling to the right, measured in vp.
9347 ///
9348 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: The offset of each frame scrolling, with a positive offset when
9349 /// scrolling up and a negative offset when scrolling down, measured in vp.
9350 ///
9351 /// <b>ArkUI_NodeComponentEvent.data[2].i32</b>: Current sliding state,
9352 ///
9353 /// parameter type is [`ArkUI_ScrollState`].
9354 ///
9355 /// <b>ArkUI_NodeComponentEvent.data[3].i32</b>: Current scroll source,
9356 ///
9357 /// parameter type is [`ArkUI_ScrollSource`].
9358 ///
9359 ///
9360 /// # Returns
9361 ///
9362 /// * Does not return or returns a number that sets the actual scroll distance of the scroll component.
9363 pub const NODE_SCROLL_EVENT_ON_WILL_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(1002002);
9364}
9365#[cfg(feature = "api-12")]
9366#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9367impl ArkUI_NodeEventType {
9368 /// Define the event enumeration value triggered when sliding a scrolling container component.
9369 ///
9370 /// The conditions that trigger this event:
9371 ///
9372 /// 1. When the scrolling component triggers scrolling, it supports input settings such as keyboard and mouse
9373 /// operations that trigger scrolling.
9374 ///
9375 /// 2. Called through the rolling controller API interface.
9376 ///
9377 /// 3. Cross boundary rebound.
9378 ///
9379 /// When an event callback occurs, the union type in the event parameter [`ArkUI_NodeEvent`] object is
9380 /// [`ArkUI_NodeComponentEvent`].
9381 ///
9382 /// [`ArkUI_NodeComponentEvent`] contains three parameters:
9383 ///
9384 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: The offset for each frame of scrolling is positive when scrolling to
9385 /// the left and negative when scrolling to the right, measured in vp.
9386 ///
9387 /// <b>ArkUI_NodeComponentEvent.data[1].f32</b>: The offset of each frame scrolling, with a positive offset when
9388 /// scrolling up and a negative offset when scrolling down, measured in vp.
9389 ///
9390 /// <b>ArkUI_NodeComponentEvent.data[2].i32</b>: Current sliding state,
9391 ///
9392 /// parameter type is [`ArkUI_ScrollState`].
9393 pub const NODE_SCROLL_EVENT_ON_DID_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(1002003);
9394}
9395#[cfg(feature = "api-12")]
9396#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9397impl ArkUI_NodeEventType {
9398 /// Defines the event triggered when scrolling starts in the <b>ARKUI_NODE_SCROLL</b> component.
9399 ///
9400 /// Notes for triggering the event:
9401 ///
9402 /// 1. This event is triggered when scrolling is started, with support for other input settings, such as keyboard
9403 /// and mouse operations.
9404 ///
9405 /// 2. This event is triggered when the controller API is called, accompanied by a transition animation.
9406 ///
9407 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9408 /// [`ArkUI_NodeComponentEvent`].
9409 ///
9410 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
9411 pub const NODE_SCROLL_EVENT_ON_SCROLL_START: ArkUI_NodeEventType = ArkUI_NodeEventType(1002004);
9412}
9413#[cfg(feature = "api-12")]
9414#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9415impl ArkUI_NodeEventType {
9416 /// Defines the event triggered when scrolling of the <b>ARKUI_NODE_SCROLL</b> component stops.
9417 ///
9418 /// Notes for triggering the event:
9419 ///
9420 /// 1. This event is triggered when scrolling is stopped by the <b>ARKUI_NODE_SCROLL</b> component or other input
9421 /// settings, such as keyboard and mouse operations.
9422 ///
9423 /// 2. This event is triggered when the controller API is called, accompanied by a transition animation.
9424 ///
9425 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9426 /// [`ArkUI_NodeComponentEvent`].
9427 ///
9428 /// [`ArkUI_NodeComponentEvent`] does not contain parameters.
9429 pub const NODE_SCROLL_EVENT_ON_SCROLL_STOP: ArkUI_NodeEventType = ArkUI_NodeEventType(1002005);
9430}
9431#[cfg(feature = "api-12")]
9432#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9433impl ArkUI_NodeEventType {
9434 /// Defines the event triggered when scrolling of the <b>ARKUI_NODE_SCROLL</b> component reaches
9435 /// one of the edges.
9436 ///
9437 /// Notes for triggering the event:
9438 ///
9439 /// 1. This event is triggered when scrolling reaches the edge after being started by the <b>ARKUI_NODE_SCROLL</b>
9440 /// component or other input settings, such as keyboard and mouse operations.
9441 ///
9442 /// 2. Scrolling can be initiated by calling the controller API.
9443 ///
9444 /// 3. The out-of-bounds bounce effect is supported.
9445 ///
9446 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9447 /// [`ArkUI_NodeComponentEvent`].
9448 ///
9449 /// [`ArkUI_NodeComponentEvent`] contains one parameter.
9450 ///
9451 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: edge (top, bottom, left, or right) that the scrolling reaches.
9452 pub const NODE_SCROLL_EVENT_ON_SCROLL_EDGE: ArkUI_NodeEventType = ArkUI_NodeEventType(1002006);
9453}
9454#[cfg(feature = "api-12")]
9455#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9456impl ArkUI_NodeEventType {
9457 /// Define that a callback is triggered when the scrolling container component reaches the start position.
9458 /// Condition for triggering the event:
9459 ///
9460 /// Triggered when the component reaches the start position.
9461 ///
9462 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9463 /// [`ArkUI_NodeComponentEvent`].
9464 ///
9465 /// [`ArkUI_NodeComponentEvent`] contains no parameters.
9466 pub const NODE_SCROLL_EVENT_ON_REACH_START: ArkUI_NodeEventType = ArkUI_NodeEventType(1002007);
9467}
9468#[cfg(feature = "api-12")]
9469#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9470impl ArkUI_NodeEventType {
9471 /// Define that a callback is triggered when the scrolling container component ends.
9472 ///
9473 /// Condition for triggering the event:
9474 ///
9475 /// Triggered when the component reaches the end.
9476 ///
9477 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9478 /// [`ArkUI_NodeComponentEvent`].
9479 ///
9480 /// [`ArkUI_NodeComponentEvent`] contains no parameters.
9481 pub const NODE_SCROLL_EVENT_ON_REACH_END: ArkUI_NodeEventType = ArkUI_NodeEventType(1002008);
9482}
9483#[cfg(feature = "api-12")]
9484#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9485impl ArkUI_NodeEventType {
9486 /// Defines the enumerated values of the event triggered,
9487 ///
9488 /// when a subcomponent of ARKUI_NODE_LIST is moved into or out of the list display area.
9489 ///
9490 /// Condition for triggering the event:
9491 ///
9492 /// This method is triggered once during list initialization.
9493 ///
9494 /// It is triggered when the index value of the first or last subcomponent in the list display area changes.
9495 ///
9496 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9497 /// [`ArkUI_NodeComponentEvent`].
9498 ///
9499 /// [`ArkUI_NodeComponentEvent`] contains three parameters:
9500 ///
9501 /// ArkUI_NodeComponentEvent.data[0].i32: List Displays the index value of
9502 ///
9503 /// the first child component in the region.
9504 ///
9505 /// ArkUI_NodeComponentEvent.data[1].i32: List Displays the index value of
9506 ///
9507 /// the last child component in the region.
9508 ///
9509 /// ArkUI_NodeComponentEvent.data[2].i32: List Displays the index value of
9510 ///
9511 /// the subcomponent in the middle of the area.
9512 pub const NODE_LIST_ON_SCROLL_INDEX: ArkUI_NodeEventType = ArkUI_NodeEventType(1003000);
9513}
9514#[cfg(feature = "api-12")]
9515#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9516impl ArkUI_NodeEventType {
9517 /// Defines the enumerated values of the event triggered
9518 /// before the sliding of the ARKUI_NODE_LIST component.
9519 ///
9520 /// Condition for triggering the event:
9521 ///
9522 /// This event is triggered when the scrolling component triggers scrolling.
9523 ///
9524 /// Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set.
9525 ///
9526 /// Called through the scroll controller API.
9527 ///
9528 /// Out-of-bounds rebound.
9529 ///
9530 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9531 ///
9532 /// [`ArkUI_NodeComponentEvent`].
9533 ///
9534 /// [`ArkUI_NodeComponentEvent`] contains three parameters:
9535 ///
9536 /// ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.
9537 ///
9538 /// The offset is positive when the list content is scrolled up and
9539 ///
9540 /// is negative when the list content is scrolled down.
9541 ///
9542 /// ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.
9543 ///
9544 /// parameter type is [`ArkUI_ScrollState`].
9545 ///
9546 /// <b>ArkUI_NodeComponentEvent.data[2].i32</b>: Current scroll source,
9547 ///
9548 /// parameter type is [`ArkUI_ScrollSource`].
9549 ///
9550 ///
9551 /// # Returns
9552 ///
9553 /// * Does not return or returns a number that sets the actual scroll distance of the scroll component.
9554 pub const NODE_LIST_ON_WILL_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(1003001);
9555}
9556#[cfg(feature = "api-12")]
9557#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9558impl ArkUI_NodeEventType {
9559 /// Define the enumerated values of the event triggered when the ARKUI_NODE_LIST component is flicked.
9560 /// Condition for triggering the event:
9561 ///
9562 /// This event is triggered when the scrolling component triggers scrolling.
9563 ///
9564 /// Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set.
9565 ///
9566 /// Called through the scroll controller API.
9567 ///
9568 /// Out-of-bounds rebound.
9569 ///
9570 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9571 ///
9572 /// [`ArkUI_NodeComponentEvent`].
9573 ///
9574 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9575 ///
9576 /// ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.
9577 ///
9578 /// The offset is positive when the list content is scrolled up and
9579 ///
9580 /// is negative when the list content is scrolled down.
9581 ///
9582 /// ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.
9583 pub const NODE_LIST_ON_DID_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(1003002);
9584}
9585#[cfg(feature = "api-12")]
9586#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9587impl ArkUI_NodeEventType {
9588 /// Defines the event triggered when the refresh state of the <b>ARKUI_NODE_REFRESH</b> object changes.
9589 ///
9590 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9591 /// [`ArkUI_NodeComponentEvent`].
9592 ///
9593 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
9594 ///
9595 /// <b>ArkUI_NodeComponentEvent.data[0].i32</b>: refresh state.
9596 pub const NODE_REFRESH_STATE_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(1009000);
9597}
9598#[cfg(feature = "api-12")]
9599#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9600impl ArkUI_NodeEventType {
9601 /// Defines the event triggered when the <b>ARKUI_NODE_REFRESH</b> object enters the refresh state.
9602 ///
9603 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9604 /// [`ArkUI_NodeComponentEvent`].
9605 ///
9606 /// [`ArkUI_NodeComponentEvent`] does not contain parameters:
9607 pub const NODE_REFRESH_ON_REFRESH: ArkUI_NodeEventType = ArkUI_NodeEventType(1009001);
9608}
9609#[cfg(feature = "api-12")]
9610#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9611impl ArkUI_NodeEventType {
9612 /// Defines the event that is triggered when the <b>ARKUI_NODE_REFRESH</b> drop-down distance changes.
9613 ///
9614 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9615 /// [`ArkUI_NodeComponentEvent`].
9616 ///
9617 /// [`ArkUI_NodeComponentEvent`] contains one parameter:
9618 ///
9619 /// <b>ArkUI_NodeComponentEvent.data[0].f32</b>: Pull-down distance.
9620 pub const NODE_REFRESH_ON_OFFSET_CHANGE: ArkUI_NodeEventType = ArkUI_NodeEventType(1009002);
9621}
9622#[cfg(feature = "api-12")]
9623#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9624impl ArkUI_NodeEventType {
9625 /// Defines the event triggered when the <b>ARKUI_NODE_SCROLL</b> component is about to scroll.
9626 ///
9627 /// Notes for triggering the event:
9628 ///
9629 /// 1. This event is triggered when scrolling is started by the <b>ARKUI_NODE_SCROLL</b> component or other
9630 /// input settings, such as keyboard and mouse operations.
9631 ///
9632 /// 2. Scrolling can be initiated by calling the controller API.
9633 ///
9634 /// 3. The out-of-bounds bounce effect is supported.
9635 ///
9636 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9637 /// [`ArkUI_NodeComponentEvent`].
9638 ///
9639 /// [`ArkUI_NodeComponentEvent`] contains three parameters:
9640 ///
9641 /// ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.
9642 ///
9643 /// The offset is positive when the list content is scrolled up and
9644 ///
9645 /// is negative when the list content is scrolled down.
9646 ///
9647 /// ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.
9648 ///
9649 /// parameter type is [`ArkUI_ScrollState`].
9650 ///
9651 /// <b>ArkUI_NodeComponentEvent.data[2].i32</b>: Current scroll source,
9652 ///
9653 /// parameter type is [`ArkUI_ScrollSource`].
9654 ///
9655 ///
9656 /// # Returns
9657 ///
9658 /// * Does not return or returns a number that sets the actual scroll distance of the scroll component.
9659 pub const NODE_ON_WILL_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(1010000);
9660}
9661#[cfg(feature = "api-12")]
9662#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9663impl ArkUI_NodeEventType {
9664 /// Define the enumerated values of the event triggered when the ARKUI_NODE_WATER_FLOW component slides.
9665 /// Condition for triggering the event:
9666 ///
9667 /// This event is triggered when the scrolling component triggers scrolling.
9668 /// Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set.
9669 ///
9670 /// Called through the scroll controller API.
9671 ///
9672 /// Out-of-bounds rebound.
9673 ///
9674 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9675 ///
9676 /// [`ArkUI_NodeComponentEvent`].
9677 ///
9678 /// [`ArkUI_NodeComponentEvent`] contains two parameters:
9679 ///
9680 /// ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.
9681 ///
9682 /// The offset is positive when the content is scrolled up and is negative when the content is scrolled down.
9683 ///
9684 /// ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.
9685 pub const NODE_WATER_FLOW_ON_DID_SCROLL: ArkUI_NodeEventType = ArkUI_NodeEventType(1010001);
9686}
9687#[cfg(feature = "api-12")]
9688#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9689impl ArkUI_NodeEventType {
9690 /// Defines the enumerated values of the event triggered,
9691 /// when the subcomponent of the start position or end position displayed in the current waterfall changes.
9692 /// Condition for triggering the event:
9693 ///
9694 /// This event is triggered when the index value of the
9695 ///
9696 /// first or last subcomponent in the waterfall display area changes.
9697 ///
9698 /// When the event callback occurs, the union type in the [`ArkUI_NodeEvent`] object is
9699 ///
9700 /// [`ArkUI_NodeComponentEvent`].
9701 ///
9702 /// [`ArkUI_NodeComponentEvent`] contains three parameters:
9703 ///
9704 /// ArkUI_NodeComponentEvent.data[0].i32: The index value of the
9705 ///
9706 /// start position of the currently displayed WaterFlow.
9707 ///
9708 /// ArkUI_NodeComponentEvent.data[1].i32: The index value of
9709 ///
9710 /// the end position of the currently displayed waterfall.
9711 pub const NODE_WATER_FLOW_ON_SCROLL_INDEX: ArkUI_NodeEventType = ArkUI_NodeEventType(1010002);
9712}
9713#[repr(transparent)]
9714/// Enumerates the event types supported by the NativeNode component.
9715///
9716///
9717/// Available since API-level: 12
9718#[cfg(feature = "api-12")]
9719#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9720#[derive(Clone, Hash, PartialEq, Eq)]
9721pub struct ArkUI_NodeEventType(pub ::core::ffi::c_uint);
9722#[repr(C)]
9723pub struct ArkUI_NodeEvent {
9724 _unused: [u8; 0],
9725}
9726#[cfg(feature = "api-12")]
9727#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9728impl ArkUI_NodeDirtyFlag {
9729 /// Remeasure.
9730 ///
9731 /// When this type of flag is specified, re-layout is triggered by default.
9732 pub const NODE_NEED_MEASURE: ArkUI_NodeDirtyFlag = ArkUI_NodeDirtyFlag(1);
9733}
9734#[cfg(feature = "api-12")]
9735#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9736impl ArkUI_NodeDirtyFlag {
9737 /// Re-layout.
9738 pub const NODE_NEED_LAYOUT: ArkUI_NodeDirtyFlag = ArkUI_NodeDirtyFlag(2);
9739}
9740#[cfg(feature = "api-12")]
9741#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9742impl ArkUI_NodeDirtyFlag {
9743 /// Re-rendering.
9744 pub const NODE_NEED_RENDER: ArkUI_NodeDirtyFlag = ArkUI_NodeDirtyFlag(3);
9745}
9746#[repr(transparent)]
9747/// Defines the dirty area flag passed in the <b>::markDirty</b> API.
9748///
9749///
9750/// Available since API-level: 12
9751#[cfg(feature = "api-12")]
9752#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9753#[derive(Clone, Hash, PartialEq, Eq)]
9754pub struct ArkUI_NodeDirtyFlag(pub ::core::ffi::c_uint);
9755#[cfg(feature = "api-12")]
9756#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9757impl ArkUI_NodeCustomEventType {
9758 /// Measure type.
9759 pub const ARKUI_NODE_CUSTOM_EVENT_ON_MEASURE: ArkUI_NodeCustomEventType =
9760 ArkUI_NodeCustomEventType(1);
9761}
9762#[cfg(feature = "api-12")]
9763#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9764impl ArkUI_NodeCustomEventType {
9765 /// Layout type.
9766 pub const ARKUI_NODE_CUSTOM_EVENT_ON_LAYOUT: ArkUI_NodeCustomEventType =
9767 ArkUI_NodeCustomEventType(2);
9768}
9769#[cfg(feature = "api-12")]
9770#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9771impl ArkUI_NodeCustomEventType {
9772 /// Draw type.
9773 pub const ARKUI_NODE_CUSTOM_EVENT_ON_DRAW: ArkUI_NodeCustomEventType =
9774 ArkUI_NodeCustomEventType(4);
9775}
9776#[cfg(feature = "api-12")]
9777#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9778impl ArkUI_NodeCustomEventType {
9779 /// Foreground type.
9780 pub const ARKUI_NODE_CUSTOM_EVENT_ON_FOREGROUND_DRAW: ArkUI_NodeCustomEventType =
9781 ArkUI_NodeCustomEventType(8);
9782}
9783#[cfg(feature = "api-12")]
9784#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9785impl ArkUI_NodeCustomEventType {
9786 /// Overlay type.
9787 pub const ARKUI_NODE_CUSTOM_EVENT_ON_OVERLAY_DRAW: ArkUI_NodeCustomEventType =
9788 ArkUI_NodeCustomEventType(16);
9789}
9790#[repr(transparent)]
9791/// Defines the custom component event type.
9792///
9793///
9794/// Available since API-level: 12
9795#[cfg(feature = "api-12")]
9796#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9797#[derive(Clone, Hash, PartialEq, Eq)]
9798pub struct ArkUI_NodeCustomEventType(pub ::core::ffi::c_uint);
9799#[repr(C)]
9800pub struct ArkUI_NodeCustomEvent {
9801 _unused: [u8; 0],
9802}
9803#[repr(C)]
9804pub struct ArkUI_NodeAdapter {
9805 _unused: [u8; 0],
9806}
9807/// Defines the component adapter, which is used for lazy loading of elements of scrollable components.
9808///
9809///
9810/// Available since API-level: 12
9811#[cfg(feature = "api-12")]
9812#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9813pub type ArkUI_NodeAdapterHandle = *mut ArkUI_NodeAdapter;
9814#[repr(C)]
9815pub struct ArkUI_NodeAdapterEvent {
9816 _unused: [u8; 0],
9817}
9818#[cfg(feature = "api-12")]
9819#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9820impl ArkUI_NodeAdapterEventType {
9821 /// This event occurs when the component is attached to the adapter.
9822 pub const NODE_ADAPTER_EVENT_WILL_ATTACH_TO_NODE: ArkUI_NodeAdapterEventType =
9823 ArkUI_NodeAdapterEventType(1);
9824}
9825#[cfg(feature = "api-12")]
9826#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9827impl ArkUI_NodeAdapterEventType {
9828 /// This event occurs when the component is detached from the adapter.
9829 pub const NODE_ADAPTER_EVENT_WILL_DETACH_FROM_NODE: ArkUI_NodeAdapterEventType =
9830 ArkUI_NodeAdapterEventType(2);
9831}
9832#[cfg(feature = "api-12")]
9833#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9834impl ArkUI_NodeAdapterEventType {
9835 /// This event occurs when the adapter obtains the unique ID of the new element to add.
9836 pub const NODE_ADAPTER_EVENT_ON_GET_NODE_ID: ArkUI_NodeAdapterEventType =
9837 ArkUI_NodeAdapterEventType(3);
9838}
9839#[cfg(feature = "api-12")]
9840#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9841impl ArkUI_NodeAdapterEventType {
9842 /// This event occurs when the adapter obtains the content of the new element to add.
9843 pub const NODE_ADAPTER_EVENT_ON_ADD_NODE_TO_ADAPTER: ArkUI_NodeAdapterEventType =
9844 ArkUI_NodeAdapterEventType(4);
9845}
9846#[cfg(feature = "api-12")]
9847#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9848impl ArkUI_NodeAdapterEventType {
9849 /// This event occurs when the adapter removes an element.
9850 pub const NODE_ADAPTER_EVENT_ON_REMOVE_NODE_FROM_ADAPTER: ArkUI_NodeAdapterEventType =
9851 ArkUI_NodeAdapterEventType(5);
9852}
9853#[repr(transparent)]
9854/// Enumerates component adapter events.
9855///
9856///
9857/// Available since API-level: 12
9858#[cfg(feature = "api-12")]
9859#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9860#[derive(Clone, Hash, PartialEq, Eq)]
9861pub struct ArkUI_NodeAdapterEventType(pub ::core::ffi::c_uint);
9862/// Declares a collection of native node APIs provided by ArkUI.
9863///
9864/// The APIs related to the native node must be called in the main thread.
9865///
9866///
9867/// Version: 1
9868///
9869/// Available since API-level: 12
9870#[cfg(feature = "api-12")]
9871#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
9872#[repr(C)]
9873pub struct ArkUI_NativeNodeAPI_1 {
9874 /// Struct version.
9875 pub version: i32,
9876 /// Creates a component based on [`ArkUI_NodeType`] and returns the pointer to the created component.
9877 ///
9878 /// # Arguments
9879 ///
9880 /// * `type` - Indicates the type of component to create.
9881 ///
9882 /// # Returns
9883 ///
9884 /// * Returns the pointer to the created component. If the component fails to be created, NULL is returned.
9885 pub createNode:
9886 ::core::option::Option<unsafe extern "C" fn(type_: ArkUI_NodeType) -> ArkUI_NodeHandle>,
9887 /// Destroys the component to which the specified pointer points.
9888 ///
9889 /// # Arguments
9890 ///
9891 /// * `node` - Indicates the pointer.
9892 pub disposeNode: ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle)>,
9893 /// Adds a component to a parent node.
9894 ///
9895 /// # Arguments
9896 ///
9897 /// * `parent` - Indicates the pointer to the parent node.
9898 ///
9899 /// * `child` - Indicates the pointer to the child node.
9900 ///
9901 /// # Returns
9902 ///
9903 /// * Returns the error code.
9904 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
9905 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
9906 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
9907 /// on BuilderNode generated nodes:
9908 /// setting or resetting attributes, setting events, or adding or editing subnodes.
9909 pub addChild: ::core::option::Option<
9910 unsafe extern "C" fn(parent: ArkUI_NodeHandle, child: ArkUI_NodeHandle) -> i32,
9911 >,
9912 /// Removes a component from its parent node.
9913 ///
9914 /// # Arguments
9915 ///
9916 /// * `parent` - Indicates the pointer to the parent node.
9917 ///
9918 /// * `child` - Indicates the pointer to the child node.
9919 ///
9920 /// # Returns
9921 ///
9922 /// * Returns the error code.
9923 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
9924 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
9925 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
9926 /// on BuilderNode generated nodes:
9927 /// setting or resetting attributes, setting events, or adding or editing subnodes.
9928 pub removeChild: ::core::option::Option<
9929 unsafe extern "C" fn(parent: ArkUI_NodeHandle, child: ArkUI_NodeHandle) -> i32,
9930 >,
9931 /// Inserts a component to a parent node after the specified <b>sibling</b> node.
9932 ///
9933 /// # Arguments
9934 ///
9935 /// * `parent` - Indicates the pointer to the parent node.
9936 ///
9937 /// * `child` - Indicates the pointer to the child node.
9938 ///
9939 /// * `sibling` - Indicates the pointer to the sibling node after which the target node is to be inserted.
9940 /// If the value is null, the node is inserted at the start of the parent node.
9941 ///
9942 /// # Returns
9943 ///
9944 /// * Returns the error code.
9945 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
9946 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
9947 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
9948 /// on BuilderNode generated nodes:
9949 /// setting or resetting attributes, setting events, or adding or editing subnodes.
9950 pub insertChildAfter: ::core::option::Option<
9951 unsafe extern "C" fn(
9952 parent: ArkUI_NodeHandle,
9953 child: ArkUI_NodeHandle,
9954 sibling: ArkUI_NodeHandle,
9955 ) -> i32,
9956 >,
9957 /// Inserts a component to a parent node before the specified <b>sibling</b> node.
9958 ///
9959 /// # Arguments
9960 ///
9961 /// * `parent` - Indicates the pointer to the parent node.
9962 ///
9963 /// * `child` - Indicates the pointer to the child node.
9964 ///
9965 /// * `sibling` - Indicates the pointer to the sibling node before which the target node is to be inserted.
9966 /// If the value is null, the node is inserted at the end of the parent node.
9967 ///
9968 /// # Returns
9969 ///
9970 /// * Returns the error code.
9971 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
9972 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
9973 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
9974 /// on BuilderNode generated nodes:
9975 /// setting or resetting attributes, setting events, or adding or editing subnodes.
9976 pub insertChildBefore: ::core::option::Option<
9977 unsafe extern "C" fn(
9978 parent: ArkUI_NodeHandle,
9979 child: ArkUI_NodeHandle,
9980 sibling: ArkUI_NodeHandle,
9981 ) -> i32,
9982 >,
9983 /// Inserts a component to the specified position in a parent node.
9984 ///
9985 /// # Arguments
9986 ///
9987 /// * `parent` - Indicates the pointer to the parent node.
9988 ///
9989 /// * `child` - Indicates the pointer to the child node.
9990 ///
9991 /// * `position` - Indicates the position to which the target child node is to be inserted. If the value is a
9992 /// negative number or invalid, the node is inserted at the end of the parent node.
9993 ///
9994 /// # Returns
9995 ///
9996 /// * Returns the error code.
9997 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
9998 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
9999 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
10000 /// on BuilderNode generated nodes:
10001 /// setting or resetting attributes, setting events, or adding or editing subnodes.
10002 pub insertChildAt: ::core::option::Option<
10003 unsafe extern "C" fn(
10004 parent: ArkUI_NodeHandle,
10005 child: ArkUI_NodeHandle,
10006 position: i32,
10007 ) -> i32,
10008 >,
10009 /// Sets the attribute of a node.
10010 ///
10011 /// # Arguments
10012 ///
10013 /// * `node` - Indicates the node whose attribute needs to be set.
10014 ///
10015 /// * `attribute` - Indicates the type of attribute to set.
10016 ///
10017 /// * `value` - Indicates the attribute value.
10018 ///
10019 /// # Returns
10020 ///
10021 /// * Returns the error code.
10022 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10023 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10024 /// Returns [`ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED`] if the dynamic implementation library
10025 /// of the native API was not found.
10026 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
10027 /// on BuilderNode generated nodes:
10028 /// setting or resetting attributes, setting events, or adding or editing subnodes.
10029 pub setAttribute: ::core::option::Option<
10030 unsafe extern "C" fn(
10031 node: ArkUI_NodeHandle,
10032 attribute: ArkUI_NodeAttributeType,
10033 item: *const ArkUI_AttributeItem,
10034 ) -> i32,
10035 >,
10036 /// Obtains an attribute.
10037 ///
10038 /// The pointer returned by this API is an internal buffer pointer of the ArkUI framework. As such, you do not need
10039 /// to call <b>delete</b> to release the memory. However, the pointer must be used before this API is called next
10040 /// time. Otherwise, the pointer may be overwritten by other values.
10041 /// # Arguments
10042 ///
10043 /// * `node` - Indicates the node whose attribute needs to be obtained.
10044 ///
10045 /// * `attribute` - Indicates the type of attribute to obtain.
10046 ///
10047 /// # Returns
10048 ///
10049 /// * Returns the attribute value. If the operation fails, a null pointer is returned.
10050 pub getAttribute: ::core::option::Option<
10051 unsafe extern "C" fn(
10052 node: ArkUI_NodeHandle,
10053 attribute: ArkUI_NodeAttributeType,
10054 ) -> *const ArkUI_AttributeItem,
10055 >,
10056 /// Resets an attribute.
10057 ///
10058 /// # Arguments
10059 ///
10060 /// * `node` - Indicates the node whose attribute needs to be reset.
10061 ///
10062 /// * `attribute` - Indicates the type of attribute to reset.
10063 ///
10064 /// # Returns
10065 ///
10066 /// * Returns the error code.
10067 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10068 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10069 /// Returns [`ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED`] if the dynamic implementation library
10070 /// of the native API was not found.
10071 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
10072 /// on BuilderNode generated nodes:
10073 /// setting or resetting attributes, setting events, or adding or editing subnodes.
10074 pub resetAttribute: ::core::option::Option<
10075 unsafe extern "C" fn(node: ArkUI_NodeHandle, attribute: ArkUI_NodeAttributeType) -> i32,
10076 >,
10077 /// Registers an event for the specified node.
10078 ///
10079 /// When the component is being displayed, this API must be called in the main thread.
10080 ///
10081 /// # Arguments
10082 ///
10083 /// * `node` - Indicates the target node.
10084 ///
10085 /// * `eventType` - Indicates the type of event to register.
10086 ///
10087 /// * `targetId` - Indicates the custom event ID, which is passed in the callback of [`ArkUI_NodeEvent`]
10088 /// when the event is triggered.
10089 ///
10090 /// * `userData` - Indicates the custom event parameter, which is passed in the callback of [`ArkUI_NodeEvent`]
10091 ///
10092 /// # Returns
10093 ///
10094 /// * Returns the error code.
10095 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10096 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10097 /// Returns [`ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED`] if the dynamic implementation library
10098 /// of the native API was not found.
10099 /// Returns [`ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE`] if the following operations are not allowed
10100 /// on BuilderNode generated nodes:
10101 /// setting or resetting attributes, setting events, or adding or editing subnodes.
10102 pub registerNodeEvent: ::core::option::Option<
10103 unsafe extern "C" fn(
10104 node: ArkUI_NodeHandle,
10105 eventType: ArkUI_NodeEventType,
10106 targetId: i32,
10107 userData: *mut ::core::ffi::c_void,
10108 ) -> i32,
10109 >,
10110 /// Unregisters an event for the specified node.
10111 ///
10112 /// When the component is being displayed, this API must be called in the main thread.
10113 ///
10114 /// # Arguments
10115 ///
10116 /// * `node` - Indicates the target node.
10117 ///
10118 /// * `eventType` - Indicates the type of event to unregister.
10119 pub unregisterNodeEvent: ::core::option::Option<
10120 unsafe extern "C" fn(node: ArkUI_NodeHandle, eventType: ArkUI_NodeEventType),
10121 >,
10122 /// Registers an event receiver.
10123 ///
10124 /// The ArkUI framework collects component events generated during the process and calls back the events through
10125 /// the registered event receiver.
10126 ///
10127 /// A new call to this API will overwrite the previously registered event receiver.
10128 ///
10129 /// Do not directly save the <b>ArkUI_NodeEvent</b> object pointer. The data will be destroyed after the
10130 /// callback is complete.
10131 ///
10132 /// To bind with a component instance, you can use the <b>addNodeEventReceiver</b> function.
10133 ///
10134 ///
10135 /// # Arguments
10136 ///
10137 /// * `eventReceiver` - Indicates the event receiver to register.
10138 pub registerNodeEventReceiver: ::core::option::Option<
10139 unsafe extern "C" fn(
10140 eventReceiver: ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_NodeEvent)>,
10141 ),
10142 >,
10143 /// Unregisters the event receiver.
10144 pub unregisterNodeEventReceiver: ::core::option::Option<unsafe extern "C" fn()>,
10145 /// Forcibly marks the current node that needs to be measured, laid out, or rendered again.
10146 ///
10147 /// Regarding updates to system attributes, the ArkUI framework automatically marks the dirty area and performs
10148 /// measuring, layout, or rendering again. In this case, you do not need to call this API.
10149 /// # Arguments
10150 ///
10151 /// * `node` - Indicates the node for which you want to mark as dirty area.
10152 ///
10153 /// * `dirtyFlag` - Indicates type of dirty area.
10154 pub markDirty: ::core::option::Option<
10155 unsafe extern "C" fn(node: ArkUI_NodeHandle, dirtyFlag: ArkUI_NodeDirtyFlag),
10156 >,
10157 /// Obtains the number of subnodes.
10158 ///
10159 /// # Arguments
10160 ///
10161 /// * `node` - Indicates the target node.
10162 ///
10163 /// # Returns
10164 ///
10165 /// * the number of subnodes. If not, returns 0.
10166 pub getTotalChildCount:
10167 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> u32>,
10168 /// Obtains a subnode.
10169 ///
10170 /// # Arguments
10171 ///
10172 /// * `node` - Indicates the target node.
10173 ///
10174 /// * `position` - Indicates the position of the subnode.
10175 ///
10176 /// # Returns
10177 ///
10178 /// * Returns the pointer to the subnode if the subnode exists; returns <b>NULL</b> otherwise.
10179 pub getChildAt: ::core::option::Option<
10180 unsafe extern "C" fn(node: ArkUI_NodeHandle, position: i32) -> ArkUI_NodeHandle,
10181 >,
10182 /// Obtains the first subnode.
10183 ///
10184 /// # Arguments
10185 ///
10186 /// * `node` - Indicates the target node.
10187 ///
10188 /// # Returns
10189 ///
10190 /// * Returns the pointer to the subnode if the subnode exists; returns <b>NULL</b> otherwise.
10191 pub getFirstChild:
10192 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> ArkUI_NodeHandle>,
10193 /// Obtains the last subnode.
10194 ///
10195 /// # Arguments
10196 ///
10197 /// * `node` - Indicates the target node.
10198 ///
10199 /// # Returns
10200 ///
10201 /// * Returns the pointer to the subnode if the subnode exists; returns <b>NULL</b> otherwise.
10202 pub getLastChild:
10203 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> ArkUI_NodeHandle>,
10204 /// Obtains the previous sibling node.
10205 ///
10206 /// # Arguments
10207 ///
10208 /// * `node` - Indicates the target node.
10209 ///
10210 /// # Returns
10211 ///
10212 /// * Returns the pointer to the subnode if the subnode exists; returns <b>NULL</b> otherwise.
10213 pub getPreviousSibling:
10214 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> ArkUI_NodeHandle>,
10215 /// Obtains the next sibling node.
10216 ///
10217 /// # Arguments
10218 ///
10219 /// * `node` - Indicates the target node.
10220 ///
10221 /// # Returns
10222 ///
10223 /// * Returns the pointer to the subnode if the subnode exists; returns <b>NULL</b> otherwise.
10224 pub getNextSibling:
10225 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> ArkUI_NodeHandle>,
10226 /// Registers a custom event for a node. When the event is triggered, the value is returned through the entry
10227 /// point function registered by <b>registerNodeCustomEventReceiver</b>.
10228 ///
10229 /// # Arguments
10230 ///
10231 /// * `node` - Indicates the target node.
10232 ///
10233 /// * `eventType` - Indicates the type of event to register.
10234 ///
10235 /// * `targetId` - Indicates the custom event ID, which is passed in the callback of [`ArkUI_NodeCustomEvent`]
10236 /// when the event is triggered.
10237 ///
10238 /// * `userData` - Indicates the custom event parameter, which is passed in the callback of
10239 /// [`ArkUI_NodeCustomEvent`] when the event is triggered.
10240 ///
10241 /// # Returns
10242 ///
10243 /// * Returns the error code.
10244 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10245 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10246 /// Returns [`ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED`] if the dynamic implementation library
10247 /// of the native API was not found.
10248 pub registerNodeCustomEvent: ::core::option::Option<
10249 unsafe extern "C" fn(
10250 node: ArkUI_NodeHandle,
10251 eventType: ArkUI_NodeCustomEventType,
10252 targetId: i32,
10253 userData: *mut ::core::ffi::c_void,
10254 ) -> i32,
10255 >,
10256 /// Unregisters a custom event for a node.
10257 ///
10258 /// # Arguments
10259 ///
10260 /// * `node` - Indicates the target node.
10261 ///
10262 /// * `eventType` - Indicates the type of event to unregister.
10263 pub unregisterNodeCustomEvent: ::core::option::Option<
10264 unsafe extern "C" fn(node: ArkUI_NodeHandle, eventType: ArkUI_NodeCustomEventType),
10265 >,
10266 /// Registers a unified entry point function for custom node event callbacks.
10267 ///
10268 /// The ArkUI framework collects custom component events generated during the process and calls back the events
10269 /// through the registered <b>registerNodeCustomEventReceiver</b>.
10270 ///
10271 /// A new call to this API will overwrite the previously registered event receiver.
10272 /// Do not directly save the <b>ArkUI_NodeCustomEvent</b> object pointer.
10273 /// The data will be destroyed after the callback is complete.
10274 ///
10275 /// To bind with a component instance, you can use the <b>addNodeCustomEventReceiver</b> function.
10276 ///
10277 ///
10278 /// # Arguments
10279 ///
10280 /// * `eventReceiver` - Indicates the event receiver to register.
10281 pub registerNodeCustomEventReceiver: ::core::option::Option<
10282 unsafe extern "C" fn(
10283 eventReceiver: ::core::option::Option<
10284 unsafe extern "C" fn(event: *mut ArkUI_NodeCustomEvent),
10285 >,
10286 ),
10287 >,
10288 /// Unregisters the unified entry point function for custom node event callbacks.
10289 pub unregisterNodeCustomEventReceiver: ::core::option::Option<unsafe extern "C" fn()>,
10290 /// Sets the width and height for a component after the measurement.
10291 ///
10292 /// # Arguments
10293 ///
10294 /// * `node` - Indicates the target node.
10295 ///
10296 /// * `width` - Indicates the width.
10297 ///
10298 /// * `height` - Indicates the height.
10299 ///
10300 /// # Returns
10301 ///
10302 /// * Returns the error code.
10303 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10304 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs..
10305 pub setMeasuredSize: ::core::option::Option<
10306 unsafe extern "C" fn(node: ArkUI_NodeHandle, width: i32, height: i32) -> i32,
10307 >,
10308 /// Sets the position for a component.
10309 ///
10310 /// # Arguments
10311 ///
10312 /// * `node` - Indicates the target node.
10313 ///
10314 /// * `positionX` - Indicates the X coordinate.
10315 ///
10316 /// * `positionY` - Indicates the Y coordinate.
10317 ///
10318 /// # Returns
10319 ///
10320 /// * Returns the error code.
10321 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10322 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs..
10323 pub setLayoutPosition: ::core::option::Option<
10324 unsafe extern "C" fn(node: ArkUI_NodeHandle, positionX: i32, positionY: i32) -> i32,
10325 >,
10326 /// Obtains the width and height of a component after measurement.
10327 ///
10328 /// # Arguments
10329 ///
10330 /// * `node` - Indicates the target node.
10331 ///
10332 /// # Returns
10333 ///
10334 /// * Returns the width and height of the component.
10335 pub getMeasuredSize:
10336 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> ArkUI_IntSize>,
10337 /// Obtains the position of a component after the layout is complete.
10338 ///
10339 /// # Arguments
10340 ///
10341 /// * `node` - Indicates the target node.
10342 ///
10343 /// # Returns
10344 ///
10345 /// * Returns the position of the component.
10346 pub getLayoutPosition:
10347 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> ArkUI_IntOffset>,
10348 /// Measures a node. You can use the <b>getMeasuredSize</b> API to obtain the size after the measurement.
10349 ///
10350 /// # Arguments
10351 ///
10352 /// * `node` - Indicates the target node.
10353 ///
10354 /// * `Constraint` - Indicates the size constraint.
10355 ///
10356 /// # Returns
10357 ///
10358 /// * Returns the error code.
10359 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10360 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs..
10361 pub measureNode: ::core::option::Option<
10362 unsafe extern "C" fn(
10363 node: ArkUI_NodeHandle,
10364 Constraint: *mut ArkUI_LayoutConstraint,
10365 ) -> i32,
10366 >,
10367 /// Lays outs a component and passes the expected position of the component relative to its parent component.
10368 ///
10369 /// When the component is being displayed, this API must be called in the main thread.
10370 ///
10371 /// # Arguments
10372 ///
10373 /// * `node` - Indicates the target node.
10374 ///
10375 /// * `positionX` - Indicates the X coordinate.
10376 ///
10377 /// * `positionY` - Indicates the Y coordinate.
10378 ///
10379 /// # Returns
10380 ///
10381 /// * Returns the error code.
10382 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10383 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs..
10384 pub layoutNode: ::core::option::Option<
10385 unsafe extern "C" fn(node: ArkUI_NodeHandle, positionX: i32, positionY: i32) -> i32,
10386 >,
10387 /// Adds a component event callback function to a component to receive component events generated
10388 /// by the component.
10389 ///
10390 /// Unlike the global registration function <b>registerNodeEventReceiver</b>, this API allows multiple event
10391 /// receivers to be added to the same component.
10392 ///
10393 /// The callback added by this API is triggered before the global callback registered by
10394 /// <b>registerNodeEventReceiver</b>.
10395 ///
10396 /// Do not directly save the <b>ArkUI_NodeEvent</b> object pointer.
10397 /// The data will be destroyed after the callback is complete.
10398 ///
10399 ///
10400 /// # Arguments
10401 ///
10402 /// * `node` - Indicates the component for which you want to add the event callback function.
10403 ///
10404 /// * `eventReceiver` - Indicates the component event callback function to add.
10405 ///
10406 /// # Returns
10407 ///
10408 /// * Returns the error code.
10409 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10410 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs..
10411 pub addNodeEventReceiver: ::core::option::Option<
10412 unsafe extern "C" fn(
10413 node: ArkUI_NodeHandle,
10414 eventReceiver: ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_NodeEvent)>,
10415 ) -> i32,
10416 >,
10417 /// Removes the registered component event callback function from a component.
10418 ///
10419 /// # Arguments
10420 ///
10421 /// * `node` - Indicates the component from which you want to remove the event callback function.
10422 ///
10423 /// * `eventReceiver` - Indicates the component event callback function to remove.
10424 ///
10425 /// # Returns
10426 ///
10427 /// * Returns the error code.
10428 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10429 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs..
10430 pub removeNodeEventReceiver: ::core::option::Option<
10431 unsafe extern "C" fn(
10432 node: ArkUI_NodeHandle,
10433 eventReceiver: ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_NodeEvent)>,
10434 ) -> i32,
10435 >,
10436 /// Adds a custom event callback function to a component to receive custom events
10437 /// (such as layout and drawing events) generated by the component.
10438 ///
10439 /// Unlike the global registration function <b>registerNodeCustomEventReceiver</b>, this API allows
10440 /// multiple event receivers to be added to the same component.
10441 ///
10442 /// The callback added by this API is triggered before the global callback registered by
10443 /// <b>registerNodeCustomEventReceiver</b>.
10444 ///
10445 /// Do not directly save the <b>ArkUI_NodeCustomEvent</b> object pointer.
10446 /// The data will be destroyed after the callback is complete.
10447 ///
10448 ///
10449 /// # Arguments
10450 ///
10451 /// * `node` - Indicates the component for which you want to add the custom event callback function.
10452 ///
10453 /// * `eventReceiver` - Indicates the custom event callback function to add.
10454 ///
10455 /// # Returns
10456 ///
10457 /// * Returns the error code.
10458 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10459 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10460 pub addNodeCustomEventReceiver: ::core::option::Option<
10461 unsafe extern "C" fn(
10462 node: ArkUI_NodeHandle,
10463 eventReceiver: ::core::option::Option<
10464 unsafe extern "C" fn(event: *mut ArkUI_NodeCustomEvent),
10465 >,
10466 ) -> i32,
10467 >,
10468 /// Removes a registered custom event callback function from a component.
10469 ///
10470 /// # Arguments
10471 ///
10472 /// * `node` - Indicates the component from which you want to remove the custom event callback function.
10473 ///
10474 /// * `eventReceiver` - Indicates the custom event callback function to remove.
10475 ///
10476 /// # Returns
10477 ///
10478 /// * Returns the error code.
10479 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10480 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10481 pub removeNodeCustomEventReceiver: ::core::option::Option<
10482 unsafe extern "C" fn(
10483 node: ArkUI_NodeHandle,
10484 eventReceiver: ::core::option::Option<
10485 unsafe extern "C" fn(event: *mut ArkUI_NodeCustomEvent),
10486 >,
10487 ) -> i32,
10488 >,
10489 /// Saves custom data on the specified component.
10490 ///
10491 /// # Arguments
10492 ///
10493 /// * `node` - Indicates the component on which the custom data will be saved.
10494 ///
10495 /// * `userData` - Indicates the custom data to be saved.
10496 ///
10497 /// # Returns
10498 ///
10499 /// * Returns the error code.
10500 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10501 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs..
10502 pub setUserData: ::core::option::Option<
10503 unsafe extern "C" fn(node: ArkUI_NodeHandle, userData: *mut ::core::ffi::c_void) -> i32,
10504 >,
10505 /// Obtains the custom data saved on the specified component.
10506 ///
10507 /// # Arguments
10508 ///
10509 /// * `node` - Indicates the target component.
10510 ///
10511 /// # Returns
10512 ///
10513 /// * Returns the custom data.
10514 pub getUserData: ::core::option::Option<
10515 unsafe extern "C" fn(node: ArkUI_NodeHandle) -> *mut ::core::ffi::c_void,
10516 >,
10517 /// Sets the unit for a component.
10518 ///
10519 /// # Arguments
10520 ///
10521 /// * `node` - Indicates the component for which you want to set the unit.
10522 ///
10523 /// * `unit` - Indicates the unit, which is an enumerated value of [`ArkUI_LengthMetricUnit`].
10524 /// The default value is <b>ARKUI_LENGTH_METRIC_UNIT_DEFAULT</b>.
10525 ///
10526 /// # Returns
10527 ///
10528 /// * Returns the error code.
10529 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10530 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10531 pub setLengthMetricUnit: ::core::option::Option<
10532 unsafe extern "C" fn(node: ArkUI_NodeHandle, unit: ArkUI_LengthMetricUnit) -> i32,
10533 >,
10534 /// Get the parent node.
10535 ///
10536 /// # Arguments
10537 ///
10538 /// * `node` - target node object.
10539 ///
10540 /// # Returns
10541 ///
10542 /// * Returns the pointer of the component, if not return NULL
10543 pub getParent:
10544 ::core::option::Option<unsafe extern "C" fn(node: ArkUI_NodeHandle) -> ArkUI_NodeHandle>,
10545 /// Uninstall all child nodes from the parent component.
10546 ///
10547 /// # Arguments
10548 ///
10549 /// * `parent` - target node object.
10550 ///
10551 /// # Returns
10552 ///
10553 /// * Returns the error code.
10554 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10555 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10556 ///
10557 /// Available since API-level: 12
10558 pub removeAllChildren:
10559 ::core::option::Option<unsafe extern "C" fn(parent: ArkUI_NodeHandle) -> i32>,
10560}
10561#[cfg(feature = "api-12")]
10562#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10563impl ArkUI_NodeContentEventType {
10564 /// Defines the attach event.
10565 pub const NODE_CONTENT_EVENT_ON_ATTACH_TO_WINDOW: ArkUI_NodeContentEventType =
10566 ArkUI_NodeContentEventType(0);
10567}
10568#[cfg(feature = "api-12")]
10569#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10570impl ArkUI_NodeContentEventType {
10571 /// Defines the detach event.
10572 pub const NODE_CONTENT_EVENT_ON_DETACH_FROM_WINDOW: ArkUI_NodeContentEventType =
10573 ArkUI_NodeContentEventType(1);
10574}
10575#[repr(transparent)]
10576/// Defines the node content event type.
10577///
10578///
10579/// Available since API-level: 12
10580#[cfg(feature = "api-12")]
10581#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10582#[derive(Clone, Hash, PartialEq, Eq)]
10583pub struct ArkUI_NodeContentEventType(pub ::core::ffi::c_uint);
10584#[repr(C)]
10585pub struct ArkUI_NodeContentEvent {
10586 _unused: [u8; 0],
10587}
10588/// Defines the callback function of a node content event.
10589///
10590/// Available since API-level: 12
10591#[cfg(feature = "api-12")]
10592#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10593pub type ArkUI_NodeContentCallback =
10594 ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_NodeContentEvent)>;
10595extern "C" {
10596 /// Obtains the type of a component event.
10597 ///
10598 /// # Arguments
10599 ///
10600 /// * `event` - Indicates the pointer to the component event.
10601 ///
10602 /// # Returns
10603 ///
10604 /// * Returns the type of the component event.
10605 ///
10606 /// Available since API-level: 12
10607 #[cfg(feature = "api-12")]
10608 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10609 pub fn OH_ArkUI_NodeEvent_GetEventType(event: *mut ArkUI_NodeEvent) -> ArkUI_NodeEventType;
10610 /// Obtains the custom ID of a component event.
10611 ///
10612 /// The event ID is passed in as a parameter when the [`registerNodeEvent`] function is called and can be applied
10613 /// to the dispatch logic of the same event entry function [`registerNodeEventReceiver`].
10614 ///
10615 /// # Arguments
10616 ///
10617 /// * `event` - Indicates the pointer to the component event.
10618 ///
10619 /// # Returns
10620 ///
10621 /// * Returns the custom ID of the component event.
10622 ///
10623 /// Available since API-level: 12
10624 #[cfg(feature = "api-12")]
10625 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10626 pub fn OH_ArkUI_NodeEvent_GetTargetId(event: *mut ArkUI_NodeEvent) -> i32;
10627 /// Obtains the component object that triggers a component event.
10628 ///
10629 /// # Arguments
10630 ///
10631 /// * `event` - Indicates the pointer to the component event.
10632 ///
10633 /// # Returns
10634 ///
10635 /// * Returns the component object that triggers the component event.
10636 ///
10637 /// Available since API-level: 12
10638 #[cfg(feature = "api-12")]
10639 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10640 pub fn OH_ArkUI_NodeEvent_GetNodeHandle(event: *mut ArkUI_NodeEvent) -> ArkUI_NodeHandle;
10641 /// Obtains input event (for example, touch event) data for a component event.
10642 ///
10643 /// # Arguments
10644 ///
10645 /// * `event` - Indicates the pointer to the component event.
10646 ///
10647 /// # Returns
10648 ///
10649 /// * Returns the pointer to the input event data.
10650 ///
10651 /// Available since API-level: 12
10652 #[cfg(feature = "api-12")]
10653 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10654 pub fn OH_ArkUI_NodeEvent_GetInputEvent(event: *mut ArkUI_NodeEvent)
10655 -> *mut ArkUI_UIInputEvent;
10656 /// Obtains the numerical data in a component event.
10657 ///
10658 /// # Arguments
10659 ///
10660 /// * `event` - Indicates the pointer to the component event.
10661 ///
10662 /// # Returns
10663 ///
10664 /// * Returns the pointer to the numerical data.
10665 ///
10666 /// Available since API-level: 12
10667 #[cfg(feature = "api-12")]
10668 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10669 pub fn OH_ArkUI_NodeEvent_GetNodeComponentEvent(
10670 event: *mut ArkUI_NodeEvent,
10671 ) -> *mut ArkUI_NodeComponentEvent;
10672 /// Obtains the string data in a component event.
10673 ///
10674 /// # Arguments
10675 ///
10676 /// * `event` - Indicates the pointer to the component event.
10677 ///
10678 /// # Returns
10679 ///
10680 /// * Returns the pointer to the string data.
10681 ///
10682 /// Available since API-level: 12
10683 #[cfg(feature = "api-12")]
10684 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10685 pub fn OH_ArkUI_NodeEvent_GetStringAsyncEvent(
10686 event: *mut ArkUI_NodeEvent,
10687 ) -> *mut ArkUI_StringAsyncEvent;
10688 /// Obtains the custom data in a component event.
10689 ///
10690 /// This parameter is passed in [`registerNodeEvent`] and can be applied to the service logic when the event
10691 /// is triggered.
10692 ///
10693 /// # Arguments
10694 ///
10695 /// * `event` - Indicates the pointer to the component event.
10696 ///
10697 /// # Returns
10698 ///
10699 /// * Returns the pointer to the custom data.
10700 ///
10701 /// Available since API-level: 12
10702 #[cfg(feature = "api-12")]
10703 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10704 pub fn OH_ArkUI_NodeEvent_GetUserData(event: *mut ArkUI_NodeEvent) -> *mut ::core::ffi::c_void;
10705 /// Obtains the numeric-type parameter of a component event.
10706 ///
10707 /// # Arguments
10708 ///
10709 /// * `event` - Indicates the pointer to the component event.
10710 ///
10711 /// * `index` - Indicates the index of the return value.
10712 ///
10713 /// * `value` - Indicates the return value.
10714 ///
10715 /// # Returns
10716 ///
10717 /// * Returns the error code.
10718 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10719 /// Returns [`ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE`] if the parameter length exceeds
10720 /// the limit.
10721 /// Returns [`ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID`] if the data does not exist in the component event.
10722 ///
10723 /// Available since API-level: 12
10724 #[cfg(feature = "api-12")]
10725 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10726 pub fn OH_ArkUI_NodeEvent_GetNumberValue(
10727 event: *mut ArkUI_NodeEvent,
10728 index: i32,
10729 value: *mut ArkUI_NumberValue,
10730 ) -> i32;
10731 /// Obtains the string-type parameter of a component event. The string data is valid only during an event
10732 /// callback. To use it outside an event callback, you are advised to copy the string data.
10733 ///
10734 /// # Arguments
10735 ///
10736 /// * `event` - Indicates the pointer to the component event.
10737 ///
10738 /// * `index` - Indicates the index of the return value.
10739 ///
10740 /// * `string` - Indicates the pointer to the string array.
10741 ///
10742 /// * `stringSize` - Indicates the length of the string array.
10743 ///
10744 /// # Returns
10745 ///
10746 /// * Returns the error code.
10747 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10748 /// Returns [`ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE`] if the parameter length exceeds
10749 /// the limit.
10750 /// Returns [`ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID`] if the data does not exist in the component event.
10751 ///
10752 /// Available since API-level: 12
10753 #[cfg(feature = "api-12")]
10754 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10755 pub fn OH_ArkUI_NodeEvent_GetStringValue(
10756 event: *mut ArkUI_NodeEvent,
10757 index: i32,
10758 string: *mut *mut ::core::ffi::c_char,
10759 stringSize: *mut i32,
10760 ) -> i32;
10761 /// Sets the return value for a component event.
10762 ///
10763 /// # Arguments
10764 ///
10765 /// * `event` - Indicates the pointer to the component event.
10766 ///
10767 /// * `value` - Indicates the numeric-type array.
10768 ///
10769 /// * `size` - Indicates the array length.
10770 ///
10771 /// # Returns
10772 ///
10773 /// * Returns the error code.
10774 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10775 /// Returns [`ARKUI_ERROR_CODE_NODE_EVENT_NO_RETURN`] if the component event does not support return values.
10776 /// Returns [`ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID`] if data does not exist in the component event.
10777 ///
10778 /// Available since API-level: 12
10779 #[cfg(feature = "api-12")]
10780 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10781 pub fn OH_ArkUI_NodeEvent_SetReturnNumberValue(
10782 event: *mut ArkUI_NodeEvent,
10783 value: *mut ArkUI_NumberValue,
10784 size: i32,
10785 ) -> i32;
10786 /// Creates a component adapter.
10787 ///
10788 ///
10789 /// Available since API-level: 12
10790 #[cfg(feature = "api-12")]
10791 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10792 pub fn OH_ArkUI_NodeAdapter_Create() -> ArkUI_NodeAdapterHandle;
10793 /// Destroys a component adapter.
10794 ///
10795 /// # Arguments
10796 ///
10797 /// * `handle` - Indicates the target component adapter.
10798 ///
10799 /// Available since API-level: 12
10800 #[cfg(feature = "api-12")]
10801 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10802 pub fn OH_ArkUI_NodeAdapter_Dispose(handle: ArkUI_NodeAdapterHandle);
10803 /// Sets the total number of elements in the specified adapter.
10804 ///
10805 /// # Arguments
10806 ///
10807 /// * `handle` - Indicates the target component adapter.
10808 ///
10809 /// * `size` - Indicates the number of elements.
10810 ///
10811 /// # Returns
10812 ///
10813 /// * Returns the error code.
10814 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10815 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10816 ///
10817 /// Available since API-level: 12
10818 #[cfg(feature = "api-12")]
10819 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10820 pub fn OH_ArkUI_NodeAdapter_SetTotalNodeCount(
10821 handle: ArkUI_NodeAdapterHandle,
10822 size: u32,
10823 ) -> i32;
10824 /// Obtains the total number of elements in the specified adapter.
10825 ///
10826 /// # Arguments
10827 ///
10828 /// * `handle` - Indicates the target component adapter.
10829 ///
10830 /// # Returns
10831 ///
10832 /// * Returns the total number of elements in the adapter.
10833 ///
10834 /// Available since API-level: 12
10835 #[cfg(feature = "api-12")]
10836 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10837 pub fn OH_ArkUI_NodeAdapter_GetTotalNodeCount(handle: ArkUI_NodeAdapterHandle) -> u32;
10838 /// Registers an event callback for the adapter.
10839 ///
10840 /// # Arguments
10841 ///
10842 /// * `handle` - Indicates the target component adapter.
10843 ///
10844 /// * `userData` - Indicates custom data.
10845 ///
10846 /// * `receiver` - Indicates the event receiver callback.
10847 ///
10848 /// # Returns
10849 ///
10850 /// * Returns the error code.
10851 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10852 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10853 ///
10854 /// Available since API-level: 12
10855 #[cfg(feature = "api-12")]
10856 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10857 pub fn OH_ArkUI_NodeAdapter_RegisterEventReceiver(
10858 handle: ArkUI_NodeAdapterHandle,
10859 userData: *mut ::core::ffi::c_void,
10860 receiver: ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_NodeAdapterEvent)>,
10861 ) -> i32;
10862 /// Deregisters an event callback for the adapter.
10863 ///
10864 /// # Arguments
10865 ///
10866 /// * `handle` - Indicates the target component adapter.
10867 ///
10868 /// Available since API-level: 12
10869 #[cfg(feature = "api-12")]
10870 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10871 pub fn OH_ArkUI_NodeAdapter_UnregisterEventReceiver(handle: ArkUI_NodeAdapterHandle);
10872 /// Instructs the specified adapter to reload all elements.
10873 ///
10874 /// # Arguments
10875 ///
10876 /// * `handle` - Indicates the target component adapter.
10877 ///
10878 /// # Returns
10879 ///
10880 /// * Returns the error code.
10881 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10882 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10883 ///
10884 /// Available since API-level: 12
10885 #[cfg(feature = "api-12")]
10886 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10887 pub fn OH_ArkUI_NodeAdapter_ReloadAllItems(handle: ArkUI_NodeAdapterHandle) -> i32;
10888 /// Instructs the specified adapter to reload certain elements.
10889 ///
10890 /// # Arguments
10891 ///
10892 /// * `handle` - Indicates the target component adapter.
10893 ///
10894 /// * `startPosition` - Indicates the start position of the elements to reload.
10895 ///
10896 /// * `itemCount` - Indicates the number of the elements to reload.
10897 ///
10898 /// # Returns
10899 ///
10900 /// * Returns the error code.
10901 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10902 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10903 ///
10904 /// Available since API-level: 12
10905 #[cfg(feature = "api-12")]
10906 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10907 pub fn OH_ArkUI_NodeAdapter_ReloadItem(
10908 handle: ArkUI_NodeAdapterHandle,
10909 startPosition: u32,
10910 itemCount: u32,
10911 ) -> i32;
10912 /// Instructs the specified adapter to remove certain elements.
10913 ///
10914 /// # Arguments
10915 ///
10916 /// * `handle` - Indicates the target component adapter.
10917 ///
10918 /// * `startPosition` - Indicates the start position of the elements to remove.
10919 ///
10920 /// * `itemCount` - Indicates the number of the elements to remove.
10921 ///
10922 /// # Returns
10923 ///
10924 /// * Returns the error code.
10925 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10926 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10927 ///
10928 /// Available since API-level: 12
10929 #[cfg(feature = "api-12")]
10930 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10931 pub fn OH_ArkUI_NodeAdapter_RemoveItem(
10932 handle: ArkUI_NodeAdapterHandle,
10933 startPosition: u32,
10934 itemCount: u32,
10935 ) -> i32;
10936 /// Instructs the specified adapter to insert certain elements.
10937 ///
10938 /// # Arguments
10939 ///
10940 /// * `handle` - Indicates the target component adapter.
10941 ///
10942 /// * `startPosition` - Indicates the start position of the elements to insert.
10943 ///
10944 /// * `itemCount` - Indicates the number of the elements to insert.
10945 ///
10946 /// # Returns
10947 ///
10948 /// * Returns the error code.
10949 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10950 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10951 ///
10952 /// Available since API-level: 12
10953 #[cfg(feature = "api-12")]
10954 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10955 pub fn OH_ArkUI_NodeAdapter_InsertItem(
10956 handle: ArkUI_NodeAdapterHandle,
10957 startPosition: u32,
10958 itemCount: u32,
10959 ) -> i32;
10960 /// Instructs the specified adapter to move certain elements.
10961 ///
10962 /// # Arguments
10963 ///
10964 /// * `handle` - Indicates the target component adapter.
10965 ///
10966 /// * `from` - Indicates the start position of the elements to move.
10967 ///
10968 /// * `to` - Indicates the end position of the elements to move.
10969 ///
10970 /// # Returns
10971 ///
10972 /// * Returns the error code.
10973 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
10974 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
10975 ///
10976 /// Available since API-level: 12
10977 #[cfg(feature = "api-12")]
10978 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10979 pub fn OH_ArkUI_NodeAdapter_MoveItem(
10980 handle: ArkUI_NodeAdapterHandle,
10981 from: u32,
10982 to: u32,
10983 ) -> i32;
10984 /// Obtains all elements stored in the specified adapter.
10985 ///
10986 /// This API returns the pointer to the array of the elements. You need to manually release the memory data
10987 /// to which the pointer points.
10988 ///
10989 /// # Arguments
10990 ///
10991 /// * `handle` - Indicates the target component adapter.
10992 ///
10993 /// * `items` - Indicates the pointer to the array of the elements in the adapter.
10994 ///
10995 /// * `size` - Indicates the number of elements.
10996 ///
10997 /// # Returns
10998 ///
10999 /// * Returns the error code.
11000 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11001 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11002 ///
11003 /// Available since API-level: 12
11004 #[cfg(feature = "api-12")]
11005 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11006 pub fn OH_ArkUI_NodeAdapter_GetAllItems(
11007 handle: ArkUI_NodeAdapterHandle,
11008 items: *mut *mut ArkUI_NodeHandle,
11009 size: *mut u32,
11010 ) -> i32;
11011 /// Obtains the custom data passed in during registration of the specified event.
11012 ///
11013 /// # Arguments
11014 ///
11015 /// * `event` - Indicates the target adapter event.
11016 ///
11017 /// Available since API-level: 12
11018 #[cfg(feature = "api-12")]
11019 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11020 pub fn OH_ArkUI_NodeAdapterEvent_GetUserData(
11021 event: *mut ArkUI_NodeAdapterEvent,
11022 ) -> *mut ::core::ffi::c_void;
11023 /// Obtains the event type.
11024 ///
11025 /// # Arguments
11026 ///
11027 /// * `event` - Indicates the target adapter event.
11028 ///
11029 /// # Returns
11030 ///
11031 /// * Returns the event type.
11032 ///
11033 /// Available since API-level: 12
11034 #[cfg(feature = "api-12")]
11035 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11036 pub fn OH_ArkUI_NodeAdapterEvent_GetType(
11037 event: *mut ArkUI_NodeAdapterEvent,
11038 ) -> ArkUI_NodeAdapterEventType;
11039 /// Obtains the element to be removed for the event to be destroyed.
11040 ///
11041 /// # Arguments
11042 ///
11043 /// * `event` - Indicates the target adapter event.
11044 ///
11045 /// # Returns
11046 ///
11047 /// * Returns the element to be removed.
11048 ///
11049 /// Available since API-level: 12
11050 #[cfg(feature = "api-12")]
11051 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11052 pub fn OH_ArkUI_NodeAdapterEvent_GetRemovedNode(
11053 event: *mut ArkUI_NodeAdapterEvent,
11054 ) -> ArkUI_NodeHandle;
11055 /// Obtains the index of the element to be operated for the specified adapter event.
11056 ///
11057 /// # Arguments
11058 ///
11059 /// * `event` - Indicates the target adapter event.
11060 ///
11061 /// # Returns
11062 ///
11063 /// * Returns the index of the element.
11064 ///
11065 /// Available since API-level: 12
11066 #[cfg(feature = "api-12")]
11067 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11068 pub fn OH_ArkUI_NodeAdapterEvent_GetItemIndex(event: *mut ArkUI_NodeAdapterEvent) -> u32;
11069 /// Obtains the scrollable container node that uses the specified adapter.
11070 ///
11071 /// # Arguments
11072 ///
11073 /// * `event` - Indicates the target adapter event.
11074 ///
11075 /// # Returns
11076 ///
11077 /// * Returns the scrollable container node that uses the specified adapter.
11078 ///
11079 /// Available since API-level: 12
11080 #[cfg(feature = "api-12")]
11081 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11082 pub fn OH_ArkUI_NodeAdapterEvent_GetHostNode(
11083 event: *mut ArkUI_NodeAdapterEvent,
11084 ) -> ArkUI_NodeHandle;
11085 /// Sets the component to be added to the specified adapter.
11086 ///
11087 /// # Arguments
11088 ///
11089 /// * `event` - Indicates the target adapter event.
11090 ///
11091 /// * `node` - Indicates the component to be added.
11092 ///
11093 /// # Returns
11094 ///
11095 /// * Returns the error code.
11096 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11097 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11098 ///
11099 /// Available since API-level: 12
11100 #[cfg(feature = "api-12")]
11101 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11102 pub fn OH_ArkUI_NodeAdapterEvent_SetItem(
11103 event: *mut ArkUI_NodeAdapterEvent,
11104 node: ArkUI_NodeHandle,
11105 ) -> i32;
11106 /// Sets the component ID to be generated.
11107 ///
11108 /// # Arguments
11109 ///
11110 /// * `event` - Indicates the target adapter event.
11111 ///
11112 /// * `id` - Indicates the component ID to set.
11113 ///
11114 /// # Returns
11115 ///
11116 /// * Returns the error code.
11117 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11118 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11119 ///
11120 /// Available since API-level: 12
11121 #[cfg(feature = "api-12")]
11122 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11123 pub fn OH_ArkUI_NodeAdapterEvent_SetNodeId(event: *mut ArkUI_NodeAdapterEvent, id: i32) -> i32;
11124 /// Obtains the size constraint for measurement through a custom component event.
11125 ///
11126 /// # Arguments
11127 ///
11128 /// * `event` - Indicates the pointer to the custom component event.
11129 ///
11130 /// # Returns
11131 ///
11132 /// * Returns the pointer to the size constraint.
11133 ///
11134 /// Available since API-level: 12
11135 #[cfg(feature = "api-12")]
11136 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11137 pub fn OH_ArkUI_NodeCustomEvent_GetLayoutConstraintInMeasure(
11138 event: *mut ArkUI_NodeCustomEvent,
11139 ) -> *mut ArkUI_LayoutConstraint;
11140 /// Obtains the expected position of a component relative to its parent component in the layout phase through a
11141 /// custom component event.
11142 ///
11143 /// # Arguments
11144 ///
11145 /// * `event` - Indicates the pointer to the custom component event.
11146 ///
11147 /// # Returns
11148 ///
11149 /// * Returns the expected position relative to the parent component.
11150 ///
11151 /// Available since API-level: 12
11152 #[cfg(feature = "api-12")]
11153 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11154 pub fn OH_ArkUI_NodeCustomEvent_GetPositionInLayout(
11155 event: *mut ArkUI_NodeCustomEvent,
11156 ) -> ArkUI_IntOffset;
11157 /// Obtains the drawing context through a custom component event.
11158 ///
11159 /// # Arguments
11160 ///
11161 /// * `event` - Indicates the pointer to the custom component event.
11162 ///
11163 /// # Returns
11164 ///
11165 /// * Returns the drawing context.
11166 ///
11167 /// Available since API-level: 12
11168 #[cfg(feature = "api-12")]
11169 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11170 pub fn OH_ArkUI_NodeCustomEvent_GetDrawContextInDraw(
11171 event: *mut ArkUI_NodeCustomEvent,
11172 ) -> *mut ArkUI_DrawContext;
11173 /// Obtains the ID of a custom component event.
11174 ///
11175 /// # Arguments
11176 ///
11177 /// * `event` - Indicates the pointer to the custom component event.
11178 ///
11179 /// # Returns
11180 ///
11181 /// * Returns the ID of the custom component event.
11182 ///
11183 /// Available since API-level: 12
11184 #[cfg(feature = "api-12")]
11185 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11186 pub fn OH_ArkUI_NodeCustomEvent_GetEventTargetId(event: *mut ArkUI_NodeCustomEvent) -> i32;
11187 /// Obtains custom event parameters through a custom component event.
11188 ///
11189 /// # Arguments
11190 ///
11191 /// * `event` - Indicates the pointer to the custom component event.
11192 ///
11193 /// # Returns
11194 ///
11195 /// * Returns the custom event parameters.
11196 ///
11197 /// Available since API-level: 12
11198 #[cfg(feature = "api-12")]
11199 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11200 pub fn OH_ArkUI_NodeCustomEvent_GetUserData(
11201 event: *mut ArkUI_NodeCustomEvent,
11202 ) -> *mut ::core::ffi::c_void;
11203 /// Obtains a component object through a custom component event.
11204 ///
11205 /// # Arguments
11206 ///
11207 /// * `event` - Indicates the pointer to the custom component event.
11208 ///
11209 /// # Returns
11210 ///
11211 /// * Returns the component object.
11212 ///
11213 /// Available since API-level: 12
11214 #[cfg(feature = "api-12")]
11215 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11216 pub fn OH_ArkUI_NodeCustomEvent_GetNodeHandle(
11217 event: *mut ArkUI_NodeCustomEvent,
11218 ) -> ArkUI_NodeHandle;
11219 /// Obtains the event type through a custom component event.
11220 ///
11221 /// # Arguments
11222 ///
11223 /// * `event` - Indicates the pointer to the custom component event.
11224 ///
11225 /// # Returns
11226 ///
11227 /// * Returns the type of the custom component event.
11228 ///
11229 /// Available since API-level: 12
11230 #[cfg(feature = "api-12")]
11231 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11232 pub fn OH_ArkUI_NodeCustomEvent_GetEventType(
11233 event: *mut ArkUI_NodeCustomEvent,
11234 ) -> ArkUI_NodeCustomEventType;
11235 /// Obtains the measurement information of a custom span through a custom component event.
11236 ///
11237 /// # Arguments
11238 ///
11239 /// * `event` - Indicates the pointer to the custom component event.
11240 ///
11241 /// * `info` - Indicates the measurement information to be obtained.
11242 ///
11243 /// # Returns
11244 ///
11245 /// * Returns the result code.
11246 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11247 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11248 /// <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
11249 ///
11250 /// Available since API-level: 12
11251 #[cfg(feature = "api-12")]
11252 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11253 pub fn OH_ArkUI_NodeCustomEvent_GetCustomSpanMeasureInfo(
11254 event: *mut ArkUI_NodeCustomEvent,
11255 info: *mut ArkUI_CustomSpanMeasureInfo,
11256 ) -> i32;
11257 /// Sets the measurement metrics of a custom span through a custom component event.
11258 ///
11259 /// # Arguments
11260 ///
11261 /// * `event` - Indicates the pointer to the custom component event.
11262 ///
11263 /// * `metrics` - Indicates the measurement metrics to set.
11264 ///
11265 /// # Returns
11266 ///
11267 /// * Returns the result code.
11268 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11269 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11270 /// <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
11271 ///
11272 /// Available since API-level: 12
11273 #[cfg(feature = "api-12")]
11274 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11275 pub fn OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics(
11276 event: *mut ArkUI_NodeCustomEvent,
11277 metrics: *mut ArkUI_CustomSpanMetrics,
11278 ) -> i32;
11279 /// Obtains the drawing information of a custom span through a custom component event.
11280 ///
11281 /// # Arguments
11282 ///
11283 /// * `event` - Indicates the pointer to the custom component event.
11284 ///
11285 /// * `info` - Indicates the drawing information to obtain.
11286 ///
11287 /// # Returns
11288 ///
11289 /// * Returns the result code.
11290 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11291 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11292 /// <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
11293 ///
11294 /// Available since API-level: 12
11295 #[cfg(feature = "api-12")]
11296 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11297 pub fn OH_ArkUI_NodeCustomEvent_GetCustomSpanDrawInfo(
11298 event: *mut ArkUI_NodeCustomEvent,
11299 info: *mut ArkUI_CustomSpanDrawInfo,
11300 ) -> i32;
11301 /// register a callback function to a node content.
11302 ///
11303 /// # Arguments
11304 ///
11305 /// * `content` - Indicates the pointer to the node content instance.
11306 ///
11307 /// * `callback` - Indicates the callback function.
11308 ///
11309 /// # Returns
11310 ///
11311 /// * Returns the error code.
11312 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11313 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11314 ///
11315 /// Available since API-level: 12
11316 #[cfg(feature = "api-12")]
11317 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11318 pub fn OH_ArkUI_NodeContent_RegisterCallback(
11319 content: ArkUI_NodeContentHandle,
11320 callback: ArkUI_NodeContentCallback,
11321 ) -> i32;
11322 /// Obtains the type of a node content event.
11323 ///
11324 /// # Arguments
11325 ///
11326 /// * `event` - Indicates the pointer to the node content event.
11327 ///
11328 /// # Returns
11329 ///
11330 /// * Returns the type of the node content event.
11331 ///
11332 /// Available since API-level: 12
11333 #[cfg(feature = "api-12")]
11334 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11335 pub fn OH_ArkUI_NodeContentEvent_GetEventType(
11336 event: *mut ArkUI_NodeContentEvent,
11337 ) -> ArkUI_NodeContentEventType;
11338 /// Obtains the node content object that triggers a node content event.
11339 ///
11340 /// # Arguments
11341 ///
11342 /// * `event` - Indicates the pointer to the node content event.
11343 ///
11344 /// # Returns
11345 ///
11346 /// * Returns the node content object that triggers the node content event.
11347 ///
11348 /// Available since API-level: 12
11349 #[cfg(feature = "api-12")]
11350 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11351 pub fn OH_ArkUI_NodeContentEvent_GetNodeContentHandle(
11352 event: *mut ArkUI_NodeContentEvent,
11353 ) -> ArkUI_NodeContentHandle;
11354 /// Saves custom data on the specified node content.
11355 ///
11356 /// # Arguments
11357 ///
11358 /// * `content` - Indicates the node content on which the custom data will be saved.
11359 ///
11360 /// * `userData` - Indicates the custom data to be saved.
11361 ///
11362 /// # Returns
11363 ///
11364 /// * Returns the error code.
11365 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11366 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11367 ///
11368 /// Available since API-level: 12
11369 #[cfg(feature = "api-12")]
11370 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11371 pub fn OH_ArkUI_NodeContent_SetUserData(
11372 content: ArkUI_NodeContentHandle,
11373 userData: *mut ::core::ffi::c_void,
11374 ) -> i32;
11375 /// Obtains the custom data saved on the specified node content.
11376 ///
11377 /// # Arguments
11378 ///
11379 /// * `content` - Indicates the target node content.
11380 ///
11381 /// # Returns
11382 ///
11383 /// * Returns the custom data.
11384 ///
11385 /// Available since API-level: 12
11386 #[cfg(feature = "api-12")]
11387 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11388 pub fn OH_ArkUI_NodeContent_GetUserData(
11389 content: ArkUI_NodeContentHandle,
11390 ) -> *mut ::core::ffi::c_void;
11391 /// Add a node to a node content.
11392 ///
11393 /// # Arguments
11394 ///
11395 /// * `content` - Indicates the pointer to the node content instance.
11396 ///
11397 /// * `node` - Indicates the pointer to the node
11398 ///
11399 /// # Returns
11400 ///
11401 /// * Returns the error code.
11402 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11403 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11404 ///
11405 /// Available since API-level: 12
11406 #[cfg(feature = "api-12")]
11407 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11408 pub fn OH_ArkUI_NodeContent_AddNode(
11409 content: ArkUI_NodeContentHandle,
11410 node: ArkUI_NodeHandle,
11411 ) -> i32;
11412 /// remove a node from a node content.
11413 ///
11414 /// # Arguments
11415 ///
11416 /// * `content` - Indicates the pointer to the node content instance.
11417 ///
11418 /// * `node` - Indicates the pointer to the node
11419 ///
11420 /// # Returns
11421 ///
11422 /// * Returns the error code.
11423 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11424 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11425 ///
11426 /// Available since API-level: 12
11427 #[cfg(feature = "api-12")]
11428 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11429 pub fn OH_ArkUI_NodeContent_RemoveNode(
11430 content: ArkUI_NodeContentHandle,
11431 node: ArkUI_NodeHandle,
11432 ) -> i32;
11433 /// insert a node into a node content at a given position.
11434 ///
11435 /// # Arguments
11436 ///
11437 /// * `content` - Indicates the pointer to the node content instance.
11438 ///
11439 /// * `node` - Indicates the pointer to the node
11440 ///
11441 /// * `position` - Indicates the position for inserting the node
11442 ///
11443 /// # Returns
11444 ///
11445 /// * Returns the error code.
11446 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11447 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11448 ///
11449 /// Available since API-level: 12
11450 #[cfg(feature = "api-12")]
11451 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11452 pub fn OH_ArkUI_NodeContent_InsertNode(
11453 content: ArkUI_NodeContentHandle,
11454 node: ArkUI_NodeHandle,
11455 position: i32,
11456 ) -> i32;
11457 /// Get the size of the component layout area.
11458 /// The layout area size does not include graphic variation attributes such as scaling.
11459 ///
11460 /// # Arguments
11461 ///
11462 /// * `node` - ArkUI_NodeHandle pointer.
11463 ///
11464 /// * `size` - The drawing area size of the component handle, in px.
11465 ///
11466 /// # Returns
11467 ///
11468 /// * Returns the error code.
11469 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11470 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11471 ///
11472 /// Available since API-level: 12
11473 #[cfg(feature = "api-12")]
11474 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11475 pub fn OH_ArkUI_NodeUtils_GetLayoutSize(
11476 node: ArkUI_NodeHandle,
11477 size: *mut ArkUI_IntSize,
11478 ) -> i32;
11479 /// Obtain the position of the component layout area relative to the parent component.
11480 /// The relative position of the layout area does not include graphic variation attributes, such as translation.
11481 ///
11482 /// # Arguments
11483 ///
11484 /// * `node` - ArkUI_NodeHandle pointer.
11485 ///
11486 /// * `localOffset` - The offset value of the component handle relative to the parent component, in px.
11487 ///
11488 /// # Returns
11489 ///
11490 /// * Returns the error code.
11491 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11492 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11493 ///
11494 /// Available since API-level: 12
11495 #[cfg(feature = "api-12")]
11496 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11497 pub fn OH_ArkUI_NodeUtils_GetLayoutPosition(
11498 node: ArkUI_NodeHandle,
11499 localOffset: *mut ArkUI_IntOffset,
11500 ) -> i32;
11501 /// Obtain the position of the component layout area relative to the window.
11502 /// The relative position of the layout area does not include graphic variation attributes, such as translation.
11503 ///
11504 /// # Arguments
11505 ///
11506 /// * `node` - ArkUI_NodeHandle pointer.
11507 ///
11508 /// * `globalOffset` - The offset value of the component handle relative to the window, in px.
11509 ///
11510 /// # Returns
11511 ///
11512 /// * Returns the error code.
11513 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11514 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11515 ///
11516 /// Available since API-level: 12
11517 #[cfg(feature = "api-12")]
11518 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11519 pub fn OH_ArkUI_NodeUtils_GetLayoutPositionInWindow(
11520 node: ArkUI_NodeHandle,
11521 globalOffset: *mut ArkUI_IntOffset,
11522 ) -> i32;
11523 /// Obtain the position of the component layout area relative to the screen.
11524 /// The relative position of the layout area does not include graphic variation attributes, such as translation.
11525 ///
11526 /// # Arguments
11527 ///
11528 /// * `node` - ArkUI_NodeHandle pointer.
11529 ///
11530 /// * `screenOffset` - The offset value of the component handle relative to the screen, in px.
11531 ///
11532 /// # Returns
11533 ///
11534 /// * Returns the error code.
11535 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11536 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11537 ///
11538 /// Available since API-level: 12
11539 #[cfg(feature = "api-12")]
11540 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11541 pub fn OH_ArkUI_NodeUtils_GetLayoutPositionInScreen(
11542 node: ArkUI_NodeHandle,
11543 screenOffset: *mut ArkUI_IntOffset,
11544 ) -> i32;
11545 /// Obtain the position of the component in the window, including the properties of graphic translation changes.
11546 ///
11547 /// # Arguments
11548 ///
11549 /// * `node` - ArkUI_NodeHandle pointer.
11550 ///
11551 /// * `translateOffset` - The cumulative offset value of the component handle itself,
11552 /// parent components, and ancestor nodes, in px.
11553 ///
11554 /// # Returns
11555 ///
11556 /// * Returns the error code.
11557 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11558 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11559 ///
11560 /// Available since API-level: 12
11561 #[cfg(feature = "api-12")]
11562 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11563 pub fn OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow(
11564 node: ArkUI_NodeHandle,
11565 translateOffset: *mut ArkUI_IntOffset,
11566 ) -> i32;
11567 /// Obtain the position of the component on the screen, including the attributes of graphic translation changes.
11568 ///
11569 /// # Arguments
11570 ///
11571 /// * `node` - ArkUI_NodeHandle pointer.
11572 ///
11573 /// * `translateOffset` - The cumulative offset value of the component handle itself,
11574 /// parent components, and ancestor nodes, in px.
11575 ///
11576 /// # Returns
11577 ///
11578 /// * Returns the error code.
11579 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
11580 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
11581 ///
11582 /// Available since API-level: 12
11583 #[cfg(feature = "api-12")]
11584 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11585 pub fn OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen(
11586 node: ArkUI_NodeHandle,
11587 translateOffset: *mut ArkUI_IntOffset,
11588 ) -> i32;
11589 /// Add the custom property of the component. This interface only works on the main thread.
11590 ///
11591 /// # Arguments
11592 ///
11593 /// * `node` - ArkUI_NodeHandle pointer.
11594 ///
11595 /// * `name` - The name of the custom property. Passing null pointers is not allowed.
11596 ///
11597 /// * `value` - The value of the custom property. Passing null pointers is not allowed.
11598 ///
11599 /// Available since API-level: 13
11600 #[cfg(feature = "api-13")]
11601 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
11602 pub fn OH_ArkUI_NodeUtils_AddCustomProperty(
11603 node: ArkUI_NodeHandle,
11604 name: *const ::core::ffi::c_char,
11605 value: *const ::core::ffi::c_char,
11606 );
11607 /// Remove the custom property of the component.
11608 ///
11609 /// # Arguments
11610 ///
11611 /// * `node` - ArkUI_NodeHandle pointer.
11612 ///
11613 /// * `name` - The name of the custom property.
11614 ///
11615 /// Available since API-level: 13
11616 #[cfg(feature = "api-13")]
11617 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
11618 pub fn OH_ArkUI_NodeUtils_RemoveCustomProperty(
11619 node: ArkUI_NodeHandle,
11620 name: *const ::core::ffi::c_char,
11621 );
11622 /// Get the value of the custom property of the component.
11623 ///
11624 /// # Arguments
11625 ///
11626 /// * `node` - ArkUI-NodeHandle pointer.
11627 ///
11628 /// * `name` - The name of the custom attribute.
11629 ///
11630 /// * `handle` - The structure of the custom attribute corresponding to the key parameter name obtained.
11631 ///
11632 /// # Returns
11633 ///
11634 /// * Error code.
11635 /// [`ARKUI_ERROR_CODE_NO_ERROR`] success.
11636 /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] Function parameter exception.
11637 ///
11638 /// Available since API-level: 14
11639 #[cfg(feature = "api-14")]
11640 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
11641 pub fn OH_ArkUI_NodeUtils_GetCustomProperty(
11642 node: ArkUI_NodeHandle,
11643 name: *const ::core::ffi::c_char,
11644 handle: *mut *mut ArkUI_CustomProperty,
11645 ) -> i32;
11646 /// Get the parent node to obtain the component nodes created by ArkTs.
11647 ///
11648 /// # Arguments
11649 ///
11650 /// * `node` - Target node object.
11651 ///
11652 /// # Returns
11653 ///
11654 /// * Return the pointer of the component.
11655 ///
11656 /// Available since API-level: 14
11657 #[cfg(feature = "api-14")]
11658 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
11659 pub fn OH_ArkUI_NodeUtils_GetParentInPageTree(node: ArkUI_NodeHandle) -> ArkUI_NodeHandle;
11660 /// Retrieve all active child nodes of a node. Span will not be counted in the children.
11661 ///
11662 /// # Arguments
11663 ///
11664 /// * `head` - Pass in the node that needs to be obtained.
11665 ///
11666 /// * `handle` - The structure corresponding to the sub node information of the head node.
11667 ///
11668 /// # Returns
11669 ///
11670 /// * Error code.
11671 /// [`ARKUI_ERROR_CODE_NO_ERROR`] success.
11672 /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] Function parameter exception.
11673 ///
11674 /// Available since API-level: 14
11675 #[cfg(feature = "api-14")]
11676 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
11677 pub fn OH_ArkUI_NodeUtils_GetActiveChildrenInfo(
11678 head: ArkUI_NodeHandle,
11679 handle: *mut *mut ArkUI_ActiveChildrenInfo,
11680 ) -> i32;
11681 /// Retrieve the root node of the current page.
11682 ///
11683 /// # Arguments
11684 ///
11685 /// * `node` - Target node object.
11686 ///
11687 /// # Returns
11688 ///
11689 /// * Return the pointer of the component.
11690 ///
11691 /// Available since API-level: 14
11692 #[cfg(feature = "api-14")]
11693 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
11694 pub fn OH_ArkUI_NodeUtils_GetCurrentPageRootNode(node: ArkUI_NodeHandle) -> ArkUI_NodeHandle;
11695 /// Retrieve whether the component is labeled by C-API.
11696 ///
11697 /// # Arguments
11698 ///
11699 /// * `node` - Target node object.
11700 ///
11701 /// # Returns
11702 ///
11703 /// * Return whether the node is a Tag created by C-API,
11704 /// true represents created by C-API, false represents not created by C-API.
11705 ///
11706 /// Available since API-level: 14
11707 #[cfg(feature = "api-14")]
11708 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
11709 pub fn OH_ArkUI_NodeUtils_IsCreatedByNDK(node: ArkUI_NodeHandle) -> bool;
11710 /// Get the type of node.
11711 ///
11712 /// # Arguments
11713 ///
11714 /// * `node` - Target node object.
11715 ///
11716 /// # Returns
11717 ///
11718 /// * Return the type of the node.
11719 /// For specific open types, refer to [`ArkUI_NodeType`]. For unopened nodes, return -1.
11720 ///
11721 /// Available since API-level: 14
11722 #[cfg(feature = "api-14")]
11723 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
11724 pub fn OH_ArkUI_NodeUtils_GetNodeType(node: ArkUI_NodeHandle) -> i32;
11725 /// Collapse the ListItem in its expanded state.
11726 ///
11727 /// # Arguments
11728 ///
11729 /// * `node` - Node objects that need to be registered for events.
11730 ///
11731 /// * `userData` - Custom event parameters are carried back in the callback parameter when the event is triggered.
11732 ///
11733 /// * `onFinish` - The callback triggered after the completion of the folding animation.
11734 ///
11735 /// # Returns
11736 ///
11737 /// * Error code.
11738 /// [`ARKUI_ERROR_CODE_NO_ERROR`] Success.
11739 /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] Function parameter exception.
11740 /// [`ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED`] The component does not support this event.
11741 ///
11742 /// Available since API-level: 12
11743 #[cfg(feature = "api-12")]
11744 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11745 pub fn OH_ArkUI_List_CloseAllSwipeActions(
11746 node: ArkUI_NodeHandle,
11747 userData: *mut ::core::ffi::c_void,
11748 onFinish: ::core::option::Option<unsafe extern "C" fn(userData: *mut ::core::ffi::c_void)>,
11749 ) -> i32;
11750 /// Obtain the UIContext pointer to the page where the node is located.
11751 ///
11752 /// # Arguments
11753 ///
11754 /// * `node` - The node.
11755 ///
11756 /// # Returns
11757 ///
11758 /// * The UIContext pointer.
11759 /// If a null pointer is returned, it may be because the node is empty.
11760 ///
11761 /// Available since API-level: 12
11762 #[cfg(feature = "api-12")]
11763 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11764 pub fn OH_ArkUI_GetContextByNode(node: ArkUI_NodeHandle) -> ArkUI_ContextHandle;
11765 /// The event called when the system color mode changes.
11766 /// Only one system color change callback can be registered for the same component.
11767 ///
11768 /// # Arguments
11769 ///
11770 /// * `node` - Indicates the target node.
11771 ///
11772 /// * `userData` - Indicates the custom data to be saved.
11773 ///
11774 /// * `onColorModeChange` - Callback Events.
11775 ///
11776 /// # Returns
11777 ///
11778 /// * Error code.
11779 /// [`ARKUI_ERROR_CODE_NO_ERROR`] Success.
11780 /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] Function parameter exception.
11781 /// [`ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED`] The component does not support this event.
11782 ///
11783 /// Available since API-level: 12
11784 #[cfg(feature = "api-12")]
11785 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11786 pub fn OH_ArkUI_RegisterSystemColorModeChangeEvent(
11787 node: ArkUI_NodeHandle,
11788 userData: *mut ::core::ffi::c_void,
11789 onColorModeChange: ::core::option::Option<
11790 unsafe extern "C" fn(
11791 colorMode: ArkUI_SystemColorMode,
11792 userData: *mut ::core::ffi::c_void,
11793 ),
11794 >,
11795 ) -> i32;
11796 /// Unregister the event callback when the system color mode changes.
11797 ///
11798 /// # Arguments
11799 ///
11800 /// * `node` - Indicates the target node.
11801 ///
11802 /// Available since API-level: 12
11803 #[cfg(feature = "api-12")]
11804 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11805 pub fn OH_ArkUI_UnregisterSystemColorModeChangeEvent(node: ArkUI_NodeHandle);
11806 /// The event called when the system font style changes.
11807 /// Only one system font change callback can be registered for the same component.
11808 ///
11809 /// # Arguments
11810 ///
11811 /// * `node` - Indicates the target node.
11812 ///
11813 /// * `userData` - Indicates the custom data to be saved.
11814 ///
11815 /// * `onFontStyleChange` - Callback Events.
11816 ///
11817 /// # Returns
11818 ///
11819 /// * Error code.
11820 /// [`ARKUI_ERROR_CODE_NO_ERROR`] Success.
11821 /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] Function parameter exception.
11822 /// [`ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED`] The component does not support this event.
11823 ///
11824 /// Available since API-level: 12
11825 #[cfg(feature = "api-12")]
11826 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11827 pub fn OH_ArkUI_RegisterSystemFontStyleChangeEvent(
11828 node: ArkUI_NodeHandle,
11829 userData: *mut ::core::ffi::c_void,
11830 onFontStyleChange: ::core::option::Option<
11831 unsafe extern "C" fn(
11832 event: *mut ArkUI_SystemFontStyleEvent,
11833 userData: *mut ::core::ffi::c_void,
11834 ),
11835 >,
11836 ) -> i32;
11837 /// Unregister the event callback when the system font style changes.
11838 ///
11839 /// # Arguments
11840 ///
11841 /// * `node` - Indicates the target node.
11842 ///
11843 /// Available since API-level: 12
11844 #[cfg(feature = "api-12")]
11845 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11846 pub fn OH_ArkUI_UnregisterSystemFontStyleChangeEvent(node: ArkUI_NodeHandle);
11847 /// Retrieve the font size value for system font change events.
11848 ///
11849 /// # Arguments
11850 ///
11851 /// * `event` - Indicates a pointer to the current system font change event.
11852 ///
11853 /// # Returns
11854 ///
11855 /// * Updated system font size scaling factor. Default value: 1.0.
11856 ///
11857 /// Available since API-level: 12
11858 #[cfg(feature = "api-12")]
11859 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11860 pub fn OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale(
11861 event: *const ArkUI_SystemFontStyleEvent,
11862 ) -> f32;
11863 /// Retrieve the font thickness values for system font change events.
11864 ///
11865 /// # Arguments
11866 ///
11867 /// * `event` - Indicates a pointer to the current system font change event.
11868 ///
11869 /// # Returns
11870 ///
11871 /// * The updated system font thickness scaling factor. Default value: 1.0.
11872 ///
11873 /// Available since API-level: 12
11874 #[cfg(feature = "api-12")]
11875 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11876 pub fn OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(
11877 event: *const ArkUI_SystemFontStyleEvent,
11878 ) -> f32;
11879}