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
/* automatically generated by rust-bindgen 0.69.4 */

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::types::*;

/** @brief Defines the pixel format of a bitmap, including the color type and alpha type.

@since 8
@version 1.0*/
#[repr(C)]
pub struct OH_Drawing_BitmapFormat {
    /// Storage format of bitmap pixels
    pub colorFormat: OH_Drawing_ColorFormat,
    /// Alpha format of bitmap pixels
    pub alphaFormat: OH_Drawing_AlphaFormat,
}
extern "C" {
    /** @brief Creates an <b>OH_Drawing_Bitmap</b> object.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @return Returns the pointer to the <b>OH_Drawing_Bitmap</b> object created.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_BitmapCreate() -> *mut OH_Drawing_Bitmap;
    /** @brief Destroys an <b>OH_Drawing_Bitmap</b> object and reclaims the memory occupied by the object.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_BitmapDestroy(arg1: *mut OH_Drawing_Bitmap);
    /** @brief Initializes the width and height of an <b>OH_Drawing_Bitmap</b> object
    and sets the pixel format for the bitmap.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
    @param width Indicates the width of the bitmap to be initialized.
    @param height Indicates the height of the bitmap to be initialized.
    @param OH_Drawing_BitmapFormat Indicates the pixel format of the bitmap to be initialized,
                                   including the pixel color type and alpha type.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_BitmapBuild(
        arg1: *mut OH_Drawing_Bitmap,
        width: u32,
        height: u32,
        arg2: *const OH_Drawing_BitmapFormat,
    );
    /** @brief Obtains the width of a bitmap.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
    @return Returns the width.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_BitmapGetWidth(arg1: *mut OH_Drawing_Bitmap) -> u32;
    /** @brief Obtains the height of a bitmap.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
    @return Returns the height.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_BitmapGetHeight(arg1: *mut OH_Drawing_Bitmap) -> u32;
    /** @brief Obtains the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
    @return Returns the pixel address.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_BitmapGetPixels(arg1: *mut OH_Drawing_Bitmap) -> *mut ::core::ffi::c_void;
}