ohos-window-sys 0.1.7

Raw Bindings to the OpenHarmony native window
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

#[cfg(feature = "api-11")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
impl OH_NativeBuffer_ColorSpace {
    /// None color space
    pub const OH_COLORSPACE_NONE: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(0);
    /// COLORPRIMARIES_BT601_P | (TRANSFUNC_BT709 << 8) | (MATRIX_BT601_P << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_BT601_EBU_FULL: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(1);
    /// COLORPRIMARIES_BT601_N | (TRANSFUNC_BT709 << 8) | (MATRIX_BT601_N << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_BT601_SMPTE_C_FULL: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(2);
    /// COLORPRIMARIES_BT709 | (TRANSFUNC_BT709 << 8) | (MATRIX_BT709 << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_BT709_FULL: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(3);
    /// COLORPRIMARIES_BT2020 | (TRANSFUNC_HLG << 8) | (MATRIX_BT2020 << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_BT2020_HLG_FULL: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(4);
    /// COLORPRIMARIES_BT2020 | (TRANSFUNC_PQ << 8) | (MATRIX_BT2020 << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_BT2020_PQ_FULL: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(5);
    /// COLORPRIMARIES_BT601_P | (TRANSFUNC_BT709 << 8) | (MATRIX_BT601_P << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_BT601_EBU_LIMIT: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(6);
    /// COLORPRIMARIES_BT601_N | (TRANSFUNC_BT709 << 8) | (MATRIX_BT601_N << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_BT601_SMPTE_C_LIMIT: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(7);
    /// COLORPRIMARIES_BT709 | (TRANSFUNC_BT709 << 8) | (MATRIX_BT709 << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_BT709_LIMIT: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(8);
    /// COLORPRIMARIES_BT2020 | (TRANSFUNC_HLG << 8) | (MATRIX_BT2020 << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_BT2020_HLG_LIMIT: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(9);
    /// COLORPRIMARIES_BT2020 | (TRANSFUNC_PQ << 8) | (MATRIX_BT2020 << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_BT2020_PQ_LIMIT: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(10);
    /// COLORPRIMARIES_SRGB | (TRANSFUNC_SRGB << 8) | (MATRIX_BT601_N << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_SRGB_FULL: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(11);
    /// COLORPRIMARIES_P3_D65 | (TRANSFUNC_SRGB << 8) | (MATRIX_P3 << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_P3_FULL: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(12);
    /// COLORPRIMARIES_P3_D65 | (TRANSFUNC_HLG << 8) | (MATRIX_P3 << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_P3_HLG_FULL: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(13);
    /// COLORPRIMARIES_P3_D65 | (TRANSFUNC_PQ << 8) | (MATRIX_P3 << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_P3_PQ_FULL: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(14);
    /// COLORPRIMARIES_ADOBERGB | (TRANSFUNC_ADOBERGB << 8) | (MATRIX_ADOBERGB << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_ADOBERGB_FULL: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(15);
    /// COLORPRIMARIES_SRGB | (TRANSFUNC_SRGB << 8) | (MATRIX_BT601_N << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_SRGB_LIMIT: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(16);
    /// COLORPRIMARIES_P3_D65 | (TRANSFUNC_SRGB << 8) | (MATRIX_P3 << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_P3_LIMIT: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(17);
    /// COLORPRIMARIES_P3_D65 | (TRANSFUNC_HLG << 8) | (MATRIX_P3 << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_P3_HLG_LIMIT: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(18);
    /// COLORPRIMARIES_P3_D65 | (TRANSFUNC_PQ << 8) | (MATRIX_P3 << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_P3_PQ_LIMIT: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(19);
    /// COLORPRIMARIES_ADOBERGB | (TRANSFUNC_ADOBERGB << 8) | (MATRIX_ADOBERGB << 16) | (RANGE_LIMITED << 21)
    pub const OH_COLORSPACE_ADOBERGB_LIMIT: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(20);
    /// COLORPRIMARIES_SRGB | (TRANSFUNC_LINEAR << 8)
    pub const OH_COLORSPACE_LINEAR_SRGB: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(21);
    /// equal to OH_COLORSPACE_LINEAR_SRGB
    pub const OH_COLORSPACE_LINEAR_BT709: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(22);
    /// COLORPRIMARIES_P3_D65 | (TRANSFUNC_LINEAR << 8)
    pub const OH_COLORSPACE_LINEAR_P3: OH_NativeBuffer_ColorSpace = OH_NativeBuffer_ColorSpace(23);
    /// COLORPRIMARIES_BT2020 | (TRANSFUNC_LINEAR << 8)
    pub const OH_COLORSPACE_LINEAR_BT2020: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(24);
    /// equal to OH_COLORSPACE_SRGB_FULL
    pub const OH_COLORSPACE_DISPLAY_SRGB: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(25);
    /// equal to OH_COLORSPACE_P3_FULL
    pub const OH_COLORSPACE_DISPLAY_P3_SRGB: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(26);
    /// equal to OH_COLORSPACE_P3_HLG_FULL
    pub const OH_COLORSPACE_DISPLAY_P3_HLG: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(27);
    /// equal to OH_COLORSPACE_P3_PQ_FULL
    pub const OH_COLORSPACE_DISPLAY_P3_PQ: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(28);
    /// COLORPRIMARIES_BT2020 | (TRANSFUNC_SRGB << 8) | (MATRIX_BT2020 << 16) | (RANGE_FULL << 21)
    pub const OH_COLORSPACE_DISPLAY_BT2020_SRGB: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(29);
    /// equal to OH_COLORSPACE_BT2020_HLG_FULL
    pub const OH_COLORSPACE_DISPLAY_BT2020_HLG: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(30);
    /// equal to OH_COLORSPACE_BT2020_PQ_FULL
    pub const OH_COLORSPACE_DISPLAY_BT2020_PQ: OH_NativeBuffer_ColorSpace =
        OH_NativeBuffer_ColorSpace(31);
}
#[repr(transparent)]
/// Indicates the color space of a native buffer.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 11
///
/// Version: 1.0
////**
/// Indicates the color space of a native buffer.
/// Move from native_buffer.h to native_common.h
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-11")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_NativeBuffer_ColorSpace(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_NativeBuffer_MetadataType {
    /// HLG
    pub const OH_VIDEO_HDR_HLG: OH_NativeBuffer_MetadataType = OH_NativeBuffer_MetadataType(0);
    /// HDR10
    pub const OH_VIDEO_HDR_HDR10: OH_NativeBuffer_MetadataType = OH_NativeBuffer_MetadataType(1);
    /// HDR VIVID
    pub const OH_VIDEO_HDR_VIVID: OH_NativeBuffer_MetadataType = OH_NativeBuffer_MetadataType(2);
    /// HDR IMAGE DUAL.
    ///
    /// Available since API-level: 22
    #[cfg(feature = "api-22")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
    pub const OH_IMAGE_HDR_VIVID_DUAL: OH_NativeBuffer_MetadataType =
        OH_NativeBuffer_MetadataType(3);
    /// HDR IMAGE SINGLE.
    ///
    /// Available since API-level: 22
    #[cfg(feature = "api-22")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
    pub const OH_IMAGE_HDR_VIVID_SINGLE: OH_NativeBuffer_MetadataType =
        OH_NativeBuffer_MetadataType(4);
    /// HDR IMAGE ISO DUAL.
    ///
    /// Available since API-level: 23
    #[cfg(feature = "api-23")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
    pub const OH_IMAGE_HDR_ISO_DUAL: OH_NativeBuffer_MetadataType = OH_NativeBuffer_MetadataType(5);
    /// HDR IMAGE ISO SINGLE.
    ///
    /// Available since API-level: 23
    #[cfg(feature = "api-23")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
    pub const OH_IMAGE_HDR_ISO_SINGLE: OH_NativeBuffer_MetadataType =
        OH_NativeBuffer_MetadataType(6);
    /// NONE Metadata
    ///
    /// Available since API-level: 13
    #[cfg(feature = "api-13")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
    pub const OH_VIDEO_NONE: OH_NativeBuffer_MetadataType = OH_NativeBuffer_MetadataType(-1);
}
#[repr(transparent)]
/// Indicates the HDR metadata type of a native buffer.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_NativeBuffer_MetadataType(pub ::core::ffi::c_int);
/// Indicates the color x and y.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_NativeBuffer_ColorXY {
    /// color X
    pub x: f32,
    /// color Y
    pub y: f32,
}
/// Indicates the smpte2086 metadata.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_NativeBuffer_Smpte2086 {
    /// primary red
    pub displayPrimaryRed: OH_NativeBuffer_ColorXY,
    /// primary green
    pub displayPrimaryGreen: OH_NativeBuffer_ColorXY,
    /// primary blue
    pub displayPrimaryBlue: OH_NativeBuffer_ColorXY,
    /// white point
    pub whitePoint: OH_NativeBuffer_ColorXY,
    /// max luminance
    pub maxLuminance: f32,
    /// min luminance
    pub minLuminance: f32,
}
/// Indicates the cta861.3 metadata.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_NativeBuffer_Cta861 {
    /// max content lightLevel
    pub maxContentLightLevel: f32,
    /// max frame average light level
    pub maxFrameAverageLightLevel: f32,
}
/// Indicates the HDR static metadata.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_NativeBuffer_StaticMetadata {
    /// smpte 2086 metadata
    pub smpte2086: OH_NativeBuffer_Smpte2086,
    /// CTA-861.3 metadata
    pub cta861: OH_NativeBuffer_Cta861,
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_NativeBuffer_MetadataKey {
    /// value: OH_NativeBuffer_MetadataType
    pub const OH_HDR_METADATA_TYPE: OH_NativeBuffer_MetadataKey = OH_NativeBuffer_MetadataKey(0);
    /// value: OH_NativeBuffer_StaticMetadata
    pub const OH_HDR_STATIC_METADATA: OH_NativeBuffer_MetadataKey = OH_NativeBuffer_MetadataKey(1);
    /// byte stream of SEI in video stream
    pub const OH_HDR_DYNAMIC_METADATA: OH_NativeBuffer_MetadataKey = OH_NativeBuffer_MetadataKey(2);
    /// Region of interest(ROI) metadata is used to conifgure ROI feature in video encoding. Value type is string
    /// in the format "Top1,Left1-Bottom1,Right1=QpOffset1;Top2,Left2-Bottom2,Right2=QpOffset2;".
    /// Each "Top,Left-Bottom,Right=QpOffset" represents the coordinate information and quantization parameter
    /// offset of one ROI. Each "=QpOffset" in the string can be omitted,
    /// like "Top1,Left1-Bottom1,Right1;Top2,Left2-Bottom2,Right2=QpOffset2;", the encoder will use the default
    /// quantization parameter offset to perform the ROI encoding on the first ROI and use QpOffset2 on the second ROI.
    /// Note that the number of ROIs that can be applied simultaneously does not exceed six, and the total area must
    /// not exceed one-fifth of the total image area.
    ///
    ///
    /// Available since API-level: 22
    #[cfg(feature = "api-22")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
    pub const OH_REGION_OF_INTEREST_METADATA: OH_NativeBuffer_MetadataKey =
        OH_NativeBuffer_MetadataKey(3);
}
#[repr(transparent)]
/// Indicates the descriptive information of a native buffer,
/// such as HDR metadata, ROI metadata, etc.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_NativeBuffer_MetadataKey(pub ::core::ffi::c_uint);
impl OH_NativeBuffer_Format {
    /// CLUT8 format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_CLUT8: OH_NativeBuffer_Format = OH_NativeBuffer_Format(0);
    /// CLUT1 format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_CLUT1: OH_NativeBuffer_Format = OH_NativeBuffer_Format(1);
    /// CLUT4 format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_CLUT4: OH_NativeBuffer_Format = OH_NativeBuffer_Format(2);
    /// CLUT4 format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_RGB_565: OH_NativeBuffer_Format = OH_NativeBuffer_Format(3);
    /// < RGB565 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGBA_5658: OH_NativeBuffer_Format = OH_NativeBuffer_Format(4);
    /// < RGBA5658 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGBX_4444: OH_NativeBuffer_Format = OH_NativeBuffer_Format(5);
    /// < RGBX4444 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGBA_4444: OH_NativeBuffer_Format = OH_NativeBuffer_Format(6);
    /// < RGBA4444 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGB_444: OH_NativeBuffer_Format = OH_NativeBuffer_Format(7);
    /// < RGB444 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGBX_5551: OH_NativeBuffer_Format = OH_NativeBuffer_Format(8);
    /// < RGBX5551 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGBA_5551: OH_NativeBuffer_Format = OH_NativeBuffer_Format(9);
    /// < RGBA5551 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGB_555: OH_NativeBuffer_Format = OH_NativeBuffer_Format(10);
    /// < RGB555 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGBX_8888: OH_NativeBuffer_Format = OH_NativeBuffer_Format(11);
    /// < RGBX8888 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGBA_8888: OH_NativeBuffer_Format = OH_NativeBuffer_Format(12);
    /// < RGBA8888 format */
    pub const NATIVEBUFFER_PIXEL_FMT_RGB_888: OH_NativeBuffer_Format = OH_NativeBuffer_Format(13);
    /// < RGB888 format */
    pub const NATIVEBUFFER_PIXEL_FMT_BGR_565: OH_NativeBuffer_Format = OH_NativeBuffer_Format(14);
    /// < BGR565 format */
    pub const NATIVEBUFFER_PIXEL_FMT_BGRX_4444: OH_NativeBuffer_Format = OH_NativeBuffer_Format(15);
    /// < BGRX4444 format */
    pub const NATIVEBUFFER_PIXEL_FMT_BGRA_4444: OH_NativeBuffer_Format = OH_NativeBuffer_Format(16);
    /// < BGRA4444 format */
    pub const NATIVEBUFFER_PIXEL_FMT_BGRX_5551: OH_NativeBuffer_Format = OH_NativeBuffer_Format(17);
    /// < BGRX5551 format */
    pub const NATIVEBUFFER_PIXEL_FMT_BGRA_5551: OH_NativeBuffer_Format = OH_NativeBuffer_Format(18);
    /// < BGRA5551 format */
    pub const NATIVEBUFFER_PIXEL_FMT_BGRX_8888: OH_NativeBuffer_Format = OH_NativeBuffer_Format(19);
    /// < BGRX8888 format */
    pub const NATIVEBUFFER_PIXEL_FMT_BGRA_8888: OH_NativeBuffer_Format = OH_NativeBuffer_Format(20);
    /// < BGRA8888 format */
    /// **
    /// * YUV422 interleaved format
    /// * @since 12
    /// */
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YUV_422_I: OH_NativeBuffer_Format = OH_NativeBuffer_Format(21);
    /// YCBCR422 semi-plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCBCR_422_SP: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(22);
    /// YCRCB422 semi-plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCRCB_422_SP: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(23);
    /// YCBCR420 semi-plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCBCR_420_SP: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(24);
    /// YCRCB420 semi-plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCRCB_420_SP: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(25);
    /// YCBCR422 plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCBCR_422_P: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(26);
    /// YCRCB422 plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCRCB_422_P: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(27);
    /// YCBCR420 plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCBCR_420_P: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(28);
    /// YCRCB420 plannar format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCRCB_420_P: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(29);
    /// YUYV422 packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YUYV_422_PKG: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(30);
    /// UYVY422 packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_UYVY_422_PKG: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(31);
    /// YVYU422 packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YVYU_422_PKG: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(32);
    /// VYUY422 packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_VYUY_422_PKG: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(33);
    /// RGBA_1010102 packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_RGBA_1010102: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(34);
    /// YCBCR420 semi-planar 10bit packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCBCR_P010: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(35);
    /// YCRCB420 semi-planar 10bit packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_YCRCB_P010: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(36);
    /// Raw 10bit packed format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_RAW10: OH_NativeBuffer_Format = OH_NativeBuffer_Format(37);
    /// BLOB format
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const NATIVEBUFFER_PIXEL_FMT_BLOB: OH_NativeBuffer_Format = OH_NativeBuffer_Format(38);
    /// RGBA16 float format
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const NATIVEBUFFER_PIXEL_FMT_RGBA16_FLOAT: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(39);
    /// Y8 format
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const NATIVEBUFFER_PIXEL_FMT_Y8: OH_NativeBuffer_Format = OH_NativeBuffer_Format(40);
    /// Y16 format
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const NATIVEBUFFER_PIXEL_FMT_Y16: OH_NativeBuffer_Format = OH_NativeBuffer_Format(41);
    /// vender mask format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_VENDER_MASK: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(2147418112);
    /// vender mask format
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const NATIVEBUFFER_PIXEL_FMT_BUTT: OH_NativeBuffer_Format =
        OH_NativeBuffer_Format(2147483647);
}
#[repr(transparent)]
/// Indicates the format of a native buffer.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 10
///
/// Version: 1.0
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_NativeBuffer_Format(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_NativeBuffer_TransformType {
    /// < No rotation
    pub const NATIVEBUFFER_ROTATE_NONE: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(0);
    /// < Rotation by 90 degrees
    pub const NATIVEBUFFER_ROTATE_90: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(1);
    /// < Rotation by 180 degrees
    pub const NATIVEBUFFER_ROTATE_180: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(2);
    /// < Rotation by 270 degrees
    pub const NATIVEBUFFER_ROTATE_270: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(3);
    /// < Flip horizontally
    pub const NATIVEBUFFER_FLIP_H: OH_NativeBuffer_TransformType = OH_NativeBuffer_TransformType(4);
    /// < Flip vertically
    pub const NATIVEBUFFER_FLIP_V: OH_NativeBuffer_TransformType = OH_NativeBuffer_TransformType(5);
    /// < Flip horizontally and rotate 90 degrees
    pub const NATIVEBUFFER_FLIP_H_ROT90: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(6);
    /// < Flip vertically and rotate 90 degrees
    pub const NATIVEBUFFER_FLIP_V_ROT90: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(7);
    /// < Flip horizontally and rotate 180 degrees
    pub const NATIVEBUFFER_FLIP_H_ROT180: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(8);
    /// < Flip vertically and rotate 180 degrees
    pub const NATIVEBUFFER_FLIP_V_ROT180: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(9);
    /// < Flip horizontally and rotate 270 degrees
    pub const NATIVEBUFFER_FLIP_H_ROT270: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(10);
    /// < Flip vertically and rotate 270 degrees
    pub const NATIVEBUFFER_FLIP_V_ROT270: OH_NativeBuffer_TransformType =
        OH_NativeBuffer_TransformType(11);
}
#[repr(transparent)]
/// Indicates the transform type of a native buffer.
///
///
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
///
/// Available since API-level: 12
///
/// Version: 1.0
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_NativeBuffer_TransformType(pub ::core::ffi::c_uint);