ohos_drawing_sys/error_code/
error_code_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::types::*;
7
8#[cfg(feature = "api-12")]
9#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10impl OH_Drawing_ErrorCode {
11    /// Operation completed successfully.
12    pub const OH_DRAWING_SUCCESS: OH_Drawing_ErrorCode = OH_Drawing_ErrorCode(0);
13}
14#[cfg(feature = "api-12")]
15#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
16impl OH_Drawing_ErrorCode {
17    /// Permission verification failed.
18    pub const OH_DRAWING_ERROR_NO_PERMISSION: OH_Drawing_ErrorCode = OH_Drawing_ErrorCode(201);
19}
20#[cfg(feature = "api-12")]
21#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
22impl OH_Drawing_ErrorCode {
23    /// Invalid input parameter. For example, the pointer in the parameter is a nullptr.
24    pub const OH_DRAWING_ERROR_INVALID_PARAMETER: OH_Drawing_ErrorCode = OH_Drawing_ErrorCode(401);
25}
26#[cfg(feature = "api-12")]
27#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
28impl OH_Drawing_ErrorCode {
29    /// The parameter is not in the valid range.
30    pub const OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE: OH_Drawing_ErrorCode =
31        OH_Drawing_ErrorCode(26200001);
32}
33#[cfg(feature = "api-12")]
34#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
35impl OH_Drawing_ErrorCode {
36    /// mem allocate failed.
37    ///
38    /// Available since API-level: 13
39    #[cfg(feature = "api-13")]
40    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
41    pub const OH_DRAWING_ERROR_ALLOCATION_FAILED: OH_Drawing_ErrorCode =
42        OH_Drawing_ErrorCode(26200002);
43}
44#[repr(transparent)]
45/// Enumerates error codes of drawing.
46///
47/// Available since API-level: 12
48#[cfg(feature = "api-12")]
49#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
50#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
51pub struct OH_Drawing_ErrorCode(pub ::core::ffi::c_uint);
52extern "C" {
53    /// Obtains the error code of the drawing module.
54    ///
55    ///
56    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
57    ///
58    /// # Returns
59    ///
60    /// * Returns the error code.
61    ///
62    /// Available since API-level: 12
63    ///
64    /// Version: 1.0
65    #[cfg(feature = "api-12")]
66    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
67    pub fn OH_Drawing_ErrorCodeGet() -> OH_Drawing_ErrorCode;
68}