-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jonathan Schwender <[email protected]>
- Loading branch information
Showing
10 changed files
with
342 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#[allow(unused_imports)] | ||
mod record_cmd_ffi; | ||
pub use record_cmd_ffi::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
// automatically generated by rust-bindgen 0.71.1 | ||
|
||
#![allow(non_upper_case_globals)] | ||
#![allow(non_camel_case_types)] | ||
#![allow(non_snake_case)] | ||
use crate::types::*; | ||
|
||
#[allow(unused_imports)] | ||
#[cfg(feature = "api-12")] | ||
use crate::error_code::OH_Drawing_ErrorCode; | ||
|
||
extern "C" { | ||
/// Creates an <b>OH_Drawing_RecordCmdUtils</b> object. | ||
/// | ||
/// | ||
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
/// | ||
/// # Returns | ||
/// | ||
/// Returns the pointer to the <b>OH_Drawing_RecordCmdUtils</b> object created. | ||
/// | ||
/// Available since API-level: 13 | ||
/// | ||
/// Version: 1.0 | ||
#[cfg(feature = "api-13")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))] | ||
pub fn OH_Drawing_RecordCmdUtilsCreate() -> *mut OH_Drawing_RecordCmdUtils; | ||
/// Destroys an <b>OH_Drawing_RecordCmdUtils</b> object and reclaims the memory occupied by the object. | ||
/// | ||
/// | ||
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
/// # Arguments | ||
/// | ||
/// `recordCmdUtils` - Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object. | ||
/// | ||
/// # Returns | ||
/// | ||
/// Returns the error code. | ||
/// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful. | ||
/// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if recordCmdUtils is nullptr. | ||
/// | ||
/// Available since API-level: 13 | ||
/// | ||
/// Version: 1.0 | ||
#[cfg(feature = "api-13")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))] | ||
pub fn OH_Drawing_RecordCmdUtilsDestroy( | ||
recordCmdUtils: *mut OH_Drawing_RecordCmdUtils, | ||
) -> OH_Drawing_ErrorCode; | ||
/// Get the canvas that records the drawing command. | ||
/// | ||
/// | ||
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
/// # Arguments | ||
/// | ||
/// `recordCmdUtils` - Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object. | ||
/// | ||
/// `width` - Width of canvas object. | ||
/// | ||
/// `height` - Height of canvas object. | ||
/// | ||
/// `canvas` - Indicates a secondary pointer to an <b>OH_Drawing_Canvas</b>object. | ||
/// | ||
/// # Returns | ||
/// | ||
/// Returns the error code. | ||
/// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful. | ||
/// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if recordCmdUtils or canvas is nullptr, | ||
/// width less than or equal to 0 or height less than or equal to 0. | ||
/// Returns [`OH_DRAWING_ERROR_ALLOCATION_FAILED`] if no memory. | ||
/// | ||
/// Available since API-level: 13 | ||
/// | ||
/// Version: 1.0 | ||
#[cfg(feature = "api-13")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))] | ||
pub fn OH_Drawing_RecordCmdUtilsBeginRecording( | ||
recordCmdUtils: *mut OH_Drawing_RecordCmdUtils, | ||
width: i32, | ||
height: i32, | ||
canvas: *mut *mut OH_Drawing_Canvas, | ||
) -> OH_Drawing_ErrorCode; | ||
/// Finish the recording and get the recording command object. | ||
/// | ||
/// | ||
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
/// # Arguments | ||
/// | ||
/// `recordCmdUtils` - Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object. | ||
/// | ||
/// `recordCmd` - Indicates a secondary pointer to an <b>OH_Drawing_RecordCmd</b> object. | ||
/// | ||
/// # Returns | ||
/// | ||
/// Returns the error code. | ||
/// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful. | ||
/// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if recordCmdUtils or recordCmd is nullptr. | ||
/// Returns [`OH_DRAWING_ERROR_ALLOCATION_FAILED`] if no memory. | ||
/// | ||
/// Available since API-level: 13 | ||
/// | ||
/// Version: 1.0 | ||
#[cfg(feature = "api-13")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))] | ||
pub fn OH_Drawing_RecordCmdUtilsFinishRecording( | ||
recordCmdUtils: *mut OH_Drawing_RecordCmdUtils, | ||
recordCmd: *mut *mut OH_Drawing_RecordCmd, | ||
) -> OH_Drawing_ErrorCode; | ||
/// Destroys an <b>OH_Drawing_RecordCmd</b> object and reclaims the memory occupied by the object. | ||
/// | ||
/// | ||
/// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
/// # Arguments | ||
/// | ||
/// `recordCmd` - Indicates the pointer to an <b>OH_Drawing_RecordCmd</b> object. | ||
/// | ||
/// # Returns | ||
/// | ||
/// Returns the error code. | ||
/// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful. | ||
/// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if recordCmd is nullptr. | ||
/// | ||
/// Available since API-level: 13 | ||
/// | ||
/// Version: 1.0 | ||
#[cfg(feature = "api-13")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))] | ||
pub fn OH_Drawing_RecordCmdDestroy( | ||
recordCmd: *mut OH_Drawing_RecordCmd, | ||
) -> OH_Drawing_ErrorCode; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.