-
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
27 changed files
with
790 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mod color_space_api12; | ||
pub use color_space_api12::*; |
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,30 @@ | ||
/* 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_ColorSpace</b> object that represents the SRGB color space. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@return Returns the pointer to the <b>OH_Drawing_ColorSpace</b> object created. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ColorSpaceCreateSrgb() -> *mut OH_Drawing_ColorSpace; | ||
/** @brief Creates an <b>OH_Drawing_ColorSpace</b> object with the SRGB primaries, but a linear (1.0) gamma. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@return Returns the pointer to the <b>OH_Drawing_ColorSpace</b> object created. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ColorSpaceCreateSrgbLinear() -> *mut OH_Drawing_ColorSpace; | ||
/** @brief Destroy an <b>OH_Drawing_ColorSpace</b> object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_ColorSpace Indicates the pointer to an <b>OH_Drawing_ColorSpace</b> object. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ColorSpaceDestroy(arg1: *mut OH_Drawing_ColorSpace); | ||
} |
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 error_code_api12; | ||
pub use error_code_api12::*; |
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,38 @@ | ||
/* 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_ErrorCode { | ||
/// @error Operation completed successfully. | ||
pub const OH_DRAWING_SUCCESS: OH_Drawing_ErrorCode = OH_Drawing_ErrorCode(0); | ||
} | ||
impl OH_Drawing_ErrorCode { | ||
/// @error Permission verification failed. | ||
pub const OH_DRAWING_ERROR_NO_PERMISSION: OH_Drawing_ErrorCode = OH_Drawing_ErrorCode(201); | ||
} | ||
impl OH_Drawing_ErrorCode { | ||
/// @error Invalid input parameter. For example, the pointer in the parameter is a nullptr. | ||
pub const OH_DRAWING_ERROR_INVALID_PARAMETER: OH_Drawing_ErrorCode = OH_Drawing_ErrorCode(401); | ||
} | ||
impl OH_Drawing_ErrorCode { | ||
/// @error The parameter is not in the valid range. | ||
pub const OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE: OH_Drawing_ErrorCode = | ||
OH_Drawing_ErrorCode(26200001); | ||
} | ||
#[repr(transparent)] | ||
/** @brief Enumerates error codes of drawing. | ||
@since 12*/ | ||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
pub struct OH_Drawing_ErrorCode(pub ::core::ffi::c_uint); | ||
extern "C" { | ||
/** @brief Obtains the error code of the drawing module. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@return Returns the error code. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ErrorCodeGet() -> 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mod font_mgr_api12; | ||
pub use font_mgr_api12::*; |
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,169 @@ | ||
/* 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::text_typography::*; | ||
use crate::drawing::types::*; | ||
|
||
extern "C" { | ||
/** @brief Creates an <b>OH_Drawing_FontMgr</b> object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@return Returns the pointer to the <b>OH_Drawing_FontMgr</b> object created. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrCreate() -> *mut OH_Drawing_FontMgr; | ||
/** @brief Releases the memory occupied by an <b>OH_Drawing_FontMgr</b> object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrDestroy(arg1: *mut OH_Drawing_FontMgr); | ||
/** @brief Gets the count of font families. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object. | ||
@return Returns the count of font families. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrGetFamilyCount(arg1: *mut OH_Drawing_FontMgr) -> ::core::ffi::c_int; | ||
/** @brief Gets the font family name by the index. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object. | ||
@param index Indicates the index to get the font family name. | ||
@return Returns the font family name corresponding to the index value. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrGetFamilyName( | ||
arg1: *mut OH_Drawing_FontMgr, | ||
index: ::core::ffi::c_int, | ||
) -> *mut ::core::ffi::c_char; | ||
/** @brief Releases the memory occupied by font family name. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param familyName Indicates the font family name. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrDestroyFamilyName(familyName: *mut ::core::ffi::c_char); | ||
/** @brief Creates an <b>OH_Drawing_FontStyleSet</b> object by <b>OH_Drawing_FontMgr</b> object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object. | ||
@param index Indicates the index used to get the font style set object from the font manager object. | ||
@return Returns the pointer to the <b>OH_Drawing_FontStyleSet</b> object created. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrCreateFontStyleSet( | ||
arg1: *mut OH_Drawing_FontMgr, | ||
index: ::core::ffi::c_int, | ||
) -> *mut OH_Drawing_FontStyleSet; | ||
/** @brief Releases the memory occupied by an <b>OH_Drawing_FontStyleSet</b> object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrDestroyFontStyleSet(arg1: *mut OH_Drawing_FontStyleSet); | ||
/** @brief Get the pointer to an <b>OH_Drawing_FontStyleSet</b> object for the given font style set family name. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object. | ||
@param familyName Indicates the family name of a font style set to be matched. | ||
@return Returns the pointer to the <b>OH_Drawing_FontStyleSet</b> object matched. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrMatchFamily( | ||
arg1: *mut OH_Drawing_FontMgr, | ||
familyName: *const ::core::ffi::c_char, | ||
) -> *mut OH_Drawing_FontStyleSet; | ||
/** @brief Get the pointer to an <b>OH_Drawing_Typeface</b> object based on the given font style and family name. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object. | ||
@param familyName Indicates the family name of a font style set to be matched. | ||
@param OH_Drawing_FontStyleStruct Indicates an <b>OH_Drawing_FontStyleStruct</b> object. | ||
@return Returns the pointer to the <b>OH_Drawing_Typeface</b> object matched. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrMatchFamilyStyle( | ||
arg1: *mut OH_Drawing_FontMgr, | ||
familyName: *const ::core::ffi::c_char, | ||
fontStyle: OH_Drawing_FontStyleStruct, | ||
) -> *mut OH_Drawing_Typeface; | ||
/** @brief Get the pointer to an <b>OH_Drawing_Typeface</b> object for the given character. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object. | ||
@param familyName Indicates the family name of a font style set to be matched. | ||
@param OH_Drawing_FontStyleStruct Indicates an <b>OH_Drawing_FontStyleStruct</b> object. | ||
@param bcp47 Indicates an array of languages which indicate the language of character. | ||
@param bcp47Count Indicates the array size of bcp47. | ||
@param character Indicates a UTF8 value to be matched. | ||
@return Returns the pointer to the <b>OH_Drawing_Typeface</b> object matched. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontMgrMatchFamilyStyleCharacter( | ||
arg1: *mut OH_Drawing_FontMgr, | ||
familyName: *const ::core::ffi::c_char, | ||
fontStyle: OH_Drawing_FontStyleStruct, | ||
bcp47: *mut *const ::core::ffi::c_char, | ||
bcp47Count: ::core::ffi::c_int, | ||
character: i32, | ||
) -> *mut OH_Drawing_Typeface; | ||
/** @brief Create a typeface for the given index. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object. | ||
@param index Indicates the index of the typeface in this fontStyleSet. | ||
@return If successful, return a pointer to <b>OH_Drawing_Typeface</b> object; if failed, return nullptr. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontStyleSetCreateTypeface( | ||
arg1: *mut OH_Drawing_FontStyleSet, | ||
index: ::core::ffi::c_int, | ||
) -> *mut OH_Drawing_Typeface; | ||
/** @brief Get font style for the specified typeface. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object. | ||
@param index Indicates the index of the typeface in this fontStyleSet. | ||
@param styleName Indicates the style name returned. | ||
@return Return the <b>OH_Drawing_FontStyleStruct<b> structure. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontStyleSetGetStyle( | ||
arg1: *mut OH_Drawing_FontStyleSet, | ||
index: i32, | ||
styleName: *mut *mut ::core::ffi::c_char, | ||
) -> OH_Drawing_FontStyleStruct; | ||
/** @brief Releases the memory styleName string. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param styleName Indicates the pointer to a string type. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontStyleSetFreeStyleName(styleName: *mut *mut ::core::ffi::c_char); | ||
/** @brief Get the closest matching typeface. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object. | ||
@param fontStyleStruct Indicates the <b>OH_Drawing_FontStyleStruct</b> structure. | ||
@return A pointer to matched <b>OH_Drawing_Typeface</b>. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontStyleSetMatchStyle( | ||
arg1: *mut OH_Drawing_FontStyleSet, | ||
fontStyleStruct: OH_Drawing_FontStyleStruct, | ||
) -> *mut OH_Drawing_Typeface; | ||
/** @brief Get the count of typeface. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_FontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object. | ||
@return The count of typeface in this font style set. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_FontStyleSetCount(arg1: *mut OH_Drawing_FontStyleSet) -> ::core::ffi::c_int; | ||
} |
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,2 @@ | ||
mod gpu_context_api12; | ||
pub use gpu_context_api12::*; |
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,36 @@ | ||
/* 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::*; | ||
|
||
/** @brief Defines the options about GPU context. | ||
@since 12 | ||
@version 1.0*/ | ||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct OH_Drawing_GpuContextOptions { | ||
/// If true this allows path mask textures to be cached | ||
pub allowPathMaskCaching: bool, | ||
} | ||
extern "C" { | ||
/** @brief Creates an <b>OH_Drawing_GpuContext</b> object, whose GPU backend context is GL. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_GpuContextOptions Indicates the GPU context options. | ||
@return Returns the pointer to the <b>OH_Drawing_GpuContext</b> object created. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_GpuContextCreateFromGL( | ||
arg1: OH_Drawing_GpuContextOptions, | ||
) -> *mut OH_Drawing_GpuContext; | ||
/** @brief Destroys an <b>OH_Drawing_GpuContext</b> object and reclaims the memory occupied by the object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_GpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_GpuContextDestroy(arg1: *mut OH_Drawing_GpuContext); | ||
} |
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,2 @@ | ||
mod image_api12; | ||
pub use image_api12::*; |
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,62 @@ | ||
/* 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_Image</b> object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@return Returns the pointer to the <b>OH_Drawing_Image</b> object created. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ImageCreate() -> *mut OH_Drawing_Image; | ||
/** @brief Destroys an <b>OH_Drawing_Image</b> object and reclaims the memory occupied by the object. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ImageDestroy(arg1: *mut OH_Drawing_Image); | ||
/** @brief Rebuilds an <b>OH_Drawing_Image</b> object, sharing or copying bitmap pixels. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object. | ||
@param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object. | ||
@return Returns true if successed. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ImageBuildFromBitmap( | ||
arg1: *mut OH_Drawing_Image, | ||
arg2: *mut OH_Drawing_Bitmap, | ||
) -> bool; | ||
/** @brief Gets pixel count in each row of image. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object. | ||
@return Returns the width. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ImageGetWidth(arg1: *mut OH_Drawing_Image) -> i32; | ||
/** @brief Gets pixel row count of image. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object. | ||
@return Returns the height. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ImageGetHeight(arg1: *mut OH_Drawing_Image) -> i32; | ||
/** @brief Gets the image info. | ||
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing | ||
@param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object. | ||
@param OH_Drawing_Image_Info Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object. | ||
@since 12 | ||
@version 1.0*/ | ||
pub fn OH_Drawing_ImageGetImageInfo( | ||
arg1: *mut OH_Drawing_Image, | ||
arg2: *mut OH_Drawing_Image_Info, | ||
); | ||
} |
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,2 @@ | ||
mod image_filter_api12; | ||
pub use image_filter_api12::*; |
Oops, something went wrong.