Merge branch 'master' of gitee.com:openharmony/interface_sdk_c into config

Signed-off-by: 邹林肯 <735001321@qq.com>
This commit is contained in:
邹林肯 2024-08-03 06:48:09 +00:00 committed by Gitee
commit 041321f459
12 changed files with 606 additions and 18 deletions

View File

@ -298,6 +298,19 @@ int32_t OH_ArkUI_DragEvent_GetDataTypes(
*/
int32_t OH_ArkUI_DragEvent_GetDragResult(ArkUI_DragEvent* event, ArkUI_DragResult* result);
/**
* @brief Obtains the drop operation from a drag event.
*
* @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.
* @param operation Indicates the drop operation which the data receiver set.
* @return Returns the result code.
* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* Possible causes: 1. The given parameters are null or the given event is not a valid DragEvent.
* @since 12
*/
int32_t OH_ArkUI_DragEvent_GetDropOperation(ArkUI_DragEvent* event, ArkUI_DropOperation* operation);
/**
* @brief Obtains the X coordinate of the touch point for a drag preview from a drag event.
*
@ -419,7 +432,7 @@ float OH_ArkUI_DragEvent_GetVelocity(ArkUI_DragEvent* event);
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, int64_t* keys);
int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t* keys);
/**
* @brief Sets whether to enable strict reporting on drag events.

View File

@ -1799,6 +1799,10 @@
"first_introduced": "12",
"name": "OH_ArkUI_DragEvent_GetDragResult"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_DragEvent_GetDropOperation"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_DragEvent_GetPreviewTouchPointX"
@ -1979,6 +1983,70 @@
"first_introduced": "12",
"name": "OH_ArkUI_DialogDismissEvent_GetDismissReason"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_NodeCustomEvent_GetCustomSpanMeasureInfo"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_NodeCustomEvent_GetCustomSpanDrawInfo"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanMeasureInfo_Create"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanMeasureInfo_Dispose"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanMeasureInfo_GetFontSize"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanMetrics_Create"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanMetrics_Dispose"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanMetrics_SetWidth"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanMetrics_SetHeight"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanDrawInfo_Create"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanDrawInfo_Dispose"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanDrawInfo_GetXOffset"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanDrawInfo_GetLineTop"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanDrawInfo_GetLineBottom"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanDrawInfo_GetBaseline"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_RegisterSystemColorModeChangeEvent"

View File

@ -122,6 +122,8 @@ typedef enum {
ARKUI_NODE_GRID,
/** Grid item. */
ARKUI_NODE_GRID_ITEM,
/** Custom span. */
ARKUI_NODE_CUSTOM_SPAN,
} ArkUI_NodeType;
/**
@ -344,9 +346,10 @@ typedef enum {
* @brief Sets the gradient attribute, which can be set, reset, and obtained as required through APIs.
*
* Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
* .value[0].f32: start angle of the linear gradient. A positive value indicates a clockwise rotation from the
* origin, (0, 0). The default value is <b>180</b>. \n
* .value[1].i32: direction of the linear gradient. It does not take effect when <b>angle</b> is set.
* .value[0].f32: start angle of the linear gradient. This attribute takes effect only when
* {@link ArkUI_LinearGradientDirection} is set to <b>ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM</b>.
* A positive value indicates a clockwise rotation from the origin, (0, 0). The default value is <b>180</b>. \n
* .value[1].i32: direction of the linear gradient. When it is set, the <b>angle</b> attribute does not take effect.
* The parameter type is {@link ArkUI_LinearGradientDirection}: \n
* .value[2].i32: whether the colors are repeated. The default value is <b>false</b>. \n
* .object: array of color stops, each of which consists of a color and its stop position.
@ -358,7 +361,7 @@ typedef enum {
* Format of the return value {@link ArkUI_AttributeItem}: \n
* .value[0].f32: start angle of the linear gradient. \n
* .value[1].i32: direction of the linear gradient. It does not take effect when <b>angle</b> is set. \n
* .value[0].i32: whether the colors are repeated. \n
* .value[2].i32: whether the colors are repeated. \n
* .object: array of color stops, each of which consists of a color and its stop position.
* Invalid colors are automatically skipped. \n
* colors: colors of the color stops. \n
@ -2171,6 +2174,18 @@ typedef enum {
*/
NODE_TEXT_CONTENT_WITH_STYLED_STRING,
/**
* @brief Sets whether to center text vertically in the text component.
*
* Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
* .value[0].i32: whether to center text vertically. The default value is <b>false</b>. \n
* \n
* Format of the return value {@link ArkUI_AttributeItem}:\n
* .value[0].i32: whether to center text vertically. \n
*
*/
NODE_TEXT_HALF_LEADING = 1029,
/**
* @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
*
@ -7405,6 +7420,48 @@ ArkUI_NodeHandle OH_ArkUI_NodeCustomEvent_GetNodeHandle(ArkUI_NodeCustomEvent* e
*/
ArkUI_NodeCustomEventType OH_ArkUI_NodeCustomEvent_GetEventType(ArkUI_NodeCustomEvent* event);
/**
* @brief Obtains the measurement information of a custom span through a custom component event.
*
* @param event Indicates the pointer to the custom component event.
* @param info Indicates the measurement information to be obtained.
* @return Returns the result code.
* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
int32_t OH_ArkUI_NodeCustomEvent_GetCustomSpanMeasureInfo(
ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMeasureInfo* info);
/**
* @brief Sets the measurement metrics of a custom span through a custom component event.
*
* @param event Indicates the pointer to the custom component event.
* @param metrics Indicates the measurement metrics to set.
* @return Returns the result code.
* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
int32_t OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics(
ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMetrics* metrics);
/**
* @brief Obtains the drawing information of a custom span through a custom component event.
*
* @param event Indicates the pointer to the custom component event.
* @param info Indicates the drawing information to obtain.
* @return Returns the result code.
* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
int32_t OH_ArkUI_NodeCustomEvent_GetCustomSpanDrawInfo(
ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanDrawInfo* info);
/**
* @brief Defines the node content event type.
*

View File

@ -2075,6 +2075,27 @@ typedef struct {
float perspective;
} ArkUI_RotationOptions;
/**
* @brief Defines a struct for the measurement information of a custom span.
*
* @since 12
*/
typedef struct ArkUI_CustomSpanMeasureInfo ArkUI_CustomSpanMeasureInfo;
/**
* @brief Defines a struct for the measurement metrics of a custom span.
*
* @since 12
*/
typedef struct ArkUI_CustomSpanMetrics ArkUI_CustomSpanMetrics;
/**
* @brief Defines a struct for the drawing information of a custom span.
*
* @since 12
*/
typedef struct ArkUI_CustomSpanDrawInfo ArkUI_CustomSpanDrawInfo;
/**
* @brief Defines the state of the NavDestination component.
*
@ -3429,6 +3450,133 @@ int32_t OH_ArkUI_ListChildrenMainSizeOption_UpdateSize(ArkUI_ListChildrenMainSiz
*/
float OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(ArkUI_ListChildrenMainSize* option, int32_t index);
/**
* @brief Creates measurement information for this custom span.
*
* @return Returns a <b>CustomSpanMeasureInfo</b> instance.
* <br> If the result returns nullptr, there may be out of memory.
* @since 12
*/
ArkUI_CustomSpanMeasureInfo* OH_ArkUI_CustomSpanMeasureInfo_Create();
/**
* @brief Disposes of measurement information of this custom span.
*
* @param info The CustomSpanMeasureInfo instance to be destroyed.
* @since 12
*/
void OH_ArkUI_CustomSpanMeasureInfo_Dispose(ArkUI_CustomSpanMeasureInfo* info);
/**
* @brief Obtains the font size of a custom span.
*
* @param info Indicates the pointer to the measurement information of a custom span.
* @return Returns the font size. If a parameter error occurs, <b>0.0f</b> is returned.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
float OH_ArkUI_CustomSpanMeasureInfo_GetFontSize(ArkUI_CustomSpanMeasureInfo* info);
/**
* @brief Creates measurement metrics for this custom span.
*
* @return Returns a <b>CustomSpanMetrics</b> instance.
* <br> If the result returns nullptr, there may be out of memory.
* @since 12
*/
ArkUI_CustomSpanMetrics* OH_ArkUI_CustomSpanMetrics_Create();
/**
* @brief Disposes of measurement metrics of this custom span.
*
* @param info The CustomSpanMetrics instance to be destroyed.
* @since 12
*/
void OH_ArkUI_CustomSpanMetrics_Dispose(ArkUI_CustomSpanMetrics* metrics);
/**
* @brief Sets the width for a custom span.
*
* @param metrics Indicates the pointer to a <b>CustomSpanMetrics</b> instance.
* @param width Indicates the width, in px. The width should be greater than 0.
* @return Returns the result code.
* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
int32_t OH_ArkUI_CustomSpanMetrics_SetWidth(ArkUI_CustomSpanMetrics* metrics, float width);
/**
* @brief Sets the height for a custom span.
*
* @param metrics Indicates the pointer to a <b>CustomSpanMetrics</b> instance.
* @param width Indicates the height, in px. The width should be greater than 0.
* @return Returns the result code.
* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
int32_t OH_ArkUI_CustomSpanMetrics_SetHeight(ArkUI_CustomSpanMetrics* metrics, float height);
/**
* @brief Creates drawing information for this custom span.
*
* @return Returns a <b>CustomSpanDrawInfo</b> instance.
* <br> If the result returns nullptr, there may be out of memory.
* @since 12
*/
ArkUI_CustomSpanDrawInfo* OH_ArkUI_CustomSpanDrawInfo_Create();
/**
* @brief Disposes of drawing information for this custom span.
*
* @param info The CustomSpanDrawInfo instance to be destroyed.
* @since 12
*/
void OH_ArkUI_CustomSpanDrawInfo_Dispose(ArkUI_CustomSpanDrawInfo* info);
/**
* @brief Obtains the x-axis offset of the custom span relative to the mounted component.
*
* @param info Indicates the pointer to the drawing information of a custom span.
* @return Returns the x-axis offset. If a parameter error occurs, <b>0.0f</b> is returned.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
float OH_ArkUI_CustomSpanDrawInfo_GetXOffset(ArkUI_CustomSpanDrawInfo* info);
/**
* @brief Obtains the top margin of the custom span relative to the mounted component.
*
* @param info Indicates the pointer to the drawing information of a custom span.
* @return Returns the top margin. If a parameter error occurs, <b>0.0f</b> is returned.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
float OH_ArkUI_CustomSpanDrawInfo_GetLineTop(ArkUI_CustomSpanDrawInfo* info);
/**
* @brief Obtains the bottom margin of the custom span relative to the mounted component.
*
* @param info Indicates the pointer to the drawing information of a custom span.
* @return Returns the bottom margin. If a parameter error occurs, <b>0.0f</b> is returned.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
float OH_ArkUI_CustomSpanDrawInfo_GetLineBottom(ArkUI_CustomSpanDrawInfo* info);
/**
* @brief Obtains the baseline offset of the custom span relative to the mounted component.
*
* @param info Indicates the pointer to the drawing information of a custom span.
* @return Returns the baseline offset. If a parameter error occurs, <b>0.0f</b> is returned.
* <br> Possible causes: Parameter verification failed, the parameter should not be nullptr.
* @since 12
*/
float OH_ArkUI_CustomSpanDrawInfo_GetBaseline(ArkUI_CustomSpanDrawInfo* info);
/**
* @brief Create a image frame from the image path.
* @param src Indicates the image path.

View File

@ -978,10 +978,6 @@
"first_introduced": "12",
"name": "OH_Drawing_TextStyleGetFontMetrics"
},
{
"first_introduced": "12",
"name": "OH_Drawing_TypographyGetMetrics"
},
{
"first_introduced": "12",
"name": "OH_Drawing_SetTextStyleForegroundBrush"
@ -1370,14 +1366,6 @@
"first_introduced": "12",
"name": "OH_Drawing_TypographyUpdateFontSize"
},
{
"first_introduced": "12",
"name": "OH_Drawing_RegisterThemeFontBuffer"
},
{
"first_introduced": "12",
"name": "OH_Drawing_RegisterThemeFont"
},
{
"first_introduced": "12",
"name": "OH_Drawing_TypographyTextGetLineStyle"

View File

@ -1260,6 +1260,71 @@ static const char *OHOS_IMAGE_PROPERTY_SCENE_POINTER = "HwMnoteScenePointer";
*/
static const char *OHOS_IMAGE_PROPERTY_SCENE_VERSION = "HwMnoteSceneVersion";
/**
* @brief Is Xmage Supported
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_IS_XMAGE_SUPPORTED = "HwMnoteIsXmageSupported";
/**
* @brief Xmage Mode
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_XMAGE_MODE = "HwMnoteXmageMode";
/**
* @brief Xmage X1 Coordinate
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_XMAGE_LEFT = "HwMnoteXmageLeft";
/**
* @brief Xmage Y1 Coordinate
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_XMAGE_TOP = "HwMnoteXmageTop";
/**
* @brief Xmage X2 Coordinate
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_XMAGE_RIGHT = "HwMnoteXmageRight";
/**
* @brief Xmage Y2 Coordinate
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_XMAGE_BOTTOM = "HwMnoteXmageBottom";
/**
* @brief Cloud Enhancement Mode
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_CLOUD_ENHANCEMENT_MODE = "HwMnoteCloudEnhancementMode";
/**
* @brief Wind Snapshot Mode
* It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.
*
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_WIND_SNAPSHOT_MODE = "HwMnoteWindSnapshotMode";
/**
* @brief Gif Loop Count
* It is used in {@link OH_ImageSource_GetImageProperty}.

View File

@ -134,6 +134,18 @@ Image_ErrorCode OH_ImageNative_GetRowStride(OH_ImageNative *image,
Image_ErrorCode OH_ImageNative_GetPixelStride(OH_ImageNative *image,
uint32_t componentType, int32_t *pixelStride);
/**
* @brief Get timestamp from an {@link OH_ImageNative} object.
*
* @param image Indicates the pointer to an {@link OH_ImageNative} object.
* @param timestamp Indicates the pointer to the timestamp obtained.
* @return Image functions result code.
* {@link IMAGE_SUCCESS} if the operation is successful.
* {@link IMAGE_BAD_PARAMETER} if the input parameter is invalid.
* @since 12
*/
Image_ErrorCode OH_ImageNative_GetTimestamp(OH_ImageNative *image, int64_t *timestamp);
/**
* @brief Releases an {@link OH_ImageNative} object.
* It is used to release the object {@link OH_ImageNative}.

View File

@ -37,6 +37,7 @@
#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PIXELMAP_NATIVE_H_
#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PIXELMAP_NATIVE_H_
#include "image_common.h"
#include "napi/native_api.h"
#ifdef __cplusplus
extern "C" {
@ -137,6 +138,186 @@ typedef enum {
OH_PixelmapNative_AntiAliasing_HIGH = 3,
} OH_PixelmapNative_AntiAliasingLevel;
/**
* @brief Enumerates the HDR metadata types that need to be stored in Pixelmap.
*
* @since 12
*/
typedef enum {
/**
* Indicate the types of metadata that image needs to use.
*/
HDR_METADATA_TYPE = 0,
/**
* Static metadata key.
*/
HDR_STATIC_METADATA = 1,
/**
* Dynamic metadata key.
*/
HDR_DYNAMIC_METADATA = 2,
/**
* Gainmap metadata key.
*/
HDR_GAINMAP_METADATA = 3,
} OH_Pixelmap_HdrMetadataKey;
/**
* @brief Value for HDR_METADATA_TYPE.
*
* @since 12
*/
typedef enum {
/**
* No metadata.
*/
NONE = 0,
/**
* Indicates that metadata will be used for the base image.
*/
BASE = 1,
/**
* Indicates that metadata will be used for the gainmap image.
*/
GAINMAP = 2,
/**
* Indicates that metadata will be used for the alternate image.
*/
ALTERNATE = 3,
} OH_Pixelmap_HdrMetadataType;
/**
* @brief Value for HDR_STATIC_METADATA.
*
* @since 12
*/
typedef struct OH_Pixelmap_HdrStaticMetadata {
/**
* The X-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b.
*/
float displayPrimariesX[3];
/**
* The Y-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b.
*/
float displayPrimariesY[3];
/**
* The X-coordinate of the white point value.
*/
float whitePointX;
/**
* The Y-coordinate of the white point value.
*/
float whitePointY;
/**
* Max luminance.
*/
float maxLuminance;
/**
* Min luminance.
*/
float minLuminance;
/**
* Maximum brightness of displayed content.
*/
float maxContentLightLevel;
/**
* Maximum average brightness of displayed content.
*/
float maxFrameAverageLightLevel;
} OH_Pixelmap_HdrStaticMetadata;
/**
* @brief Value for HDR_DYNAMIC_METADATA.
*
* @since 12
*/
typedef struct OH_Pixelmap_HdrDynamicMetadata {
/**
* The value of dynamic metadata.
*/
uint8_t* data;
/**
* The length of dynamic metadata.
*/
uint32_t length;
} OH_Pixelmap_HdrDynamicMetadata;
/**
* @brief Value for HDR_GAINMAP_METADATA.
*
* @since 12
*/
typedef struct OH_Pixelmap_HdrGainmapMetadata {
/**
* The version used by the writer.
*/
uint16_t writerVersion;
/**
* The minimum version a parser needs to understand.
*/
uint16_t miniVersion;
/**
* The number of gain map channels, with a value of 1 or 3.
*/
uint8_t gainmapChannelNum;
/**
* Indicate whether to use the color space of the base image.
*/
bool useBaseColorFlag;
/**
* The baseline hdr headroom.
*/
float baseHeadroom;
/**
* The alternate hdr headroom.
*/
float alternateHeadroom;
/**
* The per-component max gain map values.
*/
float gainmapMax[3];
/**
* The per-component min gain map values.
*/
float gainmapMin[3];
/**
* The per-component gamma values.
*/
float gamma[3];
/**
* The per-component baseline offset.
*/
float baselineOffset[3];
/**
* The per-component alternate offset.
*/
float alternateOffset[3];
} OH_Pixelmap_HdrGainmapMetadata;
/**
* @brief Value for HDR_METADATA_KEY. Corresponding relationship with HDR_METADATA_KEY.
*
* @since 12
*/
typedef struct OH_Pixelmap_HdrMetadataValue {
/**
* The value corresponding to the HDR_METADATA_TYPE key
*/
OH_Pixelmap_HdrMetadataType type;
/**
* The value corresponding to the HDR_STATIC_METADATA key
*/
OH_Pixelmap_HdrStaticMetadata staticMetadata;
/**
* The value corresponding to the HDR_DYNAMIC_METADATA key
*/
OH_Pixelmap_HdrDynamicMetadata dynamicMetadata;
/**
* The value corresponding to the HDR_GAINMAP_METADATA key
*/
OH_Pixelmap_HdrGainmapMetadata gainmapMetadata;
} OH_Pixelmap_HdrMetadataValue;
/**
* @brief Defines the options used for creating a pixel map.
*
@ -399,6 +580,34 @@ Image_ErrorCode OH_PixelmapImageInfo_Release(OH_Pixelmap_ImageInfo *info);
Image_ErrorCode OH_PixelmapNative_CreatePixelmap(uint8_t *data, size_t dataLength,
OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap);
/**
* @brief Convert a native <b>PixelMap</b> object to <b>PixelMap</b> napi object.
*
* @param env Indicates the NAPI environment pointer.
* @param pixelmapNative Indicates a pointer to the <b>PixelMap</b> object created at the native layer.
* @param pixelmapNapi the <b>PixelMap</b> pointer will be converted.
* @return Image functions result code.
* {@link IMAGE_SUCCESS} if the execution is successful.
* {@link IMAGE_BAD_PARAMETER} pixelmapNative is nullptr
* @since 12
*/
Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeToNapi(napi_env env, OH_PixelmapNative *pixelmapNative,
napi_value *pixelmapNapi);
/**
* @brief Convert a <b>PixelMap</b> napi object to native <b>PixelMap</b> object.
*
* @param env Indicates the NAPI environment pointer.
* @param pixelmapNapi Indicates napi <b>PixelMap</b> object.
* @param pixelmapNative Indicates native <b>PixelMap</b> pointer to created.
* @return Image functions result code.
* {@link IMAGE_SUCCESS} if the execution is successful.
* {@link IMAGE_BAD_PARAMETER} pixelmapNative is nullptr, or pixelmapNapi is not a PixelMap
* @since 12
*/
Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeFromNapi(napi_env env, napi_value pixelmapNapi,
OH_PixelmapNative **pixelmapNative);
/**
* @brief Reads data of this pixel map to an Buffer. If this pixel map is created in the BGRA_8888 format,
* the data read is the same as the original data.

View File

@ -146,5 +146,13 @@
{
"first_introduced": "12",
"name": "OH_PixelmapNative_CreateEmptyPixelmap"
},
{
"first_introduced": "12",
"name": "OH_PixelmapNative_ConvertPixelmapToNapi"
},
{
"first_introduced": "12",
"name": "OH_PixelmapNative_ConvertPixelmapFromNapi"
}
]

View File

@ -90,5 +90,9 @@
{
"first_introduced": "12",
"name": "OH_AVScreenCapture_ContentFilter_AddWindowContent"
},
{
"first_introduced": "12",
"name": "OH_AVScreenCapture_ResizeCanvas"
}
]

View File

@ -382,6 +382,22 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ExcludeContent(struct OH_AVScreen
*/
OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ContentFilter_AddWindowContent(
struct OH_AVScreenCapture_ContentFilter *filter, int32_t *windowIDs, int32_t windowCount);
/**
* @brief Resize the Resolution of the Screen
* @syscap SystemCapability.Multimedia.Media.AVScreenCapture
* @param capture Pointer to an OH_AVScreenCapture instance
* @param width Video frame width of avscreeencapture
* @param height Video frame height of avscreeencapture
* @return Function result code.
* {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful.
* {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} input capture is nullptr or input filter is nullptr.
* {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted.
* @since 12
* @version 1.0
*/
OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ResizeCanvas(struct OH_AVScreenCapture *capture,
int32_t width, int32_t height);
#ifdef __cplusplus
}
#endif

View File

@ -3,7 +3,7 @@
"Name": "libuv",
"License": "MIT License",
"License File": "LICENSE",
"Version Number": "v1.44.2",
"Version Number": "v1.48.0",
"Owner": "sunbingxin@huawei.com",
"Upstream URL": "https://github.com/libuv/libuv",
"Description": "libuv is a multi-platform support library with a focus on asynchronous I/O."