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::*;

impl OH_Drawing_PenLineCapStyle {
    /// There is no cap style. Both ends of the line segment are cut off square.
    pub const LINE_FLAT_CAP: OH_Drawing_PenLineCapStyle = OH_Drawing_PenLineCapStyle(0);
}
impl OH_Drawing_PenLineCapStyle {
    /** Square cap style. Both ends have a square, the height of which
    is half of the width of the line segment, with the same width.*/
    pub const LINE_SQUARE_CAP: OH_Drawing_PenLineCapStyle = OH_Drawing_PenLineCapStyle(1);
}
impl OH_Drawing_PenLineCapStyle {
    /** Round cap style. Both ends have a semicircle centered, the diameter of which
    is the same as the width of the line segment.*/
    pub const LINE_ROUND_CAP: OH_Drawing_PenLineCapStyle = OH_Drawing_PenLineCapStyle(2);
}
#[repr(transparent)]
/** @brief Enumerates line cap styles of a pen. The line cap style defines
the style of both ends of a line segment drawn by the pen.

@since 8
@version 1.0*/
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_Drawing_PenLineCapStyle(pub ::core::ffi::c_uint);
impl OH_Drawing_PenLineJoinStyle {
    /** Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate.
    In this case, you need to use the miter limit to limit the miter length.*/
    pub const LINE_MITER_JOIN: OH_Drawing_PenLineJoinStyle = OH_Drawing_PenLineJoinStyle(0);
}
impl OH_Drawing_PenLineJoinStyle {
    /// Round corner.
    pub const LINE_ROUND_JOIN: OH_Drawing_PenLineJoinStyle = OH_Drawing_PenLineJoinStyle(1);
}
impl OH_Drawing_PenLineJoinStyle {
    /// Beveled corner.
    pub const LINE_BEVEL_JOIN: OH_Drawing_PenLineJoinStyle = OH_Drawing_PenLineJoinStyle(2);
}
#[repr(transparent)]
/** @brief Enumerates pen line join styles. The line join style defines
the shape of the joints of a polyline segment drawn by the pen.

@since 8
@version 1.0*/
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_Drawing_PenLineJoinStyle(pub ::core::ffi::c_uint);
extern "C" {
    /** @brief Creates an <b>OH_Drawing_Pen</b> object.

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

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenDestroy(arg1: *mut OH_Drawing_Pen);
    /** @brief Checks whether anti-aliasing is enabled for a pen. If anti-aliasing is enabled,
    edges will be drawn with partial transparency.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @return Returns <b>true</b> if anti-aliasing is enabled; returns <b>false</b> otherwise.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenIsAntiAlias(arg1: *const OH_Drawing_Pen) -> bool;
    /** @brief Enables or disables anti-aliasing for a pen. If anti-aliasing is enabled,
    edges will be drawn with partial transparency.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @param bool Specifies whether to enable anti-aliasing. The value <b>true</b> means
                to enable anti-aliasing, and <b>false</b> means the opposite.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenSetAntiAlias(arg1: *mut OH_Drawing_Pen, arg2: bool);
    /** @brief Obtains the color of a pen. The color is used by the pen to outline a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @return Returns a 32-bit (ARGB) variable that describes the color.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenGetColor(arg1: *const OH_Drawing_Pen) -> u32;
    /** @brief Sets the color for a pen. The color is used by the pen to outline a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @param color Indicates the color to set, which is a 32-bit (ARGB) variable.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenSetColor(arg1: *mut OH_Drawing_Pen, color: u32);
    /** @brief Obtains the thickness of a pen. This thickness determines the width of the outline of a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @return Returns the thickness.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenGetWidth(arg1: *const OH_Drawing_Pen) -> f32;
    /** @brief Sets the thickness for a pen. This thickness determines the width of the outline of a shape.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @param width Indicates the thickness to set, which is a variable.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenSetWidth(arg1: *mut OH_Drawing_Pen, width: f32);
    /** @brief Obtains the stroke miter limit of a polyline drawn by a pen.

    When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded,
    and a mitered corner is displayed if the miter limit is not exceeded.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @return Returns the miter limit.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenGetMiterLimit(arg1: *const OH_Drawing_Pen) -> f32;
    /** @brief Sets the stroke miter limit for a polyline drawn by a pen.

    When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded,
    and a mitered corner is displayed if the miter limit is not exceeded.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @param miter Indicates a variable that describes the miter limit.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenSetMiterLimit(arg1: *mut OH_Drawing_Pen, miter: f32);
    /** @brief Obtains the line cap style of a pen.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @return Returns the line cap style.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenGetCap(arg1: *const OH_Drawing_Pen) -> OH_Drawing_PenLineCapStyle;
    /** @brief Sets the line cap style for a pen.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @param OH_Drawing_PenLineCapStyle Indicates a variable that describes the line cap style.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenSetCap(arg1: *mut OH_Drawing_Pen, arg2: OH_Drawing_PenLineCapStyle);
    /** @brief Obtains the line join style of a pen.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @return Returns the line join style.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenGetJoin(arg1: *const OH_Drawing_Pen) -> OH_Drawing_PenLineJoinStyle;
    /** @brief Sets the line join style for a pen.

    @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
    @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
    @param OH_Drawing_PenLineJoinStyle Indicates a variable that describes the line join style.
    @since 8
    @version 1.0*/
    pub fn OH_Drawing_PenSetJoin(arg1: *mut OH_Drawing_Pen, arg2: OH_Drawing_PenLineJoinStyle);
}