ohos-sys 0.2.0-beta4

Bindings to the native API of OpenHarmony OS
/* automatically generated by rust-bindgen 0.69.4 */

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

extern "C" {
    /** @brief Creates an <b>OH_Drawing_Canvas</b> object.

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

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasDestroy(arg1: *mut OH_Drawing_Canvas);
    /** @brief Binds a bitmap to a canvas so that the content drawn on the canvas
    is output to the bitmap (this process is called CPU rendering).

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasBind(arg1: *mut OH_Drawing_Canvas, arg2: *mut OH_Drawing_Bitmap);
    /** @brief Attaches a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasAttachPen(arg1: *mut OH_Drawing_Canvas, arg2: *const OH_Drawing_Pen);
    /** @brief Detaches the pen from a canvas so that the canvas will not use the style
    and color of the pen to outline a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasDetachPen(arg1: *mut OH_Drawing_Canvas);
    /** @brief Attaches a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasAttachBrush(
        arg1: *mut OH_Drawing_Canvas,
        arg2: *const OH_Drawing_Brush,
    );
    /** @brief Detaches the brush from a canvas so that the canvas will not use the style
    and color of the brush to fill in a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasDetachBrush(arg1: *mut OH_Drawing_Canvas);
    /** @brief Saves the current canvas status (canvas matrix) to the top of the stack.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasSave(arg1: *mut OH_Drawing_Canvas);
    /** @brief Restores the canvas status (canvas matrix) saved on the top of the stack.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasRestore(arg1: *mut OH_Drawing_Canvas);
    /** @brief Draws a line segment.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @param x1 Indicates the x coordinate of the start point of the line segment.
    @param y1 Indicates the y coordinate of the start point of the line segment.
    @param x2 Indicates the x coordinate of the end point of the line segment.
    @param y2 Indicates the y coordinate of the end point of the line segment.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasDrawLine(
        arg1: *mut OH_Drawing_Canvas,
        x1: f32,
        y1: f32,
        x2: f32,
        y2: f32,
    );
    /** @brief Draws a path.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasDrawPath(arg1: *mut OH_Drawing_Canvas, arg2: *const OH_Drawing_Path);
    /** @brief Clears a canvas by using a specified color.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
    @param color Indicates the color, which is a 32-bit (ARGB) variable.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_CanvasClear(arg1: *mut OH_Drawing_Canvas, color: u32);
}