From 969293ed3ccf4f30241ad9c469e1d028133c014d Mon Sep 17 00:00:00 2001 From: changleipeng Date: Mon, 29 Jul 2024 10:30:06 +0800 Subject: [PATCH 001/630] update NDK interface Signed-off-by: changleipeng Change-Id: I2f4c65d8b45afdfdc037822c435e8d7280562a6e --- .../kit_sub_system/c_file_kit_sub_system.json | 15 + graphic/graphic_2d/native_drawing/BUILD.gn | 8 + .../graphic_2d/native_drawing/drawing_font.h | 55 ++++ .../graphic_2d/native_drawing/drawing_rect.h | 59 ++++ .../native_drawing/drawing_text_declaration.h | 32 ++ .../drawing_text_font_descriptor.h | 190 ++++++++++++ .../native_drawing/drawing_text_line.h | 283 ++++++++++++++++++ .../drawing_text_lineTypography.h | 103 +++++++ .../native_drawing/drawing_text_run.h | 225 ++++++++++++++ .../native_drawing/drawing_text_typography.h | 123 ++++++-- .../graphic_2d/native_drawing/drawing_types.h | 21 ++ .../native_drawing/libnative_drawing.ndk.json | 232 ++++++++++++++ 12 files changed, 1317 insertions(+), 29 deletions(-) create mode 100644 graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h create mode 100644 graphic/graphic_2d/native_drawing/drawing_text_line.h create mode 100644 graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h create mode 100644 graphic/graphic_2d/native_drawing/drawing_text_run.h diff --git a/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json b/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json index 668e349de..44c8cffcf 100644 --- a/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json +++ b/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json @@ -269,6 +269,21 @@ "kitName": "ArkGraphicsD", "subSystem": "图形图像" }, + { + "filePath": "graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h", + "kitName": "ArkGraphicsD", + "subSystem": "图形图像" + }, + { + "filePath": "graphic/graphic_2d/native_drawing/drawing_text_line.h", + "kitName": "ArkGraphicsD", + "subSystem": "图形图像" + }, + { + "filePath": "graphic/graphic_2d/native_drawing/drawing_text_run.h", + "kitName": "ArkGraphicsD", + "subSystem": "图形图像" + }, { "filePath": "graphic/graphic_2d/native_drawing/drawing_text_typography.h", "kitName": "ArkGraphicsD", diff --git a/graphic/graphic_2d/native_drawing/BUILD.gn b/graphic/graphic_2d/native_drawing/BUILD.gn index aea6e1dc4..88c0459bc 100644 --- a/graphic/graphic_2d/native_drawing/BUILD.gn +++ b/graphic/graphic_2d/native_drawing/BUILD.gn @@ -50,6 +50,10 @@ ohos_ndk_headers("native_drawing_header") { "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_surface.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_blob.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_declaration.h", + "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h", + "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_line.h", + "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h", + "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_run.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_typography.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_typeface.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_types.h", @@ -95,6 +99,10 @@ ohos_ndk_library("libnative_drawing_ndk") { "native_drawing/drawing_surface.h", "native_drawing/drawing_text_blob.h", "native_drawing/drawing_text_declaration.h", + "native_drawing/drawing_text_font_descriptor.h", + "native_drawing/drawing_text_line.h", + "native_drawing/drawing_text_lineTypography.h", + "native_drawing/drawing_text_run.h", "native_drawing/drawing_text_typography.h", "native_drawing/drawing_typeface.h", "native_drawing/drawing_types.h", diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index 38ea644f3..0f0428395 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -497,6 +497,61 @@ typedef struct OH_Drawing_Font_Metrics { */ float OH_Drawing_FontGetMetrics(OH_Drawing_Font*, OH_Drawing_Font_Metrics*); +/** + * @brief Retrieves the bound rect for each glyph in glyph array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param glyphs Indicates the array of glyph indices to be measured. + * @param count Indicates the number of glyphs. + * @param bounds The bound rect array for each glyph, returned to the caller. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs + * and bounds is nullptr or count is 0. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_FontGetBounds(const OH_Drawing_Font* font, const uint16_t* glyphs, uint32_t count, + OH_Drawing_Array* bounds); + +/** + * @brief Retrieves the path for specified Glyph. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param glyph glyph index to be obtained. + * @param path The path object, returned to the caller. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, path + * is nullptr or glyph not exist. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, uint16_t glyph, + OH_Drawing_Path* path); + +/** + * @brief Get the text outline path. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param text Indicates the character storage encoded with text encoding. + * @param byteLength Indicates the text length in bytes. + * @param encoding Indicates the text encoding. + * @param x Indicates x coordinates of the text. + * @param y Indicates y coordinates of the text. + * @param path The path object, returned to the caller. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text or path is nullptr. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_FontGetTextPath(const OH_Drawing_Font* font, const void* text, size_t byteLength, + OH_Drawing_TextEncoding encoding, float x, float y, OH_Drawing_Path* path); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h index e07abff68..02c134f2b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_rect.h @@ -214,6 +214,65 @@ void OH_Drawing_RectCopy(OH_Drawing_Rect* src, OH_Drawing_Rect* dst); */ void OH_Drawing_RectDestroy(OH_Drawing_Rect*); +/** + * @brief Creates an OH_Drawing_Array object, which is used to store multiple OH_Drawing_Rect object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param size Indicates the size of the array object. + * @return Returns the pointer to the OH_Drawing_Array object created. + * If nullptr is returned, the creation fails. + * The possible cause of the failure is that the available memory is empty, + * or size is invalid. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Array* OH_Drawing_RectCreateArray(size_t size); + +/** + * @brief Gets the size of an OH_Drawing_Array object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param rectArray Indicates the array object. + * @param pSize Indicates the size pointer. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or pSize is nullptr. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_RectGetArraySize(OH_Drawing_Array* rectArray, size_t* pSize); + +/** + * @brief Gets the specified OH_Drawing_Rect object from OH_Drawing_Array object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param rectArray Indicates the array object. + * @param index Indicates the index of array, caller must make sure the index is valid. + * @param rect Pointers to Pointer of OH_Drawing_Rect object, returned to the caller. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or pprect is nullptr, + * or index is valid. + * @since 14 + * @version 1.0 + * @note Return nullptr if OH_Drawing_Array or index invalid. + */ +OH_Drawing_ErrorCode OH_Drawing_RectGetArrayElement(OH_Drawing_Array* rectArray, size_t index, + OH_Drawing_Rect** rect); + +/** + * @brief Destroys an array OH_Drawing_Rect object and reclaims the memory occupied by the object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param rectArray Indicates the pointer to an OH_Drawing_Array object. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray is nullptr. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_RectDestroyArray(OH_Drawing_Array* rectArray); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h index 9a324c807..24ec0b365 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h @@ -60,6 +60,14 @@ typedef struct OH_Drawing_FontCollection OH_Drawing_FontCollection; */ typedef struct OH_Drawing_Typography OH_Drawing_Typography; +/** + * @brief Defines an OH_Drawing_LineTypography, which is used to perform line layout. + * + * @since 14 + * @version 1.0 + */ +typedef struct OH_Drawing_LineTypography OH_Drawing_LineTypography; + /** * @brief Defines an OH_Drawing_TextStyle, which is used to manage text colors and decorations. * @@ -125,6 +133,30 @@ typedef struct OH_Drawing_FontParser OH_Drawing_FontParser; */ typedef struct OH_Drawing_TextShadow OH_Drawing_TextShadow; +/** + * @brief Defines an OH_Drawing_TextTab, which is used to to store the tab alignment type and position. + * + * @since 14 + * @version 1.0 + */ +typedef struct OH_Drawing_TextTab OH_Drawing_TextTab; + +/** + * @brief Defines an OH_Drawing_TextLine, which is used to manage text line. + * + * @since 14 + * @version 1.0 + */ +typedef struct OH_Drawing_TextLine OH_Drawing_TextLine; + +/** + * @brief Defines an OH_Drawing_Run, which is used to manage run. + * + * @since 14 + * @version 1.0 + */ +typedef struct OH_Drawing_Run OH_Drawing_Run; + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h new file mode 100644 index 000000000..270e7c602 --- /dev/null +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef C_INCLUDE_DRAWING_TEXT_FONT_DESCRIPTOR_H +#define C_INCLUDE_DRAWING_TEXT_FONT_DESCRIPTOR_H + +/** + * @addtogroup Drawing + * @{ + * + * @brief Provides the font descriptor capability. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * + * @since 8 + * @version 1.0 + */ + +/** + * @file drawing_text_font_descriptor.h + * + * @brief Provide the ability to provide OH_Drawing_FontDescriptor. + * + * @kit ArkGraphics2D + * @library libnative_drawing.so + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @since 8 + * @version 1.0 + */ + +#include "drawing_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Type style flag. + * + * @since 14 + * @version 1.0 + */ +typedef enum { + /** Italic font */ + ITALIC = 1 << 0, + /** Bold font */ + BOLD = 1 << 1, +} OH_Drawing_FontTypeStyle; + +/** + * @brief An enumeration of system font types. + * + * @since 14 + * @version 1.0 + */ +typedef enum { + /** All font types */ + ALL = 1 << 0, + /** System generic font type */ + GENERIC = 1 << 1, + /** Stylish font type */ + STYLISH = 1 << 2, + /** Installed font types */ + INSTALLED = 1 << 3, +} OH_Drawing_SystemFontType; + +/** + * @brief Describes the font information. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontDescriptor { + /** The file path of System font */ + char* path; + /** A name that uniquely identifies the font */ + char* postScriptName; + /** The name of System font */ + char* fullName; + /** The family of System font */ + char* fontFamily; + /** The subfont family of the system font */ + char* fontSubfamily; + /** The weight of System font */ + int weight; + /** The width of System font */ + int width; + /** Whether the system font is tilted */ + int italic; + /** Whether the system font is compact */ + bool monoSpace; + /** whether symbolic fonts are supported */ + bool symbolic; + /** Font size */ + size_t size; + /** Font style flag, from OH_Drawing_FontTypeStyle */ + int typeStyle; +} OH_Drawing_FontDescriptor; + +/** + * @brief Obtain all system font descriptive symbols that match the specified font descriptor. Where the 'path' and + * 'size' fields are not considered as valid matching values, It takes effect when the remaining fields are not + * default values, If all the fields of the parameters OH_Drawing_FontDescriptor are default, obtain all system + * font descriptors. If the match fails, return nullptr. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontDescriptor The pointer to the OH_Drawing_FontDescriptor object. It is recommended to + * use OH_Drawing_CreateFontDescriptor to obtain a valid OH_Drawing_FontDescriptor instance. If you create your own + * OH_Drawing_FontDescriptor object, ensure that fields not intended for matching are set to their default values. + * @param size_t Indicates the count of obtained OH_Drawing_FontDescriptor. + * @return Returns an array of OH_Drawing_FontDescriptor. + * @since 14 + * @version 1.0 + */ +OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescriptor*, size_t*); + +/** + * @brief Releases the OH_Drawing_FontDescriptor array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontDescriptor Pointer to OH_Drawing_FontDescriptor array. + * @param size_t Represents the number of members of the OH_Drawing_FontDescriptor array. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyFontDescriptors(OH_Drawing_FontDescriptor*, size_t); + +/** + * @brief Get the OH_Drawing_FontDescriptor object by the full name of the font, supporting generic fonts, + * stylish fonts, and installed fonts. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_String* Indicates the full name object OH_Drawing_String. + * @return Returns the pointer to a font descriptor object OH_Drawing_FontDescriptor. + * @since 14 + * @version 1.0 + */ +OH_Drawing_FontDescriptor* OH_Drawing_GetFontDescriptorByFullName(const OH_Drawing_String*); + +/** + * @brief Obtain the corresponding font full name list by the font type. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_SystemFontType Indicates enumerates of system font type. + * @return Returns the pointer to full name array object OH_Drawing_Array. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Array* OH_Drawing_GetSystemFontFullNamesByType(OH_Drawing_SystemFontType); + +/** + * @brief Get the specified full name object OH_Drawing_String by index from the + * OH_Drawing_Array object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Array Indicates an array of full name object OH_Drawing_Array. + * @param size_t The index of full name. + * @return Returns a full name object OH_Drawing_String. + * @since 14 + * @version 1.0 + */ +const OH_Drawing_String* OH_Drawing_GetSystemFontFullNamesElement(OH_Drawing_Array*, size_t); + +/** + * @brief Releases the memory occupied by a list of system font names. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Array Indicates an array of full name. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroySystemFontFullNames(OH_Drawing_Array*); + +#ifdef __cplusplus +} +#endif +/** @} */ +#endif \ No newline at end of file diff --git a/graphic/graphic_2d/native_drawing/drawing_text_line.h b/graphic/graphic_2d/native_drawing/drawing_text_line.h new file mode 100644 index 000000000..e83eead09 --- /dev/null +++ b/graphic/graphic_2d/native_drawing/drawing_text_line.h @@ -0,0 +1,283 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef C_INCLUDE_DRAWING_TEXT_LINE_H +#define C_INCLUDE_DRAWING_TEXT_LINE_H + +/** + * @addtogroup Drawing + * @{ + * + * @brief Provides the 2D drawing capability. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * + * @since 14 + * @version 1.0 + */ + +/** + * @file drawing_text_line.h + * + * @brief Declares functions related to textLine in the drawing module. + * + * @since 14 + * @version 1.0 + */ + +#include "drawing_text_declaration.h" +#include "drawing_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Get text line information. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @return Indicates the pointer to a text line array object OH_Drawing_Array. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typography); + +/** + * @brief Releases the memory occupied by the text line array object OH_Drawing_Array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param lines Indicates the pointer to the text line array object OH_Drawing_Array. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyTextLines(OH_Drawing_Array* lines); + +/** + * @brief Releases the memory occupied by the text line object OH_Drawing_TextLine. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to the text line object OH_Drawing_TextLine. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyTextLine(OH_Drawing_TextLine* line); + +/** + * @brief Get the text line object by index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param lines Indicates the pointer to the text line array object OH_Drawing_Array. + * @param index text line object index. + * @return Indicates the pointer to a text line object OH_Drawing_TextLine. + * @since 14 + * @version 1.0 + */ +OH_Drawing_TextLine* OH_Drawing_GetTextLinesIndex(OH_Drawing_Array* lines, size_t index); + +/** + * @brief Get the count of glyphs. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @return Returns the count of glyphs. + * @since 14 + * @version 1.0 + */ +double OH_Drawing_TextLineGetGlyphCount(OH_Drawing_TextLine* line); + +/** + * @brief Get the range of text line. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param start Indicates the pointer to text line start position. + * @param end Indicates the pointer to text line end position. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_TextLineGetTextRange(OH_Drawing_TextLine* line, size_t* start, size_t* end); + +/** + * @brief Get the glyph runs array of text line. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @return Indicates the pointer to a glyph runs array object of text line OH_Drawing_Array. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Array* OH_Drawing_TextLineGetGlyphRuns(OH_Drawing_TextLine* line); + +/** + * @brief Releases the memory occupied by the run array object OH_Drawing_Array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param runs Indicates the pointer to the run array object OH_Drawing_Array. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyRuns(OH_Drawing_Array* runs); + +/** + * @brief Get the run object by index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param runs Indicates the pointer to the run array object OH_Drawing_Array. + * @param index run object index. + * @return Indicates the pointer to a run object OH_Drawing_Run. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Run* OH_Drawing_GetRunsIndex(OH_Drawing_Array* runs, size_t index); + +/** + * @brief Paint the range of text line. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param canvas Draw the text line on the canvas. + * @param x Represents the X-axis position on the canvas. + * @param y Represents the Y-axis position on the canvas. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_TextLinePaint(OH_Drawing_TextLine* line, OH_Drawing_Canvas* canvas, double x, double y); + +/** + * @brief Creates a truncated text line object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param width Indicates the text line width to set. + * @param mode Indicates the ellipsis model to set, EllipsisMode:MIDDLE is not supported. + * For details, see the enum OH_Drawing_EllipsisModal. + * @param ellipsis Indicates the ellipsis string to set. + * @return Returns the pointer to the OH_Drawing_TextLine object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_TextLine* OH_Drawing_TextLineCreateTruncatedLine(OH_Drawing_TextLine* line, double width, int mode, + const char* ellipsis); + +/** + * @brief Gets the text line typographic bounds. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param ascent Indicates the distance that the pointer points to remain above the baseline. + * @param descent Indicates the pointer to the distance that remains below the baseline. + * @param leading Indicates the pointer to the line Spacing. + * @return Returns The total width of the typesetting border. + * @since 14 + * @version 1.0 + */ +double OH_Drawing_TextLineGetTypographicBounds(OH_Drawing_TextLine* line, double* ascent, double* descent, + double* leading); + +/** + * @brief Gets the text line image bounds. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @return Returns the pointer to the OH_Drawing_Rect struct created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Rect* OH_Drawing_TextLineGetImageBounds(OH_Drawing_TextLine* line); + +/** + * @brief Gets the tail space width. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @return Returns the tail space width. + * @since 14 + * @version 1.0 + */ +double OH_Drawing_TextLineGetTrailingSpaceWidth(OH_Drawing_TextLine* line); + +/** + * @brief Gets the string index of the given position. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param point The given position. + * @return Returns the string index for a given position. + * @since 14 + * @version 1.0 + */ +int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, OH_Drawing_Point* point); + +/** + * @brief Gets the offset of the given string index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param index The given string index. + * @param secondOffset Indicates the pointer to the offset of compound character, not supported. + * @return Returns the offset info for a given string index. + * @since 14 + * @version 1.0 + */ +double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int32_t index, double* secondOffset); + +/** + * @brief User-defined callback functions for using offsets and indexes. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param offset Character offset is traversed as an argument to the callback function. + * @param index Character index is traversed as an argument to the callback function. + * @param leadingEdge Whether the current offset is at the character front, as an argument to the callback function. + * @return The return value of the user-defined callback function. + * If false is returned, the traversal continues. + * If true is returned, the traversal stops. + * @since 14 + * @version 1.0 + */ +typedef bool (*CustomCallback)(double offset, int32_t index, bool leadingEdge); + +/** + * @brief Enumerate caret offset and index in text lines. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param callback User-defined callback functions, see CustomCallback. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_TextLineEnumerateCaretOffsets(OH_Drawing_TextLine* line, CustomCallback callback); + +/** + * @brief Gets the text offset based on the given alignment factor and alignment width. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param alignmentFactor The coefficients that text needs to be aligned. + * Less than or equal to 0 is left justified, 0.5 is center justified, + * and greater than or equal to 1 is right justified. + * @param alignmentWidth The width of the text to be aligned. + * Returns 0 if it is less than the actual width of the text. + * @return Returns the offset of the aligned text. + * @since 14 + * @version 1.0 + */ +double OH_Drawing_TextLineGetAlignmentOffset(OH_Drawing_TextLine* line, double alignmentFactor, double alignmentWidth); + +#ifdef __cplusplus +} +#endif +/** @} */ +#endif // C_INCLUDE_DRAWING_TEXT_LINE_H \ No newline at end of file diff --git a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h new file mode 100644 index 000000000..f480cd643 --- /dev/null +++ b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd.. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef C_INCLUDE_DRAWING_TEXT_LINETYPOGRAPHY_H +#define C_INCLUDE_DRAWING_TEXT_LINETYPOGRAPHY_H + +/** + * @addtogroup Drawing + * @{ + * + * @brief Provides the 2D drawing capability. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * + * @since 14 + * @version 1.0 + */ + +/** + * @file drawing_text_linetypography.h + * + * @brief Declares functions related to lineTypography in the drawing module. + * + * @kit ArkGraphics2D + * @library libnative_drawing.so + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @since 14 + * @version 1.0 + */ + +#include "cstddef" +#include "drawing_text_declaration.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Creates an OH_Drawing_LineTypography object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @return Returns the pointer to the OH_Drawing_LineTypography object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_TypographyCreate* handler); + +/** + * @brief Releases the memory occupied by an OH_Drawing_LineTypography object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_LineTypography Indicates the pointer to an OH_Drawing_LineTypography object. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography); + +/** + * @brief Calculate the line breakpoint based on the width provided. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param startIndex Indicates the starting point for the line-break calculations. + * @param width Indicates the requested line-break width. + * @return Returns the count of the characters from startIndex that would cause the line break. + * @since 14 + * @version 1.0 + */ +size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypography, + size_t startIndex, double width); + +/** + * @brief Creates a text line object based on the text range provided. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_LineTypography Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param startIndex Indicates the starting index of the text range. + * @param count Indicates the characters count of the text range. + * @return Returns the pointer to the OH_Drawing_TextLine object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_TextLine* OH_Drawing_LineTypographyCreateLine(OH_Drawing_LineTypography* lineTypography, + size_t startIndex, size_t count); + +#ifdef __cplusplus +} +#endif +/** @} */ +#endif diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h new file mode 100644 index 000000000..28949dc42 --- /dev/null +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef C_INCLUDE_DRAWING_TEXT_RUN_H +#define C_INCLUDE_DRAWING_TEXT_RUN_H + +/** + * @addtogroup Drawing + * @{ + * + * @brief Provides the text run capability. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * + * @since 14 + * @version 1.0 + */ + +/** + * @file drawing_text_run.h + * + * @brief Declares functions related to run in the drawing module. + * + * @since 14 + * @version 1.0 + */ + +#include "drawing_text_declaration.h" +#include "drawing_types.h" + +#ifdef __cplusplus +extern "C" { +#endif +/** + * @brief Gets the run glyph indices ,the offset of the index relative to the entire paragraph. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param start The run of start index. + * @param length The run of length, if start and length are set to 0, then get all of the current run. + * @return Run of glyph indices array. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Array* OH_Drawing_GetRunStringIndices(OH_Drawing_Run* run, int64_t start, int64_t length); + +/** + * @brief Gets the run glyph indices by index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Array the run glyph indices array. + * @param index The run of glyph index. + * @return Run of glyph indices element. + * @since 14 + * @version 1.0 + */ +uint64_t OH_Drawing_GetRunStringIndicesElement(OH_Drawing_Array* stringIndices, size_t index); + +/** + * @brief Releases the memory run glyph indices array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param stringIndices glyph indices the pointer. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyRunStringIndices(OH_Drawing_Array* stringIndices); + +/** + * @brief Gets the range run glyph location and length. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param location The run of glyph location. + * @param length The run of glyph length. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_GetRunStringRange(OH_Drawing_Run* run, uint64_t* location, uint64_t* length); + +/** + * @brief Gets the run typographic bound. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param ascent The run of ascent. + * @param descent The run of descent. + * @param leading The run of leading. + * @return run typographic width. + * @since 14 + * @version 1.0 + */ +float OH_Drawing_GetRunTypographicBounds(OH_Drawing_Run* run, float* ascent, float* descent, float* leading); + +/** + * @brief Paints text on the canvas. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param x Indicates the x coordinate. + * @param y Indicates the y coordinate. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_RunPaint(OH_Drawing_Canvas* canvas, OH_Drawing_Run* run, double x, double y); + +/** + * @brief Gets the run image bound. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @return OH_Drawing_Rect The run image bounds. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Rect* OH_Drawing_GetRunImageBounds(OH_Drawing_Run* run); + + /** + * @brief Releases the memory run image bounds pointer. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Rect Run image bounds pointer. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyRunImageBounds(OH_Drawing_Rect* rect); + +/** + * @brief Gets the range glyph identifier for each character. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param start The run of start index. + * @param length The run of length, if start and length are set to 0, then get all of the current run. + * @return Run of glyph array. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Array* OH_Drawing_GetRunGlyphs(OH_Drawing_Run* run, int64_t start, int64_t length); + +/** + * @brief Gets the glyph identifier by index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param glyphs The run of glyph array. + * @param index The run of glyph index. + * @return Run of glyph element. + * @since 14 + * @version 1.0 + */ +uint16_t OH_Drawing_GetRunGlyphsElement(OH_Drawing_Array* glyphs, size_t index); + +/** + * @brief Releases the memory run glyph array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param glyphs The run of glyph array. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyRunGlyphs(OH_Drawing_Array* glyphs); + +/** + * @brief Gets the range glyph position array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param start The run of start index. + * @param length The run of length, if start and length are set to 0, then get all of the current run. + * @return Run of position array. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Array* OH_Drawing_GetRunPositions(OH_Drawing_Run* run, int64_t start, int64_t length); + +/** + * @brief Gets the glyph position by index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Array The run of position array. + * @param index The run of glyph index. + * @return Run of glyph position pointer. + * @since 14 + * @version 1.0 + */ +OH_Drawing_Point* OH_Drawing_GetRunPositionsElement(OH_Drawing_Array* positions, size_t index); + +/** + * @brief Releases the memory run of position array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param positions The run of position array. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); + +/** + * @brief Gets the number of glyph. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @return The number of glyph. + * @since 14 + * @version 1.0 + */ +uint32_t OH_Drawing_GetRunGlyphCount(OH_Drawing_Run* run); +#ifdef __cplusplus +} +#endif +/** @} */ +#endif // C_INCLUDE_DRAWING_TEXT_RUN_H diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index d821c3855..977062e81 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -45,6 +45,7 @@ #include "drawing_color.h" #include "drawing_font.h" #include "drawing_text_declaration.h" +#include "drawing_text_font_descriptor.h" #include "drawing_types.h" #include "stdint.h" @@ -412,35 +413,6 @@ typedef struct OH_Drawing_FontConfigInfo { OH_Drawing_FontFallbackGroup* fallbackGroupSet; } OH_Drawing_FontConfigInfo; -/** - * @brief Describes the font information. - * - * @since 12 - * @version 1.0 - */ -typedef struct OH_Drawing_FontDescriptor { - /** The file path of System font */ - char* path; - /** A name that uniquely identifies the font */ - char* postScriptName; - /** The name of System font */ - char* fullName; - /** The family of System font */ - char* fontFamily; - /** The subfont family of the system font */ - char* fontSubfamily; - /** The weight of System font */ - int weight; - /** The width of System font */ - int width; - /** Whether the system font is tilted */ - int italic; - /** Whether the system font is compact */ - bool monoSpace; - /** whether symbolic fonts are supported */ - bool symbolic; -} OH_Drawing_FontDescriptor; - /** * @brief The metrics of line. * @@ -734,6 +706,29 @@ void OH_Drawing_SetTextStyleBaseLine(OH_Drawing_TextStyle*, int /* OH_Drawing_Te */ void OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); +/** + * @brief Add the text decoration. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param int Indicates the text decoration to add. For details, see the enum OH_Drawing_TextDecoration. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); + +/** + * @brief Remove the text decoration. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param int Indicates the text decoration to remove, shoud be match existing text decorations. + * For details, see the enum OH_Drawing_TextDecoration. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_RemoveTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); + /** * @brief Sets the color for the text decoration. * @@ -2753,6 +2748,76 @@ void OH_Drawing_TypographyDestroyTextBox(OH_Drawing_TextBox*); void OH_Drawing_SetTextShadow(OH_Drawing_TextShadow* shadow, uint32_t color, OH_Drawing_Point* offset, double blurRadius); +/** + * @brief Creates an OH_Drawing_TextTab object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextAlign Indicates enumerates text tab alignment modes. TAB alignment, Support left alignment + * right alignment center alignment, other enumeration values are left alignment effect. + * @param float Indicates location if text tab. + * @return Returns the pointer to the OH_Drawing_TextTab object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_TextTab* OH_Drawing_CreateTextTab(OH_Drawing_TextAlign alignment, float location); + +/** + * @brief Releases the memory occupied by an OH_Drawing_TextTab object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab*); + +/** + * @brief Get align of an OH_Drawing_TextTab object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @return Returns align of an OH_Drawing_TextTab object. + * @since 14 + * @version 1.0 + */ +OH_Drawing_TextAlign OH_Drawing_GetTextTabAlign(OH_Drawing_TextTab*); + +/** + * @brief Get location of an OH_Drawing_TextTab object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @return Returns location of an OH_Drawing_TextTab object. + * @since 14 + * @version 1.0 + */ +float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab*); + +/** + * @brief Sets the text tab of OH_Drawing_TypographyStyle object. + * TAB alignment does not take effect when text alignment is also set. Or when the TAB's location property + * is less than or equal to 0. When the TAB is not set, it is the default space effect, and all tabs in the paragraph + * after the setting are aligned according to this tab effect. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle*, OH_Drawing_TextTab* TextTab); + +/** + * @brief Get DrawingArray size. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param drawingArray Indicates the pointer to the array object OH_Drawing_Array. + * @return Size of array. + * @since 14 + * @version 1.0 + */ +size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index e040acdfc..22f860ebb 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -471,6 +471,19 @@ typedef struct { double leftBottomRadius; } OH_Drawing_RectStyle_Info; +/** + * @brief Defines the string information struct. + * + * @since 14 + * @version 1.0 + */ +typedef struct { + /** A pointer to a byte string containing UTF-16BE(Big Endian) encoded entities */ + uint8_t* strData; + /** The length of `strData` in bytes */ + uint32_t strLen; +} OH_Drawing_String; + /** * @brief Enumerates text encoding types. * @since 12 @@ -518,6 +531,14 @@ typedef struct OH_Drawing_RecordCmdUtils OH_Drawing_RecordCmdUtils; * @version 1.0 */ typedef struct OH_Drawing_RecordCmd OH_Drawing_RecordCmd; + +/** + * @brief Defines an array object, which is used to store multiple NDK object. + * + * @since 14 + * @version 1.0 + */ +typedef struct OH_Drawing_Array OH_Drawing_Array; #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 9c5b0d269..264d710ff 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -615,6 +615,14 @@ { "name": "OH_Drawing_SetTextStyleFontWeight" }, { "name": "OH_Drawing_SetTextStyleBaseLine" }, { "name": "OH_Drawing_SetTextStyleDecoration" }, + { + "first_introduced": "14", + "name": "OH_Drawing_AddTextStyleDecoration" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_RemoveTextStyleDecoration" + }, { "name": "OH_Drawing_SetTextStyleDecorationColor" }, { "name": "OH_Drawing_SetTextStyleFontHeight" }, { "name": "OH_Drawing_SetTextStyleFontFamilies" }, @@ -902,6 +910,14 @@ "first_introduced": "12", "name": "OH_Drawing_DestroyFontDescriptor" }, + { + "first_introduced": "14", + "name": "OH_Drawing_MatchFontDescriptors" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_DestroyFontDescriptors" + }, { "first_introduced": "12", "name": "OH_Drawing_CreateFontParser" @@ -910,6 +926,22 @@ "first_introduced": "12", "name": "OH_Drawing_DestroyFontParser" }, + { + "first_introduced": "14", + "name": "OH_Drawing_GetFontDescriptorByFullName" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_GetSystemFontFullNamesByType" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_GetSystemFontFullNamesElement" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_DestroySystemFontFullNames" + }, { "first_introduced": "12", "name": "OH_Drawing_FontParserGetSystemFontList" @@ -1465,5 +1497,205 @@ { "first_introduced": "13", "name":"OH_Drawing_RecordCmdDestroy" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_CreateLineTypography" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_DestroyLineTypography" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_LineTypographyGetLineBreak" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_LineTypographyCreateLine" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_FontGetBounds" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_FontGetPathForGlyph" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_RectCreateArray" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_RectGetArraySize" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_RectGetArrayElement" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_RectDestroyArray" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_CreateTextTab" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyTextTab" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetTextTabAlign" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetTextTabLocation" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_SetTypographyTextTab" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_FontGetTextPath" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetDrawingArraySize" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TypographyGetTextLines" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyTextLines" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyTextLine" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetTextLinesIndex" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetGlyphCount" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetTextRange" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetGlyphRuns" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyRuns" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunsIndex" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLinePaint" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineCreateTruncatedLine" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetTypographicBounds" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetImageBounds" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetTrailingSpaceWidth" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetStringIndexForPosition" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetOffsetForStringIndex" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineEnumerateCaretOffsets" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_TextLineGetAlignmentOffset" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunStringIndices" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunStringIndicesElement" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyRunStringIndices" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunStringRange" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunTypographicBounds" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_RunPaint" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunImageBounds" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyRunImageBounds" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunGlyphs" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunGlyphsElement" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyRunGlyphs" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunPositions" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunPositionsElement" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_DestroyRunPositions" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetRunGlyphCount" } ] \ No newline at end of file -- Gitee From 5e59225818e425ff9d7264b1d091588dc1b8b0a8 Mon Sep 17 00:00:00 2001 From: xuzhangchi Date: Thu, 19 Sep 2024 14:53:31 +0800 Subject: [PATCH 002/630] =?UTF-8?q?=E5=8F=AF=E5=8F=98=E5=B8=A7=E7=8E=87?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9E=9A=E4=B8=BE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuzhangchi --- multimedia/av_codec/native_avcodec_base.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index a3d3fb9a2..1bec2e144 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -953,6 +953,14 @@ extern const char *OH_MD_KEY_TRACK_START_TIME; * @since 12 */ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE; +/** + * @brief Key for describing if enable VRR or not, value type is int32_t (0 or 1): 1 is enabled, 0 otherwise. + * This is an optional key that applies only to video decoder. It is used in configure. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 13 + */ +extern const char *OH_MD_KEY_VIDEO_DECODER_ENABLE_VRR; /** * @brief Media type. -- Gitee From 8b1e972b001a48e10d3a75d121f5d40f3b1ec0fc Mon Sep 17 00:00:00 2001 From: zhangqiang Date: Mon, 23 Sep 2024 11:39:18 +0800 Subject: [PATCH 003/630] =?UTF-8?q?20240923=20=20ScreenCapture=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=AE=BE=E7=BD=AE=E5=BD=95=E5=B1=8F=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=B8=A7=E7=8E=87=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangqiang --- .../libnative_avscreen_capture.ndk.json | 4 ++++ .../player_framework/native_avscreen_capture.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json index 1e53ae7d7..8464ce4fd 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -98,5 +98,9 @@ { "first_introduced": "12", "name": "OH_AVScreenCapture_SkipPrivacyMode" + }, + { + "first_introduced": "14", + "name": "OH_AVScreenCapture_SetMaxVideoFrameRate" } ] \ No newline at end of file diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index c260023c6..48af8569d 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -416,6 +416,21 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ResizeCanvas(struct OH_AVScreenCa */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SkipPrivacyMode(struct OH_AVScreenCapture *capture, int32_t *windowIDs, int32_t windowCount); + +/** + * @brief set up the max number of video frame per second + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param capture Pointer to an OH_AVScreenCapture instance + * @param max frame rate of video + * @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 frameRate is not support. + * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted. + * @since 14 + * @version 1.0 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetMaxVideoFrameRate(struct OH_AVScreenCapture *capture, + int32_t frameRate); #ifdef __cplusplus } #endif -- Gitee From c17b4fc3709d617f706dd1c248466529c15504e7 Mon Sep 17 00:00:00 2001 From: SubmarinePhantom Date: Wed, 5 Jun 2024 10:06:42 +0800 Subject: [PATCH 004/630] =?UTF-8?q?NDK=20OHOS=E6=8E=A5=E5=8F=A3=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SubmarinePhantom --- network/netmanager/include/net_connection.h | 34 ++++++++++++++++++- network/netmanager/libnet_connection.ndk.json | 8 +++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/network/netmanager/include/net_connection.h b/network/netmanager/include/net_connection.h index 76d12d406..6c5c4c2f2 100644 --- a/network/netmanager/include/net_connection.h +++ b/network/netmanager/include/net_connection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -186,6 +186,8 @@ int32_t OH_NetConn_GetAllNets(NetConn_NetHandleList *netHandleList); * 2100003 - Internal error. * @permission ohos.permission.INTERNET * @syscap SystemCapability.Communication.NetManager.Core + * @deprecated since 13 + * @useinstead OH_NetConn_RegisterDnsResolver * @since 11 * @version 1.0 */ @@ -199,11 +201,41 @@ int32_t OHOS_NetConn_RegisterDnsResolver(OH_NetConn_CustomDnsResolver resolver); * 2100003 - Internal error. * @permission ohos.permission.INTERNET * @syscap SystemCapability.Communication.NetManager.Core + * @deprecated since 13 + * @useinstead OH_NetConn_UnregisterDnsResolver * @since 11 * @version 1.0 */ int32_t OHOS_NetConn_UnregisterDnsResolver(void); +/** + * @brief Registers a custom DNS resolver. + * + * @param resolver Pointer to the custom DNS resolver. + * @return Returns the result code. + * {@link NETMANAGER_EXT_SUCCESS} if the operation is successful. + * {@link NETMANAGER_ERR_PERMISSION_DENIED} Missing permissions, add permission. + * {@link NETMANAGER_ERR_PARAMETER_ERROR} Parameter error. Please enter a correct parameter. + * @permission ohos.permission.INTERNET + * @syscap SystemCapability.Communication.NetManager.Core + * @since 13 + * @version 1.0 + */ +int32_t OH_NetConn_RegisterDnsResolver(OH_NetConn_CustomDnsResolver resolver); + +/** + * @brief Unregisters a custom DNS resolver. + * + * @return 0 - Success. 201 - Missing permissions. + * 401 - Parameter error. 2100002 - Unable to connect to service. + * 2100003 - Internal error. + * @permission ohos.permission.INTERNET + * @syscap SystemCapability.Communication.NetManager.Core + * @since 13 + * @version 1.0 + */ +int32_t OH_NetConn_UnregisterDnsResolver(void); + /** * @brief Binds a socket to the specific network. * diff --git a/network/netmanager/libnet_connection.ndk.json b/network/netmanager/libnet_connection.ndk.json index 792eff18e..41b98af11 100644 --- a/network/netmanager/libnet_connection.ndk.json +++ b/network/netmanager/libnet_connection.ndk.json @@ -70,5 +70,13 @@ { "first_introduced": "12", "name": "OH_NetConn_UnregisterNetConnCallback" + }, + { + "first_introduced": "13", + "name": "OH_NetConn_RegisterDnsResolver" + }, + { + "first_introduced": "13", + "name": "OH_NetConn_UnregisterDnsResolver" } ] \ No newline at end of file -- Gitee From 21f061a23e989bbfc127534ae67af1267dc12a42 Mon Sep 17 00:00:00 2001 From: gaosong Date: Mon, 23 Sep 2024 20:58:24 +0800 Subject: [PATCH 005/630] ndk Signed-off-by: gaosong --- ConnectivityKit/wifi/BUILD.gn | 29 +++++++++ ConnectivityKit/wifi/libwifi.ndk.json | 5 ++ ConnectivityKit/wifi/oh_wifi.h | 90 +++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 ConnectivityKit/wifi/BUILD.gn create mode 100644 ConnectivityKit/wifi/libwifi.ndk.json create mode 100644 ConnectivityKit/wifi/oh_wifi.h diff --git a/ConnectivityKit/wifi/BUILD.gn b/ConnectivityKit/wifi/BUILD.gn new file mode 100644 index 000000000..053434890 --- /dev/null +++ b/ConnectivityKit/wifi/BUILD.gn @@ -0,0 +1,29 @@ +# Copyright (C) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") + +ohos_ndk_headers("wifi_ndk_header") { + dest_dir = "$ndk_headers_out_dir/ConnectivityKit/wifi" + sources = [ "./oh_wifi.h" ] +} + +ohos_ndk_library("libwifi_ndk") { + ndk_description_file = "./libwifi.ndk.json" + output_name = "wifi_ndk" + output_extension = "so" + min_compact_version = "13" + system_capability = "SystemCapability.Communication.WiFi.STA" + system_capability_headers = [ "./oh_wifi.h" ] +} \ No newline at end of file diff --git a/ConnectivityKit/wifi/libwifi.ndk.json b/ConnectivityKit/wifi/libwifi.ndk.json new file mode 100644 index 000000000..86a467898 --- /dev/null +++ b/ConnectivityKit/wifi/libwifi.ndk.json @@ -0,0 +1,5 @@ +[ + { + "name": "OH_Wifi_IsWifiEnabled" + } +] \ No newline at end of file diff --git a/ConnectivityKit/wifi/oh_wifi.h b/ConnectivityKit/wifi/oh_wifi.h new file mode 100644 index 000000000..4c84471c7 --- /dev/null +++ b/ConnectivityKit/wifi/oh_wifi.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup Wifi + * @{ + * + * @brief Provide functions for querying the status of wifi switch. + * @since 13 + */ +/** + * @file oh_wifi.h + * @kit ConnectivityKit + * @brief Define interfaces for querying wifi switch status. + * @library libwifi.so + * @syscap SystemCapability.Communication.WiFi.STA + * @since 13 + */ + +#ifndef OH_WIFI_H +#define OH_WIFI_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumerates the wifi result codes. + * + * @since 13 + */ +typedef enum WifiResultCode { + /** + * @error The operation is successful. + */ + WIFI_SUCCESS = 0, + /** + * @error Permission verification failed. The application does not have the + * permission required to call the API. + */ + WIFI_PERMISSION_DENIED = 201, + /** + * @error Parameter error. Possible reasons: 1. The input parameter is a null pointer;\n + * 2. Parameter values exceed the defined range.\n + */ + WIFI_INVALID_PARAM = 401, + /** + * @error Capability not supported. Failed to call function due to limited device capabilities. + */ + WIFI_NOT_SUPPORTED = 801, + /** + * @error Operation failed. + * Possible reasons: Internal execution failed. + */ + WIFI_OPERATION_FAILED = 1000 +} WifiResultCode; + +/** + * @brief Check whether the wifi switch is enabled. + * + * @param enabled - It is a boolean pointer used to receive wifi switch status values.\n + * Equal to true indicates that the wifi switch is turned on, false indicates that\n + * the wifi switch is turned off.\n + * The caller needs to pass in a non empty boolean pointer, otherwise an error will be returned.\n + * @return wifi functions result code.\n + * For a detailed definition, please refer to {@link WifiResultCode}.\n + * {@link WIFI_SUCCESS} Successfully obtained the wifi switch status.\n + * {@link WIFI_INVALID_PARAM} The input parameter enabled is a null pointer.\n + * {@link WIFI_PERMISSION_DENIED} The application does not have the permission required to call the API.\n + * @since 13 + */ +WifiResultCode OH_Wifi_IsWifiEnabled(bool *enabled); + +#ifdef __cplusplus +} +#endif +/** @} */ +#endif // OH_WIFI_H \ No newline at end of file -- Gitee From 65a65b9298b2d00889489c44cbfd11c24988f1c8 Mon Sep 17 00:00:00 2001 From: qano Date: Fri, 27 Sep 2024 10:57:54 +0800 Subject: [PATCH 006/630] api13 add enableMirror Signed-off-by: qano --- multimedia/camera_framework/camera.ndk.json | 4 ++++ multimedia/camera_framework/photo_output.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index e5faf336c..aaa30c4e5 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -471,6 +471,10 @@ "first_introduced": "11", "name": "OH_PhotoOutput_IsMirrorSupported" }, + { + "first_introduced": "13", + "name": "OH_PhotoOutput_EnableMirror" + }, { "first_introduced": "12", "name": "OH_PhotoOutput_GetActiveProfile" diff --git a/multimedia/camera_framework/photo_output.h b/multimedia/camera_framework/photo_output.h index 70f909bcf..27e502b69 100644 --- a/multimedia/camera_framework/photo_output.h +++ b/multimedia/camera_framework/photo_output.h @@ -441,6 +441,18 @@ Camera_ErrorCode OH_PhotoOutput_Release(Camera_PhotoOutput* photoOutput); */ Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported(Camera_PhotoOutput* photoOutput, bool* isSupported); +/** + * @brief Enable mirror for photo capture. + * + * @param photoOutput the {@link Camera_PhotoOutput} instance which used to configure mirror. + * @param enabled the flag indicates whether mirror is enabled. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 13 + */ +Camera_ErrorCode OH_PhotoOutput_EnableMirror(Camera_PhotoOutput* photoOutput, bool enabled); + /** * @brief Get active photo output profile. * -- Gitee From 4d19158fdb3b418f381e69f0fb615238841c46f1 Mon Sep 17 00:00:00 2001 From: AOL Date: Fri, 27 Sep 2024 07:12:24 +0000 Subject: [PATCH 007/630] fix typo Signed-off-by: AOL --- .../audio_framework/audio_renderer/native_audiorenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 49c765ff6..90255a7fd 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -485,7 +485,7 @@ OH_AudioStream_Result OH_AudioRenderer_GetSilentModeAndMixWithOthers( * @brief Temporarily changes the current audio device * This function applys on audiorenderers whose StreamUsage are * STREAM_USAGE_VOICE_COMMUNICATIN/STREAM_USAGE_VIDEO_COMMUNICATION/STREAM_USAGE_VOICE_MESSAGE. - * Setting the device will ony takes effect if no other accessory such as headphoes are in use. + * Setting the device will only takes effect if no other accessory such as headphones are in use. * * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() * @param deviceType The target device. The available deviceTypes are: -- Gitee From b8b98fb03bc12a0bd900007ac9476df93540f681 Mon Sep 17 00:00:00 2001 From: wangsen1994 Date: Sat, 28 Sep 2024 09:26:26 +0800 Subject: [PATCH 008/630] =?UTF-8?q?ans=E6=96=B0=E5=A2=9Ecapi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangsen1994 --- NotificationKit/BUILD.gn | 28 +++++++++++ NotificationKit/libohnotification.ndk.json | 6 +++ NotificationKit/notification.h | 58 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 NotificationKit/BUILD.gn create mode 100644 NotificationKit/libohnotification.ndk.json create mode 100644 NotificationKit/notification.h diff --git a/NotificationKit/BUILD.gn b/NotificationKit/BUILD.gn new file mode 100644 index 000000000..1e12b6983 --- /dev/null +++ b/NotificationKit/BUILD.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") +ohos_ndk_headers("ohnotification_header") { + dest_dir = "$ndk_headers_out_dir/NotificationKit/" + sources = [ "./notification.h" ] +} + +ohos_ndk_library("libnotification_ndk") { + output_name = "ohnotification" + output_extension = "so" + ndk_description_file = "./libohnotification.ndk.json" + min_compact_version = "14" + system_capability = "SystemCapability.Notification.Notification" + system_capability_headers = [ "NotificationKit/notification.h" ] +} diff --git a/NotificationKit/libohnotification.ndk.json b/NotificationKit/libohnotification.ndk.json new file mode 100644 index 000000000..4a929d5ce --- /dev/null +++ b/NotificationKit/libohnotification.ndk.json @@ -0,0 +1,6 @@ +[ + { + "first_introduced": "14", + "name": "OH_Notification_IsNotificationEnabled" + } +] diff --git a/NotificationKit/notification.h b/NotificationKit/notification.h new file mode 100644 index 000000000..236608ca5 --- /dev/null +++ b/NotificationKit/notification.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup NOTIFICATION + * @{ + * + * @brief Provides the definition of the C interface for the notification service. + * + * @since 14 + */ +/** + * @file notification.h + * + * @brief Declares the APIs of notification service. + * + * @library libohnotification.so + * @kit NotificationKit + * @syscap SystemCapability.Notification.Notification + * @since 14 + */ + +#ifndef OH_NOTIFICATION_H +#define OH_NOTIFICATION_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Checks whether this application is allowed to publish notifications. + * + * @return true - This application is allowed to publish notifications. + * false - This application is not allowed to publish notifications. + * @since 14 + */ +bool OH_Notification_IsNotificationEnabled(void); + +#ifdef __cplusplus +} +#endif +#endif // OH_NOTIFICATION_H +/** @} */ -- Gitee From da9c47f7f79018fce6b7bd242d1ce8dde2c1cfe9 Mon Sep 17 00:00:00 2001 From: changleipeng Date: Wed, 18 Sep 2024 16:50:57 +0800 Subject: [PATCH 009/630] restore OH_Drawing_FontDescriptor position Signed-off-by: changleipeng --- .../kit_sub_system/c_file_kit_sub_system.json | 15 --- .../graphic_2d/native_drawing/drawing_font.h | 7 +- .../graphic_2d/native_drawing/drawing_rect.h | 1 - .../drawing_text_font_descriptor.h | 102 +++++------------- .../native_drawing/drawing_text_line.h | 56 +++------- .../drawing_text_lineTypography.h | 11 +- .../native_drawing/drawing_text_run.h | 75 ++++++------- .../native_drawing/drawing_text_typography.h | 46 ++++++-- .../native_drawing/libnative_drawing.ndk.json | 18 ++-- 9 files changed, 120 insertions(+), 211 deletions(-) diff --git a/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json b/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json index 44c8cffcf..668e349de 100644 --- a/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json +++ b/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json @@ -269,21 +269,6 @@ "kitName": "ArkGraphicsD", "subSystem": "图形图像" }, - { - "filePath": "graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h", - "kitName": "ArkGraphicsD", - "subSystem": "图形图像" - }, - { - "filePath": "graphic/graphic_2d/native_drawing/drawing_text_line.h", - "kitName": "ArkGraphicsD", - "subSystem": "图形图像" - }, - { - "filePath": "graphic/graphic_2d/native_drawing/drawing_text_run.h", - "kitName": "ArkGraphicsD", - "subSystem": "图形图像" - }, { "filePath": "graphic/graphic_2d/native_drawing/drawing_text_typography.h", "kitName": "ArkGraphicsD", diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index 0f0428395..ca4eac990 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -539,15 +539,14 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, * @param font Indicates the pointer to an OH_Drawing_Font object. * @param text Indicates the character storage encoded with text encoding. * @param byteLength Indicates the text length in bytes. - * @param encoding Indicates the text encoding. - * @param x Indicates x coordinates of the text. + * @param encoding OH_Drawing_TextEncoding Indicates the text encoding. + * @param x Indicates x coordinates of the text. * @param y Indicates y coordinates of the text. - * @param path The path object, returned to the caller. + * @param path OH_Drawing_Path The path object, returned to the caller. * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text or path is nullptr. * @since 14 - * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontGetTextPath(const OH_Drawing_Font* font, const void* text, size_t byteLength, OH_Drawing_TextEncoding encoding, float x, float y, OH_Drawing_Path* path); diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h index 02c134f2b..6ea9ca992 100644 --- a/graphic/graphic_2d/native_drawing/drawing_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_rect.h @@ -255,7 +255,6 @@ OH_Drawing_ErrorCode OH_Drawing_RectGetArraySize(OH_Drawing_Array* rectArray, si * or index is valid. * @since 14 * @version 1.0 - * @note Return nullptr if OH_Drawing_Array or index invalid. */ OH_Drawing_ErrorCode OH_Drawing_RectGetArrayElement(OH_Drawing_Array* rectArray, size_t index, OH_Drawing_Rect** rect); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 270e7c602..e6c262107 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TEXT_FONT_DESCRIPTOR_H -#define C_INCLUDE_DRAWING_TEXT_FONT_DESCRIPTOR_H - /** * @addtogroup Drawing * @{ @@ -24,7 +21,7 @@ * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * - * @since 8 + * @since 14 * @version 1.0 */ @@ -36,34 +33,23 @@ * @kit ArkGraphics2D * @library libnative_drawing.so * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 8 + * @since 14 * @version 1.0 */ -#include "drawing_types.h" +#ifndef DRAWING_TEXT_FONT_DESCRIPTOR_H +#define DRAWING_TEXT_FONT_DESCRIPTOR_H + +#include "drawing_text_typography.h" #ifdef __cplusplus extern "C" { #endif -/** - * @brief Type style flag. - * - * @since 14 - * @version 1.0 - */ -typedef enum { - /** Italic font */ - ITALIC = 1 << 0, - /** Bold font */ - BOLD = 1 << 1, -} OH_Drawing_FontTypeStyle; - /** * @brief An enumeration of system font types. * * @since 14 - * @version 1.0 */ typedef enum { /** All font types */ @@ -77,52 +63,20 @@ typedef enum { } OH_Drawing_SystemFontType; /** - * @brief Describes the font information. - * - * @since 12 - * @version 1.0 - */ -typedef struct OH_Drawing_FontDescriptor { - /** The file path of System font */ - char* path; - /** A name that uniquely identifies the font */ - char* postScriptName; - /** The name of System font */ - char* fullName; - /** The family of System font */ - char* fontFamily; - /** The subfont family of the system font */ - char* fontSubfamily; - /** The weight of System font */ - int weight; - /** The width of System font */ - int width; - /** Whether the system font is tilted */ - int italic; - /** Whether the system font is compact */ - bool monoSpace; - /** whether symbolic fonts are supported */ - bool symbolic; - /** Font size */ - size_t size; - /** Font style flag, from OH_Drawing_FontTypeStyle */ - int typeStyle; -} OH_Drawing_FontDescriptor; - -/** - * @brief Obtain all system font descriptive symbols that match the specified font descriptor. Where the 'path' and - * 'size' fields are not considered as valid matching values, It takes effect when the remaining fields are not + * @brief Obtain all system font descriptive symbols that match the specified font descriptor. Where the 'path' + * fields are not considered as valid matching values, It takes effect when the remaining fields are not * default values, If all the fields of the parameters OH_Drawing_FontDescriptor are default, obtain all system * font descriptors. If the match fails, return nullptr. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param OH_Drawing_FontDescriptor The pointer to the OH_Drawing_FontDescriptor object. It is recommended to - * use OH_Drawing_CreateFontDescriptor to obtain a valid OH_Drawing_FontDescriptor instance. If you create your own - * OH_Drawing_FontDescriptor object, ensure that fields not intended for matching are set to their default values. + * use OH_Drawing_CreateFontDescriptor to obtain a valid OH_Drawing_FontDescriptor instance. + * If you create your own OH_Drawing_FontDescriptor object, ensure that fields not intended for matching are + * set to their default values. * @param size_t Indicates the count of obtained OH_Drawing_FontDescriptor. - * @return Returns an array of OH_Drawing_FontDescriptor. + * @return Returns an array of OH_Drawing_FontDescriptor. Released through the + * OH_Drawing_DestroyFontDescriptors interface after use. * @since 14 - * @version 1.0 */ OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescriptor*, size_t*); @@ -130,38 +84,36 @@ OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescri * @brief Releases the OH_Drawing_FontDescriptor array. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontDescriptor Pointer to OH_Drawing_FontDescriptor array. - * @param size_t Represents the number of members of the OH_Drawing_FontDescriptor array. + * @param OH_Drawing_FontDescriptor OH_Drawing_FontDescriptor object array. + * @param size_t Represents the number of members of the OH_Drawing_FontDescriptor array. * @since 14 - * @version 1.0 */ void OH_Drawing_DestroyFontDescriptors(OH_Drawing_FontDescriptor*, size_t); /** - * @brief Get the OH_Drawing_FontDescriptor object by the full name of the font, supporting generic fonts, - * stylish fonts, and installed fonts. + * @brief Get the OH_Drawing_FontDescriptor object by the font full name and the font type, supporting generic + * fonts, stylish fonts, and installed fonts. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_String* Indicates the full name object OH_Drawing_String. + * @param OH_Drawing_String Indicates the full name object OH_Drawing_String. + * @param OH_Drawing_SystemFontType Indicates enumerates of system font type object OH_Drawing_SystemFontType. * @return Returns the pointer to a font descriptor object OH_Drawing_FontDescriptor. * @since 14 - * @version 1.0 */ -OH_Drawing_FontDescriptor* OH_Drawing_GetFontDescriptorByFullName(const OH_Drawing_String*); +OH_Drawing_FontDescriptor* OH_Drawing_GetFontDescriptorByFullName(const OH_Drawing_String*, OH_Drawing_SystemFontType); /** - * @brief Obtain the corresponding font full name list by the font type. + * @brief Obtain the corresponding font full name array by the font type. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_SystemFontType Indicates enumerates of system font type. + * @param OH_Drawing_SystemFontType Indicates enumerates of system font type object OH_Drawing_SystemFontType. * @return Returns the pointer to full name array object OH_Drawing_Array. * @since 14 - * @version 1.0 */ OH_Drawing_Array* OH_Drawing_GetSystemFontFullNamesByType(OH_Drawing_SystemFontType); /** - * @brief Get the specified full name object OH_Drawing_String by index from the + * @brief Get the specified full name object OH_Drawing_String by index from the * OH_Drawing_Array object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @@ -169,17 +121,15 @@ OH_Drawing_Array* OH_Drawing_GetSystemFontFullNamesByType(OH_Drawing_SystemFontT * @param size_t The index of full name. * @return Returns a full name object OH_Drawing_String. * @since 14 - * @version 1.0 */ -const OH_Drawing_String* OH_Drawing_GetSystemFontFullNamesElement(OH_Drawing_Array*, size_t); +const OH_Drawing_String* OH_Drawing_GetSystemFontFullNameByIndex(OH_Drawing_Array*, size_t); /** - * @brief Releases the memory occupied by a list of system font names. + * @brief Releases the memory occupied by an array of font full names. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Array Indicates an array of full name. + * @param OH_Drawing_Array Indicates an array of full name object OH_Drawing_Array. * @since 14 - * @version 1.0 */ void OH_Drawing_DestroySystemFontFullNames(OH_Drawing_Array*); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_line.h b/graphic/graphic_2d/native_drawing/drawing_text_line.h index e83eead09..196907ed5 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_line.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_line.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TEXT_LINE_H -#define C_INCLUDE_DRAWING_TEXT_LINE_H - /** * @addtogroup Drawing * @{ @@ -37,6 +34,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_TEXT_LINE_H +#define C_INCLUDE_DRAWING_TEXT_LINE_H + #include "drawing_text_declaration.h" #include "drawing_types.h" @@ -48,10 +48,9 @@ extern "C" { * @brief Get text line information. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. * @return Indicates the pointer to a text line array object OH_Drawing_Array. * @since 14 - * @version 1.0 */ OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typography); @@ -80,12 +79,11 @@ void OH_Drawing_DestroyTextLine(OH_Drawing_TextLine* line); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param lines Indicates the pointer to the text line array object OH_Drawing_Array. - * @param index text line object index. + * @param index The text line object index. * @return Indicates the pointer to a text line object OH_Drawing_TextLine. * @since 14 - * @version 1.0 */ -OH_Drawing_TextLine* OH_Drawing_GetTextLinesIndex(OH_Drawing_Array* lines, size_t index); +OH_Drawing_TextLine* OH_Drawing_GetTextLineByIndex(OH_Drawing_Array* lines, size_t index); /** * @brief Get the count of glyphs. @@ -136,19 +134,18 @@ void OH_Drawing_DestroyRuns(OH_Drawing_Array* runs); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param runs Indicates the pointer to the run array object OH_Drawing_Array. - * @param index run object index. + * @param index The run object index. * @return Indicates the pointer to a run object OH_Drawing_Run. * @since 14 - * @version 1.0 */ -OH_Drawing_Run* OH_Drawing_GetRunsIndex(OH_Drawing_Array* runs, size_t index); +OH_Drawing_Run* OH_Drawing_GetRunByIndex(OH_Drawing_Array* runs, size_t index); /** * @brief Paint the range of text line. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. - * @param canvas Draw the text line on the canvas. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param x Represents the X-axis position on the canvas. * @param y Represents the Y-axis position on the canvas. * @since 14 @@ -214,10 +211,9 @@ double OH_Drawing_TextLineGetTrailingSpaceWidth(OH_Drawing_TextLine* line); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. - * @param point The given position. + * @param point Indicates the pointer to an OH_Drawing_Point object. * @return Returns the string index for a given position. * @since 14 - * @version 1.0 */ int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, OH_Drawing_Point* point); @@ -227,38 +223,10 @@ int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param index The given string index. - * @param secondOffset Indicates the pointer to the offset of compound character, not supported. - * @return Returns the offset info for a given string index. - * @since 14 - * @version 1.0 - */ -double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int32_t index, double* secondOffset); - -/** - * @brief User-defined callback functions for using offsets and indexes. - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param offset Character offset is traversed as an argument to the callback function. - * @param index Character index is traversed as an argument to the callback function. - * @param leadingEdge Whether the current offset is at the character front, as an argument to the callback function. - * @return The return value of the user-defined callback function. - * If false is returned, the traversal continues. - * If true is returned, the traversal stops. + * @return Returns the offset for a given string index. * @since 14 - * @version 1.0 - */ -typedef bool (*CustomCallback)(double offset, int32_t index, bool leadingEdge); - -/** - * @brief Enumerate caret offset and index in text lines. - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param line Indicates the pointer to an OH_Drawing_TextLine object. - * @param callback User-defined callback functions, see CustomCallback. - * @since 14 - * @version 1.0 */ -void OH_Drawing_TextLineEnumerateCaretOffsets(OH_Drawing_TextLine* line, CustomCallback callback); +double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int32_t index); /** * @brief Gets the text offset based on the given alignment factor and alignment width. diff --git a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h index f480cd643..6d20d529b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TEXT_LINETYPOGRAPHY_H -#define C_INCLUDE_DRAWING_TEXT_LINETYPOGRAPHY_H - /** * @addtogroup Drawing * @{ @@ -40,7 +37,9 @@ * @version 1.0 */ -#include "cstddef" +#ifndef DRAWING_TEXT_LINETYPOGRAPHY_H +#define DRAWING_TEXT_LINETYPOGRAPHY_H + #include "drawing_text_declaration.h" #ifdef __cplusplus @@ -54,7 +53,6 @@ extern "C" { * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. * @return Returns the pointer to the OH_Drawing_LineTypography object created. * @since 14 - * @version 1.0 */ OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_TypographyCreate* handler); @@ -64,7 +62,6 @@ OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_Typography * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param OH_Drawing_LineTypography Indicates the pointer to an OH_Drawing_LineTypography object. * @since 14 - * @version 1.0 */ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography); @@ -77,7 +74,6 @@ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography) * @param width Indicates the requested line-break width. * @return Returns the count of the characters from startIndex that would cause the line break. * @since 14 - * @version 1.0 */ size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypography, size_t startIndex, double width); @@ -91,7 +87,6 @@ size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypo * @param count Indicates the characters count of the text range. * @return Returns the pointer to the OH_Drawing_TextLine object created. * @since 14 - * @version 1.0 */ OH_Drawing_TextLine* OH_Drawing_LineTypographyCreateLine(OH_Drawing_LineTypography* lineTypography, size_t startIndex, size_t count); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index 28949dc42..b71a197dd 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TEXT_RUN_H -#define C_INCLUDE_DRAWING_TEXT_RUN_H - /** * @addtogroup Drawing * @{ @@ -37,6 +34,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_TEXT_RUN_H +#define C_INCLUDE_DRAWING_TEXT_RUN_H + #include "drawing_text_declaration.h" #include "drawing_types.h" @@ -47,12 +47,11 @@ extern "C" { * @brief Gets the run glyph indices ,the offset of the index relative to the entire paragraph. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param run Indicates the pointer to an OH_Drawing_Run object. * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. - * @return Run of glyph indices array. + * @return Run of glyph indices array object OH_Drawing_Array. * @since 14 - * @version 1.0 */ OH_Drawing_Array* OH_Drawing_GetRunStringIndices(OH_Drawing_Run* run, int64_t start, int64_t length); @@ -60,21 +59,19 @@ OH_Drawing_Array* OH_Drawing_GetRunStringIndices(OH_Drawing_Run* run, int64_t st * @brief Gets the run glyph indices by index. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Array the run glyph indices array. + * @param stringIndices the run glyph indices array object OH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph indices element. * @since 14 - * @version 1.0 */ -uint64_t OH_Drawing_GetRunStringIndicesElement(OH_Drawing_Array* stringIndices, size_t index); +uint64_t OH_Drawing_GetRunStringIndicesByIndex(OH_Drawing_Array* stringIndices, size_t index); /** * @brief Releases the memory run glyph indices array. - * + * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param stringIndices glyph indices the pointer. + * @param stringIndices glyph indices array object OH_Drawing_Array. * @since 14 - * @version 1.0 */ void OH_Drawing_DestroyRunStringIndices(OH_Drawing_Array* stringIndices); @@ -82,11 +79,10 @@ void OH_Drawing_DestroyRunStringIndices(OH_Drawing_Array* stringIndices); * @brief Gets the range run glyph location and length. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param run Indicates the pointer to an OH_Drawing_Run object. * @param location The run of glyph location. * @param length The run of glyph length. * @since 14 - * @version 1.0 */ void OH_Drawing_GetRunStringRange(OH_Drawing_Run* run, uint64_t* location, uint64_t* length); @@ -94,13 +90,12 @@ void OH_Drawing_GetRunStringRange(OH_Drawing_Run* run, uint64_t* location, uint6 * @brief Gets the run typographic bound. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param run Indicates the pointer to an OH_Drawing_Run object. * @param ascent The run of ascent. * @param descent The run of descent. * @param leading The run of leading. * @return run typographic width. * @since 14 - * @version 1.0 */ float OH_Drawing_GetRunTypographicBounds(OH_Drawing_Run* run, float* ascent, float* descent, float* leading); @@ -108,12 +103,11 @@ float OH_Drawing_GetRunTypographicBounds(OH_Drawing_Run* run, float* ascent, flo * @brief Paints text on the canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param run Indicates the pointer to an OH_Drawing_Run object. * @param x Indicates the x coordinate. * @param y Indicates the y coordinate. * @since 14 - * @version 1.0 */ void OH_Drawing_RunPaint(OH_Drawing_Canvas* canvas, OH_Drawing_Run* run, double x, double y); @@ -121,10 +115,9 @@ void OH_Drawing_RunPaint(OH_Drawing_Canvas* canvas, OH_Drawing_Run* run, double * @brief Gets the run image bound. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. - * @return OH_Drawing_Rect The run image bounds. + * @param run Indicates the pointer to an OH_Drawing_Run object. + * @return The run image bounds to an OH_Drawing_Rect object. * @since 14 - * @version 1.0 */ OH_Drawing_Rect* OH_Drawing_GetRunImageBounds(OH_Drawing_Run* run); @@ -132,22 +125,20 @@ OH_Drawing_Rect* OH_Drawing_GetRunImageBounds(OH_Drawing_Run* run); * @brief Releases the memory run image bounds pointer. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Run image bounds pointer. + * @param rect Run image bounds to an OH_Drawing_Rect object. * @since 14 - * @version 1.0 */ void OH_Drawing_DestroyRunImageBounds(OH_Drawing_Rect* rect); /** * @brief Gets the range glyph identifier for each character. - * + * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param run Indicates the pointer to an OH_Drawing_Run object. * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. - * @return Run of glyph array. + * @return Run of glyph array object OH_Drawing_ArrayOH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph element. * @since 14 * @version 1.0 */ -uint16_t OH_Drawing_GetRunGlyphsElement(OH_Drawing_Array* glyphs, size_t index); +uint16_t OH_Drawing_GetRunGlyphsByIndex(OH_Drawing_Array* glyphs, size_t index); /** * @brief Releases the memory run glyph array. - * + * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param glyphs The run of glyph array. + * @param glyphs The run of glyph array object OH_Drawing_Array. * @since 14 - * @version 1.0 */ void OH_Drawing_DestroyRunGlyphs(OH_Drawing_Array* glyphs); @@ -177,12 +167,11 @@ void OH_Drawing_DestroyRunGlyphs(OH_Drawing_Array* glyphs); * @brief Gets the range glyph position array. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param run Indicates the pointer to an OH_Drawing_Run object. * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. - * @return Run of position array. + * @return Run of position array object OH_Drawing_Array. * @since 14 - * @version 1.0 */ OH_Drawing_Array* OH_Drawing_GetRunPositions(OH_Drawing_Run* run, int64_t start, int64_t length); @@ -190,21 +179,20 @@ OH_Drawing_Array* OH_Drawing_GetRunPositions(OH_Drawing_Run* run, int64_t start, * @brief Gets the glyph position by index. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Array The run of position array. + * @param positions The run of position array object OH_Drawing_Array. * @param index The run of glyph index. - * @return Run of glyph position pointer. + * @return Run of glyph position pointer to an OH_Drawing_Point object. * @since 14 * @version 1.0 */ -OH_Drawing_Point* OH_Drawing_GetRunPositionsElement(OH_Drawing_Array* positions, size_t index); +OH_Drawing_Point* OH_Drawing_GetRunPositionsByIndex(OH_Drawing_Array* positions, size_t index); /** * @brief Releases the memory run of position array. - * + * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param positions The run of position array. + * @param positions The run of position array object OH_Drawing_Array. * @since 14 - * @version 1.0 */ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); @@ -212,10 +200,9 @@ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); * @brief Gets the number of glyph. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Run Indicates the pointer to an OH_Drawing_Run object. + * @param run Indicates the pointer to an OH_Drawing_Run object. * @return The number of glyph. * @since 14 - * @version 1.0 */ uint32_t OH_Drawing_GetRunGlyphCount(OH_Drawing_Run* run); #ifdef __cplusplus diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 977062e81..28ffa8f5a 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -45,7 +45,6 @@ #include "drawing_color.h" #include "drawing_font.h" #include "drawing_text_declaration.h" -#include "drawing_text_font_descriptor.h" #include "drawing_types.h" #include "stdint.h" @@ -413,6 +412,35 @@ typedef struct OH_Drawing_FontConfigInfo { OH_Drawing_FontFallbackGroup* fallbackGroupSet; } OH_Drawing_FontConfigInfo; +/** + * @brief Describes the font information. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontDescriptor { + /** The file path of System font */ + char* path; + /** A name that uniquely identifies the font */ + char* postScriptName; + /** The name of System font */ + char* fullName; + /** The family of System font */ + char* fontFamily; + /** The subfont family of the system font */ + char* fontSubfamily; + /** The weight of System font */ + int weight; + /** The width of System font */ + int width; + /** Whether the system font is tilted */ + int italic; + /** Whether the system font is compact */ + bool monoSpace; + /** whether symbolic fonts are supported */ + bool symbolic; +} OH_Drawing_FontDescriptor; + /** * @brief The metrics of line. * @@ -2754,8 +2782,10 @@ void OH_Drawing_SetTextShadow(OH_Drawing_TextShadow* shadow, uint32_t color, OH_ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param OH_Drawing_TextAlign Indicates enumerates text tab alignment modes. TAB alignment, Support left alignment * right alignment center alignment, other enumeration values are left alignment effect. - * @param float Indicates location if text tab. - * @return Returns the pointer to the OH_Drawing_TextTab object created. + * @param float Indicates location of text tab. + * @return Returns the pointer to the OH_Drawing_TextTab object created. If the object returns NULL, + * the creation failed. The possible cause of the failure is that the application address space is used up. + * As a result, space cannot be allocated. * @since 14 * @version 1.0 */ @@ -2772,7 +2802,7 @@ OH_Drawing_TextTab* OH_Drawing_CreateTextTab(OH_Drawing_TextAlign alignment, flo void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab*); /** - * @brief Get align of an OH_Drawing_TextTab object. + * @brief Get alignment of an OH_Drawing_TextTab object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. @@ -2780,7 +2810,7 @@ void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab*); * @since 14 * @version 1.0 */ -OH_Drawing_TextAlign OH_Drawing_GetTextTabAlign(OH_Drawing_TextTab*); +OH_Drawing_TextAlign OH_Drawing_GetTextTabAlignment(OH_Drawing_TextTab*); /** * @brief Get location of an OH_Drawing_TextTab object. @@ -2795,9 +2825,9 @@ float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab*); /** * @brief Sets the text tab of OH_Drawing_TypographyStyle object. - * TAB alignment does not take effect when text alignment is also set. Or when the TAB's location property - * is less than or equal to 0. When the TAB is not set, it is the default space effect, and all tabs in the paragraph - * after the setting are aligned according to this tab effect. + * Tab alignment does not take effect when text alignment is also set, Or when the ellipsis style is configured. + * When the tab is not set or the tab's location property is less than or equal to 0, it is the default space effect. + * And all tabs in the paragraph after the setting are aligned according to this tab effect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 264d710ff..870a68817 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -936,7 +936,7 @@ }, { "first_introduced": "14", - "name": "OH_Drawing_GetSystemFontFullNamesElement" + "name": "OH_Drawing_GetSystemFontFullNameByIndex" }, { "first_introduced": "14", @@ -1548,7 +1548,7 @@ }, { "first_introduced": "14", - "name":"OH_Drawing_GetTextTabAlign" + "name":"OH_Drawing_GetTextTabAlignment" }, { "first_introduced": "14", @@ -1580,7 +1580,7 @@ }, { "first_introduced": "14", - "name":"OH_Drawing_GetTextLinesIndex" + "name":"OH_Drawing_GetTextLineByIndex" }, { "first_introduced": "14", @@ -1600,7 +1600,7 @@ }, { "first_introduced": "14", - "name":"OH_Drawing_GetRunsIndex" + "name":"OH_Drawing_GetRunByIndex" }, { "first_introduced": "14", @@ -1630,10 +1630,6 @@ "first_introduced": "14", "name":"OH_Drawing_TextLineGetOffsetForStringIndex" }, - { - "first_introduced": "14", - "name":"OH_Drawing_TextLineEnumerateCaretOffsets" - }, { "first_introduced": "14", "name":"OH_Drawing_TextLineGetAlignmentOffset" @@ -1644,7 +1640,7 @@ }, { "first_introduced": "14", - "name":"OH_Drawing_GetRunStringIndicesElement" + "name":"OH_Drawing_GetRunStringIndicesByIndex" }, { "first_introduced": "14", @@ -1676,7 +1672,7 @@ }, { "first_introduced": "14", - "name":"OH_Drawing_GetRunGlyphsElement" + "name":"OH_Drawing_GetRunGlyphsByIndex" }, { "first_introduced": "14", @@ -1688,7 +1684,7 @@ }, { "first_introduced": "14", - "name":"OH_Drawing_GetRunPositionsElement" + "name":"OH_Drawing_GetRunPositionsByIndex" }, { "first_introduced": "14", -- Gitee From c6bdb322b0541e8cbbc6a0a79787a8d5a35e8d86 Mon Sep 17 00:00:00 2001 From: changleipeng Date: Sun, 29 Sep 2024 11:24:11 +0800 Subject: [PATCH 010/630] fix callback interface Signed-off-by: changleipeng --- .../native_drawing/drawing_text_line.h | 25 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 +++ 2 files changed, 29 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_line.h b/graphic/graphic_2d/native_drawing/drawing_text_line.h index 196907ed5..760769b4b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_line.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_line.h @@ -228,6 +228,31 @@ int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, */ double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int32_t index); +/** + * @brief User-defined callback functions for using offsets and indexes. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param offset Character offset is traversed as an argument to the callback function. + * @param index Character index is traversed as an argument to the callback function. + * @param leadingEdge Whether the current offset is at the character front, as an argument to the callback function. + * @return The return value of the user-defined callback function. + * If false is returned, the traversal continues. + * If true is returned, the traversal stops. + * @since 14 + * @version 1.0 + */ +typedef bool (*Drawing_CaretOffsetsCallback)(double offset, int32_t index, bool leadingEdge); + +/** + * @brief Enumerate caret offset and index in text lines. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param line Indicates the pointer to an OH_Drawing_TextLine object. + * @param callback User-defined callback functions, see Drawing_CaretOffsetsCallback. + * @since 14 + */ +void OH_Drawing_TextLineEnumerateCaretOffsets(OH_Drawing_TextLine* line, Drawing_CaretOffsetsCallback callback); + /** * @brief Gets the text offset based on the given alignment factor and alignment width. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 3f0f7905b..353ce3f53 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1654,6 +1654,10 @@ "first_introduced": "14", "name":"OH_Drawing_TextLineGetOffsetForStringIndex" }, + { + "first_introduced": "14", + "name": "OH_Drawing_TextLineEnumerateCaretOffsets" + }, { "first_introduced": "14", "name":"OH_Drawing_TextLineGetAlignmentOffset" -- Gitee From 062297e7bbe4d7f066fb785fbb9121eaca1e3c05 Mon Sep 17 00:00:00 2001 From: wangsen1994 Date: Sun, 29 Sep 2024 19:31:10 +0800 Subject: [PATCH 011/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=BA13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangsen1994 --- NotificationKit/BUILD.gn | 2 +- NotificationKit/libohnotification.ndk.json | 2 +- NotificationKit/notification.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NotificationKit/BUILD.gn b/NotificationKit/BUILD.gn index 1e12b6983..eff7eea6e 100644 --- a/NotificationKit/BUILD.gn +++ b/NotificationKit/BUILD.gn @@ -22,7 +22,7 @@ ohos_ndk_library("libnotification_ndk") { output_name = "ohnotification" output_extension = "so" ndk_description_file = "./libohnotification.ndk.json" - min_compact_version = "14" + min_compact_version = "13" system_capability = "SystemCapability.Notification.Notification" system_capability_headers = [ "NotificationKit/notification.h" ] } diff --git a/NotificationKit/libohnotification.ndk.json b/NotificationKit/libohnotification.ndk.json index 4a929d5ce..24b56b30a 100644 --- a/NotificationKit/libohnotification.ndk.json +++ b/NotificationKit/libohnotification.ndk.json @@ -1,6 +1,6 @@ [ { - "first_introduced": "14", + "first_introduced": "13", "name": "OH_Notification_IsNotificationEnabled" } ] diff --git a/NotificationKit/notification.h b/NotificationKit/notification.h index 236608ca5..d7a31be18 100644 --- a/NotificationKit/notification.h +++ b/NotificationKit/notification.h @@ -19,7 +19,7 @@ * * @brief Provides the definition of the C interface for the notification service. * - * @since 14 + * @since 13 */ /** * @file notification.h @@ -29,7 +29,7 @@ * @library libohnotification.so * @kit NotificationKit * @syscap SystemCapability.Notification.Notification - * @since 14 + * @since 13 */ #ifndef OH_NOTIFICATION_H @@ -47,7 +47,7 @@ extern "C" { * * @return true - This application is allowed to publish notifications. * false - This application is not allowed to publish notifications. - * @since 14 + * @since 13 */ bool OH_Notification_IsNotificationEnabled(void); -- Gitee From bae22027088154b904bab3ff475fb5e09314f1b8 Mon Sep 17 00:00:00 2001 From: zoulinken Date: Wed, 25 Sep 2024 14:28:37 +0800 Subject: [PATCH 012/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=8F=82?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=8C=E4=BF=9D=E6=8C=81=E5=A4=9A=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/libace.ndk.json | 4 ++-- arkui/ace_engine/native/native_node.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 3da27da07..9bc15b03c 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1296,11 +1296,11 @@ "name": "OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen" }, { - "first_introduced": "14", + "first_introduced": "13", "name": "OH_ArkUI_NodeUtils_AddCustomProperty" }, { - "first_introduced": "14", + "first_introduced": "13", "name": "OH_ArkUI_NodeUtils_RemoveCustomProperty" }, { diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a8ff1e5dd..68f16504a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7684,20 +7684,20 @@ int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen(ArkUI_NodeHandle nod * @brief Add the custom property of the component. * * @param node ArkUI_NodeHandle pointer. - * @param key The key of the custom property. - * @param key The value of the custom property. - * @since 14 + * @param name The name of the custom property. + * @param value The value of the custom property. + * @since 13 */ -void OH_ArkUI_NodeUtils_AddCustomProperty(ArkUI_NodeHandle node, const char* key, const char* value); +void OH_ArkUI_NodeUtils_AddCustomProperty(ArkUI_NodeHandle node, const char* name, const char* value); /** * @brief Remove the custom property of the component. * * @param node ArkUI_NodeHandle pointer. - * @param key The key of the custom property. - * @since 14 + * @param name The name of the custom property. + * @since 13 */ -void OH_ArkUI_NodeUtils_RemoveCustomProperty(ArkUI_NodeHandle node, const char* key); +void OH_ArkUI_NodeUtils_RemoveCustomProperty(ArkUI_NodeHandle node, const char* name); /** * @brief Collapse the ListItem in its expanded state. -- Gitee From 93fc1e3f5592341ed87b6b77f8b1516c00abaca2 Mon Sep 17 00:00:00 2001 From: gxjhl Date: Sat, 5 Oct 2024 16:56:27 +0800 Subject: [PATCH 013/630] =?UTF-8?q?=E5=90=8C=E4=B8=80=E4=B8=AA=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=A3=B0=E6=98=8E=E4=BA=86=E4=B8=A4=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gxjhl Change-Id: If7059b9ca7005d206ebd3032b038d7e1e2ceb4f6 --- arkui/ace_engine/native/native_type.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 18f2e18b6..7285cded2 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2502,16 +2502,6 @@ void OH_ArkUI_WaterFlowSectionOption_SetMargin(ArkUI_WaterFlowSectionOption* opt */ ArkUI_Margin OH_ArkUI_WaterFlowSectionOption_GetMargin(ArkUI_WaterFlowSectionOption* option, int32_t index); -/** -* @brief Obtains the number of items in the water flow section that matches the specified index. -* -* @param option Indicates the pointer to a water flow section configuration. -* @param index Indicates the index of the target water flow section. -* @return Returns the number of items in the water flow section. -* @since 12 -*/ -int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index); - /** * @brief Creates a navigation indicator. * -- Gitee From d3dd74711ddccf2b9952f18b79961f915102a0cf Mon Sep 17 00:00:00 2001 From: hongzexuan Date: Fri, 27 Sep 2024 13:53:20 +0800 Subject: [PATCH 014/630] scroll capi supports fling Signed-off-by: hongzexuan Change-Id: I943e83f0a0865935522320952008d4d21aa2013a --- arkui/ace_engine/native/native_node.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a8ff1e5dd..d8fb1258a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4483,6 +4483,18 @@ typedef enum { */ NODE_SCROLL_BY, + /** + * @brief Performs inertial scrolling based on the initial velocity passed in. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: Initial velocity of inertial scrolling. Unit: vp/s. If the value specified is 0, it is + * considered as invalid, and the scrolling for this instance will not take effect. If the value is positive, + * the scroll will move downward; if the value is negative, the scroll will move upward. \n + * + * @since 13 + */ + NODE_SCROLL_FLING, + /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and * obtained as required through APIs. -- Gitee From a19e618834c9ac62ed3f3292cd3741af08e808d2 Mon Sep 17 00:00:00 2001 From: zhjs Date: Tue, 8 Oct 2024 16:53:36 +0800 Subject: [PATCH 015/630] add variable quality level Signed-off-by: zhjs --- .../image_processing/libimage_processing.ndk.json | 5 +++++ .../video_processing/libvideo_processing.ndk.json | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/multimedia/video_processing_engine/image_processing/libimage_processing.ndk.json b/multimedia/video_processing_engine/image_processing/libimage_processing.ndk.json index 13425858f..918e744ee 100644 --- a/multimedia/video_processing_engine/image_processing/libimage_processing.ndk.json +++ b/multimedia/video_processing_engine/image_processing/libimage_processing.ndk.json @@ -83,5 +83,10 @@ "first_introduced": "13", "name": "IMAGE_PROCESSING_TYPE_DETAIL_ENHANCER", "type": "variable" + }, + { + "first_introduced": "13", + "name": "IMAGE_DETAIL_ENHANCER_PARAMETER_KEY_QUALITY_LEVEL", + "type": "variable" } ] diff --git a/multimedia/video_processing_engine/video_processing/libvideo_processing.ndk.json b/multimedia/video_processing_engine/video_processing/libvideo_processing.ndk.json index dd2fe35ab..19fc6e2cc 100644 --- a/multimedia/video_processing_engine/video_processing/libvideo_processing.ndk.json +++ b/multimedia/video_processing_engine/video_processing/libvideo_processing.ndk.json @@ -89,5 +89,10 @@ "first_introduced": "12", "name": "VIDEO_PROCESSING_TYPE_DETAIL_ENHANCER", "type": "variable" + }, + { + "first_introduced": "12", + "name": "VIDEO_DETAIL_ENHANCER_PARAMETER_KEY_QUALITY_LEVEL", + "type": "variable" } ] -- Gitee From 2089f4d326014424ad98e91ddc46e7fbd2dc0b65 Mon Sep 17 00:00:00 2001 From: lihui Date: Wed, 9 Oct 2024 12:17:12 +0800 Subject: [PATCH 016/630] pts api since api 14 fix Signed-off-by: lihui --- graphic/graphic_2d/native_window/external_window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 23d98d207..f2b57576e 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -264,7 +264,7 @@ typedef enum NativeWindowOperation { * the desiredPresentTimestamp will be ignored.\n * Variable parameter in function is * [in] int64_t desiredPresentTimestamp. - * @since 13 + * @since 14 */ SET_DESIRED_PRESENT_TIMESTAMP = 24, } NativeWindowOperation; -- Gitee From a9234c9c306e3d678713485eb5e96ea42accdaff Mon Sep 17 00:00:00 2001 From: zoulinken Date: Wed, 9 Oct 2024 16:53:56 +0800 Subject: [PATCH 017/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=B1=9E=E6=80=A7=E7=9A=84=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/native_node.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 4ba7d5ff2..859a52e31 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7693,11 +7693,11 @@ int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow(ArkUI_NodeHandle nod int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset); /** - * @brief Add the custom property of the component. + * @brief Add the custom property of the component. This interface only works on the main thread. * * @param node ArkUI_NodeHandle pointer. - * @param name The name of the custom property. - * @param value The value of the custom property. + * @param name The name of the custom property. Passing null pointers is not allowed. + * @param value The value of the custom property. Passing null pointers is not allowed. * @since 13 */ void OH_ArkUI_NodeUtils_AddCustomProperty(ArkUI_NodeHandle node, const char* name, const char* value); -- Gitee From 79017ed65cac0c4835c8a79aaa5d5bc30e2ebb51 Mon Sep 17 00:00:00 2001 From: wangsen1994 Date: Fri, 11 Oct 2024 16:37:09 +0800 Subject: [PATCH 018/630] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dces=20C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E6=8E=A5=E5=8F=A3=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangsen1994 --- BasicServicesKit/commonevent/oh_commonevent.h | 4 ++-- BasicServicesKit/commonevent/oh_commonevent_support.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BasicServicesKit/commonevent/oh_commonevent.h b/BasicServicesKit/commonevent/oh_commonevent.h index 695328b66..44c679926 100644 --- a/BasicServicesKit/commonevent/oh_commonevent.h +++ b/BasicServicesKit/commonevent/oh_commonevent.h @@ -121,7 +121,7 @@ CommonEvent_SubscribeInfo* OH_CommonEvent_CreateSubscribeInfo(const char* events * @brief Set the subscribe information of permission. * * @param info Indicates the subscribed events. - * @param permission Indicates the subscribed events of number. + * @param permission Indicates the subscribed events of permission. * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. @@ -133,7 +133,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetPublisherPermission(CommonEvent_SubscribeI * @brief Set the subscribe information of bundleName. * * @param info Indicates the subscribed events. - * @param bundleName Indicates the subscribed events of number. + * @param bundleName Indicates the subscribed events of bundleName. * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. diff --git a/BasicServicesKit/commonevent/oh_commonevent_support.h b/BasicServicesKit/commonevent/oh_commonevent_support.h index 67f77687b..6d1256b95 100644 --- a/BasicServicesKit/commonevent/oh_commonevent_support.h +++ b/BasicServicesKit/commonevent/oh_commonevent_support.h @@ -57,7 +57,7 @@ static const char* const COMMON_EVENT_SHUTDOWN = "usual.event.SHUTDOWN"; static const char* const COMMON_EVENT_BATTERY_CHANGED = "usual.event.BATTERY_CHANGED"; /** - * @brief This commonEvent means when the device in low battery state.. + * @brief This commonEvent means when the device in low battery state. * * @since 12 */ @@ -141,7 +141,7 @@ static const char* const COMMON_EVENT_PACKAGE_ADDED = "usual.event.PACKAGE_ADDED static const char* const COMMON_EVENT_PACKAGE_REMOVED = "usual.event.PACKAGE_REMOVED"; /** - * @brief This commonEvent means when an existing application package is removed from the device. + * @brief This commonEvent means when an installed application's add-on package is removed from the device. * * @since 12 */ -- Gitee From 48f43a225ca28d2a5a0c1a695bd03cbcfaef5d59 Mon Sep 17 00:00:00 2001 From: lxlxlxl Date: Fri, 11 Oct 2024 08:38:22 +0000 Subject: [PATCH 019/630] modify Close interface description Signed-off-by: lxlxlxl --- distributeddatamgr/preferences/include/oh_preferences.h | 1 - 1 file changed, 1 deletion(-) diff --git a/distributeddatamgr/preferences/include/oh_preferences.h b/distributeddatamgr/preferences/include/oh_preferences.h index c3a56fd95..944fa9dff 100644 --- a/distributeddatamgr/preferences/include/oh_preferences.h +++ b/distributeddatamgr/preferences/include/oh_preferences.h @@ -89,7 +89,6 @@ OH_Preferences *OH_Preferences_Open(OH_PreferencesOption *option, int *errCode); * @brief Closes a Preferences object. * * @param preference Pointer to the {@Link OH_Preferences} instance to close. - * @param option Pointer to an {@Link OH_PreferencesOption} instance. * @return Returns the status code of the execution. For details, see {@Link OH_Preferences_ErrCode}. * {@link PREFERENCES_OK} indicates the operation is successful. * {@link PREFERENCES_ERROR_INVALID_PARAM} indicates invalid args are passed in. -- Gitee From 2568a93b4bdb1e79575e15a57f236667169b7dfb Mon Sep 17 00:00:00 2001 From: changleipeng Date: Mon, 14 Oct 2024 14:31:38 +0800 Subject: [PATCH 020/630] Correct spelling errors Signed-off-by: changleipeng --- graphic/graphic_2d/native_drawing/drawing_rect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h index 6ea9ca992..d247e88f7 100644 --- a/graphic/graphic_2d/native_drawing/drawing_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_rect.h @@ -251,7 +251,7 @@ OH_Drawing_ErrorCode OH_Drawing_RectGetArraySize(OH_Drawing_Array* rectArray, si * @param rect Pointers to Pointer of OH_Drawing_Rect object, returned to the caller. * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. - * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or pprect is nullptr, + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or rect is nullptr, * or index is valid. * @since 14 * @version 1.0 -- Gitee From c5c943d9bcadb1fcb4fe853da7d6be495854edf3 Mon Sep 17 00:00:00 2001 From: zhangchao Date: Sat, 12 Oct 2024 14:56:16 +0800 Subject: [PATCH 021/630] auto switch device NDK API Signed-off-by: zhangchao --- multimedia/camera_framework/camera.h | 18 ++++++ multimedia/camera_framework/camera.ndk.json | 16 +++++ multimedia/camera_framework/capture_session.h | 59 +++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 50e6f143b..51682d06e 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -973,6 +973,24 @@ typedef struct Camera_FrameShutterEndInfo { int32_t captureId; } Camera_FrameShutterEndInfo; +/** + * @brief Auto device switch status info. + * + * @since 13 + * @version 1.0 + */ +typedef struct Camera_AutoDeviceSwitchStatusInfo { + /** + * is device switched. + */ + bool isDeviceSwitched; + + /** + * is device capability changed. + */ + bool isDeviceCapabilityChanged; +} Camera_AutoDeviceSwitchStatusInfo; + /** * @brief Creates a CameraManager instance. * diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index e5faf336c..a49b65320 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -602,5 +602,21 @@ { "first_introduced": "12", "name": "OH_PhotoNative_Release" + }, + { + "first_introduced": "13", + "name": "OH_CaptureSession_RegisterAutoDeviceSwitchStatusCallback" + }, + { + "first_introduced": "13", + "name": "OH_CaptureSession_UnregisterAutoDeviceSwitchStatusCallback" + }, + { + "first_introduced": "13", + "name": "OH_CaptureSession_IsAutoSwitchDeviceSupported" + }, + { + "first_introduced": "13", + "name": "OH_CaptureSession_EnableAutoSwitchDevice" } ] diff --git a/multimedia/camera_framework/capture_session.h b/multimedia/camera_framework/capture_session.h index 5f19ac724..54786c5d9 100644 --- a/multimedia/camera_framework/capture_session.h +++ b/multimedia/camera_framework/capture_session.h @@ -94,6 +94,16 @@ typedef void (*OH_CaptureSession_OnError)(Camera_CaptureSession* session, Camera typedef void (*OH_CaptureSession_OnSmoothZoomInfo)(Camera_CaptureSession* session, Camera_SmoothZoomInfo* smoothZoomInfo); +/** + * @brief Capture session device switch status callback. + * + * @param session the {@link Camera_CaptureSession} which deliver the callback. + * @param autoDeviceSwitchStatusInfo the {@link Camera_AutoDeviceSwitchStatusInfo} which delivered by the callback. + * @since 13 + */ +typedef void (*OH_CaptureSession_OnAutoDeviceSwitchStatusChange)(Camera_CaptureSession* session, + Camera_AutoDeviceSwitchStatusInfo* autoDeviceSwitchStatusInfo); + /** * @brief A listener for capture session. * @@ -857,6 +867,55 @@ Camera_ErrorCode OH_CaptureSession_GetActiveColorSpace(Camera_CaptureSession* se Camera_ErrorCode OH_CaptureSession_SetActiveColorSpace(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace colorSpace); +/** + * @brief Register device switch event callback. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param autoDeviceSwitchStatusChange the {@link OH_CaptureSession_OnAutoDeviceSwitchStatusChange} to be registered. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 13 + */ +Camera_ErrorCode OH_CaptureSession_RegisterAutoDeviceSwitchStatusCallback(Camera_CaptureSession* session, + OH_CaptureSession_OnAutoDeviceSwitchStatusChange autoDeviceSwitchStatusChange); + +/** + * @brief Unregister device switch event callback. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param autoDeviceSwitchStatusChange the {@link OH_CaptureSession_OnAutoDeviceSwitchStatusChange} to be unregistered. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 13 + */ +Camera_ErrorCode OH_CaptureSession_UnregisterAutoDeviceSwitchStatusCallback(Camera_CaptureSession* session, + OH_CaptureSession_OnAutoDeviceSwitchStatusChange autoDeviceSwitchStatusChange); + +/** + * @brief Check whether auto device switch is supported. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param isSupported the result of whether auto device switch supported. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config. + * @since 13 + */ +Camera_ErrorCode OH_CaptureSession_IsAutoDeviceSwitchSupported(Camera_CaptureSession* session, bool* isSupported); + +/** + * @brief Enable auto switch or not for the camera device. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param enabled the flag of enable auto switch or not. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 13 + */ +Camera_ErrorCode OH_CaptureSession_EnableAutoDeviceSwitch(Camera_CaptureSession* session, bool enabled); + #ifdef __cplusplus } #endif -- Gitee From 61fea1df608ab0864e661a8eff169bb1d093cd86 Mon Sep 17 00:00:00 2001 From: zyx0121 Date: Sun, 29 Sep 2024 17:03:07 +0800 Subject: [PATCH 022/630] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E4=B8=8Ehtml=E7=9A=84=E5=BA=8F=E5=88=97=E5=8C=96?= =?UTF-8?q?=E5=92=8C=E5=8F=8D=E5=BA=8F=E5=88=97=E5=8C=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zyx0121 --- arkui/ace_engine/native/libace.ndk.json | 12 ++++++++++++ arkui/ace_engine/native/native_type.h | 12 ++++++++++++ arkui/ace_engine/native/styled_string.h | 26 +++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 3da27da07..581097c0f 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2362,5 +2362,17 @@ { "first_introduced": "13", "name": "OH_ArkUI_AccessibilityElementInfoSetElementId" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_StyledString_Descriptor_Create" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_StyledString_Descriptor_Destroy" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_ConvertToHtml" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 18f2e18b6..47d73301f 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -136,6 +136,13 @@ typedef struct ArkUI_Context* ArkUI_ContextHandle; */ typedef struct ArkUI_SwiperIndicator ArkUI_SwiperIndicator; +/** +* @brief Define the data objects of styled string supported by text components. +* +* @since 14 +*/ +typedef struct ArkUI_StyledString_Descriptor ArkUI_StyledString_Descriptor; + /** * @brief specifies the alignment rules for subcomponents set in relative containers. * @@ -1911,6 +1918,11 @@ typedef enum { ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER = 180001, /** The buffer is not large enough. */ ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH = 180002, + /** + * @error invalid styled string. + * @since 14 + */ + ARKUI_ERROR_CODE_INVALID_STYLED_STRING = 180101, } ArkUI_ErrorCode; /** diff --git a/arkui/ace_engine/native/styled_string.h b/arkui/ace_engine/native/styled_string.h index cb537a6c6..5d0c816b8 100644 --- a/arkui/ace_engine/native/styled_string.h +++ b/arkui/ace_engine/native/styled_string.h @@ -39,6 +39,7 @@ #include "native_drawing/drawing_text_declaration.h" #include "native_drawing/drawing_text_typography.h" +#include "native_type.h" #ifdef __cplusplus extern "C" { @@ -118,6 +119,31 @@ OH_Drawing_Typography* OH_ArkUI_StyledString_CreateTypography(ArkUI_StyledString */ void OH_ArkUI_StyledString_AddPlaceholder(ArkUI_StyledString* handle, OH_Drawing_PlaceholderSpan* placeholder); +/** + * @brief Create a ArkUI_StyledString_Descriptor object. + * + * @return Pointer to the ArkUI_StyledString_Descriptor object.。 + * @since 14 + */ +ArkUI_StyledString_Descriptor* OH_ArkUI_StyledString_Descriptor_Create(); + +/** + * @brief Release the memory occupied by the ArkUI_StyledString_Descriptor object. + * + * @param str Pointer to the ArkUI_StyledString_Descriptor object. + * @since 14 + */ +void OH_ArkUI_StyledString_Descriptor_Destroy(ArkUI_StyledString_Descriptor* str); + +/** + * @brief Convert the styled string into html. + * + * @param str Pointer to the ArkUI_StyledString_Descriptor object. + * @return The converted html. + * @since 14 + */ +const char* OH_ArkUI_ConvertToHtml(ArkUI_StyledString_Descriptor* str); + #ifdef __cplusplus }; #endif -- Gitee From 9b01924673366ae3e64e32087edec32e85ae6c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E9=BE=99?= Date: Tue, 15 Oct 2024 10:08:27 +0800 Subject: [PATCH 023/630] bugfix:library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李文龙 --- LocationKit/oh_location.h | 2 +- LocationKit/oh_location_type.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LocationKit/oh_location.h b/LocationKit/oh_location.h index b4d3bbc5c..62eac6710 100644 --- a/LocationKit/oh_location.h +++ b/LocationKit/oh_location.h @@ -24,7 +24,7 @@ * @file oh_location.h * @kit LocationKit * @brief Define interfaces for querying location switch status, starting locating, and stopping locating. - * @library libohlocation.so + * @library liblocation_ndk.so * @syscap SystemCapability.Location.Location.Core * @since 13 */ diff --git a/LocationKit/oh_location_type.h b/LocationKit/oh_location_type.h index 235c436ff..729a61051 100644 --- a/LocationKit/oh_location_type.h +++ b/LocationKit/oh_location_type.h @@ -26,7 +26,7 @@ * @file oh_location_type.h * @kit LocationKit * @brief Declares the common location attributes. - * @library libohlocation.so + * @library liblocation_ndk.so * @syscap SystemCapability.Location.Location.Core * @since 13 */ -- Gitee From b7a702d01fa194773f49955085cd47d645dd9092 Mon Sep 17 00:00:00 2001 From: zyx0121 Date: Wed, 16 Oct 2024 09:22:03 +0800 Subject: [PATCH 024/630] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E5=BA=8F=E5=88=97=E5=8C=96=E5=92=8C=E5=8F=8D=E5=BA=8F?= =?UTF-8?q?=E5=88=97=E5=8C=96CAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zyx0121 --- arkui/ace_engine/native/libace.ndk.json | 8 +++++++ arkui/ace_engine/native/styled_string.h | 30 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index dbae1db8b..48c1d3a84 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2374,5 +2374,13 @@ { "first_introduced": "14", "name": "OH_ArkUI_ConvertToHtml" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_MarshallStyledStringDescriptor" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_UnmarshallStyledStringDescriptor" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/styled_string.h b/arkui/ace_engine/native/styled_string.h index 5d0c816b8..49b4d39d3 100644 --- a/arkui/ace_engine/native/styled_string.h +++ b/arkui/ace_engine/native/styled_string.h @@ -144,6 +144,36 @@ void OH_ArkUI_StyledString_Descriptor_Destroy(ArkUI_StyledString_Descriptor* str */ const char* OH_ArkUI_ConvertToHtml(ArkUI_StyledString_Descriptor* str); +/** + * @brief Deserializes a byte array containing styled string information into a styled string. + * + * @param buffer Byte array to be deserialized. + * @param bufferSize Length of the byte array. + * @param descriptor Pointer to an ArkUI_StyledString_Descriptor object. + * @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. + * @since 14 + */ +int32_t OH_ArkUI_UnmarshallStyledStringDescriptor( + uint8_t* buffer, size_t bufferSize, ArkUI_StyledString_Descriptor* descriptor); + +/** + * @brief Serializes the styled string information into a byte array. + * + * @param buffer Byte array where the serialized data will be stored. + * @param bufferSize Length of the byte array. + * @param descriptor Pointer to an ArkUI_StyledString_Descriptor object. + * @param resultSize Actual length of the byte array. + * @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. + * Returns {@link ARKUI_ERROR_CODE_INVALID_STYLED_STRING} if the styled string is invalid. + * @since 14 + */ +int32_t OH_ArkUI_MarshallStyledStringDescriptor( + uint8_t* buffer, size_t bufferSize, ArkUI_StyledString_Descriptor* descriptor, size_t* resultSize); + #ifdef __cplusplus }; #endif -- Gitee From 8f4cccf446d0d8115a8429cae577fac4ad69d132 Mon Sep 17 00:00:00 2001 From: xukuncai123 <401117262@qq.com> Date: Thu, 17 Oct 2024 10:24:16 +0800 Subject: [PATCH 025/630] move ndk_targets.gni to sdk_c Signed-off-by: xukuncai123 <401117262@qq.com> --- ndk_targets.gni | 330 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 ndk_targets.gni diff --git a/ndk_targets.gni b/ndk_targets.gni new file mode 100644 index 000000000..a97312222 --- /dev/null +++ b/ndk_targets.gni @@ -0,0 +1,330 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos_var.gni") + +# ndk library, ndk header configuration +_ndk_library_targets = [ + "//interface/sdk_c/sensors/miscdevice/vibrator:lib_vibrator_ndk", + "//interface/sdk_c/sensors/miscdevice/vibrator:ndk_vibrator_header", + "//interface/sdk_c/third_party/zlib:libz_ndk", + "//interface/sdk_c/third_party/zlib:zlib_header", + "//interface/sdk_c/global/resource_management:librawfile_ndk", + "//interface/sdk_c/global/resource_management:rawfile_header", + "//interface/sdk_c/global/resource_management:native_resmgr_ndk", + "//interface/sdk_c/global/resource_management:native_resmgr_header", + "//interface/sdk_c/hiviewdfx/hiappevent:libhiappevent_header", + "//interface/sdk_c/hiviewdfx/hiappevent:libhiappevent_ndk", + "//interface/sdk_c/hiviewdfx/hidebug:libohhidebug", + "//interface/sdk_c/hiviewdfx/hidebug:oh_hidebug_header", + "//interface/sdk_c/hiviewdfx/hicollie:libohhicollie", + "//interface/sdk_c/hiviewdfx/hicollie:oh_hicollie_header", + "//interface/sdk_c/hiviewdfx/hilog:hilog_header", + "//interface/sdk_c/hiviewdfx/hilog:libhilog_ndk", + "//interface/sdk_c/hiviewdfx/hitrace:hitrace_header", + "//interface/sdk_c/hiviewdfx/hitrace:libhitrace_ndk", + "//interface/sdk_c/network/netstack/net_websocket:libnet_websocket", + "//interface/sdk_c/network/netstack/net_websocket:websocket_header", + "//interface/sdk_c/network/netssl:libnet_ssl_ndk", + "//interface/sdk_c/network/netssl:net_ssl_header", + "//interface/sdk_c/security/access_token:libability_access_control", + "//interface/sdk_c/security/access_token:accesstoken_header", + "//interface/sdk_c/security/huks:libhuks_ndk", + "//interface/sdk_c/security/huks:huks_header", + "//interface/sdk_c/security/asset:libasset_ndk", + "//interface/sdk_c/security/asset:asset_header", + "//interface/sdk_c/startup/init/syscap:libdeviceinfo_ndk", + "//interface/sdk_c/startup/init/syscap:deviceinfo_header", + "//interface/sdk_c/third_party/mindspore/kits:mindspore_header", + "//interface/sdk_c/third_party/mindspore/kits:mindspore_lib", + "//interface/sdk_c/web/webview/interfaces/native:web_header", + "//interface/sdk_c/web/webview/interfaces/native:libohweb", + "//interface/sdk_c/BasicServicesKit:libos_account_ndk", + "//interface/sdk_c/BasicServicesKit:os_account_ndk_header", + "//interface/sdk_c/ability/ability_runtime/child_process:child_process_header", + "//interface/sdk_c/ability/ability_runtime/child_process:libchild_process", + "//interface/sdk_c/AbilityKit/ability_runtime:ability_runtime_ndk_header", + "//interface/sdk_c/AbilityKit/ability_runtime:libability_runtime", + "//interface/sdk_c/arkui/ace_engine/native:ace_header", + "//interface/sdk_c/arkui/ace_engine/native:arkui_header", + "//interface/sdk_c/arkui/ace_engine/native:libace_ndk", + "//interface/sdk_c/arkui/napi:libnapi_ndk", + "//interface/sdk_c/arkui/napi:napi_header", + "//interface/sdk_c/arkui/window_manager:window_manager_header", + "//interface/sdk_c/arkui/window_manager:native_window_manager", + "//interface/sdk_c/arkui/display_manager:display_manager_header", + "//interface/sdk_c/arkui/display_manager:native_display_manager", + "//interface/sdk_c/ark_runtime/jsvm:libjsvm_ndk", + "//interface/sdk_c/ark_runtime/jsvm:jsvm_header", + "//interface/sdk_c/bundlemanager/bundle_framework/bundle:bundle_header", + "//interface/sdk_c/bundlemanager/bundle_framework/bundle:libbundle_ndk", + "//interface/sdk_c/third_party/node:node_header", + "//interface/sdk_c/graphic/graphic_2d/EGL:libEGL_ndk", + "//interface/sdk_c/graphic/graphic_2d/EGL:EGL_header", + "//interface/sdk_c/graphic/graphic_2d/GLES2:libGLESv2_ndk", + "//interface/sdk_c/graphic/graphic_2d/GLES2:GLES2_header", + "//interface/sdk_c/graphic/graphic_2d/GLES3:libGLESv3_ndk", + "//interface/sdk_c/graphic/graphic_2d/GLES3:GLES3_header", + "//interface/sdk_c/graphic/graphic_2d/KHR:KHR_header", + "//interface/sdk_c/graphic/graphic_2d/native_window:libnative_window_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_window:native_window_header", + "//interface/sdk_c/graphic/graphic_2d/native_buffer:libnative_buffer_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_buffer:native_buffer_header", + "//interface/sdk_c/graphic/graphic_2d/native_image:libnative_image_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_image:native_image_header", + "//interface/sdk_c/graphic/graphic_2d/native_vsync:libnative_vsync_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_vsync:native_vsync_header", + "//interface/sdk_c/graphic/graphic_2d/native_color_space_manager:libnative_color_space_manager_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_color_space_manager:native_color_space_manager_header", + "//interface/sdk_c/graphic/graphic_2d/native_drawing:libnative_drawing_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_drawing:native_drawing_header", + "//interface/sdk_c/graphic/graphic_2d/native_effect:libnative_effect_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_effect:native_effect_header", + "//interface/sdk_c/IPCKit:libipc_capi", + "//interface/sdk_c/IPCKit:ipc_capi_header", + "//interface/sdk_c/LocationKit:liblocation_ndk", + "//interface/sdk_c/LocationKit:location_ndk_header", + "//interface/sdk_c/NotificationKit:libnotification_ndk", + "//interface/sdk_c/NotificationKit:ohnotification_header", + "//interface/sdk_c/ConnectivityKit/bluetooth:libbluetooth_ndk", + "//interface/sdk_c/ConnectivityKit/bluetooth:bluetooth_ndk_header", + "//interface/sdk_c/third_party/libuv:libuv_ndk", + "//interface/sdk_c/third_party/libuv:libuv_header", + "//interface/sdk_c/third_party/libuv:libuv_uv_header", + "//interface/sdk_c/third_party/icu4c:libicu_ndk", + "//interface/sdk_c/third_party/icu4c:icu_unicode_header", + "//interface/sdk_c/multimedia/av_codec/audio_decoder:libnative_media_adec", + "//interface/sdk_c/multimedia/av_codec/audio_decoder:native_media_adec_header", + "//interface/sdk_c/multimedia/av_codec/audio_encoder:libnative_media_aenc", + "//interface/sdk_c/multimedia/av_codec/audio_encoder:native_media_aenc_header", + "//interface/sdk_c/multimedia/av_codec/audio_codec:libnative_media_acodec", + "//interface/sdk_c/multimedia/av_codec/audio_codec:native_media_acodec_header", + "//interface/sdk_c/multimedia/av_codec/video_decoder:libnative_media_vdec", + "//interface/sdk_c/multimedia/av_codec/video_decoder:native_media_vdec_header", + "//interface/sdk_c/multimedia/av_codec/video_encoder:libnative_media_venc", + "//interface/sdk_c/multimedia/av_codec/video_encoder:native_media_venc_header", + "//interface/sdk_c/multimedia/av_codec/codec_base:libnative_media_codecbase", + "//interface/sdk_c/multimedia/av_codec/codec_base:native_media_codecbase_header", + "//interface/sdk_c/multimedia/av_codec/avmuxer:libnative_media_avmuxer", + "//interface/sdk_c/multimedia/av_codec/avmuxer:native_media_avmuxer_header", + "//interface/sdk_c/multimedia/av_codec/avdemuxer:libnative_media_avdemuxer", + "//interface/sdk_c/multimedia/av_codec/avdemuxer:native_media_avdemuxer_header", + "//interface/sdk_c/multimedia/av_codec/avsource:libnative_media_avsource", + "//interface/sdk_c/multimedia/av_codec/avsource:native_media_avsource_header", + "//interface/sdk_c/multimedia/av_codec/avcencinfo:libnative_media_avcencinfo", + "//interface/sdk_c/multimedia/av_codec/avcencinfo:native_media_avcencinfo_header", + "//interface/sdk_c/multimedia/drm_framework:libnative_drm", + "//interface/sdk_c/multimedia/drm_framework:native_drm_header", + "//interface/sdk_c/multimedia/media_foundation/core:native_media_core_header", + "//interface/sdk_c/multimedia/media_foundation/core:native_media_core_common_header", + "//interface/sdk_c/multimedia/media_foundation/core:libnative_media_core", + "//interface/sdk_c/multimedia/media_library/media_asset_manager:libmedia_asset_manager", + "//interface/sdk_c/multimedia/media_library/media_asset_manager:media_asset_manager_header", + "//interface/sdk_c/multimedia/player_framework/avscreen_capture:libnative_avscreen_capture", + "//interface/sdk_c/multimedia/player_framework/avscreen_capture:native_avscreen_capture_header", + "//interface/sdk_c/multimedia/player_framework/avplayer:libavplayer", + "//interface/sdk_c/multimedia/player_framework/avplayer:avplayer_header", + "//interface/sdk_c/multimedia/audio_framework:libohaudio_ndk", + "//interface/sdk_c/multimedia/audio_framework:ohaudio_header", + "//interface/sdk_c/multimedia/av_session:libohavsession_ndk", + "//interface/sdk_c/multimedia/av_session:ohavsession_header", + "//interface/sdk_c/multimedia/camera_framework:libohcamera", + "//interface/sdk_c/multimedia/camera_framework:camera_ndk_header", + "//interface/sdk_c/multimedia/image_framework:libpixelmap_ndk", + "//interface/sdk_c/multimedia/image_framework:libpixelmap", + "//interface/sdk_c/multimedia/image_framework:libpixelmap_header", + "//interface/sdk_c/multimedia/image_framework:image_header", + "//interface/sdk_c/multimedia/image_framework:libimage_ndk", + "//interface/sdk_c/multimedia/image_framework:image_ndk_header", + "//interface/sdk_c/multimedia/image_framework:libimage_receiver_ndk", + "//interface/sdk_c/multimedia/image_framework:image_receiver_ndk_header", + "//interface/sdk_c/multimedia/image_framework:libimage_source_ndk", + "//interface/sdk_c/multimedia/image_framework:image_source_ndk_header", + "//interface/sdk_c/multimedia/image_framework:libimage_source", + "//interface/sdk_c/multimedia/image_framework:libimage_source_header", + "//interface/sdk_c/multimedia/image_framework:libimage_packer_ndk", + "//interface/sdk_c/multimedia/image_framework:image_packer_ndk_header", + "//interface/sdk_c/multimedia/image_framework:libimage_packer", + "//interface/sdk_c/multimedia/image_framework:libimage_packer_header", + "//interface/sdk_c/multimedia/image_framework:libpicture", + "//interface/sdk_c/multimedia/image_framework:libpicture_header", + "//interface/sdk_c/multimedia/image_framework:libimage_common", + "//interface/sdk_c/multimedia/image_framework:libimage_common_header", + "//interface/sdk_c/multimedia/image_effect:libimage_effect", + "//interface/sdk_c/multimedia/image_effect:libimage_effect_header", + "//interface/sdk_c/multimedia/video_processing_engine/video_processing:libvideo_processing_ndk", + "//interface/sdk_c/multimedia/video_processing_engine/video_processing:video_processing_ndk_headers", + "//interface/sdk_c/multimedia/video_processing_engine/image_processing:libimage_processing_ndk", + "//interface/sdk_c/multimedia/video_processing_engine/image_processing:image_processing_ndk_headers", + "//interface/sdk_c/third_party/openSLES:sles_header", + "//interface/sdk_c/third_party/openSLES:libOpenSLES_ndk", + "//interface/sdk_c/ai/neural_network_runtime:libneural_network_core_ndk", + "//interface/sdk_c/ai/neural_network_runtime:libneural_network_runtime_ndk", + "//interface/sdk_c/ai/neural_network_runtime:libneural_network_runtime_header", + "//interface/sdk_c/commonlibrary/memory_utils/libpurgeablemem:libpurgeable_memory_ndk", + "//interface/sdk_c/commonlibrary/memory_utils/libpurgeablemem:purgeable_memory_header", + "//interface/sdk_c/distributeddatamgr/relational_store:data_ndk_header", + "//interface/sdk_c/distributeddatamgr/relational_store:native_rdb_ndk_header", + "//interface/sdk_c/distributeddatamgr/relational_store:libnative_rdb_ndk", + "//interface/sdk_c/distributeddatamgr/udmf:libudmf", + "//interface/sdk_c/distributeddatamgr/udmf:udmf_ndk_header", + "//interface/sdk_c/distributeddatamgr/pasteboard:libpasteboard", + "//interface/sdk_c/distributeddatamgr/pasteboard:pasteboard_ndk_header", + "//interface/sdk_c/distributeddatamgr/preferences:preferences_ndk_header", + "//interface/sdk_c/distributeddatamgr/preferences:libohpreferences", + "//interface/sdk_c/drivers/external_device_manager/usb:libusb_ndk", + "//interface/sdk_c/drivers/external_device_manager/usb:usb_header", + "//interface/sdk_c/drivers/external_device_manager/hid:libhid", + "//interface/sdk_c/drivers/external_device_manager/hid:hid_header", + "//interface/sdk_c/drivers/external_device_manager/base:libddk_base", + "//interface/sdk_c/drivers/external_device_manager/base:ddk_header", + "//interface/sdk_c/graphic/graphic_2d/vulkan:libvulkan_ndk", + "//interface/sdk_c/graphic/graphic_2d/vulkan:vulkan_header", + "//interface/sdk_c/graphic/graphic_2d/vulkan:vulkan_header_vk_video", + "//interface/sdk_c/resourceschedule/ffrt:libffrt_ndk", + "//interface/sdk_c/resourceschedule/ffrt:ffrt_header", + "//interface/sdk_c/network/netmanager:libnet_connection", + "//interface/sdk_c/network/netmanager:netconn_header", + "//interface/sdk_c/sensors/sensor:libsensor_ndk", + "//interface/sdk_c/sensors/sensor:sensor_ndk_header", + "//interface/sdk_c/resourceschedule/qos_manager:libqos_ndk", + "//interface/sdk_c/resourceschedule/qos_manager:qos_header", + "//interface/sdk_c/filemanagement/fileio:libohfileio", + "//interface/sdk_c/filemanagement/fileio:oh_fileio_header", + "//interface/sdk_c/filemanagement/environment:libohenvironment", + "//interface/sdk_c/filemanagement/environment:oh_environment_header", + "//interface/sdk_c/filemanagement/file_uri:libohfileuri", + "//interface/sdk_c/filemanagement/file_uri:oh_file_uri_header", + "//interface/sdk_c/filemanagement/fileshare:libohfileshare", + "//interface/sdk_c/filemanagement/fileshare:oh_file_share_header", + "//interface/sdk_c/multimodalinput/kits/c:libohinput_ndk", + "//interface/sdk_c/multimodalinput/kits/c:ohinput_header", + "//interface/sdk_c/BasicServicesKit:libohprint_ndk", + "//interface/sdk_c/BasicServicesKit:ohprint_header", + "//interface/sdk_c/multimedia/image_framework:libohimage", + "//interface/sdk_c/multimedia/image_framework:ohimage_header", + "//interface/sdk_c/multimedia/image_framework:libimage_receiver", + "//interface/sdk_c/multimedia/image_framework:image_receiver_header", + "//interface/sdk_c/graphic/graphic_2d/native_display_soloist:libnative_display_soloist_ndk", + "//interface/sdk_c/graphic/graphic_2d/native_display_soloist:native_display_soloist_header", + "//interface/sdk_c/third_party/musl/ndk_script:copy_compatible_config", + "//interface/sdk_c/CryptoArchitectureKit:libohcrypto", + "//interface/sdk_c/CryptoArchitectureKit:crypto_capi_header", + "//interface/sdk_c/BasicServicesKit:libohscan_ndk", + "//interface/sdk_c/BasicServicesKit:ohscan_header", + "//interface/sdk_c/BasicServicesKit:libtime_service_ndk", + "//interface/sdk_c/BasicServicesKit:time_service_ndk_header", + "//interface/sdk_c/BasicServicesKit:libcommonevent_ndk", + "//interface/sdk_c/BasicServicesKit:ohcommonevent_header", + "//interface/sdk_c/DataProtectionKit:libohdlp_permission", + "//interface/sdk_c/DataProtectionKit:dlppermission_capi_header", + "//interface/sdk_c/inputmethod:libohinputmethod", + "//interface/sdk_c/inputmethod:libohinputmethod_header", + "//interface/sdk_c/backgroundtasks/transient:libtransient_task_ndk", + "//interface/sdk_c/backgroundtasks/transient:transient_task_header", + "//interface/sdk_c/BasicServicesKit:ohbattery_info_header", + "//interface/sdk_c/BasicServicesKit:libohbattery_info_ndk", + "//interface/sdk_c/telephony/cellular_data:libtelephony_data", + "//interface/sdk_c/telephony/cellular_data:telephony_data_header", + "//interface/sdk_c/telephony/core_service:libtelephony_radio", + "//interface/sdk_c/telephony/core_service:telephony_radio_header", + "//interface/sdk_c/ConnectivityKit/wifi:libwifi_ndk", + "//interface/sdk_c/ConnectivityKit/wifi:wifi_ndk_header", +] + +_ndk_base_libs = [ + "//interface/sdk_c/third_party/musl/ndk_script/adapter:libc_ndk", + "//interface/sdk_c/third_party/musl/ndk_script:musl_ndk_libs_arm32", + "//interface/sdk_c/third_party/musl/ndk_script:musl_ndk_libs_aarch64", + "//interface/sdk_c/third_party/musl/ndk_script:musl_ndk_libs_x86_64", + "//interface/sdk_c/third_party/musl/ndk_script:ndk_toolchain", +] +_ndk_sysroot_uapi = + [ "//interface/sdk_c/third_party/musl/ndk_script:musl_sysroot" ] + +_ndk_cmake = [ + "//prebuilts/cmake/darwin-universal:darwin_cmake_copy", + "//prebuilts/cmake/linux-x86:linux_cmake_copy", + "//prebuilts/cmake/windows-x86:windows_cmake_copy", + "//prebuilts/cmake/ohos:ohos_cmake_copy", + "//build/ohos/ndk:ndk_cmake_files", +] + +if (host_os == "mac") { + _ndk_cmake += [ "//build/ohos/ndk:copy_darwin_ohos_cmake" ] +} else { + _ndk_cmake += [ + "//build/ohos/ndk:copy_linux_ohos_cmake", + "//build/ohos/ndk:copy_windows_ohos_cmake", + "//build/ohos/ndk:copy_ohos_ohos_cmake", + ] +} + +_ndk_ninja = [] +if (host_os == "mac") { + _ndk_ninja += [ "//prebuilts/build-tools/darwin-x86/bin:darwin_ninja_copy" ] +} else { + _ndk_ninja += [ + "//prebuilts/build-tools/linux-x86/bin:linux_ninja_copy", + "//prebuilts/build-tools/windows-x86/bin:windows_ninja_copy", + "//prebuilts/build-tools/ohos/bin:ohos_ninja_copy", + ] +} + +_ndk_targets_list = _ndk_library_targets + _ndk_base_libs + _ndk_sysroot_uapi + + _ndk_cmake + _ndk_ninja + +_parse_script = "//build/ohos/ndk/parse_ndk_targets.py" +_parse_args = [ + "--source-root-dir", + rebase_path("//", root_build_dir), + "--ndk-lib-target-list", +] +_parse_args += _ndk_targets_list + +all_ndk_targets_list = exec_script(_parse_script, _parse_args, "list lines") + +if (ndk_platform == "win") { + all_ndk_targets_list += + [ "//interface/sdk_c/third_party/musl/ndk_script:windows_x86_64" ] +} else if (ndk_platform == "mac") { + if (host_cpu == "arm64") { + all_ndk_targets_list += + [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_arm64" ] + } else { + all_ndk_targets_list += + [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_x86_64" ] + } +} else if (ndk_platform == "linux") { + all_ndk_targets_list += + [ "//interface/sdk_c/third_party/musl/ndk_script:linux_x86_64" ] +} else if (ndk_platform == "ohos") { + all_ndk_targets_list += + [ "//interface/sdk_c/third_party/musl/ndk_script:ohos_arm64" ] +} else if (ndk_platform == "default") { + if (host_os == "mac") { + if (host_cpu == "arm64") { + all_ndk_targets_list += + [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_arm64" ] + } else { + all_ndk_targets_list += + [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_x86_64" ] + } + } else { + all_ndk_targets_list += [ + "//interface/sdk_c/third_party/musl/ndk_script:windows_x86_64", + "//interface/sdk_c/third_party/musl/ndk_script:linux_x86_64", + "//interface/sdk_c/third_party/musl/ndk_script:ohos_arm64", + ] + } +} -- Gitee From 9cf3de7ddd09c9c323669101a789be250d0ae265 Mon Sep 17 00:00:00 2001 From: zhjs Date: Thu, 17 Oct 2024 11:23:57 +0800 Subject: [PATCH 026/630] DTS0000000000000test Signed-off-by: zhjs --- graphic/graphic_2d/native_buffer/buffer_common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_buffer/buffer_common.h b/graphic/graphic_2d/native_buffer/buffer_common.h index fd1bfa4a5..e3e610d71 100644 --- a/graphic/graphic_2d/native_buffer/buffer_common.h +++ b/graphic/graphic_2d/native_buffer/buffer_common.h @@ -138,7 +138,11 @@ typedef enum OH_NativeBuffer_MetadataType { /** HDR10 */ OH_VIDEO_HDR_HDR10, /** HDR VIVID */ - OH_VIDEO_HDR_VIVID + OH_VIDEO_HDR_VIVID, + /** + * NONE Metadata + * @since 13 + */ } OH_NativeBuffer_MetadataType; /** -- Gitee From 2f09c5f4b1483ca3b9ffd46a6f21cb8e5ab21c38 Mon Sep 17 00:00:00 2001 From: zhjs Date: Thu, 17 Oct 2024 11:55:13 +0800 Subject: [PATCH 027/630] DTS0000000000000test Signed-off-by: zhjs --- graphic/graphic_2d/native_buffer/buffer_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_buffer/buffer_common.h b/graphic/graphic_2d/native_buffer/buffer_common.h index e3e610d71..d67646240 100644 --- a/graphic/graphic_2d/native_buffer/buffer_common.h +++ b/graphic/graphic_2d/native_buffer/buffer_common.h @@ -143,6 +143,7 @@ typedef enum OH_NativeBuffer_MetadataType { * NONE Metadata * @since 13 */ + OH_VIDEO_NONE = -1 } OH_NativeBuffer_MetadataType; /** -- Gitee From 9364f17f6f805064c0541635182ca197b8dcbe60 Mon Sep 17 00:00:00 2001 From: xxb-wzy Date: Fri, 18 Oct 2024 10:44:16 +0800 Subject: [PATCH 028/630] Signed-off-by: xxb-wzy Change-Id: Id49de840b724bca45076d887d0317f282f30314d --- .../native_vsync/libnative_vsync.ndk.json | 3 ++- .../graphic_2d/native_vsync/native_vsync.h | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json index 196fab524..7c0511407 100644 --- a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json +++ b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json @@ -3,5 +3,6 @@ { "name": "OH_NativeVSync_Destroy" }, { "name": "OH_NativeVSync_RequestFrame" }, { "name": "OH_NativeVSync_RequestFrameWithMultiCallback" }, - { "name": "OH_NativeVSync_GetPeriod" } + { "name": "OH_NativeVSync_GetPeriod" }, + { "name": "OH_NativeVSync_DVSyncSwitch" } ] \ No newline at end of file diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 610fe1deb..0da2aa8e9 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -114,6 +114,31 @@ int OH_NativeVSync_RequestFrameWithMultiCallback( * @version 1.0 */ int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period); + +/** + * @brief Enable dvsync to improve the performance of self-drawn animation scenes. + * After enabled, dvsync needs to occupy the free surfacebuffer for frame buffering. Users need to ensure that + * there is an idle buffer at least. Otherwise, you are not advised to enable this function. + * When you enable dvsync, it will drive the early drawing of subsequent animations by sending vsync with future + * timestamp in advance, and you need to disable dvsync at the end of animation. + * After dvsync is enabled, the user needs to respond correctly to vsync sent in advance, and needs to request + * the next vsync after the animation frame of the last vsync completes drawing. And the surfacebuffer needs to + * carry a timestamp consistent with vsync. + * In some scenarios, if another application enables dvsync first, the current enabling operation will not + * take effect, and the application will still receive normal vsync signals. + * Not all platforms support dvsync. On platforms that do not support it, users will receive normal vsync + * after enabling it. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync + * @param nativeVsync Indicates the pointer to a NativeVsync. + * @param enable Enable or disable the dvsync. + * @return {@link NATIVE_ERROR_OK} 0 - Success. + * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - the parameter nativeVsync is NULL or callback is NULL. + * {@link NATIVE_ERROR_BINDER_ERROR} 50401000 - ipc send failed. + * @since 12 + * @version 1.0 + */ +int OH_NativeVSync_DVSyncSwitch(OH_NativeVSync* nativeVsync, bool enable); #ifdef __cplusplus } #endif -- Gitee From 9a7ff952b1bc444e522e8dfbbf8e0e2f2fd70d67 Mon Sep 17 00:00:00 2001 From: xxb-wzy Date: Sat, 19 Oct 2024 15:41:14 +0800 Subject: [PATCH 029/630] Signed-off-by: xxb-wzy Change-Id: I91b51c7786f5aa8bccfc4936d602caceda547f89 --- graphic/graphic_2d/native_vsync/native_vsync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 0da2aa8e9..2dfb5c1ac 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -135,7 +135,7 @@ int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period); * @return {@link NATIVE_ERROR_OK} 0 - Success. * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - the parameter nativeVsync is NULL or callback is NULL. * {@link NATIVE_ERROR_BINDER_ERROR} 50401000 - ipc send failed. - * @since 12 + * @since 14 * @version 1.0 */ int OH_NativeVSync_DVSyncSwitch(OH_NativeVSync* nativeVsync, bool enable); -- Gitee From bd28071d94885018b4000188bb3a7071ba11029a Mon Sep 17 00:00:00 2001 From: hongzexuan Date: Thu, 17 Oct 2024 11:32:06 +0800 Subject: [PATCH 030/630] scroll capi add fadingEdge Signed-off-by: hongzexuan Change-Id: Ifd16e5d9eba02305e2eaed84a613c246d68499ae --- arkui/ace_engine/native/native_node.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 4ba7d5ff2..2266726b5 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4495,6 +4495,23 @@ typedef enum { */ NODE_SCROLL_FLING, + /** + * @brief Sets the fading effect for the edges of scrollable components. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: + * .value[0].i32: whether to enable the fading effect on edges. The value 0 means to disable the fading effect, + * and 1 means to enable it. + * .value[1]?.f32: length of the fading effect on edges, in vp. Default value: 32. + * + * Format of the return value {@link ArkUI_AttributeItem}: + * .value[0].i32: whether the fading effect on edges is enabled. The value 0 means that the fading effect is + * disabled, and 1 means that it is enabled. + * .value[1].f32: length of the fading effect on edges, in vp. + * + * @since 14 + */ + NODE_SCROLL_FADING_EDGE, + /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and * obtained as required through APIs. -- Gitee From 81c67fa44d1c74f8db7fe07a8980b42bcde5c46b Mon Sep 17 00:00:00 2001 From: xzcbob Date: Mon, 21 Oct 2024 04:12:49 +0000 Subject: [PATCH 031/630] vrr update Signed-off-by: xzcbob --- multimedia/av_codec/native_avcodec_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 1bec2e144..147a7268e 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -958,9 +958,9 @@ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE; * This is an optional key that applies only to video decoder. It is used in configure. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 13 + * @since 14 */ -extern const char *OH_MD_KEY_VIDEO_DECODER_ENABLE_VRR; +extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR; /** * @brief Media type. -- Gitee From ddb15cb2662ac117323cedb9800a8a60abd3b3ca Mon Sep 17 00:00:00 2001 From: xxb-wzy Date: Mon, 21 Oct 2024 19:32:31 +0800 Subject: [PATCH 032/630] Signed-off-by: xxb-wzy Change-Id: Ib3e74dcad38979a2c1aa14e3de68e99cb0e90d07 --- .../graphic_2d/native_vsync/native_vsync.h | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 2dfb5c1ac..8d6d3df64 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -116,22 +116,23 @@ int OH_NativeVSync_RequestFrameWithMultiCallback( int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period); /** - * @brief Enable dvsync to improve the performance of self-drawn animation scenes. - * After enabled, dvsync needs to occupy the free surfacebuffer for frame buffering. Users need to ensure that - * there is an idle buffer at least. Otherwise, you are not advised to enable this function. - * When you enable dvsync, it will drive the early drawing of subsequent animations by sending vsync with future - * timestamp in advance, and you need to disable dvsync at the end of animation. - * After dvsync is enabled, the user needs to respond correctly to vsync sent in advance, and needs to request - * the next vsync after the animation frame of the last vsync completes drawing. And the surfacebuffer needs to - * carry a timestamp consistent with vsync. - * In some scenarios, if another application enables dvsync first, the current enabling operation will not - * take effect, and the application will still receive normal vsync signals. - * Not all platforms support dvsync. On platforms that do not support it, users will receive normal vsync - * after enabling it. + * @brief Enable DVSync to improve the smoothness of self drawn animation scenes. + * DVSync is Decoupled VSync, which is a frame timing management strategy decoupled from hardware VSync. + * DVSync drives the early drawing of subsequent animation frames by sending VSync signals with future timestamps + * in advance, which are then cached in the frame buffer queue; DVSync reduces the possibility of frame loss + * in the future by caching frames, thereby improving the smoothness of animation scenes. + * Because DVSync requires the use of idle self drawn frame buffers to cache pre drawn animation frames, users need to + * ensure that there is at least one free frame buffer, otherwise it is not recommended to enable this feature. + * After enabling DVSync, users need to respond correctly to the VSync signal sent in advance, and request + * the next VSync after the animation frame corresponding to the previous VSync is completed, and the self + * drawn frame needs to carry a timestamp consistent with VSync. + * After the animation ends, the user needs to turn off DVSync. + * On platforms that do not support DVSync or if another application has already enabled DVSync, the current + * enable operation will not take effect and the application will still receive a normal VSync signal. * * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync * @param nativeVsync Indicates the pointer to a NativeVsync. - * @param enable Enable or disable the dvsync. + * @param enable Indicates enable or disable DVSync, true indicates enable, false indicates disable. * @return {@link NATIVE_ERROR_OK} 0 - Success. * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - the parameter nativeVsync is NULL or callback is NULL. * {@link NATIVE_ERROR_BINDER_ERROR} 50401000 - ipc send failed. -- Gitee From f72041a06fded0ff5af3fcacd2cf153171234583 Mon Sep 17 00:00:00 2001 From: xxb-wzy Date: Mon, 21 Oct 2024 19:59:02 +0800 Subject: [PATCH 033/630] Signed-off-by: xxb-wzy Change-Id: I7ae1c0e354949db4a00d9c83b5bb910e3122b68d --- .../graphic_2d/native_vsync/native_vsync.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 8d6d3df64..83f9af719 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -116,19 +116,19 @@ int OH_NativeVSync_RequestFrameWithMultiCallback( int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period); /** - * @brief Enable DVSync to improve the smoothness of self drawn animation scenes. - * DVSync is Decoupled VSync, which is a frame timing management strategy decoupled from hardware VSync. - * DVSync drives the early drawing of subsequent animation frames by sending VSync signals with future timestamps - * in advance, which are then cached in the frame buffer queue; DVSync reduces the possibility of frame loss - * in the future by caching frames, thereby improving the smoothness of animation scenes. - * Because DVSync requires the use of idle self drawn frame buffers to cache pre drawn animation frames, users need to - * ensure that there is at least one free frame buffer, otherwise it is not recommended to enable this feature. + * @brief Enable DVSync to improve the smoothness of self-drawn animation scenes. + * DVSync stands for Decoupled VSync, a frame timing management strategy decoupled from hardware VSync. + * DVSync drives the early rendering of subsequent animation frames by sending VSync signals with future timestamps + * in advance, which are then cached in the frame buffer queue. DVSync reduces the possibility of future frame drops + * by caching pre-rendered frames for display, thereby improving the smoothness of animation scenes. + * Because DVSync requires the use of free self-drawn frame buffers to cache pre-rendered animation frames, users need + * to ensure that there is at least one free frame buffer, otherwise it is not recommended to enable this feature. * After enabling DVSync, users need to respond correctly to the VSync signal sent in advance, and request - * the next VSync after the animation frame corresponding to the previous VSync is completed, and the self - * drawn frame needs to carry a timestamp consistent with VSync. - * After the animation ends, the user needs to turn off DVSync. + * the next VSync after the animation frame corresponding to the previous VSync has completed, and the self-drawn + * frame needs to carry a timestamp consistent with its VSync event. + * After the animation ends, the user needs to disable DVSync. * On platforms that do not support DVSync or if another application has already enabled DVSync, the current - * enable operation will not take effect and the application will still receive a normal VSync signal. + * enable operation will not take effect and the application will still receive normal VSync signals. * * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync * @param nativeVsync Indicates the pointer to a NativeVsync. -- Gitee From 72930806a551fa94cfe8298dd8ccdf15c1747985 Mon Sep 17 00:00:00 2001 From: lizhuojun Date: Mon, 21 Oct 2024 16:24:51 +0800 Subject: [PATCH 034/630] add ContentForm UDS Signed-off-by: lizhuojun --- distributeddatamgr/udmf/include/udmf.h | 26 +++ distributeddatamgr/udmf/include/udmf_meta.h | 7 + distributeddatamgr/udmf/include/uds.h | 186 ++++++++++++++++++++ distributeddatamgr/udmf/libudmf.ndk.json | 68 +++++++ 4 files changed, 287 insertions(+) diff --git a/distributeddatamgr/udmf/include/udmf.h b/distributeddatamgr/udmf/include/udmf.h index e79579b5f..d8d7149e5 100644 --- a/distributeddatamgr/udmf/include/udmf.h +++ b/distributeddatamgr/udmf/include/udmf.h @@ -368,6 +368,19 @@ int OH_UdmfRecord_AddPixelMap(OH_UdmfRecord* pThis, OH_UdsPixelMap* pixelMap); */ int OH_UdmfRecord_AddArrayBuffer(OH_UdmfRecord* record, const char* type, OH_UdsArrayBuffer* buffer); +/** + * @brief Add one {@link OH_UdsContentForm} data to the {@link OH_UdmfRecord} record. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}. + * @param contentForm Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdmfRecord OH_UdsContentForm Udmf_ErrCode. + * @since 14 + */ +int OH_UdmfRecord_AddContentForm(OH_UdmfRecord* pThis, OH_UdsContentForm* contentForm); + /** * @brief Get all types in the {@link OH_UdmfRecord} record. * @@ -509,6 +522,19 @@ int OH_UdmfRecord_GetPixelMap(OH_UdmfRecord* pThis, OH_UdsPixelMap* pixelMap); */ int OH_UdmfRecord_GetArrayBuffer(OH_UdmfRecord* record, const char* type, OH_UdsArrayBuffer* buffer); +/** + * @brief Get one {@link OH_UdsContentForm} data from the {@link OH_UdmfRecord} record. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}. + * @param contentForm Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdmfRecord OH_UdsContentForm Udmf_ErrCode. + * @since 14 + */ +int OH_UdmfRecord_GetContentForm(OH_UdmfRecord* pThis, OH_UdsContentForm* contentForm); + /** * @brief Get primary {@link OH_UdsPlainText} data from the {@link OH_UdmfData}. * diff --git a/distributeddatamgr/udmf/include/udmf_meta.h b/distributeddatamgr/udmf/include/udmf_meta.h index 25b31bf80..cfe651a89 100644 --- a/distributeddatamgr/udmf/include/udmf_meta.h +++ b/distributeddatamgr/udmf/include/udmf_meta.h @@ -997,6 +997,13 @@ extern "C" { */ #define UDMF_META_GENERAL_FILE_URI "general.file-uri" +/** + * @brief A specific type of uniform data type. + * + * @since 14 + */ +#define UDMF_METE_GENERAL_CONTENT_FORM "general.content-form" + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/udmf/include/uds.h b/distributeddatamgr/udmf/include/uds.h index 4ccef6ebe..e7450a53a 100644 --- a/distributeddatamgr/udmf/include/uds.h +++ b/distributeddatamgr/udmf/include/uds.h @@ -89,6 +89,13 @@ typedef struct OH_UdsFileUri OH_UdsFileUri; */ typedef struct OH_UdsPixelMap OH_UdsPixelMap; +/** + * @brief Describes the unified data struct of content form. + * + * @since 14 + */ +typedef struct OH_UdsContentForm OH_UdsContentForm; + /** * @brief Describes the unified data struct of array buffer. * @@ -665,6 +672,185 @@ int OH_UdsArrayBuffer_SetData(OH_UdsArrayBuffer* buffer, unsigned char* data, un */ int OH_UdsArrayBuffer_GetData(OH_UdsArrayBuffer* buffer, unsigned char** data, unsigned int* len); +/** + * @brief Creation a pointer to the instance of the {@link OH_UdsContentForm}. + * + * @return If the operation is successful, a pointer to the instance of the {@link OH_UdsContentForm} + * structure is returned. If the operation is failed, nullptr is returned. + * @see OH_UdsContentForm + * @since 14 + */ +OH_UdsContentForm* OH_UdsContentForm_Create(); + +/** + * @brief Destroy a pointer that points to the {@link OH_UdsContentForm} instance. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @see OH_UdsContentForm + * @since 14 + */ +void OH_UdsContentForm_Destroy(OH_UdsContentForm* pThis); + +/** + * @brief Get type id from the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @return Returns a pointer of the value string when input args normally, otherwise return nullptr. + * @see OH_UdsContentForm + * @since 14 + */ +const char* OH_UdsContentForm_GetType(OH_UdsContentForm* pThis); + +/** + * @brief Get thumb data from the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param thumbData Represents a pointer to thumb data that is a output param. + * @param len Represents the thumb data length that is a output param. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * {@link UDMF_ERR} Internal data error. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_GetThumbData(OH_UdsContentForm* pThis, unsigned char** thumbData, unsigned int* len); + +/** + * @brief Get description from the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @return Returns a pointer of the value string when input args normally, otherwise return nullptr. + * @see OH_UdsContentForm + * @since 14 + */ +const char* OH_UdsContentForm_GetDescription(OH_UdsContentForm* pThis); + +/** + * @brief Get title from the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @return Returns a pointer of the value string when input args normally, otherwise return nullptr. + * @see OH_UdsContentForm + * @since 14 + */ +const char* OH_UdsContentForm_GetTitle(OH_UdsContentForm* pThis); + +/** + * @brief Get thumb data from the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param appIcon Represents a pointer to app icon that is a output param. + * @param len Represents the app icon length that is a output param. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * {@link UDMF_ERR} Internal data error. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_GetAppIcon(OH_UdsContentForm* pThis, unsigned char** appIcon, unsigned int* len); + +/** + * @brief Get app name from the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @return Returns a pointer of the value string when input args normally, otherwise return nullptr. + * @see OH_UdsContentForm + * @since 14 + */ +const char* OH_UdsContentForm_GetAppName(OH_UdsContentForm* pThis); + +/** + * @brief Get link url from the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @return Returns a pointer of the value string when input args normally, otherwise return nullptr. + * @see OH_UdsContentForm + * @since 14 + */ +const char* OH_UdsContentForm_GetLinkUri(OH_UdsContentForm* pThis); + +/** + * @brief Set thumb data to the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param thumbData Represents the thumb data. + * @param len Represents the length of thumb data param. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_SetThumbData(OH_UdsContentForm* pThis, const unsigned char* thumbData, unsigned int len); + +/** + * @brief Set description to the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param description Represents a description string. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_SetDescription(OH_UdsContentForm* pThis, const char* description); + +/** + * @brief Set title to the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param title Represents a title string. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_SetTitle(OH_UdsContentForm* pThis, const char* title); + +/** + * @brief Set thumb data to the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param appIcon Represents the app icon. + * @param len Represents the length of app icon param. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_SetAppIcon(OH_UdsContentForm* pThis, const unsigned char* appIcon, unsigned int len); + +/** + * @brief Set app name to the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param appName Represents a app name string. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_SetAppName(OH_UdsContentForm* pThis, const char* appName); + +/** + * @brief Set link uri to the {@link OH_UdsContentForm}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdsContentForm}. + * @param linkUri Represents a link uri string. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdsContentForm Udmf_ErrCode + * @since 14 + */ +int OH_UdsContentForm_SetLinkUri(OH_UdsContentForm* pThis, const char* linkUri); + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/udmf/libudmf.ndk.json b/distributeddatamgr/udmf/libudmf.ndk.json index fc246ae6d..0cef8921c 100644 --- a/distributeddatamgr/udmf/libudmf.ndk.json +++ b/distributeddatamgr/udmf/libudmf.ndk.json @@ -458,5 +458,73 @@ { "first_introduced": "13", "name": "OH_UdsArrayBuffer_GetData" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_Create" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_Destroy" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_GetType" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_GetThumbData" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_GetDescription" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_GetTitle" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_GetAppIcon" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_GetAppName" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_GetLinkUri" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_SetThumbData" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_SetDescription" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_SetTitle" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_SetAppIcon" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_SetAppName" + }, + { + "first_introduced": "14", + "name": "OH_UdsContentForm_SetLinkUri" + }, + { + "first_introduced": "14", + "name": "OH_UdmfRecord_AddContentForm" + }, + { + "first_introduced": "14", + "name": "OH_UdmfRecord_GetContentForm" } ] \ No newline at end of file -- Gitee From 181b424d6ce58de648775a0d255805db5788da1c Mon Sep 17 00:00:00 2001 From: zhangchao Date: Sat, 12 Oct 2024 14:43:57 +0800 Subject: [PATCH 035/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8A=98=E5=8F=A0?= =?UTF-8?q?=E5=B1=8F=E9=95=9C=E5=A4=B4=E7=BB=9F=E4=B8=80=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?NDK=E9=9C=80=E6=B1=82=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangchao --- multimedia/camera_framework/camera.h | 46 ++++++++++++++++++++ multimedia/camera_framework/camera.ndk.json | 8 ++++ multimedia/camera_framework/camera_manager.h | 34 +++++++++++++++ 3 files changed, 88 insertions(+) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 50e6f143b..00561fba4 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -973,6 +973,52 @@ typedef struct Camera_FrameShutterEndInfo { int32_t captureId; } Camera_FrameShutterEndInfo; +/** +* @brief Enum for fold status. +* +* @since 13 +* @version 1.0 +*/ +typedef enum Camera_FoldStatus { + /** + * Non_foldable status. + */ + NON_FOLDABLE = 0, + + /** + * Expanded status. + */ + EXPANDED = 1, + + /** + * Folded status. + */ + FOLDED = 2 +} Camera_FoldStatus; + +/** + * @brief Fold status info. + * + * @since 13 + * @version 1.0 + */ +typedef struct Camera_FoldStatusInfo { + /** + * Camera instance list. + */ + Camera_Device** supportedCameras; + + /** + * Size of camera list. + */ + uint32_t cameraSize; + + /** + * Current fold status. + */ + Camera_FoldStatus foldStatus; +} Camera_FoldStatusInfo; + /** * @brief Creates a CameraManager instance. * diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index e5faf336c..e7c84c388 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -602,5 +602,13 @@ { "first_introduced": "12", "name": "OH_PhotoNative_Release" + }, + { + "first_introduced": "13", + "name": "OH_CameraManager_RegisterFoldStatusInfoCallback" + }, + { + "first_introduced": "13", + "name": "OH_CameraManager_UnregisterFoldStatusInfoCallback" } ] diff --git a/multimedia/camera_framework/camera_manager.h b/multimedia/camera_framework/camera_manager.h index 42bcc1aaa..3c7f2fee0 100644 --- a/multimedia/camera_framework/camera_manager.h +++ b/multimedia/camera_framework/camera_manager.h @@ -72,6 +72,16 @@ typedef void (*OH_CameraManager_StatusCallback)(Camera_Manager* cameraManager, C */ typedef void (*OH_CameraManager_TorchStatusCallback)(Camera_Manager* cameraManager, Camera_TorchStatusInfo* status); +/** + * @brief Camera manager fold status info callback. + * + * @param cameraManager the {@link Camera_Manager} which deliver the callback. + * @param foldStatusInfo the {@link Camera_FoldStatusInfo} of the device. + * @since 13 + */ +typedef void (*OH_CameraManager_OnFoldStatusInfoChange)(Camera_Manager* cameraManager, + Camera_FoldStatusInfo* foldStatusInfo); + /** * @brief A listener for camera devices status. * @@ -132,6 +142,30 @@ Camera_ErrorCode OH_CameraManager_RegisterTorchStatusCallback(Camera_Manager* ca Camera_ErrorCode OH_CameraManager_UnregisterTorchStatusCallback(Camera_Manager* cameraManager, OH_CameraManager_TorchStatusCallback torchStatusCallback); +/** + * @brief Register fold status info change event callback. + * + * @param cameraManager the {@link Camera_Manager} instance. + * @param foldStatusInfoCallback the {@link OH_CameraManager_OnFoldStatusInfoChange} to be registered. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 13 + */ +Camera_ErrorCode OH_CameraManager_RegisterFoldStatusInfoCallback(Camera_Manager* cameraManager, + OH_CameraManager_OnFoldStatusInfoChange foldStatusInfoCallback); + +/** + * @brief Unregister fold status info change event callback. + * + * @param cameraManager the {@link Camera_Manager} instance. + * @param foldStatusInfoCallback the {@link OH_CameraManager_OnFoldStatusInfoChange} to be unregistered. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 13 + */ +Camera_ErrorCode OH_CameraManager_UnregisterFoldStatusInfoCallback(Camera_Manager* cameraManager, + OH_CameraManager_OnFoldStatusInfoChange foldStatusInfoCallback); + /** * @brief Gets supported camera descriptions. * -- Gitee From ff3d26596703ebc1ba24c43383cd546e7cf4ffe9 Mon Sep 17 00:00:00 2001 From: xxb-wzy Date: Wed, 23 Oct 2024 16:11:03 +0800 Subject: [PATCH 036/630] Signed-off-by: xxb-wzy Change-Id: I2e337ec5699505cbb0121da95b62f38a7238f959 --- .../graphic_2d/native_vsync/native_vsync.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 83f9af719..791fbfd36 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -116,25 +116,25 @@ int OH_NativeVSync_RequestFrameWithMultiCallback( int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period); /** - * @brief Enable DVSync to improve the smoothness of self-drawn animation scenes. - * DVSync stands for Decoupled VSync, a frame timing management strategy decoupled from hardware VSync. - * DVSync drives the early rendering of subsequent animation frames by sending VSync signals with future timestamps - * in advance, which are then cached in the frame buffer queue. DVSync reduces the possibility of future frame drops - * by caching pre-rendered frames for display, thereby improving the smoothness of animation scenes. - * Because DVSync requires the use of free self-drawn frame buffers to cache pre-rendered animation frames, users need - * to ensure that there is at least one free frame buffer, otherwise it is not recommended to enable this feature. - * After enabling DVSync, users need to respond correctly to the VSync signal sent in advance, and request - * the next VSync after the animation frame corresponding to the previous VSync has completed, and the self-drawn - * frame needs to carry a timestamp consistent with its VSync event. - * After the animation ends, the user needs to disable DVSync. - * On platforms that do not support DVSync or if another application has already enabled DVSync, the current - * enable operation will not take effect and the application will still receive normal VSync signals. + * @brief Enables DVSync to improve the smoothness of self-drawing animations. + * DVSync, short for Decoupled VSync, is a frame timing management policy that is decoupled from the hardware's VSync. + * DVSync drives the early rendering of upcoming animation frames by sending VSync signals with future timestamps. + * These frames are stored in a frame buffer queue. This helps DVSync reduce potential frame drop and therefore + * enhances the smoothness of animations. + * DVSync requires free self-drawing frame buffers to store these pre-rendered animation frames. + * Therefore, you must ensure that at least one free frame buffer is available. Otherwise, do not enable DVSync. + * After DVSync is enabled, you must correctly respond to the early VSync signals and request the subsequent VSync + * after the animation frame associated with the previous VSync is complete. In addition, the self-drawing frames must + * carry timestamps that align with VSync. + * After the animation ends, disable DVSync. + * On a platform that does not support DVSync or if another application has enabled DVSync, the attempt to enable it + * will not take effect, and the application still receives normal VSync signals. * * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync * @param nativeVsync Indicates the pointer to a NativeVsync. - * @param enable Indicates enable or disable DVSync, true indicates enable, false indicates disable. + * @param enable Whether to enable DVSync.The value true means to enable DVSync, and false means the opposite. * @return {@link NATIVE_ERROR_OK} 0 - Success. - * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - the parameter nativeVsync is NULL or callback is NULL. + * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - the parameter nativeVsync is NULL. * {@link NATIVE_ERROR_BINDER_ERROR} 50401000 - ipc send failed. * @since 14 * @version 1.0 -- Gitee From c7a5190b111cea0ee4a5aedb29dd7a126dd96a0d Mon Sep 17 00:00:00 2001 From: lusunqi Date: Tue, 13 Aug 2024 21:45:00 +0800 Subject: [PATCH 037/630] =?UTF-8?q?cherry=20pick=205f81cf1=20from=20https:?= =?UTF-8?q?//gitee.com/lusunqi/interface=5Fsdk=5Fc/pulls/1183=20image=5Fef?= =?UTF-8?q?fect=20ndk=E6=8E=A5=E5=8F=A3=E6=8E=92=E6=9F=A5=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lusunqi --- multimedia/image_effect/image_effect_filter.h | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/multimedia/image_effect/image_effect_filter.h b/multimedia/image_effect/image_effect_filter.h index 8c616e60a..d42de85d7 100644 --- a/multimedia/image_effect/image_effect_filter.h +++ b/multimedia/image_effect/image_effect_filter.h @@ -36,6 +36,7 @@ #ifndef NATIVE_IMAGE_EFFECT_FILTER_H #define NATIVE_IMAGE_EFFECT_FILTER_H +#include #include #include "image_effect_errors.h" #include "multimedia/image_framework/image/pixelmap_native.h" @@ -147,6 +148,7 @@ typedef union ImageEffect_DataValue { void *ptrValue; } ImageEffect_DataValue; +#ifdef __cplusplus /** * @brief Data parameter struct information * @@ -159,6 +161,20 @@ typedef struct ImageEffect_Any { /** Effect any data value */ ImageEffect_DataValue dataValue = { 0 }; } ImageEffect_Any; +#else +/** + * @brief Data parameter struct information + * + * @syscap SystemCapability.Multimedia.ImageEffect.Core + * @since 12 + */ +typedef struct ImageEffect_Any { + /** Effect any data type */ + ImageEffect_DataType dataType; + /** Effect any data value */ + ImageEffect_DataValue dataValue; +} ImageEffect_Any; +#endif /** * @brief Enumerates the pixel format type @@ -315,6 +331,7 @@ ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedFormats(OH_EffectFilterInf */ ImageEffect_ErrorCode OH_EffectFilterInfo_Release(OH_EffectFilterInfo *info); +#ifdef __cplusplus /** * @brief EffectFilter names information * @@ -327,6 +344,20 @@ typedef struct ImageEffect_FilterNames { /** EffectFilter names memory block */ const char **nameList = nullptr; } ImageEffect_FilterNames; +#else +/** + * @brief EffectFilter names information + * + * @syscap SystemCapability.Multimedia.ImageEffect.Core + * @since 12 + */ +typedef struct ImageEffect_FilterNames { + /** EffectFilter names array size */ + uint32_t size; + /** EffectFilter names memory block */ + const char **nameList; +} ImageEffect_FilterNames; +#endif /** * @brief Define the new type name OH_EffectBufferInfo for struct OH_EffectBufferInfo -- Gitee From 5b7d2123f3509b050abfc468d5321d9ed02b7a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E8=B6=85123?= Date: Wed, 23 Oct 2024 10:38:57 +0000 Subject: [PATCH 038/630] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=95=9C=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 章超123 --- multimedia/camera_framework/camera.h | 1 - 1 file changed, 1 deletion(-) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 03f0421c8..1a907e0f7 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -1002,7 +1002,6 @@ typedef enum Camera_FoldStatus { * @since 13 * @version 1.0 */ - typedef struct Camera_FoldStatusInfo { /** * Camera instance list. -- Gitee From e7a2d4d7ad29eb7c5413dfafd4b1f7c0920ff884 Mon Sep 17 00:00:00 2001 From: xiaye Date: Fri, 25 Oct 2024 06:54:52 +0800 Subject: [PATCH 039/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0interface=5Fsdk=5Fc?= =?UTF-8?q?=20getLastJavascriptProxyCallingFrameUrl=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- web/webview/interfaces/native/arkweb_type.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index d626371eb..37c8ca978 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -214,6 +214,15 @@ typedef struct { */ ArkWeb_ErrorCode (*postWebMessage)( const char* webTag, const char* name, ArkWeb_WebMessagePortPtr* webMessagePorts, size_t size, const char* url); + /** + * @brief Get the url of the last frame that calls the JavaScriptProxy. + * This should be call on the thread which JavaScriptProxy called. + * + * @param webTag The name of the web component. + * @return The url of the last frame that calls the JavaScriptProxy. + * @since 14 + */ + const char* (*getLastJavascriptProxyCallingFrameUrl)(); } ArkWeb_ControllerAPI; /** @@ -417,4 +426,4 @@ typedef struct { #ifdef __cplusplus } #endif -#endif // ARKWEB_TYPE_H \ No newline at end of file +#endif // ARKWEB_TYPE_H -- Gitee From 3228b541e3e17c2110592f9b2b1b2a23d3698c68 Mon Sep 17 00:00:00 2001 From: zyx0121 Date: Fri, 25 Oct 2024 14:19:18 +0800 Subject: [PATCH 040/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=BA=8F=E5=88=97=E5=8C=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zyx0121 --- arkui/ace_engine/native/styled_string.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/arkui/ace_engine/native/styled_string.h b/arkui/ace_engine/native/styled_string.h index 49b4d39d3..b3f2db163 100644 --- a/arkui/ace_engine/native/styled_string.h +++ b/arkui/ace_engine/native/styled_string.h @@ -120,29 +120,30 @@ OH_Drawing_Typography* OH_ArkUI_StyledString_CreateTypography(ArkUI_StyledString void OH_ArkUI_StyledString_AddPlaceholder(ArkUI_StyledString* handle, OH_Drawing_PlaceholderSpan* placeholder); /** - * @brief Create a ArkUI_StyledString_Descriptor object. + * @brief Creates an ArkUI_StyledString_Descriptor object. * - * @return Pointer to the ArkUI_StyledString_Descriptor object.。 + * @return Returns the pointer to the ArkUI_StyledString_Descriptor object created. * @since 14 */ -ArkUI_StyledString_Descriptor* OH_ArkUI_StyledString_Descriptor_Create(); +ArkUI_StyledString_Descriptor* OH_ArkUI_StyledString_Descriptor_Create(void); /** - * @brief Release the memory occupied by the ArkUI_StyledString_Descriptor object. + * @brief Destroys an ArkUI_StyledString_Descriptor object and reclaims the memory occupied by the object. * - * @param str Pointer to the ArkUI_StyledString_Descriptor object. + * @param descriptor Pointer to an ArkUI_StyledString_Descriptor object. * @since 14 */ -void OH_ArkUI_StyledString_Descriptor_Destroy(ArkUI_StyledString_Descriptor* str); +void OH_ArkUI_StyledString_Descriptor_Destroy(ArkUI_StyledString_Descriptor* descriptor); /** - * @brief Convert the styled string into html. + * @brief Converts styled string information into HTML. * - * @param str Pointer to the ArkUI_StyledString_Descriptor object. - * @return The converted html. + * @param descriptor Pointer to an ArkUI_StyledString_Descriptor object. + * @return Returns the pointer to the resulting HTML string. This pointer is managed internally and should be destroyed + * by calling OH_ArkUI_StyledString_Descriptor_Destroy() when no longer needed to free the memory. * @since 14 */ -const char* OH_ArkUI_ConvertToHtml(ArkUI_StyledString_Descriptor* str); +const char* OH_ArkUI_ConvertToHtml(ArkUI_StyledString_Descriptor* descriptor); /** * @brief Deserializes a byte array containing styled string information into a styled string. -- Gitee From c9b701de19e600cb53aa44702684251e7b796a1b Mon Sep 17 00:00:00 2001 From: xiaye Date: Fri, 25 Oct 2024 17:37:23 +0800 Subject: [PATCH 041/630] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- web/webview/interfaces/native/arkweb_type.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index 37c8ca978..d078b46fc 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -214,11 +214,11 @@ typedef struct { */ ArkWeb_ErrorCode (*postWebMessage)( const char* webTag, const char* name, ArkWeb_WebMessagePortPtr* webMessagePorts, size_t size, const char* url); + /** * @brief Get the url of the last frame that calls the JavaScriptProxy. * This should be call on the thread which JavaScriptProxy called. * - * @param webTag The name of the web component. * @return The url of the last frame that calls the JavaScriptProxy. * @since 14 */ @@ -427,3 +427,4 @@ typedef struct { } #endif #endif // ARKWEB_TYPE_H + -- Gitee From b6e499e0c19cf2d4f18557c27c67f2964312b820 Mon Sep 17 00:00:00 2001 From: xiaye Date: Fri, 25 Oct 2024 17:48:07 +0800 Subject: [PATCH 042/630] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A9=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- web/webview/interfaces/native/arkweb_type.h | 1 - 1 file changed, 1 deletion(-) diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index d078b46fc..f5e79c287 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -427,4 +427,3 @@ typedef struct { } #endif #endif // ARKWEB_TYPE_H - -- Gitee From dee2145ac1992294d1a9b65b9cb86b1fdfd31503 Mon Sep 17 00:00:00 2001 From: xiaye Date: Fri, 25 Oct 2024 18:02:03 +0800 Subject: [PATCH 043/630] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- web/webview/interfaces/native/arkweb_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index f5e79c287..f449d8e65 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -214,7 +214,7 @@ typedef struct { */ ArkWeb_ErrorCode (*postWebMessage)( const char* webTag, const char* name, ArkWeb_WebMessagePortPtr* webMessagePorts, size_t size, const char* url); - + /** * @brief Get the url of the last frame that calls the JavaScriptProxy. * This should be call on the thread which JavaScriptProxy called. -- Gitee From 9ed5284c8c18e98914c2945dfbfbeb00ddcc5677 Mon Sep 17 00:00:00 2001 From: xiaye Date: Fri, 25 Oct 2024 18:48:39 +0800 Subject: [PATCH 044/630] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- web/webview/interfaces/native/arkweb_type.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index f449d8e65..3fa63b91b 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -214,7 +214,6 @@ typedef struct { */ ArkWeb_ErrorCode (*postWebMessage)( const char* webTag, const char* name, ArkWeb_WebMessagePortPtr* webMessagePorts, size_t size, const char* url); - /** * @brief Get the url of the last frame that calls the JavaScriptProxy. * This should be call on the thread which JavaScriptProxy called. @@ -426,4 +425,4 @@ typedef struct { #ifdef __cplusplus } #endif -#endif // ARKWEB_TYPE_H +#endif // ARKWEB_TYPE_H \ No newline at end of file -- Gitee From 7943840d485b935c2c2d392297e684ce0ed6bff3 Mon Sep 17 00:00:00 2001 From: liuchungang Date: Sat, 26 Oct 2024 15:47:17 +0800 Subject: [PATCH 045/630] add kit name Signed-off-by: liuchungang --- resourceschedule/qos_manager/c/qos.h | 1 + 1 file changed, 1 insertion(+) diff --git a/resourceschedule/qos_manager/c/qos.h b/resourceschedule/qos_manager/c/qos.h index b264a23d9..e7bd4183a 100644 --- a/resourceschedule/qos_manager/c/qos.h +++ b/resourceschedule/qos_manager/c/qos.h @@ -35,6 +35,7 @@ * schedule the time and running order of tasks according to the QoS set by the tasks. * * @library libqos.so + * @kit KernelEnhanceKit * @syscap SystemCapability.Resourceschedule.QoS.Core * @since 12 */ -- Gitee From acc773ff51cc46f8fd31a9776e01672c8a4a62f9 Mon Sep 17 00:00:00 2001 From: sd_wu Date: Tue, 15 Oct 2024 15:00:38 +0800 Subject: [PATCH 046/630] add key callback with ret Signed-off-by: sd_wu --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ .../native/native_interface_xcomponent.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index dbae1db8b..38a5c545b 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2374,5 +2374,9 @@ { "first_introduced": "14", "name": "OH_ArkUI_ConvertToHtml" + }, + { + "first_introduced": "14", + "name": "OH_NativeXComponent_RegisterKeyEventCallbackWithResult" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index 1e427d91e..301d2a6b9 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -830,6 +830,20 @@ OH_NativeXComponent* OH_NativeXComponent_GetNativeXComponent(ArkUI_NodeHandle no int32_t OH_NativeXComponent_GetNativeAccessibilityProvider( OH_NativeXComponent* component, ArkUI_AccessibilityProvider** handle); +/** + * @brief Registers a callback for this OH_NativeXComponent instance. + * + * @param component Indicates the pointer to this OH_NativeXComponent instance. + * @param callback Indicates the pointer to a key event callback with result. + * @return Returns the status code of the execution. + * {@link OH_NATIVEXCOMPONENT_RESULT_SUCCESS} the callback function is successfully registered.\n + * {@link OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER} component is nullptr or callback is nullptr.\n + * @since 14 + * @version 1.0 + */ +int32_t OH_NativeXComponent_RegisterKeyEventCallbackWithResult( + OH_NativeXComponent* component, bool (*callback)(OH_NativeXComponent* component, void* window)); + #ifdef __cplusplus }; #endif -- Gitee From 7f076e20db4573af381f752c320a2f4cd0b0f058 Mon Sep 17 00:00:00 2001 From: xiaye Date: Tue, 29 Oct 2024 10:56:25 +0800 Subject: [PATCH 047/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A9=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- web/webview/interfaces/native/arkweb_type.h | 1 + 1 file changed, 1 insertion(+) diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index 3fa63b91b..449897312 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -214,6 +214,7 @@ typedef struct { */ ArkWeb_ErrorCode (*postWebMessage)( const char* webTag, const char* name, ArkWeb_WebMessagePortPtr* webMessagePorts, size_t size, const char* url); + /** * @brief Get the url of the last frame that calls the JavaScriptProxy. * This should be call on the thread which JavaScriptProxy called. -- Gitee From 55d94d87ef1f204f23c68b4f1f88dca9c23e01c2 Mon Sep 17 00:00:00 2001 From: liumingyue Date: Fri, 18 Oct 2024 16:09:21 +0800 Subject: [PATCH 048/630] add OH_NativeBundle_GetCompatibleDeviceType Signed-off-by: liumingyue --- .../bundle/include/native_interface_bundle.h | 14 ++++++++++++++ .../bundle_framework/bundle/libbundle.ndk.json | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h index 2cc076408..04bb5d331 100644 --- a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h +++ b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h @@ -145,6 +145,20 @@ char* OH_NativeBundle_GetAppIdentifier(); * @since 13 */ OH_NativeBundle_ElementName OH_NativeBundle_GetMainElementName(); + +/** + * @brief Obtains the compatible device type of the current application. + * After utilizing this interface, to prevent memory leaks, + * it is necessary to manually release the pointer returned by the interface. + * + * @return Returns the newly created string that indicates the compatible device type, + * if the returned object is NULL, it indicates creation failure. + * The possible cause of failure could be that the application address space is full, + * leading to space allocation failure. + * @since 14 + * @version 1.0 + */ +char* OH_NativeBundle_GetCompatibleDeviceType(); #ifdef __cplusplus }; #endif diff --git a/bundlemanager/bundle_framework/bundle/libbundle.ndk.json b/bundlemanager/bundle_framework/bundle/libbundle.ndk.json index a9db17ede..f61863508 100644 --- a/bundlemanager/bundle_framework/bundle/libbundle.ndk.json +++ b/bundlemanager/bundle_framework/bundle/libbundle.ndk.json @@ -14,5 +14,9 @@ { "first_introduced": "13", "name": "OH_NativeBundle_GetMainElementName" + }, + { + "first_introduced": "14", + "name": "OH_NativeBundle_GetCompatibleDeviceType" } ] -- Gitee From b479fd442812f2aaebe78fb4bd23f6d65d67fbe0 Mon Sep 17 00:00:00 2001 From: xxb-wzy Date: Thu, 31 Oct 2024 17:06:45 +0800 Subject: [PATCH 049/630] Signed-off-by: xxb-wzy Change-Id: I237236331668aa6f3304bce91b9eb59750710b4f --- graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json index 7c0511407..28ff64c27 100644 --- a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json +++ b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json @@ -4,5 +4,8 @@ { "name": "OH_NativeVSync_RequestFrame" }, { "name": "OH_NativeVSync_RequestFrameWithMultiCallback" }, { "name": "OH_NativeVSync_GetPeriod" }, - { "name": "OH_NativeVSync_DVSyncSwitch" } + { + "first_introduced": "14", + "name": "OH_NativeVSync_DVSyncSwitch" + } ] \ No newline at end of file -- Gitee From 26f6793805df481e62ccc8ae6d32d594a0ef5ab4 Mon Sep 17 00:00:00 2001 From: Cai Xincheng Date: Thu, 31 Oct 2024 17:37:54 +0800 Subject: [PATCH 050/630] change RequireAttrEncrypted to since 14 Signed-off-by: Cai Xincheng Change-Id: I1438c1ec6f9c9c73484b3b281c8b397a698e4db1 --- security/asset/inc/asset_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/asset/inc/asset_type.h b/security/asset/inc/asset_type.h index 8d64e56d5..a214c1928 100755 --- a/security/asset/inc/asset_type.h +++ b/security/asset/inc/asset_type.h @@ -208,7 +208,7 @@ typedef enum { /** * A tag whose value is a bool indicating whether the attributes of an asset are required to be encrypted. * - * @since 13 + * @since 14 */ ASSET_TAG_REQUIRE_ATTR_ENCRYPTED = ASSET_TYPE_BOOL | 0x47, } Asset_Tag; -- Gitee From 74c8fe98637ec2f5cbfd613805d2df564c3bd15d Mon Sep 17 00:00:00 2001 From: yuhaoqiang Date: Fri, 1 Nov 2024 09:58:36 +0800 Subject: [PATCH 051/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9api=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuhaoqiang --- hiviewdfx/hidebug/include/hidebug/hidebug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug.h b/hiviewdfx/hidebug/include/hidebug/hidebug.h index cd9eaa828..7f234b359 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug.h @@ -146,7 +146,7 @@ HiDebug_ErrorCode OH_HiDebug_StopAppTraceCapture(); * {@link HIDEBUG_SUCCESS} Get graphics memory success. * {@link HIDEBUG_INVALID_ARGUMENT} Invalid argument,value is null. * {@link HIDEBUG_TRACE_ABNORMAL} Failed to get the application memory due to a remote exception. - * @since 13 + * @since 14 */ HiDebug_ErrorCode OH_HiDebug_GetGraphicsMemory(uint32_t *value); -- Gitee From d93a226ebe110d789550729f966133c8dd70b3cf Mon Sep 17 00:00:00 2001 From: j00466033 Date: Mon, 28 Oct 2024 19:42:28 +0800 Subject: [PATCH 052/630] JD ndk jsb Signed-off-by: j00466033 --- .../interfaces/native/arkweb_interface.h | 6 + web/webview/interfaces/native/arkweb_type.h | 114 +++++++++++++++++- 2 files changed, 119 insertions(+), 1 deletion(-) diff --git a/web/webview/interfaces/native/arkweb_interface.h b/web/webview/interfaces/native/arkweb_interface.h index b610729ed..f204dab32 100644 --- a/web/webview/interfaces/native/arkweb_interface.h +++ b/web/webview/interfaces/native/arkweb_interface.h @@ -65,6 +65,12 @@ typedef enum { ARKWEB_NATIVE_WEB_MESSAGE, /** API type related to ArkWeb cookie manager. */ ARKWEB_NATIVE_COOKIE_MANAGER, + /** + * @brief API type related to ArkWeb JavaScript value. + * + * @since 14 + */ + ARKWEB_NATIVE_JAVASCRIPT_VALUE, } ArkWeb_NativeAPIVariantKind; /* diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index 449897312..e6738810a 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -68,6 +68,20 @@ typedef enum ArkWeb_WebMessageType { ARKWEB_BUFFER } ArkWeb_WebMessageType; +/** + * @brief Defines the data type carried in a ArkWeb_JavaScriptValue. + * + * @since 14 + */ +typedef enum ArkWeb_JavaScriptValueType { + /** Represent error data */ + ARKWEB_JAVASCRIPT_NONE = 0, + /** The data carried in the ArkWeb_JavaScriptValue is string. */ + ARKWEB_JAVASCRIPT_STRING, + /** The data carried in the ArkWeb_JavaScriptValue is bool. */ + ARKWEB_JAVASCRIPT_BOOL +} ArkWeb_JavaScriptValueType; + /** * @brief Defines the ArkWeb_WebMessage. * @@ -75,6 +89,13 @@ typedef enum ArkWeb_WebMessageType { */ typedef struct ArkWeb_WebMessage* ArkWeb_WebMessagePtr; +/** + * @brief Defines the ArkWeb_JavaScriptValuePtr. + * + * @since 14 + */ +typedef struct ArkWeb_JavaScriptValue* ArkWeb_JavaScriptValuePtr; + /** * @brief Defines the javascript callback of the native ArkWeb. * @@ -91,6 +112,19 @@ typedef void (*ArkWeb_OnJavaScriptCallback)( typedef void (*ArkWeb_OnJavaScriptProxyCallback)( const char* webTag, const ArkWeb_JavaScriptBridgeData* dataArray, size_t arraySize, void* userData); +/** + * @brief Defines the JavaScript proxy callback of the native ArkWeb. + * + * @param webTag The name of the web component. + * @param dataArray The JavaScript bridge data array from HTML. + * @param arraySize The number of elements in the array. + * @param userData The data set by user. + * + * @since 14 + */ +typedef ArkWeb_JavaScriptValuePtr (*ArkWeb_OnJavaScriptProxyCallbackWithResult)( + const char* webTag, const ArkWeb_JavaScriptBridgeData* dataArray, size_t arraySize, void* userData); + /** * @brief Defines the component callback of the native ArkWeb. * @@ -148,6 +182,20 @@ typedef struct { void* userData; } ArkWeb_ProxyMethod; +/** + * @brief Defines the JavaScript proxy method with a return value. + * + * @since 14 + */ +typedef struct { + /** The method of the application side JavaScript object participating in the registration. */ + const char* methodName; + /** The callback function with a return value registered by developer is called back when HTML side uses. */ + ArkWeb_OnJavaScriptProxyCallbackWithResult callback; + /** The user data to set. */ + void* userData; +} ArkWeb_ProxyMethodWithResult; + /** * @brief Defines the javascript proxy registered object. * @@ -162,6 +210,20 @@ typedef struct { size_t size; } ArkWeb_ProxyObject; +/** + * @brief Defines the JavaScript proxy registered object with methodList that has a return value. + * + * @since 14 + */ +typedef struct { + /** The name of the registered object. */ + const char* objName; + /** The JavaScript proxy registered method object list with a callback function that has a return value */ + const ArkWeb_ProxyMethodWithResult* methodList; + /** The size of the methodList. */ + size_t size; +} ArkWeb_ProxyObjectWithResult; + /** * @brief Defines the controller API for native ArkWeb. * Before invoking an API, you are advised to use ARKWEB_MEMBER_MISSING to check @@ -223,6 +285,32 @@ typedef struct { * @since 14 */ const char* (*getLastJavascriptProxyCallingFrameUrl)(); + + /** + * @brief Register the JavaScript object and method list, the method is callback function that has a return value. + * + * @param webTag The name of the web component. + * @param proxyObject The JavaScript object to register, the object has callback functions with return value. + * @param permission The JSON string, which defaults to null, is used to configure the permission control for + * JSBridge, allowing for the definition of URL whitelists at the object and method levels. + * + * @since 14 + */ + void (*registerJavaScriptProxyEx)(const char* webTag, const ArkWeb_ProxyObjectWithResult* proxyObject, + const char* permission); + + /** + * @brief Register the JavaScript object and async method list. + * + * @param webTag The name of the web component. + * @param proxyObject The JavaScript object to register. + * @param permission The JSON string, which defaults to null, is used to configure the permission control + * for JSBridge, allowing for the definition of URL whitelists at the object and method levels. + * + * @since 14 + */ + void (*registerAsyncJavaScriptProxyEx)(const char* webTag, const ArkWeb_ProxyObject* proxyObject, + const char* permission); } ArkWeb_ControllerAPI; /** @@ -353,7 +441,7 @@ typedef struct { typedef struct { /** The ArkWeb_CookieManagerAPI struct size. */ size_t size; - + /** * @brief Obtains the cookie value corresponding to a specified URL. * @@ -408,6 +496,30 @@ typedef struct { void (*clearSessionCookiesSync)(); } ArkWeb_CookieManagerAPI; +/** + * @brief Defines the native JavaScriptValue API for ArkWeb. + * Before invoking an API, you are advised to use ARKWEB_MEMBER_MISSING to check + * whether the function structure has a corresponding function pointer to avoid crash + * caused by mismatch between the SDK and the device ROM. + * + * @since 14 + */ +typedef struct { + /** The ArkWeb_JavaScriptValueAPI struct size. */ + size_t size; + + /** + * @brief Create the JavaScript value responding to HTML. + * + * @param type The type of ArkWeb_JavaScriptValue. + * @param data The data buffer of ArkWeb_JavaScriptValue. + * @param dataLength The length of data buffer. + * @return ArkWeb_JavaScriptValuePtr created by ArkWeb, the memory of ArkWeb_JavaScriptValue + * is managed by ArkWeb itself. + */ + ArkWeb_JavaScriptValuePtr (*createJavaScriptValue)(ArkWeb_JavaScriptValueType type, void* data, size_t dataLength); +} ArkWeb_JavaScriptValueAPI; + /** * @brief Check whether the member variables of the current struct exist. * -- Gitee From 7d421a0aa5687bad8995075bcb12d2b9fa36fdcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BF=9E=E8=B6=85=E9=BA=92?= Date: Fri, 1 Nov 2024 11:42:06 +0800 Subject: [PATCH 053/630] add kit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 俞超麒 --- .../native_color_space_manager/native_color_space_manager.h | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_color_space_manager/native_color_space_manager.h b/graphic/graphic_2d/native_color_space_manager/native_color_space_manager.h index e4634b474..a2528fcb9 100644 --- a/graphic/graphic_2d/native_color_space_manager/native_color_space_manager.h +++ b/graphic/graphic_2d/native_color_space_manager/native_color_space_manager.h @@ -29,6 +29,7 @@ * * @brief Defines the functions for obtaining and using a native colorSpaceManager. * + * @kit ArkGraphics2D * @library libnative_color_space_manager.so * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 13 -- Gitee From f41656beb8aeb7b4f61d540fe82ec3cfc58886c8 Mon Sep 17 00:00:00 2001 From: changleipeng Date: Fri, 1 Nov 2024 15:45:59 +0800 Subject: [PATCH 054/630] add kit Signed-off-by: changleipeng --- graphic/graphic_2d/native_drawing/drawing_text_line.h | 3 +++ graphic/graphic_2d/native_drawing/drawing_text_run.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_line.h b/graphic/graphic_2d/native_drawing/drawing_text_line.h index 760769b4b..256251146 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_line.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_line.h @@ -30,6 +30,9 @@ * * @brief Declares functions related to textLine in the drawing module. * + * @kit ArkGraphics2D + * @library libnative_drawing.so + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @since 14 * @version 1.0 */ diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index b71a197dd..7237fd88c 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -30,6 +30,9 @@ * * @brief Declares functions related to run in the drawing module. * + * @kit ArkGraphics2D + * @library libnative_drawing.so + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @since 14 * @version 1.0 */ -- Gitee From e8c8289f312c59f46efa8b6c438060683990b4d9 Mon Sep 17 00:00:00 2001 From: lihui Date: Sat, 2 Nov 2024 15:07:53 +0800 Subject: [PATCH 055/630] =?UTF-8?q?pts=20api=20=E5=9B=9E=E9=80=8013?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lihui --- graphic/graphic_2d/native_window/external_window.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index f2b57576e..47a407ff0 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -163,15 +163,17 @@ typedef enum NativeWindowOperation { */ GET_SWAP_INTERVAL, /** - * set native window buffer timeout, + * set the timeout in milliseconds when the native window requests a buffer, + * the default value is 3000 milliseconds when not set, * variable parameter in function is - * [in] int32_t timeout. + * [in] int32_t timeout, in milliseconds. */ SET_TIMEOUT, /** - * get native window buffer timeout, + * get the timeout in milliseconds when the native window requests a buffer, + * the default value is 3000 milliseconds when not set, * variable parameter in function is - * [out] int32_t *timeout. + * [out] int32_t *timeout, in milliseconds. */ GET_TIMEOUT, /** @@ -264,7 +266,7 @@ typedef enum NativeWindowOperation { * the desiredPresentTimestamp will be ignored.\n * Variable parameter in function is * [in] int64_t desiredPresentTimestamp. - * @since 14 + * @since 13 */ SET_DESIRED_PRESENT_TIMESTAMP = 24, } NativeWindowOperation; -- Gitee From 8e664635f31976568137e514bb2ae6345a0f3b87 Mon Sep 17 00:00:00 2001 From: Gavin Date: Fri, 1 Nov 2024 17:38:26 +0800 Subject: [PATCH 056/630] feature: pasteboard add interface getMimeTypes Signed-off-by: Gavin --- .../pasteboard/include/oh_pasteboard.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 6ac4336a2..15d489623 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -267,6 +267,18 @@ int OH_Pasteboard_SetData(OH_Pasteboard* pasteboard, OH_UdmfData* data); * @since 13 */ int OH_Pasteboard_ClearData(OH_Pasteboard* pasteboard); + +/** + * @brief Obtains all MIME types of Pasteboard data. + * + * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. + * @param count Poniter to the count of MIME types. + * @return Returns char array of MIME types in the Pasteboard. + * Returns nullptr if the operation is failed. + * @see OH_Pasteboard. + * @since 14 + */ +char **OH_Pasteboard_GetMimeTypes(OH_Pasteboard *pasteboard, unsigned int *count); #ifdef __cplusplus }; #endif -- Gitee From 4b7a102b3ca7218efbbf7923b48326ee7862809e Mon Sep 17 00:00:00 2001 From: huangji731 Date: Sat, 2 Nov 2024 17:03:23 +0800 Subject: [PATCH 057/630] https://gitee.com/openharmony/interface_sdk_c/issues/IB053U Signed-off-by: huangji731 --- arkui/display_manager/BUILD.gn | 2 + arkui/display_manager/libdm.ndk.json | 24 ++++ arkui/display_manager/oh_display_capture.h | 69 ++++++++++ arkui/display_manager/oh_display_info.h | 145 +++++++++++++++++++++ arkui/display_manager/oh_display_manager.h | 58 +++++++++ 5 files changed, 298 insertions(+) create mode 100644 arkui/display_manager/oh_display_capture.h diff --git a/arkui/display_manager/BUILD.gn b/arkui/display_manager/BUILD.gn index bfdc284ac..ba052e0a3 100644 --- a/arkui/display_manager/BUILD.gn +++ b/arkui/display_manager/BUILD.gn @@ -17,6 +17,7 @@ import("//build/ohos/ndk/ndk.gni") ohos_ndk_headers("display_manager_header") { dest_dir = "$ndk_headers_out_dir/window_manager" sources = [ + "oh_display_capture.h", "oh_display_info.h", "oh_display_manager.h", ] @@ -28,6 +29,7 @@ ohos_ndk_library("native_display_manager") { ndk_description_file = "./libdm.ndk.json" system_capability = "SystemCapability.Window.SessionManager" system_capability_headers = [ + "oh_display_capture.h", "oh_display_info.h", "oh_display_manager.h", ] diff --git a/arkui/display_manager/libdm.ndk.json b/arkui/display_manager/libdm.ndk.json index 5efd53561..c86ff6a93 100644 --- a/arkui/display_manager/libdm.ndk.json +++ b/arkui/display_manager/libdm.ndk.json @@ -78,5 +78,29 @@ { "first_instroduced":"12", "name":"OH_NativeDisplayManager_UnregisterDisplayChangeListener" + }, + { + "first_instroduced":"14", + "name":"OH_NativeDisplayManager_CreatePrimaryDisplay" + }, + { + "first_instroduced":"14", + "name":"OH_NativeDisplayManager_CreateDisplayById" + }, + { + "first_instroduced":"14", + "name":"OH_NativeDisplayManager_DestroyDisplay" + }, + { + "first_instroduced":"14", + "name":"OH_NativeDisplayManager_CreateAllDisplays" + }, + { + "first_instroduced":"14", + "name":"OH_NativeDisplayManager_DestroyAllDisplays" + }, + { + "first_instroduced":"14", + "name":"OH_NativeDisplayManager_CaptureScreenPixelmap" } ] \ No newline at end of file diff --git a/arkui/display_manager/oh_display_capture.h b/arkui/display_manager/oh_display_capture.h new file mode 100644 index 000000000..a9fd997b1 --- /dev/null +++ b/arkui/display_manager/oh_display_capture.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup OH_DisplayCapture + * @{ + * + * @brief Defines the data structures for the C APIs of the display module. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 14 + * @version 1.0 + */ + +/** + * @file oh_display_capture.h + * + * @brief Defines the data structures for the C APIs of the display capture. + * + * @kit ArkUI + * @library libnative_display_manager.so + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 14 + * @version 1.0 + */ + +#ifndef OH_NATIVE_DISPLAY_CAPTURE_H +#define OH_NATIVE_DISPLAY_CAPTURE_H + +#include "multimedia/image_framework/image/pixelmap_native.h" +#include "oh_display_info.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Capture a screen pixelmap of the specified display. + * + * @param displayId The ID of the display to be captured. + * @param pixelMap The output pixel map of the captured display. + * @return { @link DISPLAY_MANAGER_OK } If the operation is successful. + * { @link DISPLAY_MANAGER_ERROR_NO_PERMISSION } If no permission. + * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. + * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } If device not support. + * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager.Core + * @since 14 + */ +NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CaptureScreenPixelmap(uint32_t displayId, + OH_PixelmapNative **pixelMap); + +#ifdef __cplusplus +} +#endif +/** @} */ +#endif // OH_NATIVE_DISPLAY_CAPTURE_H diff --git a/arkui/display_manager/oh_display_info.h b/arkui/display_manager/oh_display_info.h index 3b6175884..2a4bda3fb 100644 --- a/arkui/display_manager/oh_display_info.h +++ b/arkui/display_manager/oh_display_info.h @@ -45,6 +45,12 @@ extern "C" { #endif +/** + * @brief display name length + * @since 14 + */ +#define OH_DISPLAY_NAME_LENGTH 32 + /** * @brief Enumerates rotations. * @@ -197,6 +203,145 @@ typedef struct { NativeDisplayManager_WaterfallDisplayAreaRects waterfallDisplayAreaRects; } NativeDisplayManager_CutoutInfo; +/** + * @brief Enumerates of the display state. + * + * @since 14 + * @version 1.0 + */ +typedef enum { + /** display state unknown */ + DISPLAY_MANAGER_DISPLAY_STATE_UNKNOWN = 0, + + /** display state off */ + DISPLAY_MANAGER_DISPLAY_STATE_OFF = 1, + + /** display state on */ + DISPLAY_MANAGER_DISPLAY_STATE_ON = 2, + + /** display state doze */ + DISPLAY_MANAGER_DISPLAY_STATE_DOZE = 3, + + /** display state doze suspend */ + DISPLAY_MANAGER_DISPLAY_STATE_DOZE_SUSPEND = 4, + + /** display state vr */ + DISPLAY_MANAGER_DISPLAY_STATE_VR = 5, + + /** display state on suspend */ + DISPLAY_MANAGER_DISPLAY_STATE_ON_SUSPEND = 6, +} NativeDisplayManager_DisplayState; + +/** + * @brief Defines the display hdr structure. + * + * @since 14 + * @version 1.0 + */ +typedef struct { + /** hdrFormat length */ + uint32_t hdrFormatLength; + + /** hdrFormat pointer */ + uint32_t *hdrFormats; +} NativeDisplayManager_DisplayHdrFormat; + +/** + * @brief Defines the display color space structure. + * + * @since 14 + * @version 1.0 + */ +typedef struct { + /** color space length */ + uint32_t colorSpaceLength; + + /** color space pointer */ + uint32_t *colorSpaces; +} NativeDisplayManager_DisplayColorSpace; + +/** + * @brief Defines the display structure. + * + * @since 14 + * @version 1.0 + */ +typedef struct { + /** display id */ + uint32_t id; + + /** display name */ + char name[OH_DISPLAY_NAME_LENGTH + 1]; + + /** display is alive */ + bool isAlive; + + /** display width */ + int32_t width; + + /** display height */ + int32_t height; + + /** display physical width */ + int32_t physicalWidth; + + /** display physical height */ + int32_t physicalHeight; + + /** display refresh rate */ + uint32_t refreshRate; + + /** display available width */ + uint32_t availableWidth; + + /** display available height */ + uint32_t availableHeight; + + /** display density dpi */ + float densityDPI; + + /** display density pixels */ + float densityPixels; + + /** display scale density */ + float scaledDensity; + + /** display xdpi*/ + float xDPI; + + /** display ydpi */ + float yDPI; + + /** display rotation */ + NativeDisplayManager_Rotation rotation; + + /** display state */ + NativeDisplayManager_DisplayState state; + + /** display orientation */ + NativeDisplayManager_Orientation orientation; + + /** display hdr format */ + NativeDisplayManager_DisplayHdrFormat *hdrFormat; + + /** display color space */ + NativeDisplayManager_DisplayColorSpace *colorSpace; +} NativeDisplayManager_DisplayInfo; + +/** + * @brief Defines the displays structure. + * + * @since 14 + * @version 1.0 + */ +typedef struct { + /** displays length */ + uint32_t displaysLength; + + /** displays pointer */ + NativeDisplayManager_DisplayInfo *displaysInfo; +} NativeDisplayManager_DisplaysInfo; + #ifdef __cplusplus } #endif diff --git a/arkui/display_manager/oh_display_manager.h b/arkui/display_manager/oh_display_manager.h index a3b9f3444..caf6480af 100644 --- a/arkui/display_manager/oh_display_manager.h +++ b/arkui/display_manager/oh_display_manager.h @@ -311,6 +311,64 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterFoldDisplayModeCh */ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterFoldDisplayModeChangeListener(uint32_t listenerIndex); +/** + * @brief Create all displays. + * + * @param allDisplays Output parameter for all displays information. + * @return { @link DISPLAY_MANAGER_OK } If the operation is successful. + * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. + * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager.Core + * @since 14 + */ +NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateAllDisplays( + NativeDisplayManager_DisplaysInfo **allDisplays); + +/** + * @brief Destroy all displays. + * + * @param allDisplays all displays to be free. + * @syscap SystemCapability.Window.SessionManager.Core + * @since 14 + */ +void OH_NativeDisplayManager_DestroyAllDisplays(NativeDisplayManager_DisplaysInfo *allDisplays); + +/** + * @brief Create display information by display id. + * + * @param displayId The display id. + * @param displayInfo The pointer to the display information. + * @return { @link DISPLAY_MANAGER_OK } If the operation is successful. + * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. + * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager.Core + * @since 14 + */ +NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateDisplayById(uint32_t displayId, + NativeDisplayManager_DisplayInfo **displayInfo); + +/** + * @brief Destroy the display information. + * + * @param displayInfo the target display to be free. + * @syscap SystemCapability.Window.SessionManager.Core + * @since 14 + */ +void OH_NativeDisplayManager_DestroyDisplay(NativeDisplayManager_DisplayInfo *displayInfo); + +/** + * @brief Create a primary display. + * + * @param displayInfo The information of the created display. + * @return { @link DISPLAY_MANAGER_OK } If the operation is successful. + * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. + * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager.Core + * @since 14 + */ +NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreatePrimaryDisplay( + NativeDisplayManager_DisplayInfo **displayInfo); + #ifdef __cplusplus } #endif -- Gitee From c4baca0f0dbf3fb4527b4d4be73c135f59c52663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=9C=AA=E6=9D=A5?= Date: Mon, 4 Nov 2024 11:34:54 +0800 Subject: [PATCH 058/630] =?UTF-8?q?=E8=A1=A5=E5=85=85kit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 徐未来 --- BasicServicesKit/time_service.h | 1 + 1 file changed, 1 insertion(+) diff --git a/BasicServicesKit/time_service.h b/BasicServicesKit/time_service.h index c7194a406..b33159e86 100644 --- a/BasicServicesKit/time_service.h +++ b/BasicServicesKit/time_service.h @@ -28,6 +28,7 @@ * * @brief Declares the APIs for obtaining the time zone information. * @library libtime_service_ndk.so + * @kit BasicServicesKit * @syscap SystemCapability.MiscServices.Time * @since 12 */ -- Gitee From de0ab9ff601762b8f9951fed01cdda8626a72017 Mon Sep 17 00:00:00 2001 From: wangcaoyu Date: Mon, 4 Nov 2024 17:19:36 +0800 Subject: [PATCH 059/630] delete README.OpenSource in third_party Signed-off-by: wangcaoyu --- README.OpenSource | 83 -------------------- third_party/egl/README.OpenSource | 11 --- third_party/icu4c/README.OpenSource | 10 --- third_party/libuv/README.OpenSource | 11 --- third_party/mindspore/README.OpenSource | 11 --- third_party/musl/README.OpenSource | 11 --- third_party/node/README.OpenSource | 11 --- third_party/openGLES/README.OpenSource | 11 --- third_party/openSLES/README.OpenSource | 11 --- third_party/vulkan-headers/README.OpenSource | 11 --- third_party/zlib/README.OpenSource | 11 --- 11 files changed, 192 deletions(-) delete mode 100644 README.OpenSource delete mode 100644 third_party/egl/README.OpenSource delete mode 100644 third_party/icu4c/README.OpenSource delete mode 100644 third_party/libuv/README.OpenSource delete mode 100644 third_party/mindspore/README.OpenSource delete mode 100644 third_party/musl/README.OpenSource delete mode 100644 third_party/node/README.OpenSource delete mode 100644 third_party/openGLES/README.OpenSource delete mode 100644 third_party/openSLES/README.OpenSource delete mode 100644 third_party/vulkan-headers/README.OpenSource delete mode 100644 third_party/zlib/README.OpenSource diff --git a/README.OpenSource b/README.OpenSource deleted file mode 100644 index 0b04b76a8..000000000 --- a/README.OpenSource +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "Name" : "zlib", - "License" : "zlib/libpng License", - "License File" : "LICENSE", - "Version Number" : "v1.2.12", - "Owner" : "gongjunsong@huawei.com", - "Upstream URL" : "https://github.com/madler/zlib/archive/refs/tags/v1.2.12.tar.gz", - "Description" : "zlib 1.2.12 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files" - }, - { - "Name": "libuv", - "License": "MIT License", - "License File": "LICENSE", - "Version Number": "v1.44.1", - "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." - }, - { - "Name": "MindSpore", - "License": "Apache License 2.0", - "License File": "LICENSE.txt", - "Version Number": "1.8.1", - "Owner": "zhuguodong0001@163.com", - "Upstream URL": "https://gitee.com/mindspore/mindspore/repository/archive/v1.8.1", - "Description": "MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios." - }, - { - "Name" : "musl", - "License" : "MIT License", - "License File" : "COPYRIGHT", - "Version Number" : "1.2.5", - "Owner" : "zhaoxinyuan9@huawei.com", - "Upstream URL" : "https://musl.libc.org", - "Description" : "musl is an MIT-licensed implementation of the standard C library" - }, - { - "Name": "node", - "License": "ISC License,Public Domain,MIT License,Free Software Foundation - MIT License,Apache License V2.0,ICU License,zlib/libpng License,BSD 2-Clause License,BSD 3-Clause License", - "License File": "LICENSE", - "Version Number": "14.21.2", - "Owner": "sunbingxin@huawei.com", - "Upstream URL": "http://www.nodejs.org/", - "Description": "Node.js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser." - }, - { - "Name": "Khronos Group - OpenSL ES", - "License": "null", - "License File": "NOTICE", - "Version Number": "1.0.1", - "Owner": "yangshuai67@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/OpenSL-ES-Registry.git", - "Description": "OpenSL ES™ is a royalty-free, cross-platform, hardware-accelerated audio API tuned for embedded systems." - }, - { - "Name": "EGL", - "License": "MIT License", - "License File": "LICENSE", - "Version Number": "1.5", - "Owner": "lizheng2@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/EGL-Registry.git", - "Description": "EGL is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system." - }, - { - "Name": "openGLES", - "License": "Apache-2.0", - "License File": "NOTICE", - "Version Number": "a301c9b4600e4074008b93fba17744a859fb763b", - "Owner": "lizheng2@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/OpenGL-Registry.git", - "Description": "The OpenGL ES registry contains specifications of the core API and shading language; specifications of Khronos- and vendor-approved OpenGL ES extensions; header files corresponding to the specificatio" - }, - { - "Name": "Vulkan", - "License": "Apache-2.0", - "License File": "LICENSE", - "Version Number": "v1.3.231", - "Owner": "mengzhaobing@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/Vulkan-Headers.git", - "Description": "Vulkan header files and API registry" - } -] diff --git a/third_party/egl/README.OpenSource b/third_party/egl/README.OpenSource deleted file mode 100644 index 4693a6581..000000000 --- a/third_party/egl/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name": "EGL", - "License": "MIT License", - "License File": "LICENSE", - "Version Number": "1.5", - "Owner": "lizheng2@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/EGL-Registry.git", - "Description": "EGL is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system." - } -] diff --git a/third_party/icu4c/README.OpenSource b/third_party/icu4c/README.OpenSource deleted file mode 100644 index ec3f8592f..000000000 --- a/third_party/icu4c/README.OpenSource +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "Name": "International Components for Unicode", - "License": "ICU License, BSD 3-Clause License", - "License File": "LICENSE", - "Version Number": "72.1", - "Upstream URL": "https://github.com/unicode-org/icu/archive/release-72-1.tar.gz", - "Description": "ICU is a mature, widely used set of portable C/C++ and Java libraries for Unicode support, software internationalization and globalization (i18n/g11n). The packages are mirrors of the main website." - } -] diff --git a/third_party/libuv/README.OpenSource b/third_party/libuv/README.OpenSource deleted file mode 100644 index 5b25fcf7c..000000000 --- a/third_party/libuv/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name": "libuv", - "License": "MIT License", - "License File": "LICENSE", - "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." - } -] diff --git a/third_party/mindspore/README.OpenSource b/third_party/mindspore/README.OpenSource deleted file mode 100644 index bd6c7775a..000000000 --- a/third_party/mindspore/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name": "MindSpore", - "License": "Apache License 2.0", - "License File": "LICENSE.txt", - "Version Number": "2.1.0", - "Owner": "chengfeng27@huawei.com", - "Upstream URL": "https://gitee.com/mindspore/mindspore/repository/archive/v2.1.0", - "Description": "MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios." - } -] diff --git a/third_party/musl/README.OpenSource b/third_party/musl/README.OpenSource deleted file mode 100644 index ed40042f9..000000000 --- a/third_party/musl/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name" : "musl", - "License" : "MIT License", - "License File" : "COPYRIGHT", - "Version Number" : "1.2.5", - "Owner" : "zhaoxinyuan9@huawei.com", - "Upstream URL" : "https://musl.libc.org", - "Description" : "musl is an MIT-licensed implementation of the standard C library" - } -] diff --git a/third_party/node/README.OpenSource b/third_party/node/README.OpenSource deleted file mode 100644 index 28991b992..000000000 --- a/third_party/node/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name": "node", - "License": "ISC License,Public Domain,MIT License,Free Software Foundation - MIT License,Apache License V2.0,ICU License,zlib/libpng License,BSD 2-Clause License,BSD 3-Clause License", - "License File": "LICENSE", - "Version Number": "v18.20.1", - "Owner": "sunbingxin@huawei.com", - "Upstream URL": "http://www.nodejs.org/", - "Description": "Node.js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser." - } -] diff --git a/third_party/openGLES/README.OpenSource b/third_party/openGLES/README.OpenSource deleted file mode 100644 index 82565035b..000000000 --- a/third_party/openGLES/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name": "openGLES", - "License": "Apache-2.0", - "License File": "NOTICE", - "Version Number": "63161d674db04a96635c6ab300db793e83f6762c", - "Owner": "lizheng2@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/OpenGL-Registry.git", - "Description": "The OpenGL ES registry contains specifications of the core API and shading language; specifications of Khronos- and vendor-approved OpenGL ES extensions; header files corresponding to the specificatio" - } -] diff --git a/third_party/openSLES/README.OpenSource b/third_party/openSLES/README.OpenSource deleted file mode 100644 index 2eda1e4fd..000000000 --- a/third_party/openSLES/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name": "Khronos Group - OpenSL ES", - "License": "null", - "License File": "NOTICE", - "Version Number": "1.0.1", - "Owner": "yangshuai67@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/OpenSL-ES-Registry.git", - "Description": "OpenSL ES™ is a royalty-free, cross-platform, hardware-accelerated audio API tuned for embedded systems." - } -] \ No newline at end of file diff --git a/third_party/vulkan-headers/README.OpenSource b/third_party/vulkan-headers/README.OpenSource deleted file mode 100644 index 97fefa261..000000000 --- a/third_party/vulkan-headers/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name": "Vulkan", - "License": "Apache-2.0", - "License File": "LICENSE", - "Version Number": "v1.3.275", - "Owner": "mengzhaobing@huawei.com", - "Upstream URL": "https://github.com/KhronosGroup/Vulkan-Headers.git", - "Description": "Vulkan header files and API registry" - } -] diff --git a/third_party/zlib/README.OpenSource b/third_party/zlib/README.OpenSource deleted file mode 100644 index e3a0accc9..000000000 --- a/third_party/zlib/README.OpenSource +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "Name" : "zlib", - "License" : "zlib/libpng License", - "License File" : "LICENSE", - "Version Number" : "v1.3.1", - "Owner" : "gongjunsong@huawei.com", - "Upstream URL" : "https://github.com/madler/zlib/archive/refs/tags/v1.3.1.tar.gz", - "Description" : "zlib 1.3.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files" - } -] -- Gitee From 54e92c22c8b6fbb77965a0298db712ec2c71cc7a Mon Sep 17 00:00:00 2001 From: huaxin Date: Tue, 5 Nov 2024 09:26:43 +0800 Subject: [PATCH 060/630] bugfix: compilation failed due to lack of header file dependencies Signed-off-by: huaxin Change-Id: I69c59fde006ea263211e791fd2c5ef6930826451 --- network/netmanager/include/net_connection_type.h | 1 + 1 file changed, 1 insertion(+) diff --git a/network/netmanager/include/net_connection_type.h b/network/netmanager/include/net_connection_type.h index e52b40d06..40e80760b 100644 --- a/network/netmanager/include/net_connection_type.h +++ b/network/netmanager/include/net_connection_type.h @@ -38,6 +38,7 @@ * */ +#include #include #include -- Gitee From 0735173ea5019d0f3caed1d72d73ff86ca540299 Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Wed, 6 Nov 2024 06:42:22 +0000 Subject: [PATCH 061/630] add sdk c Signed-off-by: Feng Lin --- multimedia/media_foundation/native_averrors.h | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index edecfa2a8..546aff716 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -107,6 +107,173 @@ typedef enum OH_AVErrCode { * @since 12 */ AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION = 301, + /** + * @the address of server is incorrect, and IO can not find host. + * @since 14 + */ + AV_ERR_IO_CANNOT_FIND_HOST = 5411001, + /** + * @network connection timeout. + * @since 14 + */ + AV_ERR_IO_CONNECTION_TIMEOUT = 5411002, + /** + * @failed link due to abnormal network. + * @since 14 + */ + AV_ERR_IO_NETWORK_ABNORMAL = 5411003, + /** + * @failed link due to unavailable network. + * @since 14 + */ + AV_ERR_IO_NETWORK_UNAVAILABLE = 5411004, + /** + * @network permission dennied. + * @since 14 + */ + AV_ERR_IO_NO_PERMISSION = 5411005, + /** + * @the client request parameters are incorrect or exceed the processing capacity. + * @since 14 + */ + AV_ERR_IO_NETWORK_ACCESS_DENIED = 5411006, + /** + * @cannot find available network resources. + * @since 14 + */ + AV_ERR_IO_RESOURE_NOT_FOUND = 5411007, + /** + * @the server failS to verify the client certificate because the certificate is not carried, + * the certificate is invalid, or the certificate is expired. + * @since 14 + */ + AV_ERR_IO_SSL_CLIENT_CERT_NEEDED = 5411008, + /** + * @the client fails to verify the server certificate because the certificate is not carried, + * the certificate is invalid, or the certificate is expired. + * @since 14 + */ + AV_ERR_IO_SSL_CONNECT_FAIL = 5411009, + /** + * @IO SSL server cert untrusted. + * @since 14 + */ + AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED = 5411010, + /** + * @unsupported request due to network protocols. + * @since 14 + */ + AV_ERR_IO_UNSUPPORTTED_REQUEST = 5411011, + /** + * @file data is incorrect, and no specific data can be provided. + * @since 14 + */ + AV_ERR_IO_DATA_ABNORMAL = 5411012, + /** + * @file is occupied by other processes and cannot be accessed. + * @since 14 + */ + AV_ERR_IO_FILE_ACCESS_DENIED = 5411013, + /** + * @the file handle is incorrect. + * @since 14 + */ + AV_ERR_IO_FILE_BAD_HANDLE = 5411014, + /** + * @IO file not found. + * @since 14 + */ + AV_ERR_IO_FILE_NOT_FOUND = 5411015, + /** + * @IO file permission denied because API does not have permissions. + * @since 14 + */ + AV_ERR_IO_FILE_PERMISSION_DENIED = 5411016, + /** + * @fail to decode the audio data. + * @since 14 + */ + AV_ERR_IO_AUDIO_DEC_FAILED = 5411017, + /** + * @fail to init the audio decoder. + * @since 14 + */ + AV_ERR_IO_AUDIO_DEC_INIT_FAILED = 5411018, + /** + * @the audio decoder is unavailable for handler incurrupt, or audio decoder subsystem abnormal. + * @since 14 + */ + AV_ERR_IO_AUDIO_DEC_UNAVAILABLE = 5411019, + /** + * @audio device error. + * @since 14 + */ + AV_ERR_IO_AUDIO_DEVICE_ERROR = 5411020, + /** + * @audio device state does not support the current operation. + * @since 14 + */ + AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE = 5411021, + /** + * @audio device timeout when calling audio render interface. + * @since 14 + */ + AV_ERR_IO_AUDIO_DEVICE_TIMEOUT = 5411022, + /** + * @audio device unavailable, unable to create an audio device. + * @since 14 + */ + AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE = 5411023, + /** + * @fail to encode the audio data. + * @since 14 + */ + AV_ERR_IO_AUDIO_ENC_FAILED = 5411024, + /** + * @fail to init the audio encoder. + * @since 14 + */ + AV_ERR_IO_AUDIO_ENC_INIT_FAILED = 5411025, + /** + * @audio encoder is unavailable for handler incurrupt, or audio encoder subsystem abnormal. + * @since 14 + */ + AV_ERR_IO_AUDIO_ENC_UNAVAILABLE = 5411026, + /** + * @fail to decode the video data. + * @since 14 + */ + AV_ERR_IO_VIDEO_DEC_FAILED = 5411027, + /** + * @fail to init the video decoder. + * @since 14 + */ + AV_ERR_IO_VIDEO_DEC_INIT_FAILED = 5411028, + /** + * @video decoder is unavailable for handler incurrupt, or video decoder subsystem abnormal. + * @since 14 + */ + AV_ERR_IO_VIDEO_DEC_UNAVAILABLE = 5411029, + /** + * @video device error. + * @since 14 + */ + AV_ERR_IO_VIDEO_DEVICE_ERROR = 5411030, + /** + * @fail to encode the video data. + * @since 14 + */ + AV_ERR_IO_VIDEO_ENC_FAILED = 5411031, + /** + * @fail to init the video encoder. + * @since 14 + */ + AV_ERR_IO_VIDEO_ENC_INIT_FAILED = 5411032, + /** + * @video encoder is unavailable for handler incurrupt, or video encoder subsystem abnormal. + * @since 14 + */ + AV_ERR_IO_VIDEO_ENC_UNAVAILABLE = 5411033, } OH_AVErrCode; #ifdef __cplusplus -- Gitee From 40db0c8517ebafcd5e0ecffc027ec3a08671a856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B0=B8=E5=BF=A0?= Date: Wed, 6 Nov 2024 10:42:19 +0000 Subject: [PATCH 062/630] update api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王永忠 --- DataProtectionKit/dlp_permission_api.h | 20 ++++++++++---------- DataProtectionKit/libdlppermission.ndk.json | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/DataProtectionKit/dlp_permission_api.h b/DataProtectionKit/dlp_permission_api.h index 057c0fd32..40ec9c347 100644 --- a/DataProtectionKit/dlp_permission_api.h +++ b/DataProtectionKit/dlp_permission_api.h @@ -19,7 +19,7 @@ * * @brief Provides the capability to access the data loss prevention (DLP) files. * - * @since 13 + * @since 14 */ /** @@ -30,7 +30,7 @@ * @library libohdlp_permission.so * @kit DataProtectionKit * @syscap SystemCapability.Security.DataLossPrevention - * @since 13 + * @since 14 */ #ifndef DLP_PERMISSION_API_H @@ -46,7 +46,7 @@ extern "C" { /** * @brief Enumerates the error codes. * - * @since 13 + * @since 14 */ typedef enum { /** @error The operation is successful. */ @@ -68,7 +68,7 @@ typedef enum { /** * @brief Enumerates the access permissions for a DLP file. * - * @since 13 + * @since 14 */ typedef enum { /** No permission. */ @@ -93,7 +93,7 @@ typedef enum { * {@link DLP_ErrCode#ERR_OH_SYSTEM_SERVICE_EXCEPTION} 19100011 - If the system ability * works abnormally. * {@link DLP_ErrCode#ERR_OH_OUT_OF_MEMORY} 19100012 - If the memory error. - * @since 13 + * @since 14 */ DLP_ErrCode OH_DLP_GetDlpPermissionInfo(DLP_FileAccess *dlpFileAccess, uint32_t *flags); @@ -106,7 +106,7 @@ DLP_ErrCode OH_DLP_GetDlpPermissionInfo(DLP_FileAccess *dlpFileAccess, uint32_t * @return {@link DLP_ErrCode#ERR_OH_SUCCESS} 0 - If the operation is successful. * {@link DLP_ErrCode#ERR_OH_INVALID_PARAMS} 19100001 - If the parameter value is invalid. * {@link DLP_ErrCode#ERR_OH_OUT_OF_MEMORY} 19100012 - If the memory error. - * @since 13 + * @since 14 */ DLP_ErrCode OH_DLP_GetOriginalFileName(const char *fileName, char **originalFileName); @@ -119,7 +119,7 @@ DLP_ErrCode OH_DLP_GetOriginalFileName(const char *fileName, char **originalFile * {@link DLP_ErrCode#ERR_OH_SYSTEM_SERVICE_EXCEPTION} 19100011 - If the system ability * works abnormally. * {@link DLP_ErrCode#ERR_OH_OUT_OF_MEMORY} 19100012 - If the memory error. - * @since 13 + * @since 14 */ DLP_ErrCode OH_DLP_IsInSandbox(bool *isInSandbox); @@ -134,7 +134,7 @@ DLP_ErrCode OH_DLP_IsInSandbox(bool *isInSandbox); * {@link DLP_ErrCode#ERR_OH_SYSTEM_SERVICE_EXCEPTION} 19100011 - If the system ability * works abnormally. * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If not authorized application. - * @since 13 + * @since 14 */ DLP_ErrCode OH_DLP_SetSandboxAppConfig(const char *configInfo); @@ -147,7 +147,7 @@ DLP_ErrCode OH_DLP_SetSandboxAppConfig(const char *configInfo); * works abnormally. * {@link DLP_ErrCode#ERR_OH_OUT_OF_MEMORY} 19100012 - If the memory error. * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If not authorized application. - * @since 13 + * @since 14 */ DLP_ErrCode OH_DLP_GetSandboxAppConfig(char **configInfo); @@ -160,7 +160,7 @@ DLP_ErrCode OH_DLP_GetSandboxAppConfig(char **configInfo); * {@link DLP_ErrCode#ERR_OH_SYSTEM_SERVICE_EXCEPTION} 19100011 - If the system ability * works abnormally. * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If not authorized application. - * @since 13 + * @since 14 */ DLP_ErrCode OH_DLP_CleanSandboxAppConfig(); diff --git a/DataProtectionKit/libdlppermission.ndk.json b/DataProtectionKit/libdlppermission.ndk.json index 6de2fcd87..613734f7d 100644 --- a/DataProtectionKit/libdlppermission.ndk.json +++ b/DataProtectionKit/libdlppermission.ndk.json @@ -1,26 +1,26 @@ [ { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_DLP_GetDlpPermissionInfo" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_DLP_GetOriginalFileName" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_DLP_IsInSandbox" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_DLP_SetSandboxAppConfig" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_DLP_GetSandboxAppConfig" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_DLP_CleanSandboxAppConfig" } ] \ No newline at end of file -- Gitee From 281a45dd3c72bdf7edb1df0c444bc7656d62a776 Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Wed, 6 Nov 2024 13:22:12 +0000 Subject: [PATCH 063/630] ad Signed-off-by: Feng Lin --- multimedia/player_framework/avplayer.h | 37 +++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h index ce355909a..44df386ea 100644 --- a/multimedia/player_framework/avplayer.h +++ b/multimedia/player_framework/avplayer.h @@ -587,7 +587,42 @@ OH_AVErrCode OH_AVPlayer_SetOnInfoCallback(OH_AVPlayer *player, OH_AVPlayerOnInf * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input player is null or player SetOnErrorCallback failed. - * @since 12 + * {@link AV_ERR_IO_CANNOT_FIND_HOST} if the address of server is incorrect, and IO can not find host. + * {@link AV_ERR_IO_CONNECTION_TIMEOUT} if network connection timeout. + * {@link AV_ERR_IO_NETWORK_ABNORMAL} if link failed due to abnormal network. + * {@link AV_ERR_IO_NETWORK_UNAVAILABLE} if link failed due to unavailable network. + * {@link AV_ERR_IO_NO_PERMISSION} if network permission dennied. + * {@link AV_ERR_IO_NETWORK_ACCESS_DENIED} if the client request parameters are incorrect or exceed the processing capacity. + * {@link AV_ERR_IO_RESOURE_NOT_FOUND} cannot find available network resources. + * {@link AV_ERR_IO_SSL_CLIENT_CERT_NEEDED} if the server failS to verify the client certificate because the certificate is not carried, + * the certificate is invalid, or the certificate is expired. + * {@link AV_ERR_IO_SSL_CONNECT_FAIL} if the client fails to verify the server certificate because the certificate is not carried, + * the certificate is invalid, or the certificate is expired. + * {@link AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED} if IO SSL server cert untrusted. + * {@link AV_ERR_IO_UNSUPPORTTED_REQUEST} if unsupported request due to network protocols. + * {@link AV_ERR_IO_DATA_ABNORMAL} if file data is incorrect, and no specific data can be provided. + * {@link AV_ERR_IO_FILE_ACCESS_DENIED} if file is occupied by other processes and cannot be accessed. + * {@link AV_ERR_IO_FILE_BAD_HANDLE} if the file handle is incorrect. + * {@link AV_ERR_IO_FILE_NOT_FOUND} if IO file not found. + * {@link AV_ERR_IO_FILE_PERMISSION_DENIED} if IO file permission denied because API does not have permissions. + * {@link AV_ERR_IO_AUDIO_DEC_FAILED} if player fails to decode the audio data. + * {@link AV_ERR_IO_AUDIO_DEC_INIT_FAILED} if player fail to init the audio decoder. + * {@link AV_ERR_IO_AUDIO_DEC_UNAVAILABLE} if the audio decoder is unavailable for handler incurrupt, or audio decoder subsystem abnormal. + * {@link AV_ERR_IO_AUDIO_DEVICE_ERROR} if audio device error. + * {@link AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE} if audio device state does not support the current operation. + * {@link AV_ERR_IO_AUDIO_DEVICE_TIMEOUT} if audio device timeout when calling audio render interface. + * {@link AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE} if audio device unavailable, unable to create an audio device. + * {@link AV_ERR_IO_AUDIO_ENC_FAILED} if player fails to encode the audio data. + * {@link AV_ERR_IO_AUDIO_ENC_INIT_FAILED} if player fails to init the video decoder. + * {@link AV_ERR_IO_AUDIO_ENC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, or video decoder subsystem abnormal. + * {@link AV_ERR_IO_VIDEO_DEC_FAILED} if player fails to decode the video data. + * {@link AV_ERR_IO_VIDEO_DEC_INIT_FAILED} if player fails to init the video decoder. + * {@link AV_ERR_IO_VIDEO_DEC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, or video decoder subsystem abnormal. + * {@link AV_ERR_IO_VIDEO_DEVICE_ERROR} if video device error. + * {@link AV_ERR_IO_VIDEO_ENC_FAILED} if player fails to encode the video data. + * {@link AV_ERR_IO_VIDEO_ENC_INIT_FAILED} if player fails to init the video encoder. + * {@link AV_ERR_IO_VIDEO_ENC_UNAVAILABLE} if video encoder is unavailable for handler incurrupt, or video encoder subsystem abnormal. + * @since 14 */ OH_AVErrCode OH_AVPlayer_SetOnErrorCallback(OH_AVPlayer *player, OH_AVPlayerOnErrorCallback callback, void *userData); -- Gitee From 6aa9a2a3151dc7a973e2a0c8b9d6507859fccf1b Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Thu, 7 Nov 2024 02:33:15 +0000 Subject: [PATCH 064/630] ad Signed-off-by: Feng Lin --- multimedia/player_framework/avplayer.h | 37 +----------------- multimedia/player_framework/avplayer_base.h | 42 +++++++++++++++++++++ 2 files changed, 43 insertions(+), 36 deletions(-) diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h index 44df386ea..ce355909a 100644 --- a/multimedia/player_framework/avplayer.h +++ b/multimedia/player_framework/avplayer.h @@ -587,42 +587,7 @@ OH_AVErrCode OH_AVPlayer_SetOnInfoCallback(OH_AVPlayer *player, OH_AVPlayerOnInf * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input player is null or player SetOnErrorCallback failed. - * {@link AV_ERR_IO_CANNOT_FIND_HOST} if the address of server is incorrect, and IO can not find host. - * {@link AV_ERR_IO_CONNECTION_TIMEOUT} if network connection timeout. - * {@link AV_ERR_IO_NETWORK_ABNORMAL} if link failed due to abnormal network. - * {@link AV_ERR_IO_NETWORK_UNAVAILABLE} if link failed due to unavailable network. - * {@link AV_ERR_IO_NO_PERMISSION} if network permission dennied. - * {@link AV_ERR_IO_NETWORK_ACCESS_DENIED} if the client request parameters are incorrect or exceed the processing capacity. - * {@link AV_ERR_IO_RESOURE_NOT_FOUND} cannot find available network resources. - * {@link AV_ERR_IO_SSL_CLIENT_CERT_NEEDED} if the server failS to verify the client certificate because the certificate is not carried, - * the certificate is invalid, or the certificate is expired. - * {@link AV_ERR_IO_SSL_CONNECT_FAIL} if the client fails to verify the server certificate because the certificate is not carried, - * the certificate is invalid, or the certificate is expired. - * {@link AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED} if IO SSL server cert untrusted. - * {@link AV_ERR_IO_UNSUPPORTTED_REQUEST} if unsupported request due to network protocols. - * {@link AV_ERR_IO_DATA_ABNORMAL} if file data is incorrect, and no specific data can be provided. - * {@link AV_ERR_IO_FILE_ACCESS_DENIED} if file is occupied by other processes and cannot be accessed. - * {@link AV_ERR_IO_FILE_BAD_HANDLE} if the file handle is incorrect. - * {@link AV_ERR_IO_FILE_NOT_FOUND} if IO file not found. - * {@link AV_ERR_IO_FILE_PERMISSION_DENIED} if IO file permission denied because API does not have permissions. - * {@link AV_ERR_IO_AUDIO_DEC_FAILED} if player fails to decode the audio data. - * {@link AV_ERR_IO_AUDIO_DEC_INIT_FAILED} if player fail to init the audio decoder. - * {@link AV_ERR_IO_AUDIO_DEC_UNAVAILABLE} if the audio decoder is unavailable for handler incurrupt, or audio decoder subsystem abnormal. - * {@link AV_ERR_IO_AUDIO_DEVICE_ERROR} if audio device error. - * {@link AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE} if audio device state does not support the current operation. - * {@link AV_ERR_IO_AUDIO_DEVICE_TIMEOUT} if audio device timeout when calling audio render interface. - * {@link AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE} if audio device unavailable, unable to create an audio device. - * {@link AV_ERR_IO_AUDIO_ENC_FAILED} if player fails to encode the audio data. - * {@link AV_ERR_IO_AUDIO_ENC_INIT_FAILED} if player fails to init the video decoder. - * {@link AV_ERR_IO_AUDIO_ENC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, or video decoder subsystem abnormal. - * {@link AV_ERR_IO_VIDEO_DEC_FAILED} if player fails to decode the video data. - * {@link AV_ERR_IO_VIDEO_DEC_INIT_FAILED} if player fails to init the video decoder. - * {@link AV_ERR_IO_VIDEO_DEC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, or video decoder subsystem abnormal. - * {@link AV_ERR_IO_VIDEO_DEVICE_ERROR} if video device error. - * {@link AV_ERR_IO_VIDEO_ENC_FAILED} if player fails to encode the video data. - * {@link AV_ERR_IO_VIDEO_ENC_INIT_FAILED} if player fails to init the video encoder. - * {@link AV_ERR_IO_VIDEO_ENC_UNAVAILABLE} if video encoder is unavailable for handler incurrupt, or video encoder subsystem abnormal. - * @since 14 + * @since 12 */ OH_AVErrCode OH_AVPlayer_SetOnErrorCallback(OH_AVPlayer *player, OH_AVPlayerOnErrorCallback callback, void *userData); diff --git a/multimedia/player_framework/avplayer_base.h b/multimedia/player_framework/avplayer_base.h index 8a3b311fc..8f85acae3 100644 --- a/multimedia/player_framework/avplayer_base.h +++ b/multimedia/player_framework/avplayer_base.h @@ -398,6 +398,48 @@ typedef void (*OH_AVPlayerOnError)(OH_AVPlayer *player, int32_t errorCode, const * @syscap SystemCapability.Multimedia.Media.AVPlayer * @param player The pointer to an OH_AVPlayer instance. * @param errorCode Error code. + * {@link AV_ERR_IO_CANNOT_FIND_HOST} if the address of server is incorrect, and IO can not find host. + * {@link AV_ERR_IO_CONNECTION_TIMEOUT} if network connection timeout. + * {@link AV_ERR_IO_NETWORK_ABNORMAL} if link failed due to abnormal network. + * {@link AV_ERR_IO_NETWORK_UNAVAILABLE} if link failed due to unavailable network. + * {@link AV_ERR_IO_NO_PERMISSION} if network permission dennied. + * {@link AV_ERR_IO_NETWORK_ACCESS_DENIED} if the client request parameters are incorrect or exceed + * the processing capacity. + * {@link AV_ERR_IO_RESOURE_NOT_FOUND} cannot find available network resources. + * {@link AV_ERR_IO_SSL_CLIENT_CERT_NEEDED} if the server failS to verify the client certificate + * because the certificate is not carried, + * the certificate is invalid, or the certificate is expired. + * {@link AV_ERR_IO_SSL_CONNECT_FAIL} if the client fails to verify the server certificate because the + * certificate is not carried, + * the certificate is invalid, or the certificate is expired. + * {@link AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED} if IO SSL server cert untrusted. + * {@link AV_ERR_IO_UNSUPPORTTED_REQUEST} if unsupported request due to network protocols. + * {@link AV_ERR_IO_DATA_ABNORMAL} if file data is incorrect, and no specific data can be provided. + * {@link AV_ERR_IO_FILE_ACCESS_DENIED} if file is occupied by other processes and cannot be accessed. + * {@link AV_ERR_IO_FILE_BAD_HANDLE} if the file handle is incorrect. + * {@link AV_ERR_IO_FILE_NOT_FOUND} if IO file not found. + * {@link AV_ERR_IO_FILE_PERMISSION_DENIED} if IO file permission denied because API does not have permissions. + * {@link AV_ERR_IO_AUDIO_DEC_FAILED} if player fails to decode the audio data. + * {@link AV_ERR_IO_AUDIO_DEC_INIT_FAILED} if player fail to init the audio decoder. + * {@link AV_ERR_IO_AUDIO_DEC_UNAVAILABLE} if the audio decoder is unavailable for handler incurrupt, + * or audio decoder subsystem abnormal. + * {@link AV_ERR_IO_AUDIO_DEVICE_ERROR} if audio device error. + * {@link AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE} if audio device state does not support the current operation. + * {@link AV_ERR_IO_AUDIO_DEVICE_TIMEOUT} if audio device timeout when calling audio render interface. + * {@link AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE} if audio device unavailable, unable to create an audio device. + * {@link AV_ERR_IO_AUDIO_ENC_FAILED} if player fails to encode the audio data. + * {@link AV_ERR_IO_AUDIO_ENC_INIT_FAILED} if player fails to init the video decoder. + * {@link AV_ERR_IO_AUDIO_ENC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, + * or video decoder subsystem abnormal. + * {@link AV_ERR_IO_VIDEO_DEC_FAILED} if player fails to decode the video data. + * {@link AV_ERR_IO_VIDEO_DEC_INIT_FAILED} if player fails to init the video decoder. + * {@link AV_ERR_IO_VIDEO_DEC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, + * or video decoder subsystem abnormal. + * {@link AV_ERR_IO_VIDEO_DEVICE_ERROR} if video device error. + * {@link AV_ERR_IO_VIDEO_ENC_FAILED} if player fails to encode the video data. + * {@link AV_ERR_IO_VIDEO_ENC_INIT_FAILED} if player fails to init the video encoder. + * {@link AV_ERR_IO_VIDEO_ENC_UNAVAILABLE} if video encoder is unavailable for handler incurrupt, + * or video encoder subsystem abnormal. * @param errorMsg Error message, only valid in callback function. * @param userData Pointer to user specific data. * @since 12 -- Gitee From 479b9919058a4c081f7a514c0f83726952af3cb5 Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Thu, 7 Nov 2024 02:40:56 +0000 Subject: [PATCH 065/630] prove codecheck Signed-off-by: Feng Lin --- multimedia/player_framework/avplayer_base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multimedia/player_framework/avplayer_base.h b/multimedia/player_framework/avplayer_base.h index 8f85acae3..d9c66ec53 100644 --- a/multimedia/player_framework/avplayer_base.h +++ b/multimedia/player_framework/avplayer_base.h @@ -418,7 +418,8 @@ typedef void (*OH_AVPlayerOnError)(OH_AVPlayer *player, int32_t errorCode, const * {@link AV_ERR_IO_FILE_ACCESS_DENIED} if file is occupied by other processes and cannot be accessed. * {@link AV_ERR_IO_FILE_BAD_HANDLE} if the file handle is incorrect. * {@link AV_ERR_IO_FILE_NOT_FOUND} if IO file not found. - * {@link AV_ERR_IO_FILE_PERMISSION_DENIED} if IO file permission denied because API does not have permissions. + * {@link AV_ERR_IO_FILE_PERMISSION_DENIED} if IO file permission denied because API does not + * have permissions. * {@link AV_ERR_IO_AUDIO_DEC_FAILED} if player fails to decode the audio data. * {@link AV_ERR_IO_AUDIO_DEC_INIT_FAILED} if player fail to init the audio decoder. * {@link AV_ERR_IO_AUDIO_DEC_UNAVAILABLE} if the audio decoder is unavailable for handler incurrupt, -- Gitee From f02768b791e6dd2b1649424af571ebb399b9b74e Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Thu, 7 Nov 2024 02:46:24 +0000 Subject: [PATCH 066/630] ad change Signed-off-by: Feng Lin --- multimedia/player_framework/avplayer_base.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/avplayer_base.h b/multimedia/player_framework/avplayer_base.h index d9c66ec53..02a121290 100644 --- a/multimedia/player_framework/avplayer_base.h +++ b/multimedia/player_framework/avplayer_base.h @@ -425,9 +425,10 @@ typedef void (*OH_AVPlayerOnError)(OH_AVPlayer *player, int32_t errorCode, const * {@link AV_ERR_IO_AUDIO_DEC_UNAVAILABLE} if the audio decoder is unavailable for handler incurrupt, * or audio decoder subsystem abnormal. * {@link AV_ERR_IO_AUDIO_DEVICE_ERROR} if audio device error. - * {@link AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE} if audio device state does not support the current operation. + * {@link AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE} if audio device state does not support current operation. * {@link AV_ERR_IO_AUDIO_DEVICE_TIMEOUT} if audio device timeout when calling audio render interface. - * {@link AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE} if audio device unavailable, unable to create an audio device. + * {@link AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE} if audio device unavailable, unable to + * create an audio device. * {@link AV_ERR_IO_AUDIO_ENC_FAILED} if player fails to encode the audio data. * {@link AV_ERR_IO_AUDIO_ENC_INIT_FAILED} if player fails to init the video decoder. * {@link AV_ERR_IO_AUDIO_ENC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, -- Gitee From b0dd1edc147cdbffe873b9b5a3903513143dbed1 Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Thu, 7 Nov 2024 14:01:07 +0800 Subject: [PATCH 067/630] add VVC Profile and Level Signed-off-by: zhanghongran --- multimedia/av_codec/native_avcodec_base.h | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 147a7268e..1dde8479d 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1015,6 +1015,45 @@ typedef enum OH_HEVCProfile { HEVC_PROFILE_MAIN_10_HDR10_PLUS = 4, } OH_HEVCProfile; +/** + * @brief Profile: A specified subset of the syntax of VVC. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 14 + */ +typedef enum OH_VVCProfile { + /** Main 10 profile */ + VVC_PROFILE_MAIN_10 = 1, // 1 << 0 + /** Main 12 profile */ + VVC_PROFILE_MAIN_12 = 2, // 1 << 1 + /** Main 12 Intra profile */ + VVC_PROFILE_MAIN_12_INTRA = 10, // MAIN12 | INTRA + /** Multilayer Main 10 profile */ + VVC_PROFILE_MULTI_MAIN_10 = 17, // MULTILAYER | MAIN_10 + /** Main 10 4:4:4 profile */ + VVC_PROFILE_MAIN_10_444 = 33, // YUV444 | MAIN_10 + /** Main 12 4:4:4 profile */ + VVC_PROFILE_MAIN_12_444 = 34, // YUV444 | MAIN_12 + /** Main 16 4:4:4 profile */ + VVC_PROFILE_MAIN_16_444 = 36, // YUV444 | MAIN_16 + /** Main 12 4:4:4 Intra profile */ + VVC_PROFILE_MAIN_12_444_INTRA = 42, // MAIN_12_444 | INTRA + /** Main 16 4:4:4 Intra profile */ + VVC_PROFILE_MAIN_16_444_INTRA = 44, // MAIN_16_444 | INTRA + /** Multilayer Main 10 4:4:4 profile */ + VVC_PROFILE_MULTI_MAIN_10_444 = 49, // YUV444 | MAIN_10 | MULTILAYER + /** Main 10 Still Picture profile */ + VVC_PROFILE_MAIN_10_STILL = 65, // MAIN_10 | STILL_PICTURE + /** Main 12 Still Picture profile */ + VVC_PROFILE_MAIN_12_STILL = 68, // MAIN_12 | STILL_PICTURE + /** Main 10 4:4:4 Still Picture profile */ + VVC_PROFILE_MAIN_10_444_STILL = 97, // MAIN_10_444 | STILL_PICTURE + /** Main 12 4:4:4 Still Picture profile */ + VVC_PROFILE_MAIN_12_444_STILL = 98, // MAIN_12_444 | STILL_PICTURE + /** Main 16 4:4:4 Still Picture profile */ + VVC_PROFILE_MAIN_16_444_STILL = 100, // MAIN_16_444 | STILL_PICTURE +} OH_VVCProfile; + /** * @brief Enumerates the muxer output file format * @@ -1208,6 +1247,46 @@ typedef enum OH_HEVCLevel { HEVC_LEVEL_62 = 12, } OH_HEVCLevel; +/** + * @brief VVC Level: A defined set of constraints on the values that may be taken by the syntax elements and variables + * of VVC, or the value of a transform coefficient prior to scaling; code = (major_level * 16 + minor_level * 3). + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 14 + */ +typedef enum OH_VVCLevel { + /** VVC level 1.0 */ + VVC_LEVEL_1 = 16, + /** VVC level 2.0 */ + VVC_LEVEL_2 = 32, + /** VVC level 2.1 */ + VVC_LEVEL_21 = 35, + /** VVC level 3.0 */ + VVC_LEVEL_3 = 48, + /** VVC level 3.1 */ + VVC_LEVEL_31 = 51, + /** VVC level 4.0 */ + VVC_LEVEL_4 = 64, + /** VVC level 4.1 */ + VVC_LEVEL_41 = 67, + /** VVC level 5.0 */ + VVC_LEVEL_5 = 80, + /** VVC level 5.1 */ + VVC_LEVEL_51 = 83, + /** VVC level 5.2 */ + VVC_LEVEL_52 = 86, + /** VVC level 6.0 */ + VVC_LEVEL_6 = 96, + /** VVC level 6.1 */ + VVC_LEVEL_61 = 99, + /** VVC level 6.2 */ + VVC_LEVEL_62 = 102, + /** VVC level 6.3 */ + VVC_LEVEL_63 = 103, + /** VVC level 15.5 */ + VVC_LEVEL_155 = 255, +} OH_VVCLevel; + /** * @brief The reference mode in temporal group of picture. * -- Gitee From f185a886df7223b2b0fff2b525ff3587913c2655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E4=B8=80=E9=B8=A3?= Date: Tue, 29 Oct 2024 02:33:25 +0000 Subject: [PATCH 068/630] 1029 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蔡一鸣 --- commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h b/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h index a22804434..f8510ba94 100644 --- a/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h +++ b/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h @@ -32,6 +32,9 @@ * provides features include create, begin read ,end read, begin write, end write, rebuild, and so on. * when using, it is necessary to link libpurgeable_memory_ndk.z.so * + * @library libpurgeablemem.so + * @syscap SystemCapability.Kernel.Memory + * @kit KernelEnhanceKit * @since 10 * @version 1.0 */ -- Gitee From 5961478627d6fb99662c460815732c5bffce9852 Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Thu, 7 Nov 2024 14:59:49 +0800 Subject: [PATCH 069/630] add VVC profile and level Signed-off-by: zhanghongran --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 1dde8479d..e78bd5d82 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1027,7 +1027,7 @@ typedef enum OH_VVCProfile { /** Main 12 profile */ VVC_PROFILE_MAIN_12 = 2, // 1 << 1 /** Main 12 Intra profile */ - VVC_PROFILE_MAIN_12_INTRA = 10, // MAIN12 | INTRA + VVC_PROFILE_MAIN_12_INTRA = 10, // MAIN_12 | INTRA /** Multilayer Main 10 profile */ VVC_PROFILE_MULTI_MAIN_10 = 17, // MULTILAYER | MAIN_10 /** Main 10 4:4:4 profile */ -- Gitee From f01396515100b815010f32b665fb1bc56abb2ebf Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Thu, 7 Nov 2024 15:49:26 +0800 Subject: [PATCH 070/630] add profile and level Signed-off-by: zhanghongran --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index e78bd5d82..592bbcf00 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1282,7 +1282,7 @@ typedef enum OH_VVCLevel { /** VVC level 6.2 */ VVC_LEVEL_62 = 102, /** VVC level 6.3 */ - VVC_LEVEL_63 = 103, + VVC_LEVEL_63 = 105, /** VVC level 15.5 */ VVC_LEVEL_155 = 255, } OH_VVCLevel; -- Gitee From 6c9b1e025dd3d1dea06ef721c25cb2f58452d12f Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Thu, 7 Nov 2024 17:33:44 +0800 Subject: [PATCH 071/630] add vvc profile and level Signed-off-by: zhanghongran --- multimedia/av_codec/native_avcodec_base.h | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 592bbcf00..a4979f187 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1023,35 +1023,35 @@ typedef enum OH_HEVCProfile { */ typedef enum OH_VVCProfile { /** Main 10 profile */ - VVC_PROFILE_MAIN_10 = 1, // 1 << 0 + VVC_PROFILE_MAIN_10 = 1, /** Main 12 profile */ - VVC_PROFILE_MAIN_12 = 2, // 1 << 1 + VVC_PROFILE_MAIN_12 = 2, /** Main 12 Intra profile */ - VVC_PROFILE_MAIN_12_INTRA = 10, // MAIN_12 | INTRA + VVC_PROFILE_MAIN_12_INTRA = 10, /** Multilayer Main 10 profile */ - VVC_PROFILE_MULTI_MAIN_10 = 17, // MULTILAYER | MAIN_10 + VVC_PROFILE_MULTI_MAIN_10 = 17, /** Main 10 4:4:4 profile */ - VVC_PROFILE_MAIN_10_444 = 33, // YUV444 | MAIN_10 + VVC_PROFILE_MAIN_10_444 = 33, /** Main 12 4:4:4 profile */ - VVC_PROFILE_MAIN_12_444 = 34, // YUV444 | MAIN_12 + VVC_PROFILE_MAIN_12_444 = 34, /** Main 16 4:4:4 profile */ - VVC_PROFILE_MAIN_16_444 = 36, // YUV444 | MAIN_16 + VVC_PROFILE_MAIN_16_444 = 36, /** Main 12 4:4:4 Intra profile */ - VVC_PROFILE_MAIN_12_444_INTRA = 42, // MAIN_12_444 | INTRA + VVC_PROFILE_MAIN_12_444_INTRA = 42, /** Main 16 4:4:4 Intra profile */ - VVC_PROFILE_MAIN_16_444_INTRA = 44, // MAIN_16_444 | INTRA + VVC_PROFILE_MAIN_16_444_INTRA = 44, /** Multilayer Main 10 4:4:4 profile */ - VVC_PROFILE_MULTI_MAIN_10_444 = 49, // YUV444 | MAIN_10 | MULTILAYER + VVC_PROFILE_MULTI_MAIN_10_444 = 49, /** Main 10 Still Picture profile */ - VVC_PROFILE_MAIN_10_STILL = 65, // MAIN_10 | STILL_PICTURE + VVC_PROFILE_MAIN_10_STILL = 65, /** Main 12 Still Picture profile */ - VVC_PROFILE_MAIN_12_STILL = 68, // MAIN_12 | STILL_PICTURE + VVC_PROFILE_MAIN_12_STILL = 68, /** Main 10 4:4:4 Still Picture profile */ - VVC_PROFILE_MAIN_10_444_STILL = 97, // MAIN_10_444 | STILL_PICTURE + VVC_PROFILE_MAIN_10_444_STILL = 97, /** Main 12 4:4:4 Still Picture profile */ - VVC_PROFILE_MAIN_12_444_STILL = 98, // MAIN_12_444 | STILL_PICTURE + VVC_PROFILE_MAIN_12_444_STILL = 98, /** Main 16 4:4:4 Still Picture profile */ - VVC_PROFILE_MAIN_16_444_STILL = 100, // MAIN_16_444 | STILL_PICTURE + VVC_PROFILE_MAIN_16_444_STILL = 100, } OH_VVCProfile; /** -- Gitee From b46ad8e4834ae43c50f4e6e14422ba92e6f5d81d Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Thu, 7 Nov 2024 19:07:51 +0800 Subject: [PATCH 072/630] add VVC profile and level Signed-off-by: zhanghongran --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index a4979f187..414bc41f5 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1249,7 +1249,7 @@ typedef enum OH_HEVCLevel { /** * @brief VVC Level: A defined set of constraints on the values that may be taken by the syntax elements and variables - * of VVC, or the value of a transform coefficient prior to scaling; code = (major_level * 16 + minor_level * 3). + * of VVC, or the value of a transform coefficient prior to scaling. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 14 -- Gitee From 7c77bbca785239aa78dbd7951a7342abc8619a9a Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Thu, 7 Nov 2024 20:14:57 +0800 Subject: [PATCH 073/630] add VVC profile and level Signed-off-by: zhanghongran --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 414bc41f5..3f38e0289 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1045,7 +1045,7 @@ typedef enum OH_VVCProfile { /** Main 10 Still Picture profile */ VVC_PROFILE_MAIN_10_STILL = 65, /** Main 12 Still Picture profile */ - VVC_PROFILE_MAIN_12_STILL = 68, + VVC_PROFILE_MAIN_12_STILL = 66, /** Main 10 4:4:4 Still Picture profile */ VVC_PROFILE_MAIN_10_444_STILL = 97, /** Main 12 4:4:4 Still Picture profile */ -- Gitee From 0343168ff6524c53c5de9b4a891f5e956d1edb16 Mon Sep 17 00:00:00 2001 From: xuzhangchi Date: Fri, 8 Nov 2024 09:33:47 +0800 Subject: [PATCH 074/630] =?UTF-8?q?OH=5FMD=5FKEY=5FVIDEO=5FDECODER=5FENABL?= =?UTF-8?q?E=5FVRR=20json=20=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuzhangchi --- .../av_codec/codec_base/libnative_media_codecbase.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 589823ef3..bf12ff2c9 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -391,6 +391,10 @@ "first_introduced": "12", "name": "OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE" }, + { + "first_introduced": "14", + "name": "OH_MD_KEY_VIDEO_DECODER_ENABLE_VRR" + }, { "first_introduced": "10", "name": "OH_AVCodec_GetCapability" -- Gitee From 03b3cd4237c7b6e3dbd9b36f6527fb2f0369cdee Mon Sep 17 00:00:00 2001 From: hongzexuan Date: Fri, 8 Nov 2024 10:01:04 +0800 Subject: [PATCH 075/630] scroll capi supports totalsize Signed-off-by: hongzexuan Change-Id: I5d97922132674c6f836530351306b2bd86147651 --- arkui/ace_engine/native/native_node.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d57414dcc..fa551b515 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4512,6 +4512,19 @@ typedef enum { */ NODE_SCROLL_FADING_EDGE, + /** + * @brief Obtains the total size of all child components when fully expanded in the scrollable component. + * + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: total width of all child components when fully expanded in the scrollable component. + * The default unit is vp. \n + * .value[1].f32: total height of all child components when fully expanded in the scrollable component. + * The default unit is vp. \n + * + * @since 14 + */ + NODE_SCROLL_SIZE, + /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and * obtained as required through APIs. -- Gitee From 9beaa3ae99270ad9f8856f070d731c9f30465433 Mon Sep 17 00:00:00 2001 From: w30052974 Date: Fri, 8 Nov 2024 10:47:28 +0800 Subject: [PATCH 076/630] =?UTF-8?q?API=20Lint=20=E6=95=B4=E6=94=B9=20outpu?= =?UTF-8?q?tcount=E5=8F=82=E6=95=B0=E4=B8=8D=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: w30052974 --- ai/neural_network_runtime/neural_network_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai/neural_network_runtime/neural_network_core.h b/ai/neural_network_runtime/neural_network_core.h index f4c156a99..8d0665738 100644 --- a/ai/neural_network_runtime/neural_network_core.h +++ b/ai/neural_network_runtime/neural_network_core.h @@ -918,7 +918,7 @@ OH_NN_ReturnCode OH_NNExecutor_GetInputCount(const OH_NNExecutor *executor, size * {@link OH_NNExecutor_CreateOutputTensorDesc}. \n * * @param executor Pointer to the {@link OH_NNExecutor} instance. - * @param OutputCount Output tensor count returned. + * @param outputCount Output tensor count returned. * @return Execution result of the function. * {@link OH_NN_SUCCESS} get output count successfully. The return value is saved in outputCount.\n * {@link OH_NN_INVALID_PARAMETER} fail to get output count. The possible reason for failure is that -- Gitee From 9c3a754aec14041faaa286716f6ded1eb47df679 Mon Sep 17 00:00:00 2001 From: zhangchao Date: Fri, 8 Nov 2024 10:56:25 +0800 Subject: [PATCH 077/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9camera.ndk.json?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=AD=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangchao --- multimedia/camera_framework/camera.ndk.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index 3495447cf..dd8d98bbc 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -625,10 +625,10 @@ }, { "first_introduced": "13", - "name": "OH_CaptureSession_IsAutoSwitchDeviceSupported" + "name": "OH_CaptureSession_IsAutoDeviceSwitchSupported" }, { "first_introduced": "13", - "name": "OH_CaptureSession_EnableAutoSwitchDevice" + "name": "OH_CaptureSession_EnableAutoDeviceSwitch" } ] -- Gitee From bbd070335433a2a1a799535f938cedf4c511ef7d Mon Sep 17 00:00:00 2001 From: Lee <18800203378@163.com> Date: Wed, 6 Nov 2024 16:34:41 +0800 Subject: [PATCH 078/630] fix function's brief and param Signed-off-by: Lee <18800203378@163.com> --- .../include/relational_store.h | 45 ++++++++++--------- .../relational_store/libnative_rdb.ndk.json | 34 +++++++------- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 50ff91164..b8be9a6aa 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -160,14 +160,14 @@ typedef struct { /** * @brief Define OH_Rdb_ConfigV2 type. * - * @since 13 + * @since 14 */ typedef struct OH_Rdb_ConfigV2 OH_Rdb_ConfigV2; /** * @brief Define Rdb_DBType type. * - * @since 13 + * @since 14 */ typedef enum Rdb_DBType { /** @@ -191,7 +191,7 @@ typedef enum Rdb_DBType { * The possible cause is that the address space of the application is full, As a result, the space * cannot be allocated. * @see OH_Rdb_ConfigV2 - * @since 13 + * @since 14 */ OH_Rdb_ConfigV2 *OH_Rdb_CreateConfig(); @@ -203,7 +203,7 @@ OH_Rdb_ConfigV2 *OH_Rdb_CreateConfig(); * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_DestroyConfig(OH_Rdb_ConfigV2 *config); @@ -216,7 +216,7 @@ int OH_Rdb_DestroyConfig(OH_Rdb_ConfigV2 *config); * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_SetDatabaseDir(OH_Rdb_ConfigV2 *config, const char *databaseDir); @@ -229,7 +229,7 @@ int OH_Rdb_SetDatabaseDir(OH_Rdb_ConfigV2 *config, const char *databaseDir); * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_SetStoreName(OH_Rdb_ConfigV2 *config, const char *storeName); @@ -242,7 +242,7 @@ int OH_Rdb_SetStoreName(OH_Rdb_ConfigV2 *config, const char *storeName); * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_SetBundleName(OH_Rdb_ConfigV2 *config, const char *bundleName); @@ -255,7 +255,7 @@ int OH_Rdb_SetBundleName(OH_Rdb_ConfigV2 *config, const char *bundleName); * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_SetModuleName(OH_Rdb_ConfigV2 *config, const char *moduleName); @@ -264,11 +264,11 @@ int OH_Rdb_SetModuleName(OH_Rdb_ConfigV2 *config, const char *moduleName); * * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. * Indicates the configuration of the database related to this RDB store. - * @param isEncrypt Indicates whether the database is encrypted. + * @param isEncrypted Indicates whether the database is encrypted. * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_SetEncrypted(OH_Rdb_ConfigV2 *config, bool isEncrypted); @@ -281,7 +281,7 @@ int OH_Rdb_SetEncrypted(OH_Rdb_ConfigV2 *config, bool isEncrypted); * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_SetSecurityLevel(OH_Rdb_ConfigV2 *config, int securityLevel); @@ -290,10 +290,11 @@ int OH_Rdb_SetSecurityLevel(OH_Rdb_ConfigV2 *config, int securityLevel); * * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. * Indicates the configuration of the database related to this RDB store + * @param area Represents the security area of the database. * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 13 + * @since 14 */ int OH_Rdb_SetArea(OH_Rdb_ConfigV2 *config, int area); @@ -305,15 +306,15 @@ int OH_Rdb_SetArea(OH_Rdb_ConfigV2 *config, int area); * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * {@link RDB_E_NOT_SUPPORTED} - The error code for not support db types. - * @since 13 + * @since 14 */ int OH_Rdb_SetDbType(OH_Rdb_ConfigV2 *config, int dbType); /** * @brief Get support db type list - * @param numType The output parameter, which is used to recieve the length of the support db type array. + * @param typeCount The output parameter, which is used to recieve the length of the support db type array. * @return Return Rdb_DBType array contains supported db type, array length is number of support type - * @since 13 + * @since 14 */ const int *OH_Rdb_GetSupportedDbType(int *typeCount); @@ -380,7 +381,7 @@ OH_Rdb_Store *OH_Rdb_GetOrOpen(const OH_Rdb_Config *config, int *errCode); * If the Config is empty, config.size does not match, or errCode is empty. * Get database path failed.Get RDB Store fail. Nullptr is returned. * @see OH_Rdb_ConfigV2, OH_Rdb_Store. - * @since 13 + * @since 14 */ OH_Rdb_Store *OH_Rdb_CreateOrOpen(const OH_Rdb_ConfigV2 *config, int *errCode); @@ -421,7 +422,7 @@ int OH_Rdb_DeleteStore(const OH_Rdb_Config *config); * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * while failure returns a specific error code. Specific error codes can be referenced {@link OH_Rdb_ErrCode}. * @see OH_Rdb_ErrCode. - * @since 13 + * @since 14 */ int OH_Rdb_DeleteStoreV2(const OH_Rdb_ConfigV2 *config); @@ -503,14 +504,14 @@ int OH_Rdb_Execute(OH_Rdb_Store *store, const char *sql); * @brief Write operations are performed using the specified transaction represented by the transaction ID * * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. - * @param sql Indicates the SQL statement to execute. * @param trxId The transaction ID of the specified transaction, must be greater than 0 + * @param sql Indicates the SQL statement to execute. * @return Returns the status code of the execution. * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * {@link RDB_E_NOT_SUPPORTED} - The error code for not supprt. * @see OH_Rdb_Store. - * @since 13 + * @since 14 */ int OH_Rdb_ExecuteByTrxId(OH_Rdb_Store *store, int64_t trxId, const char *sql); @@ -572,7 +573,7 @@ int OH_Rdb_Commit(OH_Rdb_Store *store); * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * {@link RDB_E_NOT_SUPPORTED} - The error code for not supprt. * @see OH_Rdb_Store. - * @since 13 + * @since 14 */ int OH_Rdb_BeginTransWithTrxId(OH_Rdb_Store *store, int64_t *trxId); @@ -586,7 +587,7 @@ int OH_Rdb_BeginTransWithTrxId(OH_Rdb_Store *store, int64_t *trxId); * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * {@link RDB_E_NOT_SUPPORTED} - The error code for not supprt. * @see OH_Rdb_Store. - * @since 13 + * @since 14 */ int OH_Rdb_RollBackByTrxId(OH_Rdb_Store *store, int64_t trxId); @@ -600,7 +601,7 @@ int OH_Rdb_RollBackByTrxId(OH_Rdb_Store *store, int64_t trxId); * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * {@link RDB_E_NOT_SUPPORTED} - The error code for not supprt. * @see OH_Rdb_Store. - * @since 13 + * @since 14 */ int OH_Rdb_CommitByTrxId(OH_Rdb_Store *store, int64_t trxId); diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index 4d72ebe84..5e0681865 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -3,58 +3,58 @@ {"name":"OH_Rdb_CreateValueObject" }, {"name":"OH_Rdb_CreateValuesBucket" }, { - "first_introduced":"13", + "first_introduced":"14", "name":"OH_Rdb_CreateConfig" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetDatabaseDir" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetStoreName" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetBundleName" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetModuleName" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetEncrypted" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetSecurityLevel" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetArea" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_SetDbType" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_GetSupportedDbType" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_DestroyConfig" }, {"name":"OH_Rdb_GetOrOpen" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_CreateOrOpen" }, {"name":"OH_Rdb_CloseStore" }, {"name":"OH_Rdb_DeleteStore" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_DeleteStoreV2" }, {"name":"OH_Rdb_Insert" }, @@ -63,7 +63,7 @@ {"name":"OH_Rdb_Query" }, {"name":"OH_Rdb_Execute" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_ExecuteByTrxId" }, {"name":"OH_Rdb_ExecuteQuery" }, @@ -71,15 +71,15 @@ {"name":"OH_Rdb_RollBack" }, {"name":"OH_Rdb_Commit" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_BeginTransWithTrxId" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_RollBackByTrxId" }, { - "first_introduced": "13", + "first_introduced": "14", "name":"OH_Rdb_CommitByTrxId" }, {"name":"OH_Rdb_Backup" }, -- Gitee From c012a044fd475b9697695bb7ee51111c66653958 Mon Sep 17 00:00:00 2001 From: shaoyuanzhao Date: Fri, 8 Nov 2024 15:51:57 +0800 Subject: [PATCH 079/630] fix errorcode Signed-off-by: blc --- .../include/inputmethod_inputmethod_proxy_capi.h | 12 ++++++------ inputmethod/include/inputmethod_types_capi.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h index c0ae0a12c..f8257c2b6 100644 --- a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h +++ b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h @@ -60,7 +60,7 @@ typedef struct InputMethod_InputMethodProxy InputMethod_InputMethodProxy; * {@link IME_ERR_OK} - success. * {@link IME_ERR_IMCLIENT} - input method client error. * {@link IME_ERR_IMMS} - input method manager service error. - * {@link IME_ERR_DETACHED} - input method client is detached. + * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. * @since 12 @@ -76,7 +76,7 @@ InputMethod_ErrorCode OH_InputMethodProxy_ShowKeyboard(InputMethod_InputMethodPr * {@link IME_ERR_OK} - success. * {@link IME_ERR_IMCLIENT} - input method client error. * {@link IME_ERR_IMMS} - input method manager service error. - * {@link IME_ERR_DETACHED} - input method client is detached. + * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. * @since 12 @@ -99,7 +99,7 @@ InputMethod_ErrorCode OH_InputMethodProxy_HideKeyboard(InputMethod_InputMethodPr * {@link IME_ERR_PARAMCHECK} - parameter check failed. * {@link IME_ERR_IMCLIENT} - input method client error. * {@link IME_ERR_IMMS} - input method manager service error. - * {@link IME_ERR_DETACHED} - input method client is detached. + * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. * @since 12 @@ -119,7 +119,7 @@ InputMethod_ErrorCode OH_InputMethodProxy_NotifySelectionChange( * {@link IME_ERR_PARAMCHECK} - parameter check failed. * {@link IME_ERR_IMCLIENT} - input method client error. * {@link IME_ERR_IMMS} - input method manager service error. - * {@link IME_ERR_DETACHED} - input method client is detached. + * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. * @since 12 @@ -139,7 +139,7 @@ InputMethod_ErrorCode OH_InputMethodProxy_NotifyConfigurationChange(InputMethod_ * {@link IME_ERR_PARAMCHECK} - parameter check failed. * {@link IME_ERR_IMCLIENT} - input method client error. * {@link IME_ERR_IMMS} - input method manager service error. - * {@link IME_ERR_DETACHED} - input method client is detached. + * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. * @since 12 @@ -159,7 +159,7 @@ InputMethod_ErrorCode OH_InputMethodProxy_NotifyCursorUpdate( * {@link IME_ERR_PARAMCHECK} - parameter check failed. * {@link IME_ERR_IMCLIENT} - input method client error. * {@link IME_ERR_IMMS} - input method manager service error. - * {@link IME_ERR_DETACHED} - input method client is detached. + * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. * @since 12 diff --git a/inputmethod/include/inputmethod_types_capi.h b/inputmethod/include/inputmethod_types_capi.h index 2e1481335..0fc88c455 100644 --- a/inputmethod/include/inputmethod_types_capi.h +++ b/inputmethod/include/inputmethod_types_capi.h @@ -261,7 +261,7 @@ typedef enum InputMethod_ErrorCode { */ IME_ERR_PARAMCHECK = 401, /** - * @error The error code when the package manager error. + * @error The error code when the bundle manager error. */ IME_ERR_PACKAGEMANAGER = 12800001, /** @@ -273,7 +273,7 @@ typedef enum InputMethod_ErrorCode { */ IME_ERR_IMCLIENT = 12800003, /** - * @error The error code when configuration persisting error. + * @error The error code when configuration persistence error. */ IME_ERR_CONFIG_PERSIST = 12800005, /** @@ -289,7 +289,7 @@ typedef enum InputMethod_ErrorCode { */ IME_ERR_IMMS = 12800008, /** - * @error The error code when input method client is detached. + * @error The error code when input method client detached. */ IME_ERR_DETACHED = 12800009, /** -- Gitee From b9bb37b31c7d153f15162aeec043947607a120cb Mon Sep 17 00:00:00 2001 From: xzcbob Date: Fri, 8 Nov 2024 09:01:54 +0000 Subject: [PATCH 080/630] update multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json. Signed-off-by: xzcbob --- .../av_codec/codec_base/libnative_media_codecbase.ndk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index bf12ff2c9..715c18d86 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -393,7 +393,7 @@ }, { "first_introduced": "14", - "name": "OH_MD_KEY_VIDEO_DECODER_ENABLE_VRR" + "name": "OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR" }, { "first_introduced": "10", -- Gitee From dc7476f91e98e5468f82d200d1399ad8f3c6955b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=97=AD?= Date: Sat, 9 Nov 2024 02:23:21 +0000 Subject: [PATCH 081/630] =?UTF-8?q?api=E5=8F=98=E6=9B=B4sdk-c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郭旭 --- .../kits/c/input/oh_input_manager.h | 36 +++++++++---------- multimodalinput/kits/c/ohinput.ndk.json | 28 +++++++-------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 0a2b5b471..f187532bf 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -231,7 +231,7 @@ typedef struct Input_AxisEvent Input_AxisEvent; /** * @brief Defines the hot key structure. * - * @since 13 + * @since 14 */ typedef struct Input_Hotkey Input_Hotkey; @@ -255,19 +255,19 @@ typedef enum Input_Result { INPUT_REPEAT_INTERCEPTOR = 4200001, /** * @error Already occupied by the system - * @since 13 + * @since 14 */ INPUT_OCCUPIED_BY_SYSTEM = 4200002, /** * @error Already occupied by the other - * @since 13 + * @since 14 */ INPUT_OCCUPIED_BY_OTHER = 4200003, } Input_Result; /** * @brief Callback used to return shortcut key events. - * @since 13 + * @since 14 */ typedef void (*Input_HotkeyCallback)(Input_Hotkey* hotkey); @@ -1285,7 +1285,7 @@ Input_Result OH_Input_RemoveInputEventInterceptor(void); * {@Link INPUT_SERVICE_EXCEPTION} Failed to get the interval because the service is exception.\n * {@Link INPUT_PARAMETER_ERROR} The timeInterval is NULL.\n * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Result OH_Input_GetIntervalSinceLastInput(int64_t *timeInterval); @@ -1295,7 +1295,7 @@ Input_Result OH_Input_GetIntervalSinceLastInput(int64_t *timeInterval); * @return Returns an {@Link Input_Hotkey} pointer object if the operation is successful. Otherwise, a null pointer is * returned. The possible cause is memory allocation failure. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Hotkey *OH_Input_CreateHotkey(void); @@ -1304,7 +1304,7 @@ Input_Hotkey *OH_Input_CreateHotkey(void); * * @param hotkey Hot key object. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ void OH_Input_DestroyHotkey(Input_Hotkey **hotkey); @@ -1315,7 +1315,7 @@ void OH_Input_DestroyHotkey(Input_Hotkey **hotkey); * @param preKeys List of modifier keys. * @param size Number of modifier keys. One or two modifier keys are supported. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ void OH_Input_SetPreKeys(Input_Hotkey *hotkey, int32_t *preKeys, int32_t size); @@ -1330,7 +1330,7 @@ void OH_Input_SetPreKeys(Input_Hotkey *hotkey, int32_t *preKeys, int32_t size); * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the pressedKeys is NULL or the pressedKeyCount * is NULL.\n * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Result OH_Input_GetPreKeys(const Input_Hotkey *hotkey, int32_t **preKeys, int32_t *preKeyCount); @@ -1340,7 +1340,7 @@ Input_Result OH_Input_GetPreKeys(const Input_Hotkey *hotkey, int32_t **preKeys, * @param hotkey Hotkey key object. * @param finalKey Modified key. Only one modified key is supported. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ void OH_Input_SetFinalKey(Input_Hotkey *hotkey, int32_t finalKey); @@ -1353,7 +1353,7 @@ void OH_Input_SetFinalKey(Input_Hotkey *hotkey, int32_t finalKey); * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the finalKeyCode is NULL.\n * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Result OH_Input_GetFinalKey(const Input_Hotkey *hotkey, int32_t *finalKeyCode); @@ -1366,7 +1366,7 @@ Input_Result OH_Input_GetFinalKey(const Input_Hotkey *hotkey, int32_t *finalKeyC * operation fails, a null pointer is returned. The possible cause is memory allocation failure or count is not equal * to the number of system hotkeys. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Hotkey **OH_Input_CreateAllSystemHotkeys(int32_t count); @@ -1377,7 +1377,7 @@ Input_Hotkey **OH_Input_CreateAllSystemHotkeys(int32_t count); * {@Link OH_Input_CreateAllSystemHotkeys} method. * @param count Count of the array to be destroyed, which must be the same as the number of system shortcut keys. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ void OH_Input_DestroyAllSystemHotkeys(Input_Hotkey **hotkeys, int32_t count); @@ -1392,7 +1392,7 @@ void OH_Input_DestroyAllSystemHotkeys(Input_Hotkey **hotkeys, int32_t count); * {@link INPUT_PARAMETER_ERROR} The hotkey or count is NULL, or the value of count does not match the number * of system shortcut keys supported by the system. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Result OH_Input_GetAllSystemHotkeys(Input_Hotkey **hotkey, int32_t *count); @@ -1403,7 +1403,7 @@ Input_Result OH_Input_GetAllSystemHotkeys(Input_Hotkey **hotkey, int32_t *count) * @param isRepeat Whether to report repeated key events. * The value true means to report repeated key events, and the value false means the opposite. * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ void OH_Input_SetRepeat(Input_Hotkey* hotkey, bool isRepeat); @@ -1416,7 +1416,7 @@ void OH_Input_SetRepeat(Input_Hotkey* hotkey, bool isRepeat); * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} otherwise.\n * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Result OH_Input_GetRepeat(const Input_Hotkey* hotkey, bool *isRepeat); @@ -1432,7 +1432,7 @@ Input_Result OH_Input_GetRepeat(const Input_Hotkey* hotkey, bool *isRepeat); * GetAllSystemHotkeys} interface to query all system shortcut keys.\n * {@Link INPUT_OCCUPIED_BY_OTHER} The hotkey has been subscribed to by another.\n * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Result OH_Input_AddHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyCallback callback); @@ -1445,7 +1445,7 @@ Input_Result OH_Input_AddHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyC * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} if hotkey or callback is NULL;\n * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since 14 */ Input_Result OH_Input_RemoveHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyCallback callback); diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index 0a906be71..35791ebb5 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -316,59 +316,59 @@ "name": "OH_Input_RemoveInputEventInterceptor" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_GetIntervalSinceLastInput" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_CreateAllSystemHotkeys" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_DestroyAllSystemHotkeys" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_GetAllSystemHotkeys" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_CreateHotkey" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_DestroyHotkey" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_SetPreKeys" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_GetPreKeys" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_SetFinalKey" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_GetFinalKey" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_AddHotkeyMonitor" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_RemoveHotkeyMonitor" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_SetRepeat" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_Input_GetRepeat" }, { -- Gitee From 844f7aa53ebebd7e68d7a4af7398dc8dee632b28 Mon Sep 17 00:00:00 2001 From: z30053788 Date: Sat, 9 Nov 2024 16:30:05 +0800 Subject: [PATCH 082/630] update Signed-off-by: z30053788 Change-Id: I17f78f854d58b4d048379a0647b2505d734c6cac --- BasicServicesKit/commonevent/oh_commonevent.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/BasicServicesKit/commonevent/oh_commonevent.h b/BasicServicesKit/commonevent/oh_commonevent.h index 44c679926..bfe5c1235 100644 --- a/BasicServicesKit/commonevent/oh_commonevent.h +++ b/BasicServicesKit/commonevent/oh_commonevent.h @@ -244,7 +244,7 @@ const CommonEvent_Parameters* OH_CommonEvent_GetParametersFromRcvData(const Comm /** * @brief Check whether the parameters contains a key. * - * @param rcvData Indicates the event of callback data. + * @param para Indicates the event of callback data. * @param key Indicates the key of parameter. * @return Returns the result of check, true means it contains. * @since 12 @@ -254,7 +254,7 @@ bool OH_CommonEvent_HasKeyInParameters(const CommonEvent_Parameters* para, const /** * @brief Get int data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param defaultValue Indicates default return value. * @return Returns the int data of the key in the parameters. @@ -265,7 +265,7 @@ int OH_CommonEvent_GetIntFromParameters(const CommonEvent_Parameters* para, cons /** * @brief Get int array data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param array Indicates the int array. * @return Returns the length of the array. @@ -276,7 +276,7 @@ int32_t OH_CommonEvent_GetIntArrayFromParameters(const CommonEvent_Parameters* p /** * @brief Get long data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param defaultValue Indicates default return value. * @return Returns the long data of the key in the parameters. @@ -287,7 +287,7 @@ long OH_CommonEvent_GetLongFromParameters(const CommonEvent_Parameters* para, co /** * @brief Get long array data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param array Indicates the long array. * @return Returns the length of the array. @@ -298,7 +298,7 @@ int32_t OH_CommonEvent_GetLongArrayFromParameters(const CommonEvent_Parameters* /** * @brief Get bool data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param defaultValue Indicates default return value. * @return Returns the bool data of the key in the parameters. @@ -309,7 +309,7 @@ bool OH_CommonEvent_GetBoolFromParameters(const CommonEvent_Parameters* para, co /** * @brief Get bool array data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param array Indicates the bool array. * @return Returns the length of the array. @@ -320,7 +320,7 @@ int32_t OH_CommonEvent_GetBoolArrayFromParameters(const CommonEvent_Parameters* /** * @brief Get char data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param defaultValue Indicates default return value. * @return Returns the char data of the key in the parameters. @@ -331,7 +331,7 @@ char OH_CommonEvent_GetCharFromParameters(const CommonEvent_Parameters* para, co /** * @brief Get char array data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param array Indicates the char array. * @return Returns the length of the array. @@ -342,7 +342,7 @@ int32_t OH_CommonEvent_GetCharArrayFromParameters(const CommonEvent_Parameters* /** * @brief Get double data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param defaultValue Indicates default return value. * @return Returns the double data of the key in the parameters. @@ -354,7 +354,7 @@ double OH_CommonEvent_GetDoubleFromParameters(const CommonEvent_Parameters* para /** * @brief Get double array data from parameters data by key. * - * @param rcvData Indicates the event of parameters data. + * @param para Indicates the event of parameters data. * @param key Indicates the key of parameters data. * @param array Indicates the double array. * @return Returns the length of the array, default is 0. -- Gitee From 2a1976778b7bfd166174a0bc3e77fdcd65e3ed8d Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Mon, 11 Nov 2024 02:04:41 +0000 Subject: [PATCH 083/630] ad Signed-off-by: Feng Lin --- multimedia/player_framework/avplayer_base.h | 44 --------------------- 1 file changed, 44 deletions(-) diff --git a/multimedia/player_framework/avplayer_base.h b/multimedia/player_framework/avplayer_base.h index 02a121290..8a3b311fc 100644 --- a/multimedia/player_framework/avplayer_base.h +++ b/multimedia/player_framework/avplayer_base.h @@ -398,50 +398,6 @@ typedef void (*OH_AVPlayerOnError)(OH_AVPlayer *player, int32_t errorCode, const * @syscap SystemCapability.Multimedia.Media.AVPlayer * @param player The pointer to an OH_AVPlayer instance. * @param errorCode Error code. - * {@link AV_ERR_IO_CANNOT_FIND_HOST} if the address of server is incorrect, and IO can not find host. - * {@link AV_ERR_IO_CONNECTION_TIMEOUT} if network connection timeout. - * {@link AV_ERR_IO_NETWORK_ABNORMAL} if link failed due to abnormal network. - * {@link AV_ERR_IO_NETWORK_UNAVAILABLE} if link failed due to unavailable network. - * {@link AV_ERR_IO_NO_PERMISSION} if network permission dennied. - * {@link AV_ERR_IO_NETWORK_ACCESS_DENIED} if the client request parameters are incorrect or exceed - * the processing capacity. - * {@link AV_ERR_IO_RESOURE_NOT_FOUND} cannot find available network resources. - * {@link AV_ERR_IO_SSL_CLIENT_CERT_NEEDED} if the server failS to verify the client certificate - * because the certificate is not carried, - * the certificate is invalid, or the certificate is expired. - * {@link AV_ERR_IO_SSL_CONNECT_FAIL} if the client fails to verify the server certificate because the - * certificate is not carried, - * the certificate is invalid, or the certificate is expired. - * {@link AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED} if IO SSL server cert untrusted. - * {@link AV_ERR_IO_UNSUPPORTTED_REQUEST} if unsupported request due to network protocols. - * {@link AV_ERR_IO_DATA_ABNORMAL} if file data is incorrect, and no specific data can be provided. - * {@link AV_ERR_IO_FILE_ACCESS_DENIED} if file is occupied by other processes and cannot be accessed. - * {@link AV_ERR_IO_FILE_BAD_HANDLE} if the file handle is incorrect. - * {@link AV_ERR_IO_FILE_NOT_FOUND} if IO file not found. - * {@link AV_ERR_IO_FILE_PERMISSION_DENIED} if IO file permission denied because API does not - * have permissions. - * {@link AV_ERR_IO_AUDIO_DEC_FAILED} if player fails to decode the audio data. - * {@link AV_ERR_IO_AUDIO_DEC_INIT_FAILED} if player fail to init the audio decoder. - * {@link AV_ERR_IO_AUDIO_DEC_UNAVAILABLE} if the audio decoder is unavailable for handler incurrupt, - * or audio decoder subsystem abnormal. - * {@link AV_ERR_IO_AUDIO_DEVICE_ERROR} if audio device error. - * {@link AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE} if audio device state does not support current operation. - * {@link AV_ERR_IO_AUDIO_DEVICE_TIMEOUT} if audio device timeout when calling audio render interface. - * {@link AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE} if audio device unavailable, unable to - * create an audio device. - * {@link AV_ERR_IO_AUDIO_ENC_FAILED} if player fails to encode the audio data. - * {@link AV_ERR_IO_AUDIO_ENC_INIT_FAILED} if player fails to init the video decoder. - * {@link AV_ERR_IO_AUDIO_ENC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, - * or video decoder subsystem abnormal. - * {@link AV_ERR_IO_VIDEO_DEC_FAILED} if player fails to decode the video data. - * {@link AV_ERR_IO_VIDEO_DEC_INIT_FAILED} if player fails to init the video decoder. - * {@link AV_ERR_IO_VIDEO_DEC_UNAVAILABLE} if video decoder is unavailable for handler incurrupt, - * or video decoder subsystem abnormal. - * {@link AV_ERR_IO_VIDEO_DEVICE_ERROR} if video device error. - * {@link AV_ERR_IO_VIDEO_ENC_FAILED} if player fails to encode the video data. - * {@link AV_ERR_IO_VIDEO_ENC_INIT_FAILED} if player fails to init the video encoder. - * {@link AV_ERR_IO_VIDEO_ENC_UNAVAILABLE} if video encoder is unavailable for handler incurrupt, - * or video encoder subsystem abnormal. * @param errorMsg Error message, only valid in callback function. * @param userData Pointer to user specific data. * @since 12 -- Gitee From 9983a759fa592b8b2440db4096e5c6075170d1a2 Mon Sep 17 00:00:00 2001 From: cuiruibin Date: Sat, 9 Nov 2024 09:50:13 +0800 Subject: [PATCH 084/630] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cuiruibin --- filemanagement/file_uri/include/oh_file_uri.h | 15 +++++++++++++-- filemanagement/fileshare/include/oh_file_share.h | 13 +++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/filemanagement/file_uri/include/oh_file_uri.h b/filemanagement/file_uri/include/oh_file_uri.h index adf9f0fa3..dde24336d 100644 --- a/filemanagement/file_uri/include/oh_file_uri.h +++ b/filemanagement/file_uri/include/oh_file_uri.h @@ -13,8 +13,15 @@ * limitations under the License. */ -#ifndef FILE_MANAGEMENT_OH_FILE_URI_H -#define FILE_MANAGEMENT_OH_FILE_URI_H +/** + * @addtogroup fileUri + * @{ + * + * @brief This module provides URI format validation and URI conversion processing, + * as well as obtaining URI-related information + * + * @since 12 + */ /** * @file oh_file_uri.h @@ -30,6 +37,9 @@ * @since 12 */ +#ifndef FILE_MANAGEMENT_OH_FILE_URI_H +#define FILE_MANAGEMENT_OH_FILE_URI_H + #include "error_code.h" #include #include @@ -116,4 +126,5 @@ FileManagement_ErrCode OH_FileUri_GetFileName(const char *uri, unsigned int leng #ifdef __cplusplus }; #endif +/** @} */ #endif // FILE_MANAGEMENT_OH_FILE_URI_H diff --git a/filemanagement/fileshare/include/oh_file_share.h b/filemanagement/fileshare/include/oh_file_share.h index e89d335f5..fc89f08ed 100644 --- a/filemanagement/fileshare/include/oh_file_share.h +++ b/filemanagement/fileshare/include/oh_file_share.h @@ -13,12 +13,6 @@ * limitations under the License. */ -#ifndef FILE_MANAGEMENT_OH_FILE_SHARE_H -#define FILE_MANAGEMENT_OH_FILE_SHARE_H - -#include "error_code.h" -#include - /** * @addtogroup fileShare * @{ @@ -38,6 +32,13 @@ * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization * @since 12 */ + +#ifndef FILE_MANAGEMENT_OH_FILE_SHARE_H +#define FILE_MANAGEMENT_OH_FILE_SHARE_H + +#include "error_code.h" +#include + #ifdef __cplusplus extern "C" { #endif -- Gitee From 573796b0048f14aba5e144c2afb30cc8e11f2303 Mon Sep 17 00:00:00 2001 From: liangqi Date: Fri, 8 Nov 2024 11:21:53 +0800 Subject: [PATCH 085/630] standardize rectification Signed-off-by: liangqi --- drivers/external_device_manager/base/ddk_api.h | 5 +++-- drivers/external_device_manager/base/ddk_types.h | 5 +++-- drivers/external_device_manager/hid/hid_ddk_api.h | 9 ++++++--- drivers/external_device_manager/hid/hid_ddk_types.h | 7 +++++-- drivers/external_device_manager/usb/usb_ddk_api.h | 8 ++++++-- drivers/external_device_manager/usb/usb_ddk_types.h | 8 ++++++-- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/drivers/external_device_manager/base/ddk_api.h b/drivers/external_device_manager/base/ddk_api.h index 41d69c7b6..b5eb3005b 100644 --- a/drivers/external_device_manager/base/ddk_api.h +++ b/drivers/external_device_manager/base/ddk_api.h @@ -12,8 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef DDK_API_H -#define DDK_API_H /** * @addtogroup Ddk @@ -36,6 +34,9 @@ * @since 12 */ +#ifndef DDK_API_H +#define DDK_API_H + #include #include "ddk_types.h" diff --git a/drivers/external_device_manager/base/ddk_types.h b/drivers/external_device_manager/base/ddk_types.h index e9e352c87..b13651367 100644 --- a/drivers/external_device_manager/base/ddk_types.h +++ b/drivers/external_device_manager/base/ddk_types.h @@ -12,8 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef DDK_TYPES_H -#define DDK_TYPES_H /** * @addtogroup Ddk @@ -36,6 +34,9 @@ * @since 12 */ +#ifndef DDK_TYPES_H +#define DDK_TYPES_H + #include #include diff --git a/drivers/external_device_manager/hid/hid_ddk_api.h b/drivers/external_device_manager/hid/hid_ddk_api.h index b5d535a10..ac9336efd 100644 --- a/drivers/external_device_manager/hid/hid_ddk_api.h +++ b/drivers/external_device_manager/hid/hid_ddk_api.h @@ -12,8 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef HID_DDK_API_H -#define HID_DDK_API_H /** * @addtogroup HidDdk @@ -32,11 +30,16 @@ * @brief Declares the HID DDK interfaces for the host to access an input device. * * @kit DriverDevelopmentKit + * @library libhid.z.so + * @syscap SystemCapability.Driver.HID.Extension * File to include: * @since 11 * @version 1.0 */ +#ifndef HID_DDK_API_H +#define HID_DDK_API_H + #include #include "hid_ddk_types.h" @@ -100,7 +103,7 @@ int32_t OH_Hid_EmitEvent(int32_t deviceId, const Hid_EmitItem items[], uint16_t * @version 1.0 */ int32_t OH_Hid_DestroyDevice(int32_t deviceId); - +/** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/drivers/external_device_manager/hid/hid_ddk_types.h b/drivers/external_device_manager/hid/hid_ddk_types.h index 4feaf5f55..1029fbb12 100644 --- a/drivers/external_device_manager/hid/hid_ddk_types.h +++ b/drivers/external_device_manager/hid/hid_ddk_types.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef HID_DDK_TYPES_H -#define HID_DDK_TYPES_H /** * @addtogroup HidDdk * @{ @@ -33,10 +31,15 @@ * @brief Provides definitions of enum variables and structs in the HID DDK. * * File to include: + * @library libhid.z.so + * @syscap SystemCapability.Driver.HID.Extension * @since 11 * @version 1.0 */ +#ifndef HID_DDK_TYPES_H +#define HID_DDK_TYPES_H + #include #ifdef __cplusplus diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index d43aa52d7..90ff08e69 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -12,8 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef USB_DDK_API_H -#define USB_DDK_API_H /** * @addtogroup UsbDdk @@ -33,10 +31,16 @@ * * @brief Declares the USB DDK APIs used by the USB host to access USB devices. * + * @kit DriverDevelopmentKit + * @library libusb_ndk.z.so + * @syscap SystemCapability.Driver.USB.Extension * @since 10 * @version 1.0 */ +#ifndef USB_DDK_API_H +#define USB_DDK_API_H + #include #include "ddk_types.h" diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 6385308af..602baba11 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef USB_DDK_TYPES_H -#define USB_DDK_TYPES_H /** * @addtogroup UsbDdk * @{ @@ -33,10 +31,16 @@ * * @brief Provides the enumerated variables, structures, and macros used in USB DDK APIs. * + * @kit DriverDevelopmentKit + * @library libusb_ndk.z.so + * @syscap SystemCapability.Driver.USB.Extension * @since 10 * @version 1.0 */ +#ifndef USB_DDK_TYPES_H +#define USB_DDK_TYPES_H + #include #include -- Gitee From 4bd17d65c51dd3d1ba8662fcd14e7c4dccd88c63 Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Mon, 11 Nov 2024 02:36:11 +0000 Subject: [PATCH 086/630] ad Signed-off-by: Feng Lin --- multimedia/media_foundation/native_averrors.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index 546aff716..727f2eea3 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -141,7 +141,7 @@ typedef enum OH_AVErrCode { * @cannot find available network resources. * @since 14 */ - AV_ERR_IO_RESOURE_NOT_FOUND = 5411007, + AV_ERR_IO_RESOURCE_NOT_FOUND = 5411007, /** * @the server failS to verify the client certificate because the certificate is not carried, * the certificate is invalid, or the certificate is expired. @@ -163,7 +163,7 @@ typedef enum OH_AVErrCode { * @unsupported request due to network protocols. * @since 14 */ - AV_ERR_IO_UNSUPPORTTED_REQUEST = 5411011, + AV_ERR_IO_UNSUPPORTED_REQUEST = 5411011, /** * @file data is incorrect, and no specific data can be provided. * @since 14 -- Gitee From 67955f50ca127970f538b5b52369504faa317834 Mon Sep 17 00:00:00 2001 From: xxb-wzy Date: Mon, 11 Nov 2024 11:37:27 +0800 Subject: [PATCH 087/630] Signed-off-by: xxb-wzy Change-Id: Ia858cc4e59e5c126d3e388e97a4e14b75831e328 --- graphic/graphic_2d/native_vsync/native_vsync.h | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 791fbfd36..bb77a0108 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -127,6 +127,7 @@ int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period); * after the animation frame associated with the previous VSync is complete. In addition, the self-drawing frames must * carry timestamps that align with VSync. * After the animation ends, disable DVSync. + * Only phones and tablets support DVSync. * On a platform that does not support DVSync or if another application has enabled DVSync, the attempt to enable it * will not take effect, and the application still receives normal VSync signals. * -- Gitee From 903642507abdd74ebfedd2fa3a8431fbed2a284a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=BD=E8=BF=90=E7=90=86?= Date: Mon, 11 Nov 2024 11:51:45 +0800 Subject: [PATCH 088/630] =?UTF-8?q?fix=20warning=20in=20comment=20Signed-o?= =?UTF-8?q?ff-by:=20=E6=96=BD=E8=BF=90=E7=90=86=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BasicServicesKit/os_account.h | 7 ++++--- BasicServicesKit/os_account_common.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/BasicServicesKit/os_account.h b/BasicServicesKit/os_account.h index a93a32b4b..2a90d0cfd 100644 --- a/BasicServicesKit/os_account.h +++ b/BasicServicesKit/os_account.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OS_ACCOUNT_H -#define OS_ACCOUNT_H - /** * @addtogroup OsAccount * @{ @@ -23,6 +20,7 @@ * @brief Provide the definition of the C interface for the native OsAccount. * @since 12 */ + /** * @file os_account.h * @@ -33,6 +31,9 @@ * @since 12 */ +#ifndef OS_ACCOUNT_H +#define OS_ACCOUNT_H + #include #include "os_account_common.h" diff --git a/BasicServicesKit/os_account_common.h b/BasicServicesKit/os_account_common.h index 932b398c5..334ad730b 100644 --- a/BasicServicesKit/os_account_common.h +++ b/BasicServicesKit/os_account_common.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OS_ACCOUNT_COMMON_H -#define OS_ACCOUNT_COMMON_H - /** * @addtogroup OsAccount * @{ @@ -23,6 +20,7 @@ * @brief Provide the definition of the C interface for the native OsAccount. * @since 12 */ + /** * @file os_account_common.h * @@ -33,6 +31,9 @@ * @since 12 */ +#ifndef OS_ACCOUNT_COMMON_H +#define OS_ACCOUNT_COMMON_H + #ifdef __cplusplus extern "C" { #endif -- Gitee From 8bfa6a7a1c44bb34b1fee4df9720fae735506414 Mon Sep 17 00:00:00 2001 From: Cai Xincheng Date: Mon, 11 Nov 2024 16:02:21 +0800 Subject: [PATCH 089/630] asset api lint Signed-off-by: Cai Xincheng Change-Id: Ibcdadb18e9eb07318aeb3dab975732a6465b5a9f --- security/asset/inc/asset_api.h | 16 ++++++++-------- security/asset/inc/asset_type.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/security/asset/inc/asset_api.h b/security/asset/inc/asset_api.h index 794a04e02..cda927aac 100755 --- a/security/asset/inc/asset_api.h +++ b/security/asset/inc/asset_api.h @@ -13,14 +13,6 @@ * limitations under the License. */ -#ifndef ASSET_API_H -#define ASSET_API_H - -#include -#include - -#include "asset_type.h" - /** * @addtogroup AssetApi * @{ @@ -44,6 +36,14 @@ * @since 11 */ +#ifndef ASSET_API_H +#define ASSET_API_H + +#include +#include + +#include "asset_type.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/security/asset/inc/asset_type.h b/security/asset/inc/asset_type.h index 8d64e56d5..4eea24c7c 100755 --- a/security/asset/inc/asset_type.h +++ b/security/asset/inc/asset_type.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef ASSET_TYPE_H -#define ASSET_TYPE_H - /** * @addtogroup AssetType * @{ @@ -36,6 +33,9 @@ * @since 11 */ +#ifndef ASSET_TYPE_H +#define ASSET_TYPE_H + #include #include -- Gitee From 7cf96e803f6e8199671eb522d904b998ed904591 Mon Sep 17 00:00:00 2001 From: yangxuguang-huawei Date: Mon, 11 Nov 2024 16:04:15 +0800 Subject: [PATCH 090/630] fix: api lint Signed-off-by: yangxuguang-huawei Change-Id: Ia60c1cecfb6fbb4794246d3d8c94134109162a00 --- .../child_process/native_child_process.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ability/ability_runtime/child_process/native_child_process.h b/ability/ability_runtime/child_process/native_child_process.h index af736450b..a60cca635 100644 --- a/ability/ability_runtime/child_process/native_child_process.h +++ b/ability/ability_runtime/child_process/native_child_process.h @@ -13,11 +13,6 @@ * limitations under the License. */ -#ifndef OHOS_ABILITY_RUNTIME_C_NATIVE_CHILD_PROCESS_H -#define OHOS_ABILITY_RUNTIME_C_NATIVE_CHILD_PROCESS_H - -#include "IPCKit/ipc_cparcel.h" - /** * @addtogroup ChildProcess * @{ @@ -40,6 +35,11 @@ * @since 12 */ +#ifndef OHOS_ABILITY_RUNTIME_C_NATIVE_CHILD_PROCESS_H +#define OHOS_ABILITY_RUNTIME_C_NATIVE_CHILD_PROCESS_H + +#include "IPCKit/ipc_cparcel.h" + #ifdef __cplusplus extern "C" { #endif -- Gitee From 307f50f3014a481b8656007880a5cec9e89a5e22 Mon Sep 17 00:00:00 2001 From: lwx1281857 Date: Mon, 11 Nov 2024 16:41:14 +0800 Subject: [PATCH 091/630] Description:Code optimization Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: lwx1281857 --- startup/init/syscap/include/deviceinfo.h | 19 +++++++++++++++++++ startup/init/syscap/include/syscap_ndk.h | 19 +++++++++++++++++++ startup/init/syscap/init_sync.h | 20 +++++++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/startup/init/syscap/include/deviceinfo.h b/startup/init/syscap/include/deviceinfo.h index 955759bfb..0725cd540 100644 --- a/startup/init/syscap/include/deviceinfo.h +++ b/startup/init/syscap/include/deviceinfo.h @@ -16,6 +16,24 @@ #ifndef DEVICEINFO_CSDK_H #define DEVICEINFO_CSDK_H +/** + * @addtogroup DeviceInfo + * @{ + * + * @brief Provides APIs for querying terminal device information. + * + * @since 10 + */ + +/** + * @file deviceinfo.h + * @kit BasicServicesKit + * @brief Declares APIs for querying terminal device information. + * @library libdeviceinfo_ndk.z.so + * @syscap SystemCapability.Startup.SystemInfo + * @since 10 + */ + #ifdef __cplusplus #if __cplusplus extern "C" { @@ -227,4 +245,5 @@ const char *OH_GetDistributionOSReleaseType(void); } #endif #endif +/** @} */ #endif diff --git a/startup/init/syscap/include/syscap_ndk.h b/startup/init/syscap/include/syscap_ndk.h index 070a6cb1e..d821c3a35 100644 --- a/startup/init/syscap/include/syscap_ndk.h +++ b/startup/init/syscap/include/syscap_ndk.h @@ -16,6 +16,24 @@ #ifndef SYSCAP_NDK_H #define SYSCAP_NDK_H +/** + * @addtogroup SyscapNdk + * @{ + * + * @brief Provides APIs for querying system capabilities. + * + * @since 10 + */ + +/** + * @file deviceinfo.h + * @kit BasicServicesKit + * @brief Declares APIs for acquiring the set of system capabilities . + * @library na + * @syscap SystemCapability.Startup.SystemInfo + * @since 10 + */ + #include #ifdef __cplusplus @@ -31,4 +49,5 @@ bool canIUse(const char *cap); } #endif #endif +/** @} */ #endif \ No newline at end of file diff --git a/startup/init/syscap/init_sync.h b/startup/init/syscap/init_sync.h index ceeefbce3..ca4836b27 100644 --- a/startup/init/syscap/init_sync.h +++ b/startup/init/syscap/init_sync.h @@ -16,6 +16,24 @@ #ifndef BASE_STARTUP_INITLITE_NOTIFY_H #define BASE_STARTUP_INITLITE_NOTIFY_H +/** + * @addtogroup InitSync + * @{ + * + * @brief Provides APIs for notifying the Init process of events. + * + * @since 10 + */ + +/** + * @file init_sync.h + * @kit BasicServicesKit + * @brief Declares APIs for notifying events to the Init process. + * @library na + * @syscap SystemCapability.Startup.SystemInfo + * @since 10 + */ + #ifdef __cplusplus #if __cplusplus extern "C" { @@ -45,5 +63,5 @@ extern int NotifyInit(unsigned long event); } #endif #endif - +/** @} */ #endif // BASE_STARTUP_INITLITE_NOTIFY_H -- Gitee From ce584c9a1da7b4223c36e0456403b530433c5c57 Mon Sep 17 00:00:00 2001 From: lcc Date: Mon, 11 Nov 2024 16:55:19 +0800 Subject: [PATCH 092/630] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lcc --- CryptoArchitectureKit/crypto_signature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CryptoArchitectureKit/crypto_signature.h b/CryptoArchitectureKit/crypto_signature.h index 63d46299a..321b3f833 100644 --- a/CryptoArchitectureKit/crypto_signature.h +++ b/CryptoArchitectureKit/crypto_signature.h @@ -75,7 +75,7 @@ typedef struct OH_CryptoVerify OH_CryptoVerify; * @brief Create a verify context according to the given algorithm name. * * @param algoName Indicates the algorithm name for generating the verify context. Example RSA1024|PKCS1|SHA256. - * @param ctx Indicates the pointer to the verify context. + * @param verify Indicates the pointer to the verify context. * @return {@link OH_Crypto_ErrCode#CRYPTO_SUCCESS} 0 - If the operation is successful. * {@link OH_Crypto_ErrCode#CRYPTO_INVALID_PARAMS} 401 - If parameter is invalid. * {@link OH_Crypto_ErrCode#CRYPTO_NOT_SUPPORTED} 801 - If the operation is not supported. -- Gitee From f607ea1dffdb0e4f7a2c103026f222bdec051b98 Mon Sep 17 00:00:00 2001 From: gonghongyu Date: Mon, 11 Nov 2024 21:03:04 +0800 Subject: [PATCH 093/630] =?UTF-8?q?NativeDisplaySoloist=20API=20Lint=20?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gonghongyu --- .../native_display_soloist/native_display_soloist.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/graphic/graphic_2d/native_display_soloist/native_display_soloist.h b/graphic/graphic_2d/native_display_soloist/native_display_soloist.h index abbda4fde..8f3b9dca0 100644 --- a/graphic/graphic_2d/native_display_soloist/native_display_soloist.h +++ b/graphic/graphic_2d/native_display_soloist/native_display_soloist.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_NATIVE_DISPLAY_SOLOIST_H_ -#define C_INCLUDE_NATIVE_DISPLAY_SOLOIST_H_ - /** * @addtogroup NativeDisplaySoloist * @{ @@ -38,6 +35,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_NATIVE_DISPLAY_SOLOIST_H_ +#define C_INCLUDE_NATIVE_DISPLAY_SOLOIST_H_ + #include #include #ifdef __cplusplus -- Gitee From 15067984421879ec20519ae77596379e171177d8 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Thu, 7 Nov 2024 10:04:25 +0800 Subject: [PATCH 094/630] key event support capi Signed-off-by: wangxiuxiu96 Change-Id: I2aa53bf46076e489800c8f5ec80ed8ab1139584b --- arkui/ace_engine/native/BUILD.gn | 1 + arkui/ace_engine/native/libace.ndk.json | 48 ++ arkui/ace_engine/native/native_key_event.h | 535 +++++++++++++++++++++ arkui/ace_engine/native/native_node.h | 25 + 4 files changed, 609 insertions(+) create mode 100644 arkui/ace_engine/native/native_key_event.h diff --git a/arkui/ace_engine/native/BUILD.gn b/arkui/ace_engine/native/BUILD.gn index 99ad7f778..f8f7ff274 100644 --- a/arkui/ace_engine/native/BUILD.gn +++ b/arkui/ace_engine/native/BUILD.gn @@ -33,6 +33,7 @@ if (!is_arkui_x) { "native_gesture.h", "native_interface.h", "native_interface_accessibility.h", + "native_key_event.h", "native_node.h", "native_node_napi.h", "native_type.h", diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 197833444..96208e941 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2386,5 +2386,53 @@ { "first_introduced": "14", "name": "OH_NativeXComponent_RegisterKeyEventCallbackWithResult" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetType" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetKeyCode" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetKeyText" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetKeySource" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetDeviceId" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetMetaKey" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetTimestamp" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_StopPropagation" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetModifierKeyState" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetKeyIntensionCode" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_GetUnicode" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_KeyEvent_SetConsumed" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h new file mode 100644 index 000000000..0ab0303a1 --- /dev/null +++ b/arkui/ace_engine/native/native_key_event.h @@ -0,0 +1,535 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup ArkUI_NativeModule + * @{ + * + * @brief Provides the general key event APIs of ArkUI on the native side. + * + * @since 14 + */ + +/** + * @file native_key_event.h + * + * @brief Declares the APIs related to native key events. + * + * @library libace_ndk.z.so + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @kit ArkUI + * @since 14 + */ + +#ifndef ARKUI_NATIVE_KEY_EVENT_H +#define ARKUI_NATIVE_KEY_EVENT_H + +#include + +#include "native_type.h" +#include "ui_input_event.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Defines an enum for the key codes in key events. + * + * @since 14 + */ +typedef enum { + /** Unknown (or unrecognized) key **/ + ARKUI_KEYCODE_UNKNOWN = -1, + /** Function (Fn) key **/ + ARKUI_KEYCODE_FN = 0, + /** Volume Up key **/ + ARKUI_KEYCODE_VOLUME_UP = 16, + /** Volume Down key **/ + ARKUI_KEYCODE_VOLUME_DOWN = 17, + /** Power key **/ + ARKUI_KEYCODE_POWER = 18, + /** Shutter key **/ + ARKUI_KEYCODE_CAMERA = 19, + /** Speaker Mute key **/ + ARKUI_KEYCODE_VOLUME_MUTE = 22, + /** Mute key **/ + ARKUI_KEYCODE_MUTE = 23, + /** Brightness Up key **/ + ARKUI_KEYCODE_BRIGHTNESS_UP = 40, + /** Brightness Down key **/ + ARKUI_KEYCODE_BRIGHTNESS_DOWN = 41, + /** Key 0 **/ + ARKUI_KEYCODE_0 = 2000, + /** Key 1 **/ + ARKUI_KEYCODE_1 = 2001, + /** Key 2 **/ + ARKUI_KEYCODE_2 = 2002, + /** Key 3 **/ + ARKUI_KEYCODE_3 = 2003, + /** Key 4 **/ + ARKUI_KEYCODE_4 = 2004, + /** Key 5 **/ + ARKUI_KEYCODE_5 = 2005, + /** Key 6 **/ + ARKUI_KEYCODE_6 = 2006, + /** Key 7 **/ + ARKUI_KEYCODE_7 = 2007, + /** Key 8 **/ + ARKUI_KEYCODE_8 = 2008, + /** Key 9 **/ + ARKUI_KEYCODE_9 = 2009, + /** Key + **/ + ARKUI_KEYCODE_STAR = 2010, + /** Key # **/ + ARKUI_KEYCODE_POUND = 2011, + /** Up key on D-pad **/ + ARKUI_KEYCODE_DPAD_UP = 2012, + /** Down key on D-pad **/ + ARKUI_KEYCODE_DPAD_DOWN = 2013, + /** Left key on D-pad **/ + ARKUI_KEYCODE_DPAD_LEFT = 2014, + /** Right key on D-pad **/ + ARKUI_KEYCODE_DPAD_RIGHT = 2015, + /** OK key on D-pad **/ + ARKUI_KEYCODE_DPAD_CENTER = 2016, + /** Key A **/ + ARKUI_KEYCODE_A = 2017, + /** Key B **/ + ARKUI_KEYCODE_B = 2018, + /** Key C **/ + ARKUI_KEYCODE_C = 2019, + /** Key D **/ + ARKUI_KEYCODE_D = 2020, + /** Key E **/ + ARKUI_KEYCODE_E = 2021, + /** Key F **/ + ARKUI_KEYCODE_F = 2022, + /** Key G **/ + ARKUI_KEYCODE_G = 2023, + /** Key H **/ + ARKUI_KEYCODE_H = 2024, + /** Key I **/ + ARKUI_KEYCODE_I = 2025, + /** Key J **/ + ARKUI_KEYCODE_J = 2026, + /** Key K **/ + ARKUI_KEYCODE_K = 2027, + /** Key L **/ + ARKUI_KEYCODE_L = 2028, + /** Key M **/ + ARKUI_KEYCODE_M = 2029, + /** Key N **/ + ARKUI_KEYCODE_N = 2030, + /** Key O **/ + ARKUI_KEYCODE_O = 2031, + /** Key P **/ + ARKUI_KEYCODE_P = 2032, + /** Key R **/ + ARKUI_KEYCODE_Q = 2033, + /** Key R **/ + ARKUI_KEYCODE_R = 2034, + /** Key S **/ + ARKUI_KEYCODE_S = 2035, + /** Key T **/ + ARKUI_KEYCODE_T = 2036, + /** Key U **/ + ARKUI_KEYCODE_U = 2037, + /** Key V **/ + ARKUI_KEYCODE_V = 2038, + /** Key W **/ + ARKUI_KEYCODE_W = 2039, + /** Key X **/ + ARKUI_KEYCODE_X = 2040, + /** Key Y **/ + ARKUI_KEYCODE_Y = 2041, + /** Key Z **/ + ARKUI_KEYCODE_Z = 2042, + /** Key # **/ + ARKUI_KEYCODE_COMMA = 2043, + /** Key # **/ + ARKUI_KEYCODE_PERIOD = 2044, + /** Left Alt key **/ + ARKUI_KEYCODE_ALT_LEFT = 2045, + /** Right Alt key **/ + ARKUI_KEYCODE_ALT_RIGHT = 2046, + /** Left Shift key **/ + ARKUI_KEYCODE_SHIFT_LEFT = 2047, + /** Right Shift key **/ + ARKUI_KEYCODE_SHIFT_RIGHT = 2048, + /** Tab key **/ + ARKUI_KEYCODE_TAB = 2049, + /** Space key **/ + ARKUI_KEYCODE_SPACE = 2050, + /** Symbol key **/ + ARKUI_KEYCODE_SYM = 2051, + /** Explorer key, used to start the explorer application **/ + ARKUI_KEYCODE_EXPLORER = 2052, + /** Email key, used to start the email application **/ + ARKUI_KEYCODE_ENVELOPE = 2053, + /** Enter key **/ + ARKUI_KEYCODE_ENTER = 2054, + /** Backspace key **/ + ARKUI_KEYCODE_DEL = 2055, + /** Key ` **/ + ARKUI_KEYCODE_GRAVE = 2056, + /** Key - **/ + ARKUI_KEYCODE_MINUS = 2057, + /** Key = **/ + ARKUI_KEYCODE_EQUALS = 2058, + /** Key [ **/ + ARKUI_KEYCODE_LEFT_BRACKET = 2059, + /** Key ]**/ + ARKUI_KEYCODE_RIGHT_BRACKET = 2060, + /** Key \\ **/ + ARKUI_KEYCODE_BACKSLASH = 2061, + /** Key ; **/ + ARKUI_KEYCODE_SEMICOLON = 2062, + /** Key ' **/ + ARKUI_KEYCODE_APOSTROPHE = 2063, + /** Key / **/ + ARKUI_KEYCODE_SLASH = 2064, + /** Key @ **/ + ARKUI_KEYCODE_AT = 2065, + /** Key + **/ + ARKUI_KEYCODE_PLUS = 2066, + /** Menu key **/ + ARKUI_KEYCODE_MENU = 2067, + /** Page Up key **/ + ARKUI_KEYCODE_PAGE_UP = 2068, + /** Page Down key **/ + ARKUI_KEYCODE_PAGE_DOWN = 2069, + /** ESC key **/ + ARKUI_KEYCODE_ESCAPE = 2070, + /** Delete key **/ + ARKUI_KEYCODE_FORWARD_DEL = 2071, + /** Left Ctrl key **/ + ARKUI_KEYCODE_CTRL_LEFT = 2072, + /** Right Ctrl key **/ + ARKUI_KEYCODE_CTRL_RIGHT = 2073, + /** Caps Lock key **/ + ARKUI_KEYCODE_CAPS_LOCK = 2074, + /** Scroll Lock key **/ + ARKUI_KEYCODE_SCROLL_LOCK = 2075, + /** Left Meta key **/ + ARKUI_KEYCODE_META_LEFT = 2076, + /** Right Meta key **/ + ARKUI_KEYCODE_META_RIGHT = 2077, + /** Function key **/ + ARKUI_KEYCODE_FUNCTION = 2078, + /** System Request/Print Screen key **/ + ARKUI_KEYCODE_SYSRQ = 2079, + /** Break/Pause key **/ + ARKUI_KEYCODE_BREAK = 2080, + /** Move to Home key **/ + ARKUI_KEYCODE_MOVE_HOME = 2081, + /** Move to End key **/ + ARKUI_KEYCODE_MOVE_END = 2082, + /** Insert key **/ + ARKUI_KEYCODE_INSERT = 2083, + /** Forward key **/ + ARKUI_KEYCODE_FORWARD = 2084, + /** Play key **/ + ARKUI_KEYCODE_MEDIA_PLAY = 2085, + /** Pause key **/ + ARKUI_KEYCODE_MEDIA_PAUSE = 2086, + /** Close key **/ + ARKUI_KEYCODE_MEDIA_CLOSE = 2087, + /** Eject key **/ + ARKUI_KEYCODE_MEDIA_EJECT = 2088, + /** Record key **/ + ARKUI_KEYCODE_MEDIA_RECORD = 2089, + /** F1 key **/ + ARKUI_KEYCODE_F1 = 2090, + /** F2 key **/ + ARKUI_KEYCODE_F2 = 2091, + /** F3 key **/ + ARKUI_KEYCODE_F3 = 2092, + /** F4 key **/ + ARKUI_KEYCODE_F4 = 2093, + /** F5 key **/ + ARKUI_KEYCODE_F5 = 2094, + /** F6 key **/ + ARKUI_KEYCODE_F6 = 2095, + /** F7 key **/ + ARKUI_KEYCODE_F7 = 2096, + /** F8 key **/ + ARKUI_KEYCODE_F8 = 2097, + /** F9 key **/ + ARKUI_KEYCODE_F9 = 2098, + /** F10 key **/ + ARKUI_KEYCODE_F10 = 2099, + /** F11 key **/ + ARKUI_KEYCODE_F11 = 2100, + /** F12 key **/ + ARKUI_KEYCODE_F12 = 2101, + /** Number Lock key on numeric keypad **/ + ARKUI_KEYCODE_NUM_LOCK = 2102, + /** Key 0 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_0 = 2103, + /** Key 1 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_1 = 2104, + /** Key 2 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_2 = 2105, + /** Key 3 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_3 = 2106, + /** Key 4 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_4 = 2107, + /** Key 5 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_5 = 2108, + /** Key 6 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_6 = 2109, + /** Key 7 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_7 = 2110, + /** Key 8 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_8 = 2111, + /** Key 9 on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_9 = 2112, + /** Key / on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_DIVIDE = 2113, + /** Key ) on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_MULTIPLY = 2114, + /** Key - on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_SUBTRACT = 2115, + /** Key + on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_ADD = 2116, + /** Key . on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_DOT = 2117, + /** Key , on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_COMMA = 2118, + /** Enter key on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_ENTER = 2119, + /** Key = on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_EQUALS = 2120, + /** Key ( on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_LEFT_PAREN = 2121, + /** Key ) on numeric keypad **/ + ARKUI_KEYCODE_NUMPAD_RIGHT_PAREN = 2122, +} ArkUI_KeyCode; + +/** + * @brief Defines an enum for the key event types. + * + * @since 14 + */ +typedef enum { + /** Unknown type **/ + ARKUI_KEY_EVENT_UNKNOWN = -1, + /** Pressing of a key **/ + ARKUI_KEY_EVENT_DOWN = 0, + /** Release of a key **/ + ARKUI_KEY_EVENT_UP = 1, + /** Long press of a key **/ + ARKUI_KEY_EVENT_LONG_PRESS = 2, + /** Click of a key **/ + ARKUI_KEY_EVENT_CLICK = 3, +} ArkUI_KeyEventType; + +/** + * @brief Defines an enum for the types of devices that trigger a key event. + * + * @since 14 + */ +typedef enum { + /** Unknown type **/ + ARKUI_KEY_SOURCE_UNKNOWN = 0, + /** Mouse **/ + ARKUI_KEY_SOURCE_TYPE_MOUSE = 1, + /** Keyboard **/ + ARKUI_KEY_SOURCE_TYPE_KEYBOARD = 4, +} ArkUI_KeySourceType; + +/** + * @brief Defines an enum for key intentions. + * + * @since 14 + */ +typedef enum { + /** Unknown intention **/ + ARKUI_KEY_INTENSION_UNKNOWN = -1, + /**Upward**/ + ARKUI_KEY_INTENSION_UP = 1, + /** Downward **/ + ARKUI_KEY_INTENSION_DOWN = 2, + /** Leftward **/ + ARKUI_KEY_INTENSION_LEFT = 3, + /** Rightward **/ + ARKUI_KEY_INTENSION_RIGHT = 4, + /** Select **/ + ARKUI_KEY_INTENSION_SELECT = 5, + /** Escape **/ + ARKUI_KEY_INTENSION_ESCAPE = 6, + /** Back**/ + ARKUI_KEY_INTENSION_BACK = 7, + /** Forward **/ + ARKUI_KEY_INTENSION_FORWARD = 8, + /** Menu **/ + ARKUI_KEY_INTENSION_MENU = 9, + /** Home **/ + ARKUI_KEY_INTENSION_HOME = 10, + /** Page up **/ + ARKUI_KEY_INTENSION_PAGE_UP = 11, + /** Page down **/ + ARKUI_KEY_INTENSION_PAGE_DOWN = 12, + /** Zoom out **/ + ARKUI_KEY_INTENSION_ZOOM_OUT = 13, + /** Zoom in **/ + ARKUI_KEY_INTENSION_ZOOM_IN = 14, + + /** Play or pause **/ + ARKUI_KEY_INTENTION_MEDIA_PLAY_PAUSE = 100, + /** Fast-forward **/ + ARKUI_KEY_INTENTION_MEDIA_FAST_FORWARD = 101, + /** Fast playback **/ + ARKUI_KEY_INTENTION_MEDIA_FAST_PLAYBACK = 103, + /** Play next **/ + ARKUI_KEY_INTENTION_MEDIA_NEXT = 104, + /** Play previous **/ + ARKUI_KEY_INTENTION_MEDIA_PREVIOUS = 105, + /** Mute **/ + ARKUI_KEY_INTENTION_MEDIA_MUTE = 106, + /** Volume up **/ + ARKUI_KEY_INTENTION_VOLUME_UP = 107, + /** Volume down **/ + ARKUI_KEY_INTENTION_VOLUME_DOWN = 108, + + /** Answer a call **/ + ARKUI_KEY_INTENTION_CALL = 200, + /** Camera **/ + ARKUI_KEY_INTENTION_CAMERA = 300, +} ArkUI_KeyIntension; + +/** + * @brief Obtains the type of a key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the key event type. + * @since 14 + */ +ArkUI_KeyEventType OH_ArkUI_KeyEvent_GetType(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the key code from a key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the key code. + * @since 14 + */ +int32_t OH_ArkUI_KeyEvent_GetKeyCode(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the key value from a key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the key value. + * @since 14 + */ +const char *OH_ArkUI_KeyEvent_GetKeyText(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the type of device that triggers a key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the device type. + * @since 14 + */ +ArkUI_KeySourceType OH_ArkUI_KeyEvent_GetKeySource(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the ID of device that triggers a key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the device ID. + * @since 14 + */ +int32_t OH_ArkUI_KeyEvent_GetDeviceId(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the state of the meta key (that is, the WIN key on the Windows keyboard or the Command + * key on the Mac keyboard) when a key event occurs. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the state of the meta key. The value 1 means that the key is pressed, and 0 means the + * opposite. + * @since 14 + */ +int32_t OH_ArkUI_KeyEvent_GetMetaKey(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the timestamp of a key event. It is the interval between the time when the event is triggered and the + * time when the system starts, in nanoseconds. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the event timestamp, in nanoseconds. + * @since 14 + */ +uint64_t OH_ArkUI_KeyEvent_GetTimestamp(const ArkUI_UIInputEvent* event); + +/** + * @brief Prevents a key event from bubbling up. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param stopPropagation Whether to stop event propagation. + * @since 14 + */ +void OH_ArkUI_KeyEvent_StopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation); + +/** + * @brief Obtains the pressed status of modifier keys from a key event. + * The following modifier keys are supported: Ctrl, Alt, Shift, Fn. However, the Fn key on external keyboards + * is not supported. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param modifierKeys Modifier keys to check, which must be created using {@link ArkUI_ModifierKeyName}. + * @return Returns whether the pressed status of the modifier keys. + * @since 14 + */ +bool OH_ArkUI_KeyEvent_GetModifierKeyState(const ArkUI_UIInputEvent* event, uint32_t modifierKeys); + +/** + * @brief Obtains the intention code associated with a key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the intention code associated with the key event. + * @since 14 + */ +ArkUI_KeyIntension OH_ArkUI_KeyEvent_GetKeyIntensionCode(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the Unicode value associated with a key event. + * Non-space basic Latin characters in the 0x0021-0x007E range are supported. Characters with a value of 0 are not + * supported. In the case of key combination, this API returns the Unicode value of the key corresponding to the key + * event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the Unicode value. + * @since 14 + */ +uint32_t OH_ArkUI_KeyEvent_GetUnicode(const ArkUI_UIInputEvent* event); + +/** + * @brief Sets whether a key event is consumed in the key event callback. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param isConsumed Whether the event is consumed. + * @since 14 + */ +void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsumed); +#ifdef __cplusplus +}; +#endif + +#endif // ARKUI_NATIVE_KEY_EVENT_H +/** @} */ \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d57414dcc..0348b322d 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5661,6 +5661,31 @@ typedef enum { * {@link ArkUI_NodeEvent} object. \n */ NODE_ON_DRAG_END = 20, + /** + * @brief Defines the event triggered when a key event occurs. + * + * The callback can be triggered during interactions with a focused window using an external keyboard or other input + * device. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * + * @since 14 + */ + NODE_ON_KEY_EVENT = 21, + /** + * @brief Defines the event triggered before the input method responds to the key action. + * + * If the return value of this callback is true, it is considered that the key event has been consumed, and + * subsequent event callbacks (keyboardShortcut, input method events, onKeyEvent) will be intercepted + * and no longer triggered. + * The callback can be triggered during interactions with a focused window using an external keyboard or other input + * device. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * + * @since 14 + */ + NODE_ON_KEY_PRE_IME = 22, /** * @brief Triggers onDetectResultUpdate callback -- Gitee From 6ef94e3de0c9efdd512278f2d6098295b488807a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E6=B4=AA=E6=96=8C?= Date: Tue, 12 Nov 2024 10:35:01 +0800 Subject: [PATCH 095/630] =?UTF-8?q?=E7=AA=97=E5=8F=A3=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 崔洪斌 --- arkui/window_manager/oh_window_event_filter.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arkui/window_manager/oh_window_event_filter.h b/arkui/window_manager/oh_window_event_filter.h index 783e8c5c2..e4651cd59 100644 --- a/arkui/window_manager/oh_window_event_filter.h +++ b/arkui/window_manager/oh_window_event_filter.h @@ -12,15 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef INCLUDE_OH_WINDOW_EVENT_FILTER_H -#define INCLUDE_OH_WINDOW_EVENT_FILTER_H - /** * @addtogroup WindowManager_NativeModule * @{ * - * * @brief Provides abilities of windowManager on the native side, such as key event * filtration. * @@ -37,6 +33,10 @@ * @kit ArkUI * @since 12 */ + +#ifndef INCLUDE_OH_WINDOW_EVENT_FILTER_H +#define INCLUDE_OH_WINDOW_EVENT_FILTER_H + #include "stdbool.h" #include "stdint.h" #include "oh_window_comm.h" @@ -79,4 +79,5 @@ WindowManager_ErrorCode OH_NativeWindowManager_UnregisterKeyEventFilter(int32_t } #endif -#endif // INCLUDE_OH_WINDOW_EVENT_FILTER_H \ No newline at end of file +#endif // INCLUDE_OH_WINDOW_EVENT_FILTER_H +/** @} */ \ No newline at end of file -- Gitee From ee845cd9ace66f14fb1103d03ed1a2c62d62043c Mon Sep 17 00:00:00 2001 From: leafly2021 Date: Mon, 11 Nov 2024 20:15:59 +0800 Subject: [PATCH 096/630] add Vsync api Signed-off-by: leafly2021 --- graphic/graphic_2d/native_vsync/native_vsync.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 791fbfd36..c5f6f6543 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -70,6 +70,19 @@ OH_NativeVSync* OH_NativeVSync_Create(const char* name, unsigned int length); */ void OH_NativeVSync_Destroy(OH_NativeVSync* nativeVsync); +/** + * @brief Creates a NativeVsync instance.\n + * A new NativeVsync instance is created each time this function is called. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync + * @param windowID Indicates the id of the associated window. + * @param name Indicates the vsync connection name. + * @param length Indicates the name's length. + * @return Returns the pointer to the NativeVsync instance created. + * @since 14 + * @version 1.0 + */ +OH_NativeVSync* OH_NativeVSync_Create_ForAssociatedWindow(uint64_t windowID, const char* name, unsigned int length); /** * @brief Request next vsync with callback. * If you call this interface multiple times in one frame, it will only call the last callback. -- Gitee From b8ea9c3b7d11620a818639b49c08219c3b47972f Mon Sep 17 00:00:00 2001 From: Lixiaoying25 Date: Tue, 12 Nov 2024 16:07:06 +0800 Subject: [PATCH 097/630] =?UTF-8?q?API=20lint=20=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=95=B4=E6=94=B9=20Signed-off-by:=20Lixiaoying25=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IPCKit/ipc_cparcel.h | 6 +++--- IPCKit/ipc_cremote_object.h | 6 +++--- IPCKit/ipc_cskeleton.h | 6 +++--- IPCKit/ipc_error_code.h | 6 +++--- IPCKit/ipc_kit.h | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/IPCKit/ipc_cparcel.h b/IPCKit/ipc_cparcel.h index bade20ba9..6903bb621 100644 --- a/IPCKit/ipc_cparcel.h +++ b/IPCKit/ipc_cparcel.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef CAPI_INCLUDE_IPC_CPARCEL_H -#define CAPI_INCLUDE_IPC_CPARCEL_H - /** * @addtogroup OHIPCParcel * @{ @@ -37,6 +34,9 @@ * @since 12 */ +#ifndef CAPI_INCLUDE_IPC_CPARCEL_H +#define CAPI_INCLUDE_IPC_CPARCEL_H + #include #ifdef __cplusplus diff --git a/IPCKit/ipc_cremote_object.h b/IPCKit/ipc_cremote_object.h index b8f82db7c..1f04f78dd 100644 --- a/IPCKit/ipc_cremote_object.h +++ b/IPCKit/ipc_cremote_object.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef CAPI_INCLUDE_IPC_CREMOTE_OBJECT_H -#define CAPI_INCLUDE_IPC_CREMOTE_OBJECT_H - /** * @addtogroup OHIPCRemoteObject * @{ @@ -39,6 +36,9 @@ * @since 12 */ +#ifndef CAPI_INCLUDE_IPC_CREMOTE_OBJECT_H +#define CAPI_INCLUDE_IPC_CREMOTE_OBJECT_H + #include #include "ipc_cparcel.h" diff --git a/IPCKit/ipc_cskeleton.h b/IPCKit/ipc_cskeleton.h index 68364cbec..e6a853013 100644 --- a/IPCKit/ipc_cskeleton.h +++ b/IPCKit/ipc_cskeleton.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef CAPI_INCLUDE_IPC_CSKELETON_H -#define CAPI_INCLUDE_IPC_CSKELETON_H - /** * @addtogroup OHIPCSkeleton * @{ @@ -39,6 +36,9 @@ * @since 12 */ +#ifndef CAPI_INCLUDE_IPC_CSKELETON_H +#define CAPI_INCLUDE_IPC_CSKELETON_H + #include #include "ipc_cparcel.h" diff --git a/IPCKit/ipc_error_code.h b/IPCKit/ipc_error_code.h index 5f7a14514..5fa109e5b 100644 --- a/IPCKit/ipc_error_code.h +++ b/IPCKit/ipc_error_code.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef CAPI_INCLUDE_IPC_ERROR_CODE_H -#define CAPI_INCLUDE_IPC_ERROR_CODE_H - /** * @addtogroup OHIPCErrorCode * @{ @@ -37,6 +34,9 @@ * @since 12 */ +#ifndef CAPI_INCLUDE_IPC_ERROR_CODE_H +#define CAPI_INCLUDE_IPC_ERROR_CODE_H + /** * @brief Enumerates IPC error codes. * diff --git a/IPCKit/ipc_kit.h b/IPCKit/ipc_kit.h index e30d81aac..9786bd1f2 100644 --- a/IPCKit/ipc_kit.h +++ b/IPCKit/ipc_kit.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef CAPI_INCLUDE_IPC_KIT_H -#define CAPI_INCLUDE_IPC_KIT_H - /** * @addtogroup IPCKit * @{ @@ -36,6 +33,9 @@ * @since 12 */ +#ifndef CAPI_INCLUDE_IPC_KIT_H +#define CAPI_INCLUDE_IPC_KIT_H + #include "ipc_error_code.h" #include "ipc_cparcel.h" #include "ipc_cremote_object.h" -- Gitee From b1e871f8b9e4eee0ec0cf87093d829c4b39fedb0 Mon Sep 17 00:00:00 2001 From: cuile4 Date: Mon, 11 Nov 2024 20:11:55 +0800 Subject: [PATCH 098/630] pasteboard errorcode fix Signed-off-by: cuile4 --- .../pasteboard/include/oh_pasteboard.h | 28 +++++++++---------- .../include/oh_pasteboard_err_code.h | 16 +++++++---- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 15d489623..254e346ce 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -101,8 +101,8 @@ OH_PasteboardObserver* OH_PasteboardObserver_Create(); * * @param observer Pointer to the {@link OH_PasteboardObserver} instance to destroy. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link ERR_OK} if the operation is successful. - * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. + * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_PasteboardObserver PASTEBOARD_ErrCode. * @since 13 */ @@ -117,8 +117,8 @@ int OH_PasteboardObserver_Destroy(OH_PasteboardObserver* observer); * @param finalize Optional callback that can free context when destroy observer. * For details, see {@link Pasteboard_Finalize}. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link ERR_OK} if the operation is successful. - * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. + * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_PasteboardObserver Pasteboard_Notify PASTEBOARD_ErrCode. * @since 13 */ @@ -159,8 +159,8 @@ void OH_Pasteboard_Destroy(OH_Pasteboard* pasteboard); * @param observer - Pointer to the observer information, which specifies the callback used to * reporting the pasteboard data change. For details, see {@link OH_PasteboardObserver}. * @return Returns the status code of the execution. For details, {@link PASTEBOARD_ErrCode}. - * Returns {@link ERR_OK} if the operation is successful. - * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. + * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard OH_PasteboardObserver PASTEBOARD_ErrCode. * @since 13 */ @@ -174,8 +174,8 @@ int OH_Pasteboard_Subscribe(OH_Pasteboard* pasteboard, int type, const OH_Pasteb * @param observer - Pointer to the observer information, which specifies the callback used to * reporting the pasteboard data change. For details, see {@link OH_PasteboardObserver}. * @return Returns the status code of the execution. For details, {@link PASTEBOARD_ErrCode}. - * Returns {@link ERR_OK} if the operation is successful. - * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. + * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard OH_PasteboardObserver PASTEBOARD_ErrCode. * @since 13 */ @@ -200,8 +200,8 @@ bool OH_Pasteboard_IsRemoteData(OH_Pasteboard* pasteboard); * @param source Pointer to the source data. * @param len Length of the source data. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link ERR_OK} if the operation is successful. - * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. + * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard PASTEBOARD_ErrCode. * @since 13 */ @@ -249,8 +249,8 @@ OH_UdmfData* OH_Pasteboard_GetData(OH_Pasteboard* pasteboard, int* status); * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. * @param data Pointer to the {@link OH_UdmfData} instance. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link ERR_OK} if the operation is successful. - * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. + * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard OH_UdmfData PASTEBOARD_ErrCode. * @since 13 */ @@ -261,8 +261,8 @@ int OH_Pasteboard_SetData(OH_Pasteboard* pasteboard, OH_UdmfData* data); * * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link ERR_OK} if the operation is successful. - * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. + * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard PASTEBOARD_ErrCode. * @since 13 */ diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h index 36f30f1a9..5957cfbb0 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h @@ -40,6 +40,8 @@ #ifndef OH_PASTEBOARD_ERR_CODE_H #define OH_PASTEBOARD_ERR_CODE_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -53,27 +55,29 @@ typedef enum PASTEBOARD_ErrCode { /** * @error The operation is successful. */ - ERR_OK = 0, + PASTEBOARD_ERR_OK = ERR_OK, /** * @error Permission verification failed. */ - ERR_PERMISSION_ERROR = 201, + PASTEBOARD_ERR_PERMISSION_ERROR = 201, /** * @error Invalid parameter is detected. */ - ERR_INVALID_PARAMETER = 401, + PASTEBOARD_ERR_INVALID_PARAMETER = 401, /** * @error The capability is not supported. */ - ERR_DEVICE_NOT_SUPPORTED = 801, + PASTEBOARD_ERR_DEVICE_NOT_SUPPORTED = 801, /** * @error Inner error. */ - ERR_INNER_ERROR = 12900000, + PASTEBOARD_ERR_INNER_ERROR = 12900000, + ERR_INNER_ERROR = PASTEBOARD_ERR_INNER_ERROR, /** * @error Another copy is in progress. */ - ERR_BUSY = 12900003, + PASTEBOARD_ERR_BUSY = 12900003, + ERR_BUSY = PASTEBOARD_ERR_BUSY, } PASTEBOARD_ErrCode; #ifdef __cplusplus }; -- Gitee From 7c084270497986349387f5dc057229f9691d8289 Mon Sep 17 00:00:00 2001 From: houguobiao Date: Tue, 12 Nov 2024 10:22:34 +0800 Subject: [PATCH 099/630] =?UTF-8?q?TextPicker=E7=BB=84=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0onScrollStop=E4=BA=8B=E4=BB=B6=E5=9B=9E=E8=B0=83C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houguobiao Change-Id: I935cdc210db6488527cf788ef629dc0050c76783 --- arkui/ace_engine/native/native_node.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d57414dcc..f871de0b4 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6100,6 +6100,19 @@ typedef enum { */ NODE_TEXT_PICKER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_PICKER, + /** + * @brief Defines the event triggered when an item is selected and scrolling has stopped in the + * ARKUI_NODE_TEXT_PICKER component. + * + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0...11].i32: value of the selected item. \n + * + * @since 14 + */ + NODE_TEXT_PICKER_EVENT_ON_SCROLL_STOP = 15001, + /** * @brief Defines the event triggered when a date is selected in the NODE_CALENDAR_PICKER. * -- Gitee From 614c630b15567fae11c1a30cc9c76884cc78f41d Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Wed, 30 Oct 2024 18:06:39 +0800 Subject: [PATCH 100/630] capi Signed-off-by: wangxiuxiu96 --- arkui/ace_engine/native/native_node.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d57414dcc..419ba69d7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1825,6 +1825,20 @@ typedef enum { * */ NODE_CLICK_DISTANCE = 97, + + /** + * @brief Sets whether the focus can be placed on this component. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0. + * + * @since 14 + */ + NODE_TAB_STOP = 98, /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. -- Gitee From d9ffada86c3a49c51c0ff6d1d5e522ca1a0b0c2b Mon Sep 17 00:00:00 2001 From: zoulinken Date: Mon, 28 Oct 2024 16:30:34 +0800 Subject: [PATCH 101/630] =?UTF-8?q?C-API=E6=89=93=E7=82=B9=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E7=9B=B8=E5=85=B3API=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/libace.ndk.json | 44 +++++++++++++++++ arkui/ace_engine/native/native_node.h | 63 +++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 57 ++++++++++++++++++++++ 3 files changed, 164 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 48c1d3a84..8852a3d2b 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1303,6 +1303,50 @@ "first_introduced": "13", "name": "OH_ArkUI_NodeUtils_RemoveCustomProperty" }, + { + "first_introduced": "14", + "name": "OH_ArkUI_NodeUtils_GetCustomProperty" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_NodeUtils_GetParentInPageTree" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_NodeUtils_GetActiveChildrenInfo" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_NodeUtils_GetCurrentPageRootNode" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_NodeUtils_IsCreatedByNDK" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_NodeUtils_GetNodeType" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_CustomProperty_Destroy" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_CustomProperty_GetStringValue" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_ActiveChildrenInfo_Destroy" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex" + }, + { + "first_introduced": "14", + "name": "OH_ArkUI_ActiveChildrenInfo_GetCount" + }, { "first_introduced": "12", "name": "OH_ArkUI_ListChildrenMainSizeOption_Create" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d57414dcc..908e160b8 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7728,6 +7728,69 @@ void OH_ArkUI_NodeUtils_AddCustomProperty(ArkUI_NodeHandle node, const char* nam */ void OH_ArkUI_NodeUtils_RemoveCustomProperty(ArkUI_NodeHandle node, const char* name); +/** + * @brief Get the value of the custom property of the component. + * + * @param node ArkUI-NodeHandle pointer. + * @param name The name of the custom attribute. + * @param handle The structure of the custom attribute corresponding to the key parameter name obtained. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * @since 14 + */ +int32_t OH_ArkUI_NodeUtils_GetCustomProperty(ArkUI_NodeHandle node, const char* name, ArkUI_CustomProperty** handle); + +/** + * @brief Get the parent node to obtain the component nodes created by ArkTs. + * + * @param node Target node object. + * @return Return the pointer of the component. + * @since 14 + */ +ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetParentInPageTree(ArkUI_NodeHandle node); + +/** + * @brief Retrieve all active child nodes of a node. + * + * @param head Pass in the node that needs to be obtained. + * @param handle The structure corresponding to the sub node information of the head node. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * @since 14 + */ +int32_t OH_ArkUI_NodeUtils_GetActiveChildrenInfo(ArkUI_NodeHandle head, ArkUI_ActiveChildrenInfo** handle); + +/** + * @brief Retrieve the root node of the current page. + * + * @param node Target node object. + * @return Return the pointer of the component. + * @since 14 + */ +ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetCurrentPageRootNode(ArkUI_NodeHandle node); + +/** + * @brief Retrieve whether the component is labeled by C-API. + * + * @param node Target node object. + * @return Return whether the node is a Tag created by C-API, + * true represents created by C-API, false represents not created by C-API. + * @since 14 + */ +bool OH_ArkUI_NodeUtils_IsCreatedByNDK(ArkUI_NodeHandle node); + +/** + * @brief Get the type of node. + * + * @param node Target node object. + * @return Return the type of the node. + * For specific open types, refer to {@link ArkUI_NodeType}. For unopened nodes, return -1. + * @since 14 + */ +int32_t OH_ArkUI_NodeUtils_GetNodeType(ArkUI_NodeHandle node); + /** * @brief Collapse the ListItem in its expanded state. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f484a3538..ca825e62b 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -193,6 +193,20 @@ typedef struct ArkUI_AccessibilityState ArkUI_AccessibilityState; */ typedef struct ArkUI_AccessibilityValue ArkUI_AccessibilityValue; +/** + * @brief Define the information of the Custom Property class for custom properties. + * + * @since 14 + */ +typedef struct ArkUI_CustomProperty ArkUI_CustomProperty; + +/** + * @brief Define ActiveChildenInfo class information. + * + * @since 14 + */ +typedef struct ArkUI_ActiveChildrenInfo ArkUI_ActiveChildrenInfo; + /** * @brief Defines the event callback type. * @@ -3878,6 +3892,49 @@ void OH_ArkUI_AccessibilityValue_SetText(ArkUI_AccessibilityValue* value, const * @since 12 */ const char* OH_ArkUI_AccessibilityValue_GetText(ArkUI_AccessibilityValue* value); + +/** + * @brief Destroy the instance of Customs Property. + * + * @param handle The instance of Customs Property to be destroyed. + * @since 14 + */ +void OH_ArkUI_CustomProperty_Destroy(ArkUI_CustomProperty* handle); + +/** + * @brief Get custom attribute value information. + * + * @param handle Custom attribute object pointer. + * @return Customize the value information within the attribute structure. + * @since 14 + */ +const char* OH_ArkUI_CustomProperty_GetStringValue(ArkUI_CustomProperty* handle); + +/** + * @brief Destroy ActiveChildenInfo instance. + * + * @param handle ActiveChild instance to be destroyed. + * @since 14 + */ +void OH_ArkUI_ActiveChildrenInfo_Destroy(ArkUI_ActiveChildrenInfo* handle); + +/** + * @brief Retrieve the child nodes of ActiveChildenInfo with the structure index. + * + * @param handle The ActiveChildenInfo instance for obtaining information. + * @return The child node pointer corresponding to the index. Return nullptr in case of exception. + * @since 14 + */ +ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildrenInfo* handle, int32_t index); + +/** + * @brief Retrieve the number of nodes within the structure of ActiveChildenInfo. + * + * @param handle The ActiveChildenInfo instance for obtaining information. + * @return Number of child nodes. Default value: 0. + * @since 14 + */ +int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle); #ifdef __cplusplus }; #endif -- Gitee From 441bd679251b74dcaf0f91edc7fc6f96a8b304aa Mon Sep 17 00:00:00 2001 From: "@ran-zhao-yu" Date: Wed, 13 Nov 2024 11:13:56 +0800 Subject: [PATCH 102/630] =?UTF-8?q?API=20Link=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @ran-zhao-yu --- .../include/rawfile/raw_dir.h | 3 ++ .../include/rawfile/raw_file.h | 3 ++ .../include/rawfile/raw_file_manager.h | 3 ++ .../include/resourcemanager/ohresmgr.h | 40 +++++++++---------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/global/resource_management/include/rawfile/raw_dir.h b/global/resource_management/include/rawfile/raw_dir.h index 94965690c..9e4228122 100644 --- a/global/resource_management/include/rawfile/raw_dir.h +++ b/global/resource_management/include/rawfile/raw_dir.h @@ -31,6 +31,9 @@ * @brief Declares native functions related to raw file directories. * * For example, you can use the functions to traverse and close a raw file directory, and reset its index. + * + * @syscap SystemCapability.Global.ResourceManager + * @library librawfile.z.so * @kit LocalizationKit * @since 8 * @version 1.0 diff --git a/global/resource_management/include/rawfile/raw_file.h b/global/resource_management/include/rawfile/raw_file.h index 4aa80b842..1a0da611f 100644 --- a/global/resource_management/include/rawfile/raw_file.h +++ b/global/resource_management/include/rawfile/raw_file.h @@ -31,6 +31,9 @@ * @brief Declares native functions related to raw file. * * For example, you can use the functions to search for, read, and close raw files. + * + * @syscap SystemCapability.Global.ResourceManager + * @library librawfile.z.so * @kit LocalizationKit * @since 8 * @version 1.0 diff --git a/global/resource_management/include/rawfile/raw_file_manager.h b/global/resource_management/include/rawfile/raw_file_manager.h index 1663e77be..4b1dfb619 100644 --- a/global/resource_management/include/rawfile/raw_file_manager.h +++ b/global/resource_management/include/rawfile/raw_file_manager.h @@ -31,6 +31,9 @@ * @brief Declares native functions for the resource manager. * * You can use the resource manager to open raw files for subsequent operations, such as seeking and reading. + * + * @syscap SystemCapability.Global.ResourceManager + * @library librawfile.z.so * @kit LocalizationKit * @since 8 * @version 1.0 diff --git a/global/resource_management/include/resourcemanager/ohresmgr.h b/global/resource_management/include/resourcemanager/ohresmgr.h index 9fc6efde4..d48a69f8b 100644 --- a/global/resource_management/include/resourcemanager/ohresmgr.h +++ b/global/resource_management/include/resourcemanager/ohresmgr.h @@ -50,10 +50,10 @@ extern "C" { * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resId Indicates the resource ID. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -73,10 +73,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64(const NativeResource * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resId Indicates the resource ID. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -96,10 +96,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64Data(const NativeReso * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resName Indicates the resource name. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -119,10 +119,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64ByName(const NativeRe * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resName Indicates the resource name. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -142,10 +142,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64DataByName(const Nati * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resId Indicates the resource ID. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -165,10 +165,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMedia(const NativeResourceManage * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resId Indicates the resource ID. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -188,10 +188,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMediaData(const NativeResourceMa * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resName Indicates the resource name. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -211,10 +211,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMediaByName(const NativeResource * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resName Indicates the resource name. - * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means - * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @param resultValue the result write to resultValue. * @param resultLen the media length write to resultLen. + * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means + * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -234,10 +234,10 @@ ResourceManager_ErrorCode OH_ResourceManager_GetMediaDataByName(const NativeReso * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resId Indicates the resource ID. + * @param drawableDescriptor the result write to drawableDescriptor. * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means * to use the density of current system dpi. * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media. - * @param drawableDescriptor the result write to drawableDescriptor. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -256,11 +256,11 @@ ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptor(const NativeR * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resId Indicates the resource ID. + * @param drawableDescriptor the result write to drawableDescriptor. * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media. * If this attribute is not required, set this parameter to 0. - * @param drawableDescriptor the result write to drawableDescriptor. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -278,11 +278,11 @@ ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorData(const Nat * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resName Indicates the resource name. + * @param drawableDescriptor the result write to drawableDescriptor. * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means * to use the density of current system dpi. * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media, * 2 means the theme dynamic media. - * @param drawableDescriptor the result write to drawableDescriptor. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. @@ -300,11 +300,11 @@ ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorByName(const N * @param mgr Indicates the pointer to {@link NativeResourceManager} * {@link OH_ResourceManager_InitNativeResourceManager}. * @param resName Indicates the resource name. + * @param drawableDescriptor the result write to drawableDescriptor. * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means * to use the density of current system dpi. If this attribute is not required, set this parameter to 0. * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media, * 2 means the theme dynamic media. If this attribute is not required, set this parameter to 0. - * @param drawableDescriptor the result write to drawableDescriptor. * @return {@link SUCCESS} 0 - Success. * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: * 1.Incorrect parameter types; 2.Parameter verification failed. -- Gitee From b0d7da93a67929ffec1542cbcfd6b1cb6a10f909 Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Wed, 13 Nov 2024 06:40:50 +0000 Subject: [PATCH 103/630] add Signed-off-by: Feng Lin --- multimedia/media_foundation/native_averrors.h | 123 ++---------------- 1 file changed, 14 insertions(+), 109 deletions(-) diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index 727f2eea3..1bb0f8062 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -108,172 +108,77 @@ typedef enum OH_AVErrCode { */ AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION = 301, /** - * @the address of server is incorrect, and IO can not find host. + * @error the address of server is incorrect, and IO can not find host. * @since 14 */ AV_ERR_IO_CANNOT_FIND_HOST = 5411001, /** - * @network connection timeout. + * @error network connection timeout. * @since 14 */ AV_ERR_IO_CONNECTION_TIMEOUT = 5411002, /** - * @failed link due to abnormal network. + * @error failed link due to abnormal network. * @since 14 */ AV_ERR_IO_NETWORK_ABNORMAL = 5411003, /** - * @failed link due to unavailable network. + * @error failed link due to unavailable network. * @since 14 */ AV_ERR_IO_NETWORK_UNAVAILABLE = 5411004, /** - * @network permission dennied. + * @error network permission dennied. * @since 14 */ AV_ERR_IO_NO_PERMISSION = 5411005, /** - * @the client request parameters are incorrect or exceed the processing capacity. + * @error the client request parameters are incorrect or exceed the processing capacity. * @since 14 */ AV_ERR_IO_NETWORK_ACCESS_DENIED = 5411006, /** - * @cannot find available network resources. + * @error cannot find available network resources. * @since 14 */ AV_ERR_IO_RESOURCE_NOT_FOUND = 5411007, /** - * @the server failS to verify the client certificate because the certificate is not carried, + * @error the server failS to verify the client certificate because the certificate is not carried, * the certificate is invalid, or the certificate is expired. * @since 14 */ AV_ERR_IO_SSL_CLIENT_CERT_NEEDED = 5411008, /** - * @the client fails to verify the server certificate because the certificate is not carried, + * @error the client fails to verify the server certificate because the certificate is not carried, * the certificate is invalid, or the certificate is expired. * @since 14 */ AV_ERR_IO_SSL_CONNECT_FAIL = 5411009, /** - * @IO SSL server cert untrusted. + * @error IO SSL server cert untrusted. * @since 14 */ AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED = 5411010, /** - * @unsupported request due to network protocols. + * @error unsupported request due to network protocols. * @since 14 */ AV_ERR_IO_UNSUPPORTED_REQUEST = 5411011, /** - * @file data is incorrect, and no specific data can be provided. + * @error file data is incorrect, and no specific data can be provided. * @since 14 */ AV_ERR_IO_DATA_ABNORMAL = 5411012, /** - * @file is occupied by other processes and cannot be accessed. - * @since 14 - */ - AV_ERR_IO_FILE_ACCESS_DENIED = 5411013, - /** - * @the file handle is incorrect. - * @since 14 - */ - AV_ERR_IO_FILE_BAD_HANDLE = 5411014, - /** - * @IO file not found. - * @since 14 - */ - AV_ERR_IO_FILE_NOT_FOUND = 5411015, - /** - * @IO file permission denied because API does not have permissions. - * @since 14 - */ - AV_ERR_IO_FILE_PERMISSION_DENIED = 5411016, - /** - * @fail to decode the audio data. - * @since 14 - */ - AV_ERR_IO_AUDIO_DEC_FAILED = 5411017, - /** - * @fail to init the audio decoder. - * @since 14 - */ - AV_ERR_IO_AUDIO_DEC_INIT_FAILED = 5411018, - /** - * @the audio decoder is unavailable for handler incurrupt, or audio decoder subsystem abnormal. - * @since 14 - */ - AV_ERR_IO_AUDIO_DEC_UNAVAILABLE = 5411019, - /** - * @audio device error. + * @error audio device error. * @since 14 */ AV_ERR_IO_AUDIO_DEVICE_ERROR = 5411020, /** - * @audio device state does not support the current operation. - * @since 14 - */ - AV_ERR_IO_AUDIO_DEVICE_INVALID_STATE = 5411021, - /** - * @audio device timeout when calling audio render interface. - * @since 14 - */ - AV_ERR_IO_AUDIO_DEVICE_TIMEOUT = 5411022, - /** - * @audio device unavailable, unable to create an audio device. - * @since 14 - */ - AV_ERR_IO_AUDIO_DEVICE_UNAVAILABLE = 5411023, - /** - * @fail to encode the audio data. - * @since 14 - */ - AV_ERR_IO_AUDIO_ENC_FAILED = 5411024, - /** - * @fail to init the audio encoder. - * @since 14 - */ - AV_ERR_IO_AUDIO_ENC_INIT_FAILED = 5411025, - /** - * @audio encoder is unavailable for handler incurrupt, or audio encoder subsystem abnormal. - * @since 14 - */ - AV_ERR_IO_AUDIO_ENC_UNAVAILABLE = 5411026, - /** - * @fail to decode the video data. - * @since 14 - */ - AV_ERR_IO_VIDEO_DEC_FAILED = 5411027, - /** - * @fail to init the video decoder. - * @since 14 - */ - AV_ERR_IO_VIDEO_DEC_INIT_FAILED = 5411028, - /** - * @video decoder is unavailable for handler incurrupt, or video decoder subsystem abnormal. - * @since 14 - */ - AV_ERR_IO_VIDEO_DEC_UNAVAILABLE = 5411029, - /** - * @video device error. + * @error video device error. * @since 14 */ AV_ERR_IO_VIDEO_DEVICE_ERROR = 5411030, - /** - * @fail to encode the video data. - * @since 14 - */ - AV_ERR_IO_VIDEO_ENC_FAILED = 5411031, - /** - * @fail to init the video encoder. - * @since 14 - */ - AV_ERR_IO_VIDEO_ENC_INIT_FAILED = 5411032, - /** - * @video encoder is unavailable for handler incurrupt, or video encoder subsystem abnormal. - * @since 14 - */ - AV_ERR_IO_VIDEO_ENC_UNAVAILABLE = 5411033, } OH_AVErrCode; #ifdef __cplusplus -- Gitee From 1e41924be4e8fdda1f8e199cb124e7dfaf7a225e Mon Sep 17 00:00:00 2001 From: maan4 Date: Wed, 13 Nov 2024 06:58:04 +0000 Subject: [PATCH 104/630] sensors CAPI change Signed-off-by: maan4 --- sensors/miscdevice/vibrator/include/vibrator_type.h | 4 ++++ sensors/sensor/oh_sensor_type.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sensors/miscdevice/vibrator/include/vibrator_type.h b/sensors/miscdevice/vibrator/include/vibrator_type.h index 1711f7308..0ce2b1ea3 100644 --- a/sensors/miscdevice/vibrator/include/vibrator_type.h +++ b/sensors/miscdevice/vibrator/include/vibrator_type.h @@ -34,7 +34,11 @@ #ifndef VIBRATOR_TYPE_H #define VIBRATOR_TYPE_H +#ifdef __cplusplus #include +#else +#include +#endif #ifdef __cplusplus extern "C" { diff --git a/sensors/sensor/oh_sensor_type.h b/sensors/sensor/oh_sensor_type.h index 0641a9c0c..c53c5e152 100644 --- a/sensors/sensor/oh_sensor_type.h +++ b/sensors/sensor/oh_sensor_type.h @@ -34,7 +34,11 @@ #ifndef OH_SENSOR_TYPE_H #define OH_SENSOR_TYPE_H +#ifdef __cplusplus #include +#else +#include +#endif #ifdef __cplusplus extern "C" { -- Gitee From 3e354bd41c13918faa31b3f35a46afddfe63ebca Mon Sep 17 00:00:00 2001 From: dujingcheng Date: Wed, 13 Nov 2024 02:44:57 +0000 Subject: [PATCH 105/630] fix Signed-off-by: dujingcheng --- arkui/ace_engine/native/native_animate.h | 4 ++++ arkui/ace_engine/native/native_interface_accessibility.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h index 08709d707..bd5c9303e 100644 --- a/arkui/ace_engine/native/native_animate.h +++ b/arkui/ace_engine/native/native_animate.h @@ -36,7 +36,11 @@ #ifndef ARKUI_NATIVE_ANIMATE_H #define ARKUI_NATIVE_ANIMATE_H +#ifdef __cplusplus #include +#else +#include +#endif #include "native_type.h" diff --git a/arkui/ace_engine/native/native_interface_accessibility.h b/arkui/ace_engine/native/native_interface_accessibility.h index 4150edcec..09f8b97e5 100644 --- a/arkui/ace_engine/native/native_interface_accessibility.h +++ b/arkui/ace_engine/native/native_interface_accessibility.h @@ -34,10 +34,14 @@ #ifndef _NATIVE_INTERFACE_ACCESSIBILITY_H #define _NATIVE_INTERFACE_ACCESSIBILITY_H +#ifdef __cplusplus #include +#else +#include +#endif #ifdef __cplusplus -extern "C"{ +extern "C" { #endif /** -- Gitee From 6db2f758d39bb686842db34eff7ad0fecc06b55f Mon Sep 17 00:00:00 2001 From: GuoLi Date: Wed, 13 Nov 2024 07:46:04 +0000 Subject: [PATCH 106/630] =?UTF-8?q?=E8=93=9D=E9=BB=84=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: GuoLi --- network/netssl/include/net_ssl_c_type.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/network/netssl/include/net_ssl_c_type.h b/network/netssl/include/net_ssl_c_type.h index c7096a558..d0bbea496 100644 --- a/network/netssl/include/net_ssl_c_type.h +++ b/network/netssl/include/net_ssl_c_type.h @@ -38,7 +38,11 @@ */ #include +#ifdef __cplusplus #include +#else +#include +#endif #ifdef __cplusplus extern "C" { -- Gitee From c11960f563081cfa573b77edba795060b2803153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E9=BE=99?= Date: Wed, 13 Nov 2024 15:58:34 +0800 Subject: [PATCH 107/630] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李文龙 --- LocationKit/oh_location_type.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LocationKit/oh_location_type.h b/LocationKit/oh_location_type.h index 729a61051..48e117740 100644 --- a/LocationKit/oh_location_type.h +++ b/LocationKit/oh_location_type.h @@ -34,7 +34,11 @@ #ifndef OH_LOCATION_TYPE_H #define OH_LOCATION_TYPE_H +#ifdef __cplusplus #include +#else +#include +#endif #ifdef __cplusplus extern "C" { -- Gitee From be0748697db475982ce846909f0830b63670f09f Mon Sep 17 00:00:00 2001 From: shilong Date: Wed, 13 Nov 2024 08:38:33 +0000 Subject: [PATCH 108/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E6=96=B0=E5=A2=9Erelease=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- .../hid/hid_ddk_types.h | 26 ++++++++-------- .../external_device_manager/usb/usb_ddk_api.h | 11 +++++++ .../usb/usb_ddk_types.h | 31 +++++++++---------- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/drivers/external_device_manager/hid/hid_ddk_types.h b/drivers/external_device_manager/hid/hid_ddk_types.h index 1029fbb12..2bd632dc2 100644 --- a/drivers/external_device_manager/hid/hid_ddk_types.h +++ b/drivers/external_device_manager/hid/hid_ddk_types.h @@ -589,20 +589,20 @@ typedef struct Hid_EventProperties { * @version 1.0 */ typedef enum { - /** @error Operation successful */ + /** Operation successful */ HID_DDK_SUCCESS = 0, - /** @error Operation failed */ - HID_DDK_FAILURE = -1, - /** @error Invalid parameter */ - HID_DDK_INVALID_PARAMETER = -2, - /** @error Invalid operation */ - HID_DDK_INVALID_OPERATION = -3, - /** @error Null pointer exception */ - HID_DDK_NULL_PTR = -4, - /** @error Timeout */ - HID_DDK_TIMEOUT = -5, - /** @error Permission denied */ - HID_DDK_NO_PERM = -6 + /** Permission denied */ + HID_DDK_NO_PERM = 201, + /** Invalid parameter */ + HID_DDK_INVALID_PARAMETER = 401, + /** Operation failed */ + HID_DDK_FAILURE = 27300001, + /** Null pointer exception */ + HID_DDK_NULL_PTR = 27300002, + /** Invalid operation */ + HID_DDK_INVALID_OPERATION = 27300003, + /** Timeout */ + HID_DDK_TIMEOUT = 27300004, } Hid_DdkErrCode; #ifdef __cplusplus } diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index 90ff08e69..00cb13c07 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -70,6 +70,17 @@ int32_t OH_Usb_Init(void); */ void OH_Usb_Release(void); +/** + * @brief Releases the DDK. + * + * @permission ohos.permission.ACCESS_DDK_USB + * @return {@link USB_DDK_SUCCESS} the operation is successful. + * {@link USB_DDK_NO_PERM} permission check failed. + * @since 14 + * @version 1.0 + */ +int32_t OH_Usb_ReleaseSource(void); + /** * @brief Obtains the USB device descriptor. * diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 602baba11..0e32d4a92 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -292,28 +292,25 @@ typedef struct UsbDeviceMemMap { /** * @brief Defines error codes for USB DDK. * - * @since 10 + * @since 11 * @version 1.0 */ typedef enum { - /** @error The operation is successful. */ + /** The operation is successful. */ USB_DDK_SUCCESS = 0, - /** @error The operation failed. */ - USB_DDK_FAILED = -1, - /** @error Invalid parameter. */ - USB_DDK_INVALID_PARAMETER = -2, - /** @error Memory-related error, for example, insufficient memory, memory data copy failure,\n - * or memory application failure. + /** Permission denied. */ + USB_DDK_NO_PERM = 201, + /** Invalid parameter. */ + USB_DDK_INVALID_PARAMETER = 401, + /** Memory-related error, for example, insufficient memory, memory data copy failure, or memory application failure. */ - USB_DDK_MEMORY_ERROR = -3, - /** @error Invalid operation. */ - USB_DDK_INVALID_OPERATION = -4, - /** @error Null pointer exception */ - USB_DDK_NULL_PTR = -5, - /** @error Device busy. */ - USB_DDK_DEVICE_BUSY = -6, - /** @error Transmission timeout. */ - USB_DDK_TIMEOUT = -7 + USB_DDK_MEMORY_ERROR = 27400001, + /** Invalid operation. */ + USB_DDK_INVALID_OPERATION = 27400002, + /** I/O error */ + USB_DDK_IO_FAILED = 27400003, + /** Transmission timeout. */ + USB_DDK_TIMEOUT = 27400004, } UsbDdkErrCode; #ifdef __cplusplus } -- Gitee From 49a0e31828997679d1aa6cdf697851e3660b086b Mon Sep 17 00:00:00 2001 From: y00656910 Date: Wed, 13 Nov 2024 16:53:37 +0800 Subject: [PATCH 109/630] fix build error Signed-off-by: y00656910 Change-Id: Id0714bce41f7ac7d05e8115f8f24387eaba4c92f --- multimedia/image_framework/include/image_pixel_map_napi.h | 4 ++++ multimedia/image_framework/include/image_source_mdk.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/multimedia/image_framework/include/image_pixel_map_napi.h b/multimedia/image_framework/include/image_pixel_map_napi.h index 3f4a447f5..3608dac13 100644 --- a/multimedia/image_framework/include/image_pixel_map_napi.h +++ b/multimedia/image_framework/include/image_pixel_map_napi.h @@ -36,7 +36,11 @@ #ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PIXEL_MAP_NAPI_H_ #define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PIXEL_MAP_NAPI_H_ +#ifdef __cplusplus #include +#else +#include +#endif #include "napi/native_api.h" namespace OHOS { namespace Media { diff --git a/multimedia/image_framework/include/image_source_mdk.h b/multimedia/image_framework/include/image_source_mdk.h index ae7cadf4d..91b4b5abd 100644 --- a/multimedia/image_framework/include/image_source_mdk.h +++ b/multimedia/image_framework/include/image_source_mdk.h @@ -37,7 +37,11 @@ #ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_SOURCE_MDK_H_ #define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_SOURCE_MDK_H_ +#ifdef __cplusplus #include +#else +#include +#endif #include "napi/native_api.h" #include "image_mdk_common.h" #include "rawfile/raw_file.h" -- Gitee From 8dd446a16404df8c2e34ccf9303708cdcc26f148 Mon Sep 17 00:00:00 2001 From: shilong Date: Wed, 13 Nov 2024 09:03:59 +0000 Subject: [PATCH 110/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B2=A1=E6=9D=83?= =?UTF-8?q?=E9=99=90=E9=94=99=E8=AF=AF=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- .../external_device_manager/usb/usb_ddk_api.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index 00cb13c07..844dea874 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -88,7 +88,7 @@ int32_t OH_Usb_ReleaseSource(void); * @param deviceId ID of the device whose descriptor is to be obtained. * @param desc Standard device descriptor defined in the USB protocol. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} desc is null. * @since 10 @@ -106,7 +106,7 @@ int32_t OH_Usb_GetDeviceDescriptor(uint64_t deviceId, struct UsbDeviceDescriptor * @param config Configuration descriptor, which includes the standard configuration descriptor defined in the\n * USB protocol and the associated interface descriptor and endpoint descriptor. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} config is null. * @since 10 @@ -135,7 +135,7 @@ void OH_Usb_FreeConfigDescriptor(struct UsbDdkConfigDescriptor * const config); * @param interfaceHandle Interface operation handle. After the interface is claimed successfully, a value will be\n * assigned to this parameter. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} interfaceHandle is null. * @since 10 @@ -149,7 +149,7 @@ int32_t OH_Usb_ClaimInterface(uint64_t deviceId, uint8_t interfaceIndex, uint64_ * @permission ohos.permission.ACCESS_DDK_USB * @param interfaceHandle Interface operation handle. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * @since 10 * @version 1.0 @@ -164,7 +164,7 @@ int32_t OH_Usb_ReleaseInterface(uint64_t interfaceHandle); * @param settingIndex Index of the alternate setting, which corresponds to bAlternateSetting\n * in the USB protocol. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * @since 10 * @version 1.0 @@ -179,7 +179,7 @@ int32_t OH_Usb_SelectInterfaceSetting(uint64_t interfaceHandle, uint8_t settingI * @param settingIndex Index of the alternate setting, which corresponds to bAlternateSetting\n * in the USB protocol. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} settingIndex is null. * @since 10 @@ -197,7 +197,7 @@ int32_t OH_Usb_GetCurrentInterfaceSetting(uint64_t interfaceHandle, uint8_t *set * @param data Data to be transferred. * @param dataLen Data length. The return value indicates the length of the actually read data. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} setup is null or data is null or dataLen is null or dataLen is less than\n * size of the read data. @@ -218,7 +218,7 @@ int32_t OH_Usb_SendControlReadRequest(uint64_t interfaceHandle, const struct Usb * @param data Data to be transferred. * @param dataLen Data length. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} setup is null or data is null. * @since 10 @@ -235,7 +235,7 @@ int32_t OH_Usb_SendControlWriteRequest(uint64_t interfaceHandle, const struct Us * @param pipe Pipe used to transfer data. * @param devMmap Device memory map, which can be obtained by calling OH_Usb_CreateDeviceMemMap. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} pipe is null or devMmap is null or address of devMmap is null. * @since 10 @@ -251,7 +251,7 @@ int32_t OH_Usb_SendPipeRequest(const struct UsbRequestPipe *pipe, UsbDeviceMemMa * @param pipe Pipe used to transfer data. * @param ashmem Shared memory, which can be obtained by calling OH_DDK_CreateAshmem. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} pipe is null or ashmem is null or address of ashmem is null. * @since 12 @@ -267,7 +267,7 @@ int32_t OH_Usb_SendPipeRequestWithAshmem(const struct UsbRequestPipe *pipe, DDK_ * @param size Buffer size. * @param devMmap Data memory map, through which the created buffer is returned to the caller. * @return {@link USB_DDK_SUCCESS} the operation is successful. - * {@link USB_DDK_FAILED} permission check failed or internal error failed. + * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_PARAMETER} devMmap is null. * {@link USB_DDK_MEMORY_ERROR} mmap failed or alloc memory of devMmap failed. * @since 10 -- Gitee From 882542001830df38d5b11cbc3ab6440c4a24155c Mon Sep 17 00:00:00 2001 From: shilong Date: Wed, 13 Nov 2024 09:34:40 +0000 Subject: [PATCH 111/630] =?UTF-8?q?=E4=BF=AE=E6=94=B911=E5=88=B010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/usb/usb_ddk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 0e32d4a92..808d834f1 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -292,7 +292,7 @@ typedef struct UsbDeviceMemMap { /** * @brief Defines error codes for USB DDK. * - * @since 11 + * @since 10 * @version 1.0 */ typedef enum { -- Gitee From 24c8bfd7c75f76bde88e1e2e4a5a70c505693f50 Mon Sep 17 00:00:00 2001 From: liufei Date: Wed, 13 Nov 2024 18:24:07 +0800 Subject: [PATCH 112/630] fix compile error Signed-off-by: liufei Change-Id: I5fdd7d49cb42880b4ae8d8de992ad2e32b2c624c --- .../graphic_2d/native_drawing/drawing_text_typography.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index da9f9a974..59d6488ea 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -40,14 +40,19 @@ * @version 1.0 */ -#include "cstddef" +#ifdef __cplusplus +#include +#include +#else +#include +#include +#endif #include "drawing_canvas.h" #include "drawing_color.h" #include "drawing_font.h" #include "drawing_text_declaration.h" #include "drawing_types.h" -#include "stdint.h" #ifdef __cplusplus extern "C" { -- Gitee From 245f0fa250a404a90c00c124b7c105dbd2c1388e Mon Sep 17 00:00:00 2001 From: shilong Date: Wed, 13 Nov 2024 11:44:33 +0000 Subject: [PATCH 113/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/usb/usb_ddk_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index 844dea874..1ee732e19 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -79,7 +79,7 @@ void OH_Usb_Release(void); * @since 14 * @version 1.0 */ -int32_t OH_Usb_ReleaseSource(void); +int32_t OH_Usb_ReleaseResource(void); /** * @brief Obtains the USB device descriptor. -- Gitee From f43af5a2cd55708f175194616774c5534083ac9f Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 14 Nov 2024 01:53:23 +0000 Subject: [PATCH 114/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9hid=5Fddk=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/hid/hid_ddk_api.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/external_device_manager/hid/hid_ddk_api.h b/drivers/external_device_manager/hid/hid_ddk_api.h index ac9336efd..38cb31b71 100644 --- a/drivers/external_device_manager/hid/hid_ddk_api.h +++ b/drivers/external_device_manager/hid/hid_ddk_api.h @@ -83,8 +83,7 @@ int32_t OH_Hid_CreateDevice(Hid_Device *hidDevice, Hid_EventProperties *hidEvent * {@link HID_DDK_INVALID_OPERATION} connect hid ddk service failed or the caller is not the creator of device. * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.deviceId is less than 0;\n * 2.length exceeds 7; 3.items is null. - * {@link HID_DDK_NULL_PTR} the inject of device is null. - * {@link HID_DDK_FAILURE} the device does not exit. + * {@link HID_DDK_NULL_PTR} the device does not exit. * @since 11 * @version 1.0 */ @@ -98,7 +97,6 @@ int32_t OH_Hid_EmitEvent(int32_t deviceId, const Hid_EmitItem items[], uint16_t * @return {@link HID_DDK_SUCCESS} operation successful. * {@link HID_DDK_NO_PERM} permission check failed. * {@link HID_DDK_INVALID_OPERATION} connect hid ddk service failed or the caller is not the creator of device. - * {@link HID_DDK_FAILURE} the device does not exit. * @since 11 * @version 1.0 */ -- Gitee From f2336b93c8e6a47146d392afec94159ef11f59f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=89=E5=8F=AC=E5=AE=87?= Date: Thu, 14 Nov 2024 01:57:21 +0000 Subject: [PATCH 115/630] update global/resource_management/include/rawfile/raw_dir.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 冉召宇 --- global/resource_management/include/rawfile/raw_dir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global/resource_management/include/rawfile/raw_dir.h b/global/resource_management/include/rawfile/raw_dir.h index 9e4228122..7cc36d691 100644 --- a/global/resource_management/include/rawfile/raw_dir.h +++ b/global/resource_management/include/rawfile/raw_dir.h @@ -31,7 +31,7 @@ * @brief Declares native functions related to raw file directories. * * For example, you can use the functions to traverse and close a raw file directory, and reset its index. - * + * * @syscap SystemCapability.Global.ResourceManager * @library librawfile.z.so * @kit LocalizationKit -- Gitee From dc3a6b7fc7b3bd85dc63ea404affed040ad18647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=89=E5=8F=AC=E5=AE=87?= Date: Thu, 14 Nov 2024 01:57:36 +0000 Subject: [PATCH 116/630] update global/resource_management/include/rawfile/raw_file.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 冉召宇 --- global/resource_management/include/rawfile/raw_file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global/resource_management/include/rawfile/raw_file.h b/global/resource_management/include/rawfile/raw_file.h index 1a0da611f..5616931a6 100644 --- a/global/resource_management/include/rawfile/raw_file.h +++ b/global/resource_management/include/rawfile/raw_file.h @@ -31,7 +31,7 @@ * @brief Declares native functions related to raw file. * * For example, you can use the functions to search for, read, and close raw files. - * + * * @syscap SystemCapability.Global.ResourceManager * @library librawfile.z.so * @kit LocalizationKit -- Gitee From 605adc91b2d598b0b6944d6b2c303aafb43c4fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=89=E5=8F=AC=E5=AE=87?= Date: Thu, 14 Nov 2024 01:57:51 +0000 Subject: [PATCH 117/630] update global/resource_management/include/rawfile/raw_file_manager.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 冉召宇 --- global/resource_management/include/rawfile/raw_file_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global/resource_management/include/rawfile/raw_file_manager.h b/global/resource_management/include/rawfile/raw_file_manager.h index 4b1dfb619..6b775fc15 100644 --- a/global/resource_management/include/rawfile/raw_file_manager.h +++ b/global/resource_management/include/rawfile/raw_file_manager.h @@ -31,7 +31,7 @@ * @brief Declares native functions for the resource manager. * * You can use the resource manager to open raw files for subsequent operations, such as seeking and reading. - * + * * @syscap SystemCapability.Global.ResourceManager * @library librawfile.z.so * @kit LocalizationKit -- Gitee From 25a5c0ee4a39f5da5a489559c46f67b51b3385e0 Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 14 Nov 2024 01:58:09 +0000 Subject: [PATCH 118/630] =?UTF-8?q?exit=20=E4=BF=AE=E6=94=B9=E6=88=90exist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/hid/hid_ddk_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/hid/hid_ddk_api.h b/drivers/external_device_manager/hid/hid_ddk_api.h index 38cb31b71..44f16c804 100644 --- a/drivers/external_device_manager/hid/hid_ddk_api.h +++ b/drivers/external_device_manager/hid/hid_ddk_api.h @@ -83,7 +83,7 @@ int32_t OH_Hid_CreateDevice(Hid_Device *hidDevice, Hid_EventProperties *hidEvent * {@link HID_DDK_INVALID_OPERATION} connect hid ddk service failed or the caller is not the creator of device. * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.deviceId is less than 0;\n * 2.length exceeds 7; 3.items is null. - * {@link HID_DDK_NULL_PTR} the device does not exit. + * {@link HID_DDK_NULL_PTR} the device does not exist. * @since 11 * @version 1.0 */ -- Gitee From e1781c27ea495c3995a59711eb43e2c55153a962 Mon Sep 17 00:00:00 2001 From: l00844999 Date: Tue, 12 Nov 2024 09:14:04 +0800 Subject: [PATCH 119/630] =?UTF-8?q?drawing=E6=95=B4=E6=94=B9=20Signed-off-?= =?UTF-8?q?by:=20l00844999=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../native_drawing/drawing_bitmap.h | 52 ++-- .../graphic_2d/native_drawing/drawing_brush.h | 74 ++--- .../native_drawing/drawing_canvas.h | 281 +++++++++--------- .../graphic_2d/native_drawing/drawing_color.h | 6 +- .../native_drawing/drawing_color_filter.h | 24 +- .../native_drawing/drawing_color_space.h | 10 +- .../native_drawing/drawing_error_code.h | 6 +- .../native_drawing/drawing_filter.h | 34 +-- .../graphic_2d/native_drawing/drawing_font.h | 130 ++++---- .../native_drawing/drawing_gpu_context.h | 14 +- .../graphic_2d/native_drawing/drawing_image.h | 30 +- .../native_drawing/drawing_image_filter.h | 25 +- .../native_drawing/drawing_mask_filter.h | 10 +- .../native_drawing/drawing_matrix.h | 89 +++--- .../native_drawing/drawing_memory_stream.h | 10 +- .../graphic_2d/native_drawing/drawing_path.h | 175 +++++------ .../native_drawing/drawing_path_effect.h | 10 +- .../graphic_2d/native_drawing/drawing_pen.h | 126 ++++---- .../native_drawing/drawing_pixel_map.h | 18 +- .../graphic_2d/native_drawing/drawing_point.h | 10 +- .../native_drawing/drawing_record_cmd.h | 8 +- .../graphic_2d/native_drawing/drawing_rect.h | 37 +-- .../native_drawing/drawing_region.h | 18 +- .../native_drawing/drawing_round_rect.h | 25 +- .../native_drawing/drawing_sampling_options.h | 17 +- .../native_drawing/drawing_shader_effect.h | 52 ++-- .../native_drawing/drawing_shadow_layer.h | 10 +- .../native_drawing/drawing_surface.h | 22 +- .../native_drawing/drawing_text_blob.h | 58 ++-- .../native_drawing/drawing_typeface.h | 14 +- .../graphic_2d/native_drawing/drawing_types.h | 6 +- 31 files changed, 707 insertions(+), 694 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_bitmap.h b/graphic/graphic_2d/native_drawing/drawing_bitmap.h index 5811794fe..95dd825f9 100644 --- a/graphic/graphic_2d/native_drawing/drawing_bitmap.h +++ b/graphic/graphic_2d/native_drawing/drawing_bitmap.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_BITMAP_H -#define C_INCLUDE_DRAWING_BITMAP_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_BITMAP_H +#define C_INCLUDE_DRAWING_BITMAP_H + #include "drawing_types.h" #ifdef __cplusplus @@ -73,114 +73,114 @@ OH_Drawing_Bitmap* OH_Drawing_BitmapCreate(void); * @brief Destroys an OH_Drawing_Bitmap object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @since 8 * @version 1.0 */ -void OH_Drawing_BitmapDestroy(OH_Drawing_Bitmap*); +void OH_Drawing_BitmapDestroy(OH_Drawing_Bitmap* bitmap); /** * @brief Creates an OH_Drawing_Bitmap object with OH_Drawing_Image_Info object * and sets the mem address or pixel storage. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Image_Info Indicates the pointer to an OH_Drawing_Image_Info object. + * @param imageInfo Indicates the pointer to an OH_Drawing_Image_Info object. * @param pixels the pointer to memory address or pixel storage. * @param rowBytes size of pixel row or larger. * @return Returns the pointer to the OH_Drawing_Bitmap object created. * @since 12 * @version 1.0 */ -OH_Drawing_Bitmap* OH_Drawing_BitmapCreateFromPixels(OH_Drawing_Image_Info*, void* pixels, uint32_t rowBytes); +OH_Drawing_Bitmap* OH_Drawing_BitmapCreateFromPixels(OH_Drawing_Image_Info* imageInfo, void* pixels, uint32_t rowBytes); /** * @brief Initializes the width and height of an OH_Drawing_Bitmap object * and sets the pixel format for the bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @param width Indicates the width of the bitmap to be initialized. * @param height Indicates the height of the bitmap to be initialized. - * @param OH_Drawing_BitmapFormat Indicates the pixel format of the bitmap to be initialized, + * @param bitmapFormat Indicates the pixel format of the bitmap to be initialized, * including the pixel color type and alpha type. * @since 8 * @version 1.0 */ -void OH_Drawing_BitmapBuild( - OH_Drawing_Bitmap*, const uint32_t width, const uint32_t height, const OH_Drawing_BitmapFormat*); +void OH_Drawing_BitmapBuild(OH_Drawing_Bitmap* bitmap, + const uint32_t width, const uint32_t height, const OH_Drawing_BitmapFormat* bitmapFormat); /** * @brief Obtains the width of a bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @return Returns the width. * @since 8 * @version 1.0 */ -uint32_t OH_Drawing_BitmapGetWidth(OH_Drawing_Bitmap*); +uint32_t OH_Drawing_BitmapGetWidth(OH_Drawing_Bitmap* bitmap); /** * @brief Obtains the height of a bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @return Returns the height. * @since 8 * @version 1.0 */ -uint32_t OH_Drawing_BitmapGetHeight(OH_Drawing_Bitmap*); +uint32_t OH_Drawing_BitmapGetHeight(OH_Drawing_Bitmap* bitmap); /** * @brief Obtains the color format of a bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @return Returns the bitmap color format. * @since 12 * @version 1.0 */ -OH_Drawing_ColorFormat OH_Drawing_BitmapGetColorFormat(OH_Drawing_Bitmap*); +OH_Drawing_ColorFormat OH_Drawing_BitmapGetColorFormat(OH_Drawing_Bitmap* bitmap); /** * @brief Obtains the alpha format of a bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @return Returns the bitmap alpha format. * @since 12 * @version 1.0 */ -OH_Drawing_AlphaFormat OH_Drawing_BitmapGetAlphaFormat(OH_Drawing_Bitmap*); +OH_Drawing_AlphaFormat OH_Drawing_BitmapGetAlphaFormat(OH_Drawing_Bitmap* bitmap); /** * @brief Obtains the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @return Returns the pixel address. * @since 8 * @version 1.0 */ -void* OH_Drawing_BitmapGetPixels(OH_Drawing_Bitmap*); +void* OH_Drawing_BitmapGetPixels(OH_Drawing_Bitmap* bitmap); /** * @brief Gets the image info. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. - * @param OH_Drawing_Image_Info Indicates the pointer to an OH_Drawing_Image_Info object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param imageInfo Indicates the pointer to an OH_Drawing_Image_Info object. * @since 12 * @version 1.0 */ -void OH_Drawing_BitmapGetImageInfo(OH_Drawing_Bitmap*, OH_Drawing_Image_Info*); +void OH_Drawing_BitmapGetImageInfo(OH_Drawing_Bitmap* bitmap, OH_Drawing_Image_Info* imageInfo); /** * @brief Copies a rect of pixels from bitmap to dstPixels. Copy starts at (srcX, srcY), * and does not exceed bitmap width and height. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @param dstInfo Indicates the pointer to an OH_Drawing_Image_Info object. * @param dstPixels Destination pixel storage. * @param dstRowBytes Destination row length. @@ -190,7 +190,7 @@ void OH_Drawing_BitmapGetImageInfo(OH_Drawing_Bitmap*, OH_Drawing_Image_Info*); * @since 12 * @version 1.0 */ -bool OH_Drawing_BitmapReadPixels(OH_Drawing_Bitmap*, const OH_Drawing_Image_Info* dstInfo, +bool OH_Drawing_BitmapReadPixels(OH_Drawing_Bitmap* bitmap, const OH_Drawing_Image_Info* dstInfo, void* dstPixels, size_t dstRowBytes, int32_t srcX, int32_t srcY); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_brush.h b/graphic/graphic_2d/native_drawing/drawing_brush.h index 1762a979b..d677d9aec 100644 --- a/graphic/graphic_2d/native_drawing/drawing_brush.h +++ b/graphic/graphic_2d/native_drawing/drawing_brush.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_BRUSH_H -#define C_INCLUDE_DRAWING_BRUSH_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_BRUSH_H +#define C_INCLUDE_DRAWING_BRUSH_H + #include "drawing_types.h" #ifdef __cplusplus @@ -60,158 +60,158 @@ OH_Drawing_Brush* OH_Drawing_BrushCreate(void); * @brief Creates an OH_Drawing_Brush copy object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @return Returns the pointer to the OH_Drawing_Brush object created. * If nullptr is returned, the creation fails. * The possible cause of the failure is that the available memory is empty or a nullptr is passed. * @since 12 * @version 1.0 */ -OH_Drawing_Brush* OH_Drawing_BrushCopy(OH_Drawing_Brush*); +OH_Drawing_Brush* OH_Drawing_BrushCopy(OH_Drawing_Brush* brush); /** * @brief Destroys an OH_Drawing_Brush object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @since 8 * @version 1.0 */ -void OH_Drawing_BrushDestroy(OH_Drawing_Brush*); +void OH_Drawing_BrushDestroy(OH_Drawing_Brush* brush); /** * @brief Checks whether anti-aliasing is enabled for a brush. If anti-aliasing is enabled, * edges will be drawn with partial transparency. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @return Returns true if anti-aliasing is enabled; returns false otherwise. * @since 8 * @version 1.0 */ -bool OH_Drawing_BrushIsAntiAlias(const OH_Drawing_Brush*); +bool OH_Drawing_BrushIsAntiAlias(const OH_Drawing_Brush* brush); /** * @brief Enables or disables anti-aliasing for a brush. If anti-aliasing is enabled, * edges will be drawn with partial transparency. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. - * @param bool Specifies whether to enable anti-aliasing. The value true means + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param antiAlias Specifies whether to enable anti-aliasing. The value true means * to enable anti-aliasing, and false means the opposite. * @since 8 * @version 1.0 */ -void OH_Drawing_BrushSetAntiAlias(OH_Drawing_Brush*, bool); +void OH_Drawing_BrushSetAntiAlias(OH_Drawing_Brush* brush, bool antiAlias); /** * @brief Obtains the color of a brush. The color is used by the brush to fill in a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @return Returns a 32-bit (ARGB) variable that describes the color. * @since 8 * @version 1.0 */ -uint32_t OH_Drawing_BrushGetColor(const OH_Drawing_Brush*); +uint32_t OH_Drawing_BrushGetColor(const OH_Drawing_Brush* brush); /** * @brief Sets the color for a brush. The color will be used by the brush to fill in a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @param color Indicates the color to set, which is a 32-bit (ARGB) variable. * @since 8 * @version 1.0 */ -void OH_Drawing_BrushSetColor(OH_Drawing_Brush*, uint32_t color); +void OH_Drawing_BrushSetColor(OH_Drawing_Brush* brush, uint32_t color); /** * @brief Obtains the alpha of a brush. The alpha is used by the brush to fill in a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @return Returns a 8-bit variable that describes the alpha. * @since 11 * @version 1.0 */ -uint8_t OH_Drawing_BrushGetAlpha(const OH_Drawing_Brush*); +uint8_t OH_Drawing_BrushGetAlpha(const OH_Drawing_Brush* brush); /** * @brief Sets the alpha for a brush. The alpha will be used by the brush to fill in a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @param alpha Indicates the alpha to set, which is a 8-bit variable. * @since 11 * @version 1.0 */ -void OH_Drawing_BrushSetAlpha(OH_Drawing_Brush*, uint8_t alpha); +void OH_Drawing_BrushSetAlpha(OH_Drawing_Brush* brush, uint8_t alpha); /** * @brief Sets the shaderEffect for a brush. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. - * @param OH_Drawing_ShaderEffect Indicates the pointer to an OH_Drawing_ShaderEffect object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param shaderEffect Indicates the pointer to an OH_Drawing_ShaderEffect object. * @since 11 * @version 1.0 */ -void OH_Drawing_BrushSetShaderEffect(OH_Drawing_Brush*, OH_Drawing_ShaderEffect*); +void OH_Drawing_BrushSetShaderEffect(OH_Drawing_Brush* brush, OH_Drawing_ShaderEffect* shaderEffect); /** * @brief Sets the shadowLayer for a brush. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. - * @param OH_Drawing_ShadowLayer Indicates the pointer to an OH_Drawing_ShadowLayer object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param shadowLayer Indicates the pointer to an OH_Drawing_ShadowLayer object. * @since 12 * @version 1.0 */ -void OH_Drawing_BrushSetShadowLayer(OH_Drawing_Brush*, OH_Drawing_ShadowLayer*); +void OH_Drawing_BrushSetShadowLayer(OH_Drawing_Brush* brush, OH_Drawing_ShadowLayer* shadowLayer); /** * @brief Sets the filter for a brush. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. * @since 11 * @version 1.0 */ -void OH_Drawing_BrushSetFilter(OH_Drawing_Brush*, OH_Drawing_Filter*); +void OH_Drawing_BrushSetFilter(OH_Drawing_Brush* brush, OH_Drawing_Filter* filter); /** * @brief Gets the filter from a brush. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. * @since 12 * @version 1.0 */ -void OH_Drawing_BrushGetFilter(OH_Drawing_Brush*, OH_Drawing_Filter*); +void OH_Drawing_BrushGetFilter(OH_Drawing_Brush* brush, OH_Drawing_Filter* filter); /** * @brief Sets a blender that implements the specified blendmode enum for a brush. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Brush object. - * @param OH_Drawing_BlendMode Indicates the blend mode. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param blendMode Indicates the blend mode. * @since 12 * @version 1.0 */ -void OH_Drawing_BrushSetBlendMode(OH_Drawing_Brush*, OH_Drawing_BlendMode); +void OH_Drawing_BrushSetBlendMode(OH_Drawing_Brush* brush, OH_Drawing_BlendMode blendMode); /** * @brief Resets all brush contents to their initial values. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @since 12 * @version 1.0 */ -void OH_Drawing_BrushReset(OH_Drawing_Brush*); +void OH_Drawing_BrushReset(OH_Drawing_Brush* brush); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_canvas.h b/graphic/graphic_2d/native_drawing/drawing_canvas.h index f78e6127f..5a1de3d15 100644 --- a/graphic/graphic_2d/native_drawing/drawing_canvas.h +++ b/graphic/graphic_2d/native_drawing/drawing_canvas.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_H -#define C_INCLUDE_DRAWING_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_H +#define C_INCLUDE_DRAWING_H + #include "drawing_error_code.h" #include "drawing_types.h" @@ -78,128 +78,128 @@ OH_Drawing_Canvas* OH_Drawing_CanvasCreate(void); * @brief Destroys an OH_Drawing_Canvas object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasDestroy(OH_Drawing_Canvas*); +void OH_Drawing_CanvasDestroy(OH_Drawing_Canvas* canvas); /** * @brief Binds a bitmap to a canvas so that the content drawn on the canvas * is output to the bitmap (this process is called CPU rendering). * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasBind(OH_Drawing_Canvas*, OH_Drawing_Bitmap*); +void OH_Drawing_CanvasBind(OH_Drawing_Canvas* canvas, OH_Drawing_Bitmap* bitmap); /** * @brief Attaches a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasAttachPen(OH_Drawing_Canvas*, const OH_Drawing_Pen*); +void OH_Drawing_CanvasAttachPen(OH_Drawing_Canvas* canvas, const OH_Drawing_Pen* pen); /** * @brief Detaches the pen from a canvas so that the canvas will not use the style * and color of the pen to outline a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasDetachPen(OH_Drawing_Canvas*); +void OH_Drawing_CanvasDetachPen(OH_Drawing_Canvas* canvas); /** * @brief Attaches a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasAttachBrush(OH_Drawing_Canvas*, const OH_Drawing_Brush*); +void OH_Drawing_CanvasAttachBrush(OH_Drawing_Canvas* canvas, const OH_Drawing_Brush* brush); /** * @brief Detaches the brush from a canvas so that the canvas will not use the style * and color of the brush to fill in a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasDetachBrush(OH_Drawing_Canvas*); +void OH_Drawing_CanvasDetachBrush(OH_Drawing_Canvas* canvas); /** * @brief Saves the current canvas status (canvas matrix) to the top of the stack. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasSave(OH_Drawing_Canvas*); +void OH_Drawing_CanvasSave(OH_Drawing_Canvas* canvas); /** * @brief Saves matrix and clip, and allocates a bitmap for subsequent drawing. * Calling restore discards changes to matrix and clip, and draws the bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasSaveLayer(OH_Drawing_Canvas*, const OH_Drawing_Rect*, const OH_Drawing_Brush*); +void OH_Drawing_CanvasSaveLayer(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, const OH_Drawing_Brush* brush); /** * @brief Restores the canvas status (canvas matrix) saved on the top of the stack. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasRestore(OH_Drawing_Canvas*); +void OH_Drawing_CanvasRestore(OH_Drawing_Canvas* canvas); /** * @brief Gets the number of the canvas status (canvas matrix) saved in the stack. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @return Returns a 32-bit variable that describes the number of canvas status. * @since 11 * @version 1.0 */ -uint32_t OH_Drawing_CanvasGetSaveCount(OH_Drawing_Canvas*); +uint32_t OH_Drawing_CanvasGetSaveCount(OH_Drawing_Canvas* canvas); /** * @brief Restores the specific number of the canvas status (canvas matrix) saved in the stack. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param saveCount Indicates the specific number of canvas status. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasRestoreToCount(OH_Drawing_Canvas*, uint32_t saveCount); +void OH_Drawing_CanvasRestoreToCount(OH_Drawing_Canvas* canvas, uint32_t saveCount); /** * @brief Draws a line segment. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param x1 Indicates the x coordinate of the start point of the line segment. * @param y1 Indicates the y coordinate of the start point of the line segment. * @param x2 Indicates the x coordinate of the end point of the line segment. @@ -207,55 +207,55 @@ void OH_Drawing_CanvasRestoreToCount(OH_Drawing_Canvas*, uint32_t saveCount); * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasDrawLine(OH_Drawing_Canvas*, float x1, float y1, float x2, float y2); +void OH_Drawing_CanvasDrawLine(OH_Drawing_Canvas* canvas, float x1, float y1, float x2, float y2); /** * @brief Draws a path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasDrawPath(OH_Drawing_Canvas*, const OH_Drawing_Path*); +void OH_Drawing_CanvasDrawPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* path); /** * @brief Draw the specified area of the Media::PixelMap to the specified area of the canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_PixelMap Indicates the pointer to an OH_Drawing_PixelMap object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param pixelMap Indicates the pointer to an OH_Drawing_PixelMap object. * @param src the area of source pixelmap. * @param dst the area of destination canvas. - * @param OH_Drawing_SamplingOptions the sampling mode. + * @param samplingOptions the sampling mode. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawPixelMapRect(OH_Drawing_Canvas*, OH_Drawing_PixelMap*, const OH_Drawing_Rect* src, - const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions*); +void OH_Drawing_CanvasDrawPixelMapRect(OH_Drawing_Canvas* canvas, OH_Drawing_PixelMap* pixelMap, + const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions* samplingOptions); /** * @brief Fills clipped canvas area with brush. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param brush Indicates the pointer to an OH_Drawing_Brush object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawBackground(OH_Drawing_Canvas*, const OH_Drawing_Brush*); +void OH_Drawing_CanvasDrawBackground(OH_Drawing_Canvas* canvas, const OH_Drawing_Brush* brush); /** * @brief Draws region using clip, matrix and paint. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Region Indicates the pointer to an OH_Drawing_Region object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param region Indicates the pointer to an OH_Drawing_Region object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawRegion(OH_Drawing_Canvas*, const OH_Drawing_Region*); +void OH_Drawing_CanvasDrawRegion(OH_Drawing_Canvas* canvas, const OH_Drawing_Region* region); /** * @brief Enumerates of scale to fit flags, selects if an array of points are drawn as discrete points, as lines, @@ -297,66 +297,66 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawPoint(OH_Drawing_Canvas* canvas, const * @brief Draws point array as separate point, line segment or open polygon according to given point mode. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param mode Draw points enum. * @param count The point count. - * @param OH_Drawing_Point2D Point struct array. + * @param point2D Point struct array. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawPoints(OH_Drawing_Canvas*, OH_Drawing_PointMode mode, - uint32_t count, const OH_Drawing_Point2D*); +void OH_Drawing_CanvasDrawPoints(OH_Drawing_Canvas* canvas, OH_Drawing_PointMode mode, + uint32_t count, const OH_Drawing_Point2D* point2D); /** * @brief Draws a bitmap. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @param left Indicates the left position of the OH_Drawing_Bitmap. * @param top Indicates the top position of the OH_Drawing_Bitmap. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasDrawBitmap(OH_Drawing_Canvas*, const OH_Drawing_Bitmap*, float left, float top); +void OH_Drawing_CanvasDrawBitmap(OH_Drawing_Canvas* canvas, const OH_Drawing_Bitmap* bitmap, float left, float top); /** * @brief Draw the specified area of the bitmap to the specified area of the canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @param src the area of source bitmap, can be nullptr. * @param dst the area of destination canvas. - * @param OH_Drawing_SamplingOptions the sampling mode. + * @param samplingOptions the sampling mode. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawBitmapRect(OH_Drawing_Canvas*, const OH_Drawing_Bitmap*, const OH_Drawing_Rect* src, - const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions*); +void OH_Drawing_CanvasDrawBitmapRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Bitmap* bitmap, + const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions* samplingOptions); /** * @brief Draws a rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasDrawRect(OH_Drawing_Canvas*, const OH_Drawing_Rect*); +void OH_Drawing_CanvasDrawRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect); /** * @brief Draws a circle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Point Indicates the pointer to an OH_Drawing_Point object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param point Indicates the pointer to an OH_Drawing_Point object. * @param radius Indicates the radius of the circle. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasDrawCircle(OH_Drawing_Canvas*, const OH_Drawing_Point*, float radius); +void OH_Drawing_CanvasDrawCircle(OH_Drawing_Canvas* canvas, const OH_Drawing_Point* point, float radius); /** * @brief Fills the entire canvas with the specified color and blend mode. @@ -378,44 +378,45 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawColor(OH_Drawing_Canvas* canvas, uint3 * @brief Draws an oval. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasDrawOval(OH_Drawing_Canvas*, const OH_Drawing_Rect*); +void OH_Drawing_CanvasDrawOval(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect); /** * @brief Draws an arc. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @param startAngle Indicates the startAngle of the arc. * @param sweepAngle Indicates the sweepAngle of the arc. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasDrawArc(OH_Drawing_Canvas*, const OH_Drawing_Rect*, float startAngle, float sweepAngle); +void OH_Drawing_CanvasDrawArc(OH_Drawing_Canvas* canvas, + const OH_Drawing_Rect* rect, float startAngle, float sweepAngle); /** * @brief Draws a roundrect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_RoundRect Indicates the pointer to an OH_Drawing_RoundRect object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param roundRect Indicates the pointer to an OH_Drawing_RoundRect object. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasDrawRoundRect(OH_Drawing_Canvas*, const OH_Drawing_RoundRect*); +void OH_Drawing_CanvasDrawRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_RoundRect* roundRect); /** * @brief Draws a single character. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param str Indicates the single character encoded in UTF-8. - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param x Indicates the horizontal offset applied to the single character. * @param y Indicates the vertical offset applied to the single character. * @return Returns the error code. @@ -432,14 +433,14 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawSingleCharacter(OH_Drawing_Canvas* can * @brief Draws a textblob. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_TextBlob Indicates the pointer to an OH_Drawing_TextBlob object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param textBlob Indicates the pointer to an OH_Drawing_TextBlob object. * @param x Indicates the horizontal offset applied to blob. * @param y Indicates the vertical offset applied to blob. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasDrawTextBlob(OH_Drawing_Canvas*, const OH_Drawing_TextBlob*, float x, float y); +void OH_Drawing_CanvasDrawTextBlob(OH_Drawing_Canvas* canvas, const OH_Drawing_TextBlob* textBlob, float x, float y); /** * @brief Enumerates clip op. @@ -462,42 +463,42 @@ typedef enum { * @brief Clip a rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @param clipOp Indicates the operation to apply to clip. * @param doAntiAlias Indicates whether clip operation requires anti-aliased. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasClipRect(OH_Drawing_Canvas*, const OH_Drawing_Rect*, +void OH_Drawing_CanvasClipRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, OH_Drawing_CanvasClipOp clipOp, bool doAntiAlias); /** * @brief Clip a round rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_RoundRect Indicates the pointer to an OH_Drawing_RoundRect object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param roundRect Indicates the pointer to an OH_Drawing_RoundRect object. * @param clipOp Indicates the operation to apply to clip. * @param doAntiAlias Indicates whether clip operation requires anti-aliased. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasClipRoundRect(OH_Drawing_Canvas*, const OH_Drawing_RoundRect*, +void OH_Drawing_CanvasClipRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_RoundRect* roundRect, OH_Drawing_CanvasClipOp clipOp, bool doAntiAlias); /** * @brief Clip a path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param clipOp Indicates the operation to apply to clip. * @param doAntiAlias Indicates whether clip operation requires anti-aliased. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasClipPath(OH_Drawing_Canvas*, const OH_Drawing_Path*, +void OH_Drawing_CanvasClipPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* path, OH_Drawing_CanvasClipOp clipOp, bool doAntiAlias); /** @@ -520,104 +521,104 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasClipRegion(OH_Drawing_Canvas* canvas, cons * @brief Rotates by degrees. Positive degrees rotates clockwise. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param degrees Indicates the amount to rotate, in degrees. * @param px Indicates the x-axis value of the point to rotate about. * @param py Indicates the y-axis value of the point to rotate about. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasRotate(OH_Drawing_Canvas*, float degrees, float px, float py); +void OH_Drawing_CanvasRotate(OH_Drawing_Canvas* canvas, float degrees, float px, float py); /** * @brief Translates by dx along the x-axis and dy along the y-axis. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param dx Indicates the distance to translate on x-axis. * @param dy Indicates the distance to translate on y-axis. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasTranslate(OH_Drawing_Canvas*, float dx, float dy); +void OH_Drawing_CanvasTranslate(OH_Drawing_Canvas* canvas, float dx, float dy); /** * @brief Scales by sx on the x-axis and sy on the y-axis. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param sx Indicates the amount to scale on x-axis. * @param sy Indicates the amount to scale on y-axis. * @since 11 * @version 1.0 */ -void OH_Drawing_CanvasScale(OH_Drawing_Canvas*, float sx, float sy); +void OH_Drawing_CanvasScale(OH_Drawing_Canvas* canvas, float sx, float sy); /** * @brief Skew by sx on the x-axis and sy on the y-axis. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param sx Indicates the amount to skew on x-axis. * @param sy Indicates the amount to skew on y-axis. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasSkew(OH_Drawing_Canvas*, float sx, float sy); +void OH_Drawing_CanvasSkew(OH_Drawing_Canvas* canvas, float sx, float sy); /** * @brief Get the width of a canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 12 * @version 1.0 */ -int32_t OH_Drawing_CanvasGetWidth(OH_Drawing_Canvas*); +int32_t OH_Drawing_CanvasGetWidth(OH_Drawing_Canvas* canvas); /** * @brief Get the height of a canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 12 * @version 1.0 */ -int32_t OH_Drawing_CanvasGetHeight(OH_Drawing_Canvas*); +int32_t OH_Drawing_CanvasGetHeight(OH_Drawing_Canvas* canvas); /** * @brief Get the bounds of clip of a canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasGetLocalClipBounds(OH_Drawing_Canvas*, OH_Drawing_Rect*); +void OH_Drawing_CanvasGetLocalClipBounds(OH_Drawing_Canvas* canvas, OH_Drawing_Rect* rect); /** * @brief Get a 3x3 matrix of the transform from local coordinates to 'device'. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasGetTotalMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*); +void OH_Drawing_CanvasGetTotalMatrix(OH_Drawing_Canvas* canvas, OH_Drawing_Matrix* matrix); /** * @brief Use the passed matrix to transforming the geometry, then use existing matrix. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object, + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object, * represents the matrix which is passed. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasConcatMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*); +void OH_Drawing_CanvasConcatMatrix(OH_Drawing_Canvas* canvas, OH_Drawing_Matrix* matrix); /** * @brief Enumerates of shadow flags. @@ -648,8 +649,8 @@ typedef enum { * @brief Use circular light to draw an offset spot shadow and outlining ambient shadow for the given path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object, use to generate shadows. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param path Indicates the pointer to an OH_Drawing_Path object, use to generate shadows. * @param planeParams Represents the value of the function which returns Z offset of the occluder from the * canvas based on x and y. * @param devLightPos Represents the position of the light relative to the canvas. @@ -660,7 +661,7 @@ typedef enum { * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawShadow(OH_Drawing_Canvas*, OH_Drawing_Path*, OH_Drawing_Point3D planeParams, +void OH_Drawing_CanvasDrawShadow(OH_Drawing_Canvas* canvas, OH_Drawing_Path* path, OH_Drawing_Point3D planeParams, OH_Drawing_Point3D devLightPos, float lightRadius, uint32_t ambientColor, uint32_t spotColor, OH_Drawing_CanvasShadowFlags flag); @@ -668,66 +669,66 @@ void OH_Drawing_CanvasDrawShadow(OH_Drawing_Canvas*, OH_Drawing_Path*, OH_Drawin * @brief Clears a canvas by using a specified color. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param color Indicates the color, which is a 32-bit (ARGB) variable. * @since 8 * @version 1.0 */ -void OH_Drawing_CanvasClear(OH_Drawing_Canvas*, uint32_t color); +void OH_Drawing_CanvasClear(OH_Drawing_Canvas* canvas, uint32_t color); /** * @brief Sets matrix of canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasSetMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*); +void OH_Drawing_CanvasSetMatrix(OH_Drawing_Canvas* canvas, OH_Drawing_Matrix* matrix); /** * @brief Reset matrix to the idenmtity matrix, any prior matrix state is overwritten. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasResetMatrix(OH_Drawing_Canvas*); +void OH_Drawing_CanvasResetMatrix(OH_Drawing_Canvas* canvas); /** * @brief Draws the specified source rectangle of the image onto the canvas, * scaled and translated to the destination rectangle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param image Indicates the pointer to an OH_Drawing_Image object. * @param src The area of source image. * @param dst The area of destination canvas. - * @param OH_Drawing_SamplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. - * @param OH_Drawing_SrcRectConstraint Constraint type. + * @param samplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. + * @param srcRectConstraint Constraint type. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawImageRectWithSrc(OH_Drawing_Canvas*, const OH_Drawing_Image*, - const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions*, - OH_Drawing_SrcRectConstraint); +void OH_Drawing_CanvasDrawImageRectWithSrc(OH_Drawing_Canvas* canvas, const OH_Drawing_Image* image, + const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions* samplingOptions, + OH_Drawing_SrcRectConstraint srcRectConstraint); /** * @brief Draws the specified source rectangle of the image onto the canvas, * scaled and translated to the destination rectangle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. - * @param OH_Drawing_SamplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param image Indicates the pointer to an OH_Drawing_Image object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. + * @param samplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawImageRect(OH_Drawing_Canvas*, OH_Drawing_Image*, - OH_Drawing_Rect* dst, OH_Drawing_SamplingOptions*); +void OH_Drawing_CanvasDrawImageRect(OH_Drawing_Canvas* canvas, OH_Drawing_Image* image, + OH_Drawing_Rect* rect, OH_Drawing_SamplingOptions* samplingOptions); /** * @brief Enumerates of vertices flags. @@ -754,7 +755,7 @@ typedef enum { * @brief Draw a triangular mesh with vertex descriptions. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param vertexMmode Draw a set of vertices. * @param vertexCount Vertex count. * @param positions Positions data pointer. @@ -762,10 +763,11 @@ typedef enum { * @param colors Color data pointer. * @param indexCount Index count. * @param indices Index data pointer. + * @param mode Blend mode used for drawing. * @since 12 * @version 1.0 */ -void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas*, OH_Drawing_VertexMode vertexMmode, +void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas* canvas, OH_Drawing_VertexMode vertexMmode, int32_t vertexCount, const OH_Drawing_Point2D* positions, const OH_Drawing_Point2D* texs, const uint32_t* colors, int32_t indexCount, const uint16_t* indices, OH_Drawing_BlendMode mode); @@ -773,8 +775,8 @@ void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas*, OH_Drawing_VertexMode ver * @brief Read pixels data from canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Image_Info width, height, colorType, and alphaType of dstPixels. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param imageInfo width, height, colorType, and alphaType of dstPixels. * @param dstPixels destination pixel storage. * @param dstRowBytes size of one row of pixels. * @param srcX offset into canvas writable pixels on x-axis. @@ -783,22 +785,23 @@ void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas*, OH_Drawing_VertexMode ver * @since 12 * @version 1.0 */ -bool OH_Drawing_CanvasReadPixels(OH_Drawing_Canvas*, OH_Drawing_Image_Info*, +bool OH_Drawing_CanvasReadPixels(OH_Drawing_Canvas* canvas, OH_Drawing_Image_Info* imageInfo, void* dstPixels, uint32_t dstRowBytes, int32_t srcX, int32_t srcY); /** * @brief Read pixels data to a bitmap from canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @param srcX offset into canvas writable pixels on x-axis. * @param srcY offset into canvas writable pixels on y-axis. * @return true if pixels are copied to dstBitmap. * @since 12 * @version 1.0 */ -bool OH_Drawing_CanvasReadPixelsToBitmap(OH_Drawing_Canvas*, OH_Drawing_Bitmap*, int32_t srcX, int32_t srcY); +bool OH_Drawing_CanvasReadPixelsToBitmap(OH_Drawing_Canvas* canvas, + OH_Drawing_Bitmap* bitmap, int32_t srcX, int32_t srcY); /** * @brief Checks whether the drawable area is empty. diff --git a/graphic/graphic_2d/native_drawing/drawing_color.h b/graphic/graphic_2d/native_drawing/drawing_color.h index cb1b27e10..0f71c8873 100644 --- a/graphic/graphic_2d/native_drawing/drawing_color.h +++ b/graphic/graphic_2d/native_drawing/drawing_color.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_COLOR_H -#define C_INCLUDE_DRAWING_COLOR_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_COLOR_H +#define C_INCLUDE_DRAWING_COLOR_H + #include "drawing_types.h" #ifdef __cplusplus diff --git a/graphic/graphic_2d/native_drawing/drawing_color_filter.h b/graphic/graphic_2d/native_drawing/drawing_color_filter.h index 98907ba17..051ef91bd 100644 --- a/graphic/graphic_2d/native_drawing/drawing_color_filter.h +++ b/graphic/graphic_2d/native_drawing/drawing_color_filter.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_COLOR_FILTER_H -#define C_INCLUDE_DRAWING_COLOR_FILTER_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_COLOR_FILTER_H +#define C_INCLUDE_DRAWING_COLOR_FILTER_H + #include "drawing_types.h" #ifdef __cplusplus @@ -51,25 +51,25 @@ extern "C" { * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param color Indicates the color, which is a 32-bit (ARGB) variable. - * @param OH_Drawing_BlendMode Indicates the blend mode. + * @param blendMode Indicates the blend mode. * @return Returns the pointer to the OH_Drawing_ColorFilter object created. * @since 11 * @version 1.0 */ -OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateBlendMode(uint32_t color, OH_Drawing_BlendMode); +OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateBlendMode(uint32_t color, OH_Drawing_BlendMode blendMode); /** - * @brief Creates an OH_Drawing_ColorFilter applies the colorFilter1 and then applies colorFilter2. + * @brief Creates an OH_Drawing_ColorFilter applies the outerColorFilter and then applies innerColorFilter. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_ColorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. - * @param OH_Drawing_ColorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. + * @param outerColorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. + * @param innerColorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. * @return Returns the pointer to the OH_Drawing_ColorFilter object created. * @since 11 * @version 1.0 */ -OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateCompose(OH_Drawing_ColorFilter* colorFilter1, - OH_Drawing_ColorFilter* colorFilter2); +OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateCompose(OH_Drawing_ColorFilter* outerColorFilter, + OH_Drawing_ColorFilter* innerColorFilter); /** * @brief Creates an OH_Drawing_ColorFilter with a 5x4 color matrix. @@ -117,11 +117,11 @@ OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateLuma(void); * @brief Destroys an OH_Drawing_ColorFilter object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_ColorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. + * @param colorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. * @since 11 * @version 1.0 */ -void OH_Drawing_ColorFilterDestroy(OH_Drawing_ColorFilter*); +void OH_Drawing_ColorFilterDestroy(OH_Drawing_ColorFilter* colorFilter); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_color_space.h b/graphic/graphic_2d/native_drawing/drawing_color_space.h index c87705cbb..f2a2bc7a6 100755 --- a/graphic/graphic_2d/native_drawing/drawing_color_space.h +++ b/graphic/graphic_2d/native_drawing/drawing_color_space.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_COLOR_SPACE_H -#define C_INCLUDE_DRAWING_COLOR_SPACE_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_COLOR_SPACE_H +#define C_INCLUDE_DRAWING_COLOR_SPACE_H + #include "drawing_types.h" #ifdef __cplusplus @@ -70,11 +70,11 @@ OH_Drawing_ColorSpace* OH_Drawing_ColorSpaceCreateSrgbLinear(void); * @brief Destroy an OH_Drawing_ColorSpace object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_ColorSpace Indicates the pointer to an OH_Drawing_ColorSpace object. + * @param colorSpace Indicates the pointer to an OH_Drawing_ColorSpace object. * @since 12 * @version 1.0 */ -void OH_Drawing_ColorSpaceDestroy(OH_Drawing_ColorSpace*); +void OH_Drawing_ColorSpaceDestroy(OH_Drawing_ColorSpace* colorSpace); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h index 817c8c614..38e135e3b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_error_code.h +++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_ERROR_CODE_H -#define C_INCLUDE_DRAWING_ERROR_CODE_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_ERROR_CODE_H +#define C_INCLUDE_DRAWING_ERROR_CODE_H + #ifdef __cplusplus extern "C" { #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_filter.h b/graphic/graphic_2d/native_drawing/drawing_filter.h index a20fe1579..6f0ad102e 100644 --- a/graphic/graphic_2d/native_drawing/drawing_filter.h +++ b/graphic/graphic_2d/native_drawing/drawing_filter.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_FILTER_H -#define C_INCLUDE_DRAWING_FILTER_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_FILTER_H +#define C_INCLUDE_DRAWING_FILTER_H + #include "drawing_types.h" #ifdef __cplusplus @@ -60,55 +60,55 @@ OH_Drawing_Filter* OH_Drawing_FilterCreate(void); * @brief Sets an OH_Drawing_ImageFilter object for an OH_Drawing_Filter object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. - * @param OH_Drawing_ImageFilter Indicates the pointer to an OH_Drawing_ImageFilter object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. + * @param imageFilter Indicates the pointer to an OH_Drawing_ImageFilter object. * @since 12 * @version 1.0 */ -void OH_Drawing_FilterSetImageFilter(OH_Drawing_Filter*, OH_Drawing_ImageFilter*); +void OH_Drawing_FilterSetImageFilter(OH_Drawing_Filter* filter, OH_Drawing_ImageFilter* imageFilter); /** * @brief Sets an OH_Drawing_MaskFilter object for an OH_Drawing_Filter object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. - * @param OH_Drawing_MaskFilter Indicates the pointer to an OH_Drawing_MaskFilter object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. + * @param maskFilter Indicates the pointer to an OH_Drawing_MaskFilter object. * @since 11 * @version 1.0 */ -void OH_Drawing_FilterSetMaskFilter(OH_Drawing_Filter*, OH_Drawing_MaskFilter*); +void OH_Drawing_FilterSetMaskFilter(OH_Drawing_Filter* filter, OH_Drawing_MaskFilter* maskFilter); /** * @brief Sets an OH_Drawing_ColorFilter object for an OH_Drawing_Filter object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. - * @param OH_Drawing_ColorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. + * @param colorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. * @since 11 * @version 1.0 */ -void OH_Drawing_FilterSetColorFilter(OH_Drawing_Filter*, OH_Drawing_ColorFilter*); +void OH_Drawing_FilterSetColorFilter(OH_Drawing_Filter* filter, OH_Drawing_ColorFilter* colorFilter); /** * @brief Gets an OH_Drawing_ColorFilter object from an OH_Drawing_Filter object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. - * @param OH_Drawing_ColorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. + * @param colorFilter Indicates the pointer to an OH_Drawing_ColorFilter object. * @since 12 * @version 1.0 */ -void OH_Drawing_FilterGetColorFilter(OH_Drawing_Filter*, OH_Drawing_ColorFilter*); +void OH_Drawing_FilterGetColorFilter(OH_Drawing_Filter* filter, OH_Drawing_ColorFilter* colorFilter); /** * @brief Destroys an OH_Drawing_Filter object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. * @since 11 * @version 1.0 */ -void OH_Drawing_FilterDestroy(OH_Drawing_Filter*); +void OH_Drawing_FilterDestroy(OH_Drawing_Filter* filter); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index ca4eac990..528e6943c 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_FONT_H -#define C_INCLUDE_DRAWING_FONT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_FONT_H +#define C_INCLUDE_DRAWING_FONT_H + #include "drawing_error_code.h" #include "drawing_types.h" @@ -93,131 +93,131 @@ typedef enum { * @brief Sets whether the font baselines and pixels alignment when the transformation matrix is ​​axis aligned. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param baselineSnap Indicates whether the font baselines and pixels alignment. * @since 12 * @version 1.0 */ -void OH_Drawing_FontSetBaselineSnap(OH_Drawing_Font*, bool baselineSnap); +void OH_Drawing_FontSetBaselineSnap(OH_Drawing_Font* font, bool baselineSnap); /** * @brief Gets whether the font baselines and pixels alignment when the transformation matrix is ​​axis aligned. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns true if the font baselines and pixels alignment; returns false otherwise. * @since 12 * @version 1.0 */ -bool OH_Drawing_FontIsBaselineSnap(const OH_Drawing_Font*); +bool OH_Drawing_FontIsBaselineSnap(const OH_Drawing_Font* font); /** * @brief Sets whether the font uses sub-pixel rendering. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param isSubpixel Indicates whether the font uses sub-pixel rendering. * @since 12 * @version 1.0 */ -void OH_Drawing_FontSetSubpixel(OH_Drawing_Font*, bool isSubpixel); +void OH_Drawing_FontSetSubpixel(OH_Drawing_Font* font, bool isSubpixel); /** * @brief Gets whether the font uses sub-pixel rendering. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns true if the font uses sub-pixel rendering; returns false otherwise. * @since 12 * @version 1.0 */ -bool OH_Drawing_FontIsSubpixel(const OH_Drawing_Font*); +bool OH_Drawing_FontIsSubpixel(const OH_Drawing_Font* font); /** * @brief Sets whether the font outline is automatically adjusted. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param isForceAutoHinting Indicates whether the font outline is automatically adjusted. * @since 12 * @version 1.0 */ -void OH_Drawing_FontSetForceAutoHinting(OH_Drawing_Font*, bool isForceAutoHinting); +void OH_Drawing_FontSetForceAutoHinting(OH_Drawing_Font* font, bool isForceAutoHinting); /** * @brief Gets whether the font outline is automatically adjusted. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns true if the font outline is automatically adjusted; returns false otherwise. * @since 12 * @version 1.0 */ -bool OH_Drawing_FontIsForceAutoHinting(const OH_Drawing_Font*); +bool OH_Drawing_FontIsForceAutoHinting(const OH_Drawing_Font* font); /** * @brief Sets an OH_Drawing_Typeface object for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. - * @param OH_Drawing_Typeface Indicates the pointer to an OH_Drawing_Typeface object. + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param typeface Indicates the pointer to an OH_Drawing_Typeface object. * @since 11 * @version 1.0 */ -void OH_Drawing_FontSetTypeface(OH_Drawing_Font*, OH_Drawing_Typeface*); +void OH_Drawing_FontSetTypeface(OH_Drawing_Font* font, OH_Drawing_Typeface* typeface); /** * @brief Gets an OH_Drawing_Typeface object from the OH_Drawing_Typeface object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return OH_Drawing_Typeface Indicates the pointer to an OH_Drawing_Typeface object. * @since 12 * @version 1.0 */ -OH_Drawing_Typeface* OH_Drawing_FontGetTypeface(OH_Drawing_Font*); +OH_Drawing_Typeface* OH_Drawing_FontGetTypeface(OH_Drawing_Font* font); /** * @brief Sets text size for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param textSize Indicates the text size. * @since 11 * @version 1.0 */ -void OH_Drawing_FontSetTextSize(OH_Drawing_Font*, float textSize); +void OH_Drawing_FontSetTextSize(OH_Drawing_Font* font, float textSize); /** * @brief Gets text size for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns the size of text. * @since 12 * @version 1.0 */ -float OH_Drawing_FontGetTextSize(const OH_Drawing_Font*); +float OH_Drawing_FontGetTextSize(const OH_Drawing_Font* font); /** * @brief Calculate number of glyphs represented by text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param text Indicates the character storage encoded with text encoding. * @param byteLength Indicates the text length in bytes. * @param encoding Indicates the text encoding. * @since 12 * @version 1.0 */ -int OH_Drawing_FontCountText(OH_Drawing_Font*, const void* text, size_t byteLength, +int OH_Drawing_FontCountText(OH_Drawing_Font* font, const void* text, size_t byteLength, OH_Drawing_TextEncoding encoding); /** * @brief Converts text into glyph indices. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param text Indicates the character storage encoded with text encoding. * @param byteLength Indicates the text length in bytes. * @param encoding Indicates the text encoding. @@ -227,21 +227,21 @@ int OH_Drawing_FontCountText(OH_Drawing_Font*, const void* text, size_t byteLeng * @since 12 * @version 1.0 */ -uint32_t OH_Drawing_FontTextToGlyphs(const OH_Drawing_Font*, const void* text, uint32_t byteLength, +uint32_t OH_Drawing_FontTextToGlyphs(const OH_Drawing_Font* font, const void* text, uint32_t byteLength, OH_Drawing_TextEncoding encoding, uint16_t* glyphs, int maxGlyphCount); /** * @brief Retrieves the advance for each glyph in glyphs. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param glyphs Indicates the array of glyph indices to be measured. * @param count Indicates the number of glyphs. * @param widths Indicates the text advances for each glyph returned to the caller. * @since 12 * @version 1.0 */ -void OH_Drawing_FontGetWidths(const OH_Drawing_Font*, const uint16_t* glyphs, int count, float* widths); +void OH_Drawing_FontGetWidths(const OH_Drawing_Font* font, const uint16_t* glyphs, int count, float* widths); /** * @brief Measures the width of a single character. @@ -284,165 +284,165 @@ OH_Drawing_ErrorCode OH_Drawing_FontMeasureText(const OH_Drawing_Font* font, con * @brief Enables or disables linearly scalable font for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param isLinearText Indicates whether to enable linearly scalable font. * @since 11 * @version 1.0 */ -void OH_Drawing_FontSetLinearText(OH_Drawing_Font*, bool isLinearText); +void OH_Drawing_FontSetLinearText(OH_Drawing_Font* font, bool isLinearText); /** * @brief Gets whether the font is linearly scalable. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns true if the font is linearly scalable; returns false otherwise. * @since 12 * @version 1.0 */ -bool OH_Drawing_FontIsLinearText(const OH_Drawing_Font*); +bool OH_Drawing_FontIsLinearText(const OH_Drawing_Font* font); /** * @brief Sets text skew on x-axis for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param skewX Indicates the additional shear on x-axis relative to y-axis. * @since 11 * @version 1.0 */ -void OH_Drawing_FontSetTextSkewX(OH_Drawing_Font*, float skewX); +void OH_Drawing_FontSetTextSkewX(OH_Drawing_Font* font, float skewX); /** * @brief Gets text skew on x-axis for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns additional skew on x-axis relative to y-axis. * @since 12 * @version 1.0 */ -float OH_Drawing_FontGetTextSkewX(const OH_Drawing_Font*); +float OH_Drawing_FontGetTextSkewX(const OH_Drawing_Font* font); /** * @brief Enables or disables to increase stroke width to approximate bold fonts for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param isFakeBoldText Indicates whether to enable to increase stroke width. * @since 11 * @version 1.0 */ -void OH_Drawing_FontSetFakeBoldText(OH_Drawing_Font*, bool isFakeBoldText); +void OH_Drawing_FontSetFakeBoldText(OH_Drawing_Font* font, bool isFakeBoldText); /** * @brief Gets whether to increase the stroke width to approximate bold fonts. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns true to increase the stroke width to approximate bold fonts; returns false otherwise. * @since 12 * @version 1.0 */ -bool OH_Drawing_FontIsFakeBoldText(const OH_Drawing_Font*); +bool OH_Drawing_FontIsFakeBoldText(const OH_Drawing_Font* font); /** * @brief Sets text scale on x-axis for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param scaleX Indicates the text horizontal scale. * @since 12 * @version 1.0 */ -void OH_Drawing_FontSetScaleX(OH_Drawing_Font*, float scaleX); +void OH_Drawing_FontSetScaleX(OH_Drawing_Font* font, float scaleX); /** * @brief Gets text scale on x-axis from an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns text horizontal scale on x-axis. * @since 12 * @version 1.0 */ -float OH_Drawing_FontGetScaleX(const OH_Drawing_Font*); +float OH_Drawing_FontGetScaleX(const OH_Drawing_Font* font); /** * @brief Sets hinting pattern for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. - * @param OH_Drawing_FontHinting Indicates the font hinting pattern. + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param fontHinting Indicates the font hinting pattern. * @since 12 * @version 1.0 */ -void OH_Drawing_FontSetHinting(OH_Drawing_Font*, OH_Drawing_FontHinting); +void OH_Drawing_FontSetHinting(OH_Drawing_Font* font, OH_Drawing_FontHinting fontHinting); /** * @brief Gets hinting pattern from an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns the font hinting pattern. * @since 12 * @version 1.0 */ -OH_Drawing_FontHinting OH_Drawing_FontGetHinting(const OH_Drawing_Font*); +OH_Drawing_FontHinting OH_Drawing_FontGetHinting(const OH_Drawing_Font* font); /** * @brief Sets whether to use bitmaps instead of outlines in the OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param isEmbeddedBitmaps Indicates whether to use bitmaps instead of outlines. * @since 12 * @version 1.0 */ -void OH_Drawing_FontSetEmbeddedBitmaps(OH_Drawing_Font*, bool isEmbeddedBitmaps); +void OH_Drawing_FontSetEmbeddedBitmaps(OH_Drawing_Font* font, bool isEmbeddedBitmaps); /** * @brief Gets whether to use bitmaps instead of outlines in the OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns true if using bitmaps instead of outlines; returns false otherwise. * @since 12 * @version 1.0 */ -bool OH_Drawing_FontIsEmbeddedBitmaps(const OH_Drawing_Font*); +bool OH_Drawing_FontIsEmbeddedBitmaps(const OH_Drawing_Font* font); /** * @brief Sets the font edging effect for an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. - * @param OH_Drawing_FontEdging Indicates the font edging effect. + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param fontEdging Indicates the font edging effect. * @since 12 * @version 1.0 */ -void OH_Drawing_FontSetEdging(OH_Drawing_Font*, OH_Drawing_FontEdging); +void OH_Drawing_FontSetEdging(OH_Drawing_Font* font, OH_Drawing_FontEdging fontEdging); /** * @brief Gets the font edging effect from an OH_Drawing_Font object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @return Returns the font edging effect. * @since 12 * @version 1.0 */ -OH_Drawing_FontEdging OH_Drawing_FontGetEdging(const OH_Drawing_Font*); +OH_Drawing_FontEdging OH_Drawing_FontGetEdging(const OH_Drawing_Font* font); /** * @brief Destroys an OH_Drawing_Font object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @since 11 * @version 1.0 */ -void OH_Drawing_FontDestroy(OH_Drawing_Font*); +void OH_Drawing_FontDestroy(OH_Drawing_Font* font); /** * @brief Defines a run, supplies storage for the metrics of an OH_Drawing_Font. @@ -489,13 +489,13 @@ typedef struct OH_Drawing_Font_Metrics { * @brief Obtains the metrics of a font. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. - * @param OH_Drawing_Font_Metrics Indicates the pointer to an OH_Drawing_Font_Metrics object. + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param fontMetrics Indicates the pointer to an OH_Drawing_Font_Metrics object. * @return Returns a float variable that recommended spacing between lines. * @since 12 * @version 1.0 */ -float OH_Drawing_FontGetMetrics(OH_Drawing_Font*, OH_Drawing_Font_Metrics*); +float OH_Drawing_FontGetMetrics(OH_Drawing_Font* font, OH_Drawing_Font_Metrics* fontMetrics); /** * @brief Retrieves the bound rect for each glyph in glyph array. diff --git a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h index 9558108d2..8d5df8ea9 100644 --- a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h +++ b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_GPU_CONTEXT_H -#define C_INCLUDE_DRAWING_GPU_CONTEXT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_GPU_CONTEXT_H +#define C_INCLUDE_DRAWING_GPU_CONTEXT_H + #include "drawing_types.h" #ifdef __cplusplus @@ -61,22 +61,22 @@ typedef struct { * @brief Creates an OH_Drawing_GpuContext object, whose GPU backend context is GL. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_GpuContextOptions Indicates the GPU context options. + * @param gpuContextOptions Indicates the GPU context options. * @return Returns the pointer to the OH_Drawing_GpuContext object created. * @since 12 * @version 1.0 */ -OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions); +OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions gpuContextOptions); /** * @brief Destroys an OH_Drawing_GpuContext object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_GpuContext Indicates the pointer to an OH_Drawing_GpuContext object. + * @param gpuContext Indicates the pointer to an OH_Drawing_GpuContext object. * @since 12 * @version 1.0 */ -void OH_Drawing_GpuContextDestroy(OH_Drawing_GpuContext*); +void OH_Drawing_GpuContextDestroy(OH_Drawing_GpuContext* gpuContext); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_image.h b/graphic/graphic_2d/native_drawing/drawing_image.h index 07c96aecd..f4c9fed10 100644 --- a/graphic/graphic_2d/native_drawing/drawing_image.h +++ b/graphic/graphic_2d/native_drawing/drawing_image.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_IMAGE_H -#define C_INCLUDE_DRAWING_IMAGE_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_IMAGE_H +#define C_INCLUDE_DRAWING_IMAGE_H + #include "drawing_types.h" #ifdef __cplusplus @@ -60,56 +60,56 @@ OH_Drawing_Image* OH_Drawing_ImageCreate(void); * @brief Destroys an OH_Drawing_Image object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. + * @param image Indicates the pointer to an OH_Drawing_Image object. * @since 12 * @version 1.0 */ -void OH_Drawing_ImageDestroy(OH_Drawing_Image*); +void OH_Drawing_ImageDestroy(OH_Drawing_Image* image); /** * @brief Rebuilds an OH_Drawing_Image object, sharing or copying bitmap pixels. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. - * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param image Indicates the pointer to an OH_Drawing_Image object. + * @param bitmap Indicates the pointer to an OH_Drawing_Bitmap object. * @return Returns true if successed. * @since 12 * @version 1.0 */ -bool OH_Drawing_ImageBuildFromBitmap(OH_Drawing_Image*, OH_Drawing_Bitmap*); +bool OH_Drawing_ImageBuildFromBitmap(OH_Drawing_Image* image, OH_Drawing_Bitmap* bitmap); /** * @brief Gets pixel count in each row of image. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. + * @param image Indicates the pointer to an OH_Drawing_Image object. * @return Returns the width. * @since 12 * @version 1.0 */ -int32_t OH_Drawing_ImageGetWidth(OH_Drawing_Image*); +int32_t OH_Drawing_ImageGetWidth(OH_Drawing_Image* image); /** * @brief Gets pixel row count of image. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. + * @param image Indicates the pointer to an OH_Drawing_Image object. * @return Returns the height. * @since 12 * @version 1.0 */ -int32_t OH_Drawing_ImageGetHeight(OH_Drawing_Image*); +int32_t OH_Drawing_ImageGetHeight(OH_Drawing_Image* image); /** * @brief Gets the image info. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. - * @param OH_Drawing_Image_Info Indicates the pointer to an OH_Drawing_Image_Info object. + * @param image Indicates the pointer to an OH_Drawing_Image object. + * @param imageInfo Indicates the pointer to an OH_Drawing_Image_Info object. * @since 12 * @version 1.0 */ -void OH_Drawing_ImageGetImageInfo(OH_Drawing_Image*, OH_Drawing_Image_Info*); +void OH_Drawing_ImageGetImageInfo(OH_Drawing_Image* image, OH_Drawing_Image_Info* imageInfo); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_image_filter.h b/graphic/graphic_2d/native_drawing/drawing_image_filter.h index d77292aa3..3fde3b724 100644 --- a/graphic/graphic_2d/native_drawing/drawing_image_filter.h +++ b/graphic/graphic_2d/native_drawing/drawing_image_filter.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_IMAGE_FILTER_H -#define C_INCLUDE_DRAWING_IMAGE_FILTER_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_IMAGE_FILTER_H +#define C_INCLUDE_DRAWING_IMAGE_FILTER_H + #include "drawing_shader_effect.h" #ifdef __cplusplus @@ -52,23 +52,23 @@ extern "C" { * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param sigmaX Indicates the Gaussian sigma value for blurring along the x axis. * @param sigmaY Indicates the Gaussian sigma value for blurring along the y axis. - * @param OH_Drawing_TileMode Indicates the tile mode applied at edges. - * @param OH_Drawing_ImageFilter Indicates the input filter that is blurred, uses source bitmap if this is null. + * @param tileMode Indicates the tile mode applied at edges. + * @param imageFilter Indicates the input filter that is blurred, uses source bitmap if this is null. * @return Returns the pointer to the OH_Drawing_ImageFilter object created. * If nullptr is returned, the creation fails. * The possible cause of the failure is that the available memory is empty. * @since 12 * @version 1.0 */ -OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateBlur(float sigmaX, float sigmaY, OH_Drawing_TileMode, - OH_Drawing_ImageFilter*); +OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateBlur(float sigmaX, float sigmaY, OH_Drawing_TileMode tileMode, + OH_Drawing_ImageFilter* imageFilter); /** * @brief Creates an OH_Drawing_ImageFilter object that applies the color filter to the input. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_ColorFilter Indicates the color filter that transforms the input image. - * @param OH_Drawing_ImageFilter Indicates the input filter, or uses the source bitmap if this is null. + * @param colorFilter Indicates the color filter that transforms the input image. + * @param imageFilter Indicates the input filter, or uses the source bitmap if this is null. * @return Returns the pointer to the OH_Drawing_ImageFilter object created. * If nullptr is returned, the creation fails. * The possible cause of the failure is that the available memory is empty or @@ -76,17 +76,18 @@ OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateBlur(float sigmaX, float sig * @since 12 * @version 1.0 */ -OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromColorFilter(OH_Drawing_ColorFilter*, OH_Drawing_ImageFilter*); +OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromColorFilter(OH_Drawing_ColorFilter* colorFilter, + OH_Drawing_ImageFilter* imageFilter); /** * @brief Destroys an OH_Drawing_ImageFilter object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_ImageFilter Indicates the pointer to an OH_Drawing_ImageFilter object. + * @param imageFilter Indicates the pointer to an OH_Drawing_ImageFilter object. * @since 12 * @version 1.0 */ -void OH_Drawing_ImageFilterDestroy(OH_Drawing_ImageFilter*); +void OH_Drawing_ImageFilterDestroy(OH_Drawing_ImageFilter* imageFilter); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_mask_filter.h b/graphic/graphic_2d/native_drawing/drawing_mask_filter.h index 86f487bfe..c265e1c90 100644 --- a/graphic/graphic_2d/native_drawing/drawing_mask_filter.h +++ b/graphic/graphic_2d/native_drawing/drawing_mask_filter.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_MASK_FILTER_H -#define C_INCLUDE_DRAWING_MASK_FILTER_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_MASK_FILTER_H +#define C_INCLUDE_DRAWING_MASK_FILTER_H + #include "drawing_types.h" #ifdef __cplusplus @@ -88,11 +88,11 @@ OH_Drawing_MaskFilter* OH_Drawing_MaskFilterCreateBlur(OH_Drawing_BlurType blurT * @brief Destroys an OH_Drawing_MaskFilter object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_MaskFilter Indicates the pointer to an OH_Drawing_MaskFilter object. + * @param maskFilter Indicates the pointer to an OH_Drawing_MaskFilter object. * @since 11 * @version 1.0 */ -void OH_Drawing_MaskFilterDestroy(OH_Drawing_MaskFilter*); +void OH_Drawing_MaskFilterDestroy(OH_Drawing_MaskFilter* maskFilter); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_matrix.h b/graphic/graphic_2d/native_drawing/drawing_matrix.h index f56827d85..bbf6645df 100644 --- a/graphic/graphic_2d/native_drawing/drawing_matrix.h +++ b/graphic/graphic_2d/native_drawing/drawing_matrix.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_MATRIX_H -#define C_INCLUDE_DRAWING_MATRIX_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_MATRIX_H +#define C_INCLUDE_DRAWING_MATRIX_H + #include "drawing_error_code.h" #include "drawing_types.h" @@ -62,7 +62,6 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreate(void); * rotate by degrees about a pivot point at (px, py). * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param deg angle of axes relative to upright axes * @param x pivot on x-axis. * @param y pivot on y-axis. @@ -76,7 +75,6 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateRotation(float deg, float x, float y); * by sx and sy, about a pivot point at (px, py). * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param sx horizontal scale factor. * @param sy vertical scale factor. * @param px pivot on x-axis. @@ -91,7 +89,6 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateScale(float sx, float sy, float px, fl * @brief Creates an OH_Drawing_Matrix object with translation. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param dx horizontal translation. * @param dy vertical translation. * @return Returns the pointer to the OH_Drawing_Matrix object created. @@ -104,7 +101,7 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateTranslation(float dx, float dy); * @brief Sets the params for a matrix. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param scaleX horizontal scale factor to store * @param skewX horizontal skew factor to store * @param transX horizontal translation to store @@ -117,7 +114,7 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateTranslation(float dx, float dy); * @since 11 * @version 1.0 */ -void OH_Drawing_MatrixSetMatrix(OH_Drawing_Matrix*, float scaleX, float skewX, float transX, +void OH_Drawing_MatrixSetMatrix(OH_Drawing_Matrix* matrix, float scaleX, float skewX, float transX, float skewY, float scaleY, float transY, float persp0, float persp1, float persp2); /** @@ -149,7 +146,7 @@ typedef enum { * @brief Sets matrix to scale and translate src rect to dst rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param src Indicates the pointer to an OH_Drawing_Rect object rect to map from. * @param dst Indicates the pointer to an OH_Drawing_Rect object rect to map to. * @param stf Scales to fit enum method. @@ -161,7 +158,7 @@ typedef enum { * @since 12 * @version 1.0 */ -bool OH_Drawing_MatrixSetRectToRect(OH_Drawing_Matrix*, const OH_Drawing_Rect* src, +bool OH_Drawing_MatrixSetRectToRect(OH_Drawing_Matrix* matrix, const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, OH_Drawing_ScaleToFit stf); /** @@ -187,14 +184,14 @@ bool OH_Drawing_MatrixSetRectToRect(OH_Drawing_Matrix*, const OH_Drawing_Rect* s * | G H I | | 0 0 1 | | Gc+Hs -Gs+Hc G*dx+H*dy+I | * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param degree Indicates the angle of axes relative to upright axes. * @param px Indicates the pivot on x-axis. * @param py Indicates the pivot on y-axis. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix*, float degree, float px, float py); +void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix* matrix, float degree, float px, float py); /** * @brief Sets matrix to forward scale by sx and sy, about a pivot point at (px, py). @@ -216,7 +213,7 @@ void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix*, float degree, float px, floa * | G H I | | 0 0 1 | | G*sx H*sy G*dx+H*dy+I | * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param sx Horizontal scale factor. * @param sy Vertical scale factor. * @param px Pivot on x-axis. @@ -224,7 +221,7 @@ void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix*, float degree, float px, floa * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixPreScale(OH_Drawing_Matrix*, float sx, float sy, float px, float py); +void OH_Drawing_MatrixPreScale(OH_Drawing_Matrix* matrix, float sx, float sy, float px, float py); /** * @brief Sets forward matrix to translate by dx and dy. @@ -238,13 +235,13 @@ void OH_Drawing_MatrixPreScale(OH_Drawing_Matrix*, float sx, float sy, float px, * | G H I | | 0 0 1 | | G H G*dx+H*dy+I | * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param dx Indicates the horizontal translation. * @param dy Indicates the vertical translation. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixPreTranslate(OH_Drawing_Matrix*, float dx, float dy); +void OH_Drawing_MatrixPreTranslate(OH_Drawing_Matrix* matrix, float dx, float dy); /** * @brief Sets matrix to matrix constructed from rotating by degrees about pivot point(px, py), @@ -269,14 +266,14 @@ void OH_Drawing_MatrixPreTranslate(OH_Drawing_Matrix*, float dx, float dy); * |0 0 1| |P Q R| | P Q R| * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param degree Indicates the angle of axes relative to upright axes. * @param px Indicates the pivot on x-axis. * @param py Indicates the pivot on y-axis. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix*, float degree, float px, float py); +void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix* matrix, float degree, float px, float py); /** * @brief Sets matrix to backward scale by sx and sy, about a pivot point at (px, py). @@ -293,7 +290,7 @@ void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix*, float degree, float px, flo * | 0 0 1 | | P Q R | | P Q R | * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param sx Horizontal scale factor. * @param sy Vertical scale factor. * @param px Pivot on x-axis. @@ -301,7 +298,7 @@ void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix*, float degree, float px, flo * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixPostScale(OH_Drawing_Matrix*, float sx, float sy, float px, float py); +void OH_Drawing_MatrixPostScale(OH_Drawing_Matrix* matrix, float sx, float sy, float px, float py); /** * @brief Sets backward matrix to translate by (dx, dy). @@ -318,13 +315,13 @@ void OH_Drawing_MatrixPostScale(OH_Drawing_Matrix*, float sx, float sy, float px * | 0 0 1 | | P Q R | | P Q R | * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param dx Indicates the horizontal translation. * @param dy Indicates the vertical translation. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixPostTranslate(OH_Drawing_Matrix*, float dx, float dy); +void OH_Drawing_MatrixPostTranslate(OH_Drawing_Matrix* matrix, float dx, float dy); /** * @brief Reset matrix to identity, which has no effect on mapped point, sets matrix to: @@ -333,11 +330,11 @@ void OH_Drawing_MatrixPostTranslate(OH_Drawing_Matrix*, float dx, float dy); * | 0 0 1 | * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixReset(OH_Drawing_Matrix*); +void OH_Drawing_MatrixReset(OH_Drawing_Matrix* matrix); /** * @brief Sets matrix total to matrix a multiplied by matrix b. @@ -376,45 +373,45 @@ OH_Drawing_ErrorCode OH_Drawing_MatrixGetAll(OH_Drawing_Matrix* matrix, float va /** * @brief Get one matrix value. Index is between the range of 0-8. * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param index one of 0-8. * @return Returns value corresponding to index.Returns 0 if out of range. * @since 12 * @version 1.0 */ -float OH_Drawing_MatrixGetValue(OH_Drawing_Matrix*, int index); +float OH_Drawing_MatrixGetValue(OH_Drawing_Matrix* matrix, int index); /** * @brief Sets matrix to rotate by degrees about a pivot point at (px, py). The pivot point is unchanged * when mapped with matrix. Positive degrees rotates clockwise. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param degree Indicates the angle of axes relative to upright axes. * @param px Indicates the pivot on x-axis. * @param py Indicates the pivot on y-axis. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixRotate(OH_Drawing_Matrix*, float degree, float px, float py); +void OH_Drawing_MatrixRotate(OH_Drawing_Matrix* matrix, float degree, float px, float py); /** * @brief Sets matrix to translate by (dx, dy) * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param dx Indicates the horizontal translation. * @param dy Indicates the vertical translation. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixTranslate(OH_Drawing_Matrix*, float dx, float dy); +void OH_Drawing_MatrixTranslate(OH_Drawing_Matrix* matrix, float dx, float dy); /** * @brief Sets matrix to scale by sx and sy, about a pivot point at (px, py). * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param sx Indicates the horizontal scale factor. * @param sy Indicates the vertical scale factor. * @param px Indicates the pivot on x-axis. @@ -422,27 +419,27 @@ void OH_Drawing_MatrixTranslate(OH_Drawing_Matrix*, float dx, float dy); * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixScale(OH_Drawing_Matrix*, float sx, float sy, float px, float py); +void OH_Drawing_MatrixScale(OH_Drawing_Matrix* matrix, float sx, float sy, float px, float py); /** * @brief Sets inverse to reciprocal matrix, returning true if matrix can be inverted. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param inverse Indicates the pointer to an OH_Drawing_Matrix object. * @return Returns true if the matrix is not nullptr and can be inverted; * returns false if the matrix is nullptr or cannot be inverted. * @since 12 * @version 1.0 */ -bool OH_Drawing_MatrixInvert(OH_Drawing_Matrix*, OH_Drawing_Matrix* inverse); +bool OH_Drawing_MatrixInvert(OH_Drawing_Matrix* matrix, OH_Drawing_Matrix* inverse); /** * @brief Sets the params of matrix to map src to dst. * Count must greater than or equal to zero, and less than or equal to four. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param src Points to map from. * @param dst Points to map to. * @param count Number of point in src and dst. @@ -450,47 +447,47 @@ bool OH_Drawing_MatrixInvert(OH_Drawing_Matrix*, OH_Drawing_Matrix* inverse); * @since 12 * @version 1.0 */ -bool OH_Drawing_MatrixSetPolyToPoly(OH_Drawing_Matrix*, const OH_Drawing_Point2D* src, +bool OH_Drawing_MatrixSetPolyToPoly(OH_Drawing_Matrix* matrix, const OH_Drawing_Point2D* src, const OH_Drawing_Point2D* dst, uint32_t count); /** * @brief Maps the src point array to the dst point array by matrix transformation. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param src Points to map from. * @param dst Points to map to. * @param count Number of point in src and dst. * @since 12 * @version 1.0 */ -void OH_Drawing_MatrixMapPoints(const OH_Drawing_Matrix*, const OH_Drawing_Point2D* src, +void OH_Drawing_MatrixMapPoints(const OH_Drawing_Matrix* matrix, const OH_Drawing_Point2D* src, OH_Drawing_Point2D* dst, int count); /** * @brief Sets dst to bounds of src corners mapped by matrix transformation. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param src Rect to map from. * @param dst Rect to map to. * @return Returns true if the mapped src is equal to the dst; returns false is not equal. * @since 12 * @version 1.0 */ -bool OH_Drawing_MatrixMapRect(const OH_Drawing_Matrix*, const OH_Drawing_Rect* src, OH_Drawing_Rect* dst); +bool OH_Drawing_MatrixMapRect(const OH_Drawing_Matrix* matrix, const OH_Drawing_Rect* src, OH_Drawing_Rect* dst); /** * @brief Returns true if the first matrix equals the second matrix. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param other Indicates the pointer to an OH_Drawing_Matrix object. * @return Returns true if the two matrices are equal; returns false if not equal. * @since 12 * @version 1.0 */ -bool OH_Drawing_MatrixIsEqual(OH_Drawing_Matrix*, OH_Drawing_Matrix* other); +bool OH_Drawing_MatrixIsEqual(OH_Drawing_Matrix* matrix, OH_Drawing_Matrix* other); /** * @brief Returns true if matrix is identity. @@ -499,22 +496,22 @@ bool OH_Drawing_MatrixIsEqual(OH_Drawing_Matrix*, OH_Drawing_Matrix* other); * | 0 0 1 | * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @return Returns true if matrix is identity; returns false if not identity. * @since 12 * @version 1.0 */ -bool OH_Drawing_MatrixIsIdentity(OH_Drawing_Matrix*); +bool OH_Drawing_MatrixIsIdentity(OH_Drawing_Matrix* matrix); /** * @brief Destroys an OH_Drawing_Matrix object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @since 11 * @version 1.0 */ -void OH_Drawing_MatrixDestroy(OH_Drawing_Matrix*); +void OH_Drawing_MatrixDestroy(OH_Drawing_Matrix* matrix); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_memory_stream.h b/graphic/graphic_2d/native_drawing/drawing_memory_stream.h index 37c578106..3188d3be9 100644 --- a/graphic/graphic_2d/native_drawing/drawing_memory_stream.h +++ b/graphic/graphic_2d/native_drawing/drawing_memory_stream.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_MEMORY_STREAM_H -#define C_INCLUDE_DRAWING_MEMORY_STREAM_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_MEMORY_STREAM_H +#define C_INCLUDE_DRAWING_MEMORY_STREAM_H + #include "drawing_types.h" #ifdef __cplusplus @@ -63,11 +63,11 @@ OH_Drawing_MemoryStream* OH_Drawing_MemoryStreamCreate(const void* data, size_t * @brief Destroys an OH_Drawing_MemoryStream object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_MemoryStream Indicates the pointer to an OH_Drawing_MemoryStream object. + * @param memoryStream Indicates the pointer to an OH_Drawing_MemoryStream object. * @since 12 * @version 1.0 */ -void OH_Drawing_MemoryStreamDestroy(OH_Drawing_MemoryStream*); +void OH_Drawing_MemoryStreamDestroy(OH_Drawing_MemoryStream* memoryStream); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_path.h b/graphic/graphic_2d/native_drawing/drawing_path.h index e10ef145a..3cc9269c9 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path.h +++ b/graphic/graphic_2d/native_drawing/drawing_path.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_PATH_H -#define C_INCLUDE_DRAWING_PATH_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_PATH_H +#define C_INCLUDE_DRAWING_PATH_H + #include "drawing_types.h" #ifdef __cplusplus @@ -153,46 +153,46 @@ OH_Drawing_Path* OH_Drawing_PathCreate(void); * @brief Creates an OH_Drawing_Path copy object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Rect object. + * @param path Indicates the pointer to an OH_Drawing_Rect object. * @return Returns the pointer to the OH_Drawing_Path object created. * @since 12 * @version 1.0 */ -OH_Drawing_Path* OH_Drawing_PathCopy(OH_Drawing_Path*); +OH_Drawing_Path* OH_Drawing_PathCopy(OH_Drawing_Path* path); /** * @brief Destroys an OH_Drawing_Path object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @since 8 * @version 1.0 */ -void OH_Drawing_PathDestroy(OH_Drawing_Path*); +void OH_Drawing_PathDestroy(OH_Drawing_Path* path); /** * @brief Sets the start point of a path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param x Indicates the x coordinate of the start point. * @param y Indicates the y coordinate of the start point. * @since 8 * @version 1.0 */ -void OH_Drawing_PathMoveTo(OH_Drawing_Path*, float x, float y); +void OH_Drawing_PathMoveTo(OH_Drawing_Path* path, float x, float y); /** * @brief Draws a line segment from the last point of a path to the target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param x Indicates the x coordinate of the target point. * @param y Indicates the y coordinate of the target point. * @since 8 * @version 1.0 */ -void OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y); +void OH_Drawing_PathLineTo(OH_Drawing_Path* path, float x, float y); /** * @brief Draws an arc to a path. @@ -203,7 +203,7 @@ void OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y); * By default, a line segment from the last point of the path to the start point of the arc is also added. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param x1 Indicates the x coordinate of the upper left corner of the rectangle. * @param y1 Indicates the y coordinate of the upper left corner of the rectangle. * @param x2 Indicates the x coordinate of the lower right corner of the rectangle. @@ -213,13 +213,14 @@ void OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y); * @since 8 * @version 1.0 */ -void OH_Drawing_PathArcTo(OH_Drawing_Path*, float x1, float y1, float x2, float y2, float startDeg, float sweepDeg); +void OH_Drawing_PathArcTo(OH_Drawing_Path* path, + float x1, float y1, float x2, float y2, float startDeg, float sweepDeg); /** * @brief Draws a quadratic Bezier curve from the last point of a path to the target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param ctrlX Indicates the x coordinate of the control point. * @param ctrlY Indicates the y coordinate of the control point. * @param endX Indicates the x coordinate of the target point. @@ -227,13 +228,13 @@ void OH_Drawing_PathArcTo(OH_Drawing_Path*, float x1, float y1, float x2, float * @since 8 * @version 1.0 */ -void OH_Drawing_PathQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY); +void OH_Drawing_PathQuadTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY); /** * @brief Draws a conic from the last point of a path to the target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param ctrlX Indicates the x coordinate of the control point. * @param ctrlY Indicates the y coordinate of the control point. * @param endX Indicates the x coordinate of the target point. @@ -242,13 +243,13 @@ void OH_Drawing_PathQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float end * @since 12 * @version 1.0 */ -void OH_Drawing_PathConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY, float weight); +void OH_Drawing_PathConicTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY, float weight); /** * @brief Draws a cubic Bezier curve from the last point of a path to the target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param ctrlX1 Indicates the x coordinate of the first control point. * @param ctrlY1 Indicates the y coordinate of the first control point. * @param ctrlX2 Indicates the x coordinate of the second control point. @@ -259,37 +260,37 @@ void OH_Drawing_PathConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float en * @version 1.0 */ void OH_Drawing_PathCubicTo( - OH_Drawing_Path*, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, float endX, float endY); + OH_Drawing_Path* path, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, float endX, float endY); /** * @brief Sets the relative starting point of a path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param x Indicates the x coordinate of the relative starting point. * @param y Indicates the y coordinate of the relative starting point. * @since 12 * @version 1.0 */ -void OH_Drawing_PathRMoveTo(OH_Drawing_Path*, float x, float y); +void OH_Drawing_PathRMoveTo(OH_Drawing_Path* path, float x, float y); /** * @brief Draws a line segment from the last point of a path to the relative target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param x Indicates the x coordinate of the relative target point. * @param y Indicates the y coordinate of the relative target point. * @since 12 * @version 1.0 */ -void OH_Drawing_PathRLineTo(OH_Drawing_Path*, float x, float y); +void OH_Drawing_PathRLineTo(OH_Drawing_Path* path, float x, float y); /** * @brief Draws a quadratic bezier curve from the last point of a path to the relative target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param ctrlX Indicates the x coordinate of the relative control point. * @param ctrlY Indicates the y coordinate of the relative control point. * @param endX Indicates the x coordinate of the relative target point. @@ -297,13 +298,13 @@ void OH_Drawing_PathRLineTo(OH_Drawing_Path*, float x, float y); * @since 12 * @version 1.0 */ -void OH_Drawing_PathRQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY); +void OH_Drawing_PathRQuadTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY); /** * @brief Draws a conic from the last point of a path to the relative target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param ctrlX Indicates the x coordinate of the relative control point. * @param ctrlY Indicates the y coordinate of the relative control point. * @param endX Indicates the x coordinate of the relative target point. @@ -312,13 +313,13 @@ void OH_Drawing_PathRQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float en * @since 12 * @version 1.0 */ -void OH_Drawing_PathRConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY, float weight); +void OH_Drawing_PathRConicTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY, float weight); /** * @brief Draws a cubic bezier curve from the last point of a path to the relative target point. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param ctrlX1 Indicates the x coordinate of the first relative control point. * @param ctrlY1 Indicates the y coordinate of the first relative control point. * @param ctrlX2 Indicates the x coordinate of the second relative control point. @@ -328,76 +329,78 @@ void OH_Drawing_PathRConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float e * @since 12 * @version 1.0 */ -void OH_Drawing_PathRCubicTo(OH_Drawing_Path*, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, +void OH_Drawing_PathRCubicTo(OH_Drawing_Path* path, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, float endX, float endY); /** * @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param left Indicates the left coordinate of the upper left corner of the rectangle. * @param top Indicates the top coordinate of the upper top corner of the rectangle. * @param right Indicates the right coordinate of the lower right corner of the rectangle. * @param bottom Indicates the bottom coordinate of the lower bottom corner of the rectangle. - * @param OH_Drawing_PathDirection Indicates the path direction. + * @param pathDirection Indicates the path direction. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddRect(OH_Drawing_Path*, float left, float top, float right, float bottom, - OH_Drawing_PathDirection); +void OH_Drawing_PathAddRect(OH_Drawing_Path* path, float left, float top, float right, float bottom, + OH_Drawing_PathDirection pathDirection); /** * @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. - * @param OH_Drawing_PathDirection Indicates the path direction. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. + * @param pathDirection Indicates the path direction. * @param start Indicates initial corner of rect to add. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddRectWithInitialCorner(OH_Drawing_Path*, const OH_Drawing_Rect*, - OH_Drawing_PathDirection, uint32_t start); +void OH_Drawing_PathAddRectWithInitialCorner(OH_Drawing_Path* path, const OH_Drawing_Rect* rect, + OH_Drawing_PathDirection pathDirection, uint32_t start); /** * @brief Adds a new contour to the path, defined by the round rect, and wound in the specified direction. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_RoundRect Indicates the pointer to an OH_Drawing_RoundRect object. - * @param OH_Drawing_PathDirection Indicates the path direction. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param roundRect Indicates the pointer to an OH_Drawing_RoundRect object. + * @param pathDirection Indicates the path direction. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddRoundRect(OH_Drawing_Path*, const OH_Drawing_RoundRect* roundRect, OH_Drawing_PathDirection); +void OH_Drawing_PathAddRoundRect(OH_Drawing_Path* path, + const OH_Drawing_RoundRect* roundRect, OH_Drawing_PathDirection pathDirection); /** * @brief Adds a oval to the path, defined by the rect, and wound in the specified direction. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @param start Index of initial point of ellipse. - * @param OH_Drawing_PathDirection Indicates the path direction. + * @param pathDirection Indicates the path direction. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddOvalWithInitialPoint(OH_Drawing_Path*, const OH_Drawing_Rect*, - uint32_t start, OH_Drawing_PathDirection); +void OH_Drawing_PathAddOvalWithInitialPoint(OH_Drawing_Path* path, const OH_Drawing_Rect* rect, + uint32_t start, OH_Drawing_PathDirection pathDirection); /** * @brief Adds a oval to the path, defined by the rect, and wound in the specified direction. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. - * @param OH_Drawing_PathDirection Indicates the path direction. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. + * @param pathDirection Indicates the path direction. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddOval(OH_Drawing_Path*, const OH_Drawing_Rect*, OH_Drawing_PathDirection); +void OH_Drawing_PathAddOval(OH_Drawing_Path* path, + const OH_Drawing_Rect* rect, OH_Drawing_PathDirection pathDirection); /** * @brief Appends arc to path, as the start of new contour.Arc added is part of ellipse bounded by oval, @@ -407,27 +410,27 @@ void OH_Drawing_PathAddOval(OH_Drawing_Path*, const OH_Drawing_Rect*, OH_Drawing * values are treated modulo 360, and arc may or may not draw depending on numeric rounding. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @param startAngle Indicates the starting angle of arc in degrees. * @param sweepAngle Indicates the sweep, in degrees. Positive is clockwise. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddArc(OH_Drawing_Path*, const OH_Drawing_Rect*, float startAngle, float sweepAngle); +void OH_Drawing_PathAddArc(OH_Drawing_Path* path, const OH_Drawing_Rect* rect, float startAngle, float sweepAngle); /** * @brief Appends src path to path, transformed by matrix. Transformed curves may have different verbs, * point, and conic weights. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param src Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Matrix Indicates the length of the OH_Drawing_Matrix object. + * @param matrix Indicates the length of the OH_Drawing_Matrix object. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddPath(OH_Drawing_Path*, const OH_Drawing_Path* src, const OH_Drawing_Matrix*); +void OH_Drawing_PathAddPath(OH_Drawing_Path* path, const OH_Drawing_Path* src, const OH_Drawing_Matrix* matrix); /** * @brief Appends src path to path, transformed by matrix and mode. Transformed curves may have different verbs, @@ -436,13 +439,13 @@ void OH_Drawing_PathAddPath(OH_Drawing_Path*, const OH_Drawing_Path* src, const * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param path Indicates the pointer to an OH_Drawing_Path object. * @param src Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Matrix Indicates the length of the OH_Drawing_Matrix object. - * @param OH_Drawing_PathAddMode Indicates the add path's add mode. + * @param matrix Indicates the length of the OH_Drawing_Matrix object. + * @param pathAddMode Indicates the add path's add mode. * @since 12 * @version 1.0 */ void OH_Drawing_PathAddPathWithMatrixAndMode(OH_Drawing_Path* path, const OH_Drawing_Path* src, - const OH_Drawing_Matrix*, OH_Drawing_PathAddMode); + const OH_Drawing_Matrix* matrix, OH_Drawing_PathAddMode pathAddMode); /** * @brief Appends src path to path, transformed by mode. Transformed curves may have different verbs, @@ -451,11 +454,12 @@ void OH_Drawing_PathAddPathWithMatrixAndMode(OH_Drawing_Path* path, const OH_Dra * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param path Indicates the pointer to an OH_Drawing_Path object. * @param src Indicates the pointer to an OH_Drawing_Path object, which is Appends src path to path. - * @param OH_Drawing_PathAddMode Indicates the add path's add mode. + * @param pathAddMode Indicates the add path's add mode. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddPathWithMode(OH_Drawing_Path* path, const OH_Drawing_Path* src, OH_Drawing_PathAddMode); +void OH_Drawing_PathAddPathWithMode(OH_Drawing_Path* path, + const OH_Drawing_Path* src, OH_Drawing_PathAddMode pathAddMode); /** * @brief Appends src path to path, transformed by offset and mode. Transformed curves may have different verbs, @@ -466,12 +470,12 @@ void OH_Drawing_PathAddPathWithMode(OH_Drawing_Path* path, const OH_Drawing_Path * @param src Indicates the pointer to an OH_Drawing_Path object. * @param dx Indicates offset added to src path x-axis coordinates. * @param dy Indicates offset added to src path y-axis coordinates. - * @param OH_Drawing_PathAddMode Indicates the add path's add mode. + * @param pathAddMode Indicates the add path's add mode. * @since 12 * @version 1.0 */ void OH_Drawing_PathAddPathWithOffsetAndMode(OH_Drawing_Path* path, const OH_Drawing_Path* src, float dx, float dy, - OH_Drawing_PathAddMode); + OH_Drawing_PathAddMode pathAddMode); /** * @brief Adds contour created from point array, adding (count - 1) line segments. @@ -494,11 +498,12 @@ void OH_Drawing_PathAddPolygon(OH_Drawing_Path* path, const OH_Drawing_Point2D* * @param x Indicates the x coordinate of the center of the circle. * @param y Indicates the y coordinate of the center of the circle. * @param radius Indicates the radius of the circle. - * @param OH_Drawing_PathDirection Indicates the path direction. + * @param pathDirection Indicates the path direction. * @since 12 * @version 1.0 */ -void OH_Drawing_PathAddCircle(OH_Drawing_Path* path, float x, float y, float radius, OH_Drawing_PathDirection); +void OH_Drawing_PathAddCircle(OH_Drawing_Path* path, + float x, float y, float radius, OH_Drawing_PathDirection pathDirection); /** * @brief Parses the svg path from the string. @@ -516,26 +521,26 @@ bool OH_Drawing_PathBuildFromSvgString(OH_Drawing_Path* path, const char* str); * @brief Return the status that point (x, y) is contained by path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param x Indicates the x-axis value of containment test. * @param y Indicates the y-axis value of containment test. * @return Returns true if the point (x, y) is contained by path. * @since 12 * @version 1.0 */ -bool OH_Drawing_PathContains(OH_Drawing_Path*, float x, float y); +bool OH_Drawing_PathContains(OH_Drawing_Path* path, float x, float y); /** * @brief Transforms verb array, point array, and weight by matrix. transform may change verbs * and increase their number. path is replaced by transformed data. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @since 12 * @version 1.0 */ -void OH_Drawing_PathTransform(OH_Drawing_Path*, const OH_Drawing_Matrix*); +void OH_Drawing_PathTransform(OH_Drawing_Path* path, const OH_Drawing_Matrix* matrix); /** * @brief Transforms verb array, point array, and weight by matrix. @@ -543,58 +548,58 @@ void OH_Drawing_PathTransform(OH_Drawing_Path*, const OH_Drawing_Matrix*); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param src Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * @param dst Indicates the pointer to an OH_Drawing_Path object. * @param applyPerspectiveClip Indicates whether to apply perspective clip. * @since 12 * @version 1.0 */ -void OH_Drawing_PathTransformWithPerspectiveClip(OH_Drawing_Path* src, const OH_Drawing_Matrix*, +void OH_Drawing_PathTransformWithPerspectiveClip(OH_Drawing_Path* src, const OH_Drawing_Matrix* matrix, OH_Drawing_Path* dst, bool applyPerspectiveClip); /** * @brief Sets FillType, the rule used to fill path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_PathFillType Indicates the add path's fill type. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param pathFillType Indicates the add path's fill type. * @since 12 * @version 1.0 */ -void OH_Drawing_PathSetFillType(OH_Drawing_Path*, OH_Drawing_PathFillType); +void OH_Drawing_PathSetFillType(OH_Drawing_Path* path, OH_Drawing_PathFillType pathFillType); /** * @brief Gets the length of the current path object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @param forceClosed Indicates whether free to modify/delete the path after this call. * @return Returns the length of the current path object. * @since 12 * @version 1.0 */ -float OH_Drawing_PathGetLength(OH_Drawing_Path*, bool forceClosed); +float OH_Drawing_PathGetLength(OH_Drawing_Path* path, bool forceClosed); /** * @brief Gets the smallest bounding box that contains the path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @since 12 * @version 1.0 */ -void OH_Drawing_PathGetBounds(OH_Drawing_Path*, OH_Drawing_Rect*); +void OH_Drawing_PathGetBounds(OH_Drawing_Path* path, OH_Drawing_Rect* rect); /** * @brief Closes a path. A line segment from the start point to the last point of the path is added. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @since 8 * @version 1.0 */ -void OH_Drawing_PathClose(OH_Drawing_Path*); +void OH_Drawing_PathClose(OH_Drawing_Path* path); /** * @brief Offset path replaces dst. @@ -613,11 +618,11 @@ void OH_Drawing_PathOffset(OH_Drawing_Path* path, OH_Drawing_Path* dst, float dx * @brief Resets path data. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object. + * @param path Indicates the pointer to an OH_Drawing_Path object. * @since 8 * @version 1.0 */ -void OH_Drawing_PathReset(OH_Drawing_Path*); +void OH_Drawing_PathReset(OH_Drawing_Path* path); /** * @brief Determines whether the path current contour is closed. diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h index b3260d576..7e3bd8e16 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_PATH_EFFECT_H -#define C_INCLUDE_DRAWING_PATH_EFFECT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_PATH_EFFECT_H +#define C_INCLUDE_DRAWING_PATH_EFFECT_H + #include "drawing_types.h" #ifdef __cplusplus @@ -63,11 +63,11 @@ OH_Drawing_PathEffect* OH_Drawing_CreateDashPathEffect(float* intervals, int cou * @brief Destroys an OH_Drawing_PathEffect object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_PathEffect Indicates the pointer to an OH_Drawing_PathEffect object. + * @param pathEffect Indicates the pointer to an OH_Drawing_PathEffect object. * @since 12 * @version 1.0 */ -void OH_Drawing_PathEffectDestroy(OH_Drawing_PathEffect*); +void OH_Drawing_PathEffectDestroy(OH_Drawing_PathEffect* pathEffect); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_pen.h b/graphic/graphic_2d/native_drawing/drawing_pen.h index 304439aa9..7465f4eba 100644 --- a/graphic/graphic_2d/native_drawing/drawing_pen.h +++ b/graphic/graphic_2d/native_drawing/drawing_pen.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_PEN_H -#define C_INCLUDE_DRAWING_PEN_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_PEN_H +#define C_INCLUDE_DRAWING_PEN_H + #include "drawing_types.h" #ifdef __cplusplus @@ -60,115 +60,115 @@ OH_Drawing_Pen* OH_Drawing_PenCreate(void); * @brief Creates an OH_Drawing_Pen copy object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns the pointer to the OH_Drawing_Pen object created. * If nullptr is returned, the creation fails. * The possible cause of the failure is that the available memory is empty or a nullptr is passed. * @since 12 * @version 1.0 */ -OH_Drawing_Pen* OH_Drawing_PenCopy(OH_Drawing_Pen*); +OH_Drawing_Pen* OH_Drawing_PenCopy(OH_Drawing_Pen* pen); /** * @brief Destroys an OH_Drawing_Pen object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @since 8 * @version 1.0 */ -void OH_Drawing_PenDestroy(OH_Drawing_Pen*); +void OH_Drawing_PenDestroy(OH_Drawing_Pen* 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 OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns true if anti-aliasing is enabled; returns false otherwise. * @since 8 * @version 1.0 */ -bool OH_Drawing_PenIsAntiAlias(const OH_Drawing_Pen*); +bool OH_Drawing_PenIsAntiAlias(const OH_Drawing_Pen* pen); /** * @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 OH_Drawing_Pen object. - * @param bool Specifies whether to enable anti-aliasing. The value true means + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param antiAlias Specifies whether to enable anti-aliasing. The value true means * to enable anti-aliasing, and false means the opposite. * @since 8 * @version 1.0 */ -void OH_Drawing_PenSetAntiAlias(OH_Drawing_Pen*, bool); +void OH_Drawing_PenSetAntiAlias(OH_Drawing_Pen* pen, bool antiAlias); /** * @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 OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns a 32-bit (ARGB) variable that describes the color. * @since 8 * @version 1.0 */ -uint32_t OH_Drawing_PenGetColor(const OH_Drawing_Pen*); +uint32_t OH_Drawing_PenGetColor(const OH_Drawing_Pen* pen); /** * @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 OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @param color Indicates the color to set, which is a 32-bit (ARGB) variable. * @since 8 * @version 1.0 */ -void OH_Drawing_PenSetColor(OH_Drawing_Pen*, uint32_t color); +void OH_Drawing_PenSetColor(OH_Drawing_Pen* pen, uint32_t color); /** * @brief Obtains the alpha of a pen. The alpha is used by the pen to outline a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns a 8-bit variable that describes the alpha. * @since 11 * @version 1.0 */ -uint8_t OH_Drawing_PenGetAlpha(const OH_Drawing_Pen*); +uint8_t OH_Drawing_PenGetAlpha(const OH_Drawing_Pen* pen); /** * @brief Sets the alpha for a pen. The alpha is used by the pen to outline a shape. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @param alpha Indicates the alpha to set, which is a 8-bit variable. * @since 11 * @version 1.0 */ -void OH_Drawing_PenSetAlpha(OH_Drawing_Pen*, uint8_t alpha); +void OH_Drawing_PenSetAlpha(OH_Drawing_Pen* pen, uint8_t alpha); /** * @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 OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns the thickness. * @since 8 * @version 1.0 */ -float OH_Drawing_PenGetWidth(const OH_Drawing_Pen*); +float OH_Drawing_PenGetWidth(const OH_Drawing_Pen* pen); /** * @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 OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @param width Indicates the thickness to set, which is a variable. * @since 8 * @version 1.0 */ -void OH_Drawing_PenSetWidth(OH_Drawing_Pen*, float width); +void OH_Drawing_PenSetWidth(OH_Drawing_Pen* pen, float width); /** * @brief Obtains the stroke miter limit of a polyline drawn by a pen. @@ -177,12 +177,12 @@ void OH_Drawing_PenSetWidth(OH_Drawing_Pen*, float width); * 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 OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns the miter limit. * @since 8 * @version 1.0 */ -float OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen*); +float OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen* pen); /** * @brief Sets the stroke miter limit for a polyline drawn by a pen. @@ -191,12 +191,12 @@ float OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen*); * 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 OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @param miter Indicates a variable that describes the miter limit. * @since 8 * @version 1.0 */ -void OH_Drawing_PenSetMiterLimit(OH_Drawing_Pen*, float miter); +void OH_Drawing_PenSetMiterLimit(OH_Drawing_Pen* pen, float miter); /** * @brief Enumerates line cap styles of a pen. The line cap style defines @@ -226,23 +226,23 @@ typedef enum { * @brief Obtains the line cap style of a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns the line cap style. * @since 8 * @version 1.0 */ -OH_Drawing_PenLineCapStyle OH_Drawing_PenGetCap(const OH_Drawing_Pen*); +OH_Drawing_PenLineCapStyle OH_Drawing_PenGetCap(const OH_Drawing_Pen* pen); /** * @brief Sets the line cap style for a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_PenLineCapStyle Indicates a variable that describes the line cap style. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param capStyle Indicates a variable that describes the line cap style. * @since 8 * @version 1.0 */ -void OH_Drawing_PenSetCap(OH_Drawing_Pen*, OH_Drawing_PenLineCapStyle); +void OH_Drawing_PenSetCap(OH_Drawing_Pen* pen, OH_Drawing_PenLineCapStyle capStyle); /** * @brief Enumerates pen line join styles. The line join style defines @@ -267,117 +267,117 @@ typedef enum { * @brief Obtains the line join style of a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @return Returns the line join style. * @since 8 * @version 1.0 */ -OH_Drawing_PenLineJoinStyle OH_Drawing_PenGetJoin(const OH_Drawing_Pen*); +OH_Drawing_PenLineJoinStyle OH_Drawing_PenGetJoin(const OH_Drawing_Pen* pen); /** * @brief Sets the line join style for a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_PenLineJoinStyle Indicates a variable that describes the line join style. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param joinStyle Indicates a variable that describes the line join style. * @since 8 * @version 1.0 */ -void OH_Drawing_PenSetJoin(OH_Drawing_Pen*, OH_Drawing_PenLineJoinStyle); +void OH_Drawing_PenSetJoin(OH_Drawing_Pen* pen, OH_Drawing_PenLineJoinStyle joinStyle); /** * @brief Sets the shaderEffect for a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_ShaderEffect Indicates the pointer to an OH_Drawing_ShaderEffect object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param shaderEffect Indicates the pointer to an OH_Drawing_ShaderEffect object. * @since 11 * @version 1.0 */ -void OH_Drawing_PenSetShaderEffect(OH_Drawing_Pen*, OH_Drawing_ShaderEffect*); +void OH_Drawing_PenSetShaderEffect(OH_Drawing_Pen* pen, OH_Drawing_ShaderEffect* shaderEffect); /** * @brief Sets the shadowLayer for a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_ShadowLayer Indicates the pointer to an OH_Drawing_ShadowLayer object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param shadowLayer Indicates the pointer to an OH_Drawing_ShadowLayer object. * @since 12 * @version 1.0 */ -void OH_Drawing_PenSetShadowLayer(OH_Drawing_Pen*, OH_Drawing_ShadowLayer*); +void OH_Drawing_PenSetShadowLayer(OH_Drawing_Pen* pen, OH_Drawing_ShadowLayer* shadowLayer); /** * @brief Sets the pathEffect for a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_PathEffect Indicates the pointer to an OH_Drawing_PathEffect object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pathEffect Indicates the pointer to an OH_Drawing_PathEffect object. * @since 12 * @version 1.0 */ -void OH_Drawing_PenSetPathEffect(OH_Drawing_Pen*, OH_Drawing_PathEffect*); +void OH_Drawing_PenSetPathEffect(OH_Drawing_Pen* pen, OH_Drawing_PathEffect* pathEffect); /** * @brief Sets the filter for a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. * @since 11 * @version 1.0 */ -void OH_Drawing_PenSetFilter(OH_Drawing_Pen*, OH_Drawing_Filter*); +void OH_Drawing_PenSetFilter(OH_Drawing_Pen* pen, OH_Drawing_Filter* filter); /** * @brief Gets the filter from a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_Filter Indicates the pointer to an OH_Drawing_Filter object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param filter Indicates the pointer to an OH_Drawing_Filter object. * @since 12 * @version 1.0 */ -void OH_Drawing_PenGetFilter(OH_Drawing_Pen*, OH_Drawing_Filter*); +void OH_Drawing_PenGetFilter(OH_Drawing_Pen* pen, OH_Drawing_Filter* filter); /** * @brief Sets a blender that implements the specified blendmode enum for a pen. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. - * @param OH_Drawing_BlendMode Indicates the blend mode. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param blendMode Indicates the blend mode. * @since 12 * @version 1.0 */ -void OH_Drawing_PenSetBlendMode(OH_Drawing_Pen*, OH_Drawing_BlendMode); +void OH_Drawing_PenSetBlendMode(OH_Drawing_Pen* pen, OH_Drawing_BlendMode blendMode); /** * @brief Gets the filled equivalent of the src path. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @param src Indicates the Path read to create a filled version. * @param dst Indicates the resulting Path. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object that limits the PathEffect area if + * @param rect Indicates the pointer to an OH_Drawing_Rect object that limits the PathEffect area if Pen has PathEffect. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object that tranfomation applied to + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object that tranfomation applied to PathEffect if Pen has PathEffect. * @return Returns true if get successes; false if get fails. * @since 12 * @version 1.0 */ -bool OH_Drawing_PenGetFillPath(OH_Drawing_Pen*, const OH_Drawing_Path* src, OH_Drawing_Path* dst, - const OH_Drawing_Rect*, const OH_Drawing_Matrix*); +bool OH_Drawing_PenGetFillPath(OH_Drawing_Pen* pen, const OH_Drawing_Path* src, OH_Drawing_Path* dst, + const OH_Drawing_Rect* rect, const OH_Drawing_Matrix* matrix); /** * @brief Resets all pen contents to their initial values. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object. + * @param pen Indicates the pointer to an OH_Drawing_Pen object. * @since 12 * @version 1.0 */ -void OH_Drawing_PenReset(OH_Drawing_Pen*); +void OH_Drawing_PenReset(OH_Drawing_Pen* pen); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_pixel_map.h b/graphic/graphic_2d/native_drawing/drawing_pixel_map.h index ef29ce5b4..0c0eb5e09 100644 --- a/graphic/graphic_2d/native_drawing/drawing_pixel_map.h +++ b/graphic/graphic_2d/native_drawing/drawing_pixel_map.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_PIXEL_MAP_H -#define C_INCLUDE_DRAWING_PIXEL_MAP_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_PIXEL_MAP_H +#define C_INCLUDE_DRAWING_PIXEL_MAP_H + #include "drawing_types.h" #ifdef __cplusplus @@ -64,36 +64,36 @@ typedef struct OH_PixelmapNative OH_PixelmapNative; * @brief Gets an OH_Drawing_PixelMap object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param NativePixelMap_ Indicates a pointer to an native pixelmap supported by image framework. + * @param nativePixelMap Indicates a pointer to an native pixelmap supported by image framework. * @return Returns the pointer to the OH_Drawing_PixelMap object. * @since 12 * @version 1.0 */ -OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_*); +OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_* nativePixelMap); /** * @brief Gets an OH_Drawing_PixelMap object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_PixelmapNative Indicates a pointer to the OH_PixelmapNative object supported by image framework. + * @param pixelmapNative Indicates a pointer to the OH_PixelmapNative object supported by image framework. * @return Returns the pointer to the OH_Drawing_PixelMap object. * If nullptr is returned, the get operation fails. * The possible cause of the failure is that a nullptr is passed. * @since 12 * @version 1.0 */ -OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative*); +OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative* pixelmapNative); /** * @brief Dissolves the relationship between OH_Drawing_PixelMap object and NativePixelMap_ or OH_PixelmapNative which is build by 'GetFrom' function. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_PixelMap Indicates a pointer to the OH_Drawing_PixelMap. + * @param pixelMap Indicates a pointer to the OH_Drawing_PixelMap. * @since 12 * @version 1.0 */ -void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap*); +void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap* pixelMap); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_point.h b/graphic/graphic_2d/native_drawing/drawing_point.h index 47756fb65..d3c8f5a46 100644 --- a/graphic/graphic_2d/native_drawing/drawing_point.h +++ b/graphic/graphic_2d/native_drawing/drawing_point.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_POINT_H -#define C_INCLUDE_DRAWING_POINT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_POINT_H +#define C_INCLUDE_DRAWING_POINT_H + #include "drawing_error_code.h" #include "drawing_types.h" @@ -106,11 +106,11 @@ OH_Drawing_ErrorCode OH_Drawing_PointSet(OH_Drawing_Point* point, float x, float * @brief Destroys an OH_Drawing_Point object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Point Indicates the pointer to an OH_Drawing_Point object. + * @param point Indicates the pointer to an OH_Drawing_Point object. * @since 11 * @version 1.0 */ -void OH_Drawing_PointDestroy(OH_Drawing_Point*); +void OH_Drawing_PointDestroy(OH_Drawing_Point* point); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_record_cmd.h b/graphic/graphic_2d/native_drawing/drawing_record_cmd.h index 63c03f03b..95ae73385 100644 --- a/graphic/graphic_2d/native_drawing/drawing_record_cmd.h +++ b/graphic/graphic_2d/native_drawing/drawing_record_cmd.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_RECORD_CMD_H -#define C_INCLUDE_DRAWING_RECORD_CMD_H - /** * @addtogroup Drawing * @{ @@ -33,11 +30,16 @@ * * @brief Declares functions related to the RecordCmd object in the drawing module. * + * @kit ArkGraphics2D * @library libnative_drawing.so + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @since 13 * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_RECORD_CMD_H +#define C_INCLUDE_DRAWING_RECORD_CMD_H + #include "drawing_types.h" #include "drawing_error_code.h" diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h index d247e88f7..8e6f1ab10 100644 --- a/graphic/graphic_2d/native_drawing/drawing_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_rect.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_RECT_H -#define C_INCLUDE_DRAWING_RECT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_RECT_H +#define C_INCLUDE_DRAWING_RECT_H + #include "drawing_types.h" #ifdef __cplusplus @@ -133,65 +133,66 @@ void OH_Drawing_RectSetBottom(OH_Drawing_Rect* rect, float bottom); * @brief Get the left position of the rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @return Return the left position of the rect. * @since 12 * @version 1.0 */ -float OH_Drawing_RectGetLeft(OH_Drawing_Rect*); +float OH_Drawing_RectGetLeft(OH_Drawing_Rect* rect); /** * @brief Get the top position of the rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @return Return the top position of the rect. * @since 12 * @version 1.0 */ -float OH_Drawing_RectGetTop(OH_Drawing_Rect*); +float OH_Drawing_RectGetTop(OH_Drawing_Rect* rect); /** * @brief Get the right position of the rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @return Return the right position of the rect. * @since 12 * @version 1.0 */ -float OH_Drawing_RectGetRight(OH_Drawing_Rect*); +float OH_Drawing_RectGetRight(OH_Drawing_Rect* rect); /** * @brief Get the bottom position of the rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @return Return the bottom position of the rect. * @since 12 * @version 1.0 */ -float OH_Drawing_RectGetBottom(OH_Drawing_Rect*); +float OH_Drawing_RectGetBottom(OH_Drawing_Rect* rect); /** * @brief Get the height position of the rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @since 12 * @version 1.0 */ -float OH_Drawing_RectGetHeight(OH_Drawing_Rect*); +float OH_Drawing_RectGetHeight(OH_Drawing_Rect* rect); -/* @brief Get the width position of the rect. +/** + * @brief Get the width position of the rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @return Returns the width. * @since 12 * @version 1.0 */ -float OH_Drawing_RectGetWidth(OH_Drawing_Rect*); +float OH_Drawing_RectGetWidth(OH_Drawing_Rect* rect); /** * @brief Copy the original rectangular object to the destination rectangular object. @@ -208,11 +209,11 @@ void OH_Drawing_RectCopy(OH_Drawing_Rect* src, OH_Drawing_Rect* dst); * @brief Destroys an OH_Drawing_Rect object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @since 11 * @version 1.0 */ -void OH_Drawing_RectDestroy(OH_Drawing_Rect*); +void OH_Drawing_RectDestroy(OH_Drawing_Rect* rect); /** * @brief Creates an OH_Drawing_Array object, which is used to store multiple OH_Drawing_Rect object. diff --git a/graphic/graphic_2d/native_drawing/drawing_region.h b/graphic/graphic_2d/native_drawing/drawing_region.h index 39eb09315..ea27f3bce 100644 --- a/graphic/graphic_2d/native_drawing/drawing_region.h +++ b/graphic/graphic_2d/native_drawing/drawing_region.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_REGION_H -#define C_INCLUDE_DRAWING_REGION_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_REGION_H +#define C_INCLUDE_DRAWING_REGION_H + #include "drawing_types.h" #ifdef __cplusplus @@ -94,8 +94,8 @@ OH_Drawing_Region* OH_Drawing_RegionCreate(void); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param region Indicates the pointer to an OH_Drawing_Region object. - * @param int32_t x-coordinate. - * @param int32_t y-coordinate. + * @param x x-coordinate. + * @param y y-coordinate. * @return Returns true if (x, y) is inside region; returns false otherwise. * @since 12 * @version 1.0 @@ -119,8 +119,8 @@ bool OH_Drawing_RegionOp(OH_Drawing_Region* region, const OH_Drawing_Region* oth * @brief Sets the region to the specified rect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Region Indicates the pointer to an OH_Drawing_Region object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param region Indicates the pointer to an OH_Drawing_Region object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @return Return true if constructed Region is not empty. * @since 12 * @version 1.0 @@ -144,11 +144,11 @@ bool OH_Drawing_RegionSetPath(OH_Drawing_Region* region, const OH_Drawing_Path* * @brief Destroys an OH_Drawing_Region object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Region Indicates the pointer to an OH_Drawing_Region object. + * @param region Indicates the pointer to an OH_Drawing_Region object. * @since 12 * @version 1.0 */ -void OH_Drawing_RegionDestroy(OH_Drawing_Region*); +void OH_Drawing_RegionDestroy(OH_Drawing_Region* region); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_round_rect.h b/graphic/graphic_2d/native_drawing/drawing_round_rect.h index b60f49183..e3dec061f 100644 --- a/graphic/graphic_2d/native_drawing/drawing_round_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_round_rect.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_ROUND_RECT_H -#define C_INCLUDE_DRAWING_ROUND_RECT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_ROUND_RECT_H +#define C_INCLUDE_DRAWING_ROUND_RECT_H + #include "drawing_error_code.h" #include "drawing_types.h" @@ -76,48 +76,49 @@ typedef enum { * @brief Creates an OH_Drawing_RoundRect object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @param xRad Indicates the corner radii on x-axis. * @param yRad Indicates the corner radii on y-axis. * @return Returns the pointer to the OH_Drawing_RoundRect object created. * @since 11 * @version 1.0 */ -OH_Drawing_RoundRect* OH_Drawing_RoundRectCreate(const OH_Drawing_Rect*, float xRad, float yRad); +OH_Drawing_RoundRect* OH_Drawing_RoundRectCreate(const OH_Drawing_Rect* rect, float xRad, float yRad); /** * @brief Sets the radiusX and radiusY for a specific corner position. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_RoundRect Indicates the pointer to an OH_Drawing_Rect object. + * @param roundRect Indicates the pointer to an OH_Drawing_Rect object. * @param pos Indicates the corner radii position. - * @param OH_Drawing_Corner_Radii Indicates the corner radii on x-axis and y-axis. + * @param radii Indicates the corner radii on x-axis and y-axis. * @since 12 * @version 1.0 */ -void OH_Drawing_RoundRectSetCorner(OH_Drawing_RoundRect*, OH_Drawing_CornerPos pos, OH_Drawing_Corner_Radii); +void OH_Drawing_RoundRectSetCorner(OH_Drawing_RoundRect* roundRect, + OH_Drawing_CornerPos pos, OH_Drawing_Corner_Radii radii); /** * @brief Gets an OH_Drawing_Corner_Radii struct, the point is round corner radiusX and radiusY. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_RoundRect Indicates the pointer to an OH_Drawing_RoundRect object. + * @param roundRect Indicates the pointer to an OH_Drawing_RoundRect object. * @param pos Indicates the corner radii position. * @return Returns the corner radii of OH_Drawing_Corner_Radii struct. * @since 12 * @version 1.0 */ -OH_Drawing_Corner_Radii OH_Drawing_RoundRectGetCorner(OH_Drawing_RoundRect*, OH_Drawing_CornerPos pos); +OH_Drawing_Corner_Radii OH_Drawing_RoundRectGetCorner(OH_Drawing_RoundRect* roundRect, OH_Drawing_CornerPos pos); /** * @brief Destroys an OH_Drawing_RoundRect object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_RoundRect Indicates the pointer to an OH_Drawing_RoundRect object. + * @param roundRect Indicates the pointer to an OH_Drawing_RoundRect object. * @since 11 * @version 1.0 */ -void OH_Drawing_RoundRectDestroy(OH_Drawing_RoundRect*); +void OH_Drawing_RoundRectDestroy(OH_Drawing_RoundRect* roundRect); /** * @brief Translates round rect by (dx, dy). diff --git a/graphic/graphic_2d/native_drawing/drawing_sampling_options.h b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h index b613776cf..ee55c81b1 100644 --- a/graphic/graphic_2d/native_drawing/drawing_sampling_options.h +++ b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H -#define C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H +#define C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H + #include "drawing_types.h" #ifdef __cplusplus @@ -78,23 +78,24 @@ typedef enum { * @brief Creates an OH_Drawing_SamplingOptions object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FilterMode sampling filter mode. - * @param OH_Drawing_MipmapMode sampling mipmap mode.. + * @param filterMode sampling filter mode. + * @param mipmapMode sampling mipmap mode.. * @return Returns the pointer to the OH_Drawing_SamplingOptions object created. * @since 12 * @version 1.0 */ -OH_Drawing_SamplingOptions* OH_Drawing_SamplingOptionsCreate(OH_Drawing_FilterMode, OH_Drawing_MipmapMode); +OH_Drawing_SamplingOptions* OH_Drawing_SamplingOptionsCreate(OH_Drawing_FilterMode filterMode, + OH_Drawing_MipmapMode mipmapMode); /** * @brief Destroys an OH_Drawing_SamplingOptions object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_SamplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. + * @param samplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. * @since 12 * @version 1.0 */ -void OH_Drawing_SamplingOptionsDestroy(OH_Drawing_SamplingOptions*); +void OH_Drawing_SamplingOptionsDestroy(OH_Drawing_SamplingOptions* samplingOptions); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_shader_effect.h b/graphic/graphic_2d/native_drawing/drawing_shader_effect.h index f3a6245c0..b42156a5f 100644 --- a/graphic/graphic_2d/native_drawing/drawing_shader_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_shader_effect.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_SHADER_EFFECT_H -#define C_INCLUDE_DRAWING_SHADER_EFFECT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_SHADER_EFFECT_H +#define C_INCLUDE_DRAWING_SHADER_EFFECT_H + #include "drawing_types.h" #ifdef __cplusplus @@ -94,13 +94,14 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateColorShader(const uint32_t * @param colors Indicates the colors to be distributed between the two points. * @param pos Indicates the relative position of each corresponding color in the colors array. * @param size Indicates the number of colors and pos. - * @param OH_Drawing_TileMode Indicates the tile mode. + * @param tileMode Indicates the tile mode. * @return Returns the pointer to the OH_Drawing_ShaderEffect object created. * @since 11 * @version 1.0 */ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradient(const OH_Drawing_Point* startPt, - const OH_Drawing_Point* endPt, const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode); + const OH_Drawing_Point* endPt, const uint32_t* colors, + const float* pos, uint32_t size, OH_Drawing_TileMode tileMode); /** * @brief Creates an OH_Drawing_ShaderEffect that generates a linear gradient between the two specified points. @@ -112,8 +113,8 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradient(const OH_Dr * @param pos Indicates the relative position of each corresponding color in the colors array. * If pos is nullptr, the colors are evenly distributed between the start and end point. * @param size Indicates the number of colors and pos(if pos is not nullptr). - * @param OH_Drawing_TileMode Indicates the tile mode. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object, + * @param tileMode Indicates the tile mode. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object, which represents the local matrix of the created OH_Drawing_ShaderEffect object. If matrix is nullptr, defaults to the identity matrix. * @return Returns the pointer to the OH_Drawing_ShaderEffect object created. @@ -124,7 +125,7 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradient(const OH_Dr */ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMatrix( const OH_Drawing_Point2D* startPt, const OH_Drawing_Point2D* endPt, const uint32_t* colors, const float* pos, - uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix*); + uint32_t size, OH_Drawing_TileMode tileMode, const OH_Drawing_Matrix* matrix); /** * @brief Creates an OH_Drawing_ShaderEffect that generates a radial gradient given the center and radius. @@ -135,13 +136,13 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMat * @param colors Indicates the colors to be distributed between the two points. * @param pos Indicates the relative position of each corresponding color in the colors array. * @param size Indicates the number of colors and pos. - * @param OH_Drawing_TileMode Indicates the tile mode. + * @param tileMode Indicates the tile mode. * @return Returns the pointer to the OH_Drawing_ShaderEffect object created. * @since 11 * @version 1.0 */ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradient(const OH_Drawing_Point* centerPt, float radius, - const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode); + const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode tileMode); /** * @brief Creates an OH_Drawing_ShaderEffect that generates a radial gradient given the center and radius. @@ -152,8 +153,8 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradient(const OH_Dr * @param colors Indicates the colors to be distributed between the two points. * @param pos Indicates the relative position of each corresponding color in the colors array. * @param size Indicates the number of colors and pos. - * @param OH_Drawing_TileMode Indicates the tile mode. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object, + * @param tileMode Indicates the tile mode. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object, which represents the local matrix of the created OH_Drawing_ShaderEffect object. If matrix is nullptr, defaults to the identity matrix. * @return Returns the pointer to the OH_Drawing_ShaderEffect object created. @@ -164,7 +165,7 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradient(const OH_Dr */ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix( const OH_Drawing_Point2D* centerPt, float radius, const uint32_t* colors, const float* pos, uint32_t size, - OH_Drawing_TileMode, const OH_Drawing_Matrix*); + OH_Drawing_TileMode tileMode, const OH_Drawing_Matrix* matrix); /** * @brief Creates an OH_Drawing_ShaderEffect that generates a sweep gradient given a center. @@ -174,30 +175,31 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMat * @param colors Indicates the colors to be distributed between the two points. * @param pos Indicates the relative position of each corresponding color in the colors array. * @param size Indicates the number of colors and pos. - * @param OH_Drawing_TileMode Indicates the tile mode. + * @param tileMode Indicates the tile mode. * @return Returns the pointer to the OH_Drawing_ShaderEffect object created. * @since 11 * @version 1.0 */ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateSweepGradient(const OH_Drawing_Point* centerPt, - const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode); + const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode tileMode); /** * @brief Creates an OH_Drawing_ShaderEffect that generates a image shader. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object. + * @param image Indicates the pointer to an OH_Drawing_Image object. * @param tileX Indicates the tileX. * @param tileY Indicates the tileY. - * @param OH_Drawing_SamplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param samplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object. * If matrix is nullptr, defaults to the identity matrix. * @return Returns the pointer to the OH_Drawing_ShaderEffect object created. * @since 12 * @version 1.0 */ -OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Image*, - OH_Drawing_TileMode tileX, OH_Drawing_TileMode tileY, const OH_Drawing_SamplingOptions*, const OH_Drawing_Matrix*); +OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Image* image, + OH_Drawing_TileMode tileX, OH_Drawing_TileMode tileY, const OH_Drawing_SamplingOptions* samplingOptions, + const OH_Drawing_Matrix* matrix); /** * @brief Creates an OH_Drawing_ShaderEffect that generates a conical gradient given two circles. @@ -210,8 +212,8 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Ima * @param colors Indicates the colors to be distributed between the two points. * @param pos Indicates the relative position of each corresponding color in the colors array. * @param size Indicates the number of colors and pos. - * @param OH_Drawing_TileMode Indicates the tile mode. - * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object, + * @param tileMode Indicates the tile mode. + * @param matrix Indicates the pointer to an OH_Drawing_Matrix object, which represents the local matrix of the created OH_Drawing_ShaderEffect object. If matrix is nullptr, defaults to the identity matrix. * @return Returns the pointer to the OH_Drawing_ShaderEffect object created. @@ -222,17 +224,17 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Ima */ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(const OH_Drawing_Point2D* startPt, float startRadius, const OH_Drawing_Point2D* endPt, float endRadius, const uint32_t* colors, const float* pos, - uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix*); + uint32_t size, OH_Drawing_TileMode tileMode, const OH_Drawing_Matrix* matrix); /** * @brief Destroys an OH_Drawing_ShaderEffect object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_ShaderEffect Indicates the pointer to an OH_Drawing_ShaderEffect object. + * @param shaderEffect Indicates the pointer to an OH_Drawing_ShaderEffect object. * @since 11 * @version 1.0 */ -void OH_Drawing_ShaderEffectDestroy(OH_Drawing_ShaderEffect*); +void OH_Drawing_ShaderEffectDestroy(OH_Drawing_ShaderEffect* shaderEffect); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_shadow_layer.h b/graphic/graphic_2d/native_drawing/drawing_shadow_layer.h index 6b78e034a..143e72801 100644 --- a/graphic/graphic_2d/native_drawing/drawing_shadow_layer.h +++ b/graphic/graphic_2d/native_drawing/drawing_shadow_layer.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_SHADOW_LAYER_H -#define C_INCLUDE_DRAWING_SHADOW_LAYER_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_SHADOW_LAYER_H +#define C_INCLUDE_DRAWING_SHADOW_LAYER_H + #include "drawing_types.h" #ifdef __cplusplus @@ -64,11 +64,11 @@ OH_Drawing_ShadowLayer* OH_Drawing_ShadowLayerCreate(float blurRadius, float x, * @brief Destroys an OH_Drawing_ShadowLayer object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_ShadowLayer Indicates the pointer to an OH_Drawing_ShadowLayer object. + * @param shadowLayer Indicates the pointer to an OH_Drawing_ShadowLayer object. * @since 12 * @version 1.0 */ -void OH_Drawing_ShadowLayerDestroy(OH_Drawing_ShadowLayer*); +void OH_Drawing_ShadowLayerDestroy(OH_Drawing_ShadowLayer* shadowLayer); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_surface.h b/graphic/graphic_2d/native_drawing/drawing_surface.h index b388ead2a..d8aa609ad 100644 --- a/graphic/graphic_2d/native_drawing/drawing_surface.h +++ b/graphic/graphic_2d/native_drawing/drawing_surface.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_GPU_SURFACE_H -#define C_INCLUDE_DRAWING_GPU_SURFACE_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_GPU_SURFACE_H +#define C_INCLUDE_DRAWING_GPU_SURFACE_H + #include "drawing_types.h" #ifdef __cplusplus @@ -50,37 +50,37 @@ extern "C" { * @brief Creates an OH_Drawing_Surface object on GPU indicated by context. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_GpuContext Indicates the pointer to an OH_Drawing_GpuContext object. - * @param bool Indicates whether an allocation should count against a cache budget. - * @param OH_Drawing_Image_Info Indicates the image info. + * @param gpuContext Indicates the pointer to an OH_Drawing_GpuContext object. + * @param flag Indicates whether an allocation should count against a cache budget. + * @param imageInfo Indicates the image info. * @return Returns the pointer to the OH_Drawing_Surface object created. * @since 12 * @version 1.0 */ OH_Drawing_Surface* OH_Drawing_SurfaceCreateFromGpuContext( - OH_Drawing_GpuContext*, bool, OH_Drawing_Image_Info); + OH_Drawing_GpuContext* gpuContext, bool flag, OH_Drawing_Image_Info imageInfo); /** * @brief Gets the canvas that draws into surface. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Surface Indicates the pointer to an OH_Drawing_Surface object. + * @param surface Indicates the pointer to an OH_Drawing_Surface object. * @return Returns the pointer to the OH_Drawing_Canvas object. The returned pointer does not need to be managed * by the caller. * @since 12 * @version 1.0 */ -OH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface*); +OH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface* surface); /** * @brief Destroys an OH_Drawing_Surface object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Surface Indicates the pointer to an OH_Drawing_Surface object. + * @param surface Indicates the pointer to an OH_Drawing_Surface object. * @since 12 * @version 1.0 */ -void OH_Drawing_SurfaceDestroy(OH_Drawing_Surface*); +void OH_Drawing_SurfaceDestroy(OH_Drawing_Surface* surface); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_text_blob.h b/graphic/graphic_2d/native_drawing/drawing_text_blob.h index b5b11d7af..5a0dbdfd6 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_blob.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_blob.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TEXT_BLOB_H -#define C_INCLUDE_DRAWING_TEXT_BLOB_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_TEXT_BLOB_H +#define C_INCLUDE_DRAWING_TEXT_BLOB_H + #include "drawing_types.h" #ifdef __cplusplus @@ -62,14 +62,14 @@ OH_Drawing_TextBlobBuilder* OH_Drawing_TextBlobBuilderCreate(void); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param text Indicates the the pointer to text. * @param byteLength Indicates the text length. - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. - * @param OH_Drawing_TextEncoding Indicates the pointer to an OH_Drawing_TextEncoding object. + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param textEncoding Indicates the pointer to an OH_Drawing_TextEncoding object. * @return Returns the pointer to the OH_Drawing_TextBlob object created. * @since 12 * @version 1.0 */ OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromText(const void* text, size_t byteLength, - const OH_Drawing_Font*, OH_Drawing_TextEncoding); + const OH_Drawing_Font* font, OH_Drawing_TextEncoding textEncoding); /** * @brief Creates an OH_Drawing_TextBlob object from pos text. @@ -77,51 +77,51 @@ OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromText(const void* text, size_t * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param text Indicates the the pointer to text. * @param byteLength Indicates the text length. - * @param OH_Drawing_Point2D Indicates the pointer to an OH_Drawing_Point2D array object. - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. - * @param OH_Drawing_TextEncoding Indicates the pointer to an OH_Drawing_TextEncoding object. + * @param point2D Indicates the pointer to an OH_Drawing_Point2D array object. + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param textEncoding Indicates the pointer to an OH_Drawing_TextEncoding object. * @return Returns the pointer to the OH_Drawing_TextBlob object created. * @since 12 * @version 1.0 */ OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromPosText(const void* text, size_t byteLength, - OH_Drawing_Point2D*, const OH_Drawing_Font*, OH_Drawing_TextEncoding); + OH_Drawing_Point2D* point2D, const OH_Drawing_Font* font, OH_Drawing_TextEncoding textEncoding); /** * @brief Creates an OH_Drawing_TextBlob object from pos text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param str Indicates the the pointer to text. - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. - * @param OH_Drawing_TextEncoding Indicates the pointer to an OH_Drawing_TextEncoding object. + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param textEncoding Indicates the pointer to an OH_Drawing_TextEncoding object. * @return Returns the pointer to the OH_Drawing_TextBlob object created. * @since 12 * @version 1.0 */ OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromString(const char* str, - const OH_Drawing_Font*, OH_Drawing_TextEncoding); + const OH_Drawing_Font* font, OH_Drawing_TextEncoding textEncoding); /** * @brief Gets the bounds of textblob, assigned to the pointer to an OH_Drawing_Rect object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBlob Indicates the pointer to an OH_Drawing_TextBlob object. - * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object. + * @param textBlob Indicates the pointer to an OH_Drawing_TextBlob object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. * @since 12 * @version 1.0 */ -void OH_Drawing_TextBlobGetBounds(OH_Drawing_TextBlob*, OH_Drawing_Rect*); +void OH_Drawing_TextBlobGetBounds(OH_Drawing_TextBlob* textBlob, OH_Drawing_Rect* rect); /** * @brief Gets a non-zero value unique among all OH_Drawing_TextBlob objects. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBlob Indicates the pointer to an OH_Drawing_TextBlob object. + * @param textBlob Indicates the pointer to an OH_Drawing_TextBlob object. * @return Returns identifier for the OH_Drawing_TextBlob object. * @since 12 * @version 1.0 */ -uint32_t OH_Drawing_TextBlobUniqueID(const OH_Drawing_TextBlob*); +uint32_t OH_Drawing_TextBlobUniqueID(const OH_Drawing_TextBlob* textBlob); /** * @brief Defines a run, supplies storage for glyphs and positions. @@ -145,46 +145,46 @@ typedef struct { * by the caller and is forbidden to be used after OH_Drawing_TextBlobBuilderMake is called. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBlobBuilder Indicates the pointer to an OH_Drawing_TextBlobBuilder object. - * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object. + * @param textBlobBuilder Indicates the pointer to an OH_Drawing_TextBlobBuilder object. + * @param font Indicates the pointer to an OH_Drawing_Font object. * @param count Indicates the number of glyphs. - * @param OH_Drawing_Rect Indicates the optional run bounding box. + * @param rect Indicates the optional run bounding box. * @since 11 * @version 1.0 */ -const OH_Drawing_RunBuffer* OH_Drawing_TextBlobBuilderAllocRunPos(OH_Drawing_TextBlobBuilder*, const OH_Drawing_Font*, - int32_t count, const OH_Drawing_Rect*); +const OH_Drawing_RunBuffer* OH_Drawing_TextBlobBuilderAllocRunPos(OH_Drawing_TextBlobBuilder* textBlobBuilder, + const OH_Drawing_Font* font, int32_t count, const OH_Drawing_Rect* rect); /** * @brief Make an OH_Drawing_TextBlob from OH_Drawing_TextBlobBuilder. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBlobBuilder Indicates the pointer to an OH_Drawing_TextBlobBuilder object. + * @param textBlobBuilder Indicates the pointer to an OH_Drawing_TextBlobBuilder object. * @return Returns the pointer to the OH_Drawing_TextBlob object. * @since 11 * @version 1.0 */ -OH_Drawing_TextBlob* OH_Drawing_TextBlobBuilderMake(OH_Drawing_TextBlobBuilder*); +OH_Drawing_TextBlob* OH_Drawing_TextBlobBuilderMake(OH_Drawing_TextBlobBuilder* textBlobBuilder); /** * @brief Destroys an OH_Drawing_TextBlob object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBlob Indicates the pointer to an OH_Drawing_TextBlob object. + * @param textBlob Indicates the pointer to an OH_Drawing_TextBlob object. * @since 11 * @version 1.0 */ -void OH_Drawing_TextBlobDestroy(OH_Drawing_TextBlob*); +void OH_Drawing_TextBlobDestroy(OH_Drawing_TextBlob* textBlob); /** * @brief Destroys an OH_Drawing_TextBlobBuilder object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBlobBuilder Indicates the pointer to an OH_Drawing_TextBlobBuilder object. + * @param textBlobBuilder Indicates the pointer to an OH_Drawing_TextBlobBuilder object. * @since 11 * @version 1.0 */ -void OH_Drawing_TextBlobBuilderDestroy(OH_Drawing_TextBlobBuilder*); +void OH_Drawing_TextBlobBuilderDestroy(OH_Drawing_TextBlobBuilder* textBlobBuilder); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_typeface.h b/graphic/graphic_2d/native_drawing/drawing_typeface.h index fa3d016e9..0b5e8d965 100644 --- a/graphic/graphic_2d/native_drawing/drawing_typeface.h +++ b/graphic/graphic_2d/native_drawing/drawing_typeface.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TYPEFACE_H -#define C_INCLUDE_DRAWING_TYPEFACE_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_TYPEFACE_H +#define C_INCLUDE_DRAWING_TYPEFACE_H + #include "drawing_error_code.h" #include "drawing_types.h" @@ -112,23 +112,23 @@ OH_Drawing_Typeface* OH_Drawing_TypefaceCreateFromCurrent(const OH_Drawing_Typef * it or free it again. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_MemoryStream Indicates the pointer to an OH_Drawing_MemoryStream object. + * @param memoryStream Indicates the pointer to an OH_Drawing_MemoryStream object. * @param index memory stream index. * @return Returns the pointer to the OH_Drawing_Typeface object created. * @since 12 * @version 1.0 */ -OH_Drawing_Typeface* OH_Drawing_TypefaceCreateFromStream(OH_Drawing_MemoryStream*, int32_t index); +OH_Drawing_Typeface* OH_Drawing_TypefaceCreateFromStream(OH_Drawing_MemoryStream* memoryStream, int32_t index); /** * @brief Destroys an OH_Drawing_Typeface object and reclaims the memory occupied by the object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typeface Indicates the pointer to an OH_Drawing_Typeface object. + * @param typeface Indicates the pointer to an OH_Drawing_Typeface object. * @since 11 * @version 1.0 */ -void OH_Drawing_TypefaceDestroy(OH_Drawing_Typeface*); +void OH_Drawing_TypefaceDestroy(OH_Drawing_Typeface* typeface); /** * @brief Creates an OH_Drawing_FontArguments object. diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index 1a4d8499c..3827d52ea 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TYPES_H -#define C_INCLUDE_DRAWING_TYPES_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_TYPES_H +#define C_INCLUDE_DRAWING_TYPES_H + #include #include #include -- Gitee From 7edc35c7f5ae973d192cebbd25a6c177764703d7 Mon Sep 17 00:00:00 2001 From: Feng Lin Date: Thu, 14 Nov 2024 03:35:30 +0000 Subject: [PATCH 120/630] ad Signed-off-by: Feng Lin --- multimedia/media_foundation/native_averrors.h | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index 1bb0f8062..d14fb900d 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -108,7 +108,7 @@ typedef enum OH_AVErrCode { */ AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION = 301, /** - * @error the address of server is incorrect, and IO can not find host. + * @error can not find host, maybe the address of server is incorrect. * @since 14 */ AV_ERR_IO_CANNOT_FIND_HOST = 5411001, @@ -143,19 +143,19 @@ typedef enum OH_AVErrCode { */ AV_ERR_IO_RESOURCE_NOT_FOUND = 5411007, /** - * @error the server failS to verify the client certificate because the certificate is not carried, + * @error the server failed to verify the client certificate because the certificate is not carried, * the certificate is invalid, or the certificate is expired. * @since 14 */ AV_ERR_IO_SSL_CLIENT_CERT_NEEDED = 5411008, /** - * @error the client fails to verify the server certificate because the certificate is not carried, + * @error the client failed to verify the server certificate because the certificate is not carried, * the certificate is invalid, or the certificate is expired. * @since 14 */ AV_ERR_IO_SSL_CONNECT_FAIL = 5411009, /** - * @error IO SSL server cert untrusted. + * @error SSL server cert untrusted. * @since 14 */ AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED = 5411010, @@ -164,21 +164,6 @@ typedef enum OH_AVErrCode { * @since 14 */ AV_ERR_IO_UNSUPPORTED_REQUEST = 5411011, - /** - * @error file data is incorrect, and no specific data can be provided. - * @since 14 - */ - AV_ERR_IO_DATA_ABNORMAL = 5411012, - /** - * @error audio device error. - * @since 14 - */ - AV_ERR_IO_AUDIO_DEVICE_ERROR = 5411020, - /** - * @error video device error. - * @since 14 - */ - AV_ERR_IO_VIDEO_DEVICE_ERROR = 5411030, } OH_AVErrCode; #ifdef __cplusplus -- Gitee From 793a3dcc973dbf813b497bbed17c430deef9f7d3 Mon Sep 17 00:00:00 2001 From: lwx1281857 Date: Thu, 14 Nov 2024 14:53:07 +0800 Subject: [PATCH 121/630] Description:Code optimization Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: lwx1281857 --- startup/init/syscap/include/deviceinfo.h | 8 ++++---- startup/init/syscap/include/syscap_ndk.h | 10 +++++----- startup/init/syscap/init_sync.h | 11 ++++++----- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/startup/init/syscap/include/deviceinfo.h b/startup/init/syscap/include/deviceinfo.h index 0725cd540..05f1bbd2b 100644 --- a/startup/init/syscap/include/deviceinfo.h +++ b/startup/init/syscap/include/deviceinfo.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef DEVICEINFO_CSDK_H -#define DEVICEINFO_CSDK_H - /** * @addtogroup DeviceInfo * @{ @@ -34,6 +31,9 @@ * @since 10 */ +#ifndef DEVICEINFO_CSDK_H +#define DEVICEINFO_CSDK_H + #ifdef __cplusplus #if __cplusplus extern "C" { @@ -245,5 +245,5 @@ const char *OH_GetDistributionOSReleaseType(void); } #endif #endif -/** @} */ #endif +/** @} */ diff --git a/startup/init/syscap/include/syscap_ndk.h b/startup/init/syscap/include/syscap_ndk.h index d821c3a35..590e70eab 100644 --- a/startup/init/syscap/include/syscap_ndk.h +++ b/startup/init/syscap/include/syscap_ndk.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef SYSCAP_NDK_H -#define SYSCAP_NDK_H - /** * @addtogroup SyscapNdk * @{ @@ -29,11 +26,14 @@ * @file deviceinfo.h * @kit BasicServicesKit * @brief Declares APIs for acquiring the set of system capabilities . - * @library na + * @library NA * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ +#ifndef SYSCAP_NDK_H +#define SYSCAP_NDK_H + #include #ifdef __cplusplus @@ -49,5 +49,5 @@ bool canIUse(const char *cap); } #endif #endif +#endif /** @} */ -#endif \ No newline at end of file diff --git a/startup/init/syscap/init_sync.h b/startup/init/syscap/init_sync.h index ca4836b27..4ddd56808 100644 --- a/startup/init/syscap/init_sync.h +++ b/startup/init/syscap/init_sync.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef BASE_STARTUP_INITLITE_NOTIFY_H -#define BASE_STARTUP_INITLITE_NOTIFY_H - /** * @addtogroup InitSync * @{ @@ -29,11 +26,14 @@ * @file init_sync.h * @kit BasicServicesKit * @brief Declares APIs for notifying events to the Init process. - * @library na + * @library NA * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ +#ifndef BASE_STARTUP_INITLITE_NOTIFY_H +#define BASE_STARTUP_INITLITE_NOTIFY_H + #ifdef __cplusplus #if __cplusplus extern "C" { @@ -63,5 +63,6 @@ extern int NotifyInit(unsigned long event); } #endif #endif -/** @} */ + #endif // BASE_STARTUP_INITLITE_NOTIFY_H +/** @} */ -- Gitee From 322bbf0fde077d29a58225c0df6e0d168f02fb18 Mon Sep 17 00:00:00 2001 From: sqwlly Date: Thu, 14 Nov 2024 07:08:09 +0000 Subject: [PATCH 122/630] add new interface sdk c Signed-off-by: s30029175 Signed-off-by: sqwlly Change-Id: Ifaaa642c8c002ad6f3e0ab6f9191decce3bd7144 --- .../native_image/libnative_image.ndk.json | 1 + graphic/graphic_2d/native_image/native_image.h | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/graphic/graphic_2d/native_image/libnative_image.ndk.json b/graphic/graphic_2d/native_image/libnative_image.ndk.json index 1a8c6688d..02e835ae7 100644 --- a/graphic/graphic_2d/native_image/libnative_image.ndk.json +++ b/graphic/graphic_2d/native_image/libnative_image.ndk.json @@ -11,6 +11,7 @@ { "name": "OH_NativeImage_UnsetOnFrameAvailableListener" }, { "name": "OH_NativeImage_Destroy" }, { "name": "OH_NativeImage_GetTransformMatrixV2" }, + { "name": "OH_NativeImage_GetBufferMatrix" }, { "first_introduced": "12", "name": "OH_NativeImage_AcquireNativeWindowBuffer" diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index 25d335441..ae394d97e 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -239,6 +239,19 @@ void OH_NativeImage_Destroy(OH_NativeImage** image); */ int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[16]); +/** + * @brief Return the crop and transform matrix of the texture image set by the most recent call to \n + * OH_NativeImage_UpdateSurfaceImage. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeImage + * @param image Indicates the pointer to a OH_NativeImage instance. + * @param matrix Indicates the retrieved 4*4 transform matrix . + * @return Returns an error code, 0 is success, otherwise, failed. + * @since 14 + * @version 1.0 + */ +int32_t OH_NativeImage_GetBufferMatrix(OH_NativeImage* image, float matrix[16]); + /** * @brief Acquire an OHNativeWindowBuffer through an OH_NativeImage instance for content consumer.\n * This method can not be used at the same time with OH_NativeImage_UpdateSurfaceImage.\n -- Gitee From 09011c6fc99fb2f85ebadaa457424f1639827124 Mon Sep 17 00:00:00 2001 From: sqwlly Date: Thu, 14 Nov 2024 07:42:56 +0000 Subject: [PATCH 123/630] add new interface sdk c Signed-off-by: s30029175 Signed-off-by: sqwlly Change-Id: I39c3c1b42617703c73f053f53cef8b2f5b399c96 --- .../graphic_2d/native_image/native_image.h | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index ae394d97e..4d604e8be 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -240,15 +240,27 @@ void OH_NativeImage_Destroy(OH_NativeImage** image); int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[16]); /** - * @brief Return the crop and transform matrix of the texture image set by the most recent call to \n + * @brief Obtains both the cropping information and transform matrix of the texture image. + * + * This API is an enhanced version of OH_NativeImage_GetTransformMatrix. In addition to the transform matrix, + * it also returns the cropping information of the texture image that was set in the most recent call to * OH_NativeImage_UpdateSurfaceImage. * + * The transform matrix is a 4x4 matrix that combines both the geometric transformation and texture + * coordinates transformation. The first 12 elements represent the geometric transformation (rotation, + * scaling, translation), and the last 4 elements contain texture coordinate mapping information. + * * @syscap SystemCapability.Graphic.Graphic2D.NativeImage - * @param image Indicates the pointer to a OH_NativeImage instance. - * @param matrix Indicates the retrieved 4*4 transform matrix . - * @return Returns an error code, 0 is success, otherwise, failed. + * @param image Pointer to an OH_NativeImage instance. + * @param matrix A float array of size 16 to store the retrieved 4x4 transform matrix. The matrix includes + * both geometric transformation and texture coordinates transformation. + * @return Returns 0 if successful, otherwise returns a negative error code: + * - Returns -1 if any parameter is invalid + * - Returns -2 if the image has not been updated with OH_NativeImage_UpdateSurfaceImage * @since 14 * @version 1.0 + * @see OH_NativeImage_UpdateSurfaceImage + * @see OH_NativeImage_GetTransformMatrix */ int32_t OH_NativeImage_GetBufferMatrix(OH_NativeImage* image, float matrix[16]); -- Gitee From 49ebf6a4892c253e9c08dc1a5ea3def20316ac3d Mon Sep 17 00:00:00 2001 From: lihui Date: Tue, 12 Nov 2024 12:01:55 +0800 Subject: [PATCH 124/630] api lint alarm fix Signed-off-by: lihui --- graphic/graphic_2d/native_buffer/buffer_common.h | 6 +++--- graphic/graphic_2d/native_buffer/native_buffer.h | 6 +++--- graphic/graphic_2d/native_image/native_image.h | 6 +++--- graphic/graphic_2d/native_vsync/native_vsync.h | 7 ++++--- graphic/graphic_2d/native_window/buffer_handle.h | 7 ++++--- graphic/graphic_2d/native_window/external_window.h | 6 +++--- graphic/graphic_2d/native_window/graphic_error_code.h | 6 +++--- 7 files changed, 23 insertions(+), 21 deletions(-) diff --git a/graphic/graphic_2d/native_buffer/buffer_common.h b/graphic/graphic_2d/native_buffer/buffer_common.h index d67646240..20b22fd87 100644 --- a/graphic/graphic_2d/native_buffer/buffer_common.h +++ b/graphic/graphic_2d/native_buffer/buffer_common.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NDK_INCLUDE_BUFFER_COMMON_H_ -#define NDK_INCLUDE_BUFFER_COMMON_H_ - /** * @addtogroup OH_NativeBuffer * @{ @@ -39,6 +36,9 @@ * @version 1.0 */ +#ifndef NDK_INCLUDE_BUFFER_COMMON_H_ +#define NDK_INCLUDE_BUFFER_COMMON_H_ + #ifdef __cplusplus extern "C" { #endif diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h index 154df76d3..2ca2fc617 100644 --- a/graphic/graphic_2d/native_buffer/native_buffer.h +++ b/graphic/graphic_2d/native_buffer/native_buffer.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NDK_INCLUDE_NATIVE_BUFFER_H_ -#define NDK_INCLUDE_NATIVE_BUFFER_H_ - /** * @addtogroup OH_NativeBuffer * @{ @@ -39,6 +36,9 @@ * @version 1.0 */ +#ifndef NDK_INCLUDE_NATIVE_BUFFER_H_ +#define NDK_INCLUDE_NATIVE_BUFFER_H_ + #include #include #include diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index 25d335441..38702c9e1 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NDK_INCLUDE_NATIVE_IMAGE_H_ -#define NDK_INCLUDE_NATIVE_IMAGE_H_ - /** * @addtogroup OH_NativeImage * @{ @@ -39,6 +36,9 @@ * @version 1.0 */ +#ifndef NDK_INCLUDE_NATIVE_IMAGE_H_ +#define NDK_INCLUDE_NATIVE_IMAGE_H_ + #include #ifdef __cplusplus diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 791fbfd36..5e57713bf 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NDK_INCLUDE_NATIVE_VSYNC_H_ -#define NDK_INCLUDE_NATIVE_VSYNC_H_ - /** * @addtogroup NativeVsync * @{ @@ -39,6 +36,9 @@ * @version 1.0 */ +#ifndef NDK_INCLUDE_NATIVE_VSYNC_H_ +#define NDK_INCLUDE_NATIVE_VSYNC_H_ + #ifdef __cplusplus extern "C" { #endif @@ -144,4 +144,5 @@ int OH_NativeVSync_DVSyncSwitch(OH_NativeVSync* nativeVsync, bool enable); } #endif +/** @} */ #endif \ No newline at end of file diff --git a/graphic/graphic_2d/native_window/buffer_handle.h b/graphic/graphic_2d/native_window/buffer_handle.h index a5e3a13cf..441af5e75 100644 --- a/graphic/graphic_2d/native_window/buffer_handle.h +++ b/graphic/graphic_2d/native_window/buffer_handle.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef INCLUDE_BUFFER_HANDLE_H -#define INCLUDE_BUFFER_HANDLE_H - /** * @addtogroup NativeWindow * @{ @@ -39,6 +36,9 @@ * @version 1.0 */ +#ifndef INCLUDE_BUFFER_HANDLE_H +#define INCLUDE_BUFFER_HANDLE_H + #include #ifdef __cplusplus @@ -65,4 +65,5 @@ typedef struct { } #endif +/** @} */ #endif // INCLUDE_BUFFER_HANDLE_H diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 47a407ff0..54ae4efe5 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NDK_INCLUDE_EXTERNAL_NATIVE_WINDOW_H_ -#define NDK_INCLUDE_EXTERNAL_NATIVE_WINDOW_H_ - /** * @addtogroup NativeWindow * @{ @@ -39,6 +36,9 @@ * @version 1.0 */ +#ifndef NDK_INCLUDE_EXTERNAL_NATIVE_WINDOW_H_ +#define NDK_INCLUDE_EXTERNAL_NATIVE_WINDOW_H_ + #include #include "buffer_handle.h" #include "../native_buffer/buffer_common.h" diff --git a/graphic/graphic_2d/native_window/graphic_error_code.h b/graphic/graphic_2d/native_window/graphic_error_code.h index 1b5e9deb0..1c16d7b95 100644 --- a/graphic/graphic_2d/native_window/graphic_error_code.h +++ b/graphic/graphic_2d/native_window/graphic_error_code.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef INCLUDE_GRAPHIC_ERROR_CODE_H -#define INCLUDE_GRAPHIC_ERROR_CODE_H - /** * @addtogroup NativeWindow * @{ @@ -39,6 +36,9 @@ * @version 1.0 */ +#ifndef INCLUDE_GRAPHIC_ERROR_CODE_H +#define INCLUDE_GRAPHIC_ERROR_CODE_H + #include #ifdef __cplusplus -- Gitee From 04616bdf3ba3451fffbc320d4688ee911d736438 Mon Sep 17 00:00:00 2001 From: liuchungang Date: Thu, 14 Nov 2024 17:18:15 +0800 Subject: [PATCH 125/630] fix addtogroup and file tag Signed-off-by: liuchungang --- resourceschedule/qos_manager/c/qos.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resourceschedule/qos_manager/c/qos.h b/resourceschedule/qos_manager/c/qos.h index e7bd4183a..8cc30a051 100644 --- a/resourceschedule/qos_manager/c/qos.h +++ b/resourceschedule/qos_manager/c/qos.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef QOS_H -#define QOS_H /** * @addtogroup QoS * @{ @@ -39,6 +37,10 @@ * @syscap SystemCapability.Resourceschedule.QoS.Core * @since 12 */ + +#ifndef QOS_H +#define QOS_H + #ifdef __cplusplus extern "C" { #endif @@ -115,4 +117,5 @@ int OH_QoS_GetThreadQoS(QoS_Level *level); #ifdef __cplusplus }; #endif -#endif //QOS_H +#endif // QOS_H +/** @} */ -- Gitee From aa1df25dab292cecf957d7e3921ee08bcbca5c2a Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 14 Nov 2024 12:08:09 +0000 Subject: [PATCH 126/630] =?UTF-8?q?=E5=8A=A0=E4=B8=8A@error=E6=A0=87?= =?UTF-8?q?=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- .../external_device_manager/hid/hid_ddk_types.h | 14 +++++++------- .../external_device_manager/usb/usb_ddk_types.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/external_device_manager/hid/hid_ddk_types.h b/drivers/external_device_manager/hid/hid_ddk_types.h index 2bd632dc2..01dfc5d9b 100644 --- a/drivers/external_device_manager/hid/hid_ddk_types.h +++ b/drivers/external_device_manager/hid/hid_ddk_types.h @@ -589,19 +589,19 @@ typedef struct Hid_EventProperties { * @version 1.0 */ typedef enum { - /** Operation successful */ + /** @error Operation successful */ HID_DDK_SUCCESS = 0, - /** Permission denied */ + /** @error Permission denied */ HID_DDK_NO_PERM = 201, - /** Invalid parameter */ + /** @error Invalid parameter */ HID_DDK_INVALID_PARAMETER = 401, - /** Operation failed */ + /** @error Operation failed */ HID_DDK_FAILURE = 27300001, - /** Null pointer exception */ + /** @error Null pointer exception */ HID_DDK_NULL_PTR = 27300002, - /** Invalid operation */ + /** @error Invalid operation */ HID_DDK_INVALID_OPERATION = 27300003, - /** Timeout */ + /** @error Timeout */ HID_DDK_TIMEOUT = 27300004, } Hid_DdkErrCode; #ifdef __cplusplus diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 808d834f1..ef63f7458 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -296,20 +296,20 @@ typedef struct UsbDeviceMemMap { * @version 1.0 */ typedef enum { - /** The operation is successful. */ + /** @error The operation is successful. */ USB_DDK_SUCCESS = 0, - /** Permission denied. */ + /** @error Permission denied. */ USB_DDK_NO_PERM = 201, - /** Invalid parameter. */ + /** @error Invalid parameter. */ USB_DDK_INVALID_PARAMETER = 401, - /** Memory-related error, for example, insufficient memory, memory data copy failure, or memory application failure. + /** @error Memory-related error, for example, insufficient memory, memory data copy failure, or memory application failure. */ USB_DDK_MEMORY_ERROR = 27400001, - /** Invalid operation. */ + /** @error Invalid operation. */ USB_DDK_INVALID_OPERATION = 27400002, - /** I/O error */ + /** @error I/O error */ USB_DDK_IO_FAILED = 27400003, - /** Transmission timeout. */ + /** @error Transmission timeout. */ USB_DDK_TIMEOUT = 27400004, } UsbDdkErrCode; #ifdef __cplusplus -- Gitee From 432dd37775a74b073937e3f47104b04400b0c8de Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 14 Nov 2024 12:10:21 +0000 Subject: [PATCH 127/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/usb/usb_ddk_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index ef63f7458..6e66eca30 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -302,7 +302,8 @@ typedef enum { USB_DDK_NO_PERM = 201, /** @error Invalid parameter. */ USB_DDK_INVALID_PARAMETER = 401, - /** @error Memory-related error, for example, insufficient memory, memory data copy failure, or memory application failure. + /** @error Memory-related error, for example, insufficient memory, memory data copy failure,\n + * or memory application failure. */ USB_DDK_MEMORY_ERROR = 27400001, /** @error Invalid operation. */ -- Gitee From b687b016f1056284308528b566468724f45bf009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E9=82=B5=E5=AE=89?= Date: Wed, 13 Nov 2024 16:40:50 +0800 Subject: [PATCH 128/630] add ndk interface BlurWithTileMode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 肖邵安 --- .../graphic_2d/native_effect/effect_filter.h | 14 ++++++++++++++ .../graphic_2d/native_effect/effect_types.h | 18 ++++++++++++++++++ .../native_effect/libnative_effect.ndk.json | 1 + 3 files changed, 33 insertions(+) diff --git a/graphic/graphic_2d/native_effect/effect_filter.h b/graphic/graphic_2d/native_effect/effect_filter.h index f743d587e..42ea52a71 100644 --- a/graphic/graphic_2d/native_effect/effect_filter.h +++ b/graphic/graphic_2d/native_effect/effect_filter.h @@ -77,6 +77,20 @@ EffectErrorCode OH_Filter_Release(OH_Filter* filter); */ EffectErrorCode OH_Filter_Blur(OH_Filter* filter, float radius); +/** + * @brief Creates a blur effect and then add to the filter. + * + * @syscap SystemCapability.Multimedia.Image.Core + * @param filter The OH_Filter pointer will be operated. + * @param radius The radius of the blur effect. + * @param tileMode The tileMode of the blur effect. + * @return BlurWithTileMode result code. + * {@link EFFECT_SUCCESS} if the operation is successful. + * {@link EFFECT_BAD_PARAMETER} if parameter is invalid. + * @since 14 + */ +EffectErrorCode OH_Filter_BlurWithTileMode(OH_Filter* filter, float radius, EffectTileMode tileMode); + /** * @brief Creates a brighten effect and then add to the filter. * diff --git a/graphic/graphic_2d/native_effect/effect_types.h b/graphic/graphic_2d/native_effect/effect_types.h index 3d40a63fb..6e6bf8d5f 100644 --- a/graphic/graphic_2d/native_effect/effect_types.h +++ b/graphic/graphic_2d/native_effect/effect_types.h @@ -88,6 +88,24 @@ typedef enum { EFFECT_UNKNOWN_ERROR = 7600901, } EffectErrorCode; +/** + * @brief Defines a effect filter tile mode. + * + * @since 14 + */ +typedef enum { + /** Replicate the edge color if the shader draws outside of its original bounds */ + CLAMP = 0, + /** Repeat the shader's image horizontally and vertically */ + REPEAT, + /** Repeat the shader's image horizontally and vertically, + * alternating mirror images so that adjacent images always seam + */ + MIRROR, + /** Only draw within the original domain, return transparent-black everywhere else */ + DECAL, +} EffectTileMode; + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_effect/libnative_effect.ndk.json b/graphic/graphic_2d/native_effect/libnative_effect.ndk.json index 83a34f0a7..c97ec522d 100644 --- a/graphic/graphic_2d/native_effect/libnative_effect.ndk.json +++ b/graphic/graphic_2d/native_effect/libnative_effect.ndk.json @@ -2,6 +2,7 @@ { "name": "OH_Filter_CreateEffect" }, { "name": "OH_Filter_Release" }, { "name": "OH_Filter_Blur" }, + { "name": "OH_Filter_BlurWithTileMode" }, { "name": "OH_Filter_Brighten" }, { "name": "OH_Filter_GrayScale" }, { "name": "OH_Filter_Invert" }, -- Gitee From a09089567585055bcc3228a4842b434d221cd3f2 Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 14 Nov 2024 12:12:19 +0000 Subject: [PATCH 129/630] =?UTF-8?q?=E6=A0=87=E7=82=B9=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/usb/usb_ddk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 6e66eca30..0b582335e 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -308,7 +308,7 @@ typedef enum { USB_DDK_MEMORY_ERROR = 27400001, /** @error Invalid operation. */ USB_DDK_INVALID_OPERATION = 27400002, - /** @error I/O error */ + /** @error I/O error. */ USB_DDK_IO_FAILED = 27400003, /** @error Transmission timeout. */ USB_DDK_TIMEOUT = 27400004, -- Gitee From de1ba1dccea8223e5484d7ff81661bbe6141d4d5 Mon Sep 17 00:00:00 2001 From: lihui Date: Fri, 15 Nov 2024 10:18:43 +0800 Subject: [PATCH 130/630] api lint fix 1115 Signed-off-by: lihui --- graphic/graphic_2d/native_vsync/native_vsync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index bb77a0108..fbb7432de 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -64,7 +64,7 @@ OH_NativeVSync* OH_NativeVSync_Create(const char* name, unsigned int length); * @brief Delete the NativeVsync instance. * * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync - * @param window Indicates the pointer to a NativeVsync instance. + * @param nativeVsync Indicates the pointer to a NativeVsync instance. * @since 9 * @version 1.0 */ -- Gitee From c3f14a5af623274273611fd4950f4f46cf3132aa Mon Sep 17 00:00:00 2001 From: wangdongqi Date: Fri, 15 Nov 2024 10:58:55 +0800 Subject: [PATCH 131/630] Signed-off-by: wangdongqi Changes to be committed: --- inputmethod/include/inputmethod_text_avoid_info_capi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputmethod/include/inputmethod_text_avoid_info_capi.h b/inputmethod/include/inputmethod_text_avoid_info_capi.h index a22590f6a..407197a67 100644 --- a/inputmethod/include/inputmethod_text_avoid_info_capi.h +++ b/inputmethod/include/inputmethod_text_avoid_info_capi.h @@ -61,7 +61,7 @@ InputMethod_TextAvoidInfo *OH_TextAvoidInfo_Create(double positionY, double heig /** * @brief Destroy a {@link InputMethod_TextAvoidInfo} instance. * - * @param options Represents a pointer to an {@link InputMethod_TextAvoidInfo} instance which will be destroyed. + * @param info Represents a pointer to an {@link InputMethod_TextAvoidInfo} instance which will be destroyed. * @since 12 */ void OH_TextAvoidInfo_Destroy(InputMethod_TextAvoidInfo *info); -- Gitee From 8e91bf66708020a4597a83275a745590d801183b Mon Sep 17 00:00:00 2001 From: hhl Date: Fri, 15 Nov 2024 11:05:09 +0800 Subject: [PATCH 132/630] fix issues Signed-off-by: hhl --- hiviewdfx/hicollie/include/hicollie/hicollie.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hiviewdfx/hicollie/include/hicollie/hicollie.h b/hiviewdfx/hicollie/include/hicollie/hicollie.h index de146b7fe..8ad4bddcf 100644 --- a/hiviewdfx/hicollie/include/hicollie/hicollie.h +++ b/hiviewdfx/hicollie/include/hicollie/hicollie.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HICOLLIE_H -#define HIVIEWDFX_HICOLLIE_H - /** * @addtogroup HiCollie * @{ @@ -41,6 +38,9 @@ * @since 12 */ +#ifndef HIVIEWDFX_HICOLLIE_H +#define HIVIEWDFX_HICOLLIE_H + #include #include -- Gitee From 4dca656b6a7334b99d1e498532ada8e75b61740a Mon Sep 17 00:00:00 2001 From: liuzerun Date: Fri, 15 Nov 2024 03:07:26 +0000 Subject: [PATCH 133/630] =?UTF-8?q?API=20=E8=A7=84=E8=8C=83=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuzerun --- filemanagement/environment/include/oh_environment.h | 5 +++-- filemanagement/fileio/include/error_code.h | 6 +++--- filemanagement/fileio/include/oh_fileio.h | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/filemanagement/environment/include/oh_environment.h b/filemanagement/environment/include/oh_environment.h index 92bbebde7..71d1e8495 100644 --- a/filemanagement/environment/include/oh_environment.h +++ b/filemanagement/environment/include/oh_environment.h @@ -12,8 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef FILE_MANAGEMENT_ENVIRONMENT_OH_ENVIRONMENT_H -#define FILE_MANAGEMENT_ENVIRONMENT_OH_ENVIRONMENT_H /** * @addtogroup Environment @@ -33,6 +31,9 @@ * @since 12 */ +#ifndef FILE_MANAGEMENT_ENVIRONMENT_OH_ENVIRONMENT_H +#define FILE_MANAGEMENT_ENVIRONMENT_OH_ENVIRONMENT_H + #include "error_code.h" #ifdef __cplusplus diff --git a/filemanagement/fileio/include/error_code.h b/filemanagement/fileio/include/error_code.h index 27944b431..2fb9847fe 100644 --- a/filemanagement/fileio/include/error_code.h +++ b/filemanagement/fileio/include/error_code.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef FILE_MANAGEMENT_FILEIO_ERROR_CODE_H -#define FILE_MANAGEMENT_FILEIO_ERROR_CODE_H - /** * @addtogroup FileIO * @{ @@ -33,6 +30,9 @@ * @since 12 */ +#ifndef FILE_MANAGEMENT_FILEIO_ERROR_CODE_H +#define FILE_MANAGEMENT_FILEIO_ERROR_CODE_H + #ifdef __cplusplus extern "C" { #endif diff --git a/filemanagement/fileio/include/oh_fileio.h b/filemanagement/fileio/include/oh_fileio.h index 845b9c0f9..5fa1677da 100644 --- a/filemanagement/fileio/include/oh_fileio.h +++ b/filemanagement/fileio/include/oh_fileio.h @@ -12,8 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef FILE_MANAGEMENT_FILEIO_OH_FILEIO_H -#define FILE_MANAGEMENT_FILEIO_OH_FILEIO_H /** * @addtogroup FileIO @@ -32,6 +30,9 @@ * @since 12 */ +#ifndef FILE_MANAGEMENT_FILEIO_OH_FILEIO_H +#define FILE_MANAGEMENT_FILEIO_OH_FILEIO_H + #include "error_code.h" #ifdef __cplusplus -- Gitee From 512508aec458e6fe30f88b5fae2d012a4560a233 Mon Sep 17 00:00:00 2001 From: s00659936 <282229496@qq.com> Date: Sat, 9 Nov 2024 10:58:20 +0800 Subject: [PATCH 134/630] add addtogroup Signed-off-by: s00659936 <282229496@qq.com> Change-Id: If723cfaaa9240e53d954a1e8de3e69f126526a2e --- telephony/cellular_data/include/telephony_data.h | 14 ++++++++++++-- telephony/core_service/include/telephony_radio.h | 14 ++++++++++++-- .../core_service/include/telephony_radio_type.h | 14 ++++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/telephony/cellular_data/include/telephony_data.h b/telephony/cellular_data/include/telephony_data.h index 801f8e819..502beb9e3 100755 --- a/telephony/cellular_data/include/telephony_data.h +++ b/telephony/cellular_data/include/telephony_data.h @@ -13,8 +13,14 @@ * limitations under the License. */ -#ifndef NATIVE_TELEPHONY_DATA_API_H -#define NATIVE_TELEPHONY_DATA_API_H +/** + * @addtogroup Telephony + * @{ + * + * @brief Provides C interface for the telephony cellular data. + * + * @since 13 + */ /** * @file telephony_data.h @@ -27,6 +33,9 @@ * @since 13 */ +#ifndef NATIVE_TELEPHONY_DATA_API_H +#define NATIVE_TELEPHONY_DATA_API_H + #include #ifdef __cplusplus @@ -47,3 +56,4 @@ int32_t OH_Telephony_GetDefaultCellularDataSlotId(void); #endif #endif // NATIVE_TELEPHONY_DATA_API_H +/** @} */ diff --git a/telephony/core_service/include/telephony_radio.h b/telephony/core_service/include/telephony_radio.h index 26746d4be..11d6a809b 100755 --- a/telephony/core_service/include/telephony_radio.h +++ b/telephony/core_service/include/telephony_radio.h @@ -13,8 +13,14 @@ * limitations under the License. */ -#ifndef NATIVE_TELEPHONY_RADIO_API_H -#define NATIVE_TELEPHONY_RADIO_API_H +/** + * @addtogroup Telephony + * @{ + * + * @brief Provides C interface for the telephony radio. + * + * @since 13 + */ /** * @file telephony_radio.h @@ -27,6 +33,9 @@ * @since 13 */ +#ifndef NATIVE_TELEPHONY_RADIO_API_H +#define NATIVE_TELEPHONY_RADIO_API_H + #include "telephony_radio_type.h" #include "stdint.h" @@ -72,3 +81,4 @@ Telephony_RadioResult OH_Telephony_GetNetworkStateForSlot(int32_t slotId, Teleph #endif #endif // NATIVE_TELEPHONY_RADIO_API_H +/** @} */ diff --git a/telephony/core_service/include/telephony_radio_type.h b/telephony/core_service/include/telephony_radio_type.h index 15877c912..72dc1aa81 100755 --- a/telephony/core_service/include/telephony_radio_type.h +++ b/telephony/core_service/include/telephony_radio_type.h @@ -13,8 +13,14 @@ * limitations under the License. */ -#ifndef NATIVE_TELEPHONY_RADIO_TYPE_H -#define NATIVE_TELEPHONY_RADIO_TYPE_H +/** + * @addtogroup Telephony + * @{ + * + * @brief Provides the data structures for the C APIs of the the telephony radio. + * + * @since 13 + */ /** * @file telephony_radio_type.h @@ -27,6 +33,9 @@ * @since 13 */ +#ifndef NATIVE_TELEPHONY_RADIO_TYPE_H +#define NATIVE_TELEPHONY_RADIO_TYPE_H + #ifdef __cplusplus extern "C" { #endif @@ -155,3 +164,4 @@ typedef struct { #endif #endif // NATIVE_TELEPHONY_RADIO_TYPE_H +/** @} */ -- Gitee From e2ffb7b5530197f95183f7c8734d05441eb30159 Mon Sep 17 00:00:00 2001 From: cuile4 Date: Fri, 15 Nov 2024 15:35:52 +0800 Subject: [PATCH 135/630] Add float vector support for db. Signed-off-by: cuile4 --- .../pasteboard/include/oh_pasteboard.h | 28 ++++++++--------- .../include/oh_pasteboard_err_code.h | 16 ++++------ .../relational_store/include/oh_cursor.h | 22 +++++++++++++- .../include/oh_value_object.h | 12 ++++++++ .../include/oh_values_bucket.h | 13 ++++++++ .../include/relational_store.h | 30 +++++++++++++++++++ 6 files changed, 96 insertions(+), 25 deletions(-) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 254e346ce..15d489623 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -101,8 +101,8 @@ OH_PasteboardObserver* OH_PasteboardObserver_Create(); * * @param observer Pointer to the {@link OH_PasteboardObserver} instance to destroy. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. - * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link ERR_OK} if the operation is successful. + * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_PasteboardObserver PASTEBOARD_ErrCode. * @since 13 */ @@ -117,8 +117,8 @@ int OH_PasteboardObserver_Destroy(OH_PasteboardObserver* observer); * @param finalize Optional callback that can free context when destroy observer. * For details, see {@link Pasteboard_Finalize}. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. - * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link ERR_OK} if the operation is successful. + * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_PasteboardObserver Pasteboard_Notify PASTEBOARD_ErrCode. * @since 13 */ @@ -159,8 +159,8 @@ void OH_Pasteboard_Destroy(OH_Pasteboard* pasteboard); * @param observer - Pointer to the observer information, which specifies the callback used to * reporting the pasteboard data change. For details, see {@link OH_PasteboardObserver}. * @return Returns the status code of the execution. For details, {@link PASTEBOARD_ErrCode}. - * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. - * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link ERR_OK} if the operation is successful. + * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard OH_PasteboardObserver PASTEBOARD_ErrCode. * @since 13 */ @@ -174,8 +174,8 @@ int OH_Pasteboard_Subscribe(OH_Pasteboard* pasteboard, int type, const OH_Pasteb * @param observer - Pointer to the observer information, which specifies the callback used to * reporting the pasteboard data change. For details, see {@link OH_PasteboardObserver}. * @return Returns the status code of the execution. For details, {@link PASTEBOARD_ErrCode}. - * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. - * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link ERR_OK} if the operation is successful. + * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard OH_PasteboardObserver PASTEBOARD_ErrCode. * @since 13 */ @@ -200,8 +200,8 @@ bool OH_Pasteboard_IsRemoteData(OH_Pasteboard* pasteboard); * @param source Pointer to the source data. * @param len Length of the source data. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. - * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link ERR_OK} if the operation is successful. + * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard PASTEBOARD_ErrCode. * @since 13 */ @@ -249,8 +249,8 @@ OH_UdmfData* OH_Pasteboard_GetData(OH_Pasteboard* pasteboard, int* status); * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. * @param data Pointer to the {@link OH_UdmfData} instance. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. - * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link ERR_OK} if the operation is successful. + * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard OH_UdmfData PASTEBOARD_ErrCode. * @since 13 */ @@ -261,8 +261,8 @@ int OH_Pasteboard_SetData(OH_Pasteboard* pasteboard, OH_UdmfData* data); * * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. * @return Returns the status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. - * Returns {@link PASTEBOARD_ERR_OK} if the operation is successful. - * Returns {@link PASTEBOARD_ERR_INVALID_PARAMETER} if invalid args are detected. + * Returns {@link ERR_OK} if the operation is successful. + * Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected. * @see OH_Pasteboard PASTEBOARD_ErrCode. * @since 13 */ diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h index 5957cfbb0..36f30f1a9 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h @@ -40,8 +40,6 @@ #ifndef OH_PASTEBOARD_ERR_CODE_H #define OH_PASTEBOARD_ERR_CODE_H -#include - #ifdef __cplusplus extern "C" { #endif @@ -55,29 +53,27 @@ typedef enum PASTEBOARD_ErrCode { /** * @error The operation is successful. */ - PASTEBOARD_ERR_OK = ERR_OK, + ERR_OK = 0, /** * @error Permission verification failed. */ - PASTEBOARD_ERR_PERMISSION_ERROR = 201, + ERR_PERMISSION_ERROR = 201, /** * @error Invalid parameter is detected. */ - PASTEBOARD_ERR_INVALID_PARAMETER = 401, + ERR_INVALID_PARAMETER = 401, /** * @error The capability is not supported. */ - PASTEBOARD_ERR_DEVICE_NOT_SUPPORTED = 801, + ERR_DEVICE_NOT_SUPPORTED = 801, /** * @error Inner error. */ - PASTEBOARD_ERR_INNER_ERROR = 12900000, - ERR_INNER_ERROR = PASTEBOARD_ERR_INNER_ERROR, + ERR_INNER_ERROR = 12900000, /** * @error Another copy is in progress. */ - PASTEBOARD_ERR_BUSY = 12900003, - ERR_BUSY = PASTEBOARD_ERR_BUSY, + ERR_BUSY = 12900003, } PASTEBOARD_ErrCode; #ifdef __cplusplus }; diff --git a/distributeddatamgr/relational_store/include/oh_cursor.h b/distributeddatamgr/relational_store/include/oh_cursor.h index 30d208ab4..1c75c71bb 100644 --- a/distributeddatamgr/relational_store/include/oh_cursor.h +++ b/distributeddatamgr/relational_store/include/oh_cursor.h @@ -83,7 +83,13 @@ typedef enum OH_ColumnType { * * @since 11 */ - TYPE_ASSETS + TYPE_ASSETS, + /** + * Indicates the column type is FLOATVECTOR. + * + * @since 14 + */ + TYPE_FLOATVECTOR } OH_ColumnType; /** @@ -286,6 +292,20 @@ typedef struct OH_Cursor { * @since 11 */ int (*getAssets)(OH_Cursor *cursor, int32_t columnIndex, Data_Asset **value, uint32_t *length); + + /** + * @brief Function pointer. Obtains the value of the requested column as a float vector. + * + * @param cursor Represents a pointer to an {@link OH_Cursor} instance. + * @param columnIndex Indicates the zero-based column index. + * @param value This parameter is the output parameter, + * and the value of the requested column as a float vector is written to this variable. + * @param dimension Indicates the dimension of the value. + * @return Returns the status code of the execution. + * @see OH_Cursor. + * @since 14 + */ + int (*getFloatVector)(OH_Cursor *cursor, int32_t columnIndex, float **value, uint32_t *dimension); } OH_Cursor; #ifdef __cplusplus diff --git a/distributeddatamgr/relational_store/include/oh_value_object.h b/distributeddatamgr/relational_store/include/oh_value_object.h index dbe5d0d18..ab0213d58 100644 --- a/distributeddatamgr/relational_store/include/oh_value_object.h +++ b/distributeddatamgr/relational_store/include/oh_value_object.h @@ -103,6 +103,18 @@ typedef struct OH_VObject { */ int (*putTexts)(OH_VObject *valueObject, const char **value, uint32_t count); + /** + * @brief Convert the float array input parameter to a value of type {@link OH_VObject}. + * + * @param valueObject Represents a pointer to an {@link OH_VObject} instance. + * @param value Represents a pointer to the array of type float. + * @param dimension Represents the size of the array. + * @return Returns the status code of the execution. + * @see OH_VObject. + * @since 14 + */ + int (*putFloatVector)(OH_VObject *valueObject, const float *value, uint32_t dimension); + /** * @brief Destroy the {@link OH_VObject} object and reclaim the memory occupied by the object. * diff --git a/distributeddatamgr/relational_store/include/oh_values_bucket.h b/distributeddatamgr/relational_store/include/oh_values_bucket.h index db822d1de..be53ec6c8 100644 --- a/distributeddatamgr/relational_store/include/oh_values_bucket.h +++ b/distributeddatamgr/relational_store/include/oh_values_bucket.h @@ -109,6 +109,19 @@ typedef struct OH_VBucket { */ int (*putBlob)(OH_VBucket *bucket, const char *field, const uint8_t *value, uint32_t size); + /** + * @brief Put the const float * value to this {@link OH_VBucket} object for the given column name. + * + * @param bucket Represents a pointer to an {@link OH_VBucket} instance. + * @param field Indicates the name of the column. + * @param value Indicates the const float * value. + * @param dimension Indicates the dimension of value. + * @return Returns the status code of the execution. + * @see OH_VBucket. + * @since 14 + */ + int (*putFloatVector)(OH_VBucket *bucket, const char *field, const float *value, uint32_t dimension); + /** * @brief Put NULL to this {@link OH_VBucket} object for the given column name. * diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index b8be9a6aa..90167b174 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -527,6 +527,36 @@ int OH_Rdb_ExecuteByTrxId(OH_Rdb_Store *store, int64_t trxId, const char *sql); */ OH_Cursor *OH_Rdb_ExecuteQuery(OH_Rdb_Store *store, const char *sql); +/** + * @brief Write operations are performed using the specified transaction represented by the transaction ID + * + * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. + * @param trxId The transaction ID of the specified transaction, must be greater than 0 + * @param sql Indicates the SQL statement to execute. + * @param valuesBucket Indicates the row of data {@link OH_VBucket} to be operated into the table. + * @return Returns the status code of the execution. + * {@link RDB_OK} - success. + * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. + * {@link RDB_E_NOT_SUPPORTED} - The error code for not supprt. + * @see OH_Rdb_Store. + * @since 14 + */ + +int OH_Rdb_ExecuteByTrxIdV2(OH_Rdb_Store *store, int64_t trxId, const char *sql, OH_VBucket *valuesBucket); + +/** + * @brief Queries data in the database based on an SQL statement. + * + * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. + * @param sql Indicates the SQL statement to execute. + * @param valuesBucket Indicates the row of data {@link OH_VBucket} to be operated into the table. + * @return If the query is successful, a pointer to the instance of the @link OH_Cursor} structure is returned. + * If Get store failed,sql is nullptr or resultSet is nullptr, nullptr is returned. + * @see OH_Rdb_Store. + * @since 14 + */ +OH_Cursor *OH_Rdb_ExecuteQueryV2(OH_Rdb_Store *store, const char *sql, OH_VBucket *valuesBucket); + /** * @brief Begins a transaction in EXCLUSIVE mode. * -- Gitee From 30be433ec6fefa107484158d6be1a65b1dce61e0 Mon Sep 17 00:00:00 2001 From: changleipeng Date: Fri, 15 Nov 2024 15:38:11 +0800 Subject: [PATCH 136/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: changleipeng Change-Id: I692072399873075e219d3e5868acccb81b475941 --- graphic/graphic_2d/native_drawing/drawing_font.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index ca4eac990..ef6abe0cf 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -538,7 +538,8 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param font Indicates the pointer to an OH_Drawing_Font object. * @param text Indicates the character storage encoded with text encoding. - * @param byteLength Indicates the text length in bytes. + * @param byteLength Indicates to get the byte length of the corresponding text path. If this byte length is greater + * than the byte length of the text string, undefined behavior will occur. * @param encoding OH_Drawing_TextEncoding Indicates the text encoding. * @param x Indicates x coordinates of the text. * @param y Indicates y coordinates of the text. -- Gitee From 329d66c7f426c0d5c37e4144898336500b31d8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E9=82=B5=E5=AE=89?= Date: Sat, 16 Nov 2024 09:39:35 +0800 Subject: [PATCH 137/630] effect ndk @file @addtogroup fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 肖邵安 --- graphic/graphic_2d/native_effect/effect_filter.h | 6 +++--- graphic/graphic_2d/native_effect/effect_types.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/graphic/graphic_2d/native_effect/effect_filter.h b/graphic/graphic_2d/native_effect/effect_filter.h index 42ea52a71..065643a8f 100644 --- a/graphic/graphic_2d/native_effect/effect_filter.h +++ b/graphic/graphic_2d/native_effect/effect_filter.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_EFFECT_FILTER_H -#define C_INCLUDE_EFFECT_FILTER_H - /** * @addtogroup image * @{ @@ -37,6 +34,9 @@ * @since 12 */ +#ifndef C_INCLUDE_EFFECT_FILTER_H +#define C_INCLUDE_EFFECT_FILTER_H + #include "effect_types.h" #ifdef __cplusplus extern "C" { diff --git a/graphic/graphic_2d/native_effect/effect_types.h b/graphic/graphic_2d/native_effect/effect_types.h index 6e6bf8d5f..d84b05e13 100644 --- a/graphic/graphic_2d/native_effect/effect_types.h +++ b/graphic/graphic_2d/native_effect/effect_types.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_EFFECT_TYPES_H -#define C_INCLUDE_EFFECT_TYPES_H - /** * @addtogroup image * @{ @@ -37,6 +34,9 @@ * @since 12 */ +#ifndef C_INCLUDE_EFFECT_TYPES_H +#define C_INCLUDE_EFFECT_TYPES_H + #include #include -- Gitee From fd6c430fa4ade2c1848079a7a02d5a4a84c9948a Mon Sep 17 00:00:00 2001 From: xwx1135370 Date: Sat, 16 Nov 2024 14:01:51 +0800 Subject: [PATCH 138/630] =?UTF-8?q?=E3=80=90windows=E3=80=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0python3=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue:https://gitee.com/openharmony/interface_sdk_c/issues/IB4SU5?from=project-issue Signed-off-by: xwx1135370 --- third_party/musl/ndk_script/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/musl/ndk_script/BUILD.gn b/third_party/musl/ndk_script/BUILD.gn index a71e33565..c62a9b632 100644 --- a/third_party/musl/ndk_script/BUILD.gn +++ b/third_party/musl/ndk_script/BUILD.gn @@ -106,6 +106,7 @@ if (host_os == "mac") { "${windows_x86_64_toolchain_dir}/llvm/include", "${windows_x86_64_toolchain_dir}/llvm/lib", "${windows_x86_64_toolchain_dir}/llvm/libexec", + "${windows_x86_64_toolchain_dir}/llvm/python3", "${windows_x86_64_toolchain_dir}/llvm/script", "${windows_x86_64_toolchain_dir}/llvm/share", ] -- Gitee From 110b2befa723e180ba85dc2d5646c332de5da7e5 Mon Sep 17 00:00:00 2001 From: SuRuoyan Date: Sat, 16 Nov 2024 21:03:43 +0800 Subject: [PATCH 139/630] add AAC profile HE-AAC and HE-AAC v2 Signed-off-by: SuRuoyan --- multimedia/av_codec/native_avcodec_base.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 147a7268e..a9dbbaa7d 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -987,6 +987,16 @@ typedef enum OH_MediaType { */ typedef enum OH_AACProfile { AAC_PROFILE_LC = 0, + /** + * High-Efficiency AAC profile, contain the audio object types: AAC LC, SBR + * @since 14 + */ + AAC_PROFILE_HE = 3, + /** + * High-Efficiency AAC v2 profile, contain the audio object types: AAC LC, SBR, PS + * @since 14 + */ + AAC_PROFILE_HE_V2 = 4, } OH_AACProfile; /** -- Gitee From debe7f537c3cb81b10b4b11fcbda036192464ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=9C=AA=E6=9D=A5?= Date: Mon, 18 Nov 2024 09:51:54 +0800 Subject: [PATCH 140/630] =?UTF-8?q?api=20Lint=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 徐未来 --- BasicServicesKit/time_service.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BasicServicesKit/time_service.h b/BasicServicesKit/time_service.h index b33159e86..29f45020d 100644 --- a/BasicServicesKit/time_service.h +++ b/BasicServicesKit/time_service.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef TIME_SERVICE_H -#define TIME_SERVICE_H - /** * @addtogroup TimeService * @{ @@ -33,6 +30,9 @@ * @since 12 */ +#ifndef TIME_SERVICE_H +#define TIME_SERVICE_H + #include #ifdef __cplusplus -- Gitee From bce2fdff17c69455fa1dfdaf8924cba7d9487ca5 Mon Sep 17 00:00:00 2001 From: yuhaoqiang Date: Mon, 18 Nov 2024 09:59:59 +0800 Subject: [PATCH 141/630] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuhaoqiang --- hiviewdfx/hidebug/include/hidebug/hidebug.h | 5 +++-- hiviewdfx/hidebug/include/hidebug/hidebug_type.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug.h b/hiviewdfx/hidebug/include/hidebug/hidebug.h index 7f234b359..5cea6408a 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HIDEBUG_H -#define HIVIEWDFX_HIDEBUG_H /** * @addtogroup HiDebug * @{ @@ -37,6 +35,9 @@ * @since 12 */ +#ifndef HIVIEWDFX_HIDEBUG_H +#define HIVIEWDFX_HIDEBUG_H + #include #include "hidebug_type.h" diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h index 6976244e2..e38ad40e0 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HIDEBUG_TYPE_H -#define HIVIEWDFX_HIDEBUG_TYPE_H /** * @addtogroup HiDebug * @{ @@ -37,6 +35,9 @@ * @since 12 */ +#ifndef HIVIEWDFX_HIDEBUG_TYPE_H +#define HIVIEWDFX_HIDEBUG_TYPE_H + #include #ifdef __cplusplus -- Gitee From 0440066ed8c4304dd9847282a5b50bb27b2431e8 Mon Sep 17 00:00:00 2001 From: jiangwei Date: Mon, 18 Nov 2024 10:36:00 +0800 Subject: [PATCH 142/630] =?UTF-8?q?fix:=20trace.h=E5=A4=B4=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=B8=85=E7=90=86app=20lint=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jiangwei --- hiviewdfx/hitrace/include/hitrace/trace.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hiviewdfx/hitrace/include/hitrace/trace.h b/hiviewdfx/hitrace/include/hitrace/trace.h index e771136da..d9ebed256 100644 --- a/hiviewdfx/hitrace/include/hitrace/trace.h +++ b/hiviewdfx/hitrace/include/hitrace/trace.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HITRACE_H -#define HIVIEWDFX_HITRACE_H /** * @addtogroup Hitrace * @{ @@ -64,6 +62,10 @@ * @syscap SystemCapability.HiviewDFX.HiTrace * @since 10 */ + +#ifndef HIVIEWDFX_HITRACE_H +#define HIVIEWDFX_HITRACE_H + #include #include -- Gitee From 321c12dae3b0b8787e08bad8f8c927cbebc7a0eb Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 18 Nov 2024 10:47:20 +0800 Subject: [PATCH 143/630] =?UTF-8?q?=E5=9B=BE=E5=BD=A2API=20Lint=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20pixelmap=5Fnative.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- multimedia/image_framework/include/image/pixelmap_native.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 1599a6621..fb16d8c0d 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -19,7 +19,7 @@ * * @brief Provides APIs for obtaining pixel map data and information. * - * @Syscap SystemCapability.Multimedia.Image.Core + * @syscap SystemCapability.Multimedia.Image.Core * @since 12 */ @@ -30,7 +30,7 @@ * * @library libpixelmap.so * @kit ImageKit - * @Syscap SystemCapability.Multimedia.Image.Core + * @syscap SystemCapability.Multimedia.Image.Core * @since 12 */ @@ -571,7 +571,7 @@ Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, * @brief Get density number for imageinfo struct. * * @param info The imageinfo pointer will be operated. - * @param density The number of imageinfo density. + * @param alphaType The number of image alphaType. * @return Returns {@link Image_ErrorCode} * @since 12 */ -- Gitee From 8fcbe451c61d6bb27303fb160669ae2c628e90ba Mon Sep 17 00:00:00 2001 From: zww Date: Mon, 18 Nov 2024 15:43:43 +0800 Subject: [PATCH 144/630] huks api lint fix Signed-off-by: zww --- security/huks/include/native_huks_api.h | 11 +++++++---- security/huks/include/native_huks_param.h | 9 ++++++--- security/huks/include/native_huks_type.h | 9 ++++++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/security/huks/include/native_huks_api.h b/security/huks/include/native_huks_api.h index d806c778b..9bde4391f 100644 --- a/security/huks/include/native_huks_api.h +++ b/security/huks/include/native_huks_api.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NATIVE_HUKS_API_H -#define NATIVE_HUKS_API_H - /** * @addtogroup HuksKeyApi * @{ @@ -34,12 +31,18 @@ * * @brief Defines the Universal Keystore Kit APIs. * + * @library libhuks_ndk.z.so + * @syscap SystemCapability.Security.Huks + * * include "huks/include/native_huks_type.h" * @kit UniversalKeystoreKit * @since 9 * @version 1.0 */ +#ifndef NATIVE_HUKS_API_H +#define NATIVE_HUKS_API_H + #include "native_huks_type.h" #ifdef __cplusplus @@ -309,7 +312,7 @@ struct OH_Huks_Result OH_Huks_AnonAttestKeyItem(const struct OH_Huks_Blob *keyAl * @param handle Indicates the pointer to the handle of the key session obtained. * This handle is required for subsequent operations, including {@link OH_Huks_UpdateSession}, * {@link OH_Huks_FinishSession}, and {@link OH_Huks_AbortSession}. - * @param challenge Indicates the pointer to the challenge value obtained. + * @param token Indicates the pointer to the token used for key access control. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or handle or * token is invalid. diff --git a/security/huks/include/native_huks_param.h b/security/huks/include/native_huks_param.h index 9b8cf1f60..8866a8b56 100644 --- a/security/huks/include/native_huks_param.h +++ b/security/huks/include/native_huks_param.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NATIVE_HUKS_PARAM_H -#define NATIVE_HUKS_PARAM_H - /** * @addtogroup HuksParamSetApi * @{ @@ -36,12 +33,18 @@ * * @brief Provides APIs for constructing, using, and destroying parameter sets. * + * @library libhuks_ndk.z.so + * @syscap SystemCapability.Security.Huks + * * include "huks/include/native_huks_type.h" * @kit UniversalKeystoreKit * @since 9 * @version 1.0 */ +#ifndef NATIVE_HUKS_PARAM_H +#define NATIVE_HUKS_PARAM_H + #include "native_huks_type.h" #ifdef __cplusplus diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index 765dc5a87..b7d00d8ca 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NATIVE_OH_HUKS_TYPE_H -#define NATIVE_OH_HUKS_TYPE_H - /** * @addtogroup HuksTypeApi * @{ @@ -33,11 +30,17 @@ * * @brief Defines the structure and enumeration. * + * @library libhuks_ndk.z.so + * @syscap SystemCapability.Security.Huks + * * @kit UniversalKeystoreKit * @since 9 * @version 1.0 */ +#ifndef NATIVE_OH_HUKS_TYPE_H +#define NATIVE_OH_HUKS_TYPE_H + #include #include #include -- Gitee From c57861befb944ffa5a7d76c77267f8472a1843d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=BE=8E=E4=BA=AE?= Date: Mon, 18 Nov 2024 08:39:06 +0000 Subject: [PATCH 145/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周澎亮 --- multimodalinput/kits/c/input/oh_input_manager.h | 16 ++++++++-------- multimodalinput/kits/c/input/oh_key_code.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 0a2b5b471..90b91d7cb 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_INPUT_MANAGER_H -#define OH_INPUT_MANAGER_H - /** * @addtogroup input * @{ @@ -35,6 +32,9 @@ * @since 12 */ +#ifndef OH_INPUT_MANAGER_H +#define OH_INPUT_MANAGER_H + #include #include "oh_axis_type.h" @@ -674,7 +674,7 @@ int32_t OH_Input_GetMouseEventAxisType(const struct Input_MouseEvent* mouseEvent * @brief Sets the axis value for a mouse axis event. * * @param mouseEvent Mouse event object. - * @param axisType Axis value. A positive value means scrolling forward, + * @param axisValue Axis value. A positive value means scrolling forward, * and a negative number means scrolling backward. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 @@ -704,7 +704,7 @@ void OH_Input_SetMouseEventActionTime(struct Input_MouseEvent* mouseEvent, int64 /** * @brief Obtains the time when a mouse event occurs. * - * @param keyEvent Mouse event object. + * @param mouseEvent Mouse event object. * @return Returns the time when the mouse event occurs. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 @@ -825,7 +825,7 @@ int32_t OH_Input_GetTouchEventDisplayY(const struct Input_TouchEvent* touchEvent /** * @brief Sets the time when a touch event occurs. * - * @param keyEvent Touch event object. + * @param touchEvent Touch event object. * @param actionTime Time when the touch event occurs. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 @@ -835,7 +835,7 @@ void OH_Input_SetTouchEventActionTime(struct Input_TouchEvent* touchEvent, int64 /** * @brief Obtains the time when a touch event occurs. * - * @param keyEvent touch event object. + * @param touchEvent touch event object. * @return Returns the time when the touch event occurs. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 @@ -1050,7 +1050,7 @@ Input_Result OH_Input_SetAxisEventSourceType(Input_AxisEvent* axisEvent, InputEv * @brief Obtains the axis event source type. * * @param axisEvent Axis event object. - * @param axisEventType Axis event source type. The values are defined in {@link InputEvent_SourceType}. + * @param sourceType Axis event source type. The values are defined in {@link InputEvent_SourceType}. * @return OH_Input_GetAxisEventSourceType function result code. * {@link INPUT_SUCCESS} Obtains the axis event source type success.\n * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL or the sourceType is NULL.\n diff --git a/multimodalinput/kits/c/input/oh_key_code.h b/multimodalinput/kits/c/input/oh_key_code.h index 29233f311..32b3b9bcf 100644 --- a/multimodalinput/kits/c/input/oh_key_code.h +++ b/multimodalinput/kits/c/input/oh_key_code.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_KEY_CODE_H -#define OH_KEY_CODE_H - /** * @addtogroup input * @{ @@ -35,6 +32,9 @@ * @since 12 */ +#ifndef OH_KEY_CODE_H +#define OH_KEY_CODE_H + #ifdef __cplusplus extern "C" { #endif -- Gitee From 2ceac6193f8a7e9ece035e4bfb1cc5ce62a02862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=BC=E6=B4=81?= Date: Mon, 18 Nov 2024 07:03:02 +0000 Subject: [PATCH 146/630] 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张琼洁 --- .../relational_store/include/data_asset.h | 11 ++++++++--- .../relational_store/include/oh_cursor.h | 11 +++++++---- .../relational_store/include/oh_predicates.h | 11 +++++++---- .../relational_store/include/oh_value_object.h | 11 +++++++---- .../relational_store/include/oh_values_bucket.h | 11 +++++++---- .../relational_store/include/relational_store.h | 13 ++++++++----- .../include/relational_store_error_code.h | 12 +++++++----- 7 files changed, 51 insertions(+), 29 deletions(-) diff --git a/distributeddatamgr/relational_store/include/data_asset.h b/distributeddatamgr/relational_store/include/data_asset.h index a8bc9e16a..19f24afae 100644 --- a/distributeddatamgr/relational_store/include/data_asset.h +++ b/distributeddatamgr/relational_store/include/data_asset.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef DATA_ASSET_H -#define DATA_ASSET_H /** * @addtogroup RDB * @{ @@ -32,10 +30,14 @@ * * @brief Provides the data type of asset. * @kit ArkData - * @library libnative_rdb_ndk.z.so + * @library libnative_rdb_ndk.so * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 11 */ + +#ifndef DATA_ASSET_H +#define DATA_ASSET_H + #include #include #ifdef __cplusplus @@ -350,4 +352,7 @@ int OH_Data_Asset_DestroyMultiple(Data_Asset **assets, uint32_t count); #ifdef __cplusplus }; #endif + +/** @} */ + #endif // DATA_ASSET_H diff --git a/distributeddatamgr/relational_store/include/oh_cursor.h b/distributeddatamgr/relational_store/include/oh_cursor.h index 30d208ab4..9e14c2e2a 100644 --- a/distributeddatamgr/relational_store/include/oh_cursor.h +++ b/distributeddatamgr/relational_store/include/oh_cursor.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_CURSOR_H -#define OH_CURSOR_H - /** * @addtogroup RDB * @{ @@ -25,7 +22,6 @@ * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -35,9 +31,14 @@ * @brief Provides functions and enumerations related to the resultSet. * * @kit ArkData + * @library libnative_rdb_ndk.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ +#ifndef OH_CURSOR_H +#define OH_CURSOR_H + #include #include #include @@ -292,4 +293,6 @@ typedef struct OH_Cursor { }; #endif +/** @} */ + #endif // OH_CURSOR_H diff --git a/distributeddatamgr/relational_store/include/oh_predicates.h b/distributeddatamgr/relational_store/include/oh_predicates.h index 71f496459..b7777b3a6 100644 --- a/distributeddatamgr/relational_store/include/oh_predicates.h +++ b/distributeddatamgr/relational_store/include/oh_predicates.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_PREDICATES_H -#define OH_PREDICATES_H - /** * @addtogroup RDB * @{ @@ -25,7 +22,6 @@ * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -35,9 +31,14 @@ * @brief Declared predicate related functions and enumerations. * * @kit ArkData + * @library libnative_rdb_ndk.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ +#ifndef OH_PREDICATES_H +#define OH_PREDICATES_H + #include #include #include "database/rdb/oh_value_object.h" @@ -401,4 +402,6 @@ typedef struct OH_Predicates { }; #endif +/** @} */ + #endif // OH_PREDICATES_H diff --git a/distributeddatamgr/relational_store/include/oh_value_object.h b/distributeddatamgr/relational_store/include/oh_value_object.h index dbe5d0d18..b9da7f7c3 100644 --- a/distributeddatamgr/relational_store/include/oh_value_object.h +++ b/distributeddatamgr/relational_store/include/oh_value_object.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_VALUE_OBJECT_H -#define OH_VALUE_OBJECT_H - /** * @addtogroup RDB * @{ @@ -25,7 +22,6 @@ * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -35,9 +31,14 @@ * @brief Provides numeric type conversion functions. * * @kit ArkData + * @library libnative_rdb_ndk.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ +#ifndef OH_VALUE_OBJECT_H +#define OH_VALUE_OBJECT_H + #include #ifdef __cplusplus extern "C" { @@ -118,4 +119,6 @@ typedef struct OH_VObject { }; #endif +/** @} */ + #endif // OH_VALUE_OBJECT_H diff --git a/distributeddatamgr/relational_store/include/oh_values_bucket.h b/distributeddatamgr/relational_store/include/oh_values_bucket.h index db822d1de..f01fd551b 100644 --- a/distributeddatamgr/relational_store/include/oh_values_bucket.h +++ b/distributeddatamgr/relational_store/include/oh_values_bucket.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_VALUES_BUCKET_H -#define OH_VALUES_BUCKET_H - /** * @addtogroup RDB * @{ @@ -25,7 +22,6 @@ * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -35,9 +31,14 @@ * @brief Define the type of stored key value pairs. * * @kit ArkData + * @library libnative_rdb_ndk.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ +#ifndef OH_VALUES_BUCKET_H +#define OH_VALUES_BUCKET_H + #include #include "database/data/data_asset.h" #ifdef __cplusplus @@ -173,4 +174,6 @@ int OH_VBucket_PutAssets(OH_VBucket *bucket, const char *field, Data_Asset **val }; #endif +/** @} */ + #endif // OH_VALUES_BUCKET_H diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index b8be9a6aa..8f4d63962 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef RELATIONAL_STORE_H -#define RELATIONAL_STORE_H - /** * @addtogroup RDB * @{ @@ -25,7 +22,6 @@ * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -35,9 +31,14 @@ * @brief Provides database related functions and enumerations. * * @kit ArkData + * @library libnative_rdb_ndk.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ +#ifndef RELATIONAL_STORE_H +#define RELATIONAL_STORE_H + #include "database/rdb/oh_cursor.h" #include "database/rdb/oh_predicates.h" #include "database/rdb/oh_value_object.h" @@ -212,7 +213,7 @@ int OH_Rdb_DestroyConfig(OH_Rdb_ConfigV2 *config); * * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. * Indicates the configuration of the database related to this RDB store. - * @param dataBaseDir Indicates the directory of the database. + * @param databaseDir Indicates the directory of the database. * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. @@ -1250,4 +1251,6 @@ OH_Cursor *OH_Rdb_QueryLockedRow( }; #endif +/** @} */ + #endif // RELATIONAL_STORE_H diff --git a/distributeddatamgr/relational_store/include/relational_store_error_code.h b/distributeddatamgr/relational_store/include/relational_store_error_code.h index 9fc2f6d2d..83b18cc8f 100644 --- a/distributeddatamgr/relational_store/include/relational_store_error_code.h +++ b/distributeddatamgr/relational_store/include/relational_store_error_code.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef RELATIONAL_STORE_ERRNO_CODE_H -#define RELATIONAL_STORE_ERRNO_CODE_H - /** * @addtogroup RDB * @{ @@ -25,20 +22,23 @@ * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - /** * @file relational_store_error_code.h * * @brief Declaration error code information. * * @kit ArkData + * @library libnative_rdb_ndk.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ +#ifndef RELATIONAL_STORE_ERRNO_CODE_H +#define RELATIONAL_STORE_ERRNO_CODE_H + #ifdef __cplusplus extern "C" { #endif @@ -314,4 +314,6 @@ typedef enum OH_Rdb_ErrCode { }; #endif +/** @} */ + #endif // RELATIONAL_STORE_ERRNO_CODE_H \ No newline at end of file -- Gitee From db8f0ef009f4f1bdb411233f6fb51d823360dde6 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 18 Nov 2024 17:26:57 +0800 Subject: [PATCH 147/630] =?UTF-8?q?=E5=9B=BE=E5=BD=A2API=20Lint=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20image=5Fcommon.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- multimedia/image_framework/include/image/image_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index b6cf5943d..43c3af017 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -27,6 +27,7 @@ * * @brief Declares the common enums and structs used by the image interface. * + * @library libpixelmap.so * @kit ImageKit * @syscap SystemCapability.Multimedia.Image.Core * @since 12 -- Gitee From 1b990c459eb2f64b28f6e3c41d8cb4b7ecaf81d5 Mon Sep 17 00:00:00 2001 From: liujiaxing19 Date: Tue, 19 Nov 2024 10:57:41 +0800 Subject: [PATCH 148/630] =?UTF-8?q?hiAppEvent=E6=8E=A5=E5=8F=A3APILint?= =?UTF-8?q?=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujiaxing19 Change-Id: Ia7f9ad69973e11c65e5e33b1c827dfe53c197da0 --- hiviewdfx/hiappevent/include/hiappevent/hiappevent.h | 5 +++-- hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h | 6 +++--- hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h | 6 +++--- hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h | 7 ++++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index e4f847bac..e3c82e39f 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HIAPPEVENT_H -#define HIVIEWDFX_HIAPPEVENT_H /** * @addtogroup HiAppEvent * @{ @@ -75,6 +73,9 @@ * @version 1.0 */ +#ifndef HIVIEWDFX_HIAPPEVENT_H +#define HIVIEWDFX_HIAPPEVENT_H + #include #include diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h index 7a6d6a2f8..1c0a4cb6b 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HIAPPEVENT_CONFIG_H -#define HIVIEWDFX_HIAPPEVENT_CONFIG_H - /** * @addtogroup HiAppEvent * @{ @@ -49,6 +46,9 @@ * @version 1.0 */ +#ifndef HIVIEWDFX_HIAPPEVENT_CONFIG_H +#define HIVIEWDFX_HIAPPEVENT_CONFIG_H + #ifdef __cplusplus extern "C" { #endif diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h index c14564794..59a5aabe5 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HIAPPEVENT_EVENT_H -#define HIVIEWDFX_HIAPPEVENT_EVENT_H - /** * @addtogroup HiAppEvent * @{ @@ -52,6 +49,9 @@ * @version 1.0 */ +#ifndef HIVIEWDFX_HIAPPEVENT_EVENT_H +#define HIVIEWDFX_HIAPPEVENT_EVENT_H + #ifdef __cplusplus extern "C" { #endif diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h index ec984a36a..5f9c10cb1 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HIAPPEVENT_PARAM_H -#define HIVIEWDFX_HIAPPEVENT_PARAM_H - /** * @addtogroup HiAppEvent * @{ @@ -51,6 +48,10 @@ * @since 8 * @version 1.0 */ + +#ifndef HIVIEWDFX_HIAPPEVENT_PARAM_H +#define HIVIEWDFX_HIAPPEVENT_PARAM_H + #ifdef __cplusplus extern "C" { #endif -- Gitee From 9360e40985e473ed8b57b7a4a4da24fb8762aab7 Mon Sep 17 00:00:00 2001 From: liufei Date: Tue, 19 Nov 2024 11:05:26 +0800 Subject: [PATCH 149/630] api lint Signed-off-by: liufei --- .../native_drawing/drawing_font_collection.h | 22 +- .../native_drawing/drawing_font_mgr.h | 61 +- .../native_drawing/drawing_register_font.h | 6 +- .../native_drawing/drawing_text_declaration.h | 6 +- .../drawing_text_font_descriptor.h | 33 +- .../drawing_text_lineTypography.h | 8 +- .../native_drawing/drawing_text_typography.h | 928 +++++++++--------- 7 files changed, 546 insertions(+), 518 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_font_collection.h b/graphic/graphic_2d/native_drawing/drawing_font_collection.h index 5f7277d72..a6097dad1 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font_collection.h +++ b/graphic/graphic_2d/native_drawing/drawing_font_collection.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_FONT_COLLECTION_H -#define C_INCLUDE_DRAWING_FONT_COLLECTION_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_FONT_COLLECTION_H +#define C_INCLUDE_DRAWING_FONT_COLLECTION_H + #include "drawing_text_declaration.h" #ifdef __cplusplus @@ -59,31 +59,31 @@ OH_Drawing_FontCollection* OH_Drawing_CreateFontCollection(void); * @brief Releases the memory occupied by an OH_Drawing_FontCollection object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontCollection Indicates the pointer to an OH_Drawing_FontCollection object. + * @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object. * @since 8 * @version 1.0 */ -void OH_Drawing_DestroyFontCollection(OH_Drawing_FontCollection*); +void OH_Drawing_DestroyFontCollection(OH_Drawing_FontCollection* fontCollection); /** * @brief Disable the font collection fallback. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontCollection Indicates the pointer to an OH_Drawing_FontCollection object. + * @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object. * @since 12 * @version 1.0 */ -void OH_Drawing_DisableFontCollectionFallback(OH_Drawing_FontCollection*); +void OH_Drawing_DisableFontCollectionFallback(OH_Drawing_FontCollection* fontCollection); /** * @brief Disable the font collection systemfont. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontCollection Indicates the pointer to an OH_Drawing_FontCollection object. + * @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object. * @since 12 * @version 1.0 */ -void OH_Drawing_DisableFontCollectionSystemFont(OH_Drawing_FontCollection*); +void OH_Drawing_DisableFontCollectionSystemFont(OH_Drawing_FontCollection* fontCollection); /** * @brief Creates an OH_Drawing_FontCollection object with shared usage between @@ -100,11 +100,11 @@ OH_Drawing_FontCollection* OH_Drawing_CreateSharedFontCollection(void); * @brief Clear font caches. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontCollection Indicates the pointer to an OH_Drawing_FontCollection object. + * @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object. * @since 12 * @version 1.0 */ -void OH_Drawing_ClearFontCaches(OH_Drawing_FontCollection*); +void OH_Drawing_ClearFontCaches(OH_Drawing_FontCollection* fontCollection); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_font_mgr.h b/graphic/graphic_2d/native_drawing/drawing_font_mgr.h index 15b931f80..04d880558 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font_mgr.h +++ b/graphic/graphic_2d/native_drawing/drawing_font_mgr.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_FONT_MGR_H -#define C_INCLUDE_DRAWING_FONT_MGR_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_FONT_MGR_H +#define C_INCLUDE_DRAWING_FONT_MGR_H + #include "drawing_types.h" #include "drawing_text_typography.h" #include @@ -62,34 +62,34 @@ OH_Drawing_FontMgr* OH_Drawing_FontMgrCreate(void); * @brief Releases the memory occupied by an OH_Drawing_FontMgr object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param drawingFontMgr Indicates the pointer to an OH_Drawing_FontMgr object. * @since 12 * @version 1.0 */ -void OH_Drawing_FontMgrDestroy(OH_Drawing_FontMgr*); +void OH_Drawing_FontMgrDestroy(OH_Drawing_FontMgr* drawingFontMgr); /** * @brief Gets the count of font families. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param drawingFontMgr Indicates the pointer to an OH_Drawing_FontMgr object. * @return Returns the count of font families. * @since 12 * @version 1.0 */ -int OH_Drawing_FontMgrGetFamilyCount(OH_Drawing_FontMgr*); +int OH_Drawing_FontMgrGetFamilyCount(OH_Drawing_FontMgr* drawingFontMgr); /** * @brief Gets the font family name by the index. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param drawingFontMgr Indicates the pointer to an OH_Drawing_FontMgr 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 */ -char* OH_Drawing_FontMgrGetFamilyName(OH_Drawing_FontMgr*, int index); +char* OH_Drawing_FontMgrGetFamilyName(OH_Drawing_FontMgr* drawingFontMgr, int index); /** * @brief Releases the memory occupied by font family name. @@ -105,57 +105,57 @@ void OH_Drawing_FontMgrDestroyFamilyName(char* familyName); * @brief Creates an OH_Drawing_FontStyleSet object by OH_Drawing_FontMgr object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param drawingFontMgr Indicates the pointer to an OH_Drawing_FontMgr 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 OH_Drawing_FontStyleSet object created. * @since 12 * @version 1.0 */ -OH_Drawing_FontStyleSet* OH_Drawing_FontMgrCreateFontStyleSet(OH_Drawing_FontMgr*, int index); +OH_Drawing_FontStyleSet* OH_Drawing_FontMgrCreateFontStyleSet(OH_Drawing_FontMgr* drawingFontMgr, int index); /** * @brief Releases the memory occupied by an OH_Drawing_FontStyleSet object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param drawingFontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. * @since 12 * @version 1.0 */ -void OH_Drawing_FontMgrDestroyFontStyleSet(OH_Drawing_FontStyleSet*); +void OH_Drawing_FontMgrDestroyFontStyleSet(OH_Drawing_FontStyleSet* drawingFontStyleSet); /** * @brief Get the pointer to an OH_Drawing_FontStyleSet object for the given font style set family name. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param drawingFontMgr Indicates the pointer to an OH_Drawing_FontMgr object. * @param familyName Indicates the family name of a font style set to be matched. * @return Returns the pointer to the OH_Drawing_FontStyleSet object matched. * @since 12 * @version 1.0 */ -OH_Drawing_FontStyleSet* OH_Drawing_FontMgrMatchFamily(OH_Drawing_FontMgr*, const char* familyName); +OH_Drawing_FontStyleSet* OH_Drawing_FontMgrMatchFamily(OH_Drawing_FontMgr* drawingFontMgr, const char* familyName); /** * @brief Get the pointer to an OH_Drawing_Typeface object based on the given font style and family name. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param drawingFontMgr Indicates the pointer to an OH_Drawing_FontMgr object. * @param familyName Indicates the family name of a font style set to be matched. - * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @param fontStyle Indicates an OH_Drawing_FontStyleStruct object. * @return Returns the pointer to the OH_Drawing_Typeface object matched. * @since 12 * @version 1.0 */ -OH_Drawing_Typeface* OH_Drawing_FontMgrMatchFamilyStyle(OH_Drawing_FontMgr*, +OH_Drawing_Typeface* OH_Drawing_FontMgrMatchFamilyStyle(OH_Drawing_FontMgr* drawingFontMgr, const char* familyName, OH_Drawing_FontStyleStruct fontStyle); /** * @brief Get the pointer to an OH_Drawing_Typeface object for the given character. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param drawingFontMgr Indicates the pointer to an OH_Drawing_FontMgr object. * @param familyName Indicates the family name of a font style set to be matched. - * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @param fontStyle Indicates an OH_Drawing_FontStyleStruct 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. @@ -163,33 +163,34 @@ OH_Drawing_Typeface* OH_Drawing_FontMgrMatchFamilyStyle(OH_Drawing_FontMgr*, * @since 12 * @version 1.0 */ -OH_Drawing_Typeface* OH_Drawing_FontMgrMatchFamilyStyleCharacter(OH_Drawing_FontMgr*, const char* familyName, - OH_Drawing_FontStyleStruct fontStyle, const char* bcp47[], int bcp47Count, int32_t character); +OH_Drawing_Typeface* OH_Drawing_FontMgrMatchFamilyStyleCharacter(OH_Drawing_FontMgr* drawingFontMgr, + const char* familyName, OH_Drawing_FontStyleStruct fontStyle, + const char* bcp47[], int bcp47Count, int32_t character); /** * @brief Create a typeface for the given index. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param fontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. * @param index Indicates the index of the typeface in this fontStyleSet. * @return If successful, return a pointer to OH_Drawing_Typeface object; if failed, return nullptr. * @since 12 * @version 1.0 */ -OH_Drawing_Typeface* OH_Drawing_FontStyleSetCreateTypeface(OH_Drawing_FontStyleSet*, int index); +OH_Drawing_Typeface* OH_Drawing_FontStyleSetCreateTypeface(OH_Drawing_FontStyleSet* fontStyleSet, int index); /** * @brief Get font style for the specified typeface. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param fontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. * @param index Indicates the index of the typeface in this fontStyleSet. * @param styleName Indicates the style name returned. * @return Return the OH_Drawing_FontStyleStruct structure. * @since 12 * @version 1.0 */ -OH_Drawing_FontStyleStruct OH_Drawing_FontStyleSetGetStyle(OH_Drawing_FontStyleSet*, int32_t index, +OH_Drawing_FontStyleStruct OH_Drawing_FontStyleSetGetStyle(OH_Drawing_FontStyleSet* fontStyleSet, int32_t index, char** styleName); /** @@ -206,25 +207,25 @@ void OH_Drawing_FontStyleSetFreeStyleName(char** styleName); * @brief Get the closest matching typeface. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param fontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. * @param fontStyleStruct Indicates the OH_Drawing_FontStyleStruct structure. * @return A pointer to matched OH_Drawing_Typeface. * @since 12 * @version 1.0 */ -OH_Drawing_Typeface* OH_Drawing_FontStyleSetMatchStyle(OH_Drawing_FontStyleSet*, +OH_Drawing_Typeface* OH_Drawing_FontStyleSetMatchStyle(OH_Drawing_FontStyleSet* fontStyleSet, OH_Drawing_FontStyleStruct fontStyleStruct); /** * @brief Get the count of typeface. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param fontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. * @return The count of typeface in this font style set. * @since 12 * @version 1.0 */ -int OH_Drawing_FontStyleSetCount(OH_Drawing_FontStyleSet*); +int OH_Drawing_FontStyleSetCount(OH_Drawing_FontStyleSet* fontStyleSet); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index 02f0e9826..2ffdbbfec 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_REGISTER_FONT_H -#define C_INCLUDE_DRAWING_REGISTER_FONT_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_REGISTER_FONT_H +#define C_INCLUDE_DRAWING_REGISTER_FONT_H + #include "drawing_text_declaration.h" #include "drawing_types.h" diff --git a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h index 24ec0b365..505001519 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TEXT_DECLARATION_H -#define C_INCLUDE_DRAWING_TEXT_DECLARATION_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_TEXT_DECLARATION_H +#define C_INCLUDE_DRAWING_TEXT_DECLARATION_H + #ifdef __cplusplus extern "C" { #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index e6c262107..2ae193b58 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -69,69 +69,70 @@ typedef enum { * font descriptors. If the match fails, return nullptr. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontDescriptor The pointer to the OH_Drawing_FontDescriptor object. It is recommended to + * @param desc The pointer to the OH_Drawing_FontDescriptor object. It is recommended to * use OH_Drawing_CreateFontDescriptor to obtain a valid OH_Drawing_FontDescriptor instance. * If you create your own OH_Drawing_FontDescriptor object, ensure that fields not intended for matching are * set to their default values. - * @param size_t Indicates the count of obtained OH_Drawing_FontDescriptor. + * @param num Indicates the count of obtained OH_Drawing_FontDescriptor. * @return Returns an array of OH_Drawing_FontDescriptor. Released through the * OH_Drawing_DestroyFontDescriptors interface after use. * @since 14 */ -OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescriptor*, size_t*); +OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescriptor* desc, size_t* num); /** * @brief Releases the OH_Drawing_FontDescriptor array. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontDescriptor OH_Drawing_FontDescriptor object array. - * @param size_t Represents the number of members of the OH_Drawing_FontDescriptor array. + * @param descriptors OH_Drawing_FontDescriptor object array. + * @param num Represents the number of members of the OH_Drawing_FontDescriptor array. * @since 14 */ -void OH_Drawing_DestroyFontDescriptors(OH_Drawing_FontDescriptor*, size_t); +void OH_Drawing_DestroyFontDescriptors(OH_Drawing_FontDescriptor* descriptors, size_t num); /** * @brief Get the OH_Drawing_FontDescriptor object by the font full name and the font type, supporting generic * fonts, stylish fonts, and installed fonts. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_String Indicates the full name object OH_Drawing_String. - * @param OH_Drawing_SystemFontType Indicates enumerates of system font type object OH_Drawing_SystemFontType. + * @param fullName Indicates the full name object OH_Drawing_String. + * @param fontType Indicates enumerates of system font type object OH_Drawing_SystemFontType. * @return Returns the pointer to a font descriptor object OH_Drawing_FontDescriptor. * @since 14 */ -OH_Drawing_FontDescriptor* OH_Drawing_GetFontDescriptorByFullName(const OH_Drawing_String*, OH_Drawing_SystemFontType); +OH_Drawing_FontDescriptor* OH_Drawing_GetFontDescriptorByFullName(const OH_Drawing_String* fullName, + OH_Drawing_SystemFontType fontType); /** * @brief Obtain the corresponding font full name array by the font type. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_SystemFontType Indicates enumerates of system font type object OH_Drawing_SystemFontType. + * @param fontType Indicates enumerates of system font type object OH_Drawing_SystemFontType. * @return Returns the pointer to full name array object OH_Drawing_Array. * @since 14 */ -OH_Drawing_Array* OH_Drawing_GetSystemFontFullNamesByType(OH_Drawing_SystemFontType); +OH_Drawing_Array* OH_Drawing_GetSystemFontFullNamesByType(OH_Drawing_SystemFontType fontType); /** * @brief Get the specified full name object OH_Drawing_String by index from the * OH_Drawing_Array object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Array Indicates an array of full name object OH_Drawing_Array. - * @param size_t The index of full name. + * @param fullNameArray Indicates an array of full name object OH_Drawing_Array. + * @param index The index of full name. * @return Returns a full name object OH_Drawing_String. * @since 14 */ -const OH_Drawing_String* OH_Drawing_GetSystemFontFullNameByIndex(OH_Drawing_Array*, size_t); +const OH_Drawing_String* OH_Drawing_GetSystemFontFullNameByIndex(OH_Drawing_Array* fullNameArray, size_t index); /** * @brief Releases the memory occupied by an array of font full names. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Array Indicates an array of full name object OH_Drawing_Array. + * @param fullNameArray Indicates an array of full name object OH_Drawing_Array. * @since 14 */ -void OH_Drawing_DestroySystemFontFullNames(OH_Drawing_Array*); +void OH_Drawing_DestroySystemFontFullNames(OH_Drawing_Array* fullNameArray); #ifdef __cplusplus } diff --git a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h index 6d20d529b..d37e6e3b2 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h @@ -50,7 +50,7 @@ extern "C" { * @brief Creates an OH_Drawing_LineTypography object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. * @return Returns the pointer to the OH_Drawing_LineTypography object created. * @since 14 */ @@ -60,7 +60,7 @@ OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_Typography * @brief Releases the memory occupied by an OH_Drawing_LineTypography object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_LineTypography Indicates the pointer to an OH_Drawing_LineTypography object. + * @param lineTypography Indicates the pointer to an OH_Drawing_LineTypography object. * @since 14 */ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography); @@ -69,7 +69,7 @@ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography) * @brief Calculate the line breakpoint based on the width provided. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param lineTypography Indicates the pointer to an OH_Drawing_TypographyCreate object. * @param startIndex Indicates the starting point for the line-break calculations. * @param width Indicates the requested line-break width. * @return Returns the count of the characters from startIndex that would cause the line break. @@ -82,7 +82,7 @@ size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypo * @brief Creates a text line object based on the text range provided. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_LineTypography Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param lineTypography Indicates the pointer to an OH_Drawing_TypographyCreate object. * @param startIndex Indicates the starting index of the text range. * @param count Indicates the characters count of the text range. * @return Returns the pointer to the OH_Drawing_TextLine object created. diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 59d6488ea..10f1c9071 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef C_INCLUDE_DRAWING_TEXT_TYPOGRAPHY_H -#define C_INCLUDE_DRAWING_TEXT_TYPOGRAPHY_H - /** * @addtogroup Drawing * @{ @@ -40,6 +37,9 @@ * @version 1.0 */ +#ifndef C_INCLUDE_DRAWING_TEXT_TYPOGRAPHY_H +#define C_INCLUDE_DRAWING_TEXT_TYPOGRAPHY_H + #ifdef __cplusplus #include #include @@ -60,6 +60,9 @@ extern "C" { /** * @brief Enumerates text directions. + * + * @since 8 + * @version 1.0 */ enum OH_Drawing_TextDirection { /** Right to left (RTL) */ @@ -70,6 +73,9 @@ enum OH_Drawing_TextDirection { /** * @brief Enumerates text alignment modes. + * + * @since 8 + * @version 1.0 */ enum OH_Drawing_TextAlign { /** Left-aligned */ @@ -101,6 +107,9 @@ enum OH_Drawing_TextAlign { /** * @brief Enumerates font weights. + * + * @since 8 + * @version 1.0 */ enum OH_Drawing_FontWeight { /** Thin */ @@ -125,6 +134,9 @@ enum OH_Drawing_FontWeight { /** * @brief Enumerates text baselines. + * + * @since 8 + * @version 1.0 */ enum OH_Drawing_TextBaseline { /** Alphabetic, where the letters in alphabets like English sit on. */ @@ -135,6 +147,9 @@ enum OH_Drawing_TextBaseline { /** * @brief Enumerates text decorations. + * + * @since 8 + * @version 1.0 */ enum OH_Drawing_TextDecoration { /** No decoration. */ @@ -149,6 +164,9 @@ enum OH_Drawing_TextDecoration { /** * @brief Enumerates font styles. + * + * @since 8 + * @version 1.0 */ enum OH_Drawing_FontStyle { /** Normal style */ @@ -625,44 +643,44 @@ OH_Drawing_TypographyStyle* OH_Drawing_CreateTypographyStyle(void); * @brief Releases the memory occupied by an OH_Drawing_TypographyStyle object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @since 8 * @version 1.0 */ -void OH_Drawing_DestroyTypographyStyle(OH_Drawing_TypographyStyle*); +void OH_Drawing_DestroyTypographyStyle(OH_Drawing_TypographyStyle* style); /** * @brief Sets the text direction. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param int Indicates the text direction to set. For details, see the enum OH_Drawing_TextDirection. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param direction Indicates the text direction to set. For details, see the enum OH_Drawing_TextDirection. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTypographyTextDirection(OH_Drawing_TypographyStyle*, int /* OH_Drawing_TextDirection */); +void OH_Drawing_SetTypographyTextDirection(OH_Drawing_TypographyStyle* style, int direction); /** * @brief Sets the text alignment mode. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param int Indicates the text alignment mode to set. For details, see the enum OH_Drawing_TextAlign. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param align Indicates the text alignment mode to set. For details, see the enum OH_Drawing_TextAlign. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTypographyTextAlign(OH_Drawing_TypographyStyle*, int /* OH_Drawing_TextAlign */); +void OH_Drawing_SetTypographyTextAlign(OH_Drawing_TypographyStyle* style, int align); /** * @brief Sets the maximum number of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param int Indicates the maximum number of lines to set. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param lineNumber Indicates the maximum number of lines to set. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTypographyTextMaxLines(OH_Drawing_TypographyStyle*, int /* maxLines */); +void OH_Drawing_SetTypographyTextMaxLines(OH_Drawing_TypographyStyle* style, int lineNumber); /** * @brief Creates an OH_Drawing_TextStyle object. @@ -678,372 +696,372 @@ OH_Drawing_TextStyle* OH_Drawing_CreateTextStyle(void); * @brief Releases the memory occupied by an OH_Drawing_TextStyle object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @since 8 * @version 1.0 */ -void OH_Drawing_DestroyTextStyle(OH_Drawing_TextStyle*); +void OH_Drawing_DestroyTextStyle(OH_Drawing_TextStyle* style); /** * @brief Sets the text color. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param uint32_t Indicates the color to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param color Indicates the color to set. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleColor(OH_Drawing_TextStyle*, uint32_t /* color */); +void OH_Drawing_SetTextStyleColor(OH_Drawing_TextStyle* style, uint32_t color); /** * @brief Sets the font size. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param double Indicates the font size to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param fontSize Indicates the font size to set. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleFontSize(OH_Drawing_TextStyle*, double /* fontSize */); +void OH_Drawing_SetTextStyleFontSize(OH_Drawing_TextStyle* style, double fontSize); /** * @brief Sets the font weight. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the font weight to set. For details, see the enum OH_Drawing_FontWeight. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param fontWeight Indicates the font weight to set. For details, see the enum OH_Drawing_FontWeight. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleFontWeight(OH_Drawing_TextStyle*, int /* OH_Drawing_FontWeight */); +void OH_Drawing_SetTextStyleFontWeight(OH_Drawing_TextStyle* style, int fontWeight); /** * @brief Sets the text baseline. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the text baseline to set. For details, see the enum OH_Drawing_TextBaseline. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param baseline Indicates the text baseline to set. For details, see the enum OH_Drawing_TextBaseline. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleBaseLine(OH_Drawing_TextStyle*, int /* OH_Drawing_TextBaseline */); +void OH_Drawing_SetTextStyleBaseLine(OH_Drawing_TextStyle* style, int baseline); /** * @brief Sets the text decoration. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the text decoration to set. For details, see the enum OH_Drawing_TextDecoration. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param decoration Indicates the text decoration to set. For details, see the enum OH_Drawing_TextDecoration. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); +void OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle* style, int decoration); /** * @brief Add the text decoration. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the text decoration to add. For details, see the enum OH_Drawing_TextDecoration. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param decoration Indicates the text decoration to add. For details, see the enum OH_Drawing_TextDecoration. * @since 14 * @version 1.0 */ -void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); +void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle* style, int decoration); /** * @brief Remove the text decoration. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the text decoration to remove, shoud be match existing text decorations. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param decoration Indicates the text decoration to remove, shoud be match existing text decorations. * For details, see the enum OH_Drawing_TextDecoration. * @since 14 * @version 1.0 */ -void OH_Drawing_RemoveTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); +void OH_Drawing_RemoveTextStyleDecoration(OH_Drawing_TextStyle* style, int decoration); /** * @brief Sets the color for the text decoration. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param uint32_t Indicates the color to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param color Indicates the color to set. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleDecorationColor(OH_Drawing_TextStyle*, uint32_t /* color */); +void OH_Drawing_SetTextStyleDecorationColor(OH_Drawing_TextStyle* style, uint32_t color); /** * @brief Sets the font height. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param double Indicates the font height to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param fontHeight Indicates the font height to set. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleFontHeight(OH_Drawing_TextStyle*, double /* fontHeight */); +void OH_Drawing_SetTextStyleFontHeight(OH_Drawing_TextStyle* style, double fontHeight); /** * @brief Sets the font families. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the number of font families to set. - * @param char Indicates the pointer to the font families to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param fontFamiliesNumber Indicates the number of font families to set. + * @param fontFamilies Indicates the pointer to the font families to set. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleFontFamilies(OH_Drawing_TextStyle*, - int /* fontFamiliesNumber */, const char* fontFamilies[]); +void OH_Drawing_SetTextStyleFontFamilies(OH_Drawing_TextStyle* style, + int fontFamiliesNumber, const char* fontFamilies[]); /** * @brief Sets the font style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the font style to set. For details, see the enum OH_Drawing_FontStyle. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param fontStyle Indicates the font style to set. For details, see the enum OH_Drawing_FontStyle. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleFontStyle(OH_Drawing_TextStyle*, int /* OH_Drawing_FontStyle */); +void OH_Drawing_SetTextStyleFontStyle(OH_Drawing_TextStyle* style, int fontStyle); /** * @brief Sets the locale. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param char Indicates the pointer to the locale to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param locale Indicates the pointer to the locale to set. * @since 8 * @version 1.0 */ -void OH_Drawing_SetTextStyleLocale(OH_Drawing_TextStyle*, const char*); +void OH_Drawing_SetTextStyleLocale(OH_Drawing_TextStyle* style, const char* locale); /** * @brief Sets the foreground brush style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Brush Indicates the pointer to a brush object OH_Drawing_Brush. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param foregroundBrush Indicates the pointer to a brush object OH_Drawing_Brush. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTextStyleForegroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*); +void OH_Drawing_SetTextStyleForegroundBrush(OH_Drawing_TextStyle* style, OH_Drawing_Brush* foregroundBrush); /** * @brief Gets the foreground brush style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Brush Indicates the pointer to a brush object OH_Drawing_Brush. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param foregroundBrush Indicates the pointer to a brush object OH_Drawing_Brush. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleGetForegroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*); +void OH_Drawing_TextStyleGetForegroundBrush(OH_Drawing_TextStyle* style, OH_Drawing_Brush* foregroundBrush); /** * @brief Sets the foreground pen style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Pen Indicates the pointer to a pen object OH_Drawing_Pen. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param foregroundPen Indicates the pointer to a pen object OH_Drawing_Pen. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTextStyleForegroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*); +void OH_Drawing_SetTextStyleForegroundPen(OH_Drawing_TextStyle* style, OH_Drawing_Pen* foregroundPen); /** * @brief Gets the foreground pen style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Pen Indicates the pointer to a pen object OH_Drawing_Pen. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param foregroundPen Indicates the pointer to a pen object OH_Drawing_Pen. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleGetForegroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*); +void OH_Drawing_TextStyleGetForegroundPen(OH_Drawing_TextStyle* style, OH_Drawing_Pen* foregroundPen); /** * @brief Sets the background brush style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Brush Indicates the pointer to a brush object OH_Drawing_Brush. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param foregroundPen Indicates the pointer to a brush object OH_Drawing_Brush. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTextStyleBackgroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*); +void OH_Drawing_SetTextStyleBackgroundBrush(OH_Drawing_TextStyle* style, OH_Drawing_Brush* foregroundPen); /** * @brief Gets the background brush style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Brush Indicates the pointer to a brush object OH_Drawing_Brush. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param backgroundBrush Indicates the pointer to a brush object OH_Drawing_Brush. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleGetBackgroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*); +void OH_Drawing_TextStyleGetBackgroundBrush(OH_Drawing_TextStyle* style, OH_Drawing_Brush* backgroundBrush); /** * @brief Sets the background pen style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Pen Indicates the pointer to a pen object OH_Drawing_Pen. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param backgroundPen Indicates the pointer to a pen object OH_Drawing_Pen. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTextStyleBackgroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*); +void OH_Drawing_SetTextStyleBackgroundPen(OH_Drawing_TextStyle* style, OH_Drawing_Pen* backgroundPen); /** * @brief Gets the background pen style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Pen Indicates the pointer to a pen object OH_Drawing_Pen. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param backgroundPen Indicates the pointer to a pen object OH_Drawing_Pen. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleGetBackgroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*); +void OH_Drawing_TextStyleGetBackgroundPen(OH_Drawing_TextStyle* style, OH_Drawing_Pen* backgroundPen); /** * @brief Creates a pointer to an OH_Drawing_TypographyCreate object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param OH_Drawing_FontCollection Indicates the pointer to an OH_Drawing_FontCollection object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object. * @return Returns the pointer to the OH_Drawing_TypographyCreate object created. * @since 8 * @version 1.0 */ -OH_Drawing_TypographyCreate* OH_Drawing_CreateTypographyHandler(OH_Drawing_TypographyStyle*, - OH_Drawing_FontCollection*); +OH_Drawing_TypographyCreate* OH_Drawing_CreateTypographyHandler(OH_Drawing_TypographyStyle* style, + OH_Drawing_FontCollection* fontCollection); /** * @brief Releases the memory occupied by an OH_Drawing_TypographyCreate object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. * @since 8 * @version 1.0 */ -void OH_Drawing_DestroyTypographyHandler(OH_Drawing_TypographyCreate*); +void OH_Drawing_DestroyTypographyHandler(OH_Drawing_TypographyCreate* handler); /** * @brief Sets the text style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @since 8 * @version 1.0 */ -void OH_Drawing_TypographyHandlerPushTextStyle(OH_Drawing_TypographyCreate*, OH_Drawing_TextStyle*); +void OH_Drawing_TypographyHandlerPushTextStyle(OH_Drawing_TypographyCreate* handler, OH_Drawing_TextStyle* style); /** * @brief Sets the text content. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. - * @param char Indicates the pointer to the text content to set. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param text Indicates the pointer to the text content to set. * @since 8 * @version 1.0 */ -void OH_Drawing_TypographyHandlerAddText(OH_Drawing_TypographyCreate*, const char*); +void OH_Drawing_TypographyHandlerAddText(OH_Drawing_TypographyCreate* handler, const char* text); /** * @brief Removes the topmost style in the stack, leaving the remaining styles in effect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. * @since 8 * @version 1.0 */ -void OH_Drawing_TypographyHandlerPopTextStyle(OH_Drawing_TypographyCreate*); +void OH_Drawing_TypographyHandlerPopTextStyle(OH_Drawing_TypographyCreate* handler); /** * @brief Creates an OH_Drawing_Typography object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. * @return Returns the pointer to the OH_Drawing_Typography object created. * @since 8 * @version 1.0 */ -OH_Drawing_Typography* OH_Drawing_CreateTypography(OH_Drawing_TypographyCreate*); +OH_Drawing_Typography* OH_Drawing_CreateTypography(OH_Drawing_TypographyCreate* handler); /** * @brief Releases the memory occupied by an OH_Drawing_Typography object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @since 8 * @version 1.0 */ -void OH_Drawing_DestroyTypography(OH_Drawing_Typography*); +void OH_Drawing_DestroyTypography(OH_Drawing_Typography* typography); /** * @brief Lays out the typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param double Indicates the maximum text width to set. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param maxWidth Indicates the maximum text width to set. * @since 8 * @version 1.0 */ -void OH_Drawing_TypographyLayout(OH_Drawing_Typography*, double /* maxWidth */); +void OH_Drawing_TypographyLayout(OH_Drawing_Typography* typography, double maxWidth); /** * @brief Paints text on the canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param double Indicates the x coordinate. - * @param double Indicates the y coordinate. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param potisionX Indicates the x coordinate. + * @param potisionY Indicates the y coordinate. * @since 8 * @version 1.0 */ -void OH_Drawing_TypographyPaint(OH_Drawing_Typography*, OH_Drawing_Canvas*, - double /* potisionX */, double /* potisionY */); +void OH_Drawing_TypographyPaint(OH_Drawing_Typography* typography, OH_Drawing_Canvas* canvas, + double potisionX, double potisionY); /** * @brief Paints path text on the canvas. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. - * @param OH_Drawing_Path Indicates path information. - * @param double Indicates the distance along the path to add to the text's starting position. - * @param double Indicates the distance above(-) or below(+) the path to position the text. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param path Indicates path information. + * @param hOffset Indicates the distance along the path to add to the text's starting position. + * @param vOffset Indicates the distance above(-) or below(+) the path to position the text. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyPaintOnPath(OH_Drawing_Typography*, OH_Drawing_Canvas*, OH_Drawing_Path*, - double /* hOffset */, double /* vOffset */); +void OH_Drawing_TypographyPaintOnPath(OH_Drawing_Typography* typography, OH_Drawing_Canvas* canvas, + OH_Drawing_Path* path, double hOffset, double vOffset); /** * @brief Gets the max width. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the max width. * @since 9 * @version 1.1 */ -double OH_Drawing_TypographyGetMaxWidth(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetMaxWidth(OH_Drawing_Typography* typography); /** * @brief Gets the height. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the height. * @since 9 * @version 1.1 */ -double OH_Drawing_TypographyGetHeight(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetHeight(OH_Drawing_Typography* typography); /** * @brief Obtains the width of the longest line. You are advised to round up the return value in actual use. @@ -1051,13 +1069,13 @@ double OH_Drawing_TypographyGetHeight(OH_Drawing_Typography*); * that is, -340282346638528859811704183484516925440.000000, is returned. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Pointer to an OH_Drawing_Typography object, which is obtained by + * @param typography Pointer to an OH_Drawing_Typography object, which is obtained by * {@link OH_Drawing_CreateTypography}. * @return Returns the width of the longest line. * @since 9 * @version 1.1 */ -double OH_Drawing_TypographyGetLongestLine(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetLongestLine(OH_Drawing_Typography* typography); /** * @brief Obtains the width of the longest line with indent. You are advised to @@ -1065,168 +1083,168 @@ double OH_Drawing_TypographyGetLongestLine(OH_Drawing_Typography*); * minimum float value, that is, 0.0, is returned. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Pointer to an OH_Drawing_Typography object, which is obtained by + * @param typography Pointer to an OH_Drawing_Typography object, which is obtained by * {@link OH_Drawing_CreateTypography}. * @return Returns the width of the longest line with indent. * @since 13 * @version 1.1 */ -double OH_Drawing_TypographyGetLongestLineWithIndent(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetLongestLineWithIndent(OH_Drawing_Typography* typography); /** * @brief Gets the min intrinsic width. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography the pointer to an OH_Drawing_Typography object. * @return Returns the min intrinsic width. * @since 9 * @version 1.1 */ -double OH_Drawing_TypographyGetMinIntrinsicWidth(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetMinIntrinsicWidth(OH_Drawing_Typography* typography); /** * @brief Gets the max intrinsic width. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the max intrinsic width. * @since 9 * @version 1.1 */ -double OH_Drawing_TypographyGetMaxIntrinsicWidth(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetMaxIntrinsicWidth(OH_Drawing_Typography* typography); /** * @brief Gets the alphabetic baseline. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the alphabetic baseline. * @since 9 * @version 1.1 */ -double OH_Drawing_TypographyGetAlphabeticBaseline(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetAlphabeticBaseline(OH_Drawing_Typography* typography); /** * @brief Gets the ideographic baseline. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the ideographic baseline. * @since 9 * @version 1.1 */ -double OH_Drawing_TypographyGetIdeographicBaseline(OH_Drawing_Typography*); +double OH_Drawing_TypographyGetIdeographicBaseline(OH_Drawing_Typography* typography); /** * @brief Sets the placeholder. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. - * @param OH_Drawing_PlaceholderSpan Indicates the pointer to an OH_Drawing_PlaceholderSpan object. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param span Indicates the pointer to an OH_Drawing_PlaceholderSpan object. * @since 11 * @version 1.0 */ -void OH_Drawing_TypographyHandlerAddPlaceholder(OH_Drawing_TypographyCreate*, OH_Drawing_PlaceholderSpan*); +void OH_Drawing_TypographyHandlerAddPlaceholder(OH_Drawing_TypographyCreate* handler, OH_Drawing_PlaceholderSpan* span); /** * @brief Gets the exceed maxLines. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the exceed maxLines. * @since 11 * @version 1.0 */ -bool OH_Drawing_TypographyDidExceedMaxLines(OH_Drawing_Typography*); +bool OH_Drawing_TypographyDidExceedMaxLines(OH_Drawing_Typography* typography); /** * @brief Gets the rects for range. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param size_t Indicates the start of range to set. - * @param size_t Indicates the end of range to set. - * @param OH_Drawing_RectHeightStyle Indicates the height style to set. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param start Indicates the start of range to set. + * @param end Indicates the end of range to set. + * @param heightStyle Indicates the height style to set. * For details, see the enum OH_Drawing_RectHeightStyle. - * @param OH_Drawing_RectWidthStyle Indicates the width style to set. + * @param widthStyle Indicates the width style to set. * For details, see the enum OH_Drawing_RectWidthStyle. * @return Returns the rects for range. * @since 11 * @version 1.0 */ -OH_Drawing_TextBox* OH_Drawing_TypographyGetRectsForRange(OH_Drawing_Typography*, - size_t, size_t, OH_Drawing_RectHeightStyle, OH_Drawing_RectWidthStyle); +OH_Drawing_TextBox* OH_Drawing_TypographyGetRectsForRange(OH_Drawing_Typography* typography, + size_t start, size_t end, OH_Drawing_RectHeightStyle heightStyle, OH_Drawing_RectWidthStyle widthStyle); /** * @brief Gets the rects for placeholders. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the rects for placeholders. * @since 11 * @version 1.0 */ -OH_Drawing_TextBox* OH_Drawing_TypographyGetRectsForPlaceholders(OH_Drawing_Typography*); +OH_Drawing_TextBox* OH_Drawing_TypographyGetRectsForPlaceholders(OH_Drawing_Typography* typography); /** * @brief Gets left from textbox. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBox Indicates the pointer to an OH_Drawing_TextBox object. - * @param int Indicates the index of textbox. + * @param textbox Indicates the pointer to an OH_Drawing_TextBox object. + * @param index Indicates the index of textbox. * @return Returns left from textbox. * @since 11 * @version 1.0 */ -float OH_Drawing_GetLeftFromTextBox(OH_Drawing_TextBox*, int); +float OH_Drawing_GetLeftFromTextBox(OH_Drawing_TextBox* textbox, int index); /** * @brief Gets right from textbox. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBox Indicates the pointer to an OH_Drawing_TextBox object. - * @param int Indicates the index of textbox. + * @param textbox Indicates the pointer to an OH_Drawing_TextBox object. + * @param index Indicates the index of textbox. * @return Returns right from textbox. * @since 11 * @version 1.0 */ -float OH_Drawing_GetRightFromTextBox(OH_Drawing_TextBox*, int); +float OH_Drawing_GetRightFromTextBox(OH_Drawing_TextBox* textbox, int index); /** * @brief Gets top from textbox. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBox Indicates the pointer to an OH_Drawing_TextBox object. - * @param int Indicates the index of textbox. + * @param textbox Indicates the pointer to an OH_Drawing_TextBox object. + * @param index Indicates the index of textbox. * @return Returns top from textbox. * @since 11 * @version 1.0 */ -float OH_Drawing_GetTopFromTextBox(OH_Drawing_TextBox*, int); +float OH_Drawing_GetTopFromTextBox(OH_Drawing_TextBox* textbox, int index); /** * @brief Gets bottom from textbox. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBox Indicates the pointer to an OH_Drawing_TextBox object. - * @param int Indicates the index of textbox. + * @param textbox Indicates the pointer to an OH_Drawing_TextBox object. + * @param index Indicates the index of textbox. * @return Returns bottom from textbox. * @since 11 * @version 1.0 */ -float OH_Drawing_GetBottomFromTextBox(OH_Drawing_TextBox*, int); +float OH_Drawing_GetBottomFromTextBox(OH_Drawing_TextBox* textbox, int index); /** * @brief Gets direction from textbox. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBox Indicates the pointer to an OH_Drawing_TextBox object. - * @param int Indicates the index of textbox. + * @param textbox Indicates the pointer to an OH_Drawing_TextBox object. + * @param index Indicates the index of textbox. * @return Returns direction from textbox. * @since 11 * @version 1.0 */ -int OH_Drawing_GetTextDirectionFromTextBox(OH_Drawing_TextBox*, int); +int OH_Drawing_GetTextDirectionFromTextBox(OH_Drawing_TextBox* textbox, int index); /** * @brief Gets size of textbox. @@ -1243,29 +1261,29 @@ size_t OH_Drawing_GetSizeOfTextBox(OH_Drawing_TextBox*); * @brief Gets the glyphposition at coordinate. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param double Indicates the positionX of typography to set. - * @param double Indicates the positionY of typography to set. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param dx Indicates the positionX of typography to set. + * @param dy Indicates the positionY of typography to set. * @return Returns the glyphposition at coordinate. * @since 11 * @version 1.0 */ -OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinate(OH_Drawing_Typography*, - double, double); +OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinate(OH_Drawing_Typography* typography, + double dx, double dy); /** * @brief Gets the glyphposition at coordinate with cluster. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param double Indicates the positionX of typography to set. - * @param double Indicates the positionY of typography to set. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param dx Indicates the positionX of typography to set. + * @param dy Indicates the positionY of typography to set. * @return Returns the glyphposition at coordinate with cluster. * @since 11 * @version 1.0 */ -OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster(OH_Drawing_Typography*, - double, double); +OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster( + OH_Drawing_Typography* typography, double dx, double dy); /** * @brief Gets position from position and affinity. @@ -1282,24 +1300,24 @@ size_t OH_Drawing_GetPositionFromPositionAndAffinity(OH_Drawing_PositionAndAffin * @brief Gets affinity from position and affinity. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_PositionAndAffinity Indicates the pointer to an OH_Drawing_PositionAndAffinity object. + * @param positionandaffinity Indicates the pointer to an OH_Drawing_PositionAndAffinity object. * @return Returns affinity from position and affinity. * @since 11 * @version 1.0 */ -int OH_Drawing_GetAffinityFromPositionAndAffinity(OH_Drawing_PositionAndAffinity*); +int OH_Drawing_GetAffinityFromPositionAndAffinity(OH_Drawing_PositionAndAffinity* positionandaffinity); /** * @brief Gets the word boundary. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param size_t Indicates the size of text to set. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param offset Indicates the size of text to set. * @return Returns the word boundary. * @since 11 * @version 1.0 */ -OH_Drawing_Range* OH_Drawing_TypographyGetWordBoundary(OH_Drawing_Typography*, size_t); +OH_Drawing_Range* OH_Drawing_TypographyGetWordBoundary(OH_Drawing_Typography* typography, size_t offset); /** * @brief Gets start from range. @@ -1338,149 +1356,150 @@ size_t OH_Drawing_TypographyGetLineCount(OH_Drawing_Typography*); * @brief Sets the decoration style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the text decoration style to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param decorationStyle Indicates the text decoration style to set. * For details, see the enum OH_Drawing_TextDecorationStyle. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTextStyleDecorationStyle(OH_Drawing_TextStyle*, int); +void OH_Drawing_SetTextStyleDecorationStyle(OH_Drawing_TextStyle* style, int decorationStyle); /** * @brief Sets the decoration thickness scale. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param double Indicates the thickness scale of text decoration to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param decorationThicknessScale Indicates the thickness scale of text decoration to set. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTextStyleDecorationThicknessScale(OH_Drawing_TextStyle*, double); +void OH_Drawing_SetTextStyleDecorationThicknessScale(OH_Drawing_TextStyle* style, double decorationThicknessScale); /** * @brief Sets the letter spacing. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param double Indicates the letter space to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param letterSpacing Indicates the letter space to set. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTextStyleLetterSpacing(OH_Drawing_TextStyle*, double); +void OH_Drawing_SetTextStyleLetterSpacing(OH_Drawing_TextStyle* style, double letterSpacing); /** * @brief Sets the word spacing. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param double Indicates the word space to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param wordSpacing Indicates the word space to set. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTextStyleWordSpacing(OH_Drawing_TextStyle*, double); +void OH_Drawing_SetTextStyleWordSpacing(OH_Drawing_TextStyle* style, double wordSpacing); /** * @brief Sets the half leading. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param bool Indicates the half leading to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param halfLeading Indicates the half leading to set. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTextStyleHalfLeading(OH_Drawing_TextStyle*, bool); +void OH_Drawing_SetTextStyleHalfLeading(OH_Drawing_TextStyle* style, bool halfLeading); /** * @brief Sets the ellipsis. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param char* Indicates the pointer to ellipsis style. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param ellipsis Indicates the pointer to ellipsis style. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTextStyleEllipsis(OH_Drawing_TextStyle*, const char*); +void OH_Drawing_SetTextStyleEllipsis(OH_Drawing_TextStyle* style, const char* ellipsis); /** * @brief Sets the ellipsis modal. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param int Indicates the ellipsis model to set. For details, see the enum OH_Drawing_EllipsisModal. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param ellipsisModal Indicates the ellipsis model to set. For details, see the enum OH_Drawing_EllipsisModal. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTextStyleEllipsisModal(OH_Drawing_TextStyle*, int); +void OH_Drawing_SetTextStyleEllipsisModal(OH_Drawing_TextStyle* style, int ellipsisModal); /** * @brief Sets the break strategy. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param int Indicates the break strategy to set. For details, see the enum OH_Drawing_BreakStrategy. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param breakStrategy Indicates the break strategy to set. For details, see the enum OH_Drawing_BreakStrategy. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTypographyTextBreakStrategy(OH_Drawing_TypographyStyle*, int); +void OH_Drawing_SetTypographyTextBreakStrategy(OH_Drawing_TypographyStyle* style, int breakStrategy); /** * @brief Sets the word break type. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param int Indicates the word break type to set. For details, see the enum OH_Drawing_WordBreakType. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param wordBreakType Indicates the word break type to set. For details, see the enum OH_Drawing_WordBreakType. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTypographyTextWordBreakType(OH_Drawing_TypographyStyle*, int); +void OH_Drawing_SetTypographyTextWordBreakType(OH_Drawing_TypographyStyle* style, int wordBreakType); /** * @brief Sets the ellipsis modal. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param int Indicates the ellipsis modal to set. For details, see the enum OH_Drawing_EllipsisModal. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param ellipsisModal Indicates the ellipsis modal to set. For details, see the enum OH_Drawing_EllipsisModal. * @since 11 * @version 1.0 */ -void OH_Drawing_SetTypographyTextEllipsisModal(OH_Drawing_TypographyStyle*, int); +void OH_Drawing_SetTypographyTextEllipsisModal(OH_Drawing_TypographyStyle* style, int ellipsisModal); /** * @brief get line height. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param int Indicates the line number. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param lineNumber Indicates the line number. * @return Returns line height. * @since 11 * @version 1.0 */ -double OH_Drawing_TypographyGetLineHeight(OH_Drawing_Typography*, int); +double OH_Drawing_TypographyGetLineHeight(OH_Drawing_Typography* typography, int lineNumber); /** * @brief get line width. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param int Indicates the line number. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param lineNumber Indicates the line number. * @return Returns line width. * @since 11 * @version 1.0 */ -double OH_Drawing_TypographyGetLineWidth(OH_Drawing_Typography*, int); +double OH_Drawing_TypographyGetLineWidth(OH_Drawing_Typography* typography, int lineNumber); /** * @brief get line text range. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. - * @param int Indicates the line number. - * @param bool Indicates whether spaces are contained. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. + * @param lineNumber Indicates the line number. + * @param includeSpaces Indicates whether spaces are contained. * @return Returns line text range. * @since 12 * @version 1.0 */ -OH_Drawing_Range* OH_Drawing_TypographyGetLineTextRange(OH_Drawing_Typography*, int, bool); +OH_Drawing_Range* OH_Drawing_TypographyGetLineTextRange(OH_Drawing_Typography* typography, + int lineNumber, bool includeSpaces); /** * @brief Creates an OH_Drawing_FontDescriptor object. @@ -1496,11 +1515,11 @@ OH_Drawing_FontDescriptor* OH_Drawing_CreateFontDescriptor(void); * @brief Releases the memory occupied by an OH_Drawing_FontDescriptor object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontDescriptor the pointer to the font descriptor object OH_Drawing_FontDescriptor. + * @param descriptor the pointer to the font descriptor object OH_Drawing_FontDescriptor. * @since 12 * @version 1.0 */ -void OH_Drawing_DestroyFontDescriptor(OH_Drawing_FontDescriptor*); +void OH_Drawing_DestroyFontDescriptor(OH_Drawing_FontDescriptor* descriptor); /** * @brief Creates an OH_Drawing_FontParser object. @@ -1516,57 +1535,57 @@ OH_Drawing_FontParser* OH_Drawing_CreateFontParser(void); * @brief Releases the memory occupied by an OH_Drawing_FontParser object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontParser Indicates the pointer to the font parser object OH_Drawing_FontParser. + * @param parser Indicates the pointer to the font parser object OH_Drawing_FontParser. * @since 12 * @version 1.0 */ -void OH_Drawing_DestroyFontParser(OH_Drawing_FontParser*); +void OH_Drawing_DestroyFontParser(OH_Drawing_FontParser* parser); /** * @brief Gets a list of system font names. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontParser Indicates the pointer to the font parser object OH_Drawing_FontParser. - * @param size_t Returns the number of obtained system font names. + * @param fontParser Indicates the pointer to the font parser object OH_Drawing_FontParser. + * @param num Returns the number of obtained system font names. * @return Returns a list of obtained system fonts. * @since 12 * @version 1.0 */ -char** OH_Drawing_FontParserGetSystemFontList(OH_Drawing_FontParser*, size_t*); +char** OH_Drawing_FontParserGetSystemFontList(OH_Drawing_FontParser* fontParser, size_t* num); /** * @brief Releases the memory occupied by a list of system font names. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param char** Indicates the pointer to a list of system font names. - * @param size_t The number of obtained system font names. + * @param fontList Indicates the pointer to a list of system font names. + * @param num The number of obtained system font names. * @since 12 * @version 1.0 */ -void OH_Drawing_DestroySystemFontList(char**, size_t); +void OH_Drawing_DestroySystemFontList(char** fontList, size_t num); /** * @brief Gets information about the system font by font name. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontParser Indicates the pointer to the font parser object OH_Drawing_FontParser. - * @param char** font name. + * @param fontParser Indicates the pointer to the font parser object OH_Drawing_FontParser. + * @param name font name. * @return Returns system fonts information. * @since 12 * @version 1.0 */ -OH_Drawing_FontDescriptor* OH_Drawing_FontParserGetFontByName(OH_Drawing_FontParser*, const char*); +OH_Drawing_FontDescriptor* OH_Drawing_FontParserGetFontByName(OH_Drawing_FontParser* fontParser, const char* name); /** * @brief Get line metrics information. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. * @return Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. * @since 12 * @version 1.0 */ -OH_Drawing_LineMetrics* OH_Drawing_TypographyGetLineMetrics(OH_Drawing_Typography*); +OH_Drawing_LineMetrics* OH_Drawing_TypographyGetLineMetrics(OH_Drawing_Typography* typography); /** * @brief Get the number of lines. @@ -1583,334 +1602,338 @@ size_t OH_Drawing_LineMetricsGetSize(OH_Drawing_LineMetrics*); * @brief Releases the memory occupied by line metrics. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_LineMetrics Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. + * @param lineMetrics Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. * @since 12 * @version 1.0 */ -void OH_Drawing_DestroyLineMetrics(OH_Drawing_LineMetrics*); +void OH_Drawing_DestroyLineMetrics(OH_Drawing_LineMetrics* lineMetrics); /** * @brief Gets the specified line by line number. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. - * @param int Line number. - * @param OH_Drawing_LineMetrics Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. + * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @param lineNumber Line number. + * @param lineMetric Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. * @return Whether the line metrics was obtained. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyGetLineMetricsAt(OH_Drawing_Typography*, int, OH_Drawing_LineMetrics*); +bool OH_Drawing_TypographyGetLineMetricsAt(OH_Drawing_Typography* typography, + int lineNumber, OH_Drawing_LineMetrics* lineMetric); /** * @brief Sets the ellipsis of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. - * @param char Indicates the line textellipsis. + * @param style Indicates the pointer to a typography object OH_Drawing_Typography. + * @param ellipsis Indicates the line textellipsis. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextEllipsis(OH_Drawing_TypographyStyle*, const char*); +void OH_Drawing_SetTypographyTextEllipsis(OH_Drawing_TypographyStyle* style, const char* ellipsis); /** * @brief Sets the locale of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param char Indicates the pointer to the locale to set. + * @param locale Indicates the pointer to the locale to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLocale(OH_Drawing_TypographyStyle*, const char*); +void OH_Drawing_SetTypographyTextLocale(OH_Drawing_TypographyStyle* style, const char* locale); /** * @brief Sets the textSplitRatio of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param float Indicates the textSplitRatio of lines to set. + * @param textSplitRatio Indicates the textSplitRatio of lines to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextSplitRatio(OH_Drawing_TypographyStyle*, float); +void OH_Drawing_SetTypographyTextSplitRatio(OH_Drawing_TypographyStyle* style, float textSplitRatio); /** * @brief Gets the TextStyle of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Returns line text textstyle. * @since 12 * @version 1.0 */ -OH_Drawing_TextStyle* OH_Drawing_TypographyGetTextStyle(OH_Drawing_TypographyStyle*); +OH_Drawing_TextStyle* OH_Drawing_TypographyGetTextStyle(OH_Drawing_TypographyStyle* style); /** * @brief Gets the EffectiveAlign of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Returns line text align. * @since 12 * @version 1.0 */ -int OH_Drawing_TypographyGetEffectiveAlignment(OH_Drawing_TypographyStyle*); +int OH_Drawing_TypographyGetEffectiveAlignment(OH_Drawing_TypographyStyle* style); /** * @brief Gets the UnlimitedLines of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Returns whether the text has a maximum line limit, * with true indicating a maximum line limit and false indicating no maximum line limit. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyIsLineUnlimited(OH_Drawing_TypographyStyle*); +bool OH_Drawing_TypographyIsLineUnlimited(OH_Drawing_TypographyStyle* style); /** * @brief Gets the IsEllipsized of lines in a text file. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Returns whether the text has ellipsis, * true meaning there is an ellipsis and false meaning there is no ellipsis. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyIsEllipsized(OH_Drawing_TypographyStyle*); +bool OH_Drawing_TypographyIsEllipsized(OH_Drawing_TypographyStyle* style); /** * @brief set line textstyle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param handler Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextStyle(OH_Drawing_TypographyStyle*, OH_Drawing_TextStyle*); +void OH_Drawing_SetTypographyTextStyle(OH_Drawing_TypographyStyle* handler, OH_Drawing_TextStyle* style); /** * @brief get line fontmetrics. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_Font_Metrics Indicates the pointer to a font metrics object OH_Drawing_Font_Metrics. + * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param fontmetrics Indicates the pointer to a font metrics object OH_Drawing_Font_Metrics. * @return Whether the font metrics was obtained. * @since 12 * @version 1.0 */ -bool OH_Drawing_TextStyleGetFontMetrics(OH_Drawing_Typography*, OH_Drawing_TextStyle*, OH_Drawing_Font_Metrics*); +bool OH_Drawing_TextStyleGetFontMetrics(OH_Drawing_Typography* typography, + OH_Drawing_TextStyle* style, OH_Drawing_Font_Metrics* fontmetrics); /** * @brief Gets the position of the specified line or the first text of the specified line. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. - * @param int Line number. - * @param bool True is the information for the whole line, and false is the information to get the first character - * @param bool Whether the text width contains whitespace. - * @param OH_Drawing_LineMetrics Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. + * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @param lineNumber Line number. + * @param oneLine True is the information for the whole line, and false is the information to get the first character + * @param includeWhitespace Whether the text width contains whitespace. + * @param drawingLineMetrics Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. * @return return whether the information was successfully fetched. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyGetLineInfo(OH_Drawing_Typography*, int, bool, bool, OH_Drawing_LineMetrics*); +bool OH_Drawing_TypographyGetLineInfo(OH_Drawing_Typography* typography, int lineNumber, bool oneLine, + bool includeWhitespace, OH_Drawing_LineMetrics* drawingLineMetrics); /** * @brief Sets the font weight of text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param int Indicates the font weight of text typography to set. For details, + * @param weight Indicates the font weight of text typography to set. For details, * see the enum OH_Drawing_FontWeight. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextFontWeight(OH_Drawing_TypographyStyle*, int); +void OH_Drawing_SetTypographyTextFontWeight(OH_Drawing_TypographyStyle* style, int weight); /** * @brief Sets the font style of text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param int Indicates the font style of text typography to set. For details, + * @param fontStyle Indicates the font style of text typography to set. For details, * see the enum OH_Drawing_FontStyle. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextFontStyle(OH_Drawing_TypographyStyle*, int); +void OH_Drawing_SetTypographyTextFontStyle(OH_Drawing_TypographyStyle* style, int fontStyle); /** * @brief Sets the font family of text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param char Indicates the pointer to the font family of text typography to set. + * @param fontFamily Indicates the pointer to the font family of text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextFontFamily(OH_Drawing_TypographyStyle*, const char*); +void OH_Drawing_SetTypographyTextFontFamily(OH_Drawing_TypographyStyle* style, const char* fontFamily); /** * @brief Sets the font size of text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param double Indicates the font size of text typography to set. + * @param fontSize Indicates the font size of text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextFontSize(OH_Drawing_TypographyStyle*, double); +void OH_Drawing_SetTypographyTextFontSize(OH_Drawing_TypographyStyle* style, double fontSize); /** * @brief Sets the font height of text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param double Indicates the font height of text typography to set. + * @param fontHeight Indicates the font height of text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextFontHeight(OH_Drawing_TypographyStyle*, double); +void OH_Drawing_SetTypographyTextFontHeight(OH_Drawing_TypographyStyle* style, double fontHeight); /** * @brief Sets the half leading of text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param bool Indicates the half leading of text typography to set. + * @param halfLeading Indicates the half leading of text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextHalfLeading(OH_Drawing_TypographyStyle*, bool); +void OH_Drawing_SetTypographyTextHalfLeading(OH_Drawing_TypographyStyle* style, bool halfLeading); /** * @brief Sets whether to enable line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param bool Indicates whether the line style for text typography is used. + * @param useLineStyle Indicates whether the line style for text typography is used. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextUseLineStyle(OH_Drawing_TypographyStyle*, bool); +void OH_Drawing_SetTypographyTextUseLineStyle(OH_Drawing_TypographyStyle* style, bool useLineStyle); /** * @brief Sets the font weight of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param int Indicates the font weight of line style for text typography to set. + * @param weight Indicates the font weight of line style for text typography to set. * For details, see the enum OH_Drawing_FontWeight. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleFontWeight(OH_Drawing_TypographyStyle*, int); +void OH_Drawing_SetTypographyTextLineStyleFontWeight(OH_Drawing_TypographyStyle* style, int weight); /** * @brief Sets the font style of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param int Indicates the font style of line style for text typography to set. For details, + * @param fontStyle Indicates the font style of line style for text typography to set. For details, * see the enum OH_Drawing_FontStyle. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleFontStyle(OH_Drawing_TypographyStyle*, int); +void OH_Drawing_SetTypographyTextLineStyleFontStyle(OH_Drawing_TypographyStyle* style, int fontStyle); /** * @brief Sets the font families of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param int Indicates the number of font families to set. - * @param char Indicates the pointer to the font families of line style for text typography to set. + * @param fontFamiliesNumber Indicates the number of font families to set. + * @param fontFamilies Indicates the pointer to the font families of line style for text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleFontFamilies(OH_Drawing_TypographyStyle*, int, const char* fontFamilies[]); +void OH_Drawing_SetTypographyTextLineStyleFontFamilies(OH_Drawing_TypographyStyle* style, + int fontFamiliesNumber, const char* fontFamilies[]); /** * @brief Sets the font size of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param double Indicates the font size of line style for text typography to set. + * @param lineStyleFontSize Indicates the font size of line style for text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleFontSize(OH_Drawing_TypographyStyle*, double); +void OH_Drawing_SetTypographyTextLineStyleFontSize(OH_Drawing_TypographyStyle* style, double lineStyleFontSize); /** * @brief Sets the font height of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param double Indicates the font height of line style for text typography to set. + * @param lineStyleFontHeight Indicates the font height of line style for text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleFontHeight(OH_Drawing_TypographyStyle*, double); +void OH_Drawing_SetTypographyTextLineStyleFontHeight(OH_Drawing_TypographyStyle* style, double lineStyleFontHeight); /** * @brief Sets the half leading of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param bool Indicates the half leading of line for text typography to set. + * @param lineStyleHalfLeading Indicates the half leading of line for text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleHalfLeading(OH_Drawing_TypographyStyle*, bool); +void OH_Drawing_SetTypographyTextLineStyleHalfLeading(OH_Drawing_TypographyStyle* style, bool lineStyleHalfLeading); /** * @brief Sets the spacing scale of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param double Indicates the space scale of line for text typography to set. + * @param spacingScale Indicates the space scale of line for text typography to set. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleSpacingScale(OH_Drawing_TypographyStyle*, double); +void OH_Drawing_SetTypographyTextLineStyleSpacingScale(OH_Drawing_TypographyStyle* style, double spacingScale); /** * @brief Sets whether only line style is enabled for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. - * @param bool Indicates the line style for text typography to set only. + * @param lineStyleOnly Indicates the line style for text typography to set only. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyTextLineStyleOnly(OH_Drawing_TypographyStyle*, bool); +void OH_Drawing_SetTypographyTextLineStyleOnly(OH_Drawing_TypographyStyle* style, bool lineStyleOnly); /** * @brief Creates an OH_Drawing_TextShadow object. @@ -1926,194 +1949,197 @@ OH_Drawing_TextShadow* OH_Drawing_CreateTextShadow(void); * @brief Releases the memory occupied by the text shadow object OH_Drawing_TextShadow. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextShadow Indicates the pointer to the text shadow object OH_Drawing_TextShadow. + * @param shadow Indicates the pointer to the text shadow object OH_Drawing_TextShadow. * @since 12 * @version 1.0 */ -void OH_Drawing_DestroyTextShadow(OH_Drawing_TextShadow*); +void OH_Drawing_DestroyTextShadow(OH_Drawing_TextShadow* shadow); /** * @brief Gets the vector of TextShadow in TextStyle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. * @param int Indicates the number in vector to set. - * @param OH_Drawing_TextShadow Indicates the pointer to the text shadow object OH_Drawing_TextShadow. + * @param style Indicates the pointer to the text shadow object OH_Drawing_TextShadow. * @return Returns the vector of TextShadow. * @since 12 * @version 1.0 */ -OH_Drawing_TextShadow* OH_Drawing_TextStyleGetShadows(OH_Drawing_TextStyle*); +OH_Drawing_TextShadow* OH_Drawing_TextStyleGetShadows(OH_Drawing_TextStyle* style); /** * @brief Gets the size of vector of TextShadow in TextStyle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. * @return Returns the size of vector. * @since 12 * @version 1.0 */ -int OH_Drawing_TextStyleGetShadowCount(OH_Drawing_TextStyle*); +int OH_Drawing_TextStyleGetShadowCount(OH_Drawing_TextStyle* style); /** * @brief Adds element in vector of TextShadow in TextStyle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param OH_Drawing_TextShadow Indicates the pointer to the text shadow object OH_Drawing_TextShadow. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param shadow Indicates the pointer to the text shadow object OH_Drawing_TextShadow. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleAddShadow(OH_Drawing_TextStyle*, const OH_Drawing_TextShadow*); +void OH_Drawing_TextStyleAddShadow(OH_Drawing_TextStyle* style, const OH_Drawing_TextShadow* shadow); /** * @brief clear elements in vector of TextShadow in TextStyle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleClearShadows(OH_Drawing_TextStyle*); +void OH_Drawing_TextStyleClearShadows(OH_Drawing_TextStyle* style); /** * @brief Gets element in vector of TextShadow with index. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to a text style object OH_Drawing_TextStyle. - * @param int Indicates the index to set. + * @param style Indicates the pointer to a text style object OH_Drawing_TextStyle. + * @param index Indicates the index to set. * @return Returns the pointer to element with the index in vector of the text style object * OH_Drawing_TextStyle. * @since 12 * @version 1.0 */ -OH_Drawing_TextShadow* OH_Drawing_TextStyleGetShadowWithIndex(OH_Drawing_TextStyle*, int); +OH_Drawing_TextShadow* OH_Drawing_TextStyleGetShadowWithIndex(OH_Drawing_TextStyle* style, int index); /** * @brief Set indents of the typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. - * @param float Indicates the pointer to the indents to set. + * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @param indentsNumber Indicates the pointer to the indents to set. + * @param indents Indicates the pointer to the indents to set. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographySetIndents(OH_Drawing_Typography*, int, const float indents[]); +void OH_Drawing_TypographySetIndents(OH_Drawing_Typography* typography, int indentsNumber, const float indents[]); /** * @brief Gets element with index in vector of Indents. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to a typography object OH_Drawing_Typography. - * @param int Indicates the index to set. + * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. + * @param index Indicates the index to set. * @return float Indicates the element with the index in vector of Indents. * @since 12 * @version 1.0 */ -float OH_Drawing_TypographyGetIndentsWithIndex(OH_Drawing_Typography*, int); +float OH_Drawing_TypographyGetIndentsWithIndex(OH_Drawing_Typography* typography, int index); /** * @brief Releases the memory occupied by vector with the text shadow object OH_Drawing_TextShadow. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param Indicates the pointer to the text shadow object OH_Drawing_TextShadow. + * @param shadow the pointer to the text shadow object OH_Drawing_TextShadow. * @since 12 * @version 1.0 */ -void OH_Drawing_DestroyTextShadows(OH_Drawing_TextShadow*); +void OH_Drawing_DestroyTextShadows(OH_Drawing_TextShadow* shadow); /** * @brief Set mode of applying the leading over and under text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param heightMode Indicates the mode to set. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyTextSetHeightBehavior(OH_Drawing_TypographyStyle*, OH_Drawing_TextHeightBehavior heightMode); +void OH_Drawing_TypographyTextSetHeightBehavior(OH_Drawing_TypographyStyle* style, + OH_Drawing_TextHeightBehavior heightMode); /** * @brief Get mode of applying the leading over and under text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @return Returns the mode. * @since 12 * @version 1.0 */ -OH_Drawing_TextHeightBehavior OH_Drawing_TypographyTextGetHeightBehavior(OH_Drawing_TypographyStyle*); +OH_Drawing_TextHeightBehavior OH_Drawing_TypographyTextGetHeightBehavior(OH_Drawing_TypographyStyle* style); /** * @brief Set struct of background rect and styleId of text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param OH_Drawing_RectStyle_Info Indicates the pointer to an OH_Drawing_RectStyle_Info object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param rectStyleInfo Indicates the pointer to an OH_Drawing_RectStyle_Info object. * @param styleId Indicates the styleId of text to set. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleSetBackgroundRect(OH_Drawing_TextStyle*, const OH_Drawing_RectStyle_Info*, int styleId); +void OH_Drawing_TextStyleSetBackgroundRect(OH_Drawing_TextStyle* style, + const OH_Drawing_RectStyle_Info* rectStyleInfo, int styleId); /** * @brief Add symbols in creating typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyCreate Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. * @param symbol Indicates the symbol to set. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyHandlerAddSymbol(OH_Drawing_TypographyCreate*, uint32_t symbol); +void OH_Drawing_TypographyHandlerAddSymbol(OH_Drawing_TypographyCreate* handler, uint32_t symbol); /** * @brief Add font feature. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param tag Indicates the pointer to the tag to set. * @param value Indicates the value to set. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleAddFontFeature(OH_Drawing_TextStyle*, const char* tag, int value); +void OH_Drawing_TextStyleAddFontFeature(OH_Drawing_TextStyle* style, const char* tag, int value); /** * @brief Add font variation. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param char* Indicates the pointer to font variation axis. - * @param float Indicates the font variation value to set. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param axis Indicates the pointer to font variation axis. + * @param value Indicates the font variation value to set. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleAddFontVariation(OH_Drawing_TextStyle*, const char* /* axis */, const float /* value */); +void OH_Drawing_TextStyleAddFontVariation(OH_Drawing_TextStyle* style, const char* axis, const float value); /** * @brief Get all font features. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return OH_Drawing_FontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature. * Get size of font feature by OH_Drawing_TextStyleGetFontFeatureSize. * @since 12 * @version 1.0 */ -OH_Drawing_FontFeature* OH_Drawing_TextStyleGetFontFeatures(OH_Drawing_TextStyle*); +OH_Drawing_FontFeature* OH_Drawing_TextStyleGetFontFeatures(OH_Drawing_TextStyle* style); /** * @brief Release the memory occupied by array of structures of font features. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature. + * @param fontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature. * @param fontFeatureSize Indicates the size of array of structures of OH_Drawing_FontFeature. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleDestroyFontFeatures(OH_Drawing_FontFeature*, size_t fontFeatureSize); +void OH_Drawing_TextStyleDestroyFontFeatures(OH_Drawing_FontFeature* fontFeature, size_t fontFeatureSize); /** * @brief Get size of font features. @@ -2130,33 +2156,33 @@ size_t OH_Drawing_TextStyleGetFontFeatureSize(OH_Drawing_TextStyle*); * @brief Clear font features. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleClearFontFeature(OH_Drawing_TextStyle*); +void OH_Drawing_TextStyleClearFontFeature(OH_Drawing_TextStyle* style); /** * @brief Set baseline shift of text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param lineShift Indicates the baseline shift to set. * @since 12 * @version 1.0 */ -void OH_Drawing_TextStyleSetBaselineShift(OH_Drawing_TextStyle*, double lineShift); +void OH_Drawing_TextStyleSetBaselineShift(OH_Drawing_TextStyle* style, double lineShift); /** * @brief Get baseline shift of text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns the baseline shift. * @since 12 * @version 1.0 */ -double OH_Drawing_TextStyleGetBaselineShift(OH_Drawing_TextStyle*); +double OH_Drawing_TextStyleGetBaselineShift(OH_Drawing_TextStyle* style); /** * @brief Gets the text color. @@ -2173,57 +2199,57 @@ uint32_t OH_Drawing_TextStyleGetColor(OH_Drawing_TextStyle*); * @brief Gets text decoration style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns text decoration style. * @since 12 * @version 1.0 */ -OH_Drawing_TextDecorationStyle OH_Drawing_TextStyleGetDecorationStyle(OH_Drawing_TextStyle*); +OH_Drawing_TextDecorationStyle OH_Drawing_TextStyleGetDecorationStyle(OH_Drawing_TextStyle* style); /** * @brief Gets font weight. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns font Weight. * @since 12 * @version 1.0 */ -OH_Drawing_FontWeight OH_Drawing_TextStyleGetFontWeight(OH_Drawing_TextStyle*); +OH_Drawing_FontWeight OH_Drawing_TextStyleGetFontWeight(OH_Drawing_TextStyle* style); /** * @brief Gets font style. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns font style. * @since 12 * @version 1.0 */ -OH_Drawing_FontStyle OH_Drawing_TextStyleGetFontStyle(OH_Drawing_TextStyle*); +OH_Drawing_FontStyle OH_Drawing_TextStyleGetFontStyle(OH_Drawing_TextStyle* style); /** * @brief Gets the font baseline. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns the font baseline. * @since 12 * @version 1.0 */ -OH_Drawing_TextBaseline OH_Drawing_TextStyleGetBaseline(OH_Drawing_TextStyle*); +OH_Drawing_TextBaseline OH_Drawing_TextStyleGetBaseline(OH_Drawing_TextStyle* style); /** * @brief Gets a list of font families. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param num Indicates count of font families result. * @return Returns a list of font families. * @since 12 * @version 1.0 */ -char** OH_Drawing_TextStyleGetFontFamilies(OH_Drawing_TextStyle*, size_t* num); +char** OH_Drawing_TextStyleGetFontFamilies(OH_Drawing_TextStyle* style, size_t* num); /** * @brief Releases the memory occupied by a list of font families. @@ -2240,76 +2266,76 @@ void OH_Drawing_TextStyleDestroyFontFamilies(char** fontFamilies, size_t num); * @brief Gets font size. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns font size. * @since 12 * @version 1.0 */ -double OH_Drawing_TextStyleGetFontSize(OH_Drawing_TextStyle*); +double OH_Drawing_TextStyleGetFontSize(OH_Drawing_TextStyle* style); /** * @brief Gets the letter spacing of the text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns the size of the letter spacing. * @since 12 * @version 1.0 */ -double OH_Drawing_TextStyleGetLetterSpacing(OH_Drawing_TextStyle*); +double OH_Drawing_TextStyleGetLetterSpacing(OH_Drawing_TextStyle* style); /** * @brief Gets the word spacing of the text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns word spacing size. * @since 12 * @version 1.0 */ -double OH_Drawing_TextStyleGetWordSpacing(OH_Drawing_TextStyle*); +double OH_Drawing_TextStyleGetWordSpacing(OH_Drawing_TextStyle* style); /** * @brief Gets font height. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns font height. * @since 12 * @version 1.0 */ -double OH_Drawing_TextStyleGetFontHeight(OH_Drawing_TextStyle*); +double OH_Drawing_TextStyleGetFontHeight(OH_Drawing_TextStyle* style); /** * @brief Gets whether to set the text to half line spacing. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns true indicates that the spacing takes effect, * false indicates that the spacing does not take effect. * @since 12 * @version 1.0 */ -bool OH_Drawing_TextStyleGetHalfLeading(OH_Drawing_TextStyle*); +bool OH_Drawing_TextStyleGetHalfLeading(OH_Drawing_TextStyle* style); /** * @brief Gets the locale. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns a locale of data type as a pointer to a char. As with the TextStyle lifecycle. * No release is required and the return value is invalidated after the set method is called. * @since 12 * @version 1.0 */ -const char* OH_Drawing_TextStyleGetLocale(OH_Drawing_TextStyle*); +const char* OH_Drawing_TextStyleGetLocale(OH_Drawing_TextStyle* style); /** * @brief Sets the text style, including font weight, font width and font slant. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. - * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @param drawingTextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param fontStyle Indicates an OH_Drawing_FontStyleStruct object. * @since 12 * @version 1.0 */ @@ -2320,7 +2346,7 @@ void OH_Drawing_SetTextStyleFontStyleStruct(OH_Drawing_TextStyle* drawingTextSty * @brief Gets the text style, including font weight, font width and font slant. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param drawingTextStyle Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns the OH_Drawing_FontStyleStruct object getted. * @since 12 * @version 1.0 @@ -2331,8 +2357,8 @@ OH_Drawing_FontStyleStruct OH_Drawing_TextStyleGetFontStyleStruct(OH_Drawing_Tex * @brief Sets the typography style, including font weight, font width and font slant. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @param drawingStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param fontStyle Indicates an OH_Drawing_FontStyleStruct object. * @since 12 * @version 1.0 */ @@ -2343,7 +2369,7 @@ void OH_Drawing_SetTypographyStyleFontStyleStruct(OH_Drawing_TypographyStyle* dr * @brief Gets the typography style, including font weight, font width and font slant. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param drawingStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. * @return Returns the OH_Drawing_FontStyleStruct object getted. * @since 12 * @version 1.0 @@ -2378,9 +2404,9 @@ bool OH_Drawing_TextStyleIsEqualByFont(const OH_Drawing_TextStyle* style, const * @brief Gets whether two TextStyle objects match attributes * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param textStyleType Indicates enumerates of text style type. - * @param style Indicates source of comparison OH_Drawing_TextStyle object. - * @param comparedStyle Indicates comparison OH_Drawing_TextStyle object. + * @param style Indicates enumerates of text style type. + * @param comparedStyle Indicates source of comparison OH_Drawing_TextStyle object. + * @param textStyleType Indicates comparison OH_Drawing_TextStyle object. * @return Match attributes result. * @since 12 * @version 1.0 @@ -2392,7 +2418,7 @@ bool OH_Drawing_TextStyleIsAttributeMatched(const OH_Drawing_TextStyle* style, * @brief Set placeholder of TextStyle. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @since 12 * @version 1.0 */ @@ -2402,7 +2428,7 @@ void OH_Drawing_TextStyleSetPlaceholder(OH_Drawing_TextStyle* style); * @brief Gets whether placeholder is enable. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Whether placeholder is enable. * @since 12 * @version 1.0 @@ -2413,7 +2439,7 @@ bool OH_Drawing_TextStyleIsPlaceholder(OH_Drawing_TextStyle* style); * @brief Gets text alignment mode. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @return Returns text alignment mode. * @since 12 * @version 1.0 @@ -2424,7 +2450,7 @@ OH_Drawing_TextAlign OH_Drawing_TypographyStyleGetEffectiveAlignment(OH_Drawing_ * @brief Gets whether the hinting is enabled. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @return True, if the hinting takes effect; False, if the hinting does not take effect. * @since 12 * @version 1.0 @@ -2435,7 +2461,7 @@ bool OH_Drawing_TypographyStyleIsHintEnabled(OH_Drawing_TypographyStyle* style); * @brief Gets system font configuration information. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontConfigInfoErrorCode Indicates error code returned, based on the error code to + * @param errorCode Indicates error code returned, based on the error code to * release the memory of system font configuration information. * For details, see the enum OH_Drawing_FontConfigInfoErrorCode. * @return Returns a pointer to system font configuration information. @@ -2443,49 +2469,49 @@ bool OH_Drawing_TypographyStyleIsHintEnabled(OH_Drawing_TypographyStyle* style); * @since 12 * @version 1.0 */ -OH_Drawing_FontConfigInfo* OH_Drawing_GetSystemFontConfigInfo(OH_Drawing_FontConfigInfoErrorCode*); +OH_Drawing_FontConfigInfo* OH_Drawing_GetSystemFontConfigInfo(OH_Drawing_FontConfigInfoErrorCode* errorCode); /** * @brief Releases the memory occupied by system font configuration information. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_FontConfigInfo Indicates the pointer to an OH_Drawing_FontConfigInfo object. + * @param drawFontCfgInfo Indicates the pointer to an OH_Drawing_FontConfigInfo object. * @since 12 * @version 1.0 */ -void OH_Drawing_DestroySystemFontConfigInfo(OH_Drawing_FontConfigInfo*); +void OH_Drawing_DestroySystemFontConfigInfo(OH_Drawing_FontConfigInfo* drawFontCfgInfo); /** * @brief Sets the strut style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param OH_Drawing_StrutStyle Indicates the pointer of OH_Drawing_StrutStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param strutstyle Indicates the pointer of OH_Drawing_StrutStyle object. * @since 12 * @version 1.0 */ -void OH_Drawing_SetTypographyStyleTextStrutStyle(OH_Drawing_TypographyStyle*, OH_Drawing_StrutStyle*); +void OH_Drawing_SetTypographyStyleTextStrutStyle(OH_Drawing_TypographyStyle* style, OH_Drawing_StrutStyle* strutstyle); /** * @brief Releases the memory occupied by an OH_Drawing_StrutStyle object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_StrutStyle Indicates the pointer of OH_Drawing_StrutStyle object. + * @param strutstyle Indicates the pointer of OH_Drawing_StrutStyle object. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyStyleDestroyStrutStyle(OH_Drawing_StrutStyle*); +void OH_Drawing_TypographyStyleDestroyStrutStyle(OH_Drawing_StrutStyle* strutstyle); /** * @brief Gets the strut style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @return Returns the pointer of OH_Drawing_StrutStyle object. * @since 12 * @version 1.0 */ -OH_Drawing_StrutStyle* OH_Drawing_TypographyStyleGetStrutStyle(OH_Drawing_TypographyStyle*); +OH_Drawing_StrutStyle* OH_Drawing_TypographyStyleGetStrutStyle(OH_Drawing_TypographyStyle* style); /** * @brief Overriding the struct StrutStyle equals operator. @@ -2502,7 +2528,7 @@ bool OH_Drawing_TypographyStyleStrutStyleEquals(OH_Drawing_StrutStyle* from, OH_ * @brief Sets the hinting of text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param hintsEnabled Indicates the hinting of text typography.. * @since 12 * @version 1.0 @@ -2526,21 +2552,21 @@ OH_Drawing_Font_Metrics* OH_Drawing_TypographyGetLineFontMetrics(OH_Drawing_Typo * @brief Free up all the space taken up by the lineFontMetric. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Font_Metrics Indicates the first address of the lineFontMetric gather to be destroyed. + * @param lineFontMetric Indicates the first address of the lineFontMetric gather to be destroyed. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyDestroyLineFontMetrics(OH_Drawing_Font_Metrics*); +void OH_Drawing_TypographyDestroyLineFontMetrics(OH_Drawing_Font_Metrics* lineFontMetric); /** * @brief Mark the Typography as dirty, and initially state the Typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyMarkDirty(OH_Drawing_Typography*); +void OH_Drawing_TypographyMarkDirty(OH_Drawing_Typography* typography); /** * @brief Get the unresolved Glyphs count of lines in a text. @@ -2557,64 +2583,64 @@ int32_t OH_Drawing_TypographyGetUnresolvedGlyphsCount(OH_Drawing_Typography*); * @brief Update the font size of lines in a text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. * @param from Indicates the source of the original font size. * @param to Indicates the destination of the updated font size. * @param fontSize Indicates the size of the font. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyUpdateFontSize(OH_Drawing_Typography*, size_t from, size_t to, float fontSize); +void OH_Drawing_TypographyUpdateFontSize(OH_Drawing_Typography* typography, size_t from, size_t to, float fontSize); /** * @brief Get whether the text layout enables line styles. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to the text OH_Drawing_TypographyStyle object. + * @param style Indicates the pointer to the text OH_Drawing_TypographyStyle object. * @return Whether or not to enable line styles in text layout only, true means enable, false means disable. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyTextGetLineStyle(OH_Drawing_TypographyStyle*); +bool OH_Drawing_TypographyTextGetLineStyle(OH_Drawing_TypographyStyle* style); /** * @brief Get the font weight of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the font weight of line style for text typography. * For details, see the enum OH_Drawing_FontWeight. * @since 12 * @version 1.0 */ -OH_Drawing_FontWeight OH_Drawing_TypographyTextlineStyleGetFontWeight(OH_Drawing_TypographyStyle*); +OH_Drawing_FontWeight OH_Drawing_TypographyTextlineStyleGetFontWeight(OH_Drawing_TypographyStyle* style); /** * @brief Get the font style of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the font style of line style for text typography. * For details, see the enum OH_Drawing_FontStyle. * @since 12 * @version 1.0 */ -OH_Drawing_FontStyle OH_Drawing_TypographyTextlineStyleGetFontStyle(OH_Drawing_TypographyStyle*); +OH_Drawing_FontStyle OH_Drawing_TypographyTextlineStyleGetFontStyle(OH_Drawing_TypographyStyle* style); /** * @brief Get the font families of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @param num The number of obtained font names. * @return Return the font families of line style for text typography. * @since 12 * @version 1.0 */ -char** OH_Drawing_TypographyTextlineStyleGetFontFamilies(OH_Drawing_TypographyStyle*, size_t* num); +char** OH_Drawing_TypographyTextlineStyleGetFontFamilies(OH_Drawing_TypographyStyle* style, size_t* num); /** * @brief Releases the memory occupied by a list of font families names. @@ -2631,99 +2657,99 @@ void OH_Drawing_TypographyTextlineStyleDestroyFontFamilies(char** fontFamilies, * @brief Get the font size of font size for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the font size of font size for text typography. * @since 12 * @version 1.0 */ -double OH_Drawing_TypographyTextlineStyleGetFontSize(OH_Drawing_TypographyStyle*); +double OH_Drawing_TypographyTextlineStyleGetFontSize(OH_Drawing_TypographyStyle* style); /** * @brief Get the font height scale in text layout. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Retrun the font height scale in text layout. * @since 12 * @version 1.0 */ -double OH_Drawing_TypographyTextlineStyleGetHeightScale(OH_Drawing_TypographyStyle*); +double OH_Drawing_TypographyTextlineStyleGetHeightScale(OH_Drawing_TypographyStyle* style); /** * @brief Get whether to enable font height for line styles in text layout only. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Whether or not to enable the font height for line styles in text layout only, * true means enable, false means disable. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyTextlineStyleGetHeightOnly(OH_Drawing_TypographyStyle*); +bool OH_Drawing_TypographyTextlineStyleGetHeightOnly(OH_Drawing_TypographyStyle* style); /** * @brief Get the half leading of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Whether to enable the text line half leading style, true means enable, false means disable. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyTextlineStyleGetHalfLeading(OH_Drawing_TypographyStyle*); +bool OH_Drawing_TypographyTextlineStyleGetHalfLeading(OH_Drawing_TypographyStyle* style); /** * @brief Get the spacing scale of line style for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the spacing scale of line style for text typography. * @since 12 * @version 1.0 */ -double OH_Drawing_TypographyTextlineStyleGetSpacingScale(OH_Drawing_TypographyStyle*); +double OH_Drawing_TypographyTextlineStyleGetSpacingScale(OH_Drawing_TypographyStyle* style); /** * @brief Get whether only line style is enabled for text typography. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Returns whether only line style is enabled for text layout, true means it is enabled, * false means it is not. * @since 12 * @version 1.0 */ -bool OH_Drawing_TypographyTextlineGetStyleOnly(OH_Drawing_TypographyStyle*); +bool OH_Drawing_TypographyTextlineGetStyleOnly(OH_Drawing_TypographyStyle* style); /** * @brief Get the text alignment mode. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the text alignment mode. For details, see the enum OH_Drawing_TextAlign. * @since 12 * @version 1.0 */ -OH_Drawing_TextAlign OH_Drawing_TypographyGetTextAlign(OH_Drawing_TypographyStyle*); +OH_Drawing_TextAlign OH_Drawing_TypographyGetTextAlign(OH_Drawing_TypographyStyle* style); /** * @brief Get the text direction. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the text direction. For details, see the enum OH_Drawing_TextDirection. * @since 12 * @version 1.0 */ -OH_Drawing_TextDirection OH_Drawing_TypographyGetTextDirection(OH_Drawing_TypographyStyle*); +OH_Drawing_TextDirection OH_Drawing_TypographyGetTextDirection(OH_Drawing_TypographyStyle* style); /** * @brief Sets the maximum number of lines in a text. @@ -2741,13 +2767,13 @@ size_t OH_Drawing_TypographyGetTextMaxLines(OH_Drawing_TypographyStyle*); * @brief Get the ellipsis of lines in a text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the ellipsis of lines in a text. * @since 12 * @version 1.0 */ -char* OH_Drawing_TypographyGetTextEllipsis(OH_Drawing_TypographyStyle*); +char* OH_Drawing_TypographyGetTextEllipsis(OH_Drawing_TypographyStyle* style); /** * @brief Releases the memory occupied by a list of Ellipsis names. @@ -2775,19 +2801,19 @@ bool OH_Drawing_TypographyStyleEquals(OH_Drawing_TypographyStyle* from, OH_Drawi * @brief Releases the memory occupied by text box. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBox Indicates the pointer to a text box object OH_Drawing_TextBox. + * @param textBox Indicates the pointer to a text box object OH_Drawing_TextBox. * @since 12 * @version 1.0 */ -void OH_Drawing_TypographyDestroyTextBox(OH_Drawing_TextBox*); +void OH_Drawing_TypographyDestroyTextBox(OH_Drawing_TextBox* textBox); /** * @brief Sets the parameter of text-shadow. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextShadow Indicates the pointer to an OH_Drawing_TextShadow object. + * @param shadow Indicates the pointer to an OH_Drawing_TextShadow object. * @param color Indicates the color setting of text-shadow. - * @param OH_Drawing_Point Indicates the pointer to an OH_Drawing_Point object. + * @param offset Indicates the pointer to an OH_Drawing_Point object. * @param blurRadius Indicates the radius of blur for text-shadow. * @since 12 * @version 1.0 @@ -2799,9 +2825,9 @@ void OH_Drawing_SetTextShadow(OH_Drawing_TextShadow* shadow, uint32_t color, OH_ * @brief Creates an OH_Drawing_TextTab object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextAlign Indicates enumerates text tab alignment modes. TAB alignment, Support left alignment + * @param alignment Indicates enumerates text tab alignment modes. TAB alignment, Support left alignment * right alignment center alignment, other enumeration values are left alignment effect. - * @param float Indicates location of text tab. + * @param location Indicates location of text tab. * @return Returns the pointer to the OH_Drawing_TextTab object created. If the object returns NULL, * the creation failed. The possible cause of the failure is that the application address space is used up. * As a result, space cannot be allocated. @@ -2814,33 +2840,33 @@ OH_Drawing_TextTab* OH_Drawing_CreateTextTab(OH_Drawing_TextAlign alignment, flo * @brief Releases the memory occupied by an OH_Drawing_TextTab object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @since 14 * @version 1.0 */ -void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab*); +void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab* tab); /** * @brief Get alignment of an OH_Drawing_TextTab object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @return Returns align of an OH_Drawing_TextTab object. * @since 14 * @version 1.0 */ -OH_Drawing_TextAlign OH_Drawing_GetTextTabAlignment(OH_Drawing_TextTab*); +OH_Drawing_TextAlign OH_Drawing_GetTextTabAlignment(OH_Drawing_TextTab* tab); /** * @brief Get location of an OH_Drawing_TextTab object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @return Returns location of an OH_Drawing_TextTab object. * @since 14 * @version 1.0 */ -float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab*); +float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab* tab); /** * @brief Sets the text tab of OH_Drawing_TypographyStyle object. @@ -2849,12 +2875,12 @@ float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab*); * And all tabs in the paragraph after the setting are aligned according to this tab effect. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. - * @param OH_Drawing_TextTab Indicates the pointer to an OH_Drawing_TextTab object. + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @since 14 * @version 1.0 */ -void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle*, OH_Drawing_TextTab* TextTab); +void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawing_TextTab* tab); /** * @brief Get DrawingArray size. -- Gitee From 57e5314f13ecdc22e7fb5adbe4e6c441d993da7e Mon Sep 17 00:00:00 2001 From: Gavin Date: Tue, 19 Nov 2024 14:20:16 +0800 Subject: [PATCH 150/630] fix:add getMimeTypes interface json Signed-off-by: Gavin --- distributeddatamgr/pasteboard/libpasteboard.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index 829a3ba45..c47c8a475 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -54,5 +54,9 @@ { "first_introduced": "13", "name": "OH_Pasteboard_ClearData" + }, + { + "first_introduced": "14", + "name": "OH_Pasteboard_GetMimeTypes" } ] \ No newline at end of file -- Gitee From 46b7861dfbfe9b520a7f9cf9665a417cd5817862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E4=BC=9F?= Date: Tue, 19 Nov 2024 07:21:47 +0000 Subject: [PATCH 151/630] update backgroundtasks/transient/include/transient_task_api.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡伟 --- .../transient/include/transient_task_api.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backgroundtasks/transient/include/transient_task_api.h b/backgroundtasks/transient/include/transient_task_api.h index 74b467dc6..874e64734 100644 --- a/backgroundtasks/transient/include/transient_task_api.h +++ b/backgroundtasks/transient/include/transient_task_api.h @@ -13,13 +13,6 @@ * limitations under the License. */ -#ifndef OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_API_H -#define OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_API_H - -#include - -#include "transient_task_type.h" - /** * @addtogroup TransientTask * @{ @@ -41,6 +34,13 @@ * @since 13 */ +#ifndef OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_API_H +#define OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_API_H + +#include + +#include "transient_task_type.h" + #ifdef __cplusplus extern "C" { #endif -- Gitee From 85b12aea56979c910d78f0250f46bb521f6cad80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E4=BC=9F?= Date: Tue, 19 Nov 2024 07:22:22 +0000 Subject: [PATCH 152/630] update backgroundtasks/transient/include/transient_task_type.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡伟 --- backgroundtasks/transient/include/transient_task_type.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backgroundtasks/transient/include/transient_task_type.h b/backgroundtasks/transient/include/transient_task_type.h index 6ddd4dbfa..7a19adf75 100644 --- a/backgroundtasks/transient/include/transient_task_type.h +++ b/backgroundtasks/transient/include/transient_task_type.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_TYPE_H -#define OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_TYPE_H - /** * @addtogroup TransientTask * @{ @@ -36,6 +33,9 @@ * @since 11 */ +#ifndef OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_TYPE_H +#define OHOS_BACKGROUOND_TASK_MANAGER_TRANSIENT_TASK_TYPE_H + #include #ifdef __cplusplus -- Gitee From dd7407df60f67a4451a599b18cc6a9c0049e6654 Mon Sep 17 00:00:00 2001 From: shilong Date: Tue, 19 Nov 2024 07:50:02 +0000 Subject: [PATCH 153/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9USB=5FDDK=5FIO=5FFAIL?= =?UTF-8?q?ED=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/usb/usb_ddk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 0b582335e..a0cb5e5b1 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -308,7 +308,7 @@ typedef enum { USB_DDK_MEMORY_ERROR = 27400001, /** @error Invalid operation. */ USB_DDK_INVALID_OPERATION = 27400002, - /** @error I/O error. */ + /** @error Device I/O operation failed. */ USB_DDK_IO_FAILED = 27400003, /** @error Transmission timeout. */ USB_DDK_TIMEOUT = 27400004, -- Gitee From 2059cd7de7f1aadab893576e920d8c380c82dd7e Mon Sep 17 00:00:00 2001 From: liujiaxing19 Date: Tue, 19 Nov 2024 16:09:24 +0800 Subject: [PATCH 154/630] =?UTF-8?q?hiAppEvent=E6=8E=A5=E5=8F=A3APILint?= =?UTF-8?q?=E6=95=B4=E6=94=B92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujiaxing19 Change-Id: I12b1a9598e687e45cbbde587a5f730fe1f7b5016 --- hiviewdfx/hiappevent/include/hiappevent/hiappevent.h | 6 +++--- hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h | 6 +++--- hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h | 6 +++--- hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index e3c82e39f..26a001799 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -23,9 +23,6 @@ * events reported during running. Based on event information, you will be able to analyze the running status of * applications. * - * @kit PerformanceAnalysisKit - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * * @since 8 * @version 1.0 */ @@ -69,6 +66,9 @@ * OH_HiAppEvent_DestroyParamList(list); * * + * @kit PerformanceAnalysisKit + * @library libhiappevent_ndk.z.so + * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 8 * @version 1.0 */ diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h index 1c0a4cb6b..eb5719955 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_cfg.h @@ -23,9 +23,6 @@ * events reported during running. Based on event information, you will be able to analyze the running status of * applications. * - * @kit PerformanceAnalysisKit - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * * @since 8 * @version 1.0 */ @@ -42,6 +39,9 @@ * bool res = OH_HiAppEvent_Configure(MAX_STORAGE, "100M"); * * + * @kit PerformanceAnalysisKit + * @library libhiappevent_ndk.z.so + * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 8 * @version 1.0 */ diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h index 59a5aabe5..bfcad3409 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h @@ -23,9 +23,6 @@ * events reported during running. Based on event information, you will be able to analyze the running status of * applications. * - * @kit PerformanceAnalysisKit - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * * @since 8 * @version 1.0 */ @@ -45,6 +42,9 @@ * OH_HiAppEvent_DestroyParamList(list); * * + * @kit PerformanceAnalysisKit + * @library libhiappevent_ndk.z.so + * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 8 * @version 1.0 */ diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h index 5f9c10cb1..683bdabc2 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_param.h @@ -23,9 +23,6 @@ * events reported during running. Based on event information, you will be able to analyze the running status of * applications. * - * @kit PerformanceAnalysisKit - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * * @since 8 * @version 1.0 */ @@ -45,6 +42,9 @@ * OH_HiAppEvent_DestroyParamList(list); * * + * @kit PerformanceAnalysisKit + * @library libhiappevent_ndk.z.so + * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 8 * @version 1.0 */ -- Gitee From d4b2872c11cbf91b6ec0edf9e1cdd67e128440e3 Mon Sep 17 00:00:00 2001 From: suwanghw Date: Tue, 19 Nov 2024 19:39:54 +0800 Subject: [PATCH 155/630] Delete tee kit api Signed-off-by: suwanghw --- tee/BUILD.gn | 74 -- tee/include/oemkey.h | 65 -- tee/include/pthread_attr.h | 52 -- tee/include/rpmb_driver_rw_api.h | 298 ------- tee/include/rpmb_fcntl.h | 297 ------- tee/include/tee_arith_api.h | 578 -------------- tee/include/tee_client_api.h | 245 ------ tee/include/tee_client_constants.h | 227 ------ tee/include/tee_client_type.h | 212 ----- tee/include/tee_core_api.h | 124 --- tee/include/tee_crypto_api.h | 1045 ------------------------- tee/include/tee_crypto_hal.h | 93 --- tee/include/tee_defines.h | 607 -------------- tee/include/tee_drv_client.h | 96 --- tee/include/tee_dynamic_srv.h | 134 ---- tee/include/tee_ext_api.h | 209 ----- tee/include/tee_hw_ext_api.h | 92 --- tee/include/tee_hw_ext_api_legacy.h | 123 --- tee/include/tee_internal_se_api.h | 498 ------------ tee/include/tee_log.h | 290 ------- tee/include/tee_mem_mgmt_api.h | 231 ------ tee/include/tee_mem_monitoring_api.h | 64 -- tee/include/tee_object_api.h | 384 --------- tee/include/tee_property_api.h | 266 ------- tee/include/tee_rtc_time_api.h | 117 --- tee/include/tee_service_public.h | 159 ---- tee/include/tee_sharemem_ops.h | 128 --- tee/include/tee_time_api.h | 131 ---- tee/include/tee_trusted_storage_api.h | 410 ---------- tee/include/tee_tui_gp_api.h | 454 ----------- tee/libteec.ndk.json | 11 - 31 files changed, 7714 deletions(-) delete mode 100644 tee/BUILD.gn delete mode 100644 tee/include/oemkey.h delete mode 100644 tee/include/pthread_attr.h delete mode 100644 tee/include/rpmb_driver_rw_api.h delete mode 100644 tee/include/rpmb_fcntl.h delete mode 100644 tee/include/tee_arith_api.h delete mode 100644 tee/include/tee_client_api.h delete mode 100644 tee/include/tee_client_constants.h delete mode 100644 tee/include/tee_client_type.h delete mode 100644 tee/include/tee_core_api.h delete mode 100644 tee/include/tee_crypto_api.h delete mode 100644 tee/include/tee_crypto_hal.h delete mode 100644 tee/include/tee_defines.h delete mode 100644 tee/include/tee_drv_client.h delete mode 100644 tee/include/tee_dynamic_srv.h delete mode 100644 tee/include/tee_ext_api.h delete mode 100644 tee/include/tee_hw_ext_api.h delete mode 100644 tee/include/tee_hw_ext_api_legacy.h delete mode 100644 tee/include/tee_internal_se_api.h delete mode 100644 tee/include/tee_log.h delete mode 100644 tee/include/tee_mem_mgmt_api.h delete mode 100644 tee/include/tee_mem_monitoring_api.h delete mode 100644 tee/include/tee_object_api.h delete mode 100644 tee/include/tee_property_api.h delete mode 100644 tee/include/tee_rtc_time_api.h delete mode 100644 tee/include/tee_service_public.h delete mode 100644 tee/include/tee_sharemem_ops.h delete mode 100644 tee/include/tee_time_api.h delete mode 100644 tee/include/tee_trusted_storage_api.h delete mode 100644 tee/include/tee_tui_gp_api.h delete mode 100644 tee/libteec.ndk.json diff --git a/tee/BUILD.gn b/tee/BUILD.gn deleted file mode 100644 index a04ca0b3a..000000000 --- a/tee/BUILD.gn +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build/ohos.gni") - -ohos_ndk_library("libteec") { - output_name = "teec" - output_extension = "so" - ndk_description_file = "./libteec.ndk.json" - min_compact_version = "12" - system_capability = "SystemCapability.Tee.TeeClient" - system_capability_headers = [ - "./include/tee_client_api.h", - "./include/tee_client_constants.h", - "./include/tee_client_type.h", - ] -} - -ohos_ndk_headers("libtee_header") { - dest_dir = "$ndk_headers_out_dir/tee" - sources = [ - "./include/oemkey.h", - "./include/rpmb_driver_rw_api.h", - "./include/rpmb_fcntl.h", - "./include/tee_arith_api.h", - "./include/tee_core_api.h", - "./include/tee_crypto_api.h", - "./include/tee_crypto_hal.h", - "./include/tee_defines.h", - "./include/tee_drv_client.h", - "./include/tee_dynamic_srv.h", - "./include/tee_ext_api.h", - "./include/tee_hw_ext_api.h", - "./include/tee_hw_ext_api_legacy.h", - "./include/tee_internal_se_api.h", - "./include/tee_log.h", - "./include/tee_mem_mgmt_api.h", - "./include/tee_mem_monitoring_api.h", - "./include/tee_object_api.h", - "./include/tee_property_api.h", - "./include/tee_rtc_time_api.h", - "./include/tee_service_public.h", - "./include/tee_sharemem_ops.h", - "./include/tee_time_api.h", - "./include/tee_trusted_storage_api.h", - "./include/tee_tui_gp_api.h", - ] -} - -ohos_ndk_headers("libteec_header") { - dest_dir = "$ndk_headers_out_dir/tee_client" - sources = [ - "./include/tee_client_api.h", - "./include/tee_client_constants.h", - "./include/tee_client_type.h", - ] -} - -group("tee_ndk_header") { - deps = [ - ":libtee_header", - ":libteec_header", - ] -} diff --git a/tee/include/oemkey.h b/tee/include/oemkey.h deleted file mode 100644 index dc2e3daeb..000000000 --- a/tee/include/oemkey.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OEMKEY_H -#define OEMKEY_H -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file oemkey.h - * - * @brief Provides the method for obtaining the hardware provision key. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -/** - * @brief Obtains the provision key. - * - * @param oem_key Indicates the pointer to the buffer for storing the provision key. - * @param key_size Indicates the length of the buffer used to store the provision key, which is 16. - * - * @return Returns 0 if the operation is successful. - * @return Returns other values otherwise. - * - * @since 12 - */ -uint32_t tee_hal_get_provision_key(uint8_t *oem_key, size_t key_size); - -#ifdef __cplusplus -} -#endif - -/** @} */ -#endif diff --git a/tee/include/pthread_attr.h b/tee/include/pthread_attr.h deleted file mode 100644 index d7753593d..000000000 --- a/tee/include/pthread_attr.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PTHREAD_ATTR_H -#define PTHREAD_ATTR_H -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file pthread_attr.h - * - * @brief Provides the attr about TA multi-thread. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#define TEESMP_THREAD_ATTR_CA_WILDCARD 0 - -#define TEESMP_THREAD_ATTR_CA_INHERIT (-1U) - -#define TEESMP_THREAD_ATTR_TASK_ID_INHERIT (-1U) - -#define TEESMP_THREAD_ATTR_HAS_SHADOW 0x1 - -#define TEESMP_THREAD_ATTR_NO_SHADOW 0x0 - -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/rpmb_driver_rw_api.h b/tee/include/rpmb_driver_rw_api.h deleted file mode 100644 index 4c96f222e..000000000 --- a/tee/include/rpmb_driver_rw_api.h +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef RPMB_DRIVER_RW_API_H -#define RPMB_DRIVER_RW_API_H -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file rpmb_driver_rw_api.h - * - * @brief APIs related to RPMB driver read and write. - * Provides the function of reading and writing RPMB driver. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Defines the total block number. - * - * @since 12 - * @version 1.0 - */ -#define TOTAL_BLK 4 - -/** - * @brief Defines the size of block. - * - * @since 12 - * @version 1.0 - */ -#define BLK_SIZE 256 - -/** - * @brief Defines the size of the total block. - * - * @since 12 - * @version 1.0 - */ -#define TOTAL_BLK_SIZE (TOTAL_BLK * BLK_SIZE) - -#define SEC_WRITE_PROTECT_ENTRY_NUM 4 -#define SEC_WRITE_PROTECT_ENTRY_RESERVED_NUM 3 -#define SEC_WRITE_PROTECT_ENTRY_RESERVED_SIZE 16 -#define SEC_WRITE_PROTECT_FRAME_RESERVED_NUM 14 -#define SEC_WRITE_PROTECT_FRAME_RESERVED_END_NUM 176 -#define SEC_WRITE_PROTECT_BLK_SIZE 256 -#define SEC_WRITE_PROTECT_LUN_MAX 5 - -/** - * @brief A WPF set to one specifies that the logical unit shall inhibit alteration of the medium for LBA within - * the range indicated by LOGICAL BLOCK ADDRESS field and NUMBER OF LOGICAL BLOCKS field. - * Commands requiring writes to the medium shall be terminated with CHECK CONDITION status, - * with the sense key set to DATA PROTECT, and the additional sense code set to WRITE PROTECTED. - * - * @since 12 - * @version 1.0 - */ -typedef enum { - SEC_WRITE_PROTECT_DISABLE = 0, - SEC_WRITE_PROTECT_ENABLE = 1, -} write_protect_flag; - -/** - * @brief Write Protect Type specifies how WPF bit may be modified. - * - * @since 12 - * @version 1.0 - */ -typedef enum { - /** WPF bit is persistent through power cycle and hardware reset. - * WPF value may only be changed writing to Secure Write Protect Configuration Block. - */ - NV_TYPE = 0, - /** WPF bit is automatically cleared to 0b after power cycle or hardware reset. */ - P_TYPE = 1, - /** WPF bit is automatically set to 1b after power cycle or hardware reset. */ - NV_AWP_TYPE = 2, -} write_protect_type; - -/** - * @brief Secure Write Protect Entry. - * +-----+---+---+---+---+---+---+---+----+ - * | | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - * +-----+---+---+---+---+---+---+---+----+ - * | 0 | Reserved | WFT | WPF| -> wp_data - * +-----+---+---+---+---+---+---+---+----+ - * | 1 | Reserved | - * +-----+---+---+---+---+---+---+---+----+ - * | 2 | Reserved | - * +-----+---+---+---+---+---+---+---+----+ - * | 3 | Reserved | - * +-----+---+---+---+---+---+---+---+----+ - * | 4 | LOGICAL BLOCK ADDRESS | -> logical_blk_addr - * +-----+ + - * | ... | | - * +-----+ + - * | 11 | | - * +-----+ + - * | 12 | | - * +-----+---+---+---+---+---+---+---+----+ - * | ... | NUMBER OF LOGICAL BLOCKS | -> logical_blk_num - * +-----+---+---+---+---+---+---+---+----+ - * | 15 | | - * +-----+---+---+---+---+---+---+---+----+ - * - * @since 12 - * @version 1.0 - */ -struct rpmb_protect_cfg_blk_entry { - uint8_t wp_data; - uint8_t reserved[SEC_WRITE_PROTECT_ENTRY_RESERVED_NUM]; - /** This field specifies the LBA of the first logical address of the Secure Write Protect ares. */ - uint64_t logical_blk_addr; - /** This field specifies the number of contiguous logical size that belong to the Secure Write Protect. */ - uint32_t logical_blk_num; -}__attribute__((packed)); - - -/** - * @brief Secure Write Protect Configuration Block is supported by RPMB region 0 only. - * This block is used for configuring secure write protect areas in logical units. - * Each Secure Write Protect Configuration Block for each logical unit. - * Each entry represents one secure write protect area. - * If an entry is not used, then the related fields shall contain a value of zero. - * +-----+---+---+---+---+---+---+---+----+ - * | | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - * +-----+---+---+---+---+---+---+---+----+ - * | 0 | LUN | - * +-----+---+---+---+---+---+---+---+----+ - * | 1 | DATA LENGTH | - * +-----+---+---+---+---+---+---+---+----+ - * | 2 | | - * +-----+ + - * | ... | Reserved | - * +-----+ + - * | 15 | | - * +-----+---+---+---+---+---+---+---+----+ - * | 16 | | - * +-----+ + - * | ... | Secure Write Protect Entry 0 | - * +-----+ + - * | 31 | | - * +-----+---+---+---+---+---+---+---+----+ - * | 32 | | - * +-----+ + - * | ... | Secure Write Protect Entry 1 | - * +-----+ + - * | 47 | | - * +-----+---+---+---+---+---+---+---+----+ - * | 48 | | - * +-----+ + - * | ... | Secure Write Protect Entry 1 | - * +-----+ + - * | 63 | | - * +-----+---+---+---+---+---+---+---+----+ - * | 64 | | - * +-----+ + - * | ... | Secure Write Protect Entry 1 | - * +-----+ + - * | 79 | | - * +-----+---+---+---+---+---+---+---+----+ - * | 80 | | - * +-----+ + - * | ... | Reserved | - * +-----+ + - * | 255 | | - * +-----+---+---+---+---+---+---+---+----+ - * - * @since 12 - * @version 1.0 - */ -struct rpmb_protect_cfg_block { - uint8_t lun; - uint8_t data_length; - uint8_t reserved[SEC_WRITE_PROTECT_FRAME_RESERVED_NUM]; - struct rpmb_protect_cfg_blk_entry entries[SEC_WRITE_PROTECT_ENTRY_NUM]; - uint8_t reserved_end[SEC_WRITE_PROTECT_FRAME_RESERVED_END_NUM]; -}__attribute__((packed)); - -/** - * @brief Write protect config block by RPMB driver. - * - * @param lun Indicates the logical unit to which secure write protection shall apply, - * and 0 <= lun <= {@code SEC_WRITE_PROTECT_LUN_MAX} - * @param entries Indicates the Secure Write Protect Entry array, The maximum length is 4. - * @param len Indicates the real length of the Secure Write Protect Entry array, which value is less than 4. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if the input parameter is incorrect. - * Returns {@code TEE_ERROR_OUT_OF_MEMORY} if the send message fail. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_rpmb_protect_cfg_blk_write(uint8_t lun, struct rpmb_protect_cfg_blk_entry *entries, uint32_t len); - -/** - * @brief Read protect config block by RPMB driver. - * - * @param lun Indicates the logical unit to which secure read protection shall apply, - * and 0 <= lun <= SEC_WRITE_PROTECT_LUN_MAX. - * @param entries Indicates the Secure Read Protect Entry array, The maximum length is 4. - * @param len Indicates the real length of the Secure Read Protect Entry array, which value is less than 4. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if the input parameter is incorrect. - * Returns {@code TEE_ERROR_OUT_OF_MEMORY} if the send message fail. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_rpmb_protect_cfg_blk_read(uint8_t lun, struct rpmb_protect_cfg_blk_entry *entries, uint32_t *len); - -/** - * @brief Write plaintext buffer to RPMB driver. - * - * @param buf Indicates the buffer for writing data. - * @param size Indicates the length of buffer, the maximum value is 1024. - * @param block Indicates the block index of the position of start block, the value is [0, 3]. - * @param offset Indicates the offset bytes of data position, and the value of offest bytes is less than 256. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if the input parameter is incorrect. - * Returns {@code TEE_ERROR_OUT_OF_MEMORY} if the send message fail. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_rpmb_driver_write(const uint8_t *buf, size_t size, uint32_t block, uint32_t offset); - -/** - * @brief Read plaintext buffer from RPMB driver. - * - * @param buf Indicates the buffer for read data. - * @param size Indicates the length of buffer, the maximum value is 1024. - * @param block Indicates the block index of the position of start block, the value is [0, 3]. - * @param offset Indicates the offset bytes of data position, and the value of offest bytes is less than 256. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if the input parameter is incorrect. - * Returns {@code TEE_ERROR_OUT_OF_MEMORY} if the send message fail. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_rpmb_driver_read(uint8_t *buf, size_t size, uint32_t block, uint32_t offset); - -/** - * @brief Remove data from RPMB driver. - * - * @param size Indicates the length of remove data, the maximum value is 1024. - * @param block Indicates the block index of the position of start block, the value is [0, 3]. - * @param offset Indicates the offset bytes of data position, and the value of offest bytes is less than 256. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if the input parameter is incorrect. - * Returns {@code TEE_ERROR_OUT_OF_MEMORY} if the send message fail. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_rpmb_driver_remove(size_t size, uint32_t block, uint32_t offset); - -#ifdef __cplusplus -} -#endif - -/** @} */ -#endif diff --git a/tee/include/rpmb_fcntl.h b/tee/include/rpmb_fcntl.h deleted file mode 100644 index bc38160d7..000000000 --- a/tee/include/rpmb_fcntl.h +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef RPMB_RPMB_FCNTL_H -#define RPMB_RPMB_FCNTL_H -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file rpmb_fcntl.h - * - * @brief Provides the APIs related to RPMB service. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Partition initialization, perform RPMB Key writing and formatting operations. - * - * @attention This function only needs to be executed once. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_RPMB_GENERIC} if the RPMB controller general error. - * Returns {@code TEE_ERROR_RPMB_MAC_FAIL} if the RPMB controller MAC check error. - * Returns {@code TEE_ERROR_RPMB_RESP_UNEXPECT_MAC} if the RPMB response data MAC check error. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Init(void); - -/** - * @brief RPMB secure storage fully formatted operation. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_RPMB_GENERIC} if the RPMB controller general error. - * Returns {@code TEE_ERROR_RPMB_MAC_FAIL} if the RPMB controller MAC check error. - * Returns {@code TEE_ERROR_RPMB_RESP_UNEXPECT_MAC} if the RPMB response data MAC check error. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Format(void); - -/** - * @brief Write files to RPMB. - * - * @attention If you want to improve the performance of writing files, you need to define the heap size in TA's - * manifest to be at leaset 3 times the file size plus 256KB. - * For example: To write a file with a size of 100KB, the defined heap size is at least - * 556KB (3 * 100 + 256). If the heap size cannot be satisfied, the file writing will still succeed, - * but the performance will be poor. - * - * @param filename Indicates the file name of the data to be written, the maximum length is 64 bytes. - * @param buf Indicates the buffer for writting data. - * @param size Indicates the size of the written data, the maximum size is 160KB. - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect, or the file name is longer than 64 - * bytes. - * Returns {@code TEE_ERROR_RPMB_NOSPC} if the RPMB partition has insufficient disk space. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Write(const char *filename, const uint8_t *buf, size_t size); - -/** - * @brief Read files from RPMB. - * - * @attention If you want to improve the performance of reading files, you need to define the heap size in TA's - * manifest to be at leaset 3 times the file size plus 256KB. - * For example: To read a file with a size of 100KB, the defined heap size is at least - * 556KB (3 * 100 + 256). If the heap size cannot be satisfied, the file reading will still succeed, - * but the performance will be poor. - * - * @param filename Indicates the file name of the data to be read, the maximum length is 64 bytes. - * @param buf Indicates the buffer for reading data. - * @param size Indicates the read data size. - * @param count Indicates the size of the actual read. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect, or the file name is longer than 64 - * bytes. - * Returns {@code TEE_ERROR_RPMB_FILE_NOT_FOUND} if the file dose not exist. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Read(const char *filename, uint8_t *buf, size_t size, uint32_t *count); - -/** - * @brief Rename file name in RPMB. - * - * @param old_name Indicates the old file name. - * @param new_name Indicates the new file name. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect, or the file name is longer than 64 - * bytes. - * Returns {@code TEE_ERROR_RPMB_FILE_NOT_FOUND} if the file dose not exist. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Rename(const char *old_name, const char *new_name); - -/** - * @brief Delete files in RPMB. - * - * @param filename Indicates the file name to be deleted. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect, or the file name is longer than 64 - * bytes. - * Returns {@code TEE_ERROR_RPMB_FILE_NOT_FOUND} if the file dose not exist. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Rm(const char *filename); - -/** - * @brief File status stored in RPMB partition, used in {@code TEE_RPMB_FS_Stat}. - * - * @since 12 - */ -struct rpmb_fs_stat { - /** Indicates the file size. */ - uint32_t size; - uint32_t reserved; -}; - -/** - * @brief Get file status in RPMB. - * - * @param filename Indicates the file name in RPMB. - * @param stat Indicates the file status information obtained. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect, or the file name is longer than 64 - * bytes. - * Returns {@code TEE_ERROR_RPMB_FILE_NOT_FOUND} if the file dose not exist. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Stat(const char *filename, struct rpmb_fs_stat *stat); - -/** - * @brief Disk status stored in RPMB partition, used in {@code TEE_RPMB_FS_StatDisk}. - * - * @since 12 - */ -struct rpmb_fs_statdisk { - /** Indicates the total size of RPMB partition. */ - uint32_t disk_size; - /** Indicates the TA used size. */ - uint32_t ta_used_size; - /** Indicates the free size of the RPMB partition. */ - uint32_t free_size; - uint32_t reserved; -}; - -/** - * @brief Get the disk status. - * - * @param stat Indicates the disk status information obtained. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_StatDisk(struct rpmb_fs_statdisk *stat); - -/** - * @brief File attribute definition, which means that the file cannot be erased during the factory reset. - * - * @since 12 -*/ -#define TEE_RPMB_FMODE_NON_ERASURE (1U << 0) - -/** - * @brief File attribute definition, which means the attribute value of the cleard file. - * - * @since 12 -*/ -#define TEE_RPMB_FMODE_CLEAR 0 - - -/** - * @brief Set the file attribute in RPMB. - * - * @param filename Indicates the file name in RPMB. - * @param fmode Indicates the file attribute, currently supports {@code TEE_RPMB_FMODE_NON_ERASURE} and - * {@code TEE_RPMB_FMODE_CLEAR} two attributes, other values will return {@code TEE_ERROR_BAD_PARAMETERS}. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect, - * or the file name is longer than 64 bytes. - * Returns {@code TEE_ERROR_RPMB_FILE_NOT_FOUND} if the file dose not exist. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_SetAttr(const char *filename, uint32_t fmode); - -/** - * @brief Format, delete file attribute is erasable file, keep the file attribute is an inerasable file. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_RPMB_GENERIC} if the RPMB controller general error. - * Returns {@code TEE_ERROR_RPMB_MAC_FAIL} if the RPMB controller MAC check error. - * Returns {@code TEE_ERROR_RPMB_RESP_UNEXPECT_MAC} if the RPMB response data MAC check error. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_FS_Erase(void); - -/** - * @brief Enumerates the types of RPMB key status, used in {@code TEE_RPMB_KEY_Status}. - * - * @since 12 -*/ -enum TEE_RPMB_KEY_STAT { - /** RPMB Key status is invalid. */ - TEE_RPMB_KEY_INVALID = 0x0, - /** RPMB Key has been programmed and matched correctly. */ - TEE_RPMB_KEY_SUCCESS, - /** RPMB Key is not programmed. */ - TEE_RPMB_KEY_NOT_PROGRAM, - /** RPMB Key has been programmed but failed to match. */ - TEE_RPMB_KEY_NOT_MATCH, -}; - -/** - * @brief Obtain RPMB Key status. - * - * @return Returns {@code TEE_RPMB_KEY_SUCCESS} if the RPMB Key has been programmed and matched correctly. - * Returns {@code TEE_RPMB_KEY_NOT_PROGRAM} if the RPMB Key is not programmed. - * Returns {@code TEE_RPMB_KEY_NOT_MATCH} if RPMB Key has been programmed but failed to match. - * Returns {@code TEE_RPMB_KEY_INVALID} if the RPMB Key status is invalid. - * - * @since 12 - * @version 1.0 - */ -uint32_t TEE_RPMB_KEY_Status(void); - -/** - * @brief Process the current TA version information. - * - * @param ta_version Indicates the TA version. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_GENERIC} if the processing failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RPMB_TAVERSION_Process(uint32_t ta_version); -#ifdef __cplusplus -} -#endif - -/** @} */ -#endif diff --git a/tee/include/tee_arith_api.h b/tee/include/tee_arith_api.h deleted file mode 100644 index b76c6eb37..000000000 --- a/tee/include/tee_arith_api.h +++ /dev/null @@ -1,578 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_ARITH_API_H -#define TEE_ARITH_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_arith_api.h - * - * @brief Provides APIs for operating big integers. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef uint32_t TEE_BigInt; -typedef uint32_t TEE_BigIntFMM; -typedef uint32_t TEE_BigIntFMMContext; - -/** - * @brief Obtains the size of the array of uint32_t values required to represent a BigInt. - * - * @param n Indicates the TEE_BigInt type. - * - * @return Returns the BigInt size obtained. - * - * @since 12 - * @version 1.0 - */ -#define TEE_BigIntSizeInU32(n) ((((n) + 31) / 32) + 2) - -/** - * @brief Obtains the size of the array of uint32_t values. - * - * @param modulusSizeInBits Indicates the modulus size, in bits. - * - * @return Returns the number of bytes required to store a TEE_BigIntFMM, - * given a modulus of length modSizeInBits. - * - * @since 12 - * @version 1.0 - */ -size_t TEE_BigIntFMMSizeInU32(size_t modulusSizeInBits); - -/** - * @brief Obtains the size of an array of uint32_t values required to represent a fast modular context. - * - * @param modulusSizeInBits Indicates the modulus size, in bits. - * - * @return Returns the number of bytes required to store a TEE_BigIntFMMContext, - * given a modulus of length modSizeInBits. - * - * @since 12 - * @version 1.0 - */ -size_t TEE_BigIntFMMContextSizeInU32(size_t modulusSizeInBits); - -/** - * @brief Initializes a TEE_BigInt. - * - * @param bigInt Indicates the pointer to the TEE_BigInt to initialize. - * @param len Indicates the size of the memory pointed to by TEE_BigInt, in uint32_t. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntInit(TEE_BigInt *bigInt, size_t len); - -/** - * @brief Calculates the necessary prerequisites for fast modular multiplication and stores them in a context. - * - * @param context Indicates the pointer to the TEE_BigIntFMMContext to initialize. - * @param len Indicates the size of the memory pointed to by context, in uint32_t. - * @param modulus Indicates the pointer to the modulus. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntInitFMMContext(TEE_BigIntFMMContext *context, size_t len, const TEE_BigInt *modulus); - -/** - * @brief Calculates the necessary prerequisites for fast modular multiplication and stores them in a context. - * - * @param context Indicates the pointer to the TEE_BigIntFMMContext to initialize. - * @param len Indicates the size of the memory pointed to by context, in uint32_t. - * @param modulus Indicates the pointer to the modulus. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns other values if the operation fails. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntInitFMMContext1(TEE_BigIntFMMContext *context, size_t len, const TEE_BigInt *modulus); - -/** - * @brief Initializes a TEE_BigIntFMM and sets its represented value to zero. - * - * @param bigIntFMM Indicates the pointer to the TEE_BigIntFMM to initialize. - * @param len Indicates the size of the memory pointed to by bigIntFMM, in uint32_t. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntInitFMM(TEE_BigIntFMM *bigIntFMM, size_t len); - -/** - * @brief Converts an octet string buffer into the TEE_BigInt format. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result. - * @param buffer Indicates the pointer to the buffer that holds the octet string representation of the integer. - * @param bufferLen Indicates the buffer length, in bytes. - * @param sign Indicates the sign of dest, which is set to the sign of sign. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OVERFLOW if the memory allocated for dest is too small. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntConvertFromOctetString(TEE_BigInt *dest, const uint8_t *buffer, size_t bufferLen, int32_t sign); - -/** - * @brief Converts the absolute value of an integer in TEE_BigInt format into an octet string. - * - * @param buffer Indicates the pointer to the output buffer that holds the converted octet string representation - * of the integer. - * @param bufferLen Indicates the pointer to the buffer length, in bytes. - * @param bigInt Indicates the pointer to the integer to convert. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_SHORT_BUFFER if the output buffer is too small to hold the octet string. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntConvertToOctetString(void *buffer, size_t *bufferLen, const TEE_BigInt *bigInt); - -/** - * @brief Sets dest to the value shortVal. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result. - * @param shortVal Indicates the value to set. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntConvertFromS32(TEE_BigInt *dest, int32_t shortVal); - -/** - * @brief Sets dest to the value of src, including the sign of src. - * - * @param dest Indicates the pointer to the int32_t that holds the result. - * @param src Indicates the pointer to the value to set. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OVERFLOW if src does not fit within an int32_t. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntConvertToS32(int32_t *dest, const TEE_BigInt *src); - -/** - * @brief Checks whether op1 > op2, op1 == op2, or op1 < op2. - * - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * - * @return Returns 0 if op1 == op2. - * Returns a positive number if op1 > op2. - * - * @since 12 - * @version 1.0 - */ -int32_t TEE_BigIntCmp(const TEE_BigInt *op1, const TEE_BigInt *op2); - -/** - * @brief Checks whether op > shortVal, op == shortVal, or op < shortVal. - * - * @param op Indicates the pointer to the first operand. - * @param shortVal Indicates the pointer to the second operand. - * - * @return Returns 0 if op1 == shortVal. - * Returns a positive number if op1 > shortVal. - * - * @since 12 - * @version 1.0 - */ -int32_t TEE_BigIntCmpS32(const TEE_BigInt *op, int32_t shortVal); - -/** - * @brief Computes |dest| = |op| >> bits. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the shifted result. - * @param op Indicates the pointer to the operand to be shifted. - * @param bits Indicates the number of bits to shift. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntShiftRight(TEE_BigInt *dest, const TEE_BigInt *op, size_t bits); - -/** - * @brief Obtains the bitIndex bit of the natural binary representation of |src|. - * - * @param src Indicates the pointer to the integer. - * @param bitIndex Indicates the offset of the bit to read, starting from offset 0 of the least significant bit. - * - * @return Returns the Boolean value of bitIndexth in |src|. The value true represents a 1, - * and false represents a 0. - * - * @since 12 - * @version 1.0 - */ -bool TEE_BigIntGetBit(const TEE_BigInt *src, uint32_t bitIndex); - -/** - * @brief Obtains the number of bits in the natural binary representation of |src|, - * that is, the magnitude of src. - * - * @param src Indicates the pointer to the integer. - * - * @return Returns 0 if src is 0. - * Returns the number of bits in the natural binary representation of src. - * - * @since 12 - * @version 1.0 - */ -uint32_t TEE_BigIntGetBitCount(const TEE_BigInt *src); - -#if defined(API_LEVEL) && (API_LEVEL >= API_LEVEL1_2) -/** - * @brief Sets the first bit of bitIndex in the natural binary representation of op to - * 1 or 0. - * - * @param op Indicates the pointer to the integer. - * @param bitIndex Indicates the offset of the bit to set, starting from offset 0 of the least significant bit. - * @param value Indicates the bit value to set. The value true represents a 1, and the value false - * represents a 0. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OVERFLOW bitIndexth if the bitIndexth bit is larger than the allocated bit - * length of op. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntSetBit(TEE_BigInt *op, uint32_t bitIndex, bool value); - -/** - * @brief Assigns the value of src to dest. - * - * @param dest Indicates the pointer to the TEE_BigInt to be assigned. - * @param src Indicates the pointer to the source operand. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OVERFLOW if the dest operand cannot hold the value of src. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntAssign(TEE_BigInt *dest, const TEE_BigInt *src); - -/** - * @brief Assigns the value of src to dest. - * - * @param dest Indicates the pointer to the TEE_BigInt to be assigned. - * @param src Indicates the pointer to the source operand. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OVERFLOW if the dest operand cannot hold the value of src. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntAbs(TEE_BigInt *dest, const TEE_BigInt *src); -#endif /* API_LEVEL */ - -/** - * @brief Computes dest = op1 + op2. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the sum of op1 and op2. - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntAdd(TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2); - -/** - * @brief Computes dest = op1 – op2. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the difference between op1 - * and op2. - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntSub(TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2); - -/** - * @brief Negates an operand: dest = –op. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result –op. - * @param op Indicates the pointer to the operand to be negated. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntNeg(TEE_BigInt *dest, const TEE_BigInt *op); - -/** - * @brief Computes dest = op1 * op2. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the product of op1 and op2. - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntMul(TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2); - -/** - * @brief Computes dest = op * op. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result op * op. - * @param op Indicates the pointer to the operand to be squared. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntSquare(TEE_BigInt *dest, const TEE_BigInt *op); - -/** - * @brief Computes dest_r and dest_q to make op1 = dest_q* op2 + dest_r. - * - * @param dest_q Indicates the pointer to the TEE_BigInt that holds the quotient. - * @param dest_r Indicates the pointer to the TEE_BigInt that holds the remainder. - * @param op1 Indicates the pointer to the first operand, which is the dividend. - * @param op2 Indicates the pointer to the second operand, which is the divisor. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if at least one parameter is null. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntDiv(TEE_BigInt *dest_q, TEE_BigInt *dest_r, const TEE_BigInt *op1, const TEE_BigInt *op2); - -/** - * @brief Computes dest = op (mod n) to make 0 <= dest < n. - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result op (mod n). - * @param op Indicates the pointer to the operand to be reduced mod n. - * @param n [IN] Indicates the pointer to the modulus, which must be greater than 1. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntMod(TEE_BigInt *dest, const TEE_BigInt *op, const TEE_BigInt *n); - -/** - * @brief Computes dest = (op1 + op2) (mod n). - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result op (op1 + op2)(mod n). - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * @param n Indicates the pointer to the modulus, which must be greater than 1. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntAddMod(TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2, const TEE_BigInt *n); - -/** - * @brief Computes dest = (op1 – op2) (mod n). - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result op (op1 – op2)(mod n). - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * @param n Indicates the pointer to the modulus, which must be greater than 1. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntSubMod(TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2, const TEE_BigInt *n); - -/** - * @brief Computes dest = (op1* op2)(mod n). - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result op (op1 * op2)(mod n). - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * @param n Indicates the pointer to the modulus, which must be greater than 1. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntMulMod(TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2, const TEE_BigInt *n); - -/** - * @brief Computes dest = (op * op) (mod n). - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result op (op * op)(mod n). - * @param op Indicates the pointer to the operand. - * @param n [IN] Indicates the pointer to the modulus, which must be greater than 1. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntSquareMod(TEE_BigInt *dest, const TEE_BigInt *op, const TEE_BigInt *n); - -/** - * @brief Computes dest to make dest* op = 1 (mod n). - * - * @param dest Indicates the pointer to the TEE_BigInt that holds the result (op^–1)(mod n). - * @param op Indicates the pointer to the operand. - * @param n [IN] Indicates the pointer to the modulus, which must be greater than 1. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntInvMod(TEE_BigInt *dest, const TEE_BigInt *op, const TEE_BigInt *n); - -/** - * @brief Checks whether gcd(op1, op2) == 1. - * - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * - * @return Returns true if gcd(op1, op2) == 1. - * Returns false if gcd(op1, op2) != 1. - * - * @since 12 - * @version 1.0 - */ -bool TEE_BigIntRelativePrime(const TEE_BigInt *op1, const TEE_BigInt *op2); - -/** - * @brief Computes the greatest common divisor of op1 and op2. - * - * @param gcd Indicates the pointer to the TEE_BigInt that holds the greatest common divisor of op1 - * and op2. - * @param u Indicates the pointer to the TEE_BigInt that holds the first coefficient. - * @param v Indicates the pointer to the TEE_BigInt that holds the second coefficient. - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntComputeExtendedGcd(TEE_BigInt *gcd, TEE_BigInt *u, TEE_BigInt *v, const TEE_BigInt *op1, - const TEE_BigInt *op2); -/** - * @brief Performs a probabilistic primality test on op. - * - * @param op Indicates the pointer to the candidate number that is tested for primality. - * @param confidenceLevel Indicates the expected confidence level for a non-conclusive test. - * - * @return Returns 0 if op is a composite number. - * Returns 1 if op is a prime number. - * Returns –1 if the test is non-conclusive but the probability that op is composite is - * less than 2^(-confidenceLevel). - * - * @since 12 - * @version 1.0 - */ -int32_t TEE_BigIntIsProbablePrime(const TEE_BigInt *op, uint32_t confidenceLevel); - -/** - * @brief Converts src into a representation suitable for doing fast modular multiplication. - * - * @param dest Indicates the pointer to an initialized TEE_BigIntFMM memory area. - * @param src Indicates the pointer to the TEE_BigInt to convert. - * @param n Indicates the pointer to the modulus. - * @param context Indicates the pointer to the context that is previously initialized using - * {@link TEE_BigIntInitFMMContext1}. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntConvertToFMM(TEE_BigIntFMM *dest, const TEE_BigInt *src, const TEE_BigInt *n, - const TEE_BigIntFMMContext *context); - -/** - * @brief Converts src in the fast modular multiplication representation back to a - * TEE_BigInt representation. - * - * @param dest Indicates the pointer to an initialized TEE_BigIntFMM memory area to store the converted result. - * @param src Indicates the pointer to a TEE_BigIntFMM holding the value in the fast modular multiplication - * representation. - * @param n Indicates the pointer to the modulus. - * @param context Indicates the pointer to the context that is previously initialized using - * {@link TEE_BigIntInitFMMContext1}. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntConvertFromFMM(TEE_BigInt *dest, const TEE_BigIntFMM *src, const TEE_BigInt *n, - const TEE_BigIntFMMContext *context); - -/** - * @brief Computes dest = op1* op2 in the fast modular multiplication representation. - * - * @param dest Indicates the pointer to the TEE_BigIntFMM that holds the result op1* op2. - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * @param n Indicates the pointer to the modulus. - * @param context Indicates the pointer to the context that is previously initialized using - * {@link TEE_BigIntInitFMMContext1}. - * - * @since 12 - * @version 1.0 - */ -void TEE_BigIntComputeFMM(TEE_BigIntFMM *dest, const TEE_BigIntFMM *op1, const TEE_BigIntFMM *op2, const TEE_BigInt *n, - const TEE_BigIntFMMContext *context); - -/** - * @brief Computes dest = (op1 ^ op2)(mod n). - * - * @param des Indicates the pointer to the TEE_BigInt that holds the result (op1 ^ op2)(mod n). - * @param op1 Indicates the pointer to the first operand. - * @param op2 Indicates the pointer to the second operand. - * @param n Indicates the pointer to the modulus. - * @param context Indicates the pointer to the context that is previously initialized using - * {@link TEE_BigIntInitFMMContext1} or initialized to null. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_NOT_SUPPORTED if the value of n is not supported. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_BigIntExpMod(TEE_BigInt *des, TEE_BigInt *op1, const TEE_BigInt *op2, const TEE_BigInt *n, - TEE_BigIntFMMContext *context); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_client_api.h b/tee/include/tee_client_api.h deleted file mode 100644 index e9d0a614a..000000000 --- a/tee/include/tee_client_api.h +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_CLIENT_API_H -#define TEE_CLIENT_API_H -/** - * @addtogroup TeeClient - * @{ - * - * @brief Provides APIs for the client applications (CAs) in the Rich Execution Environment (normal mode) to - * access the trusted applications (TAs) in a Trusted Execution Environment (TEE). - * - * @since 12 - * @version 1.0 - */ - -/** - * @file tee_client_api.h - * - * @brief Defines APIs for CAs to access TAs. - * - *

Example: - *

1. Initialize a TEE: Call TEEC_InitializeContext to initialize the TEE. - *

2. Open a session: Call TEEC_OpenSession with the Universal Unique Identifier (UUID) of the TA. - *

3. Send a command: Call TEEC_InvokeCommand to send a command to the TA. - *

4. Close the session: Call TEEC_CloseSession to close the session. - *

5. Close the TEE: Call TEEC_FinalizeContext to close the TEE. - * - * @library libteec.so - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include -#include "tee_client_type.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Defines the values of the parameters transmitted between the REE and TEE. - * - * @since 12 - * @version 1.0 - */ -#define TEEC_PARAM_TYPES(param0Type, param1Type, param2Type, param3Type) \ - ((param3Type) << 12 | (param2Type) << 8 | (param1Type) << 4 | (param0Type)) - -/** - * @brief Defines the value of the parameter specified by paramTypes and index. - * - * @since 12 - * @version 1.0 - */ -#define TEEC_PARAM_TYPE_GET(paramTypes, index) \ - (((paramTypes) >> (4*(index))) & 0x0F) - -/** - * @brief Initializes a TEE. - * - * The TEE must be initialized before a session is open or commands are sent. - * After the initialization, a connection is set up between the CA and the TEE. - * - * @param name [IN] Indicates the pointer to the TEE path. - * @param context [IN/OUT] Indicates the context pointer, which is the handle of the TEE. - * - * @return Returns {@code TEEC_SUCCESS} if the TEE is successfully initialized. - * Returns {@code TEEC_ERROR_BAD_PARAMETERS} if name is incorrect or context is null. - * Returns {@code TEEC_ERROR_GENERIC} if the available system resources are insufficient. - * - * @since 12 - * @version 1.0 - */ -TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *context); - -/** - * @brief Closes the TEE. - * - * After the TEE is closed, the CA is disconnected from the TEE. - * - * @param context [IN/OUT] Indicates the pointer to the TEE that is successfully initialized. - * - * @since 12 - * @version 1.0 - */ -void TEEC_FinalizeContext(TEEC_Context *context); - -/** - * @brief Opens a session. - * - * This function is used to set up a connection between the CA and the TA of the specified UUID in the specified TEE - * context. The data to be transferred is contained in operation. - * If a session is opened successfully, session is returned providing a description of the connection. - * If the session fails to open, returnOrigin is returned indicating the cause of the failure. - * - * @param context [IN/OUT] Indicates the pointer to the TEE that is successfully initialized. - * @param session [OUT] Indicates the pointer to the session. The value cannot be null. - * @param destination [IN] Indicates the pointer to the UUID of the target TA. Each TA has a unique UUID. - * @param connectionMethod [IN] Indicates the connection method. For details, see {@link TEEC_LoginMethod}. - * @param connectionData [IN] Indicates the pointer to the connection data, which varies with the connection mode. - * If the connection mode is {@code TEEC_LOGIN_PUBLIC}, {@code TEEC_LOGIN_USER}, - * {@code TEEC_LOGIN_USER_APPLICATION}, or {@code TEEC_LOGIN_GROUP_APPLICATION}, the connection data must be null. - * If the connection mode is {@code TEEC_LOGIN_GROUP} or {@code TEEC_LOGIN_GROUP_APPLICATION}, - * the connection data must point to data of the uint32_t type, which indicates the target group user to be connected - * by the CA. - * @param operation [IN/OUT] Indicates the pointer to the data to be transmitted between the CA and TA. - * @param returnOrigin [IN/OUT] Indicates the pointer to the error source. - * For details, see {@code TEEC_ReturnCodeOrigin}. - * - * @return Returns {@code TEEC_SUCCESS} if the session is open successfully. - * Returns {@code TEEC_ERROR_BAD_PARAMETERS} if context, session, or destination is null. - * Returns {@code TEEC_ERROR_ACCESS_DENIED} if the access request is denied. - * Returns {@code TEEC_ERROR_OUT_OF_MEMORY} if the available system resources are insufficient. - * Returns {@code TEEC_ERROR_TRUSTED_APP_LOAD_ERROR} if the TA failed to be loaded. - * For details about other return values, see {@code TEEC_ReturnCode}. - * - * @since 12 - * @version 1.0 - */ -TEEC_Result TEEC_OpenSession(TEEC_Context *context, TEEC_Session *session, const TEEC_UUID *destination, - uint32_t connectionMethod, const void *connectionData, TEEC_Operation *operation, uint32_t *returnOrigin); - -/** - * @brief Closes a session. - * - * After the session is closed, the CA is disconnected from the TA. - * - * @param session [IN/OUT] Indicates the pointer to the session to close. - * - * @since 12 - * @version 1.0 - */ -void TEEC_CloseSession(TEEC_Session *session); - -/** - * @brief Sends a command to a TA. - * - * The CA sends the command ID to the TA through the specified session. - * - * @param session [IN/OUT] Indicates the pointer to the session opened. - * @param commandID [IN] Indicates the command ID supported by the TA. It is defined by the TA. - * @param operation [IN/OUT] Indicates the pointer to the data to be sent from the CA to the TA. - * @param returnOrigin [IN/OUT] Indicates the pointer to the error source. - * For details, see {@code TEEC_ReturnCodeOrigin}. - * - * @return Returns {@code TEEC_SUCCESS} if the command is sent successfully. - * Returns {@code TEEC_ERROR_BAD_PARAMETERS} if session is null or - * operation is in incorrect format. - * Returns {@code TEEC_ERROR_ACCESS_DENIED} if the access request is denied. - * Returns {@code TEEC_ERROR_OUT_OF_MEMORY} if the available system resources are insufficient. - * For details about other return values, see {@code TEEC_ReturnCode}. - * - * @since 12 - * @version 1.0 - */ -TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, uint32_t commandID, - TEEC_Operation *operation, uint32_t *returnOrigin); - -/** - * @brief Registers shared memory in the specified TEE context. - * - * The registered shared memory can implement zero-copy. - * The zero-copy function, however, also requires support by the operating system. - * At present, zero-copy cannot be implemented in this manner. - * - * @param context [IN/OUT] Indicates the pointer to the TEE that is successfully initialized. - * @param sharedMem [IN/OUT] Indicates the pointer to the shared memory. - * The pointed shared memory cannot be null and the size cannot be 0. - * - * @return Returns {@code TEEC_SUCCESS} if the operation is successful. - * Returns {@code TEEC_ERROR_BAD_PARAMETERS} if context or sharedMem is null or - * the pointed memory is empty. - * - * @since 12 - * @version 1.0 - */ -TEEC_Result TEEC_RegisterSharedMemory(TEEC_Context *context, TEEC_SharedMemory *sharedMem); - -/** - * @brief Requests shared memory in the specified TEE context. - * - * The shared memory can be used to implement zero-copy during data transmission between the REE and TEE. - * The zero-copy function, however, also requires support by the operating system. - * At present, zero-copy cannot be implemented in this manner. - * - * @attention If the size field of the input parameter sharedMem is set to 0, TEEC_SUCCESS - * will be returned but the shared memory cannot be used because this memory has neither an address nor size. - * @param context [IN/OUT] Indicates the pointer to the TEE that is successfully initialized. - * @param sharedMem [IN/OUT] Indicates the pointer to the shared memory. The size of the shared memory cannot be 0. - * - * @return Returns {@code TEEC_SUCCESS} if the operation is successful. - * Returns {@code TEEC_ERROR_BAD_PARAMETERS} if context or sharedMem is null. - * Returns {@code TEEC_ERROR_OUT_OF_MEMORY} if the available system resources are insufficient. - * - * @since 12 - * @version 1.0 - */ -TEEC_Result TEEC_AllocateSharedMemory(TEEC_Context *context, TEEC_SharedMemory *sharedMem); - -/** - * @brief Releases the shared memory registered or acquired. - * - * @attention If the shared memory is acquired by using {@code TEEC_AllocateSharedMemory}, - * the memory released will be reclaimed. If the shared memory is acquired by using {@code TEEC_RegisterSharedMemory}, - * the local memory released will not be reclaimed. - * @param sharedMem [IN/OUT] Indicates the pointer to the shared memory to release. - * - * @since 12 - * @version 1.0 - */ -void TEEC_ReleaseSharedMemory(TEEC_SharedMemory *sharedMem); - -/** - * @brief Cancels an operation. - * - * @attention This operation is only used to send a cancel message. Whether to perform the cancel operation is - * determined by the TEE or TA. - * At present, the cancel operation does not take effect. - * @param operation [IN/OUT] Indicates the pointer to the data to be sent from the CA to the TA. - * - * @since 12 - * @version 1.0 - */ -void TEEC_RequestCancellation(TEEC_Operation *operation); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_client_constants.h b/tee/include/tee_client_constants.h deleted file mode 100644 index b66056ef9..000000000 --- a/tee/include/tee_client_constants.h +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_CLIENT_CONSTANTS_H -#define TEE_CLIENT_CONSTANTS_H -/** - * @addtogroup TeeClient - * @{ - * - * @brief Provides APIs for the client applications (CAs) in the Rich Execution Environment (normal mode) to - * access the trusted applications (TAs) in a Trusted Execution Environment (TEE). - * - * @since 12 - * @version 1.0 - */ - -/** - * @file tee_client_constants.h - * - * @brief Defines public data and constants. - * - * @library libteec.so - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -/** - * @brief Defines the number of TEEC_Parameters in TEEC_Operation. - * - * @since 12 - * @version 1.0 - */ -#define TEEC_PARAM_NUM 4 - -/** - * @brief Defines the error codes returned. - * - * @since 12 - * @version 1.0 - */ -enum TEEC_ReturnCode { - /** The operation is successful. */ - TEEC_SUCCESS = 0x0, - /** Invalid command. The command is not supported by the TA. */ - TEEC_ERROR_INVALID_CMD, - /** The TA does not exist. */ - TEEC_ERROR_SERVICE_NOT_EXIST, - /** The session between the CA and TA does not exist. */ - TEEC_ERROR_SESSION_NOT_EXIST, - /** The number of connections to the TA has reached the limit. */ - TEEC_ERROR_SESSION_MAXIMUM, - /** The TA to be registered already exists. */ - TEEC_ERROR_REGISTER_EXIST_SERVICE, - /** Secure OS framework error. */ - TEEC_ERROR_TAGET_DEAD_FATAL, - /** Failed to read the file. */ - TEEC_ERROR_READ_DATA, - /** Failed to write the file. */ - TEEC_ERROR_WRITE_DATA, - /** Failed to truncate the file. */ - TEEC_ERROR_TRUNCATE_OBJECT, - /** Failed to seek data. */ - TEEC_ERROR_SEEK_DATA, - /** File synchronization error. */ - TEEC_ERROR_FSYNC_DATA, - /** Failed to rename the file. */ - TEEC_ERROR_RENAME_OBJECT, - /** Failed to load the TA when opening a session. */ - TEEC_ERROR_TRUSTED_APP_LOAD_ERROR, - /** Failed to initialize the TA. */ - TEEC_ERROR_GENERIC = 0xFFFF0000, - /** Permission verification failed. Permission verification is performed before a TEE or session is opened or - a command is sent. */ - TEEC_ERROR_ACCESS_DENIED = 0xFFFF0001, - /** The operation is canceled. This error code is returned when you operate the parameter with - the cancallation flag. */ - TEEC_ERROR_CANCEL = 0xFFFF0002, - /** Concurrent access causes permission conflict. Concurrent access to files in the trusted storage - service may cause this error. */ - TEEC_ERROR_ACCESS_CONFLICT = 0xFFFF0003, - /** Too much data is passed in the requested operation for the TA to parse. */ - TEEC_ERROR_EXCESS_DATA = 0xFFFF0004, - /** Incorrect data format. The TA failed to parse the parameters sent from the CA. */ - TEEC_ERROR_BAD_FORMAT = 0xFFFF0005, - /** Invalid parameter. The input parameter is null or invalid. */ - TEEC_ERROR_BAD_PARAMETERS = 0xFFFF0006, - /** The operation in the current state is invalid. This error code is returned if the trusted storage service is not - initialized when a trusted storage service operation is requested. */ - TEEC_ERROR_BAD_STATE = 0xFFFF0007, - /** The requested data is not found. */ - TEEC_ERROR_ITEM_NOT_FOUND = 0xFFFF0008, - /** The requested operation has not been implemented yet. This error code is returned when - TEEC_RequestCancellation is called. */ - TEEC_ERROR_NOT_IMPLEMENTED = 0xFFFF0009, - /** The requested operation is valid but is not supported in this implementation. This error code is returned - when certain algorithms of the secure encryption and decryption service, such as DSA, are requested. */ - TEEC_ERROR_NOT_SUPPORTED = 0xFFFF000A, - /** Expected data for the requested operation is not found. */ - TEEC_ERROR_NO_DATA = 0xFFFF000B, - /** The available system resources are insufficient. */ - TEEC_ERROR_OUT_OF_MEMORY = 0xFFFF000C, - /** The system is busy. Some resources are exclusively used by the system. */ - TEEC_ERROR_BUSY = 0xFFFF000D, - /** Communication between an application in the REE and a TA failed. */ - TEEC_ERROR_COMMUNICATION = 0xFFFF000E, - /** A security fault is detected in the TEE. */ - TEEC_ERROR_SECURITY = 0xFFFF000F, - /** The supplied buffer is too short for the output generated. - This error may occur when {@code TEEC_MEMREF_TEMP_OUTPUT} is used. */ - TEEC_ERROR_SHORT_BUFFER = 0xFFFF0010, - /** MAC value check error. */ - TEEC_ERROR_MAC_INVALID = 0xFFFF3071, - /** The TA crashed. */ - TEEC_ERROR_TARGET_DEAD = 0xFFFF3024, - /** Common error. */ - TEEC_FAIL = 0xFFFF5002 -}; - -/** - * @brief Defines the sources of the error codes returned. - * - * @since 12 - * @version 1.0 - */ -enum TEEC_ReturnCodeOrigin { - /** The error code indicates an error originated from the client API. */ - TEEC_ORIGIN_API = 0x1, - /** The error code indicates an error originated from the communication between the REE and TEE. */ - TEEC_ORIGIN_COMMS = 0x2, - /** The error code indicates an error originated within the TEE code. */ - TEEC_ORIGIN_TEE = 0x3, - /** The error code indicates an error originated within the TA code. */ - TEEC_ORIGIN_TRUSTED_APP = 0x4, -}; - -/** - * @brief Defines the identifiers of the shared memory. - * - * @since 12 - * @version 1.0 - */ -enum TEEC_SharedMemCtl { - /** The shared memory can carry data from CAs to TAs. */ - TEEC_MEM_INPUT = 0x1, - /** The shared memory can carry data from TAs to CAs. */ - TEEC_MEM_OUTPUT = 0x2, - /** The shared memory can carry data transmitted between CAs and TAs. */ - TEEC_MEM_INOUT = 0x3, -}; - -/** - * @brief Defines the parameter types. - * - * @since 12 - * @version 1.0 - */ -enum TEEC_ParamType { - /** The parameter is not used. */ - TEEC_NONE = 0x0, - /** The parameter is a {@code TEEC_Value} tagged as input. Data flows from a CA to a TA. */ - TEEC_VALUE_INPUT = 0x01, - /** The parameter is a {@code TEEC_Value} tagged as output. Data flows from a TA to a CA. */ - TEEC_VALUE_OUTPUT = 0x02, - /** The parameter is a {@code TEEC_Value} tagged as both input and output. */ - TEEC_VALUE_INOUT = 0x03, - /** The parameter is a {@code TEEC_TempMemoryReference} tagged as input. Data flows from a CA to a TA. */ - TEEC_MEMREF_TEMP_INPUT = 0x05, - /** The parameter is a {@code TEEC_TempMemoryReference} tagged as output. Data flows from a TA to a CA. */ - TEEC_MEMREF_TEMP_OUTPUT = 0x06, - /** The parameter is a {@code TEEC_TempMemoryReference} tagged as both input and output. - Data is transmitted between a TA and a CA. */ - TEEC_MEMREF_TEMP_INOUT = 0x07, - /** The parameter is a {@code TEEC_IonReference} tagged as input. Data flows from a CA to a TA**/ - TEEC_ION_INPUT = 0x08, - /** The parameter is a {@code TEEC_IonSglistReference} tagged as input. Data flows from a CA to a TA**/ - TEEC_ION_SGLIST_INPUT = 0x09, - /** The parameter is a {@code TEEC_RegisteredMemoryReference} that refers to the entire memory block. - The data flow is the same as that of {@code TEEC_SharedMemCtl}. */ - TEEC_MEMREF_WHOLE = 0xc, - /** The parameter is a {@code TEEC_RegisteredMemoryReference} tagged as input. Data flows from a CA to a TA. */ - TEEC_MEMREF_PARTIAL_INPUT = 0xd, - /** The parameter is a {@code TEEC_RegisteredMemoryReference} tagged as output. Data flows from a TA to a CA. */ - TEEC_MEMREF_PARTIAL_OUTPUT = 0xe, - /** The parameter is a {@code TEEC_RegisteredMemoryReference} tagged as both input and output. - Data is transmitted between a TA and a CA. */ - TEEC_MEMREF_PARTIAL_INOUT = 0xf -}; - -/** - * @brief Defines the login methods. - * - * @since 12 - * @version 1.0 -*/ -enum TEEC_LoginMethod { - /** No login data is provided. */ - TEEC_LOGIN_PUBLIC = 0x0, - /** The login data about the user running the CA process is provided. */ - TEEC_LOGIN_USER, - /** The login data about the group running the CA process is provided. */ - TEEC_LOGIN_GROUP, - /** The login data about the running CA is provided. */ - TEEC_LOGIN_APPLICATION = 0x4, - /** The login data about the user running the CA process and about the CA are provided. */ - TEEC_LOGIN_USER_APPLICATION = 0x5, - /** The login data about the group running the CA process and about the CA are provided. */ - TEEC_LOGIN_GROUP_APPLICATION = 0x6, - /** Login method reserved for TEEOS. */ - TEEC_LOGIN_IDENTIFY = 0x7, -}; - -/** @} */ -#endif diff --git a/tee/include/tee_client_type.h b/tee/include/tee_client_type.h deleted file mode 100644 index 5b89ceb8d..000000000 --- a/tee/include/tee_client_type.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_CLIENT_TYPE_H -#define TEE_CLIENT_TYPE_H -/** - * @addtogroup TeeClient - * @{ - * - * @brief Provides APIs for the client applications (CAs) in the Rich Execution Environment (normal mode) to - * access the trusted applications (TAs) in a Trusted Execution Environment (TEE). - * - * @since 12 - * @version 1.0 - */ - -/** - * @file tee_client_type.h - * - * @brief Defines basic data types and data structures. - * - * @library libteec.so - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include -#include -#include -#include -#include -#include "tee_client_constants.h" - -/** - * @brief Defines the linked list type. - * - * @since 12 - * @version 1.0 - */ -struct ListNode { - struct ListNode *next; - struct ListNode *prev; -}; - -/** - * @brief Defines the return values. - * - * @since 12 - * @version 1.0 - */ -typedef enum TEEC_ReturnCode TEEC_Result; - -/** - * @brief Defines the universally unique identifier (UUID) as defined in RFC4122 [2]. - * The UUIDs are used to identify TAs. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - uint32_t timeLow; - uint16_t timeMid; - uint16_t timeHiAndVersion; - uint8_t clockSeqAndNode[8]; -} TEEC_UUID; - -/** - * @brief Defines the context, a logical connection between a CA and a TEE. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - int32_t fd; - uint8_t *ta_path; - struct ListNode session_list; - struct ListNode shrd_mem_list; - union { - struct { - void *buffer; - sem_t buffer_barrier; - } share_buffer; - uint64_t imp; - }; -} TEEC_Context; - -/** - * @brief Defines the session between a CA and a TA. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - uint32_t session_id; - TEEC_UUID service_id; - uint32_t ops_cnt; - union { - struct ListNode head; - uint64_t imp; - }; - TEEC_Context *context; -} TEEC_Session; - -/** - * @brief Defines a shared memory block, which can be registered or allocated. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - void *buffer; - uint32_t size; - uint32_t flags; - uint32_t ops_cnt; - bool is_allocated; - union { - struct ListNode head; - void* imp; - }; - TEEC_Context *context; -} TEEC_SharedMemory; - -/** - * @brief Defines a pointer to a temporary buffer. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - void *buffer; - uint32_t size; -} TEEC_TempMemoryReference; - -/** - * @brief Defines a pointer to the shared memory that is registered or allocated. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - TEEC_SharedMemory *parent; - uint32_t size; - uint32_t offset; -} TEEC_RegisteredMemoryReference; - -/** - * @brief Describes a parameter that carries small raw data passed by value. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - uint32_t a; - uint32_t b; -} TEEC_Value; - -/** - * @brief Describes the size and handle of the ION memory. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - int ionShareFd; - uint32_t ionSize; -} TEEC_IonReference; - -/** - * @brief Defines a parameter of {@code TEEC_Operation}. - * - * @since 12 - * @version 1.0 - */ -typedef union { - TEEC_TempMemoryReference tmpref; - TEEC_RegisteredMemoryReference memref; - TEEC_Value value; - TEEC_IonReference ionref; -} TEEC_Parameter; - -/** - * @brief Defines the parameters for opening a session or sending a command. - * - * @since 12 - * @version 1.0 - */ -typedef struct { - /** The value 0 means to cancel the command, and other values mean to execute the command. */ - uint32_t started; - /** Use {@code TEEC_PARAM_TYPES} to create this parameter. */ - uint32_t paramTypes; - TEEC_Parameter params[TEEC_PARAM_NUM]; - TEEC_Session *session; - bool cancel_flag; -} TEEC_Operation; - -/** @} */ -#endif diff --git a/tee/include/tee_core_api.h b/tee/include/tee_core_api.h deleted file mode 100644 index 11a3b46d6..000000000 --- a/tee/include/tee_core_api.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_CORE_API_H -#define __TEE_CORE_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - * @version 1.0 - */ - - /** - * @file tee_core_api.h - * - * @brief Provides APIs for managing trusted application (TA) sessions. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif -#ifndef _TEE_TA_SESSION_HANDLE -#define _TEE_TA_SESSION_HANDLE -/** - * @brief Defines the handle of TA session. - * - * @since 12 - */ -typedef uint32_t TEE_TASessionHandle; -#endif - -/** - * @brief Raises a panic in the TA instance. - * - * @param panicCode Indicates an informative panic code defined by the TA. - * - * @since 12 - * @version 1.0 - */ -void TEE_Panic(TEE_Result panicCode); - -/** - * @brief Opens a new session with a TA. - * - * @param destination Indicates the pointer to the TEE_UUID structure that contains - * the Universal Unique Identifier (UUID) of the target TA. - * @param cancellationRequestTimeout Indicates the timeout period in milliseconds or a special value - * if there is no timeout. - * @param paramTypes Indicates the types of all parameters passed in the operation. - * @param params Indicates the parameters passed in the operation. - * @param session Indicates the pointer to the variable that will receive the client session handle. - * @param returnOrigin Indicates the pointer to the variable that holds the return origin. - * - * @return Returns TEE_SUCCESS if the session is opened. - * Returns TEE_ERROR_ITEM_NOT_FOUND if the TA cannot be found in the Trusted Execution Environment (TEE). - * Returns TEE_ERROR_ACCESS_DENIED if the access request to the TA is denied. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_OpenTASession(const TEE_UUID *destination, uint32_t cancellationRequestTimeout, uint32_t paramTypes, - TEE_Param params[TEE_PARAMS_NUM], TEE_TASessionHandle *session, uint32_t *returnOrigin); - -/** - * @brief Closes a client session. - * - * @param session Indicates the handle of the session to close. - * - * @since 12 - * @version 1.0 - */ -void TEE_CloseTASession(TEE_TASessionHandle session); - -/** - * @brief Invokes a command in a session opened between this client TA instance and a target TA instance. - * - * @param session Indicates the handle of the opened session. - * @param cancellationRequestTimeout Indicates the timeout period in milliseconds or a special value - * if there is no timeout. - * @param commandID Indicates the identifier of the command to invoke. - * @param paramTypes Indicates the types of all parameters passed in the operation. - * @param params Indicates the parameters passed in the operation. - * @param returnOrigin Indicates the pointer to the variable that holds the return origin. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_ACCESS_DENIED if the command fails to be invoked. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_InvokeTACommand(TEE_TASessionHandle session, uint32_t cancellationRequestTimeout, uint32_t commandID, - uint32_t paramTypes, TEE_Param params[TEE_PARAMS_NUM], uint32_t *returnOrigin); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_crypto_api.h b/tee/include/tee_crypto_api.h deleted file mode 100644 index 1d0372e05..000000000 --- a/tee/include/tee_crypto_api.h +++ /dev/null @@ -1,1045 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_CRYPTO_API_H -#define TEE_CRYPTO_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_crypto_api.h - * - * @brief Provides APIs for cryptographic operations. - * - * You can use these APIs to implement encryption and decryption. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include /* pthread_mutex_t */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef NULL -/** - * @brief Definition of NULL. - * - * @since 12 - */ -#define NULL ((void *)0) -#endif -/** - * @brief Defines the maximum key length, in bits. - * - * @since 12 - */ -#define TEE_MAX_KEY_SIZE_IN_BITS (1024 * 8) -/** - * @brief Defines the length of the SW_RSA key, in bytes. - * - * @since 12 - */ -#define SW_RSA_KEYLEN 1024 -/** - * @brief Defines the maximum length of other Diffie-Hellman (DH) information, in bytes. - * - * @since 12 - */ -#define TEE_DH_MAX_SIZE_OF_OTHER_INFO 64 /* bytes */ - -/** - * @brief Enumerates the cryptographic operation handles. - * - * @since 12 - */ -enum __TEE_Operation_Constants { - /** Cipher */ - TEE_OPERATION_CIPHER = 0x1, - /** MAC */ - TEE_OPERATION_MAC = 3, - /** AE */ - TEE_OPERATION_AE = 4, - /** Digest */ - TEE_OPERATION_DIGEST = 5, - /** Asymmetric Cipher */ - TEE_OPERATION_ASYMMETRIC_CIPHER = 6, - /** Asymmetric Signature */ - TEE_OPERATION_ASYMMETRIC_SIGNATURE = 7, - /** Key Derivation */ - TEE_OPERATION_KEY_DERIVATION = 8, -}; - -/** - * @brief Enumerates the cryptographic algorithms. - * - * @since 12 - */ -enum __tee_crypto_algorithm_id { - /** Invalid algorithm */ - TEE_ALG_INVALID = 0x0, - /** AES_ECB_NOPAD */ - TEE_ALG_AES_ECB_NOPAD = 0x10000010, - /** AES_CBC_NOPAD */ - TEE_ALG_AES_CBC_NOPAD = 0x10000110, - /** AES_CTR */ - TEE_ALG_AES_CTR = 0x10000210, - /** AES_CTS */ - TEE_ALG_AES_CTS = 0x10000310, - /** AES_XTS */ - TEE_ALG_AES_XTS = 0x10000410, - /** AES_CBC_MAC_NOPAD */ - TEE_ALG_AES_CBC_MAC_NOPAD = 0x30000110, - /** AES_CBC_MAC_PKCS5 */ - TEE_ALG_AES_CBC_MAC_PKCS5 = 0x30000510, - /** AES_CMAC */ - TEE_ALG_AES_CMAC = 0x30000610, - /** AES_GMAC */ - TEE_ALG_AES_GMAC = 0x30000810, - /** AES_CCM */ - TEE_ALG_AES_CCM = 0x40000710, - /** AES_GCM */ - TEE_ALG_AES_GCM = 0x40000810, - /** DES_ECB_NOPAD */ - TEE_ALG_DES_ECB_NOPAD = 0x10000011, - /** DES_CBC_NOPAD */ - TEE_ALG_DES_CBC_NOPAD = 0x10000111, - /** DES_CBC_MAC_NOPAD */ - TEE_ALG_DES_CBC_MAC_NOPAD = 0x30000111, - /** DES_CBC_MAC_PKCS5 */ - TEE_ALG_DES_CBC_MAC_PKCS5 = 0x30000511, - /** DES3_ECB_NOPAD */ - TEE_ALG_DES3_ECB_NOPAD = 0x10000013, - /** DES3_CBC_NOPAD */ - TEE_ALG_DES3_CBC_NOPAD = 0x10000113, - /** DES3_CBC_MAC_NOPAD */ - TEE_ALG_DES3_CBC_MAC_NOPAD = 0x30000113, - /** DES3_CBC_MAC_PKCS5 */ - TEE_ALG_DES3_CBC_MAC_PKCS5 = 0x30000513, - /** RSASSA_PKCS1_V1_5_MD5 */ - TEE_ALG_RSASSA_PKCS1_V1_5_MD5 = 0x70001830, - /** RSASSA_PKCS1_V1_5_SHA1 */ - TEE_ALG_RSASSA_PKCS1_V1_5_SHA1 = 0x70002830, - /** RSASSA_PKCS1_V1_5_SHA224 */ - TEE_ALG_RSASSA_PKCS1_V1_5_SHA224 = 0x70003830, - /** RSASSA_PKCS1_V1_5_SHA256 */ - TEE_ALG_RSASSA_PKCS1_V1_5_SHA256 = 0x70004830, - /** RSASSA_PKCS1_V1_5_SHA384 */ - TEE_ALG_RSASSA_PKCS1_V1_5_SHA384 = 0x70005830, - /** RSASSA_PKCS1_V1_5_SHA512 */ - TEE_ALG_RSASSA_PKCS1_V1_5_SHA512 = 0x70006830, - /** RSASSA_PKCS1_PSS_MGF1_MD5 */ - TEE_ALG_RSASSA_PKCS1_PSS_MGF1_MD5 = 0x70111930, - /** RSASSA_PKCS1_PSS_MGF1_SHA1 */ - TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA1 = 0x70212930, - /** RSASSA_PKCS1_PSS_MGF1_SHA224 */ - TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA224 = 0x70313930, - /** RSASSA_PKCS1_PSS_MGF1_SHA256 */ - TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256 = 0x70414930, - /** RSASSA_PKCS1_PSS_MGF1_SHA384 */ - TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA384 = 0x70515930, - /** RSASSA_PKCS1_PSS_MGF1_SHA512 */ - TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA512 = 0x70616930, - /** RSAES_PKCS1_V1_5 */ - TEE_ALG_RSAES_PKCS1_V1_5 = 0x60000130, - /** RSAES_PKCS1_OAEP_MGF1_SHA1 */ - TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1 = 0x60210230, - /** RSAES_PKCS1_OAEP_MGF1_SHA224 */ - TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA224 = 0x60211230, - /** RSAES_PKCS1_OAEP_MGF1_SHA256 */ - TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256 = 0x60212230, - /** RSAES_PKCS1_OAEP_MGF1_SHA384 */ - TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA384 = 0x60213230, - /** RSAES_PKCS1_OAEP_MGF1_SHA512 */ - TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA512 = 0x60214230, - /** RSA_NOPAD */ - TEE_ALG_RSA_NOPAD = 0x60000030, - /** DSA_SHA1 */ - TEE_ALG_DSA_SHA1 = 0x70002131, - /** DSA_SHA224 */ - TEE_ALG_DSA_SHA224 = 0x70003131, - /** DSA_SHA256 */ - TEE_ALG_DSA_SHA256 = 0x70004131, - /** DH_DERIVE_SHARED_SECRET */ - TEE_ALG_DH_DERIVE_SHARED_SECRET = 0x80000032, - /** MD5 */ - TEE_ALG_MD5 = 0x50000001, - /** SHA1 */ - TEE_ALG_SHA1 = 0x50000002, - /** SHA224 */ - TEE_ALG_SHA224 = 0x50000003, - /** SHA256 */ - TEE_ALG_SHA256 = 0x50000004, - /** SHA384 */ - TEE_ALG_SHA384 = 0x50000005, - /** SHA512 */ - TEE_ALG_SHA512 = 0x50000006, - /** HMAC_MD5 */ - TEE_ALG_HMAC_MD5 = 0x30000001, - /** HMAC_SHA1 */ - TEE_ALG_HMAC_SHA1 = 0x30000002, - /** HMAC_SHA1 */ - TEE_ALG_HMAC_SHA224 = 0x30000003, - /** HMAC_SHA224 */ - TEE_ALG_HMAC_SHA256 = 0x30000004, - /** HMAC_SHA256 */ - TEE_ALG_HMAC_SHA384 = 0x30000005, - /** HMAC_SHA384 */ - TEE_ALG_HMAC_SHA512 = 0x30000006, - /** HMAC_SHA512 */ - TEE_ALG_HMAC_SM3 = 0x30000007, - /** HMAC_SM3 */ - TEE_ALG_AES_ECB_PKCS5 = 0x10000020, - /** AES_ECB_PKCS5 */ - TEE_ALG_AES_CBC_PKCS5 = 0x10000220, - /** AES_CBC_PKCS5 */ - TEE_ALG_ECDSA_SHA1 = 0x70001042, - /** ECDSA_SHA1 */ - TEE_ALG_ECDSA_SHA224 = 0x70002042, - /** ECDSA_SHA224 */ - TEE_ALG_ECDSA_SHA256 = 0x70003042, - /** ECDSA_SHA256 */ - TEE_ALG_ECDSA_SHA384 = 0x70004042, - /** ECDSA_SHA384 */ - TEE_ALG_ECDSA_SHA512 = 0x70005042, - /** ECDSA_SHA512 */ - TEE_ALG_ED25519 = 0x70005043, - /** ED25519 */ - TEE_ALG_ECDH_DERIVE_SHARED_SECRET = 0x80000042, - /** ECDH_DERIVE_SHARED_SECRET */ - TEE_ALG_X25519 = 0x80000044, - /** X25519 */ - TEE_ALG_ECC = 0x80000001, - /** ECC */ - TEE_ALG_ECDSA_P192 = 0x70001042, - /** ECDSA_P192 */ - TEE_ALG_ECDSA_P224 = 0x70002042, - /** ECDSA_P224 */ - TEE_ALG_ECDSA_P256 = 0x70003042, - /** ECDSA_P256 */ - TEE_ALG_ECDSA_P384 = 0x70004042, - /** ECDSA_P521 */ - TEE_ALG_ECDSA_P521 = 0x70005042, - /** ECDH_P192 */ - TEE_ALG_ECDH_P192 = 0x80001042, - /** ECDH_P224 */ - TEE_ALG_ECDH_P224 = 0x80002042, - /** ECDH_P256 */ - TEE_ALG_ECDH_P256 = 0x80003042, - /** ECDH_P384 */ - TEE_ALG_ECDH_P384 = 0x80004042, - /** ECDH_P521 */ - TEE_ALG_ECDH_P521 = 0x80005042, - /** SIP_HASH */ - TEE_ALG_SIP_HASH = 0xF0000002, - /** SM2_DSA_SM3 */ - TEE_ALG_SM2_DSA_SM3 = 0x70006045, - /** SM2_PKE */ - TEE_ALG_SM2_PKE = 0x80000045, - /** SM3 */ - TEE_ALG_SM3 = 0x50000007, - /** SM4_ECB_NOPAD */ - TEE_ALG_SM4_ECB_NOPAD = 0x10000014, - /** SM4_CBC_NOPAD */ - TEE_ALG_SM4_CBC_NOPAD = 0x10000114, - /** SM4_CBC_PKCS7 */ - TEE_ALG_SM4_CBC_PKCS7 = 0xF0000003, - /** SM4_CTR */ - TEE_ALG_SM4_CTR = 0x10000214, - /** SM4_CFB128 */ - TEE_ALG_SM4_CFB128 = 0xF0000000, - /** SM4_XTS */ - TEE_ALG_SM4_XTS = 0x10000414, - /** SM4_OFB */ - TEE_ALG_SM4_OFB = 0x10000514, - /** AES_OFB */ - TEE_ALG_AES_OFB = 0x10000510, - /** SM4_GCM */ - TEE_ALG_SM4_GCM = 0xF0000005, -}; - -/** - * @see __tee_crypto_algorithm_id - */ -typedef enum __tee_crypto_algorithm_id tee_crypto_algorithm_id; -/** - * @brief No element is available. - * - * @since 12 - */ -#define TEE_OPTIONAL_ELEMENT_NONE 0x00000000 - -/** - * @brief Enumerates the Elliptic-Curve Cryptography (ECC) curves supported. - * - * @since 12 - */ -typedef enum { - /** CURVE_NIST_P192 */ - TEE_ECC_CURVE_NIST_P192 = 0x00000001, - /** CURVE_NIST_P224 */ - TEE_ECC_CURVE_NIST_P224 = 0x00000002, - /** CURVE_NIST_P256 */ - TEE_ECC_CURVE_NIST_P256 = 0x00000003, - /** CURVE_NIST_P384 */ - TEE_ECC_CURVE_NIST_P384 = 0x00000004, - /** CURVE_NIST_P521 */ - TEE_ECC_CURVE_NIST_P521 = 0x00000005, - /** CURVE_SM2 256 bits */ - TEE_ECC_CURVE_SM2 = 0x00000300, - /** CURVE_25519 256 bits */ - TEE_ECC_CURVE_25519 = 0x00000200, -} TEE_ECC_CURVE; - -/** - * @brief Enumerates the Mask Generation Function (MGF1) modes. - * - * @since 12 - */ -typedef enum { - TEE_DH_HASH_SHA1_mode = 0, - TEE_DH_HASH_SHA224_mode = 1, - TEE_DH_HASH_SHA256_mode = 2, - TEE_DH_HASH_SHA384_mode = 3, - TEE_DH_HASH_SHA512_mode = 4, - TEE_DH_HASH_NumOfModes, -} TEE_DH_HASH_Mode; - -/** - * @brief Enumerates the cryptographic operation modes. - * - * @since 12 - */ -enum __TEE_OperationMode { - /** Encryption */ - TEE_MODE_ENCRYPT = 0x0, - /** Decryption */ - TEE_MODE_DECRYPT, - /** Signing */ - TEE_MODE_SIGN, - /** Signature verification */ - TEE_MODE_VERIFY, - /** MAC */ - TEE_MODE_MAC, - /** Digest */ - TEE_MODE_DIGEST, - /** Key derivation */ - TEE_MODE_DERIVE -}; - -/** - * @brief Enumerates the cryptographic operation states. - * - * @since 12 - */ -enum tee_operation_state { - /** Initial */ - TEE_OPERATION_STATE_INITIAL = 0x00000000, - /** Active */ - TEE_OPERATION_STATE_ACTIVE = 0x00000001, -}; - -/** - * @see __TEE_OperationMode - */ -typedef uint32_t TEE_OperationMode; - -/** - * @brief Defines the operation information. - * - * @since 12 - */ -struct __TEE_OperationInfo { - /** Algorithm ID */ - uint32_t algorithm; /* #__TEE_CRYPTO_ALGORITHM_ID */ - /** Operation type */ - uint32_t operationClass; /* #__TEE_Operation_Constants */ - /** Operation mode */ - uint32_t mode; /* #__TEE_OperationMode */ - /** Digest length */ - uint32_t digestLength; - /** Maximum key length */ - uint32_t maxKeySize; - /** Key length*/ - uint32_t keySize; - /** Required key usage */ - uint32_t requiredKeyUsage; - /** Handle state */ - uint32_t handleState; - /** Key */ - void *keyValue; -}; - -/** - * @brief Defines the __TEE_OperationInfo struct. - * - * @see __TEE_OperationInfo - */ -typedef struct __TEE_OperationInfo TEE_OperationInfo; - -/** - * @brief Defines the key information stored in the OperationInfo. - * - * @since 12 - */ -typedef struct { - /** Key length */ - uint32_t keySize; - /** Required key usage */ - uint32_t requiredKeyUsage; -} TEE_OperationInfoKey; - -/** - * @brief Defines information about an operation. - * - * @since 12 - */ -typedef struct { - /** Algorithm ID */ - uint32_t algorithm; - /** Operation type */ - uint32_t operationClass; - /** Operation mode */ - uint32_t mode; - /** Digest length */ - uint32_t digestLength; - /** Maximum key length */ - uint32_t maxKeySize; - /** Handle state */ - uint32_t handleState; - /** Operation state */ - uint32_t operationState; - /** Number of keys */ - uint32_t numberOfKeys; - /** Key information */ - TEE_OperationInfoKey keyInformation[]; -} TEE_OperationInfoMultiple; - -/** - * @brief Defines the cryptographic operation handle. - * - * @since 12 - */ -struct __TEE_OperationHandle { - /** Algorithm ID */ - uint32_t algorithm; - /** Operation type */ - uint32_t operationClass; - /** Operation mode */ - uint32_t mode; - /** Digest length */ - uint32_t digestLength; - /** Maximum key length */ - uint32_t maxKeySize; - /** Key length */ - uint32_t keySize; - /** Key length */ - uint32_t keySize2; - /** Required key usage */ - uint32_t requiredKeyUsage; - /** Handle state */ - uint32_t handleState; - /** Key */ - void *keyValue; - /** Key */ - void *keyValue2; - /** */ - void *crypto_ctxt; - /** */ - void *hmac_rest_ctext; - /** iv */ - void *IV; - /** Public key */ - void *publicKey; - /** Length of the public key */ - uint32_t publicKeyLen; - /** Private key */ - void *privateKey; - /** Length of the private key */ - uint32_t privateKeyLen; - /** Length of the IV */ - uint32_t IVLen; - /** Operation lock */ - pthread_mutex_t operation_lock; - /** HAL information */ - void *hal_info; -}; - -/** - * @brief Defines the data used for conversion of integers. - * - * @since 12 - */ -typedef struct { - /** Source */ - uint32_t src; - /** Destination */ - uint32_t dest; -} crypto_uint2uint; - -/** - * @brief Defines the maximum length of an RSA public key. - * - * @since 12 - */ -#define RSA_PUBKEY_MAXSIZE sizeof(CRYS_RSAUserPubKey_t) -/** - * @brief Defines the maximum length of an RES private key. - * - * @since 12 - */ -#define RSA_PRIVKEY_MAXSIZE sizeof(CRYS_RSAUserPrivKey_t) - -/** - * @brief Defines a structure to hold the input and output data. - * - * @since 12 - */ -typedef struct { - /** Source data */ - void *src_data; - /** Length of the source data */ - size_t src_len; - /** Destination data */ - void *dest_data; - /** Length of the destination data */ - size_t *dest_len; -} operation_src_dest; - -/** - * @brief Defines the AE initialization data. - * - * @since 12 - */ -typedef struct { - /** nonce */ - void *nonce; - /** Leng of nonce */ - size_t nonce_len; - /** Length of the tag */ - uint32_t tag_len; - /** Length of the additional authenticated data (AAD) */ - size_t aad_len; - /** Length of the payload */ - size_t payload_len; -} operation_ae_init; - -/** - * @brief Defines the pointer to __TEE_OperationHandle. - * - * @see __TEE_OperationHandle - * - * @since 12 - */ -typedef struct __TEE_OperationHandle *TEE_OperationHandle; - -/** - * @brief Defines the __TEE_OperationHandle struct. - * - * @see __TEE_OperationHandle - * - * @since 12 - */ -typedef struct __TEE_OperationHandle TEE_OperationHandleVar; - -/** - * @brief Defines the __TEE_ObjectHandle struct. - * - * @since 12 - */ -typedef struct __TEE_ObjectHandle TEE_ObjectHandleVar; - -/** - * @brief Allocates an operation handle. - * - * @param operation Indicates the pointer to the operation handle. - * @param algorithm Indicates the cipher algorithm. - * @param mode Indicates the operation mode. - * @param maxKeySize Indicates the maximum length of the key. - * - * @return Returns TEE_SUCCESS if the operation handle is allocated. - * Returns TEE_ERROR_OUT_OF_MEMORY if there is no enough memory for this operation. - * Returns TEE_ERROR_NOT_SUPPORTED if the specified algorithm is not supported. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AllocateOperation(TEE_OperationHandle *operation, uint32_t algorithm, uint32_t mode, - uint32_t maxKeySize); - -/** - * @brief Releases an operation handle. - * - * @param operation Indicates the operation handle to release. - * - * @since 12 - * @version 1.0 - */ -void TEE_FreeOperation(TEE_OperationHandle operation); - -/** - * @brief Obtains operation information. - * - * @param operation Indicates the operation handle. - * @param operationInfo Indicates the pointer to the operation information. - * - * @since 12 - * @version 1.0 - */ -void TEE_GetOperationInfo(const TEE_OperationHandle operation, TEE_OperationInfo *operationInfo); - -/** - * @brief Resets an operation handle. - * - * @param operation Indicates the operation handle to reset. - * - * @since 12 - * @version 1.0 - */ -void TEE_ResetOperation(TEE_OperationHandle operation); - -/** - * @brief Sets the key for an operation. - * - * @param operation Indicates the operation handle. - * @param key Indicates the key. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_OUT_OF_MEMORY if there is no enough memory for this operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SetOperationKey(TEE_OperationHandle operation, const TEE_ObjectHandle key); - -/** - * @brief Sets two keys for an operation. - * - * @param operation Indicates the operation handle. - * @param key1 Indicates key 1. - * @param key2 Indicates key 2. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SetOperationKey2(TEE_OperationHandle operation, const TEE_ObjectHandle key1, - const TEE_ObjectHandle key2); - -/** - * @brief Copies an operation handle. - * - * @param dstOperation Indicates the destination operation handle. - * @param srcOperation Indicates the source operation handle. - * - * @since 12 - * @version 1.0 - */ -void TEE_CopyOperation(TEE_OperationHandle dstOperation, const TEE_OperationHandle srcOperation); - -/** - * @brief Initializes the context to start a cipher operation. - * - * @param operation Indicates the operation handle. - * @param IV Indicates the pointer to the buffer storing the operation IV. If this parameter is not used, - * set it to NULL. - * @param IVLen Indicates the length of the IV buffer. - * - * @since 12 - * @version 1.0 - */ -void TEE_CipherInit(TEE_OperationHandle operation, const void *IV, size_t IVLen); - -/** - * @brief Updates the data for a cipher operation. - * - * @param operation Indicates the operation handle. - * @param srcData Indicates the pointer to the source data. - * @param srcLen Indicates the length of the source data. - * @param destData Indicates the pointer to the destination data. - * @param destLen Indicates the pointer to the destination data length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_CipherUpdate(TEE_OperationHandle operation, const void *srcData, size_t srcLen, void *destData, - size_t *destLen); - -/** - * @brief Finalizes a cipher operation. - * - * @param operation Indicates the operation handle. - * @param srcData Indicates the pointer to the source data. - * @param srcLen Indicates the length of the source data. - * @param destData Indicates the pointer to the destination data. - * @param destLen Indicates the pointer to the destination data length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_CipherDoFinal(TEE_OperationHandle operation, const void *srcData, size_t srcLen, void *destData, - size_t *destLen); - -/** - * @brief Updates the digest. - * - * @param operation Indicates the operation handle. - * @param chunk Indicates the pointer to the chunk of data to be hashed. - * @param chunkSize Indicates the length of the chunk. - * - * @since 12 - * @version 1.0 - */ -void TEE_DigestUpdate(TEE_OperationHandle operation, const void *chunk, size_t chunkSize); - -/** - * @brief Finalizes the message digest operation. - * - * @param operation Indicates the operation handle. - * @param chunk Indicates the pointer to the chunk of data to be hashed. - * @param chunkLen Indicates the length of the chunk. - * @param hash Indicates the pointer to the buffer storing the message hash. - * @param hashLen - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_DigestDoFinal(TEE_OperationHandle operation, const void *chunk, size_t chunkLen, void *hash, - size_t *hashLen); - -/** - * @brief Initializes a MAC operation. - * - * @param operation Indicates the operation handle. - * @param IV Indicates the pointer to the buffer storing the operation IV. If this parameter is not used, - * set it to NULL. - * @param IVLen Indicates the length of the IV buffer. - * - * @since 12 - * @version 1.0 - */ -void TEE_MACInit(TEE_OperationHandle operation, void *IV, size_t IVLen); - -/** - * @brief Updates the MAC. - * - * @param operation Indicates the operation handle. - * @param chunk Indicates the pointer to the chunk of MAC data. - * @param chunkSize Indicates the size of the chunk. - * - * @since 12 - * @version 1.0 - */ -void TEE_MACUpdate(TEE_OperationHandle operation, const void *chunk, size_t chunkSize); - -/** - * @brief MAC Finalizes the MAC operation with a last chunk of message and computes the MAC. - * - * @param operation Indicates the operation handle. - * @param message Indicates the pointer to the buffer containing the last message chunk to MAC. - * @param messageLen Indicates the length of the message buffer. - * @param mac Indicates the pointer to the buffer storing the computed MAC. - * @param macLen Indicates the pointer to the MAC buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_MACComputeFinal(TEE_OperationHandle operation, const void *message, size_t messageLen, void *mac, - size_t *macLen); - -/** - * @brief Finalizes the MAC operation and compares the MAC with the one passed in. - * - * @param operation Indicates the operation handle. - * @param message Indicates the pointer to the buffer containing the last message chunk to MAC. - * @param messageLen Indicates the length of the buffer. - * @param mac Indicates the pointer to the buffer storing the computed MAC. - * @param macLen Indicates the MAC buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * Returns TEE_ERROR_MAC_INVALID if the computed MAC is not the same as that passed in. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_MACCompareFinal(TEE_OperationHandle operation, const void *message, size_t messageLen, const void *mac, - const size_t macLen); - -/** - * @brief Derives a key. - * - * @param operation Indicates the operation handle. - * @param params Indicates the pointer to the parameters for this operation. - * @param paramCount Indicates the number of parameters. - * @param derivedKey Indicates the derived key. - * - * @since 12 - * @version 1.0 - */ -void TEE_DeriveKey(TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, - TEE_ObjectHandle derivedKey); - -/** - * @brief Generates random data. - * - * @param randomBuffer Indicates the pointer to the buffer storing the random data generated. - * @param randomBufferLen Indicates the length of the buffer storing the random data. - * - * @since 12 - * @version 1.0 - */ -void TEE_GenerateRandom(void *randomBuffer, size_t randomBufferLen); - -/** - * @brief Initializes an AE operation. - * - * @param operation Indicates the operation handle. - * @param nonce Indicates the pointer to the buffer for storing the nonce. - * @param nonceLen Indicates the length of the nonce. - * @param tagLen Indicates the length of the tag. - * @param AADLen Indicates the length of the AAD. - * @param payloadLen Indicates the length of the payload. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AEInit(TEE_OperationHandle operation, void *nonce, size_t nonceLen, uint32_t tagLen, size_t AADLen, - size_t payloadLen); - -/** - * @brief Updates the AAD in an AE operation. - * - * @param operation Indicates the operation handle. - * @param AADdata Indicates the pointer to the new AAD. - * @param AADdataLen Indicates the length of the new AAD. - * - * @since 12 - * @version 1.0 - */ -void TEE_AEUpdateAAD(TEE_OperationHandle operation, const void *AADdata, size_t AADdataLen); - -/** - * @brief Updates data for an AE operation. - * - * @param operation Indicates the operation handle. - * @param srcData Indicates the pointer to the source data. - * @param srcLen Indicates the length of the source data. - * @param destData Indicates the pointer to the destination data. - * @param destLen Indicates the pointer to the destination data length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AEUpdate(TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, size_t *destLen); - -/** - * @brief Finalizes the AE encryption operation. - * - * @param operation Indicates the operation handle. - * @param srcData Indicates the pointer to the source data. - * @param srcLen Indicates the length of the source data. - * @param destData Indicates the pointer to the destination data. - * @param destLen Indicates the pointer to the destination data length. - * @param tag Indicates the pointer to the buffer storing the computed tag. - * @param tagLen Indicates the pointer to the tag buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AEEncryptFinal(TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, - size_t *destLen, void *tag, size_t *tagLen); - -/** - * @brief Finalizes an AE decryption operation. - * - * @param operation Indicates the operation handle. - * @param srcData Indicates the pointer to the source data. - * @param srcLen Indicates the length of the source data. - * @param destData Indicates the pointer to the destination data. - * @param destLen Indicates the pointer to the destination data length. - * @param tag Indicates the pointer to the buffer storing the computed tag. - * @param tagLen Indicates the tag buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_MAC_INVALID if the computed tag does not match the provided tag. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AEDecryptFinal(TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, - size_t *destLen, void *tag, size_t tagLen); - -/** - * @brief Performs asymmetric encryption. - * - * @param operation Indicates the operation handle. - * @param params Indicates the pointer to the parameters for this operation. - * @param paramCount Indicates the number of parameters. - * @param srcData Indicates the pointer to the source data. - * @param srcLen Indicates the length of the source data. - * @param destData Indicates the pointer to the destination data. - * @param destLen Indicates the pointer to the destination data length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AsymmetricEncrypt(TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, - void *srcData, size_t srcLen, void *destData, size_t *destLen); - -/** - * @brief Performs asymmetric decryption. - * - * @param operation Indicates the operation handle. - * @param params Indicates the pointer to the parameters for this operation. - * @param paramCount Indicates the number of parameters. - * @param srcData Indicates the pointer to the source data. - * @param srcLen Indicates the length of the source data. - * @param destData Indicates the pointer to the destination data. - * @param destLen Indicates the pointer to the destination data length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AsymmetricDecrypt(TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, - void *srcData, size_t srcLen, void *destData, size_t *destLen); - -/** - * @brief Signs a message digest in an asymmetric operation. - * - * @param operation Indicates the operation handle. - * @param params Indicates the pointer to the parameters for this operation. - * @param paramCount Indicates the number of parameters. - * @param digest Indicates the pointer to the message digest. - * @param digestLen Indicates the digest length. - * @param signature Indicates the pointer to the signature. - * @param signatureLen Indicates the pointer to the signature length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AsymmetricSignDigest(TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, - void *digest, size_t digestLen, void *signature, size_t *signatureLen); - -/** - * @brief Verifies a message digest signature in an asymmetric operation. - * - * @param operation Indicates the operation handle. - * @param params Indicates the pointer to the parameters for this operation. - * @param paramCount Indicates the number of parameters. - * @param digest Indicates the pointer to the message digest. - * @param digestLen Indicates the digest length. - * @param signature Indicates the pointer to the signature. - * @param signatureLen Indicates the signature length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_GENERIC if the operation fails due to other errors. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AsymmetricVerifyDigest(TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, - void *digest, size_t digestLen, void *signature, size_t signatureLen); - -/** - * @brief Obtains information about the operation involving multiple keys. - * - * @param operation Indicates the operation handle. - * @param operationInfoMultiple Indicates the pointer to the operation information obtained. - * @param operationSize [IN/OUT] Indicates the pointer to the operation information size. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if the operation fails due to invalid parameters. - * Returns TEE_ERROR_SHORT_BUFFER if the operationInfo buffer is not large enough to - * hold the information obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetOperationInfoMultiple(TEE_OperationHandle operation, TEE_OperationInfoMultiple *operationInfoMultiple, - const size_t *operationSize); - -/** - * @brief Checks whether the algorithm is supported. - * - * @param algId Indicates the algorithm to check. - * @param element Indicates the cryptographic element. - * - * @return Returns TEE_SUCCESS if the algorithm is supported. - * Returns TEE_ERROR_NOT_SUPPORTED otherwise. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_IsAlgorithmSupported(uint32_t algId, uint32_t element); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_crypto_hal.h b/tee/include/tee_crypto_hal.h deleted file mode 100644 index 6ae67f9a9..000000000 --- a/tee/include/tee_crypto_hal.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_CRYPTO_HAL_H -#define TEE_CRYPTO_HAL_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_crypto_hal.h - * - * @brief Provides APIs for cryptographic operations. - * - * You can use these APIs to implement encryption and decryption. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_crypto_api.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Enumerates the types of the crypto engine. - * - * @since 12 - */ -enum CRYPTO_ENGINE { - SOFT_CRYPTO = 2, - CRYPTO_ENGINE_MAX = 1024, -}; - -/** - * @brief Sets the encryption and decryption engines to an operation. - * - * @param operation Indicates the handle of the operation to set. - * @param crypto Indicates the engines to set. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if operation is null or crypto is invalid. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SetCryptoFlag(TEE_OperationHandle operation, uint32_t crypto); - -/** - * @brief Sets the encryption and decryption engines to an object. - * - * @param object Indicates the handle of the object to set. - * @param crypto Indicates the engines to set. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_BAD_PARAMETERS if object is null or crypto is invalid. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SetObjectFlag(TEE_ObjectHandle object, uint32_t crypto); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif - diff --git a/tee/include/tee_defines.h b/tee/include/tee_defines.h deleted file mode 100644 index e427afd12..000000000 --- a/tee/include/tee_defines.h +++ /dev/null @@ -1,607 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_DEFINES_H -#define __TEE_DEFINES_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_defines.h - * - * @brief Defines basic data types and data structures of TEE. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -#ifndef TA_EXPORT -#define TA_EXPORT -#endif - -/** - * @brief Defines the tee mutex handle. - * - * @since 12 - */ -typedef int *tee_mutex_handle; - -#define API_LEVEL1_1_1 2 -#define API_LEVEL1_2 3 - -#define TEE_PARAMS_NUM 4 -#undef true -#define true 1 - -#undef false -#define false 0 - -#ifndef NULL -#define NULL ((void *)0) -#endif - -#define PARAM_NOT_USED(val) ((void)(val)) - -/** - * @brief Enumerates the TEE parameter. - * - * @since 12 - */ -typedef union { - struct { - void *buffer; - size_t size; - } memref; - struct { - unsigned int a; - unsigned int b; - } value; - struct { - void *buffer; - size_t size; - } sharedmem; -} TEE_Param; - -#define TEE_PARAM_TYPES(param0Type, param1Type, param2Type, param3Type) \ - (((param3Type) << 12) | ((param2Type) << 8) | ((param1Type) << 4) | (param0Type)) - -#define TEE_PARAM_TYPE_GET(paramTypes, index) (((paramTypes) >> (4U * (index))) & 0x0F) - -/** - * @brief Checks parameter types. - * - * @param param_to_check Indicates the expected parameter values. - * @param valid0 Indicates the first parameter type to check. - * @param valid1 Indicates the second parameter type to check. - * @param valid2 Indicates the third parameter type to check. - * @param valid3 Indicates the fourth parameter type to check. - * - * @return Returns true if the parameter types are correct. - * Returns false otherwise. - * @since 12 - */ -static inline bool check_param_type(uint32_t param_to_check, uint32_t valid0, uint32_t valid1, uint32_t valid2, - uint32_t valid3) -{ - return (TEE_PARAM_TYPES(valid0, valid1, valid2, valid3) == param_to_check); -} - -/** - * @brief Enumerates the types of the TEE parameter. - * - * @since 12 - */ -enum TEE_ParamType { - TEE_PARAM_TYPE_NONE = 0x0, - TEE_PARAM_TYPE_VALUE_INPUT = 0x1, - TEE_PARAM_TYPE_VALUE_OUTPUT = 0x2, - TEE_PARAM_TYPE_VALUE_INOUT = 0x3, - TEE_PARAM_TYPE_MEMREF_INPUT = 0x5, - TEE_PARAM_TYPE_MEMREF_OUTPUT = 0x6, - TEE_PARAM_TYPE_MEMREF_INOUT = 0x7, - TEE_PARAM_TYPE_ION_INPUT = 0x8, - TEE_PARAM_TYPE_ION_SGLIST_INPUT = 0x9, - TEE_PARAM_TYPE_MEMREF_SHARED_INOUT = 0xa, - TEE_PARAM_TYPE_RESMEM_INPUT = 0xc, - TEE_PARAM_TYPE_RESMEM_OUTPUT = 0xd, - TEE_PARAM_TYPE_RESMEM_INOUT = 0xe, -}; - -#define S_VAR_NOT_USED(variable) \ - do { \ - (void)(variable); \ - } while (0) - -/** - * @brief Defines an object information. - * - * @since 12 - */ -typedef struct { - uint32_t objectType; - uint32_t objectSize; - uint32_t maxObjectSize; - uint32_t objectUsage; - uint32_t dataSize; - uint32_t dataPosition; - uint32_t handleFlags; -} TEE_ObjectInfo; - -/** - * @brief Defines an object attribute. - * - * @since 12 - */ -typedef struct { - uint32_t attributeID; - union { - struct { - void *buffer; - size_t length; - } ref; - struct { - uint32_t a; - uint32_t b; - } value; - } content; -} TEE_Attribute; - -/** - * @brief Enumerates the types of object attribute. - * - * @since 12 - */ -enum TEE_ObjectAttribute { - TEE_ATTR_SECRET_VALUE = 0xC0000000, - TEE_ATTR_RSA_MODULUS = 0xD0000130, - TEE_ATTR_RSA_PUBLIC_EXPONENT = 0xD0000230, - TEE_ATTR_RSA_PRIVATE_EXPONENT = 0xC0000330, - TEE_ATTR_RSA_PRIME1 = 0xC0000430, - TEE_ATTR_RSA_PRIME2 = 0xC0000530, - TEE_ATTR_RSA_EXPONENT1 = 0xC0000630, - TEE_ATTR_RSA_EXPONENT2 = 0xC0000730, - TEE_ATTR_RSA_COEFFICIENT = 0xC0000830, - TEE_ATTR_RSA_MGF1_HASH = 0xF0000830, - TEE_ATTR_DSA_PRIME = 0xD0001031, - TEE_ATTR_DSA_SUBPRIME = 0xD0001131, - TEE_ATTR_DSA_BASE = 0xD0001231, - TEE_ATTR_DSA_PUBLIC_VALUE = 0xD0000131, - TEE_ATTR_DSA_PRIVATE_VALUE = 0xC0000231, - TEE_ATTR_DH_PRIME = 0xD0001032, - TEE_ATTR_DH_SUBPRIME = 0xD0001132, - TEE_ATTR_DH_BASE = 0xD0001232, - TEE_ATTR_DH_X_BITS = 0xF0001332, - TEE_ATTR_DH_PUBLIC_VALUE = 0xD0000132, - TEE_ATTR_DH_PRIVATE_VALUE = 0xC0000232, - TEE_ATTR_RSA_OAEP_LABEL = 0xD0000930, - TEE_ATTR_RSA_PSS_SALT_LENGTH = 0xF0000A30, - TEE_ATTR_ECC_PUBLIC_VALUE_X = 0xD0000141, - TEE_ATTR_ECC_PUBLIC_VALUE_Y = 0xD0000241, - TEE_ATTR_ECC_PRIVATE_VALUE = 0xC0000341, - TEE_ATTR_ECC_CURVE = 0xF0000441, - TEE_ATTR_ED25519_CTX = 0xD0000643, - TEE_ATTR_ED25519_PUBLIC_VALUE = 0xD0000743, - TEE_ATTR_ED25519_PRIVATE_VALUE = 0xC0000843, - TEE_ATTR_ED25519_PH = 0xF0000543, - TEE_ATTR_X25519_PUBLIC_VALUE = 0xD0000944, - TEE_ATTR_X25519_PRIVATE_VALUE = 0xC0000A44, - TEE_ATTR_PBKDF2_HMAC_PASSWORD = 0xD0000133, - TEE_ATTR_PBKDF2_HMAC_SALT = 0xD0000134, - TEE_ATTR_PBKDF2_HMAC_DIGEST = 0xF0000135, -}; - -/** - * @brief Enumerates the types of object. - * - * @since 12 - */ -enum TEE_ObjectType { - TEE_TYPE_AES = 0xA0000010, - TEE_TYPE_DES = 0xA0000011, - TEE_TYPE_DES3 = 0xA0000013, - TEE_TYPE_HMAC_MD5 = 0xA0000001, - TEE_TYPE_HMAC_SHA1 = 0xA0000002, - TEE_TYPE_HMAC_SHA224 = 0xA0000003, - TEE_TYPE_HMAC_SHA256 = 0xA0000004, - TEE_TYPE_HMAC_SHA384 = 0xA0000005, - TEE_TYPE_HMAC_SHA512 = 0xA0000006, - TEE_TYPE_RSA_PUBLIC_KEY = 0xA0000030, - TEE_TYPE_RSA_KEYPAIR = 0xA1000030, - TEE_TYPE_DSA_PUBLIC_KEY = 0xA0000031, - TEE_TYPE_DSA_KEYPAIR = 0xA1000031, - TEE_TYPE_DH_KEYPAIR = 0xA1000032, - TEE_TYPE_GENERIC_SECRET = 0xA0000000, - TEE_TYPE_DATA = 0xA1000033, - TEE_TYPE_DATA_GP1_1 = 0xA00000BF, - TEE_TYPE_ECDSA_PUBLIC_KEY = 0xA0000041, - TEE_TYPE_ECDSA_KEYPAIR = 0xA1000041, - TEE_TYPE_ECDH_PUBLIC_KEY = 0xA0000042, - TEE_TYPE_ECDH_KEYPAIR = 0xA1000042, - TEE_TYPE_ED25519_PUBLIC_KEY = 0xA0000043, - TEE_TYPE_ED25519_KEYPAIR = 0xA1000043, - TEE_TYPE_X25519_PUBLIC_KEY = 0xA0000044, - TEE_TYPE_X25519_KEYPAIR = 0xA1000044, - TEE_TYPE_SM2_DSA_PUBLIC_KEY = 0xA0000045, - TEE_TYPE_SM2_DSA_KEYPAIR = 0xA1000045, - TEE_TYPE_SM2_KEP_PUBLIC_KEY = 0xA0000046, - TEE_TYPE_SM2_KEP_KEYPAIR = 0xA1000046, - TEE_TYPE_SM2_PKE_PUBLIC_KEY = 0xA0000047, - TEE_TYPE_SM2_PKE_KEYPAIR = 0xA1000047, - TEE_TYPE_HMAC_SM3 = 0xA0000007, - TEE_TYPE_SM4 = 0xA0000014, - TEE_TYPE_SIP_HASH = 0xF0000002, - TEE_TYPE_PBKDF2_HMAC = 0xF0000004, - - TEE_TYPE_CORRUPTED_OBJECT = 0xA00000BE, -}; - -#define OBJECT_NAME_LEN_MAX 255 - -/** - * @brief Defines an object handle. - * - * @since 12 - */ -struct __TEE_ObjectHandle { - void *dataPtr; - uint32_t dataLen; - uint8_t dataName[OBJECT_NAME_LEN_MAX]; - TEE_ObjectInfo *ObjectInfo; - TEE_Attribute *Attribute; - uint32_t attributesLen; - uint32_t CRTMode; - void *infoattrfd; - uint32_t generate_flag; - uint32_t storage_id; -}; - -/** - * @brief Defines the __TEE_ObjectHandle struct. - * - * @see __TEE_ObjectHandle - * - * @since 12 - */ -typedef struct __TEE_ObjectHandle *TEE_ObjectHandle; - -#define NODE_LEN 8 - -/** - * @brief Defines an UUID of TA. - * - * @since 12 - */ -typedef struct tee_uuid { - uint32_t timeLow; - uint16_t timeMid; - uint16_t timeHiAndVersion; - uint8_t clockSeqAndNode[NODE_LEN]; -} TEE_UUID; - -/** - * @brief Defines the type of spawn UUID. - * - * @since 12 - */ -typedef struct spawn_uuid { - uint64_t uuid_valid; - TEE_UUID uuid; -} spawn_uuid_t; - -/** - * @brief Enumerates the result codes used in the TEEKit APIs. - * - * @since 12 - */ -enum TEE_Result_Value { - /* The operation is successful. */ - TEE_SUCCESS = 0x00000000, - /* The command is invalid. */ - TEE_ERROR_INVALID_CMD = 0x00000001, - /* The service does not exist. */ - TEE_ERROR_SERVICE_NOT_EXIST = 0x00000002, - /* The session does not exist. */ - TEE_ERROR_SESSION_NOT_EXIST = 0x00000003, - /* The number of sessions exceeds the limit. */ - TEE_ERROR_SESSION_MAXIMUM = 0x00000004, - /* The service has been already registered. */ - TEE_ERROR_REGISTER_EXIST_SERVICE = 0x00000005, - /* An internal error occurs. */ - TEE_ERROR_TARGET_DEAD_FATAL = 0x00000006, - /* Failed to read data. */ - TEE_ERROR_READ_DATA = 0x00000007, - /* Failed to write data. */ - TEE_ERROR_WRITE_DATA = 0x00000008, - /* Failed to truncate data. */ - TEE_ERROR_TRUNCATE_OBJECT = 0x00000009, - /* Failed to seek data. */ - TEE_ERROR_SEEK_DATA = 0x0000000A, - /* Failed to synchronize data. */ - TEE_ERROR_SYNC_DATA = 0x0000000B, - /* Failed to rename the file. */ - TEE_ERROR_RENAME_OBJECT = 0x0000000C, - /* An error occurs when the TA is loaded. */ - TEE_ERROR_TRUSTED_APP_LOAD_ERROR = 0x0000000D, - /* An I/O error occurs when data is stored. */ - TEE_ERROR_STORAGE_EIO = 0x80001001, - /* The storage section is unavailable. */ - TEE_ERROR_STORAGE_EAGAIN = 0x80001002, - /* The operation target is not a directory. */ - TEE_ERROR_STORAGE_ENOTDIR = 0x80001003, - /* This operation cannot be performed on a directory. */ - TEE_ERROR_STORAGE_EISDIR = 0x80001004, - /* The number of opened files exceeds the limit in system. */ - TEE_ERROR_STORAGE_ENFILE = 0x80001005, - /* The number of files opened for the process exceeds the limit.*/ - TEE_ERROR_STORAGE_EMFILE = 0x80001006, - /* The storage section is read only. */ - TEE_ERROR_STORAGE_EROFS = 0x80001007, - /* The file path is not correct. */ - TEE_ERROR_STORAGE_PATH_WRONG = 0x8000100A, - /* The service message queue overflows. */ - TEE_ERROR_MSG_QUEUE_OVERFLOW = 0x8000100B, - /* The file object is corrupted. */ - TEE_ERROR_CORRUPT_OBJECT = 0xF0100001, - /* The storage section is unavailable. */ - TEE_ERROR_STORAGE_NOT_AVAILABLE = 0xF0100003, - /* The cipher text is incorrect. */ - TEE_ERROR_CIPHERTEXT_INVALID = 0xF0100006, - /* Protocol error in socket connection. */ - TEE_ISOCKET_ERROR_PROTOCOL = 0xF1007001, - /* The socket is closed by the remote end. */ - TEE_ISOCKET_ERROR_REMOTE_CLOSED = 0xF1007002, - /* The socket connection timed out. */ - TEE_ISOCKET_ERROR_TIMEOUT = 0xF1007003, - /* There is no resource available for the socket connection. */ - TEE_ISOCKET_ERROR_OUT_OF_RESOURCES = 0xF1007004, - /* The buffer is too large for the socket connection. */ - TEE_ISOCKET_ERROR_LARGE_BUFFER = 0xF1007005, - /* A warning is given in the socket connection. */ - TEE_ISOCKET_WARNING_PROTOCOL = 0xF1007006, - /* Generic error. */ - TEE_ERROR_GENERIC = 0xFFFF0000, - /* The access is denied. */ - TEE_ERROR_ACCESS_DENIED = 0xFFFF0001, - /* The operation has been canceled. */ - TEE_ERROR_CANCEL = 0xFFFF0002, - /* An access conflict occurs. */ - TEE_ERROR_ACCESS_CONFLICT = 0xFFFF0003, - /* The data size exceeds the maximum. */ - TEE_ERROR_EXCESS_DATA = 0xFFFF0004, - /* Incorrect data format. */ - TEE_ERROR_BAD_FORMAT = 0xFFFF0005, - /* Incorrect parameters. */ - TEE_ERROR_BAD_PARAMETERS = 0xFFFF0006, - /* The current state does not support the operation. */ - TEE_ERROR_BAD_STATE = 0xFFFF0007, - /* Failed to find the target item. */ - TEE_ERROR_ITEM_NOT_FOUND = 0xFFFF0008, - /* The API is not implemented. */ - TEE_ERROR_NOT_IMPLEMENTED = 0xFFFF0009, - /* The API is not supported. */ - TEE_ERROR_NOT_SUPPORTED = 0xFFFF000A, - /* There is no data available for this operation. */ - TEE_ERROR_NO_DATA = 0xFFFF000B, - /* There is no memory available for this operation. */ - TEE_ERROR_OUT_OF_MEMORY = 0xFFFF000C, - /* The system does not respond to this operation. */ - TEE_ERROR_BUSY = 0xFFFF000D, - /* Failed to communicate with the target. */ - TEE_ERROR_COMMUNICATION = 0xFFFF000E, - /* A security error occurs. */ - TEE_ERROR_SECURITY = 0xFFFF000F, - /* The buffer is insufficient for this operation. */ - TEE_ERROR_SHORT_BUFFER = 0xFFFF0010, - /* The operation has been canceled. */ - TEE_ERROR_EXTERNAL_CANCEL = 0xFFFF0011, - /* The service is in the pending state (asynchronous state). */ - TEE_PENDING = 0xFFFF2000, - /* The service is in the pending state(). */ - TEE_PENDING2 = 0xFFFF2001, - /* Reserved. */ - TEE_PENDING3 = 0xFFFF2002, - /* The operation timed out. */ - TEE_ERROR_TIMEOUT = 0xFFFF3001, - /* Overflow occurs. */ - TEE_ERROR_OVERFLOW = 0xFFFF300f, - /* The TA is crashed. */ - TEE_ERROR_TARGET_DEAD = 0xFFFF3024, - /* There is no enough space to store data. */ - TEE_ERROR_STORAGE_NO_SPACE = 0xFFFF3041, - /* The MAC operation failed. */ - TEE_ERROR_MAC_INVALID = 0xFFFF3071, - /* The signature verification failed. */ - TEE_ERROR_SIGNATURE_INVALID = 0xFFFF3072, - /* Interrupted by CFC. Broken control flow is detected. */ - TEE_CLIENT_INTR = 0xFFFF4000, - /* Time is not set. */ - TEE_ERROR_TIME_NOT_SET = 0xFFFF5000, - /* Time needs to be reset. */ - TEE_ERROR_TIME_NEEDS_RESET = 0xFFFF5001, - /* System error. */ - TEE_FAIL = 0xFFFF5002, - /* Base value of the timer error code. */ - TEE_ERROR_TIMER = 0xFFFF6000, - /* Failed to create the timer. */ - TEE_ERROR_TIMER_CREATE_FAILED = 0xFFFF6001, - /* Failed to destroy the timer. */ - TEE_ERROR_TIMER_DESTORY_FAILED = 0xFFFF6002, - /* The timer is not found. */ - TEE_ERROR_TIMER_NOT_FOUND = 0xFFFF6003, - /* Generic error of RPMB operations. */ - TEE_ERROR_RPMB_GENERIC = 0xFFFF7001, - /* Verify MAC failed in RPMB operations. */ - TEE_ERROR_RPMB_MAC_FAIL = 0xFFFF7002, - /* Incorrect message data MAC in RPMB response. */ - TEE_ERROR_RPMB_RESP_UNEXPECT_MAC = 0xFFFF7105, - /* The file is not found in RPMB. */ - TEE_ERROR_RPMB_FILE_NOT_FOUND = 0xFFFF7106, - /* No spece left for RPMB operations. */ - TEE_ERROR_RPMB_NOSPC = 0xFFFF7107, - /* sec flash is not available. */ - TEE_ERROR_SEC_FLASH_NOT_AVAILABLE = 0xFFFF7118, - /* The BIO service is not available. */ - TEE_ERROR_BIOSRV_NOT_AVAILABLE = 0xFFFF711A, - /* The ROT service is not available. */ - TEE_ERROR_ROTSRV_NOT_AVAILABLE = 0xFFFF711B, - /* The TA Anti-Rollback service is not available. */ - TEE_ERROR_ARTSRV_NOT_AVAILABLE = 0xFFFF711C, - /* The HSM service is not available. */ - TEE_ERROR_HSMSRV_NOT_AVAILABLE = 0xFFFF711D, - /* Failed to verify AntiRoot response. */ - TEE_ERROR_ANTIROOT_RSP_FAIL = 0xFFFF9110, - /* AntiRoot error in invokeCmd(). */ - TEE_ERROR_ANTIROOT_INVOKE_ERROR = 0xFFFF9111, - /* Audit failed. */ - TEE_ERROR_AUDIT_FAIL = 0xFFFF9112, - /* Unused. */ - TEE_FAIL2 = 0xFFFF9113, -}; - -/** - * @brief Login type definitions - * - * @since 12 - */ -enum TEE_LoginMethod { - TEE_LOGIN_PUBLIC = 0x0, - TEE_LOGIN_USER, - TEE_LOGIN_GROUP, - TEE_LOGIN_APPLICATION = 0x4, - TEE_LOGIN_USER_APPLICATION = 0x5, - TEE_LOGIN_GROUP_APPLICATION = 0x6, - TEE_LOGIN_IDENTIFY = 0x7, /* Customized login type */ -}; - -/** - * @brief Definitions the TEE Identity. - * - * @since 12 - */ -typedef struct { - uint32_t login; - TEE_UUID uuid; -} TEE_Identity; - -/** - * @brief Defines the return values. - * - * @since 12 - * @version 1.0 - */ -typedef uint32_t TEE_Result; - -/** - * @brief Defines the return values. - * - * @since 12 - * @version 1.0 - */ -typedef TEE_Result TEEC_Result; - -#define TEE_ORIGIN_TEE 0x00000003 -#define TEE_ORIGIN_TRUSTED_APP 0x00000004 - -#ifndef _TEE_TA_SESSION_HANDLE -#define _TEE_TA_SESSION_HANDLE -/** - * @brief Defines the handle of TA session. - * - * @since 12 - */ -typedef uint32_t TEE_TASessionHandle; -#endif - -/** - * @brief Defines the pointer to TEE_ObjectEnumHandle. - * - * @see __TEE_ObjectEnumHandle - * - * @since 12 - */ -typedef struct __TEE_ObjectEnumHandle *TEE_ObjectEnumHandle; - -/** - * @brief Defines the pointer to __TEE_OperationHandle. - * - * @see __TEE_OperationHandle - * - * @since 12 - */ -typedef struct __TEE_OperationHandle *TEE_OperationHandle; - -#define TEE_TIMEOUT_INFINITE (0xFFFFFFFF) - -/** - * @brief Definitions the TEE time. - * - * @since 12 - */ -typedef struct { - uint32_t seconds; - uint32_t millis; -} TEE_Time; - -/** - * @brief Definitions the date time of TEE. - * - * @since 12 - */ -typedef struct { - int32_t seconds; - int32_t millis; - int32_t min; - int32_t hour; - int32_t day; - int32_t month; - int32_t year; -} TEE_Date_Time; - -/** - * @brief Definitions the timer property of TEE. - * - * @since 12 - */ -typedef struct { - uint32_t type; - uint32_t timer_id; - uint32_t timer_class; - uint32_t reserved2; -} TEE_timer_property; - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_drv_client.h b/tee/include/tee_drv_client.h deleted file mode 100644 index 4adca85f7..000000000 --- a/tee/include/tee_drv_client.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef TEE_DRV_CLIENT_H -#define TEE_DRV_CLIENT_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_drv_client.h - * - * @brief Declare tee driver client API. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Open the specified driver in the TEE. - * - * @param drv_name [IN] The driver name. - * @param param [IN] The parameter information. - * @param param_len [IN] The length of the parameter. - * - * @return Returns greater than 0, which means the fd of the corresponding driver. - * Returns less than or equal to 0, which means falied to open the driver. - * - * @since 12 - * @version 1.0 - */ -int64_t tee_drv_open(const char *drv_name, const void *param, uint32_t param_len); - -/** - * @brief Cancels an operation. - * - * @param fd [IN] The file descriptor of the driver. - * @param cmd_id [IN] The command id. - * @param param [IN] The parameter information. - * @param param_len [IN] The length of the parameter. - * - * @return Returns 0 if the operation is successful. - * Returns -1 if the operation is failed. - * - * @since 12 - * @version 1.0 - */ -int64_t tee_drv_ioctl(int64_t fd, uint32_t cmd_id, const void *param, uint32_t param_len); - -/** - * @brief Open the specified driver in the TEE. - * - * @param fd [IN] The file descriptor of the driver. - * - * @return Returns 0 if the operation is successful. - * Returns -1 if the operation is failed. - * - * @since 12 - * @version 1.0 - */ -int64_t tee_drv_close(int64_t fd); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif - diff --git a/tee/include/tee_dynamic_srv.h b/tee/include/tee_dynamic_srv.h deleted file mode 100644 index 37ef28f68..000000000 --- a/tee/include/tee_dynamic_srv.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _TEE_DYNAMIC_SRV_H_ -#define _TEE_DYNAMIC_SRV_H_ - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_dynamic_srv.h - * - * @brief Provides APIs related to dynamic service development. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include -#include "tee_service_public.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Defines thread initialization information of the dynamic service. - * - * @since 12 - */ -struct srv_thread_init_info { - void *(*func)(void *arg); - /** The maximum number of parallel threads. */ - uint32_t max_thread; - int32_t shadow; - /** The stack size of the thread. */ - uint32_t stack_size; - /** The timeout period for thread (in seconds).*/ - uint32_t time_out_sec; -}; - -typedef void (*srv_dispatch_fn_t)(tee_service_ipc_msg *msg, - uint32_t sndr, tee_service_ipc_msg_rsp *rsp); - -struct srv_dispatch_t { - uint32_t cmd; - srv_dispatch_fn_t fn; -}; - -/** - * @brief Get UUID by sender. - * - * @param sender [IN] Indicates the sender's task Id. - * @param uuid [OUT] Indicates the universally unique identifier. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if the input parameter is incorrect, - * or the file name is longer than 64 bytes. - * Returns {@code TEE_ERROR_ITEM_NOT_FOUND} if failed to find the corresponding UUID by sender. - * Returns {@code TEE_ERROR_GENERIC} if failed to obtain the UUID. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_srv_get_uuid_by_sender(uint32_t sender, TEE_UUID *uuid); - -/** - * @brief Releasing the object mapping of a specified address area. - * - * @param va_addr [IN] Indicates the address of the memory area to be released. - * @param size [IN] Indicates the size of the released memory area. - * - * @since 12 - * @version 1.0 - */ -void tee_srv_unmap_from_task(uint32_t va_addr, uint32_t size); - -/** - * @brief Create a new mapping in the virtual address space of the calling process. - * - * @param in_task_id [IN] Indicates the task Id. - * @param va_addr [IN] Indicates the address of the memory area to be mapped. - * @param size [IN] Indicates the size of the memory area to be mapped. - * @param virt_addr [OUT] Indicates the new mapping vitural address. - * - * @return Returns 0 if the operation is successful. - * @return Returns -1 if the operation is failed. - * - * @since 12 - * @version 1.0 - */ -int tee_srv_map_from_task(uint32_t in_task_id, uint32_t va_addr, uint32_t size, uint32_t *virt_addr); - -/** - * @brief Dispatch task by task name. - * - * @param task_name [IN] Indicates the task name. - * @param dispatch [IN] Indicates the dispatch information. - * @param n_dispatch [IN] Indicates the dispatch number. - * @param cur_thread [IN] Indicates the current thread information. - * - * @since 12 - * @version 1.0 - */ -void tee_srv_cs_server_loop(const char *task_name, const struct srv_dispatch_t *dispatch, - uint32_t n_dispatch, struct srv_thread_init_info *cur_thread); -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_ext_api.h b/tee/include/tee_ext_api.h deleted file mode 100644 index 37481f6c6..000000000 --- a/tee/include/tee_ext_api.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_EXT_API_H -#define TEE_EXT_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_ext_api.h - * - * @brief Provides extended interfaces. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" -#include "tee_hw_ext_api.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ - -/** - * @brief Defines the value of invalid user ID. - * - * @since 12 - */ -#define INVALID_USERID 0xFFFFFFFU - -/** - * @brief Defines the SMC from user mode. - * - * @since 12 - */ -#define TEE_SMC_FROM_USR 0 - -/** - * @brief Defines the SMC from kernel mode. - * - * @since 12 - */ -#define TEE_SMC_FROM_KERNEL 1 - -/** - * @brief Defines the szie of reserved buffer. - * - * @since 12 - */ -#define RESERVED_BUF_SIZE 32 - -/** - * @brief Defines the caller information. - * - * @since 12 - */ -typedef struct ta_caller_info { - uint32_t session_type; - union { - struct { - TEE_UUID caller_uuid; - uint32_t group_id; - }; - uint8_t ca_info[RESERVED_BUF_SIZE]; - } caller_identity; - uint8_t smc_from_kernel_mode; - uint8_t reserved[RESERVED_BUF_SIZE - 1]; -} caller_info; - -/** - * @brief Get caller info of current session, refer caller_info struct for more details. - * - * @param ca_name Indicates the process name of the caller of the CA. - * @param ca_uid Indicates the UID of the caller. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other information otherwise. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_get_caller_info(caller_info *caller_info_data, uint32_t length); - -/** - * @brief Get user ID of current TA. - * - * @param user_id Indicates the user ID to be returned. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other information otherwise. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_get_caller_userid(uint32_t *user_id); - -/** - * @brief Adds information about a caller that can invoke this TA. - * This API applies to the client applications (CAs) in the binary executable file format. - * - * @param ca_name Indicates the process name of the caller of the CA. - * @param ca_uid Indicates the UID of the caller. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other information otherwise. - * - * @since 12 - * @version 1.0 - */ -TEE_Result AddCaller_CA_exec(const char *ca_name, uint32_t ca_uid); - -/** - * @brief Adds information about a caller that can invoke this TA. - * This API applies to the client applications (CAs) in the native CA and HAP format. - * - * @param cainfo_hash Indicates the hash value of the CA caller information. - * @param length Indicates the length of the hash value. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other information otherwise. - * - * @since 12 - * @version 1.0 - */ -TEE_Result AddCaller_CA(const uint8_t *cainfo_hash, uint32_t length); - -/** - * @brief TA call this API allow others TA open session with itself. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other information otherwise. - * - * @since 12 - * @version 1.0 - */ -TEE_Result AddCaller_TA_all(void); - -/** - * @brief Defines the session caller from CA. - * - * @since 12 - */ -#define SESSION_FROM_CA 0 - -/** - * @brief Defines the session caller from TA. - * - * @since 12 - */ -#define SESSION_FROM_TA 1 - -/** - * @brief Defines the TA task is not found, for example, from TA sub thread. - * - * @since 12 - */ -#define SESSION_FROM_NOT_SUPPORTED 0xFE - -/** - * @brief Defines the TA caller is not found. - * - * @since 12 - */ -#define SESSION_FROM_UNKNOWN 0xFF - -/** - * @brief Obtains the session type. - * - * @return Returns the session type obtained. - * - * @since 12 - * @version 1.0 - */ -uint32_t tee_get_session_type(void); - -#ifdef __cplusplus -#if __cplusplus -} -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ - -#endif diff --git a/tee/include/tee_hw_ext_api.h b/tee/include/tee_hw_ext_api.h deleted file mode 100644 index 3fb350367..000000000 --- a/tee/include/tee_hw_ext_api.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_HW_EXT_API_H -#define TEE_HW_EXT_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_hw_ext_api.h - * - * @brief Provides extended interfaces. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Obtains the unique device ID from the TEE. - * - * @param device_unique_id Indicates the pointer to the buffer for storing the device ID. - * @param length Indicates the pointer to the buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other information otherwise. - * - * @since 12 - */ -TEE_Result tee_ext_get_device_unique_id(uint8_t *device_unique_id, uint32_t *length); - -/** - * @brief Defines the memory information. - * - * @since 12 - */ -struct meminfo_t { - uint64_t buffer; - uint32_t size; -}; - -/** - * @brief Derive key from device rootkey and UUID of the current task for iteration. - * - * @param salt [IN] Indicates the data for salt. - * @param key [OUT] Indicates the pointer where key is saved. - * @param outer_iter_num [IN] Indicates the iteration times in huk service. - * @param inner_iter_num [IN] Indicates the iteration times in platform driver. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_GENERIC} if the processing failed. - * - * @since 12 - */ -TEE_Result tee_ext_derive_key_iter(const struct meminfo_t *salt, struct meminfo_t *key, - uint32_t outer_iter_num, uint32_t inner_iter_num); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/tee_hw_ext_api_legacy.h b/tee/include/tee_hw_ext_api_legacy.h deleted file mode 100644 index c50471ea9..000000000 --- a/tee/include/tee_hw_ext_api_legacy.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_HW_EXT_API_LEGACY_H__ -#define __TEE_HW_EXT_API_LEGACY_H__ - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_hw_ext_api_legacy.h - * - * @brief Provides extended interfaces. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Derive key from device root key. - * - * @param salt [IN] Indicates the data for salt. - * @param size [IN] Indicates the length of salt. - * @param key [OUT] Indicates the pointer where key is saved. - * @param key_size [IN] Indicates the size of the key, which must be integer times of 16. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_GENERIC} if the processing failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_EXT_DeriveTARootKey(const uint8_t *salt, uint32_t size, uint8_t *key, uint32_t key_size); - -/** - * @brief Derive key from device root key by HUK2. - * @attention If the device does not support HUK2, the key is derived by HUK. - * - * @param salt [IN] Indicates the data for salt. - * @param size [IN] Indicates the length of salt. - * @param key [OUT] Indicates the pointer where key is saved. - * @param key_size [IN] Indicates the size of the key, which must be integer times of 16. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_GENERIC} if the processing failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_derive_ta_root_key_by_huk2(const uint8_t *salt, uint32_t size, uint8_t *key, uint32_t key_size); - -/** - * @brief Derive key from device root key by HUK2. - * @attention If the device does not support HUK2, the key is derived by HUK. - * - * @param secret [IN] Indicates the input secret. - * @param secret_len [IN] Indicates the length of the input secret. - * @param key [OUT] Indicates the derived key. - * @param key_len [IN] Indicates the length of the derived key. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_GENERIC} if the processing failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_root_derive_key2_by_huk2(const uint8_t *secret, uint32_t secret_len, uint8_t *key, uint32_t key_len); - -/** - * @brief Derive key from device root key and UUID of the current task by HUK2. - * @attention If the device does not support HUK2, the key is derived by HUK. - * - * @param salt [IN] Indicates the data for salt. - * @param size [IN] Indicates the length of salt. - * @param key [OUT] Indicates the pointer where key is saved. - * @param key_size [IN] Indicates the size of the generated key, fix-size 32 bytes. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_GENERIC} if the processing failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_root_uuid_derive_key_by_huk2(const uint8_t *salt, uint32_t size, uint8_t *key, uint32_t key_size); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_internal_se_api.h b/tee/include/tee_internal_se_api.h deleted file mode 100644 index 9e4ad28e6..000000000 --- a/tee/include/tee_internal_se_api.h +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_INTERNAL_SE_API_H -#define TEE_INTERNAL_SE_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_internal_se_api.h - * - * @brief Provides APIs related to the TEE Secure Element. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct __TEE_SEServiceHandle; -struct __TEE_SEReaderHandle; -struct __TEE_SESessionHandle; -struct __TEE_SEChannelHandle; - -typedef struct __TEE_SEServiceHandle *TEE_SEServiceHandle; -typedef struct __TEE_SEReaderHandle *TEE_SEReaderHandle; -typedef struct __TEE_SESessionHandle *TEE_SESessionHandle; -typedef struct __TEE_SEChannelHandle *TEE_SEChannelHandle; - -#define ATR_LEN_MAX 32U -#define AID_LEN_MIN 5U -#define AID_LEN_MAX 16U - -/** - * @brief Defines the maximum of the logic channel. - * - * @since 12 - */ -#define SE_LOGIC_CHANNEL_MAX 8U - -#define TEE_SC_TYPE_SCP03 0x01 - -#define BYTE_LEN 8 - -/** - * @brief Represents the properties of the SE reader. - * - * @since 12 - */ -typedef struct __TEE_SEReaderProperties { - /** If an SE is present in the reader, the value is true. */ - bool sePresent; - /** If this reader is only accessible via the TEE, the value is true. */ - bool teeOnly; - /** If the response to a SELECT is available in the TEE, the value is true.*/ - bool selectResponseEnable; -} TEE_SEReaderProperties; - -/** - * @brief Defines the SE AID. - * - * @since 12 - */ -typedef struct __TEE_SEAID { - /** The value of the applet's AID. */ - uint8_t *buffer; - /** The lenght of the applet's AID. */ - uint32_t bufferLen; -} TEE_SEAID; - -/** - * @brief Enumerates the types of the key. - * - * @since 12 - */ -typedef enum { - /** A base key acc. to SCP02. */ - TEE_SC_BASE_KEY = 0, - /** A key set (key-MAC, key_ENC) acc. to SCP02, SCP03. */ - TEE_SC_KEY_SET = 1 -} TEE_SC_KeyType; - -typedef struct __TEE_SC_KeySetRef { - /** Key-ENC (Static encryption key). */ - TEE_ObjectHandle scKeyEncHandle; - /** Key-MAC (Static MAC key). */ - TEE_ObjectHandle scKeyMacHandle; -} TEE_SC_KeySetRef; - -/** - * @brief Enumerates the levels of the security. - * - * @since 12 - */ -typedef enum { - /** Nothing will be applied. */ - TEE_SC_NO_SECURE_MESSAGING = 0x00, - /** Command and response APDU not be secured. */ - TEE_SC_AUTHENTICATE = 0x80, - /** Command APDU shall be MAC protected. */ - TEE_SC_C_MAC = 0x01, - /** Response APDU shall be MAC protected. */ - TEE_SC_R_MAC = 0x10, - /** Command and response APDU shall be MAC protected. */ - TEE_SC_CR_MAC = 0x11, - /** Command APDU shall be encrypted and MAC protected. */ - TEE_SC_C_ENC_MAC = 0x03, - /** Response APDU shall be encrypted and MAC protected. */ - TEE_SC_R_ENC_MAC = 0x30, - /** Command and response APDU shall be encrypted and MAC protected. */ - TEE_SC_CR_ENC_MAC = 0x33, - /** Command APDU shall be encrypted, and the command and response APDU shall be MAC protected.*/ - TEE_SC_C_ENC_CR_MAC = 0x13 -} TEE_SC_SecurityLevel; - -#define TEE_AUTHENTICATE TEE_SC_AUTHENTICATE - -/** - * @brief Represents the reference about SC card key. - * - * @since 12 - */ -typedef struct __TEE_SC_CardKeyRef { - /** The key identifier of the SC card key. */ - uint8_t scKeyID; - /** The key version if the SC card key. */ - uint8_t scKeyVersion; -} TEE_SC_CardKeyRef; - -/** - * @brief Represents the reference about the SC device key. - * - * @since 12 - */ -typedef struct __TEE_SC_DeviceKeyRef { - TEE_SC_KeyType scKeyType; - union { - TEE_ObjectHandle scBaseKeyHandle; - TEE_SC_KeySetRef scKeySetRef; - } __TEE_key; -} TEE_SC_DeviceKeyRef; - -/** - * @brief Defines the OID of the SC. - * - * @since 12 - */ -typedef struct __TEE_SC_OID { - /** The value of the OID. */ - uint8_t *buffer; - /** The length of the OID. */ - uint32_t bufferLen; -} TEE_SC_OID; - -/** - * @brief Represents the paramaters about the SC. - * - * @since 12 - */ -typedef struct __TEE_SC_Params { - /** The SC type. */ - uint8_t scType; - /** The SC type defined by OID. */ - TEE_SC_OID scOID; - /** The SC security level. */ - TEE_SC_SecurityLevel scSecurityLevel; - /** Reference to SC card keys. */ - TEE_SC_CardKeyRef scCardKeyRef; - /** Reference to SC device keys. */ - TEE_SC_DeviceKeyRef scDeviceKeyRef; -} TEE_SC_Params; - -/** - * @brief Open the SE service. - * - * @param se_service_handle [IN] Indicates the handle of SE service. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_ACCESS_CONFLICT} if failed to access the SE service due to conflict. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEServiceOpen(TEE_SEServiceHandle *se_service_handle); - -/** - * @brief Close the SE service. - * - * @param se_service_handle [IN] Indicates the handle of SE service. - * - * @since 12 - * @version 1.0 - */ -void TEE_SEServiceClose(TEE_SEServiceHandle se_service_handle); - -/** - * @brief Get the available readers handle of the SE service. - * - * @param se_service_handle [IN] Indicates the handle of SE service. - * @param se_reader_handle_list [OUT] Indicates the available readers handle list. - * @param se_reader_handle_list_len [OUT] Indicates the length of the handle list. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ITEM_NOT_FOUND} if cannot find the input SE service handle. - * Returns {@code TEE_ERROR_SHORT_BUFFER} if the provided buffer is too small to store the readers handle. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEServiceGetReaders(TEE_SEServiceHandle se_service_handle, TEE_SEReaderHandle *se_reader_handle_list, - uint32_t *se_reader_handle_list_len); - -/** - * @brief Get the available readers handle of the SE service. - * - * @param se_reader_handle [IN] Indicates the SE readers handle. - * @param reader_properties [OUT] Indicates the reader's properties. - * - * @since 12 - * @version 1.0 - */ -void TEE_SEReaderGetProperties(TEE_SEReaderHandle se_reader_handle, TEE_SEReaderProperties *reader_properties); - -/** - * @brief Get the SE reader's name. - * - * @param se_reader_handle [IN] Indicates the SE readers handle. - * @param reader_name [OUT] Indicates the SE reader's name. - * @param reader_name_len [OUT] Indicates the length of the reader's name. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ITEM_NOT_FOUND} if cannot find the input SE reader handle. - * Returns {@code TEE_ERROR_BAD_FORMAT} if the input se_reader_handle points to the reader illegally. - * Returns {@code TEE_ERROR_SHORT_BUFFER} if the reader_name_len is too small to store the readers name. - * Returns {@code TEE_ERROR_SECURITY} if the security error is detected. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEReaderGetName(TEE_SEReaderHandle se_reader_handle, char *reader_name, uint32_t *reader_name_len); - -/** - * @brief Open a session between the SE reader to the SE. - * - * @param se_reader_handle Indicates the SE readers handle. - * @param se_session_handle Indicates the session handle. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ITEM_NOT_FOUND} if cannot find the input SE reader handle. - * Returns {@code TEE_ERROR_COMMUNICATION} if communicte failed with the SE. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEReaderOpenSession(TEE_SEReaderHandle se_reader_handle, TEE_SESessionHandle *se_session_handle); - -/** - * @brief Close sessions between the SE reader to the SE. - * - * @param se_reader_handle Indicates the SE readers handle. - * - * @since 12 - * @version 1.0 - */ -void TEE_SEReaderCloseSessions(TEE_SEReaderHandle se_reader_handle); - -/** - * @brief Get the SE ATR. - * - * @param se_session_handle Indicates the session handle. - * @param atr Indicates the SE ATR. - * @param atrLen Indicates the length of ATR. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_SHORT_BUFFER} if the provided buffer is too small to store the ATR. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SESessionGetATR(TEE_SESessionHandle se_session_handle, void *atr, uint32_t *atrLen); - -/** - * @brief Check whether the session is closed. - * - * @param se_session_handle Indicates the session handle. - * - * @return Returns {@code TEE_SUCCESS} if the session is closed or the input handle is invalid. - * Returns {@code TEE_ERROR_COMMUNICATION} if session state is invalid. - * Returns {@code TEE_ERROR_BAD_STATE} if the session is opened. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SESessionIsClosed(TEE_SESessionHandle se_session_handle); - -/** - * @brief Close the SE session. - * - * @param se_session_handle Indicates the session handle. - * - * @since 12 - * @version 1.0 - */ -void TEE_SESessionClose(TEE_SESessionHandle se_session_handle); - -/** - * @brief Close all channels which pointed to by the SE session. - * - * @param se_session_handle Indicates the session handle. - * - * @since 12 - * @version 1.0 - */ -void TEE_SESessionCloseChannels(TEE_SESessionHandle se_session_handle); - -/** - * @brief Open a basic channel which pointed to by the SE session. - * - * @param se_session_handle Indicates the session handle. - * @param se_aid Indicates the SE AID. - * @param se_channel_handle Indicates the SE channel handle. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_STATE} if the session is closed. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ITEM_NOT_FOUND} if cannot find the input SE reader handle. - * Returns other when SE responding to the abnormal status word. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SESessionOpenBasicChannel(TEE_SESessionHandle se_session_handle, TEE_SEAID *se_aid, - TEE_SEChannelHandle *se_channel_handle); - -/** - * @brief Open a logical channel which pointed to by the SE session. - * - * @param se_session_handle Indicates the session handle. - * @param se_aid Indicates the SE AID. - * @param se_channel_handle Indicates the SE channel handle. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_STATE} if the session is closed. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ITEM_NOT_FOUND} if cannot find the input SE reader handle. - * Returns other when SE responding to the abnormal status word. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SESessionOpenLogicalChannel(TEE_SESessionHandle se_session_handle, TEE_SEAID *se_aid, - TEE_SEChannelHandle *se_channel_handle); - -/** - * @brief Close the channel which pointed to by the channel handle. - * - * @param se_channel_handle Indicates the SE channel handle. - * - * @since 12 - * @version 1.0 - */ -void TEE_SEChannelClose(TEE_SEChannelHandle se_channel_handle); - -/** - * @brief Select the next SE service which pointed to by the channel handle. - * - * @param se_channel_handle Indicates the SE channel handle. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is invalid or the mode of SE is wrong. - * Returns other when SE responding to the abnormal status word. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEChannelSelectNext(TEE_SEChannelHandle se_channel_handle); - -/** - * @brief Get the SELECT command response of SE when open the channel handle. - * - * @param se_channel_handle Indicates the SE channel handle. - * @param response Indicates the response of SE. - * @param response_len Indicates the length of the response. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is invalid. - * Returns {@code TEE_ERROR_SHORT_BUFFER} if the provided buffer is too small to store the response. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEChannelGetSelectResponse(TEE_SEChannelHandle se_channel_handle, void *response, - uint32_t *response_len); - -/** - * @brief Transmit the command through the channle. - * - * @param se_channel_handle Indicates the SE channel handle. - * @param command Indicates the transmitted command. - * @param command_len Indicates the length of the command. - * @param response Indicates the response of SE. - * @param response_len Indicates the length of the response. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_COMMUNICATION} if length of command is less than 4. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is invalid. - * Returns {@code TEE_ERROR_BAD_STATE} if the channel is closed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEChannelTransmit(TEE_SEChannelHandle se_channel_handle, void *command, uint32_t command_len, - void *response, uint32_t *response_len); - -/** - * @brief Open a SE secure channel based on the input channel handle. - * Thereafter, when the {@code TEE_SEChannelTransmit} is called, all APDUs(ENC/MAC protected) transmitted based on - * the handle are automatically protected based on the defined secure channel parameter options. - * Currently, only SCP03 is supported. - * - * @param se_channel_handle Indicates the SE channel handle. - * @param sc_params Indicates the parameter reference for the secure channel protocol. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_COMMUNICATION} if communicate failed with the SE. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is invalid or the mode of SE is wrong. - * Returns {@code TEE_ERROR_NOT_SUPPORTED} if the parameter of the sc_params is not supported - * Returns {@code TEE_ERROR_MAC_INVALID} if the verification failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SESecureChannelOpen(TEE_SEChannelHandle se_channel_handle, TEE_SC_Params *sc_params); - -/** - * @brief Close the SE secure channel based on the input channel handle. - * The channel, which pointed to by the input channel handle, is not closed. - * It can be used for insecure communication, but the APDU that calls {@code TEE_SEChannelTransmit} - * transmission is not secure. - * - * @param se_channel_handle Indicates the SE channel handle. - * - * @since 12 - * @version 1.0 - */ -void TEE_SESecureChannelClose(TEE_SEChannelHandle se_channel_handle); - -/** - * @brief Get the channel Id which pointed to by the input channel handle. - * - * @param se_channel_handle Indicates the SE channel handle. - * @param channel_id Indicates the SE channel Id. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is invalid. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SEChannelGetID(TEE_SEChannelHandle se_channel_handle, uint8_t *channel_id); -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/tee_log.h b/tee/include/tee_log.h deleted file mode 100644 index 0489ba0ef..000000000 --- a/tee/include/tee_log.h +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_LOG_H -#define __TEE_LOG_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_log.h - * - * @brief Provides TEE log APIs. - * - * Reference of TEE log APIs and internal definitions. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Defines the ERROR level of the TA log. - * - * @since 12 - */ -#define TA_LOG_LEVEL_ERROR 0 - -/** - * @brief Defines the WARNING level of the TA log. - * - * @since 12 - */ -#define TA_LOG_LEVEL_WARNING 1 - -/** - * @brief Defines the INFO level of the TA log. - * - * @since 12 - */ -#define TA_LOG_LEVEL_INFO 2 - -/** - * @brief Defines the DEBUG level of the TA log. - * - * @since 12 - */ -#define TA_LOG_LEVEL_DEBUG 3 - -/** - * @brief Defines the VERBO level of the TA log. - * - * @since 12 - */ -#define TA_LOG_LEVEL_VERBO 4 - -/** - * @brief Defines the default level of the TA log. - * - * @since 12 - */ -#define TA_LOG_LEVEL_DEFAULT TA_LOG_LEVEL_INFO - -/** - * @brief Defines the default level of the TA log. - * {@code TA_LOG_LEVEL} can be redefined by TA developers - * - * @since 12 - */ -#ifndef TA_LOG_LEVEL -#define TA_LOG_LEVEL TA_LOG_LEVEL_DEFAULT -#endif - -/** - * @brief Defines the tag of the VERBO level TA log. - * - * @since 12 - */ -#define TAG_VERB "[verb]" - -/** - * @brief Defines the tag of the DEBUG level TA log. - * - * @since 12 - */ -#define TAG_DEBUG "[debug]" - -/** - * @brief Defines the tag of the INFO level TA log. - * - * @since 12 - */ -#define TAG_INFO "[info]" - -/** - * @brief Defines the tag of the WARNING level TA log. - * - * @since 12 - */ -#define TAG_WARN "[warn]" - -/** - * @brief Defines the tag of the ERROR level TA log. - * - * @since 12 - */ -#define TAG_ERROR "[error]" - -/** - * @brief Enumerates the levels of the log. - * - * @since 12 - */ -typedef enum { - LOG_LEVEL_ERROR = 0, - LOG_LEVEL_WARN = 1, - LOG_LEVEL_INFO = 2, - LOG_LEVEL_DEBUG = 3, - LOG_LEVEL_VERBO = 4, - LOG_LEVEL_ON = 5, -} LOG_LEVEL; - -/** - * @brief Provides to print UART logs. - * - * @param fmt [IN] The log information. - * - * @since 12 - */ -void uart_cprintf(const char *fmt, ...); - -/** - * @brief Provides to print UART logs. - * - * @param fmt [IN] The log information. - * - * @since 12 - */ -void uart_printf_func(const char *fmt, ...); - -/** - * @brief Provides to print TEE logs. - * - * @param log_level [IN] The level of the log. - * @param fmt [IN] The log information. - * - * @since 12 - */ -void tee_print(LOG_LEVEL log_level, const char *fmt, ...); - -/** - * @brief Provides to print TEE driver logs. - * - * @param log_level [IN] The level of the log. - * @param log_tag [IN] The tag of the log. - * @param fmt [IN] The log information. - * - * @since 12 - */ -void tee_print_driver(LOG_LEVEL log_level, const char *log_tag, const char *fmt, ...); - -extern const char *g_debug_prefix; - -/** - * @brief Defines the API to print TEE log at the VERBO level. - * - * @since 12 - */ -#if (TA_LOG_LEVEL >= TA_LOG_LEVEL_VERBO) -#ifdef DRIVER_LOG_TAG -#define tlogv(fmt, args...) \ - tee_print_driver(LOG_LEVEL_VERBO, DRIVER_LOG_TAG, "%s %d:" fmt "", TAG_VERB, __LINE__, ##args) -#else -#define tlogv(fmt, args...) tee_print(LOG_LEVEL_VERBO, "%s %d:" fmt "", TAG_VERB, __LINE__, ##args) -#endif /* DRIVER_LOG_TAG */ -#else -#define tlogv(fmt, args...) \ - do { \ - } while (0) -#endif /* TA_LOG_LEVEL >= TA_LOG_LEVEL_VERBO */ - -/** - * @brief Defines the API to print TEE log at the DEBUG level. - * - * @since 12 - */ -#if (TA_LOG_LEVEL >= TA_LOG_LEVEL_DEBUG) -#ifdef DRIVER_LOG_TAG -#define tlogd(fmt, args...) \ - tee_print_driver(LOG_LEVEL_DEBUG, DRIVER_LOG_TAG, "%s %d:" fmt "", TAG_DEBUG, __LINE__, ##args) -#else -#define tlogd(fmt, args...) tee_print(LOG_LEVEL_DEBUG, "%s %d:" fmt "", TAG_DEBUG, __LINE__, ##args) -#endif /* DRIVER_LOG_TAG */ -#else -#define tlogd(fmt, args...) \ - do { \ - } while (0) -#endif /* TA_LOG_LEVEL >= TA_LOG_LEVEL_DEBUG */ - -/** - * @brief Defines the API to print TEE log at the INFO level. - * - * @since 12 - */ -#if (TA_LOG_LEVEL >= TA_LOG_LEVEL_INFO) -#ifdef DRIVER_LOG_TAG -#define tlogi(fmt, args...) \ - tee_print_driver(LOG_LEVEL_INFO, DRIVER_LOG_TAG, "%s %d:" fmt "", TAG_INFO, __LINE__, ##args) -#else -#define tlogi(fmt, args...) tee_print(LOG_LEVEL_INFO, "%s %d:" fmt "", TAG_INFO, __LINE__, ##args) -#endif /* DRIVER_LOG_TAG */ -#else -#define tlogi(fmt, args...) \ - do { \ - } while (0) -#endif /* TA_LOG_LEVEL >= TA_LOG_LEVEL_INFO */ - -/** - * @brief Defines the API to print TEE log at the WARNING level. - * - * @since 12 - */ -#if (TA_LOG_LEVEL >= TA_LOG_LEVEL_WARNING) -#ifdef DRIVER_LOG_TAG -#define tlogw(fmt, args...) \ - tee_print_driver(LOG_LEVEL_WARN, DRIVER_LOG_TAG, "%s %d:" fmt "", TAG_WARN, __LINE__, ##args) -#else -#define tlogw(fmt, args...) tee_print(LOG_LEVEL_WARN, "%s %d:" fmt "", TAG_WARN, __LINE__, ##args) -#endif /* DRIVER_LOG_TAG */ -#else -#define tlogw(fmt, args...) \ - do { \ - } while (0) -#endif /* TA_LOG_LEVEL >= TA_LOG_LEVEL_WARNING */ - -/** - * @brief Defines the API to print TEE log at the ERROR level. - * - * @since 12 - */ -#if (TA_LOG_LEVEL >= TA_LOG_LEVEL_ERROR) /* Always meet this condition. */ -#ifndef TLOGE_NO_TIMESTAMP -#ifdef DRIVER_LOG_TAG -#define tloge(fmt, args...) \ - tee_print_driver(LOG_LEVEL_ERROR, DRIVER_LOG_TAG, "%s %d:" fmt " ", TAG_ERROR, __LINE__, ##args) -#else -#define tloge(fmt, args...) tee_print(LOG_LEVEL_ERROR, "%s %d:" fmt " ", TAG_ERROR, __LINE__, ##args) -#endif /* DRIVER_LOG_TAG */ -#else -#define tloge(fmt, args...) printf("[%s] %s %d:" fmt " ", g_debug_prefix, TAG_ERROR, __LINE__, ##args) -#endif /* TLOGE_NO_TIMESTAMP */ -#else -#define tloge(fmt, args...) \ - do { \ - } while (0) -#endif /* TA_LOG_LEVEL >= TA_LOG_LEVEL_ERROR */ - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif /* __TEE_LOG_H */ diff --git a/tee/include/tee_mem_mgmt_api.h b/tee/include/tee_mem_mgmt_api.h deleted file mode 100644 index fa636a384..000000000 --- a/tee/include/tee_mem_mgmt_api.h +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef TEE_MEM_MGMT_API_H -#define TEE_MEM_MGMT_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_mem_mgmt_api.h - * - * @brief Provides APIs for memory management. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" -#include "tee_mem_monitoring_api.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The definitions below are defined by Global Platform or Platform SDK released previously - * for compatibility. - * Do not make any change to the content below. - */ -#ifndef ZERO_SIZE_PTR -#define ZERO_SIZE_PTR ((void *)16) -#define zero_or_null_ptr(x) ((unsigned long)(x) <= (unsigned long)ZERO_SIZE_PTR) -#endif - -enum MALLOC_HINT { - ZERO = 0, - NOT_ZERO = 1, - ALIGN_004 = 0x80000002, - /* Buffer alignment */ - ALIGN_008 = 0x80000003, - ALIGN_016 = 0x80000004, - ALIGN_032 = 0x80000005, - ALIGN_064 = 0x80000006, - ALIGN_128 = 0x80000007, - ALIGN_256 = 0x80000008, - ALIGN_004_ZERO = 0x80000012, - /* The buffer is 8-byte aligned and initialized to zeros. */ - ALIGN_008_ZERO = 0x80000013, - ALIGN_016_ZERO = 0x80000014, - ALIGN_032_ZERO = 0x80000015, - ALIGN_064_ZERO = 0x80000016, - ALIGN_128_ZERO = 0x80000017, - ALIGN_256_ZERO = 0x80000018, -}; - -#define TEE_MALLOC_FILL_ZERO 0x00000000 -#define TEE_MALLOC_NO_FILL 0x00000001 -#define TEE_MALLOC_NO_SHARE 0x00000002 - -#define TEE_MEMORY_ACCESS_READ 0x00000001 -#define TEE_MEMORY_ACCESS_WRITE 0x00000002 -#define TEE_MEMORY_ACCESS_ANY_OWNER 0x00000004 - -#if defined(API_LEVEL) && (API_LEVEL >= API_LEVEL1_2) -/** - * @brief Fills x into the first size bytes of the buffer. - * - * @param buffer Indicates the pointer to the buffer. - * @param x Indicates the value to fill. - * @param size Indicates the number of bytes to fill. - * - * @since 12 - * @version 1.0 - */ -void TEE_MemFill(void *buffer, uint8_t x, size_t size); -#else -/** - * @brief Fills x into the first size bytes of the buffer. - * - * @param buffer Indicates the pointer to the buffer. - * @param x Indicates the value to fill. - * @param size Indicates the number of bytes to fill. - * - * @since 12 - * @version 1.0 - */ -void TEE_MemFill(void *buffer, uint32_t x, size_t size); -#endif - -/** - * @brief Copies bytes. - * - * @param dest Indicates the pointer to the buffer that holds the bytes copied. - * @param src Indicates the pointer to the buffer that holds the bytes to copy. - * @param size Indicates the number of bytes to copy. - * - * @since 12 - * @version 1.0 - */ -void TEE_MemMove(void *dest, const void *src, size_t size); - -/** - * @brief Allocates space of the specified size for an object. - * - * @param size Indicates the size of the memory to be allocated. - * @param hint Indicates a hint to the allocator. The value 0 indicates that the memory block - * returned is filled with "\0". - * - * @return Returns a pointer to the newly allocated space if the operation is successful. - * @return Returns a NULL pointer if the allocation fails. - * - * @since 12 - * @version 1.0 - */ -void *TEE_Malloc(size_t size, uint32_t hint); - - /** - * @brief Releases the memory allocated by TEE_Malloc. - * - * If the buffer is a NULL pointer, TEE_Free does nothing. - * The buffer to be released must have been allocated by TEE_Malloc or TEE_Realloc and cannot be - * released repeatedly. Otherwise, unexpected result may be caused. - * - * @param buffer Indicates the pointer to the memory to release. - * - * @since 12 - * @version 1.0 - */ -void TEE_Free(void *buffer); - -/** - * @brief Reallocates memory. - * - * If new_size is greater than the old size, the content of the original memory does not change - * and the space in excess of the old size contains unspecified content. - * If the new size of the memory object requires movement of the object, the space for the previous - * instantiation of the object is deallocated. - * If the space cannot be allocated, the original object remains allocated and this function - * returns a NULL pointer. - * If the buffer is NULL, this function is equivalent to TEE_Malloc. - * - * @param buffer Indicates the pointer to the memory to reallocate. - * @param new_size Indicates the new size required. - * - * @return Returns a pointer to the allocated memory if the operation is successful. - * @return Returns a NULL pointer if the operation fails. - * - * @since 12 - * @version 1.0 - */ -void *TEE_Realloc(void *buffer, size_t new_size); - -/** - * @brief Compares memory content from the beginning. - * - * @param buffer1 Indicates the pointer to the first buffer. - * @param buffer2 Indicates the pointer to the second buffer. - * @param size Indicates the number of the bytes to compare. - * - * @return Returns –1 if buffer1 < buffer2. - * @return Returns 0 if buffer1 == buffer2. - * @return Returns 1 if buffer1 > buffer2. - * - * @since 12 - * @version 1.0 - */ -int32_t TEE_MemCompare(const void *buffer1, const void *buffer2, size_t size); - -/** - * @brief Checks whether this TA has the requested permissions to access a buffer. - * - * @param accessFlags Indicates the access permissions to check. - * @param buffer Indicates the pointer to the target buffer. - * @param size Indicates the size of the buffer to check. - * - * @return Returns TEE_SUCCESS if the TA has the requested permissions. - * @return Returns TEE_ERROR_ACCESS_DENIED otherwise. - */ -TEE_Result TEE_CheckMemoryAccessRights(uint32_t accessFlags, const void *buffer, size_t size); - -/** - * @brief Sets the TA instance data pointer. - * - * @param instanceData Indicates the pointer to the global TA instance data. - * - * @since 12 - * @version 1.0 - */ -void TEE_SetInstanceData(void *instanceData); - -/** - * @brief Obtains the instance data pointer set by the TA using TEE_SetInstanceData. - * - * @return Returns the pointer to the instance data set by TEE_SetInstanceData - * @return or NULL if no instance data pointer has been set. - * - * @since 12 - * @version 1.0 - */ -void *TEE_GetInstanceData(void); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/tee_mem_monitoring_api.h b/tee/include/tee_mem_monitoring_api.h deleted file mode 100644 index a95a78efe..000000000 --- a/tee/include/tee_mem_monitoring_api.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_MEM_MONITORING_API_H -#define TEE_MEM_MONITORING_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_mem_monitoring_api.h - * - * @brief Provides APIs for memory monitoring. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Obtains the heap usage of this trusted application (TA). - * - * @param show Indicates whether to print the result in the log file. - * - * @return Returns the heap usage in percentage. - * - * @since 12 - * @version 1.0 - */ -uint32_t get_heap_usage(bool show); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_object_api.h b/tee/include/tee_object_api.h deleted file mode 100644 index 723f576c9..000000000 --- a/tee/include/tee_object_api.h +++ /dev/null @@ -1,384 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_OBJECT_API_H -#define __TEE_OBJECT_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_object_api.h - * - * @brief Provides trusted storage APIs. - * - * You can use these APIs to implement trusted storage features. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Defines HANDLE_NULL, which is used to denote the absence of a handle. - * - * @since 12 - */ -#define TEE_HANDLE_NULL 0x00000000 - -/** - * @brief Enumerates the usages of the key of the TEE_ObjectHandle. - * - * @since 12 - */ -enum Usage_Constants { - /** The object's key is extractable. */ - TEE_USAGE_EXTRACTABLE = 0x00000001, - /** Used for encryption. */ - TEE_USAGE_ENCRYPT = 0x00000002, - /** Used for decryption. */ - TEE_USAGE_DECRYPT = 0x00000004, - /** Used for hash calculation. */ - TEE_USAGE_MAC = 0x00000008, - /** Used for creating a signature. */ - TEE_USAGE_SIGN = 0x00000010, - /** Used for signature verification. */ - TEE_USAGE_VERIFY = 0x00000020, - /** Used for key derivation. */ - TEE_USAGE_DERIVE = 0x00000040, - /** Used for object initialization, with all permissions assigned by default. */ - TEE_USAGE_DEFAULT = 0xFFFFFFFF, -}; - -/** - * @brief Defines information about the object pointed to by the flag of the TEE_ObjectHandle, - * for example, whether the object is a persistent object or is initialized. - * - * @since 12 - */ -enum Handle_Flag_Constants { - /** The object is a persistent object. */ - TEE_HANDLE_FLAG_PERSISTENT = 0x00010000, - /** The object is initialized. */ - TEE_HANDLE_FLAG_INITIALIZED = 0x00020000, - /** Reserved */ - TEE_HANDLE_FLAG_KEY_SET = 0x00040000, - /** Reserved */ - TEE_HANDLE_FLAG_EXPECT_TWO_KEYS = 0x00080000, -}; - -/** - * @brief Defines a value attribute identifier flag. - * - * @since 12 - */ -#define TEE_ATTR_FLAG_VALUE 0x20000000 - -/** - * @brief Defines a public attribute identifier flag. - * - * @since 12 - */ -#define TEE_ATTR_FLAG_PUBLIC 0x10000000 - -/** - * @brief Check whether the attribute is a buffer. - * - * @since 12 - */ -#define TEE_ATTR_IS_BUFFER(attribute_id) ((((attribute_id) << 2) >> 31) == 0) - -/** - * @brief Check whether the attribute is a value. - * - * @since 12 - */ -#define TEE_ATTR_IS_VALUE(attribute_id) ((((attribute_id) << 2) >> 31) == 1) - -/** - * @brief Check whether the attribute is protected. - * - * @since 12 - */ -#define TEE_ATTR_IS_PROTECTED(attribute_id) ((((attribute_id) << 3) >> 31) == 0) - -/** - * @brief Check whether the attribute is public. - * - * @since 12 - */ -#define TEE_ATTR_IS_PUBLIC(attribute_id) ((((attribute_id) << 3) >> 31) == 1) - -/** - * @brief Obtains a buffer attribute from the TEE_Attribute struct of the object pointed - * to by TEE_ObjectHandle. - * - * The members in the TEE_Attribute struct must be ref. If the TEE_Attribute is private, - * the Usage_Constants of the object must include TEE_USAGE_EXTRACTABLE. - * - * @param object Indicates the handle of the object. - * @param attributeID Indicates the ID of the attribute to obtain, for example, TEE_ObjectAttribute. - * The attribute ID can also be customized. - * @param buffer Indicates the pointer to the buffer that stores the attribute obtained. - * @param size Indicates the pointer to the length of the content stored. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the TEE_Attribute cannot be found in the object - * or the object is not initialized. - * @return Returns TEE_ERROR_SHORT_BUFFER if the buffer is too small to store the content obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetObjectBufferAttribute(TEE_ObjectHandle object, uint32_t attributeID, void *buffer, size_t *size); - -/** - * @brief Obtains a value attribute from the TEE_Attribute of an object. - * - * The members of the TEE_Attribute struct must be values. If the TEE_Attribute is private, - * the Usage_Constants of the object must include TEE_USAGE_EXTRACTABLE. - * - * @param object Indicates the handle of the object. - * @param attributeID Indicates the ID of the attribute to obtain, for example, TEE_ObjectAttribute. - * The attribute ID can also be customized. - * @param a Indicates the pointer to the placeholder filled with the attribute field a. - * @param b Indicates the pointer to the placeholder filled with the attribute field b. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the TEE_Attribute cannot be found in the object - * or the object is not initialized. - * @return Returns TEE_ERROR_ACCESS_DENIED if TEE_Attribute is private - * but the object Usage_Constants does not contain the TEE_USAGE_EXTRACTABLE flag. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetObjectValueAttribute(TEE_ObjectHandle object, uint32_t attributeID, uint32_t *a, uint32_t *b); - -/** - * @brief Closes a TEE_ObjectHandle object. - * - * The object can be persistent or transient. - * - * @param object Indicates the TEE_ObjectHandle object to close. - * - * @since 12 - * @version 1.0 - */ -void TEE_CloseObject(TEE_ObjectHandle object); - -/** - * @brief Allocates an uninitialized object to store keys. - * - * objectType and maxObjectSize must be specified. - * - * @param objectType Indicates the type of the object to create. The value is TEE_ObjectType. - * @param maxObjectSize Indicates the maximum number of bytes of the object. - * @param object Indicates the pointer to the handle of the newly created object. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_OUT_OF_MEMORY if the memory is insufficient. - * @return Returns TEE_ERROR_NOT_SUPPORTED if the object type is not supported. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AllocateTransientObject(uint32_t objectType, uint32_t maxObjectSize, TEE_ObjectHandle *object); - -/** - * @brief Releases a transient object that is previously allocated with TEE_AllocateTransientObject. - * - * After the function is called, the handle becomes invalid and all allocated resources are released. - * TEE_FreeTransientObject and TEE_AllocateTransientObject are used in pairs. - * - * @param object Indicates the TEE_ObjectHandle to release. - * - * @since 12 - * @version 1.0 - */ -void TEE_FreeTransientObject(TEE_ObjectHandle object); - -/** - * @brief Resets a transient object to its initial state after allocation. - * - * You can use an allocated object, which has not been initialized or used to store a key, to store a key. - * - * @param object Indicates the TEE_ObjectHandle to reset. - * - * @since 12 - * @version 1.0 - */ -void TEE_ResetTransientObject(TEE_ObjectHandle object); - -/** - * @brief Populates an uninitialized object with object attributes passed by the TA in the attrs parameter. - * - * The object must be uninitialized. \n - * The attrs parameter is passed by a TA. - * - * @param object Indicates the handle on a created but uninitialized object. - * @param attrs Indicates the pointer to an array of object attributes, which can be one or more TEE_Attributes. - * @param attrCount Indicates the number of members in the attribute array. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_BAD_PARAMETERS if an incorrect or inconsistent attribute value is detected. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_PopulateTransientObject(TEE_ObjectHandle object, TEE_Attribute *attrs, uint32_t attrCount); - -/** - * @brief Initializes the TEE_Attribute of the buffer type. - * - * The members in the TEE_Attribute struct must be ref. - * - * @param attr Indicates the pointer to the TEE_Attribute initialized. - * @param attributeID Indicates the ID assigned to the TEE_Attribute. - * @param buffer Indicates the pointer to the buffer that stores the content to be allocated. - * @param length Indicates the length of the assigned value, in bytes. - * - * @since 12 - * @version 1.0 - */ -void TEE_InitRefAttribute(TEE_Attribute *attr, uint32_t attributeID, void *buffer, size_t length); - -/** - * @brief Initializes a TEE_Attribute. - * - * @param attr Indicates the pointer to the TEE_Attribute initialized. - * @param attributeID Indicates the ID assigned to the TEE_Attribute. - * @param a Indicates the value to be assigned to the member a in the TEE_Attribute. - * @param b Indicates the value to be assigned to the member b in the TEE_Attribute. - * - * @since 12 - * @version 1.0 - */ -void TEE_InitValueAttribute(TEE_Attribute *attr, uint32_t attributeID, uint32_t a, uint32_t b); - -/** - * @brief Generates a random key or a key pair and populates a transient key object with the generated key. - * - * @param object Indicates a transient object used to hold the generated key. - * @param keySize Indicates the number of bytes of the key. - * @param params Indicates the pointer to the parameters for key generation. - * @param paramCount Indicates the number of parameters required for key generation. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_BAD_PARAMETERS if the type of the key generated does not match - * the key that can be held in the transient object. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GenerateKey(TEE_ObjectHandle object, uint32_t keySize, TEE_Attribute *params, uint32_t paramCount); - -/** - * @brief Get the information of the object data part, the total length of the data part and the current - * position of the data stream. - * - * @param object Indicates the handle of the object. - * @param pos Indicates the data stream position. - * @param len Indicates the data stream length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns others if the operation is failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_InfoObjectData(TEE_ObjectHandle object, uint32_t *pos, uint32_t *len); - -/** - * @brief Obtains TEE_ObjectInfo. - * - * This function obtains TEE_ObjectInfo and copies the obtained information to the pre-allocated space - * pointed to by objectInfo. - * - * @param object Indicates the handle of the object. - * @param objectInfo Indicates the pointer to the TEE_ObjectInfo obtained. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_CORRUPT_OBJECT if the object is corrupted and the object handle will be closed. - * @return Returns TEE_ERROR_STORAGE_NOT_AVAILABLE if the object is stored - * in a storage area that is inaccessible currently. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetObjectInfo1(TEE_ObjectHandle object, TEE_ObjectInfo *objectInfo); - -/** - * @brief Assigns the TEE_Attribute of an initialized object to an uninitialized object. - * - * This function populates an uninitialized object with TEE_Attribute. - * That is, it copies TEE_Attribute of srcobject to destobject. - * The TEE_Attribute types and IDs of the two objects must match. - * - * @param destObject Indicates the uninitialized object. - * @param srcObject Indicates the initialized object. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_CORRUPT_OBJECT if the object is corrupted and the object handle will be closed. - * @return Returns TEE_ERROR_STORAGE_NOT_AVAILABLE if the object is stored - * in a storage area that is inaccessible currently. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_CopyObjectAttributes1(TEE_ObjectHandle destObject, TEE_ObjectHandle srcObject); - -/** - * @brief Restricts the objectUse bit of an object. - * - * This bit determines the usage of the key in the object. The value range is Usage_Constant. - * The bit in the objectUse parameter can be set as follows: \n - * If it is set to 1, the corresponding usage flag in the object is left unchanged. \n - * If it is set to 0, the corresponding usage flag in the object is cleared. \n - * The newly created object contains all Usage_Constant, and the usage flag can be cleared only. - * - * @param object Indicates the TEE_ObjectHandle of the target object. - * @param objectUsage Indicates the new object usage. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_CORRUPT_OBJECT if the object is corrupted and the object handle will be closed. - * @return Returns TEE_ERROR_STORAGE_NOT_AVAILABLE if the object is stored - * in a storage area that is inaccessible currently. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RestrictObjectUsage1(TEE_ObjectHandle object, uint32_t objectUsage); -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_property_api.h b/tee/include/tee_property_api.h deleted file mode 100644 index 029e28eb7..000000000 --- a/tee/include/tee_property_api.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_PROPERTY_API_H -#define TEE_PROPERTY_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_property_api.h - * - * @brief Reference of TEE object api definitions. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif -/** - * The definitions below are defined by Global Platform or Platform SDK released previously - * for compatibility. - * Do not make any change to the content below. - */ - -/** - * @brief Enumerates the types of the property set. - * - * @since 12 - */ -typedef enum { - TEE_PROPSET_UNKNOW = 0, - TEE_PROPSET_TEE_IMPLEMENTATION = 0xFFFFFFFD, - TEE_PROPSET_CURRENT_CLIENT = 0xFFFFFFFE, - TEE_PROPSET_CURRENT_TA = 0xFFFFFFFF, -} Pseudo_PropSetHandle; - -typedef uint32_t TEE_PropSetHandle; - -/** - * @brief Obtains a property from a property set and converts its value into a printable string. - * - * - * @param propsetOrEnumerator Indicates one of the TEE_PROPSET_XXX pseudo-handles or a handle on a property enumerator. - * @param name Indicates the pointer to the zero-terminated string containing the name of the property to obtain. - * @param valueBuffer Indicates the pointer to the buffer for holding the property value obtained. - * @param valueBufferLen Indicates the pointer to the buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the target property cannot be obtained. - * @return Returns TEE_ERROR_SHORT_BUFFER if the value buffer is too small to hold the property value obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyAsString(TEE_PropSetHandle propsetOrEnumerator, const char *name, char *valueBuffer, - size_t *valueBufferLen); - -/** - * @brief Obtains a property from a property set and converts its value into a Boolean value. - * - * @param propsetOrEnumerator Indicates one of the TEE_PROPSET_XXX pseudo-handles or a handle on a property enumerator. - * @param name Indicates the pointer to the zero-terminated string containing the name of the property to obtain. - * @param value Indicates the pointer to the variable that holds the property value obtained. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the target property cannot be obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyAsBool(TEE_PropSetHandle propsetOrEnumerator, const char *name, bool *value); - -/** - * @brief Obtains a property from a property set and converts its value into a 32-bit unsigned integer. - * - * @param propsetOrEnumerator Indicates one of the TEE_PROPSET_XXX pseudo-handles or a handle on a property enumerator. - * @param name Indicates the pointer to the zero-terminated string containing the name of the property to obtain. - * @param value Indicates the pointer to the variable that holds the property value obtained. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the target property cannot be obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyAsU32(TEE_PropSetHandle propsetOrEnumerator, const char *name, uint32_t *value); - -#if defined(API_LEVEL) && (API_LEVEL >= API_LEVEL1_2) -/** - * @brief Obtains a property from a property set and converts its value into a 64-bit unsigned integer. - * - * @param propsetOrEnumerator Indicates one of the TEE_PROPSET_XXX pseudo-handles or a handle on a property enumerator. - * @param name Indicates the pointer to the zero-terminated string containing the name of the property to obtain. - * @param value Indicates the pointer to the variable that holds the property value obtained. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the target property cannot be obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyAsU64(TEE_PropSetHandle propsetOrEnumerator, const char *name, uint64_t *value); -#endif // API_LEVEL - -/** - * @brief Obtains a property from a property set and converts its value into a binary block. - * - * @param propsetOrEnumerator Indicates one of the TEE_PROPSET_XXX pseudo-handles or a handle on a property enumerator. - * @param name Indicates the pointer to the zero-terminated string containing the name of the property to obtain. - * @param valueBuffer Indicates the pointer to the buffer for holding the property value obtained. - * @param valueBufferLen Indicates the pointer to the buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the target property cannot be obtained. - * @return TEE_ERROR_SHORT_BUFFER the value buffer is not large enough to hold the whole property value - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyAsBinaryBlock(TEE_PropSetHandle propsetOrEnumerator, const char *name, void *valueBuffer, - size_t *valueBufferLen); - -/** - * @brief Obtains a property from a property set and converts its value to the TEE_UUID struct. - * - * @param propsetOrEnumerator Indicates one of the TEE_PROPSET_XXX pseudo-handles or a handle on a property enumerator. - * @param name Indicates the pointer to the zero-terminated string containing the name of the property to obtain. - * @param value Indicates the pointer to the variable that holds the property value obtained. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the target property cannot be obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyAsUUID(TEE_PropSetHandle propsetOrEnumerator, const char *name, TEE_UUID *value); - -/** - * @brief Obtains a property from a property set and converts its value to the TEE_Identity struct. - * - * @param propsetOrEnumerator Indicates one of the TEE_PROPSET_XXX pseudo-handles or a handle on a property enumerator. - * @param name Indicates the pointer to the zero-terminated string containing the name of the property to obtain. - * @param value Indicates the pointer to the variable that holds the property value obtained. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the target property cannot be obtained. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyAsIdentity(TEE_PropSetHandle propsetOrEnumerator, const char *name, TEE_Identity *value); - -/** - * @brief Allocates a property enumerator object. - * - * @param enumerator Indicates the pointer to the property enumerator filled with an opaque handle. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_OUT_OF_MEMORY if there is no enough resources to allocate the property enumerator. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AllocatePropertyEnumerator(TEE_PropSetHandle *enumerator); - -/** - * @brief Releases a property enumerator object. - * - * @param enumerator Indicates the handle on the property enumerator to release. - * - * @return void - * - * @since 12 - * @version 1.0 - */ -void TEE_FreePropertyEnumerator(TEE_PropSetHandle enumerator); - -/** - * @brief Starts to enumerate the properties in an enumerator. - * - * @param enumerator Indicates the handle on the enumerator. - * @param propSet Indicates the pseudo-handle on the property set to enumerate. - * - * @return void - * - * @since 12 - * @version 1.0 - */ -void TEE_StartPropertyEnumerator(TEE_PropSetHandle enumerator, TEE_PropSetHandle propSet); - -/** - * @brief Resets a property enumerator immediately after allocation. - * - * @param enumerator Indicates the handle on the enumerator to reset. - * - * @return void - * - * @since 12 - * @version 1.0 - */ -void TEE_ResetPropertyEnumerator(TEE_PropSetHandle enumerator); - -/** - * @brief Obtains the name of this property in an enumerator. - * - * @param enumerator Indicates the handle on the enumerator. - * @param nameBuffer Indicates the pointer to the buffer that stores the property name obtained. - * @param nameBufferLen Indicates the pointer to the buffer length. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the property is not found because the enumerator has not started - * or has reached the end of the property set. - * @return Returns TEE_ERROR_SHORT_BUFFER if the buffer is too small to hold the property name. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetPropertyName(TEE_PropSetHandle enumerator, void *nameBuffer, size_t *nameBufferLen); - -/** - * @brief Obtains the next property in an enumerator. - * - * @param enumerator Indicates the handle on the enumerator. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_ITEM_NOT_FOUND if the property is not found because the enumerator - * has not started or has reached the end of the property set. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetNextProperty(TEE_PropSetHandle enumerator); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/tee_rtc_time_api.h b/tee/include/tee_rtc_time_api.h deleted file mode 100644 index 37b7047c5..000000000 --- a/tee/include/tee_rtc_time_api.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_RTC_TIME_API_H -#define __TEE_RTC_TIME_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_rtc_time_api.h - * - * @brief Provides APIs about rtc timer. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Create a secure timer. - * - * @param time_seconds Indicates the security duration. - * @param timer_property Indicates the property of the timer, where only need to specify the timer type. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other values if the operation fails. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_create_timer(uint32_t time_seconds, TEE_timer_property *timer_property); - -/** - * @brief Destory a secure timer. - * - * @param timer_property Indicates the property of the timer, where only need to specify the timer type. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other values if the operation fails. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_destory_timer(TEE_timer_property *timer_property); - -/** - * @brief Obtain the set timing duration. - * - * @param timer_property Indicates the property of the timer, where only need to specify the timer type. - * @param time_seconds Indicates the timing duration. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other values if the operation fails. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_get_timer_expire(TEE_timer_property *timer_property, uint32_t *time_seconds); - -/** - * @brief Obtain the remain timing duration. - * - * @param timer_property Indicates the property of the timer, where only need to specify the timer type. - * @param time_seconds Indicates the remain timing duration. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns other values if the operation fails. - * - * @since 12 - * @version 1.0 - */ -TEE_Result tee_ext_get_timer_remain(TEE_timer_property *timer_property, uint32_t *time_seconds); - -/** - * @brief Obtain the current timing of the RTC clock. - * @attention The obtained time is in seconds and cannot be converted to universal time. - * - * @return The RTC clock count(in seconds). - * - * @since 12 - * @version 1.0 - */ -unsigned int tee_get_secure_rtc_time(void); -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/tee_service_public.h b/tee/include/tee_service_public.h deleted file mode 100644 index 3a3ea2e0d..000000000 --- a/tee/include/tee_service_public.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _TEE_SERVICE_PUBLIC_H_ -#define _TEE_SERVICE_PUBLIC_H_ - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_service_public.h - * - * @brief Provides the TEE service public function for developers. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void (*func_ptr)(void); - -/** - * @brief Defines the size of the message queue for the TEE service - * - * @since 12 - */ -#define TEE_SERVICE_MSG_QUEUE_SIZE 100 - -/** - * @brief Defines the arguments of a message. - * - * @since 12 - */ -typedef struct { - uint64_t arg0; - uint64_t arg1; - uint64_t arg2; - uint64_t arg3; - uint64_t arg4; - uint64_t arg5; - uint64_t arg6; - uint64_t arg7; -} args_t; - -/** - * @brief Defines the register information of TA. - * - * @since 12 - */ -struct reg_ta_info { - uint32_t taskid; - TEE_UUID uuid; - uint32_t userid; - /** Just for ssa, other tasks shall ignore it. */ - bool ssa_enum_enable; -}; - -/** - * @brief Defines the IPC message of TEE service. - * - * @since 12 - */ -typedef union { - args_t args_data; - struct reg_ta_info reg_ta; -} tee_service_ipc_msg; - -/** - * @brief Defines the IPC request message of TEE service. - * - * @since 12 - */ -struct tee_service_ipc_msg_req { - uint32_t cmd; - tee_service_ipc_msg msg; -}; - -/** - * @brief Defines the IPC response message of TEE service. - * - * @since 12 - */ -typedef struct { - TEE_Result ret; - tee_service_ipc_msg msg; -} tee_service_ipc_msg_rsp; - -/** - * @brief Defines the message of the TEE service. - * - * @since 12 - */ -typedef struct { - uint32_t msg_id; - uint32_t sender; - tee_service_ipc_msg msg; -} tee_service_msg_t; - -/** - * @brief Defines the message queue for the TEE service. - * - * @since 12 - */ -typedef struct { - uint32_t in; - uint32_t out; - tee_service_msg_t msg[TEE_SERVICE_MSG_QUEUE_SIZE]; -} tee_service_msg_queue_t; - -/** - * @brief Provides to send IPC synchronization messages to a specified service - * and receive responses from the service. - * - * @param task_name Indicates the task name of recipient. - * @param snd_cmd Indicates the command ID of the send message. - * @param snd_msg Indicates the send message. - * @param ack_cmd Indicates the ID of the ack cmd to be received. - * @param rsp_msg Indicates the service response message. - * - * @since 12 - * @version 1.0 - */ -void tee_common_ipc_proc_cmd(const char *task_name, - uint32_t snd_cmd, const tee_service_ipc_msg *snd_msg, - uint32_t ack_cmd, tee_service_ipc_msg_rsp *rsp_msg); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/tee_sharemem_ops.h b/tee/include/tee_sharemem_ops.h deleted file mode 100644 index 479964ff3..000000000 --- a/tee/include/tee_sharemem_ops.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEE_SHAREMEM_OPS_H -#define TEE_SHAREMEM_OPS_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_sharemem_ops.h - * - * @brief Provides APIs for developers to apply for shared memory. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Alloc shared memory in TEE. - * - * @param uuid Indicates the UUID of TA. - * @param size Indicates the size of the requested shared memory. - * - * @return Returns a pointer to the newly allocated space if the operation is successful. - * Returns a NULL pointer if the allocation fails. - * - * @since 12 - * @version 1.0 - */ -void *tee_alloc_sharemem_aux(const struct tee_uuid *uuid, uint32_t size); - -/** - * @brief Alloc continuous shared memory in TEE. - * - * @param uuid Indicates the UUID of TA. - * @param size Indicates the size of the requested shared memory. - * - * @return Returns a pointer to the newly allocated space if the operation is successful. - * Returns a NULL pointer if the allocation fails. - * - * @since 12 - * @version 1.0 - */ -void *tee_alloc_coherent_sharemem_aux(const struct tee_uuid *uuid, uint32_t size); - -/** - * @brief Free the shared memory in TEE. - * - * @param addr Indicates the shared memory address that will be freed. - * @param size Indicates the size of the shared memory. - * - * @return Returns 0 if the operation is successful. - * Returns others if the operation is failed. - * - * @since 12 - * @version 1.0 - */ -uint32_t tee_free_sharemem(void *addr, uint32_t size); - -/** - * @brief Copy shared memory from source task. - * - * @param src_task Indicates the pid of the source task. - * @param src Indicates the address of the source buffer. - * @param src_size Indicates the size of the source buffer. - * @param dst Indicates the address of the destination buffer. - * @param dst_size Indicates the size of the destination buffer. - * - * @return Returns 0 if the operation is successful. - * Returns -1 if the operation is failed. - * - * @since 12 - * @version 1.0 - */ -int32_t copy_from_sharemem(uint32_t src_task, uint64_t src, uint32_t src_size, uintptr_t dst, uint32_t dst_size); - -/** - * @brief Copy shared memory to destination task. - * - * @param src Indicates the address of the source buffer. - * @param src_size Indicates the size of the source buffer. - * @param dst_task Indicates the pid of the destination task. - * @param dst Indicates the address of the destination buffer. - * @param dst_size Indicates the size of the destination buffer. - * - * @return Returns 0 if the operation is successful. - * Returns -1 if the operation is failed. - * - * @since 12 - * @version 1.0 - */ -int32_t copy_to_sharemem(uintptr_t src, uint32_t src_size, uint32_t dst_task, uint64_t dst, uint32_t dst_size); -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/include/tee_time_api.h b/tee/include/tee_time_api.h deleted file mode 100644 index 58ea6d51f..000000000 --- a/tee/include/tee_time_api.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_TIME_API_H -#define __TEE_TIME_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_time_api.h - * - * @brief Provides APIs for managing the Trusted Execution Environment (TEE) time. - * - * You can use these APIs to implement time-related features in a TEE. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Obtains the current TEE system time. - * - * @param time Indicates the pointer to the current system time obtained. - * - * @since 12 - * @version 1.0 - */ -void TEE_GetSystemTime(TEE_Time *time); - -/** - * @brief Waits for the specified period of time, in milliseconds. - * - * @param timeout Indicates the period of time to wait, in milliseconds. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_CANCEL if the wait is canceled. - * @return Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_Wait(uint32_t timeout); - -/** - * @brief Obtains the persistent time of this trusted application (TA). - * - * @param time Indicates the pointer to the persistent time of the TA. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_TIME_NOT_SET if the persistent time has not been set. - * @return Returns TEE_ERROR_TIME_NEEDS_RESET if the persistent time is corrupted and - * the application is not longer trusted. - * @return Returns TEE_ERROR_OVERFLOW if the number of seconds in the TA persistent time - * exceeds the range of uint32_t. - * @return Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetTAPersistentTime(TEE_Time *time); - -/** - * @brief Sets the persistent time for this TA. - * - * @param time Indicates the pointer to the persistent time of the TA. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * @return Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * @return Returns TEE_ERROR_STORAGE_NO_SPACE if the storage space is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SetTAPersistentTime(TEE_Time *time); - -/** - * @brief Obtains the current Rich Execution Environment (REE) system time. - * - * @param time Indicates the pointer to the REE system time obtained. - * - * @since 12 - * @version 1.0 - */ -void TEE_GetREETime(TEE_Time *time); - -/** - * @brief Obtains the string format of the current Rich Execution Environment (REE) system time. - * - * @param tim_str Indicates the REE system time string. - * @param time_str_len Indicates the length of the string. - * - * @since 12 - * @version 1.0 - */ -void TEE_GetREETimeStr(char *tim_str, uint32_t time_str_len); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_trusted_storage_api.h b/tee/include/tee_trusted_storage_api.h deleted file mode 100644 index 2638db1d4..000000000 --- a/tee/include/tee_trusted_storage_api.h +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __TEE_TRUSTED_STORAGE_API_H -#define __TEE_TRUSTED_STORAGE_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_trusted_storage_api.h - * - * @brief Provides trusted storage APIs. - * - * You can use these APIs to implement trusted storage features. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include "tee_defines.h" -#include "tee_object_api.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Defines the start position in the data stream associated with an object. - * It is used in the TEE_SeekObjectData function. - * - * @since 12 - */ -enum __TEE_Whence { - /* Set the start position to the beginning of the data stream. */ - TEE_DATA_SEEK_SET = 0, - /* Set the start position to the current data stream position. */ - TEE_DATA_SEEK_CUR, - /* Set the start position to the end of the data stream. */ - TEE_DATA_SEEK_END -}; - -struct __TEE_ObjectEnumHandle; - -/** - * @brief Defines the pointer to TEE_ObjectEnumHandle. - * - * @see __TEE_ObjectEnumHandle - * - * @since 12 - */ -typedef struct __TEE_ObjectEnumHandle *TEE_ObjectEnumHandle; - -typedef uint32_t TEE_Whence; - -/** - * @brief Defines the storage ID, which identifies the storage space of the application. - * - * @since 12 - */ -enum Object_Storage_Constants { - /* Separate private storage space for each application. */ - TEE_OBJECT_STORAGE_PRIVATE = 0x00000001, - /* Separate personal storage space for application. */ - TEE_OBJECT_STORAGE_PERSO = 0x00000002, - /* Space for secure flash storage. */ - TEE_OBJECT_SEC_FLASH = 0x80000000, - /* Credential encrypted storage space. */ - TEE_OBJECT_STORAGE_CE = 0x80000002, -}; - -/** - * @brief Defines the system resource constraints, such as the maximum value for the data stream position indicator. - * - * @since 12 - */ -enum Miscellaneous_Constants { - /* Maximum length that the position indicator of the data stream can take. */ - TEE_DATA_MAX_POSITION = 0xFFFFFFFF, - /* Maximum length of the object ID, which can extend to 128 bytes. */ - TEE_OBJECT_ID_MAX_LEN = 64, -}; - -/** - * @brief Defines the maximum number of bytes that can be held in a data stream. - * - * @since 12 - */ -enum TEE_DATA_Size { - TEE_DATA_OBJECT_MAX_SIZE = 0xFFFFFFFF -}; - -/** - * @brief Defines the handleFlags of a TEE_ObjectHandle. - * The handleFlags determines the access permissions to the data stream associated with the object. - * - * @since 12 - */ -enum Data_Flag_Constants { - /** The data stream can be read. */ - TEE_DATA_FLAG_ACCESS_READ = 0x00000001, - /** The data stream can be written or truncated. */ - TEE_DATA_FLAG_ACCESS_WRITE = 0x00000002, - /** The data stream can be deleted or renamed. */ - TEE_DATA_FLAG_ACCESS_WRITE_META = 0x00000004, - /** Multiple TEE_ObjectHandles can be opened for concurrent read. */ - TEE_DATA_FLAG_SHARE_READ = 0x00000010, - /** Multiple TEE_ObjectHandles can be opened for concurrent write. */ - TEE_DATA_FLAG_SHARE_WRITE = 0x00000020, - /** Reserved. */ - TEE_DATA_FLAG_CREATE = 0x00000200, - /** - * Protect the existing file with the same name. Throw an error if the file with the same name exists; - * create a data file otherwise. - */ - TEE_DATA_FLAG_EXCLUSIVE = 0x00000400, - /** - * Protect the existing file with the same name. Throw an error if the file with the same name exists; - * create a data file otherwise. - */ - TEE_DATA_FLAG_OVERWRITE = 0x00000400, - /** Use AES256 if bit 28 is 1; use AES128 if bit 28 is 0. */ - TEE_DATA_FLAG_AES256 = 0x10000000, - /** If bit 29 is set to 1, open the earlier version preferentially. */ - TEE_DATA_FLAG_OPEN_AESC = 0x20000000, -}; - -/** - * @brief Creates a persistent object. - * - * This function creates a persistent object with initialized TEE_Attribute and data stream. - * You can use the returned handle to access the TEE_Attribute and data stream of the object. - * - * @param storageID Indicates the storage to use. The value is specified by Object_Storage_Constants. - * @param ojbectID Indicates the pointer to the object identifier, that is, the name of the object to create. - * @param objectIDLen Indicates the length of the object identifier, in bytes. It cannot exceed 128 bytes. - * @param flags Indicates the flags of the object created. The value can be - * one or more of Data_Flag_Constants or Handle_Flag_Constants. - * @param attributes Indicates the TEE_ObjectHandle of a transient object from which to take - * TEE_Attribute. It can be TEE_HANDLE_NULL if the persistent object contains no attribute. - * @param initialData Indicates the pointer to the initial data used to initialize the data stream data. - * @param initialDataLen Indicates the length of the initial data, in bytes. - * @param object Indicates the pointer to the TEE_ObjectHandle returned - * after the function is successfully executed. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_ITEM_NOT_FOUND if the storage specified by storageID does not exist. - * Returns TEE_ERROR_ACCESS_CONFLICT if an access conflict occurs. - * Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * Returns TEE_ERROR_STORAGE_NO_SPACE if there is no enough space to create the object. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_CreatePersistentObject(uint32_t storageID, const void *ojbectID, size_t objectIDLen, uint32_t flags, - TEE_ObjectHandle attributes, const void *initialData, size_t initialDataLen, - TEE_ObjectHandle *object); - -/** - * @brief Opens an existing persistent object. - * - * The handle returned can be used to access the TEE_Attribute and data stream of the object. - * - * @param storageID Indicates the storage to use. The value is specified by Object_Storage_Constants. - * @param ojbectID Indicates the pointer to the object identifier, that is, the name of the object to open. - * @param objectIDLen Indicates the length of the object identifier, in bytes. It cannot exceed 128 bytes. - * @param flags Indicates the flags of the object opened. - * The value can be one or more of Data_Flag_Constants or Handle_Flag_Constants. - * @param object Indicates the pointer to the TEE_ObjectHandle returned - * after the function is successfully executed. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_ITEM_NOT_FOUND if the storage specified by storageID does not exist - * or the object identifier cannot be found in the storage. - * Returns TEE_ERROR_ACCESS_CONFLICT if an access conflict occurs. - * Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_OpenPersistentObject(uint32_t storageID, const void *ojbectID, size_t objectIDLen, uint32_t flags, - TEE_ObjectHandle *object); - -/** - * @brief Reads data from the data stream associated with an object into the buffer. - * - * The TEE_ObjectHandle of the object must have been opened with the TEE_DATA_FLAG_ACCESS_READ permission. - * - * @param ojbect Indicates the TEE_ObjectHandle of the object to read. - * @param buffer Indicates the pointer to the buffer used to store the data read. - * @param size Indicates the number of bytes to read. - * @param count Indicates the pointer to the variable that contains the number of bytes read. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_ReadObjectData(TEE_ObjectHandle ojbect, void *buffer, size_t size, uint32_t *count); - -/** - * @brief Writes bytes from the buffer to the data stream associated with an object. - * - * The TEE_ObjectHandle must have been opened with the TEE_DATA_FLAG_ACCESS_WRITE permission. - * - * @param ojbect Indicates the TEE_ObjectHandle of the object. - * @param buffer Indicates the pointer to the buffer that stores the data to be written. - * @param size Indicates the number of bytes to be written. It cannot exceed 4096 bytes. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * Returns TEE_ERROR_STORAGE_NO_SPACE if the storage space is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_WriteObjectData(TEE_ObjectHandle ojbect, const void *buffer, size_t size); - -/** - * @brief Changes the size of a data stream. - * - * If the size is less than the current size of the data stream, all bytes beyond size are deleted. If the size - * is greater than the current size of the data stream, add 0s at the end of the stream to extend the stream. - * The object handle must be opened with the TEE_DATA_FLAG_ACCESS_WRITE permission. - * - * @param object Indicates the TEE_ObjectHandle of the object. - * @param size Indicates the new size of the data stream. It cannot exceed 4096 bytes. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_STORAGE_NO_SPACE if the storage space is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TruncateObjectData(TEE_ObjectHandle object, size_t size); - -/** - * @brief Sets the position of the data stream to which TEE_ObjectHandle points. - * - * The data position indicator is determined by the start position and an offset together. - * The whence parameter determines the start position. Its value is set in TEE_Whence as follows: - * TEE_DATA_SEEK_SET = 0: The start position is the beginning of the data stream. - * TEE_DATA_SEEK_CUR: The start position is the current position of the data stream. - * TEE_DATA_SEEK_END: The start position is the end of the data stream. - * If the parameter offset is a positive number, the data position is moved forward. - * If offset is a negative number, the data position is moved backward. - * - * @param object Indicates the TEE_ObjectHandle of the object. - * @param offset Indicates the number of bytes to move the data position. It cannot exceed 4096 bytes. - * @param whence Indicates the start position in the data stream to calculate the new position. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OVERFLOW if the position indicator resulting from this operation - * is greater than TEE_DATA_MAX_POSIT. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SeekObjectData(TEE_ObjectHandle object, int32_t offset, TEE_Whence whence); - -/** - * @brief Synchronizes the opened TEE_ObjectHandle and the corresponding security attribute file to the disk. - * - * @param object Indicates the TEE_ObjectHandle of the object. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_SyncPersistentObject(TEE_ObjectHandle object); - -/** - * @brief Changes the object identifier. - * - * The TEE_ObjectHandle must have been opened with the TEE_DATA_FLAG_ACCESS_WRITE_META permission. - * - * @param object Indicates the handle of the target object. - * @param newObjectID Indicates the pointer to the new object identifier. - * @param newObjectIDLen Indicates the length of the new object identifier. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_RenamePersistentObject(TEE_ObjectHandle object, void *newObjectID, size_t newObjectIDLen); - -/** - * @brief Allocates a handle on an uninitialized object enumerator. - * - * @param obj_enumerator Indicates the pointer to the handle of the newly created object enumerator. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_OUT_OF_MEMORY if the memory is not sufficient to complete the operation. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_AllocatePersistentObjectEnumerator(TEE_ObjectEnumHandle *obj_enumerator); - -/** - * @brief Releases all resources associated with an object enumerator handle. - * - * After this function is called, the object handle is no longer valid and all resources associated with - * the object enumerator handle will be reclaimed. - * TEE_FreePersistentObjectEnumerator and TEE_AllocatePersistentObjectEnumeratorare used in pairs. - * - * @param obj_enumerator Indicates the TEE_ObjectEnumHandle to release. - * - * @since 12 - * @version 1.0 - */ -void TEE_FreePersistentObjectEnumerator(TEE_ObjectEnumHandle obj_enumerator); - -/** - * @brief Resets an object enumerator handle to its initial state after allocation. - * - * @param obj_enumerator Indicates the TEE_ObjectEnumHandle of the object enumerator to reset. - * - * @since 12 - * @version 1.0 - */ -void TEE_ResetPersistentObjectEnumerator(TEE_ObjectEnumHandle obj_enumerator); - -/** - * @brief Starts the enumeration of all the objects in the given trusted storage. - * - * The object information can be obtained by using TEE_GetNextPersistentObject. - * - * @param obj_enumerator Indicates the TEE_ObjectEnumHandle of the object enumerator. - * @param storage_id Indicates the storage, in which the objects are enumerated. - * The value is specified by Object_Storage_Constants. - * Currently, only TEE_STORAGE_PRIVATE is supported. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ITEM_NOT_FOUND if storageID is not TEE_STORAGE_PRIVATE - * or there is no object in the specified storage. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_StartPersistentObjectEnumerator(TEE_ObjectEnumHandle obj_enumerator, uint32_t storage_id); - -/** - * @brief Obtains the next object in the object enumerator. - * - * Information such as TEE_ObjectInfo, objectID, and objectIDLen will be obtained. - * - * @param obj_enumerator Indicates the TEE_ObjectEnumHandle of the object enumerator. - * @param object_info Indicates the pointer to the obtainedTEE_ObjectInfo. - * @param object_id Indicates the pointer to the buffer used to store the obtained objectID. - * @param object_id_len Indicates the pointer to the objectIDLen. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ITEM_NOT_FOUND if the object enumerator has no element - * or the enumerator has not been initialized. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_GetNextPersistentObject(TEE_ObjectEnumHandle obj_enumerator, - TEE_ObjectInfo *object_info, void *object_id, size_t *object_id_len); - -/** - * @brief Closes a TEE_ObjectHandle and deletes the object. - * - * The object must be a persistent object, and the object handle must have been opened with - * the TEE_DATA_FLAG_ACCESS_WRITE_META permission. - * - * @param object Indicates the object handle to close. - * - * @return Returns TEE_SUCCESS if the operation is successful. - * Returns TEE_ERROR_STORAGE_NOT_AVAILABLE if the object is stored - * in a storage area that is inaccessible currently. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_CloseAndDeletePersistentObject1(TEE_ObjectHandle object); - -#ifdef __cplusplus -} -#endif -/** @} */ -#endif diff --git a/tee/include/tee_tui_gp_api.h b/tee/include/tee_tui_gp_api.h deleted file mode 100644 index b50011f69..000000000 --- a/tee/include/tee_tui_gp_api.h +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TASK_TUI_GP_API_H -#define TASK_TUI_GP_API_H - -/** - * @addtogroup TeeTrusted - * @{ - * - * @brief TEE(Trusted Excution Environment) API. - * Provides security capability APIs such as trusted storage, encryption and decryption, - * and trusted time for trusted application development. - * - * @since 12 - */ - -/** - * @file tee_tui_gp_api.h - * - * @brief Provides APIs for operating big integers. - * - * @library NA - * @kit TEEKit - * @syscap SystemCapability.Tee.TeeClient - * @since 12 - * @version 1.0 - */ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define TEE_TUI_NUMBER_BUTTON_TYPES 0x00000006 -#define TEE_STORAGE_PRIVATE 0x00000001 -#define DEFAULT_MAX_ENTRY_FIELDS 3 - -#define TUI_EXIT 8 - -/** - * @brief Enumerates the modes supported when displaying characters within an input entry field. - * - * @since 12 - */ -typedef enum { - /** Never visible, displayed as '*'. */ - TEE_TUI_HIDDEN_MODE = 0, - /** Always visible. */ - TEE_TUI_CLEAR_MODE, - /** Visible then hidden. */ - TEE_TUI_TEMPORARY_CLEAR_MODE -} TEE_TUIEntryFieldMode; - -/** - * @brief Enumerates the input types supported of the TUI entry field. - * - * @since 12 - */ -typedef enum { - /** When the field accepts only digits as inputs. */ - TEE_TUI_NUMERICAL = 0, - /** When the field accepts characters and digits as inputs. */ - TEE_TUI_ALPHANUMERICAL, -} TEE_TUIEntryFieldType; - -/** - * @brief Enumerates the TUI screen orientation. - * @attention Currently {@code TEE_TUI_LANDSCAPE} is not supported. - * - * @since 12 - */ -typedef enum { - /** Displayed as a portrait, i.e. vertically. */ - TEE_TUI_PORTRAIT = 0, - /** Displayed as a landscape, i.e. horizontally. */ - TEE_TUI_LANDSCAPE, -} TEE_TUIScreenOrientation; - -/** - * @brief Enumerates the types of the button. - * - * @since 12 - */ -typedef enum { - /** Used to delete the previous input digit. */ - TEE_TUI_CORRECTION = 0, - /** Exits the interface. */ - TEE_TUI_OK, - /** Cancels the operation and exits the interface. */ - TEE_TUI_CANCEL, - /** Used to trigger PIN verifcation and exit the interface.*/ - TEE_TUI_VALIDATE, - /** Exit the current interface and ask the TA to display the previous interface. */ - TEE_TUI_PREVIOUS, - /** Exit the current interface and ask the TA to display the next interface. */ - TEE_TUI_NEXT, -} TEE_TUIButtonType; - -/** - * @brief Enumerates source of the uesd image. - * - * @since 12 - */ -typedef enum { - /** No picture provided in the input. */ - TEE_TUI_NO_SOURCE = 0, - /** The picture provided as a memory pointer. */ - TEE_TUI_REF_SOURCE, - /** The picture provided by an object in the secure storage. */ - TEE_TUI_OBJECT_SOURCE, - /** The picture provided as a file. */ - TEE_TUI_FILE_SOURCE = 0x8001 -} TEE_TUIImageSource; - -/** - * @brief Represents the image in PNG format. - * - * @since 12 - */ -typedef struct { - TEE_TUIImageSource source; - struct { - void *image; - size_t imageLength; - } ref; - struct { - uint32_t storageID; - void *objectID; - size_t objectIDLen; - } object; - /** Represents the number of pixels of the width of the image. */ - uint32_t width; - /** Represents the number of pixels of the height of the image. */ - uint32_t height; -} TEE_TUIImage; - -/** - * @brief Enumerates the GP color index. - * - * @since 12 - */ -enum gp_color_idx { - /** Red color index. */ - RED_IDX = 0, - /** Green color index. */ - GREEN_IDX = 1, - /** Blue color index. */ - BLUE_IDX = 2, - /** RGB color index. */ - RGB_COLOR_IDX = 3, -}; - -/** - * @brief Represents the label for TA branding/message, generally on the top of screen. - * - * @since 12 - */ -typedef struct { - /** It's the string to put in the label area, which can be NULL. */ - char *text; - /** X-coordinate of the upper left corner of the text information. */ - uint32_t textXOffset; - /** Y-coordinate of the upper left corner of the text information. */ - uint32_t textYOffset; - /** RGB color used for displaying the text information. */ - uint8_t textColor[RGB_COLOR_IDX]; - /** The image is placed in the label area. */ - TEE_TUIImage image; - /** X-coordinate of the upper left corner of the image to be displayed. */ - uint32_t imageXOffset; - /** Y-coordinate of the upper left corner of the image to be displayed. */ - uint32_t imageYOffset; -} TEE_TUIScreenLabel; - -/** - * @brief Represents the content displayed on a button. - * - * @since 12 - */ -typedef struct { - /** It's the string to associate with the button, which can be NULL. */ - char *text; - /** The image to associate with the button. */ - TEE_TUIImage image; -} TEE_TUIButton; - -/** - * @brief Represents the configuration about the TUI screen. - * - * @since 12 - */ -typedef struct { - /** The requested screen orientation. */ - TEE_TUIScreenOrientation screenOrientation; - /** The specifies label of the screen.*/ - TEE_TUIScreenLabel label; - /** Customizes the buttons compared to the default. */ - TEE_TUIButton *buttons[TEE_TUI_NUMBER_BUTTON_TYPES]; - /** Specifes which buttons to be displayed. */ - bool requestedButtons[TEE_TUI_NUMBER_BUTTON_TYPES]; -} TEE_TUIScreenConfiguration; - -/** - * @brief Represents the information about a TUI screen button. - * @attention The {@code buttonTextCustom} and {@code buttonImageCustom} cannot be set to true at the same time. - * - * @since 12 - */ -typedef struct { - /** Defaut label value of the button text. If the value is NULL means the parameter is unavailable. */ - const char *buttonText; - /** The pixel width of the button. - * If the text or image on the button cannot be customized, the value is 0. - */ - uint32_t buttonWidth; - /** The pixel height of the button. - * If the text or image on the button cannot be customized, the value is 0. - */ - uint32_t buttonHeight; - /** If the text on the button cannot be customized, the value is true. */ - bool buttonTextCustom; - /** If the image on the button cannot be customized, the value is true. */ - bool buttonImageCustom; -} TEE_TUIScreenButtonInfo; - -/** - * @brief Represents the information displayed on the TUI. - * - * @since 12 - */ -typedef struct { - /** Available grayscale. */ - uint32_t grayscaleBitsDepth; - /** Available red depth level. */ - uint32_t redBitsDepth; - /** Available green depth level. */ - uint32_t greenBitsDepth; - /** Available blue depth level. */ - uint32_t blueBitsDepth; - /** Indicates the number of pixels per inch in the width direction. */ - uint32_t widthInch; - /** Indicates the number of pixels per inch in the height direction. */ - uint32_t heightInch; - /** Indicates the maximum number of entries that can be displayed on the TUI. */ - uint32_t maxEntryFields; - /** Indicates the pixel width of the input region label. */ - uint32_t entryFieldLabelWidth; - /** Indicates the pixel height of the input region label. */ - uint32_t entryFieldLabelHeight; - /** Indicates the maximum number of characters that can be entered in the entry field. */ - uint32_t maxEntryFieldLength; - /** RGB value of the default label canvas. */ - uint8_t labelColor[RGB_COLOR_IDX]; - /** Indicates the pixel width of the label canvas. */ - uint32_t labelWidth; - /** Indicates the pixel height of the label canvas. */ - uint32_t labelHeight; - /** Indicates the information of the buttons on the interface. */ - TEE_TUIScreenButtonInfo buttonInfo[TEE_TUI_NUMBER_BUTTON_TYPES]; -} TEE_TUIScreenInfo; - -/** - * @brief Represents the information in an entry field that requires user input. - * - * @since 12 - */ -typedef struct { - /** Indicates the label of the entry field. */ - char *label; - /** Indicates the mode used to display characters. */ - TEE_TUIEntryFieldMode mode; - /** Indicates the type of the characters can be entered in the entry field. */ - TEE_TUIEntryFieldType type; - /** The minimum number of characters to be entered. */ - uint32_t minExpectedLength; - /** The maximum number of characters to be entered. */ - uint32_t maxExpectedLength; - /** Contains the content entered by user. */ - char *buffer; - /** Indicates the length of the buffer. */ - size_t bufferLength; -} TEE_TUIEntryField; - -/** - * @brief Initializing the TUI resources. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * Returns {@code TEE_ERROR_NOT_SUPPORTED} if the device is not support TUI. - * Returns {@code TEE_ERROR_BUSY} if the TUI resources cannot be reserved. - * Returns {@code TEE_ERROR_OUT_OF_MEMORY} if the system ran out of the resources. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUIInitSession(void); - - -/** - * @brief Releases TUI resources previously acquired. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_STATE} if the current TA is not within a TUI session initially - * started by a successful call to {@code TEE_TUIInitSession}. - * Returns {@code TEE_ERROR_BUSY} if the TUI resources currently are in use. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUICloseSession(void); - -/** - * @brief Allows a TA to check whether a given text can be rendered by the current implementation and - * retrieves information about the size and width that is needed to render it. - * - * @param text Indicates the string to be checked. - * @param width Indicates the width in pixels needed to render the text. - * @param height Indicates the height in pixels needed to render the text. - * @param last_index Indicates the last character that has been checked - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_NOT_SUPPORTED} if at least one of the characters present - * in the text string cannot be rendered. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUICheckTextFormat(const char *text, uint32_t *width, uint32_t *height, uint32_t *last_index); - -/** - * @brief Retrieves information about the screen depending on its orientation and - * the number of required entry fields. - * - * @param screenOrientation Defines for which orientation screen information is requested. - * @param nbEntryFields Indicates the number of the requested entry fields. - * @param screenInfo Indicates the information on the requested screen for a given orientation. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_NOT_SUPPORTED} if the number of entry fields is not supported. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUIGetScreenInfo(TEE_TUIScreenOrientation screenOrientation, - uint32_t nbEntryFields, - TEE_TUIScreenInfo *screenInfo); -/** - * @brief Display a TUI screen. - * - * @param screenConfiguration Indicates the configuration of the labels and optional buttons on the display interface. - * @param closeTUISession If the value is true, the TUI session will automatically closed when exiting the function. - * @param entryFields Indicates the information of entry field. - * @param entryFieldCount Indicates the count of the entry fields. - * @param selectedButton Indicates which button has been selected by the user to exit the TUI screen. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_OUT_OF_MEMORY} if the system ran out of the resources. - * Returns {@code TEE_ERROR_ITEM_NOT_FOUND} if at least one image provided by the TA refers to a storage - * denoted by a storageID which dose not exist or if the corresponding object identifier cannot be found in the storage. - * Returns {@code TEE_ERROR_ACCESS_CONFLICT} if at least one image provided by the TA refers to a data - * object in the trusted storage and an access right conflict was detected while opening the object. - * Returns {@code TEE_ERROR_BAD_FORMAT} if at least one input image is not compliant with PNG format. - * Returns {@code TEE_ERROR_BAD_STATE} if the current TA is not within a TUI session - * initially started by a successful call to {@code TEE_TUIInitSession}. - * Returns {@code TEE_ERROR_BUSY} if the TUI resources are currently in use, i.e. a TUI screen is displayed. - * Returns {@code TEE_ERROR_CANCEL} if the operation has been cancelled while a TUI screen is currently - * displayed. - * Returns {@code TEE_ERROR_EXTERNAL_CANCEL} if the operation has been cancelled by an external event which - * occurred in the REE while a TUI screen is currently displayed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUIDisplayScreen(TEE_TUIScreenConfiguration *screenConfiguration, - bool closeTUISession, - TEE_TUIEntryField *entryFields, - uint32_t entryFieldCount, - TEE_TUIButtonType *selectedButton); - -/** - * @brief Fringerprint identification port. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_NOT_SUPPORTED} if the device is not support TUI. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUINotify_fp(void); - -/** - * @brief Set the Chinese character encoding. The system supports UTF-8 by default. - * - * @param type Indicates the encoding type. The value 1 indicates GBK. Other values are not supported. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_NOT_SUPPORTED} if the device is not support this function. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUISetInfo(int32_t type); - -/** - * @brief Send message to TUI. - * - * @param type Indicates the messages send to the TUI. Only support {@code TUI_EXIT}. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_BAD_PARAMETERS} if input parameter is incorrect. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUISendEvent(int32_t type); - -/** - * @brief Setting the TUI background image. - * - * @param label Configure the background image information in the label variable. - * The image must be a PNG image in array format. - * @param len Indicates the label size. - * - * @return Returns {@code TEE_SUCCESS} if the operation is successful. - * Returns {@code TEE_ERROR_GENERIC} if input parameter is incorrect. - * Returns {@code TEE_ERROR_ACCESS_DENIED} if the permission verification failed. - * - * @since 12 - * @version 1.0 - */ -TEE_Result TEE_TUISetLabel(TEE_TUIScreenLabel *label, uint32_t len); -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/tee/libteec.ndk.json b/tee/libteec.ndk.json deleted file mode 100644 index 2083549f8..000000000 --- a/tee/libteec.ndk.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - { "name": "TEEC_InitializeContext" }, - { "name": "TEEC_FinalizeContext" }, - { "name": "TEEC_OpenSession" }, - { "name": "TEEC_CloseSession" }, - { "name": "TEEC_InvokeCommand" }, - { "name": "TEEC_RegisterSharedMemory" }, - { "name": "TEEC_AllocateSharedMemory" }, - { "name": "TEEC_ReleaseSharedMemory" }, - { "name": "TEEC_RequestCancellation" } -] \ No newline at end of file -- Gitee From a80c2935c4d46534992ab14d808c30f3512bcb17 Mon Sep 17 00:00:00 2001 From: liuyifei Date: Tue, 19 Nov 2024 13:55:44 +0000 Subject: [PATCH 156/630] =?UTF-8?q?=20hilog=20API=20Lint=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyifei --- hiviewdfx/hilog/include/hilog/log.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hiviewdfx/hilog/include/hilog/log.h b/hiviewdfx/hilog/include/hilog/log.h index 829eee92e..5fa41928a 100644 --- a/hiviewdfx/hilog/include/hilog/log.h +++ b/hiviewdfx/hilog/include/hilog/log.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef HIVIEWDFX_HILOG_H -#define HIVIEWDFX_HILOG_H /** * @addtogroup HiLog * @{ @@ -57,8 +55,14 @@ * Output result:\n * 05-06 15:01:06.870 1051 1051 W 0201/MY_TAG: Failed to visit , reason:503.\n * + * @library libhilog.so + * @syscap SystemCapability.HiviewDFX.HiLog * @since 8 */ + +#ifndef HIVIEWDFX_HILOG_H +#define HIVIEWDFX_HILOG_H + #include #include -- Gitee From 3e39a8adc94bdd7655928834f989755534d78943 Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Tue, 19 Nov 2024 22:04:08 +0800 Subject: [PATCH 157/630] Add new FontCollection Global Instance interface Signed-off-by: liumingxiang --- .../native_drawing/drawing_font_collection.h | 10 ++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_font_collection.h b/graphic/graphic_2d/native_drawing/drawing_font_collection.h index 5f7277d72..140065374 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font_collection.h +++ b/graphic/graphic_2d/native_drawing/drawing_font_collection.h @@ -105,6 +105,16 @@ OH_Drawing_FontCollection* OH_Drawing_CreateSharedFontCollection(void); * @version 1.0 */ void OH_Drawing_ClearFontCaches(OH_Drawing_FontCollection*); + +/** + * @brief Get the OH_Drawing_FontCollection global instance. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @return Return the pointer to the OH_Drawing_FontCollection global instance. + * @since 14 + * @version 1.0 + */ +OH_Drawing_FontCollection* OH_Drawing_GetFontCollectionGlobalInstance(void); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 353ce3f53..a0ac4408f 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1721,5 +1721,9 @@ { "first_introduced": "14", "name":"OH_Drawing_GetRunGlyphCount" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_GetFontCollectionGlobalInstance" } ] \ No newline at end of file -- Gitee From 8ac67cc1f70c796345b230830176578ca5b31d63 Mon Sep 17 00:00:00 2001 From: wangyulie Date: Tue, 19 Nov 2024 20:08:03 +0800 Subject: [PATCH 158/630] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=80=A7=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyulie --- resourceschedule/ffrt/c/condition_variable.h | 3 ++- resourceschedule/ffrt/c/loop.h | 5 +++-- resourceschedule/ffrt/c/mutex.h | 4 ++-- resourceschedule/ffrt/c/queue.h | 7 ++++--- resourceschedule/ffrt/c/sleep.h | 3 ++- resourceschedule/ffrt/c/task.h | 3 ++- resourceschedule/ffrt/c/timer.h | 5 +++-- resourceschedule/ffrt/c/type_def.h | 10 +++++++++- 8 files changed, 27 insertions(+), 13 deletions(-) diff --git a/resourceschedule/ffrt/c/condition_variable.h b/resourceschedule/ffrt/c/condition_variable.h index 0e80e02c2..0c0534246 100644 --- a/resourceschedule/ffrt/c/condition_variable.h +++ b/resourceschedule/ffrt/c/condition_variable.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares the condition variable interfaces in C. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -117,3 +117,4 @@ FFRT_C_API int ffrt_cond_timedwait(ffrt_cond_t* cond, ffrt_mutex_t* mutex, const */ FFRT_C_API int ffrt_cond_destroy(ffrt_cond_t* cond); #endif +/** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/loop.h b/resourceschedule/ffrt/c/loop.h index 95d6a8bef..0b330a18f 100644 --- a/resourceschedule/ffrt/c/loop.h +++ b/resourceschedule/ffrt/c/loop.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares the loop interfaces in C. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 12 * @version 1.0 @@ -133,4 +133,5 @@ FFRT_C_API ffrt_timer_t ffrt_loop_timer_start( */ FFRT_C_API int ffrt_loop_timer_stop(ffrt_loop_t loop, ffrt_timer_t handle); -#endif \ No newline at end of file +#endif +/** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/mutex.h b/resourceschedule/ffrt/c/mutex.h index 1c397cdd3..c8f28ac0f 100644 --- a/resourceschedule/ffrt/c/mutex.h +++ b/resourceschedule/ffrt/c/mutex.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares the mutex interfaces in C. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -42,7 +42,6 @@ /** * @brief Initializes mutex attr. * - * @param mutex Indicates a pointer to the mutex. * @param attr Indicates a pointer to the mutex attribute. * @return {@link ffrt_success} 0 - success * {@link ffrt_error_inval} 22 - if attr is null. @@ -142,3 +141,4 @@ FFRT_C_API int ffrt_mutex_trylock(ffrt_mutex_t* mutex); */ FFRT_C_API int ffrt_mutex_destroy(ffrt_mutex_t* mutex); #endif +/** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/queue.h b/resourceschedule/ffrt/c/queue.h index 9b6deb655..fb077e38e 100644 --- a/resourceschedule/ffrt/c/queue.h +++ b/resourceschedule/ffrt/c/queue.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares the queue interfaces in C. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -72,7 +72,7 @@ FFRT_C_API void ffrt_queue_attr_destroy(ffrt_queue_attr_t* attr); * @brief Sets the QoS for a queue attribute. * * @param attr Indicates a pointer to the queue attribute. - * @param attr Indicates the QoS. + * @param qos Indicates the QoS. * @since 10 * @version 1.0 */ @@ -233,4 +233,5 @@ FFRT_C_API ffrt_queue_t ffrt_get_main_queue(); */ FFRT_C_API ffrt_queue_t ffrt_get_current_queue(); -#endif // FFRT_API_C_QUEUE_H \ No newline at end of file +#endif // FFRT_API_C_QUEUE_H +/** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/sleep.h b/resourceschedule/ffrt/c/sleep.h index ee4a7196f..777cb553d 100644 --- a/resourceschedule/ffrt/c/sleep.h +++ b/resourceschedule/ffrt/c/sleep.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares the sleep and yield interfaces in C. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -59,3 +59,4 @@ FFRT_C_API int ffrt_usleep(uint64_t usec); */ FFRT_C_API void ffrt_yield(void); #endif +/** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/task.h b/resourceschedule/ffrt/c/task.h index b789fdc74..786661d82 100644 --- a/resourceschedule/ffrt/c/task.h +++ b/resourceschedule/ffrt/c/task.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares the task interfaces in C. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -276,3 +276,4 @@ FFRT_C_API void ffrt_wait_deps(const ffrt_deps_t* deps); FFRT_C_API void ffrt_wait(void); #endif +/** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/timer.h b/resourceschedule/ffrt/c/timer.h index 99ce5254a..a12610aae 100644 --- a/resourceschedule/ffrt/c/timer.h +++ b/resourceschedule/ffrt/c/timer.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares the timer interfaces in C. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 12 * @version 1.0 @@ -66,4 +66,5 @@ FFRT_C_API ffrt_timer_t ffrt_timer_start(ffrt_qos_t qos, uint64_t timeout, void* * @version 1.0 */ FFRT_C_API int ffrt_timer_stop(ffrt_qos_t qos, ffrt_timer_t handle); -#endif \ No newline at end of file +#endif +/** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/type_def.h b/resourceschedule/ffrt/c/type_def.h index 8d9f7c1ab..2a4343bff 100644 --- a/resourceschedule/ffrt/c/type_def.h +++ b/resourceschedule/ffrt/c/type_def.h @@ -30,7 +30,7 @@ * @kit FunctionFlowRuntimeKit * * @brief Declares common types. - * + * @library libffrt.z.so * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -65,6 +65,7 @@ typedef enum { /** * @brief Enumerates the task QoS types. * + * @since 10 */ typedef enum { /** Inheritance. */ @@ -85,6 +86,7 @@ typedef void(*ffrt_function_t)(void*); /** * @brief Defines a task executor. * + * @since 10 */ typedef struct { /** Function used to execute a task. */ @@ -98,6 +100,7 @@ typedef struct { /** * @brief Defines the storage size of multiple types of structs. * + * @since 10 */ typedef enum { /** Task attribute storage size. */ @@ -115,6 +118,7 @@ typedef enum { /** * @brief Enumerates the task types. * + * @since 10 */ typedef enum { /** General task. */ @@ -126,6 +130,7 @@ typedef enum { /** * @brief dependency type. * + * @since 10 */ typedef enum { /** Data dependency type. */ @@ -137,6 +142,7 @@ typedef enum { /** * @brief dependency data structure. * + * @since 10 */ typedef struct { /** Dependency type. */ @@ -148,6 +154,7 @@ typedef struct { /** * @brief Defines the dependency struct. * + * @since 10 */ typedef struct { /** Number of dependencies. */ @@ -244,3 +251,4 @@ using qos = int; } #endif #endif +/** @} */ \ No newline at end of file -- Gitee From d76364a053265185777fc30d87a76d71a71d1451 Mon Sep 17 00:00:00 2001 From: liufei Date: Wed, 20 Nov 2024 11:56:04 +0800 Subject: [PATCH 159/630] add api lint Signed-off-by: liufei --- .../native_drawing/drawing_text_typography.h | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 10f1c9071..275f0af37 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -1247,15 +1247,15 @@ float OH_Drawing_GetBottomFromTextBox(OH_Drawing_TextBox* textbox, int index); int OH_Drawing_GetTextDirectionFromTextBox(OH_Drawing_TextBox* textbox, int index); /** - * @brief Gets size of textbox. + * @brief Gets size of textBox. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextBox Indicates the pointer to an OH_Drawing_TextBox object. - * @return Returns size of textbox. + * @param textBox Indicates the pointer to an OH_Drawing_TextBox object. + * @return Returns size of textBox. * @since 11 * @version 1.0 */ -size_t OH_Drawing_GetSizeOfTextBox(OH_Drawing_TextBox*); +size_t OH_Drawing_GetSizeOfTextBox(OH_Drawing_TextBox* textBox); /** * @brief Gets the glyphposition at coordinate. @@ -1289,12 +1289,12 @@ OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinat * @brief Gets position from position and affinity. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_PositionAndAffinity Indicates the pointer to an OH_Drawing_PositionAndAffinity object. + * @param positionAndAffinity Indicates the pointer to an OH_Drawing_PositionAndAffinity object. * @return Returns position from position and affinity. * @since 11 * @version 1.0 */ -size_t OH_Drawing_GetPositionFromPositionAndAffinity(OH_Drawing_PositionAndAffinity*); +size_t OH_Drawing_GetPositionFromPositionAndAffinity(OH_Drawing_PositionAndAffinity* positionAndAffinity); /** * @brief Gets affinity from position and affinity. @@ -1323,34 +1323,34 @@ OH_Drawing_Range* OH_Drawing_TypographyGetWordBoundary(OH_Drawing_Typography* ty * @brief Gets start from range. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Range Indicates the pointer to an OH_Drawing_Range object. + * @param range Indicates the pointer to an OH_Drawing_Range object. * @return Returns start from range. * @since 11 * @version 1.0 */ -size_t OH_Drawing_GetStartFromRange(OH_Drawing_Range*); +size_t OH_Drawing_GetStartFromRange(OH_Drawing_Range* range); /** * @brief Gets end from range. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Range Indicates the pointer to an OH_Drawing_Range object. + * @param range Indicates the pointer to an OH_Drawing_Range object. * @return Returns end from range. * @since 11 * @version 1.0 */ -size_t OH_Drawing_GetEndFromRange(OH_Drawing_Range*); +size_t OH_Drawing_GetEndFromRange(OH_Drawing_Range* range); /** * @brief Gets the line count. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param typography Indicates the pointer to an OH_Drawing_Typography object. * @return Returns the line count. * @since 11 * @version 1.0 */ -size_t OH_Drawing_TypographyGetLineCount(OH_Drawing_Typography*); +size_t OH_Drawing_TypographyGetLineCount(OH_Drawing_Typography* typography); /** * @brief Sets the decoration style. @@ -1591,12 +1591,12 @@ OH_Drawing_LineMetrics* OH_Drawing_TypographyGetLineMetrics(OH_Drawing_Typograph * @brief Get the number of lines. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_LineMetrics Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. + * @param lineMetrics Indicates the pointer to a line metrics object OH_Drawing_LineMetrics. * @return Returns the number of lines. * @since 12 * @version 1.0 */ -size_t OH_Drawing_LineMetricsGetSize(OH_Drawing_LineMetrics*); +size_t OH_Drawing_LineMetricsGetSize(OH_Drawing_LineMetrics* lineMetrics); /** * @brief Releases the memory occupied by line metrics. @@ -2145,12 +2145,12 @@ void OH_Drawing_TextStyleDestroyFontFeatures(OH_Drawing_FontFeature* fontFeature * @brief Get size of font features. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns the size of fontfeatures map. * @since 12 * @version 1.0 */ -size_t OH_Drawing_TextStyleGetFontFeatureSize(OH_Drawing_TextStyle*); +size_t OH_Drawing_TextStyleGetFontFeatureSize(OH_Drawing_TextStyle* style); /** * @brief Clear font features. @@ -2188,12 +2188,12 @@ double OH_Drawing_TextStyleGetBaselineShift(OH_Drawing_TextStyle* style); * @brief Gets the text color. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @return Returns the text color. * @since 12 * @version 1.0 */ -uint32_t OH_Drawing_TextStyleGetColor(OH_Drawing_TextStyle*); +uint32_t OH_Drawing_TextStyleGetColor(OH_Drawing_TextStyle* style); /** * @brief Gets text decoration style. @@ -2535,17 +2535,18 @@ bool OH_Drawing_TypographyStyleStrutStyleEquals(OH_Drawing_StrutStyle* from, OH_ */ void OH_Drawing_TypographyStyleSetHintsEnabled(OH_Drawing_TypographyStyle* style, bool hintsEnabled); -/* @brief Getting all font metrics from target row. +/** + * @brief Getting all font metrics from target row. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates a pointer to a typesetting object. + * @param typography Indicates a pointer to a typesetting object. * @param lineNumber Indicates specifies the number of rows. * @param fontMetricsSize Indicates the return size of font metrics struct from current line. * @return Returns all character measures for the current row. * @since 12 * @version 1.0 */ -OH_Drawing_Font_Metrics* OH_Drawing_TypographyGetLineFontMetrics(OH_Drawing_Typography*, +OH_Drawing_Font_Metrics* OH_Drawing_TypographyGetLineFontMetrics(OH_Drawing_Typography* typography, size_t lineNumber, size_t* fontMetricsSize); /** @@ -2572,12 +2573,12 @@ void OH_Drawing_TypographyMarkDirty(OH_Drawing_Typography* typography); * @brief Get the unresolved Glyphs count of lines in a text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_Typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. * @return Returns unresolved Glyphs count. * @since 12 * @version 1.0 */ -int32_t OH_Drawing_TypographyGetUnresolvedGlyphsCount(OH_Drawing_Typography*); +int32_t OH_Drawing_TypographyGetUnresolvedGlyphsCount(OH_Drawing_Typography* typography); /** * @brief Update the font size of lines in a text. @@ -2755,13 +2756,13 @@ OH_Drawing_TextDirection OH_Drawing_TypographyGetTextDirection(OH_Drawing_Typogr * @brief Sets the maximum number of lines in a text. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object + * @param style Indicates the pointer to a typography style object * OH_Drawing_TypographyStyle. * @return Return the maximum number of lines in a text. * @since 12 * @version 1.0 */ -size_t OH_Drawing_TypographyGetTextMaxLines(OH_Drawing_TypographyStyle*); +size_t OH_Drawing_TypographyGetTextMaxLines(OH_Drawing_TypographyStyle* style); /** * @brief Get the ellipsis of lines in a text. -- Gitee From 6783976b2d5237c622d4a93545a3ac86a04bcd5c Mon Sep 17 00:00:00 2001 From: sqwlly Date: Thu, 14 Nov 2024 07:51:04 +0000 Subject: [PATCH 160/630] add new interface sdk c Signed-off-by: s30029175 Signed-off-by: sqwlly Change-Id: I4b73da3d896ce70a34ddf58d6172705d6bf68d82 --- .../native_image/libnative_image.ndk.json | 5 +++- .../graphic_2d/native_image/native_image.h | 25 +++++++------------ .../native_window/graphic_error_code.h | 5 ++++ 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/graphic/graphic_2d/native_image/libnative_image.ndk.json b/graphic/graphic_2d/native_image/libnative_image.ndk.json index 02e835ae7..11e9be9cf 100644 --- a/graphic/graphic_2d/native_image/libnative_image.ndk.json +++ b/graphic/graphic_2d/native_image/libnative_image.ndk.json @@ -11,7 +11,10 @@ { "name": "OH_NativeImage_UnsetOnFrameAvailableListener" }, { "name": "OH_NativeImage_Destroy" }, { "name": "OH_NativeImage_GetTransformMatrixV2" }, - { "name": "OH_NativeImage_GetBufferMatrix" }, + { + "first_introduced": "14", + "name": "OH_NativeImage_GetBufferMatrix" + }, { "first_introduced": "12", "name": "OH_NativeImage_AcquireNativeWindowBuffer" diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index 4d604e8be..d04af1ea7 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -240,27 +240,20 @@ void OH_NativeImage_Destroy(OH_NativeImage** image); int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[16]); /** - * @brief Obtains both the cropping information and transform matrix of the texture image. + * @brief Obtains the transform matrix that combines with crop rect. * - * This API is an enhanced version of OH_NativeImage_GetTransformMatrix. In addition to the transform matrix, - * it also returns the cropping information of the texture image that was set in the most recent call to - * OH_NativeImage_UpdateSurfaceImage. - * - * The transform matrix is a 4x4 matrix that combines both the geometric transformation and texture - * coordinates transformation. The first 12 elements represent the geometric transformation (rotation, - * scaling, translation), and the last 4 elements contain texture coordinate mapping information. + * This API returns a transform matrix that combines the crop rect. + * Note that the matrix will not be updated until OH_NativeImage_UpdateSurfaceImage is called.\n + * This interface is a non-thread-safe type interface.\n * * @syscap SystemCapability.Graphic.Graphic2D.NativeImage - * @param image Pointer to an OH_NativeImage instance. - * @param matrix A float array of size 16 to store the retrieved 4x4 transform matrix. The matrix includes - * both geometric transformation and texture coordinates transformation. - * @return Returns 0 if successful, otherwise returns a negative error code: - * - Returns -1 if any parameter is invalid - * - Returns -2 if the image has not been updated with OH_NativeImage_UpdateSurfaceImage + * @param image Indicates the pointer to a OH_NativeImage instance. + * @param matrix Indicates the retrieved 4*4 transform matrix . + * @return {@link NATIVE_ERROR_OK} 0 - Success. + * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - image is NULL. + * {@link NATIVE_ERROR_MEM_OPERATION_ERROR} 30001000 - Memory operation error, failed to get transform matrix. * @since 14 * @version 1.0 - * @see OH_NativeImage_UpdateSurfaceImage - * @see OH_NativeImage_GetTransformMatrix */ int32_t OH_NativeImage_GetBufferMatrix(OH_NativeImage* image, float matrix[16]); diff --git a/graphic/graphic_2d/native_window/graphic_error_code.h b/graphic/graphic_2d/native_window/graphic_error_code.h index 1b5e9deb0..0fd706ffa 100644 --- a/graphic/graphic_2d/native_window/graphic_error_code.h +++ b/graphic/graphic_2d/native_window/graphic_error_code.h @@ -52,6 +52,11 @@ extern "C" { typedef enum OHNativeErrorCode { /** @error succeed */ NATIVE_ERROR_OK = 0, + /** + * @error memory operation error + * @since 14 + */ + NATIVE_ERROR_MEM_OPERATION_ERROR = 30001000, /** @error input invalid parameter */ NATIVE_ERROR_INVALID_ARGUMENTS = 40001000, /** @error unauthorized operation */ -- Gitee From 01555d7019328957c131977a028c0ab03c336937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=BE=E9=98=B3=E7=86=A0?= Date: Mon, 18 Nov 2024 21:03:32 +0800 Subject: [PATCH 161/630] =?UTF-8?q?Description:=20sdk=5Fc=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E4=BF=AE=E6=94=B9=20IssueNo:=20https://gitee.com/open?= =?UTF-8?q?harmony/drivers=5Fhdf=5Fcore/issues/IB57T6=20Signed-off-by:=20q?= =?UTF-8?q?ianyangyi=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/display_manager/oh_display_capture.h | 1 + arkui/display_manager/oh_display_info.h | 8 ++-- arkui/display_manager/oh_display_manager.h | 55 +++++++++++----------- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/arkui/display_manager/oh_display_capture.h b/arkui/display_manager/oh_display_capture.h index a9fd997b1..0e150db68 100644 --- a/arkui/display_manager/oh_display_capture.h +++ b/arkui/display_manager/oh_display_capture.h @@ -49,6 +49,7 @@ extern "C" { /** * @brief Capture a screen pixelmap of the specified display. * + * @permission {@code ohos.permission.CUSTOM_SCREEN_CAPTURE} * @param displayId The ID of the display to be captured. * @param pixelMap The output pixel map of the captured display. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful. diff --git a/arkui/display_manager/oh_display_info.h b/arkui/display_manager/oh_display_info.h index 2a4bda3fb..82b38a098 100644 --- a/arkui/display_manager/oh_display_info.h +++ b/arkui/display_manager/oh_display_info.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_NATIVE_DISPLAY_INFO_H -#define OH_NATIVE_DISPLAY_INFO_H - /** * @addtogroup OH_DisplayInfo * @{ @@ -39,6 +36,11 @@ * @version 1.0 */ + +#ifndef OH_NATIVE_DISPLAY_INFO_H +#define OH_NATIVE_DISPLAY_INFO_H + + #include "stdint.h" #ifdef __cplusplus diff --git a/arkui/display_manager/oh_display_manager.h b/arkui/display_manager/oh_display_manager.h index caf6480af..7f8e45c2b 100644 --- a/arkui/display_manager/oh_display_manager.h +++ b/arkui/display_manager/oh_display_manager.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef OH_NATIVE_DISPLAY_MANAGER_H -#define OH_NATIVE_DISPLAY_MANAGER_H - /** * @addtogroup OH_DisplayManager * @{ @@ -33,12 +30,16 @@ * @brief Defines the data structures for the C APIs of the display module. * * @kit ArkUI - * @library libnative_display_manager.so. + * @library libnative_display_manager.so * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 12 * @version 1.0 */ +#ifndef OH_NATIVE_DISPLAY_MANAGER_H +#define OH_NATIVE_DISPLAY_MANAGER_H + + #include "oh_display_info.h" #ifdef __cplusplus @@ -48,7 +49,7 @@ extern "C" { /** * @brief Obtain the default display Id. * - * @param { *displayId } Indicates the pointer to an uint64_t object. + * @param displayId Indicates the pointer to an uint64_t object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -60,7 +61,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayId(uint6 /** * @brief Obtain the default display width. * - * @param { *displayWidth } Indicates the pointer to an int32_t object. + * @param displayWidth Indicates the pointer to an int32_t object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -72,7 +73,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayWidth(in /** * @brief Obtain the default display height. * - * @param { *displayHeight } Indicates the pointer to an int32_t object. + * @param displayHeight Indicates the pointer to an int32_t object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -84,7 +85,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayHeight(i /** * @brief Obtain the default display rotation. * - * @param { *displayRotation } Indicates the pointer to an NativeDisplayManager_Rotation object. + * @param displayRotation Indicates the pointer to an NativeDisplayManager_Rotation object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -97,7 +98,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayRotation /** * @brief Obtain the default display orientation. * - * @param { *displayOrientation } Indicates the pointer to an NativeDisplayManager_Orientation object. + * @param displayOrientation Indicates the pointer to an NativeDisplayManager_Orientation object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -110,7 +111,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayOrientat /** * @brief Obtain the default display virtualPixels. * - * @param { *virtualPixels } Indicates the pointer to an float object. + * @param virtualPixels Indicates the pointer to an float object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -122,7 +123,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayVirtualP /** * @brief Obtain the default display refreshRate. * - * @param { *refreshRate } Indicates the pointer to an uint32_t object. + * @param refreshRate Indicates the pointer to an uint32_t object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -134,7 +135,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayRefreshR /** * @brief Obtain the default display densityDpi. * - * @param { *densityDpi } Indicates the pointer to an int32_t object. + * @param densityDpi Indicates the pointer to an int32_t object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -146,7 +147,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityD /** * @brief Obtain the default display densityPixels. * - * @param { *densityPixels } Indicates the pointer to an float object. + * @param densityPixels Indicates the pointer to an float object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -158,7 +159,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityP /** * @brief Obtain the default display scaledDensity. * - * @param { *scaledDensity } Indicates the pointer to an float object. + * @param scaledDensity Indicates the pointer to an float object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -170,7 +171,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayScaledDe /** * @brief Obtain the default display xDpi. * - * @param { *xDpi } Indicates the pointer to an float object. + * @param xDpi Indicates the pointer to an float object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -182,7 +183,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityX /** * @brief Obtain the default display yDpi. * - * @param { *yDpi } Indicates the pointer to an float object. + * @param yDpi Indicates the pointer to an float object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -194,7 +195,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityY /** * @brief Create the cutout info of the device. * - * @param { **cutoutInfo } Indicates the pointer to an NativeDisplayManager_CutoutInfo object. + * @param cutoutInfo Indicates the pointer to an NativeDisplayManager_CutoutInfo object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -207,7 +208,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateDefaultDisplayCutou /** * @brief Destroy an NativeDisplayManager_CutoutInfo object and reclaims the memory occupied by the object. * - * @param { **cutoutInfo } Indicates the pointer to an NativeDisplayManager_CutoutInfo object. + * @param cutoutInfo Indicates the pointer to an NativeDisplayManager_CutoutInfo object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -228,7 +229,7 @@ bool OH_NativeDisplayManager_IsFoldable(); /** * @brief Get the display mode of the foldable device. * - * @param { *displayMode } Indicates the pointer to an NativeDisplayManager_FoldDisplayMode object. + * @param displayMode Indicates the pointer to an NativeDisplayManager_FoldDisplayMode object. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support. @@ -241,7 +242,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetFoldDisplayMode( /** * @brief the callback function type when display change. * - * @param { *displayId } change display id. + * @param displayId change display id. * @syscap SystemCapability.Window.SessionManager * @since 12 */ @@ -250,8 +251,8 @@ typedef void (*OH_NativeDisplayManager_DisplayChangeCallback)(uint64_t displayId /** * @brief Register the callback for display change listener. * - * @param { displayChangeCallback } display change callback. - * @param { *listenerIndex } Indicates the pointer to an uint32_t object. used in unregister call. + * @param displayChangeCallback display change callback. + * @param listenerIndex Indicates the pointer to an uint32_t object. used in unregister call. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -264,7 +265,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterDisplayChangeList /** * @brief Unregister the callback for display changes listener. * - * @param { listenerIndex } display changed listener index. + * @param listenerIndex display changed listener index. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. @@ -276,7 +277,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterDisplayChangeLi /** * @brief the callback function type when display fold change. * - * @param { displayMode } current fold display mode. + * @param displayMode current fold display mode. * @syscap SystemCapability.Window.SessionManager * @since 12 */ @@ -286,8 +287,8 @@ typedef void (*OH_NativeDisplayManager_FoldDisplayModeChangeCallback)( /** * @brief Register the callback for display mode change listener. * - * @param { displayModeChangeCallback } display mode change callback. - * @param { *listenerIndex } Indicates the pointer to an uint32_t object. used in unregister call. + * @param displayModeChangeCallback display mode change callback. + * @param listenerIndex Indicates the pointer to an uint32_t object. used in unregister call. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support. @@ -301,7 +302,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterFoldDisplayModeCh /** * @brief Unregister the callback for display mode change listener. * - * @param { listenerIndex } display mode change listener index. + * @param listenerIndex display mode change listener index. * @return { @link DISPLAY_MANAGER_OK } If the operation is successful * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support. -- Gitee From 41af88bdbcea7933701db7164b87ce3ec7e3104c Mon Sep 17 00:00:00 2001 From: wanglili12 Date: Wed, 20 Nov 2024 15:28:25 +0800 Subject: [PATCH 162/630] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanglili12 Change-Id: I1253c17ccf1ea708571ecf3dc06ba580ec221fcf --- arkui/ace_engine/native/native_node.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 957b003fd..f83f1a181 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1792,6 +1792,16 @@ typedef enum { */ NODE_TRANSITION = 94, + /** + * @brief Defines the component ID. + * This attribute can be obtained through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for obtaining the attribute:\n + * .value[0].i32: component ID. \n + * + */ + NODE_UNIQUE_ID = 95, + /** * @brief Set the current component system focus box style. * @@ -1806,16 +1816,6 @@ typedef enum { */ NODE_FOCUS_BOX = 96, - /** - * @brief Defines the component ID. - * This attribute can be obtained through APIs. - * - * Format of the {@link ArkUI_AttributeItem} parameter for obtaining the attribute:\n - * .value[0].i32: component ID. \n - * - */ - NODE_UNIQUE_ID = 95, - /** * @brief Defines the moving distance limit for the component-bound tap gesture. * This attribute can be set as required through APIs. -- Gitee From 5ca2cd4bdeab00455bc2314e93557a65abbb4a46 Mon Sep 17 00:00:00 2001 From: GuoLi Date: Wed, 20 Nov 2024 11:36:44 +0000 Subject: [PATCH 163/630] =?UTF-8?q?API=20Lint=E5=91=8A=E8=AD=A6=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: GuoLi --- network/netstack/net_websocket/net_websocket.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/network/netstack/net_websocket/net_websocket.h b/network/netstack/net_websocket/net_websocket.h index d83f96f73..303e13bf5 100755 --- a/network/netstack/net_websocket/net_websocket.h +++ b/network/netstack/net_websocket/net_websocket.h @@ -51,10 +51,11 @@ extern "C" { /** * @brief Constructor of websocket. * + * @param onOpen Callback function invoked when a connection setup message is received. * @param onMessage Callback function invoked when a message is received. - * @param onClose Callback function invoked when a connection closing message is closed. * @param onError Callback function invoked when a connection error message is received. - * @param onOpen Callback function invoked when a connection setup message is received. + * @param onClose Callback function invoked when a connection closing message is closed. + * * @return Pointer to the websocket client if success; NULL otherwise. * @syscap SystemCapability.Communication.NetStack * @since 11 @@ -107,7 +108,6 @@ int OH_WebSocketClient_Send(struct WebSocket *client, char *data, size_t length) * @brief Closes a webSocket connection. * * @param client Pointer to the websocket client. - * @param url URL for the client to connect to the server. * @param options Optional parameters. * @return 0 if success; non-0 otherwise. For details about error codes, see {@link OH_Websocket_ErrCode}. * @permission ohos.permission.INTERNET -- Gitee From bf28bb017971072cd34bca291dd5f503983fa685 Mon Sep 17 00:00:00 2001 From: GuoLi Date: Wed, 20 Nov 2024 11:51:05 +0000 Subject: [PATCH 164/630] update Signed-off-by: GuoLi --- network/netstack/net_websocket/net_websocket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/netstack/net_websocket/net_websocket.h b/network/netstack/net_websocket/net_websocket.h index 303e13bf5..6506ba5fa 100755 --- a/network/netstack/net_websocket/net_websocket.h +++ b/network/netstack/net_websocket/net_websocket.h @@ -55,7 +55,7 @@ extern "C" { * @param onMessage Callback function invoked when a message is received. * @param onError Callback function invoked when a connection error message is received. * @param onClose Callback function invoked when a connection closing message is closed. - * + * * @return Pointer to the websocket client if success; NULL otherwise. * @syscap SystemCapability.Communication.NetStack * @since 11 -- Gitee From 65ce6a965860369f6cf3b07451e2c0c120e469dc Mon Sep 17 00:00:00 2001 From: wanxiaoqing Date: Thu, 21 Nov 2024 11:20:46 +0800 Subject: [PATCH 165/630] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanxiaoqing --- distributeddatamgr/udmf/include/udmf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distributeddatamgr/udmf/include/udmf.h b/distributeddatamgr/udmf/include/udmf.h index d8d7149e5..5a8491cfc 100644 --- a/distributeddatamgr/udmf/include/udmf.h +++ b/distributeddatamgr/udmf/include/udmf.h @@ -206,7 +206,7 @@ OH_UdmfRecordProvider* OH_UdmfRecordProvider_Create(); /** * @brief Destroy an {@link OH_UdmfRecordProvider} instance. * - * @param subscriber Pointer to the {@link OH_UdmfRecordProvider} instance to destroy. + * @param provider Pointer to the {@link OH_UdmfRecordProvider} instance to destroy. * @return Returns the status code of the execution. For details, see {@link Udmf_ErrCode}. * Returns {@link UDMF_E_OK} if the operation is successful. * Returns {@link UDMF_E_INVALID_PARAM} if invalid args are detected. -- Gitee From b9814c10b9891a6c716f6b22cb62ac8a19b04934 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Thu, 21 Nov 2024 15:12:15 +0800 Subject: [PATCH 166/630] =?UTF-8?q?=E5=9B=BE=E5=BD=A2API=20Lint=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20OH=5FPixelmapImageInfo=5FGetAlphaType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- multimedia/image_framework/include/image/pixelmap_native.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index fb16d8c0d..ba89797c7 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -568,7 +568,7 @@ Image_ErrorCode OH_PixelmapImageInfo_GetRowStride(OH_Pixelmap_ImageInfo *info, u Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, int32_t *pixelFormat); /** - * @brief Get density number for imageinfo struct. + * @brief Get alphaType number for imageinfo struct. * * @param info The imageinfo pointer will be operated. * @param alphaType The number of image alphaType. -- Gitee From d83c40061689aee1eda08a6cea959ef299533330 Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 21 Nov 2024 07:16:55 +0000 Subject: [PATCH 167/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/usb/usb_ddk_types.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index a0cb5e5b1..8c51cd726 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -298,6 +298,10 @@ typedef struct UsbDeviceMemMap { typedef enum { /** @error The operation is successful. */ USB_DDK_SUCCESS = 0, + /** @error The operation failed. + * @deprecate since 14 + */ + USB_DDK_FAILED = -1, /** @error Permission denied. */ USB_DDK_NO_PERM = 201, /** @error Invalid parameter. */ @@ -306,6 +310,14 @@ typedef enum { * or memory application failure. */ USB_DDK_MEMORY_ERROR = 27400001, + /** @error Null pointer exception + * @deprecate since 14 + */ + USB_DDK_NULL_PTR = -5, + /** @error Device busy. + * @deprecate since 14 + */ + USB_DDK_DEVICE_BUSY = -6, /** @error Invalid operation. */ USB_DDK_INVALID_OPERATION = 27400002, /** @error Device I/O operation failed. */ -- Gitee From e1efc215cdfe2b6ba3db5774bbfd2519e74b2196 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Thu, 21 Nov 2024 07:23:58 +0000 Subject: [PATCH 168/630] update multimedia/image_framework/include/image/pixelmap_native.h. Signed-off-by: shenshiyi2 --- multimedia/image_framework/include/image/pixelmap_native.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index ba89797c7..b897e2a12 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -571,7 +571,7 @@ Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, * @brief Get alphaType number for imageinfo struct. * * @param info The imageinfo pointer will be operated. - * @param alphaType The number of image alphaType. + * @param alphaType The number of imageinfo alphaType. * @return Returns {@link Image_ErrorCode} * @since 12 */ -- Gitee From 8c13f42913d15a0b2475faa4b374ffd4be2cefd8 Mon Sep 17 00:00:00 2001 From: chenjunxiang Date: Thu, 21 Nov 2024 15:42:49 +0800 Subject: [PATCH 169/630] =?UTF-8?q?=E8=A7=A3=E5=86=B3api=20lint=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenjunxiang Change-Id: I34d3931a88447dc561c62b22246db6e9c58674f5 解决api lint整改 Signed-off-by: chenjunxiang Change-Id: I02b6a01eee5f099411f6a8d691353032997fca43 --- arkui/ace_engine/native/native_interface_accessibility.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arkui/ace_engine/native/native_interface_accessibility.h b/arkui/ace_engine/native/native_interface_accessibility.h index 09f8b97e5..d765c7d77 100644 --- a/arkui/ace_engine/native/native_interface_accessibility.h +++ b/arkui/ace_engine/native/native_interface_accessibility.h @@ -27,6 +27,8 @@ * @file native_interface_accessibility.h * * @brief Declares the APIs used to access the native Accessibility. + * + * @library libace_ndk.z.so * @syscap SystemCapability.ArkUI.ArkUI.Full * @kit ArkUI * @since 13 @@ -1031,3 +1033,4 @@ int32_t OH_ArkUI_FindAccessibilityActionArgumentByKey( }; #endif #endif // _NATIVE_INTERFACE_ACCESSIBILITY_H +/** @} */ \ No newline at end of file -- Gitee From 4019c8087f6e2bc17712b893722866a0012cc21f Mon Sep 17 00:00:00 2001 From: huanghan Date: Thu, 21 Nov 2024 22:14:24 +0800 Subject: [PATCH 170/630] =?UTF-8?q?API=20Lint=E7=9A=84=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huanghan --- ark_runtime/jsvm/jsvm.h | 1237 +++++++++++++++++---------------- ark_runtime/jsvm/jsvm_types.h | 9 +- 2 files changed, 624 insertions(+), 622 deletions(-) diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index 3f47366b4..89ce7ffbd 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -12,10 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#ifndef ARK_RUNTIME_JSVM_JSVM_H -#define ARK_RUNTIME_JSVM_JSVM_H - /** * @addtogroup JSVM * @{ @@ -43,9 +39,15 @@ * @since 11 */ + +#ifndef ARK_RUNTIME_JSVM_JSVM_H +#define ARK_RUNTIME_JSVM_JSVM_H + + // This file needs to be compatible with C compilers. #include // NOLINT(modernize-deprecated-headers) #include // NOLINT(modernize-deprecated-headers) +#include "jsvm_types.h" // Use INT_MAX, this should only be consumed by the pre-processor anyway. #define JSVM_VERSION_EXPERIMENTAL 2147483647 @@ -63,8 +65,6 @@ #endif #endif -#include "jsvm_types.h" - #ifndef JSVM_EXTERN #ifdef _WIN32 /** @@ -112,8 +112,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Init(const JSVM_InitOptions* options); /** * @brief This API create a new VM instance. * - * @param options: The options for create the VM instance. - * @param result: The new VM instance. + * @param options The options for create the VM instance. + * @param result The new VM instance. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -124,7 +124,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateVM(const JSVM_CreateVMOptions* options, /** * @brief Destroys VM instance. * - * @param vm: The VM instance to be Destroyed. + * @param vm The VM instance to be Destroyed. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -134,8 +134,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DestroyVM(JSVM_VM vm); /** * @brief This API open a new VM scope for the VM instance. * - * @param vm: The VM instance to open scope for. - * @param result: The new VM scope. + * @param vm The VM instance to open scope for. + * @param result The new VM scope. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -146,8 +146,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenVMScope(JSVM_VM vm, /** * @brief This function close the VM scope for the VM instance. * - * @param vm: The VM instance to close scope for. - * @param scope: The VM scope to be closed. + * @param vm The VM instance to close scope for. + * @param scope The VM scope to be closed. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -158,10 +158,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseVMScope(JSVM_VM vm, /** * @brief This function create a new environment with optional properties for the context of the new environment. * - * @param vm: The VM instance that the env will be created in. - * @param propertyCount: The number of elements in the properties array. - * @param properties: The array of property descriptor. - * @param result: The new environment created. + * @param vm The VM instance that the env will be created in. + * @param propertyCount The number of elements in the properties array. + * @param properties The array of property descriptor. + * @param result The new environment created. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -174,9 +174,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateEnv(JSVM_VM vm, /** * @brief This function create a new environment from the start snapshot of the vm. * - * @param vm: The VM instance that the env will be created in. - * @param index: The index of the environment in the snapshot. - * @param result: The new environment created. + * @param vm The VM instance that the env will be created in. + * @param index The index of the environment in the snapshot. + * @param result The new environment created. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -188,7 +188,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateEnvFromSnapshot(JSVM_VM vm, /** * @brief This function destroys the environment. * - * @param env: The environment to be destroyed. + * @param env The environment to be destroyed. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -198,8 +198,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DestroyEnv(JSVM_Env env); /** * @brief This function open a new environment scope. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param result: The new environment scope. + * @param env The environment that the JSVM-API call is invoked under. + * @param result The new environment scope. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -210,8 +210,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenEnvScope(JSVM_Env env, /** * @brief This function closes the environment scope of the environment. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param scope: The environment scope to be closed. + * @param env The environment that the JSVM-API call is invoked under. + * @param scope The environment scope to be closed. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -222,8 +222,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseEnvScope(JSVM_Env env, /** * @brief This function retrieves the VM instance of the given environment. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param result: The VM instance of the environment. + * @param env The environment that the JSVM-API call is invoked under. + * @param result The VM instance of the environment. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } in all cases.\n * @since 12 @@ -234,13 +234,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetVM(JSVM_Env env, /** * @brief This function compiles a string of JavaScript code and returns the compiled script. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param script: A JavaScript string containing the script yo be compiled. - * @param cachedData: Optional code cache data for the script. - * @param cacheDataLength: The length of cachedData array. - * @param eagerCompile: Whether to compile the script eagerly. - * @param cacheRejected: Whether the code cache rejected by compilation. - * @param result: The compiled script. + * @param env The environment that the JSVM-API call is invoked under. + * @param script A JavaScript string containing the script yo be compiled. + * @param cachedData Optional code cache data for the script. + * @param cacheDataLength The length of cachedData array. + * @param eagerCompile Whether to compile the script eagerly. + * @param cacheRejected Whether the code cache rejected by compilation. + * @param result The compiled script. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -257,14 +257,14 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileScript(JSVM_Env env, * @brief This function compiles a string of JavaScript code with the source code information * and returns the compiled script. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param script: A JavaScript string containing the script to be compiled. - * @param cachedData: Optional code cache data for the script. - * @param cacheDataLength: The length of cachedData array. - * @param eagerCompile: Whether to compile the script eagerly. - * @param cacheRejected: Whether the code cache rejected by compilation. - * @param origin: The information of source code. - * @param result: The compiled script. + * @param env The environment that the JSVM-API call is invoked under. + * @param script A JavaScript string containing the script to be compiled. + * @param cachedData Optional code cache data for the script. + * @param cacheDataLength The length of cachedData array. + * @param eagerCompile Whether to compile the script eagerly. + * @param cacheRejected Whether the code cache rejected by compilation. + * @param origin The information of source code. + * @param result The compiled script. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -281,10 +281,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileScriptWithOrigin(JSVM_Env env, /** * @brief This function creates code cache for the compiled script. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param script: A compiled script to create code cache for. - * @param data: The data of the code cache. - * @param length: The length of the code cache data. + * @param env The environment that the JSVM-API call is invoked under. + * @param script A compiled script to create code cache for. + * @param data The data of the code cache. + * @param length The length of the code cache data. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -302,9 +302,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateCodeCache(JSVM_Env env, * global object. Variable declarations made using let and const will be visible globally, but will not be added * to the global object.The value of this is global within the script. * - * @param env: The environment that the API is invoked under. - * @param script: A JavaScript string containing the script to execute. - * @param result: The value resulting from having executed the script. + * @param env The environment that the API is invoked under. + * @param script A JavaScript string containing the script to execute. + * @param result The value resulting from having executed the script. * @since 11 */ JSVM_EXTERN JSVM_Status OH_JSVM_RunScript(JSVM_Env env, @@ -315,11 +315,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_RunScript(JSVM_Env env, * @brief This API associates data with the currently running JSVM environment. data can later be retrieved * using OH_JSVM_GetInstanceData(). * - * @param env: The environment that the JSVM-API call is invoked under. - * @param data: The data item to make available to bindings of this instance. - * @param finalizeCb: The function to call when the environment is being torn down. The function receives + * @param env The environment that the JSVM-API call is invoked under. + * @param data The data item to make available to bindings of this instance. + * @param finalizeCb The function to call when the environment is being torn down. The function receives * data so that it might free it. JSVM_Finalize provides more details. - * @param finalizeHint: Optional hint to pass to the finalize callback during collection. + * @param finalizeHint Optional hint to pass to the finalize callback during collection. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -333,8 +333,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetInstanceData(JSVM_Env env, * @brief This API retrieves data that was previously associated with the currently running JSVM environment * via OH_JSVM_SetInstanceData(). If no data is set, the call will succeed and data will be set to NULL. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param data: The data item that was previously associated with the currently running JSVM environment by + * @param env The environment that the JSVM-API call is invoked under. + * @param data The data item that was previously associated with the currently running JSVM environment by * a call to OH_JSVM_SetInstanceData(). * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -347,8 +347,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetInstanceData(JSVM_Env env, * @brief This API retrieves a JSVM_ExtendedErrorInfo structure with information about the last error that * occurred. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param result: The JSVM_ExtendedErrorInfo structure with more information about the error. + * @param env The environment that the JSVM-API call is invoked under. + * @param result The JSVM_ExtendedErrorInfo structure with more information about the error. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -359,8 +359,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetLastErrorInfo(JSVM_Env env, /** * @brief This API throws the JavaScript value provided. * - * @param env: The environment that the API is invoked under. - * @param error: The JavaScript value to be thrown. + * @param env The environment that the API is invoked under. + * @param error The JavaScript value to be thrown. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -371,9 +371,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Throw(JSVM_Env env, /** * @brief This API throws a JavaScript Error with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional error code to be set on the error. - * @param msg: C string representing the text to be associated with the error. + * @param env The environment that the API is invoked under. + * @param code Optional error code to be set on the error. + * @param msg C string representing the text to be associated with the error. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -385,9 +385,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowError(JSVM_Env env, /** * @brief This API throws a JavaScript TypeError with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional error code to be set on the error. - * @param msg: C string representing the text to be associated with the error. + * @param env The environment that the API is invoked under. + * @param code Optional error code to be set on the error. + * @param msg C string representing the text to be associated with the error. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -399,9 +399,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowTypeError(JSVM_Env env, /** * @brief This API throws a JavaScript RangeError with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional error code to be set on the error. - * @param msg: C string representing the text to be associated with the error. + * @param env The environment that the API is invoked under. + * @param code Optional error code to be set on the error. + * @param msg C string representing the text to be associated with the error. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -413,9 +413,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowRangeError(JSVM_Env env, /** * @brief This API throws a JavaScript SyntaxError with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional error code to be set on the error. - * @param msg: C string representing the text to be associated with the error. + * @param env The environment that the API is invoked under. + * @param code Optional error code to be set on the error. + * @param msg C string representing the text to be associated with the error. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -427,9 +427,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowSyntaxError(JSVM_Env env, /** * @brief This API queries a JSVM_Value to check if it represents an error object. * - * @param env: The environment that the API is invoked under. - * @param value: The JSVM_Value to be checked. - * @param result: Boolean value that is set to true if JSVM_Value represents an error, + * @param env The environment that the API is invoked under. + * @param value The JSVM_Value to be checked. + * @param result Boolean value that is set to true if JSVM_Value represents an error, * false otherwise. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -442,10 +442,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsError(JSVM_Env env, /** * @brief This API returns a JavaScript Error with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional JSVM_Value with the string for the error code to be associated with the error. - * @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error. - * @param result: JSVM_Value representing the error created. + * @param env The environment that the API is invoked under. + * @param code Optional JSVM_Value with the string for the error code to be associated with the error. + * @param msg JSVM_Value that references a JavaScript string to be used as the message for the Error. + * @param result JSVM_Value representing the error created. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -458,10 +458,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateError(JSVM_Env env, /** * @brief This API returns a JavaScript TypeError with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional JSVM_Value with the string for the error code to be associated with the error. - * @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error. - * @param result: JSVM_Value representing the error created. + * @param env The environment that the API is invoked under. + * @param code Optional JSVM_Value with the string for the error code to be associated with the error. + * @param msg JSVM_Value that references a JavaScript string to be used as the message for the Error. + * @param result JSVM_Value representing the error created. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -474,10 +474,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateTypeError(JSVM_Env env, /** * @brief This API returns a JavaScript RangeError with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional JSVM_Value with the string for the error code to be associated with the error. - * @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error. - * @param result: JSVM_Value representing the error created. + * @param env The environment that the API is invoked under. + * @param code Optional JSVM_Value with the string for the error code to be associated with the error. + * @param msg JSVM_Value that references a JavaScript string to be used as the message for the Error. + * @param result JSVM_Value representing the error created. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -490,10 +490,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateRangeError(JSVM_Env env, /** * @brief This API returns a JavaScript SyntaxError with the text provided. * - * @param env: The environment that the API is invoked under. - * @param code: Optional JSVM_Value with the string for the error code to be associated with the error. - * @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error. - * @param result: JSVM_Value representing the error created. + * @param env The environment that the API is invoked under. + * @param code Optional JSVM_Value with the string for the error code to be associated with the error. + * @param msg JSVM_Value that references a JavaScript string to be used as the message for the Error. + * @param result JSVM_Value representing the error created. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -506,8 +506,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateSyntaxError(JSVM_Env env, /** * @brief This API returns a JavaScript exception if one is pending, NULL otherwise. * - * @param env: The environment that the API is invoked under. - * @param result: The exception if one is pending, NULL otherwise. + * @param env The environment that the API is invoked under. + * @param result The exception if one is pending, NULL otherwise. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -518,8 +518,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetAndClearLastException(JSVM_Env env, /** * @brief This API returns true if an exception is pending, false otherwise. * - * @param env: The environment that the API is invoked under. - * @param result: Boolean value that is set to true if an exception is pending. + * @param env The environment that the API is invoked under. + * @param result Boolean value that is set to true if an exception is pending. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -530,8 +530,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsExceptionPending(JSVM_Env env, /** * @brief This API opens a new scope. * - * @param env: The environment that the API is invoked under. - * @param result: JSVM_Value representing the new scope. + * @param env The environment that the API is invoked under. + * @param result JSVM_Value representing the new scope. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -543,8 +543,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenHandleScope(JSVM_Env env, * @brief This API closes the scope passed in. Scopes must be closed in the reverse * order from which they were created. * - * @param env: The environment that the API is invoked under. - * @param scope: JSVM_Value representing the scope to be closed. + * @param env The environment that the API is invoked under. + * @param scope JSVM_Value representing the scope to be closed. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -555,8 +555,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseHandleScope(JSVM_Env env, /** * @brief This API opens a new scope from which one object can be promoted to the outer scope. * - * @param env: The environment that the API is invoked under. - * @param result: JSVM_Value representing the new scope. + * @param env The environment that the API is invoked under. + * @param result JSVM_Value representing the new scope. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -568,8 +568,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenEscapableHandleScope(JSVM_Env env, * @brief This API closes the scope passed in. Scopes must be closed in the reverse order * from which they were created. * - * @param env: The environment that the API is invoked under. - * @param scope: JSVM_Value representing the scope to be closed. + * @param env The environment that the API is invoked under. + * @param scope JSVM_Value representing the scope to be closed. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -582,10 +582,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseEscapableHandleScope(JSVM_Env env, * of the outer scope. It can only be called once per scope. If it is called more than once an error * will be returned. * - * @param env: The environment that the API is invoked under. - * @param scope: JSVM_Value representing the current scope. - * @param escapee: JSVM_Value representing the JavaScript Object to be escaped. - * @param result: JSVM_Value representing the handle to the escaped Object in the outer scope. + * @param env The environment that the API is invoked under. + * @param scope JSVM_Value representing the current scope. + * @param escapee JSVM_Value representing the JavaScript Object to be escaped. + * @param result JSVM_Value representing the handle to the escaped Object in the outer scope. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -598,10 +598,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_EscapeHandle(JSVM_Env env, /** * @brief This API creates a new reference with the specified reference count to the value passed in. * - * @param env: The environment that the API is invoked under. - * @param value: The JSVM_Value for which a reference is being created. - * @param initialRefcount: Initial reference count for the new reference. - * @param result: JSVM_Ref pointing to the new reference. + * @param env The environment that the API is invoked under. + * @param value The JSVM_Value for which a reference is being created. + * @param initialRefcount Initial reference count for the new reference. + * @param result JSVM_Ref pointing to the new reference. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -614,8 +614,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateReference(JSVM_Env env, /** * @brief his API deletes the reference passed in. * - * @param env: The environment that the API is invoked under. - * @param ref: JSVM_Ref to be deleted. + * @param env The environment that the API is invoked under. + * @param ref JSVM_Ref to be deleted. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -627,9 +627,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DeleteReference(JSVM_Env env, * @brief his API increments the reference count for the reference passed in and * returns the resulting reference count. * - * @param env: The environment that the API is invoked under. - * @param ref: JSVM_Ref for which the reference count will be incremented. - * @param result: The new reference count. + * @param env The environment that the API is invoked under. + * @param ref JSVM_Ref for which the reference count will be incremented. + * @param result The new reference count. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -642,9 +642,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReferenceRef(JSVM_Env env, * @brief This API decrements the reference count for the reference passed in and * returns the resulting reference count. * - * @param env: The environment that the API is invoked under. - * @param ref: JSVM_Ref for which the reference count will be decremented. - * @param result: The new reference count. + * @param env The environment that the API is invoked under. + * @param ref JSVM_Ref for which the reference count will be decremented. + * @param result The new reference count. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -657,9 +657,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReferenceUnref(JSVM_Env env, * @brief If still valid, this API returns the JSVM_Value representing the * JavaScript value associated with the JSVM_Ref. Otherwise, result will be NULL. * - * @param env: The environment that the API is invoked under. - * @param ref: The JSVM_Ref for which the corresponding value is being requested. - * @param result: The JSVM_Value referenced by the JSVM_Ref. + * @param env The environment that the API is invoked under. + * @param ref The JSVM_Ref for which the corresponding value is being requested. + * @param result The JSVM_Value referenced by the JSVM_Ref. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -671,8 +671,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetReferenceValue(JSVM_Env env, /** * @brief This API returns a JSVM-API value corresponding to a JavaScript Array type. * - * @param env: The environment that the API is invoked under. - * @param result: A JSVM_Value representing a JavaScript Array. + * @param env The environment that the API is invoked under. + * @param result A JSVM_Value representing a JavaScript Array. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -686,9 +686,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateArray(JSVM_Env env, * is set to the passed-in length parameter. However, the underlying buffer is not guaranteed to be pre-allocated * by the VM when the array is created. That behavior is left to the underlying VM implementation. * - * @param env: The environment that the API is invoked under. - * @param length: The initial length of the Array. - * @param result: A JSVM_Value representing a JavaScript Array. + * @param env The environment that the API is invoked under. + * @param length The initial length of the Array. + * @param result A JSVM_Value representing a JavaScript Array. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -705,10 +705,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateArrayWithLength(JSVM_Env env, * directly manipulate the buffer. This buffer can only be written to directly from native code. To write to this * buffer from JavaScript, a typed array or DataView object would need to be created. * - * @param env: The environment that the API is invoked under. - * @param byteLength: The length in bytes of the array buffer to create. - * @param data: Pointer to the underlying byte buffer of the ArrayBuffer.data can optionally be ignored by passing NULL. - * @param result: A JSVM_Value representing a JavaScript Array. + * @param env The environment that the API is invoked under. + * @param byteLength The length in bytes of the array buffer to create. + * @param data Pointer to the underlying byte buffer of the ArrayBuffer.data can optionally be ignored by passing NULL. + * @param result A JSVM_Value representing a JavaScript Array. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -721,9 +721,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateArraybuffer(JSVM_Env env, /** * @brief This API allocate the memory of array buffer backing store. * - * @param byteLength: size of backing store memory. - * @param initialized: initialization status of the backing store memory. - * @param data: pointer that recieve the backing store memory pointer. + * @param byteLength size of backing store memory. + * @param initialized initialization status of the backing store memory. + * @param data pointer that recieve the backing store memory pointer. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if allocation succeed.\n * Returns {@link JSVM_INVALID_ARG } if data is null pointer.\n @@ -737,7 +737,7 @@ JSVM_Status JSVM_CDECL OH_JSVM_AllocateArrayBufferBackingStoreData(size_t byteLe /** * @brief This API release the memory of an array buffer backing store. * - * @param data: pointer to the backing store memory. + * @param data pointer to the backing store memory. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if run succeed.\n * Returns {@link JSVM_INVALID_ARG } if data is null pointer.\n @@ -748,12 +748,12 @@ JSVM_Status JSVM_CDECL OH_JSVM_FreeArrayBufferBackingStoreData(void *data); /** * @brief This API create an array buffer using the backing store data. * - * @param env: The environment that the API is invoked under. - * @param data: pointer to the backing store memory. - * @param backingStoreSize: size of backing store memory. - * @param offset: start position of the array buffer in the backing store memory. - * @param arrayBufferSize: size of the array buffer. - * @param result: pointer that recieve the array buffer. + * @param env The environment that the API is invoked under. + * @param data pointer to the backing store memory. + * @param backingStoreSize size of backing store memory. + * @param offset start position of the array buffer in the backing store memory. + * @param arrayBufferSize size of the array buffer. + * @param result pointer that recieve the array buffer. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if creation succeed.\n * Returns {@link JSVM_INVALID_ARG } if any of the following condition reached:\n @@ -773,9 +773,9 @@ JSVM_Status JSVM_CDECL OH_JSVM_CreateArrayBufferFromBackingStoreData(JSVM_Env en * @brief This API does not observe leap seconds; they are ignored, as ECMAScript aligns with POSIX time specification. * This API allocates a JavaScript Date object. * - * @param env: The environment that the API is invoked under. - * @param time: ECMAScript time value in milliseconds since 01 January, 1970 UTC. - * @param result: A JSVM_Value representing a JavaScript Date. + * @param env The environment that the API is invoked under. + * @param time ECMAScript time value in milliseconds since 01 January, 1970 UTC. + * @param result A JSVM_Value representing a JavaScript Date. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -789,14 +789,14 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDate(JSVM_Env env, * data through JavaScript code, so it can be retrieved later by native code using OH_JSVM_GetValueExternal. * The API adds a JSVM_Finalize callback which will be called when the JavaScript object just created has been garbage * collected.The created value is not an object, and therefore does not support additional properties. It is considered - * a distinct value type: calling OH_JSVM_Typeof() with an external value yields JSVM_EXTERNAL. + * a distinct value type calling OH_JSVM_Typeof() with an external value yields JSVM_EXTERNAL. * - * @param env: The environment that the API is invoked under. - * @param data: Raw pointer to the external data. - * @param finalizeCb: Optional callback to call when the external value is being collected. JSVM_Finalize provides + * @param env The environment that the API is invoked under. + * @param data Raw pointer to the external data. + * @param finalizeCb Optional callback to call when the external value is being collected. JSVM_Finalize provides * more details. - * @param finalizeHint: Optional hint to pass to the finalize callback during collection. - * @param result: A JSVM_Value representing an external value. + * @param finalizeHint Optional hint to pass to the finalize callback during collection. + * @param result A JSVM_Value representing an external value. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -810,8 +810,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternal(JSVM_Env env, /** * @brief This API allocates a default JavaScript Object. It is the equivalent of doing new Object() in JavaScript. * - * @param env: The environment that the API is invoked under. - * @param result: A JSVM_Value representing a JavaScript Object. + * @param env The environment that the API is invoked under. + * @param result A JSVM_Value representing a JavaScript Object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -822,10 +822,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateObject(JSVM_Env env, /** * @brief This API creates a JavaScript symbol value from a UTF8-encoded C string. * - * @param env: The environment that the API is invoked under. - * @param description: Optional JSVM_Value which refers to a JavaScript string to be set as the description + * @param env The environment that the API is invoked under. + * @param description Optional JSVM_Value which refers to a JavaScript string to be set as the description * for the symbol. - * @param result: A JSVM_Value representing a JavaScript symbol. + * @param result A JSVM_Value representing a JavaScript symbol. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -838,10 +838,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateSymbol(JSVM_Env env, * @brief This API searches in the global registry for an existing symbol with the given description. * If the symbol already exists it will be returned, otherwise a new symbol will be created in the registry. * - * @param env: The environment that the API is invoked under. - * @param utf8description: UTF-8 C string representing the text to be used as the description for the symbol. - * @param length: The length of the description string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. - * @param result: A JSVM_Value representing a JavaScript symbol. + * @param env The environment that the API is invoked under. + * @param utf8description UTF-8 C string representing the text to be used as the description for the symbol. + * @param length The length of the description string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. + * @param result A JSVM_Value representing a JavaScript symbol. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -857,12 +857,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SymbolFor(JSVM_Env env, * same underlying binary scalar datatype.It's required that (length * size_of_element) + byte_offset should * be <= the size in bytes of the array passed in. If not, a RangeError exception is raised. * - * @param env: The environment that the API is invoked under. - * @param type: Scalar datatype of the elements within the TypedArray. - * @param length: Number of elements in the TypedArray. - * @param arraybuffer: ArrayBuffer underlying the typed array. - * @param byteOffset: The byte offset within the ArrayBuffer from which to start projecting the TypedArray. - * @param result: A JSVM_Value representing a JavaScript TypedArray + * @param env The environment that the API is invoked under. + * @param type Scalar datatype of the elements within the TypedArray. + * @param length Number of elements in the TypedArray. + * @param arraybuffer ArrayBuffer underlying the typed array. + * @param byteOffset The byte offset within the ArrayBuffer from which to start projecting the TypedArray. + * @param result A JSVM_Value representing a JavaScript TypedArray * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -881,11 +881,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateTypedarray(JSVM_Env env, * less than or equal to the size in bytes of the array passed in. If not, a RangeError exception * is raised. * - * @param env: The environment that the API is invoked under. - * @param length: Number of elements in the DataView. - * @param arraybuffer: ArrayBuffer underlying the DataView. - * @param byteOffset: The byte offset within the ArrayBuffer from which to start projecting the DataView. - * @param result:A JSVM_Value representing a JavaScript DataView. + * @param env The environment that the API is invoked under. + * @param length Number of elements in the DataView. + * @param arraybuffer ArrayBuffer underlying the DataView. + * @param byteOffset The byte offset within the ArrayBuffer from which to start projecting the DataView. + * @param result A JSVM_Value representing a JavaScript DataView. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -899,9 +899,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDataview(JSVM_Env env, /** * @brief This API is used to convert from the C int32_t type to the JavaScript number type. * - * @param env: The environment that the API is invoked under. - * @param value: Integer value to be represented in JavaScript. - * @param result: A JSVM_Value representing a JavaScript number. + * @param env The environment that the API is invoked under. + * @param value Integer value to be represented in JavaScript. + * @param result A JSVM_Value representing a JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -913,9 +913,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateInt32(JSVM_Env env, /** * @brief This API is used to convert from the C uint32_t type to the JavaScript number type. * - * @param env: The environment that the API is invoked under. - * @param value: Unsigned integer value to be represented in JavaScript. - * @param result: A JSVM_Value representing a JavaScript number. + * @param env The environment that the API is invoked under. + * @param value Unsigned integer value to be represented in JavaScript. + * @param result A JSVM_Value representing a JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -927,9 +927,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateUint32(JSVM_Env env, /** * @brief This API is used to convert from the C int64_t type to the JavaScript number type. * - * @param env: The environment that the API is invoked under. - * @param value: Integer value to be represented in JavaScript. - * @param result: A JSVM_Value representing a JavaScript number. + * @param env The environment that the API is invoked under. + * @param value Integer value to be represented in JavaScript. + * @param result A JSVM_Value representing a JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -941,9 +941,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateInt64(JSVM_Env env, /** * @brief This API is used to convert from the C double type to the JavaScript number type. * - * @param env: The environment that the API is invoked under. - * @param value: Double-precision value to be represented in JavaScript. - * @param result: A JSVM_Value representing a JavaScript number. + * @param env The environment that the API is invoked under. + * @param value Double-precision value to be represented in JavaScript. + * @param result A JSVM_Value representing a JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -955,9 +955,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDouble(JSVM_Env env, /** * @brief This API converts the C int64_t type to the JavaScript BigInt type. * - * @param env: The environment that the API is invoked under. - * @param value: Integer value to be represented in JavaScript. - * @param result: A JSVM_Value representing a JavaScript BigInt. + * @param env The environment that the API is invoked under. + * @param value Integer value to be represented in JavaScript. + * @param result A JSVM_Value representing a JavaScript BigInt. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -969,9 +969,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintInt64(JSVM_Env env, /** * @brief This API converts the C uint64_t type to the JavaScript BigInt type. * - * @param env: The environment that the API is invoked under. - * @param value: Unsigned integer value to be represented in JavaScript. - * @param result: A JSVM_Value representing a JavaScript BigInt. + * @param env The environment that the API is invoked under. + * @param value Unsigned integer value to be represented in JavaScript. + * @param result A JSVM_Value representing a JavaScript BigInt. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -982,13 +982,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintUint64(JSVM_Env env, /** * @brief This API converts an array of unsigned 64-bit words into a single BigInt value. - * The resulting BigInt is calculated as: (–1)sign_bit (words[0] × (264)0 + words[1] × (264)1 + …) + * The resulting BigInt is calculated as (–1)sign_bit (words[0] × (264)0 + words[1] × (264)1 + …) * - * @param env: The environment that the API is invoked under. - * @param signBit: Determines if the resulting BigInt will be positive or negative. - * @param wordCount: The length of the words array. - * @param words: An array of uint64_t little-endian 64-bit words. - * @param result: A JSVM_Value representing a JavaScript BigInt. + * @param env The environment that the API is invoked under. + * @param signBit Determines if the resulting BigInt will be positive or negative. + * @param wordCount The length of the words array. + * @param words An array of uint64_t little-endian 64-bit words. + * @param result A JSVM_Value representing a JavaScript BigInt. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1003,10 +1003,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintWords(JSVM_Env env, * @brief This API creates a JavaScript string value from an ISO-8859-1-encoded C * string. The native string is copied. * - * @param env: The environment that the API is invoked under. - * @param str: Character buffer representing an ISO-8859-1-encoded string. - * @param length: The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. - * @param result: A JSVM_Value representing a JavaScript string. + * @param env The environment that the API is invoked under. + * @param str Character buffer representing an ISO-8859-1-encoded string. + * @param length The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. + * @param result A JSVM_Value representing a JavaScript string. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1020,11 +1020,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringLatin1(JSVM_Env env, * @brief This API creates a JavaScript string value from a UTF16-LE-encoded C * string. The native string is copied. * - * @param env: The environment that the API is invoked under. - * @param str: Character buffer representing a UTF16-LE-encoded string. - * @param length: The length of the string in two-byte code units, or JSVM_AUTO_LENGTH + * @param env The environment that the API is invoked under. + * @param str Character buffer representing a UTF16-LE-encoded string. + * @param length The length of the string in two-byte code units, or JSVM_AUTO_LENGTH * if it is null-terminated. - * @param result: A JSVM_Value representing a JavaScript string. + * @param result A JSVM_Value representing a JavaScript string. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1038,10 +1038,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringUtf16(JSVM_Env env, * @brief This API creates a JavaScript string value from a UTF8-encoded C * string. The native string is copied. * - * @param env: The environment that the API is invoked under. - * @param str: Character buffer representing a UTF8-encoded string. - * @param length: The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. - * @param result: A JSVM_Value representing a JavaScript string. + * @param env The environment that the API is invoked under. + * @param str Character buffer representing a UTF8-encoded string. + * @param length The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. + * @param result A JSVM_Value representing a JavaScript string. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1054,9 +1054,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringUtf8(JSVM_Env env, /** * @brief This API returns the length of an array. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing the JavaScript Array whose length is being queried. - * @param result: uint32 representing length of the array. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing the JavaScript Array whose length is being queried. + * @param result uint32 representing length of the array. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1068,11 +1068,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetArrayLength(JSVM_Env env, /** * @brief This API is used to retrieve the underlying data buffer of an ArrayBuffer and its length. * - * @param env: The environment that the API is invoked under. - * @param arraybuffer: JSVM_Value representing the ArrayBuffer being queried. - * @param data: The underlying data buffer of the ArrayBuffer. If byte_length is 0, this may be NULL + * @param env The environment that the API is invoked under. + * @param arraybuffer JSVM_Value representing the ArrayBuffer being queried. + * @param data The underlying data buffer of the ArrayBuffer. If byte_length is 0, this may be NULL * or any other pointer value. - * @param byteLength: Length in bytes of the underlying data buffer. + * @param byteLength Length in bytes of the underlying data buffer. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1085,10 +1085,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetArraybufferInfo(JSVM_Env env, /** * @brief This API returns the length of an array. * - * @param env: The environment that the API is invoked under. - * @param object: JSVM_Value representing JavaScript Object whose prototype to return. This returns + * @param env The environment that the API is invoked under. + * @param object JSVM_Value representing JavaScript Object whose prototype to return. This returns * the equivalent of Object.getPrototypeOf (which is not the same as the function's prototype property). - * @param result: JSVM_Value representing prototype of the given object. + * @param result JSVM_Value representing prototype of the given object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1100,15 +1100,15 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetPrototype(JSVM_Env env, /** * @brief This API returns various properties of a typed array. * - * @param env: The environment that the API is invoked under. - * @param typedarray: JSVM_Value representing the TypedArray whose properties to query. - * @param type: Scalar datatype of the elements within the TypedArray. - * @param length: The number of elements in the TypedArray. - * @param data: The data buffer underlying the TypedArray adjusted by the byte_offset value so that it + * @param env The environment that the API is invoked under. + * @param typedarray JSVM_Value representing the TypedArray whose properties to query. + * @param type Scalar datatype of the elements within the TypedArray. + * @param length The number of elements in the TypedArray. + * @param data The data buffer underlying the TypedArray adjusted by the byte_offset value so that it * points to the first element in the TypedArray. If the length of the array is 0, this may be NULL or * any other pointer value. - * @param arraybuffer: The ArrayBuffer underlying the TypedArray. - * @param byteOffset: The byte offset within the underlying native array at which the first element of + * @param arraybuffer The ArrayBuffer underlying the TypedArray. + * @param byteOffset The byte offset within the underlying native array at which the first element of * the arrays is located. The value for the data parameter has already been adjusted so that data points * to the first element in the array. Therefore, the first byte of the native array would be at data - byte_offset. * @return Returns JSVM funtions result code. @@ -1127,13 +1127,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetTypedarrayInfo(JSVM_Env env, * @brief Any of the out parameters may be NULL if that property is unneeded. * This API returns various properties of a DataView. * - * @param env: The environment that the API is invoked under. - * @param dataview: JSVM_Value representing the DataView whose properties to query. - * @param bytelength: Number of bytes in the DataView. - * @param data: The data buffer underlying the DataView. + * @param env The environment that the API is invoked under. + * @param dataview JSVM_Value representing the DataView whose properties to query. + * @param bytelength Number of bytes in the DataView. + * @param data The data buffer underlying the DataView. * If byte_length is 0, this may be NULL or any other pointer value. - * @param arraybuffer: ArrayBuffer underlying the DataView. - * @param byteOffset: The byte offset within the data buffer from which to start projecting the DataView. + * @param arraybuffer ArrayBuffer underlying the DataView. + * @param byteOffset The byte offset within the data buffer from which to start projecting the DataView. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1150,9 +1150,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetDataviewInfo(JSVM_Env env, * passed in it returns JSVM_date_expected.This API returns the C double * primitive of time value for the given JavaScript Date. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing a JavaScript Date. - * @param result: Time value as a double represented as milliseconds + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing a JavaScript Date. + * @param result Time value as a double represented as milliseconds * since midnight at the beginning of 01 January, 1970 UTC. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -1166,9 +1166,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetDateValue(JSVM_Env env, /** * @brief This API returns the C boolean primitive equivalent of the given JavaScript Boolean. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript Boolean. - * @param result: C boolean primitive equivalent of the given JavaScript Boolean. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript Boolean. + * @param result C boolean primitive equivalent of the given JavaScript Boolean. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_BOOLEAN_EXPECTED }If a non-boolean JSVM_Value is passed in it.\n @@ -1181,9 +1181,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBool(JSVM_Env env, /** * @brief This API returns the C double primitive equivalent of the given JavaScript number. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript number. - * @param result: C double primitive equivalent of the given JavaScript number. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript number. + * @param result C double primitive equivalent of the given JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n @@ -1197,10 +1197,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueDouble(JSVM_Env env, * @brief This API returns the C int64_t primitive equivalent of the given JavaScript BigInt. * If needed it will truncate the value, setting lossless to false. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript BigInt. - * @param result: C int64_t primitive equivalent of the given JavaScript BigInt. - * @param lossless: Indicates whether the BigInt value was converted losslessly. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript BigInt. + * @param result C int64_t primitive equivalent of the given JavaScript BigInt. + * @param lossless Indicates whether the BigInt value was converted losslessly. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_BIGINT_EXPECTED } If a non-BigInt is passed in it.\n @@ -1215,10 +1215,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintInt64(JSVM_Env env, * @brief This API returns the C uint64_t primitive equivalent of the given JavaScript BigInt. * If needed it will truncate the value, setting lossless to false. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript BigInt. - * @param result: C uint64_t primitive equivalent of the given JavaScript BigInt. - * @param lossless: Indicates whether the BigInt value was converted losslessly. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript BigInt. + * @param result C uint64_t primitive equivalent of the given JavaScript BigInt. + * @param lossless Indicates whether the BigInt value was converted losslessly. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_BIGINT_EXPECTED } If a non-BigInt is passed in it.\n @@ -1233,12 +1233,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintUint64(JSVM_Env env, * @brief This API converts a single BigInt value into a sign bit, 64-bit little-endian array, and the number * of elements in the array. signBit and words may be both set to NULL, in order to get only wordCount. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript BigInt. - * @param signBit: Integer representing if the JavaScript BigInt is positive or negative. - * @param wordCount: Must be initialized to the length of the words array. Upon return, it will be set to + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript BigInt. + * @param signBit Integer representing if the JavaScript BigInt is positive or negative. + * @param wordCount Must be initialized to the length of the words array. Upon return, it will be set to * the actual number of words that would be needed to store this BigInt. - * @param words: Pointer to a pre-allocated 64-bit word array. + * @param words Pointer to a pre-allocated 64-bit word array. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1252,9 +1252,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintWords(JSVM_Env env, /** * @brief This API retrieves the external data pointer that was previously passed to OH_JSVM_CreateExternal(). * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript external value. - * @param result: Pointer to the data wrapped by the JavaScript external value. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript external value. + * @param result Pointer to the data wrapped by the JavaScript external value. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_INVALID_ARG } If a non-external JSVM_Value is passed in it.\n @@ -1267,9 +1267,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueExternal(JSVM_Env env, /** * @brief This API returns the C int32 primitive equivalent of the given JavaScript number. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript number. - * @param result: C int32 primitive equivalent of the given JavaScript number. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript number. + * @param result C int32 primitive equivalent of the given JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n @@ -1282,9 +1282,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueInt32(JSVM_Env env, /** * @brief This API returns the C int64 primitive equivalent of the given JavaScript number. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript number. - * @param result: C int64 primitive equivalent of the given JavaScript number. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript number. + * @param result C int64 primitive equivalent of the given JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n @@ -1297,13 +1297,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueInt64(JSVM_Env env, /** * @brief This API returns the ISO-8859-1-encoded string corresponding the value passed in. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript string. - * @param buf: Buffer to write the ISO-8859-1-encoded string into. If NULL is passed in, the + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript string. + * @param buf Buffer to write the ISO-8859-1-encoded string into. If NULL is passed in, the * length of the string in bytes and excluding the null terminator is returned in result. - * @param bufsize: Size of the destination buffer. When this value is insufficient, the returned string + * @param bufsize Size of the destination buffer. When this value is insufficient, the returned string * is truncated and null-terminated. - * @param result: Number of bytes copied into the buffer, excluding the null terminator. + * @param result Number of bytes copied into the buffer, excluding the null terminator. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n @@ -1318,13 +1318,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringLatin1(JSVM_Env env, /** * @brief This API returns the UTF8-encoded string corresponding the value passed in. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript string. - * @param buf: Buffer to write the UTF8-encoded string into. If NULL is passed in, the length + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript string. + * @param buf Buffer to write the UTF8-encoded string into. If NULL is passed in, the length * of the string in bytes and excluding the null terminator is returned in result. - * @param bufsize: Size of the destination buffer. When this value is insufficient, the returned + * @param bufsize Size of the destination buffer. When this value is insufficient, the returned * string is truncated and null-terminated. - * @param result: Number of bytes copied into the buffer, excluding the null terminator. + * @param result Number of bytes copied into the buffer, excluding the null terminator. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n @@ -1339,13 +1339,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf8(JSVM_Env env, /** * @brief This API returns the UTF16-encoded string corresponding the value passed in. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript string. - * @param buf: Buffer to write the UTF16-LE-encoded string into. If NULL is passed in, + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript string. + * @param buf Buffer to write the UTF16-LE-encoded string into. If NULL is passed in, * the length of the string in 2-byte code units and excluding the null terminator is returned. - * @param bufsize: Size of the destination buffer. When this value is insufficient, + * @param bufsize Size of the destination buffer. When this value is insufficient, * the returned string is truncated and null-terminated. - * @param result: Number of 2-byte code units copied into the buffer, excluding the null terminator. + * @param result Number of 2-byte code units copied into the buffer, excluding the null terminator. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n @@ -1360,9 +1360,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf16(JSVM_Env env, /** * @brief This API returns the C primitive equivalent of the given JSVM_Value as a uint32_t. * - * @param env: The environment that the API is invoked under. - * @param value: JSVM_Value representing JavaScript number. - * @param result: C primitive equivalent of the given JSVM_Value as a uint32_t. + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript number. + * @param result C primitive equivalent of the given JSVM_Value as a uint32_t. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in it.\n @@ -1375,9 +1375,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueUint32(JSVM_Env env, /** * @brief This API is used to return the JavaScript singleton object that is used to represent the given boolean value. * - * @param env: The environment that the API is invoked under. - * @param value: The value of the boolean to retrieve. - * @param result: JSVM_Value representing JavaScript Boolean singleton to retrieve. + * @param env The environment that the API is invoked under. + * @param value The value of the boolean to retrieve. + * @param result JSVM_Value representing JavaScript Boolean singleton to retrieve. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1389,8 +1389,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetBoolean(JSVM_Env env, /** * @brief This API returns the global object. * - * @param env: The environment that the API is invoked under. - * @param result: JSVM_Value representing JavaScript global object. + * @param env The environment that the API is invoked under. + * @param result JSVM_Value representing JavaScript global object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1401,8 +1401,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetGlobal(JSVM_Env env, /** * @brief This API returns the null object. * - * @param env: The environment that the API is invoked under. - * @param result: JSVM_Value representing JavaScript null object. + * @param env The environment that the API is invoked under. + * @param result JSVM_Value representing JavaScript null object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1413,8 +1413,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetNull(JSVM_Env env, /** * @brief This API returns the Undefined object. * - * @param env: The environment that the API is invoked under. - * @param result: JSVM_Value representing JavaScript Undefined value. + * @param env The environment that the API is invoked under. + * @param result JSVM_Value representing JavaScript Undefined value. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1425,9 +1425,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetUndefined(JSVM_Env env, /** * @brief This API implements the abstract operation ToBoolean() * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to coerce. - * @param result: JSVM_Value representing the coerced JavaScript Boolean. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to coerce. + * @param result JSVM_Value representing the coerced JavaScript Boolean. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1440,9 +1440,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToBool(JSVM_Env env, * @brief This API implements the abstract operation ToNumber() as defined. This * function potentially runs JS code if the passed-in value is an object. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to coerce. - * @param result: JSVM_Value representing the coerced JavaScript number. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to coerce. + * @param result JSVM_Value representing the coerced JavaScript number. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1454,9 +1454,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToNumber(JSVM_Env env, /** * @brief This API implements the abstract operation ToObject(). * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to coerce. - * @param result: JSVM_Value representing the coerced JavaScript Object. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to coerce. + * @param result JSVM_Value representing the coerced JavaScript Object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1469,9 +1469,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToObject(JSVM_Env env, * @brief This API implements the abstract operation ToString().This * function potentially runs JS code if the passed-in value is an object. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to coerce. - * @param result: JSVM_Value representing the coerced JavaScript string. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to coerce. + * @param result JSVM_Value representing the coerced JavaScript string. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1487,9 +1487,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToString(JSVM_Env env, * ECMAScript typeof would detect object.If value has a type that is invalid, * an error is returned. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value whose type to query. - * @param result: The type of the JavaScript value. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value whose type to query. + * @param result The type of the JavaScript value. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1501,11 +1501,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Typeof(JSVM_Env env, /** * @brief This API represents invoking the instanceof Operator on the object. * - * @param env: The environment that the API is invoked under. - * @param object: The JavaScript value to check. - * @param constructor: The JavaScript function object of the constructor function + * @param env The environment that the API is invoked under. + * @param object The JavaScript value to check. + * @param constructor The JavaScript function object of the constructor function * to check against. - * @param result: Boolean that is set to true if object instanceof constructor is true. + * @param result Boolean that is set to true if object instanceof constructor is true. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1518,9 +1518,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Instanceof(JSVM_Env env, /** * @brief This API represents invoking the IsArray operation on the object * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param result: Whether the given object is an array. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given object is an array. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1532,9 +1532,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsArray(JSVM_Env env, /** * @brief This API checks if the Object passed in is an array buffer. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param result: Whether the given object is an ArrayBuffer. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given object is an ArrayBuffer. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1560,9 +1560,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsDate(JSVM_Env env, /** * @brief This API checks if the Object passed in is a typed array. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param result: Whether the given JSVM_Value represents a TypedArray. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given JSVM_Value represents a TypedArray. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1574,9 +1574,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsTypedarray(JSVM_Env env, /** * @brief This API checks if the Object passed in is a DataView. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param result: Whether the given JSVM_Value represents a DataView. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given JSVM_Value represents a DataView. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1588,10 +1588,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsDataview(JSVM_Env env, /** * @brief This API represents the invocation of the Strict Equality algorithm. * - * @param env: The environment that the API is invoked under. - * @param lhs: The JavaScript value to check. - * @param rhs: The JavaScript value to check against. - * @param result: Whether the two JSVM_Value objects are equal. + * @param env The environment that the API is invoked under. + * @param lhs The JavaScript value to check. + * @param rhs The JavaScript value to check against. + * @param result Whether the two JSVM_Value objects are equal. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1605,10 +1605,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_StrictEquals(JSVM_Env env, * @brief This API represents the invocation of the Relaxed Equality algorithm. * Returns true as long as the values are equal, regardless of type. * - * @param env: The environment that the API is invoked under. - * @param lhs: The JavaScript value to check. - * @param rhs: The JavaScript value to check against. - * @param result: Whether the two JSVM_Value objects are relaxed equal. + * @param env The environment that the API is invoked under. + * @param lhs The JavaScript value to check. + * @param rhs The JavaScript value to check against. + * @param result Whether the two JSVM_Value objects are relaxed equal. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -1621,8 +1621,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Equals(JSVM_Env env, /** * @brief This API represents the invocation of the ArrayBuffer detach operation. * - * @param env: The environment that the API is invoked under. - * @param arraybuffer: The JavaScript ArrayBuffer to be detached. + * @param env The environment that the API is invoked under. + * @param arraybuffer The JavaScript ArrayBuffer to be detached. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_DETACHABLE_ARRAYBUFFER_EXPECTED } If a non-detachable ArrayBuffer is passed in it.\n @@ -1634,9 +1634,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DetachArraybuffer(JSVM_Env env, /** * @brief This API represents the invocation of the ArrayBuffer IsDetachedBuffer operation. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript ArrayBuffer to be checked. - * @param result: Whether the arraybuffer is detached. + * @param env The environment that the API is invoked under. + * @param value The JavaScript ArrayBuffer to be checked. + * @param result Whether the arraybuffer is detached. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1649,9 +1649,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsDetachedArraybuffer(JSVM_Env env, * @brief This API returns the names of the enumerable properties of object as an array of * strings. The properties of object whose key is a symbol will not be included. * - * @param env: The environment that the API is invoked under. - * @param object: The object from which to retrieve the properties. - * @param result: A JSVM_Value representing an array of JavaScript values that represent + * @param env The environment that the API is invoked under. + * @param object The object from which to retrieve the properties. + * @param result A JSVM_Value representing an array of JavaScript values that represent * the property names of the object. The API can be used to iterate over result using * OH_JSVM_GetArrayLength and OH_JSVM_GetElement. * @return Returns JSVM funtions result code. @@ -1666,12 +1666,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetPropertyNames(JSVM_Env env, * @brief This API returns an array containing the names of the available properties * of this object. * - * @param env: The environment that the API is invoked under. - * @param object: The object from which to retrieve the properties. - * @param keyMode: Whether to retrieve prototype properties as well. - * @param keyFilter: Which properties to retrieve (enumerable/readable/writable). - * @param keyConversion: Whether to convert numbered property keys to strings. - * @param result: result: A JSVM_Value representing an array of JavaScript values + * @param env The environment that the API is invoked under. + * @param object The object from which to retrieve the properties. + * @param keyMode Whether to retrieve prototype properties as well. + * @param keyFilter Which properties to retrieve (enumerable/readable/writable). + * @param keyConversion Whether to convert numbered property keys to strings. + * @param result A JSVM_Value representing an array of JavaScript values * that represent the property names of the object. OH_JSVM_GetArrayLength and * OH_JSVM_GetElement can be used to iterate over result. * @return Returns JSVM funtions result code. @@ -1688,10 +1688,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetAllPropertyNames(JSVM_Env env, /** * @brief This API set a property on the Object passed in. * - * @param env: The environment that the API is invoked under. - * @param object: The object on which to set the property. - * @param key: The name of the property to set. - * @param value: The property value. + * @param env The environment that the API is invoked under. + * @param object The object on which to set the property. + * @param key The name of the property to set. + * @param value The property value. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1704,10 +1704,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetProperty(JSVM_Env env, /** * @brief This API gets the requested property from the Object passed in. * - * @param env: The environment that the API is invoked under. - * @param object: The object from which to retrieve the property. - * @param key: The name of the property to retrieve. - * @param result: The value of the property. + * @param env The environment that the API is invoked under. + * @param object The object from which to retrieve the property. + * @param key The name of the property to retrieve. + * @param result The value of the property. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1720,10 +1720,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetProperty(JSVM_Env env, /** * @brief This API checks if the Object passed in has the named property. * - * @param env: The environment that the API is invoked under. - * @param object: The object to query. - * @param key: The name of the property whose existence to check. - * @param result: Whether the property exists on the object or not. + * @param env The environment that the API is invoked under. + * @param object The object to query. + * @param key The name of the property whose existence to check. + * @param result Whether the property exists on the object or not. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1736,10 +1736,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasProperty(JSVM_Env env, /** * @brief This API attempts to delete the key own property from object. * - * @param env: The environment that the API is invoked under. - * @param object: The object to query. - * @param key: The name of the property to delete. - * @param result: Whether the property deletion succeeded or not. result + * @param env The environment that the API is invoked under. + * @param object The object to query. + * @param key The name of the property to delete. + * @param result Whether the property deletion succeeded or not. result * can optionally be ignored by passing NULL. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -1755,10 +1755,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DeleteProperty(JSVM_Env env, * key must be a string or a symbol, or an error will be thrown. JSVM-API will * not perform any conversion between data types. * - * @param env: The environment that the API is invoked under. - * @param object: The object to query. - * @param key: The name of the own property whose existence to check. - * @param result: Whether the own property exists on the object or not. + * @param env The environment that the API is invoked under. + * @param object The object to query. + * @param key The name of the own property whose existence to check. + * @param result Whether the own property exists on the object or not. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1770,12 +1770,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasOwnProperty(JSVM_Env env, /** * @brief This method is equivalent to calling OH_JSVM_SetProperty with - * a JSVM_Value created from the string passed in as utf8Name. + * a JSVM_Value created from the string passed in as utf8name. * - * @param env: The environment that the API is invoked under. - * @param object: The object on which to set the property. - * @param utf8Name: The name of the property to set. - * @param value: The property value. + * @param env The environment that the API is invoked under. + * @param object The object on which to set the property. + * @param utf8name The name of the property to set. + * @param value The property value. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1787,12 +1787,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetNamedProperty(JSVM_Env env, /** * @brief This method is equivalent to calling OH_JSVM_SetProperty with - * a JSVM_Value created from the string passed in as utf8Name. + * a JSVM_Value created from the string passed in as utf8name. * - * @param env: The environment that the API is invoked under. - * @param object: The object from which to retrieve the property. - * @param utf8Name: The name of the property to get. - * @param result: The value of the property. + * @param env The environment that the API is invoked under. + * @param object The object from which to retrieve the property. + * @param utf8name The name of the property to get. + * @param result The value of the property. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1804,12 +1804,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetNamedProperty(JSVM_Env env, /** * @brief This method is equivalent to calling OH_JSVM_SetProperty with - * a JSVM_Value created from the string passed in as utf8Name. + * a JSVM_Value created from the string passed in as utf8name. * - * @param env: The environment that the API is invoked under. - * @param object: The object to query. - * @param utf8Name: The name of the property whose existence to check. - * @param result: Whether the property exists on the object or not. + * @param env The environment that the API is invoked under. + * @param object The object to query. + * @param utf8name The name of the property whose existence to check. + * @param result Whether the property exists on the object or not. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1822,10 +1822,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasNamedProperty(JSVM_Env env, /** * @brief This API sets an element on the Object passed in. * - * @param env: The environment that the API is invoked under. - * @param object: The object from which to set the properties. - * @param index: The index of the property to set. - * @param value: The property value. + * @param env The environment that the API is invoked under. + * @param object The object from which to set the properties. + * @param index The index of the property to set. + * @param value The property value. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1838,10 +1838,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetElement(JSVM_Env env, /** * @brief This API gets the element at the requested index. * - * @param env: The environment that the API is invoked under. - * @param object: The object from which to retrieve the property. - * @param index: The index of the property to get. - * @param result: The value of the property. + * @param env The environment that the API is invoked under. + * @param object The object from which to retrieve the property. + * @param index The index of the property to get. + * @param result The value of the property. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1855,10 +1855,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetElement(JSVM_Env env, * @brief This API returns if the Object passed in has an element * at the requested index. * - * @param env: The environment that the API is invoked under. - * @param object: The object to query. - * @param index: The index of the property whose existence to check. - * @param result: Whether the property exists on the object or not. + * @param env The environment that the API is invoked under. + * @param object The object to query. + * @param index The index of the property whose existence to check. + * @param result Whether the property exists on the object or not. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1871,10 +1871,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasElement(JSVM_Env env, /** * @brief This API attempts to delete the specified index from object. * - * @param env: The environment that the API is invoked under. - * @param object: The object to query. - * @param index: The index of the property to delete. - * @param result: Whether the element deletion succeeded or not. result + * @param env The environment that the API is invoked under. + * @param object The object to query. + * @param index The index of the property to delete. + * @param result Whether the element deletion succeeded or not. result * can optionally be ignored by passing NULL. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -1891,10 +1891,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DeleteElement(JSVM_Env env, * Given an array of such property descriptors, this API will set the properties * on the object one at a time, as defined by DefineOwnProperty(). * - * @param env: The environment that the API is invoked under. - * @param object: The object from which to retrieve the properties. - * @param propertyCount: The number of elements in the properties array. - * @param properties: The array of property descriptors. + * @param env The environment that the API is invoked under. + * @param object The object from which to retrieve the properties. + * @param propertyCount The number of elements in the properties array. + * @param properties The array of property descriptors. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1911,8 +1911,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DefineProperties(JSVM_Env env, * properties, and prevents the values of existing properties from being changed. * It also prevents the object's prototype from being changed. * - * @param env: The environment that the API is invoked under. - * @param object: The object to freeze. + * @param env The environment that the API is invoked under. + * @param object The object to freeze. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1924,8 +1924,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ObjectFreeze(JSVM_Env env, * @brief This method seals a given object. This prevents new properties * from being added to it, as well as marking all existing properties as non-configurable. * - * @param env: The environment that the API is invoked under. - * @param object: The object to seal. + * @param env The environment that the API is invoked under. + * @param object The object to seal. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1938,12 +1938,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ObjectSeal(JSVM_Env env, * a native add-on. This is the primary mechanism of calling back from the * add-on's native code into JavaScript. * - * @param env: The environment that the API is invoked under. - * @param recv: The this value passed to the called function. - * @param func: JSVM_Value representing the JavaScript function to be invoked. - * @param argc: The count of elements in the argv array. - * @param argv: Array of JSVM_values representing JavaScript values passed in as arguments to the function. - * @param result: JSVM_Value representing the JavaScript object returned. + * @param env The environment that the API is invoked under. + * @param recv The this value passed to the called function. + * @param func JSVM_Value representing the JavaScript function to be invoked. + * @param argc The count of elements in the argv array. + * @param argv Array of JSVM_values representing JavaScript values passed in as arguments to the function. + * @param result JSVM_Value representing the JavaScript object returned. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -1963,14 +1963,14 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CallFunction(JSVM_Env env, * object that is visible to JavaScript, in order for the function to be accessible * from script. * - * @param env: The environment that the API is invoked under. - * @param utf8Name: Optional name of the function encoded as UTF8. This is visible + * @param env The environment that the API is invoked under. + * @param utf8name Optional name of the function encoded as UTF8. This is visible * within JavaScript as the new function object's name property. - * @param length: The length of the utf8name in bytes, or JSVM_AUTO_LENGTH if it + * @param length The length of the utf8name in bytes, or JSVM_AUTO_LENGTH if it * is null-terminated. - * @param cb: The native function which should be called when this function + * @param cb The native function which should be called when this function * object is invoked and data. JSVM_Callback provides more details. - * @param result: JSVM_Value representing the JavaScript function object for the newly + * @param result JSVM_Value representing the JavaScript function object for the newly * created function. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -1986,18 +1986,18 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateFunction(JSVM_Env env, * @brief This method is used within a callback function to retrieve details about * the call like the arguments and the this pointer from a given callback info. * - * @param env: The environment that the API is invoked under. - * @param cbinfo: The callback info passed into the callback function. - * @param argc: Specifies the length of the provided argv array and receives the + * @param env The environment that the API is invoked under. + * @param cbinfo The callback info passed into the callback function. + * @param argc Specifies the length of the provided argv array and receives the * actual count of arguments. argc can optionally be ignored by passing NULL. - * @param argv: C array of JSVM_values to which the arguments will be copied. If + * @param argv C array of JSVM_values to which the arguments will be copied. If * there are more arguments than the provided count, only the requested number of * arguments are copied. If there are fewer arguments provided than claimed, the * rest of argv is filled with JSVM_Value values that represent undefined. argv * can optionally be ignored by passing NULL. - * @param thisArg: Receives the JavaScript this argument for the call. thisArg + * @param thisArg Receives the JavaScript this argument for the call. thisArg * can optionally be ignored by passing NULL. - * @param data: Receives the data pointer for the callback. data can optionally + * @param data Receives the data pointer for the callback. data can optionally * be ignored by passing NULL. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -2014,9 +2014,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetCbInfo(JSVM_Env env, * @brief This API returns the new.target of the constructor call. If the * current callback is not a constructor call, the result is NULL. * - * @param env: The environment that the API is invoked under. - * @param cbinfo: The callback info passed into the callback function. - * @param result: The new.target of the constructor call. + * @param env The environment that the API is invoked under. + * @param cbinfo The callback info passed into the callback function. + * @param result The new.target of the constructor call. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2029,12 +2029,12 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetNewTarget(JSVM_Env env, * @brief his method is used to instantiate a new JavaScript value using * a given JSVM_Value that represents the constructor for the object. * - * @param env: The environment that the API is invoked under. - * @param constructor: JSVM_Value representing the JavaScript function to be invoked as a constructor. - * @param argc: The count of elements in the argv array. - * @param argv: Array of JavaScript values as JSVM_Value representing the arguments to + * @param env The environment that the API is invoked under. + * @param constructor JSVM_Value representing the JavaScript function to be invoked as a constructor. + * @param argc The count of elements in the argv array. + * @param argv Array of JavaScript values as JSVM_Value representing the arguments to * the constructor. If argc is zero this parameter may be omitted by passing in NULL. - * @param result: JSVM_Value representing the JavaScript object returned, which + * @param result JSVM_Value representing the JavaScript object returned, which * in this case is the constructed object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -2051,20 +2051,20 @@ JSVM_EXTERN JSVM_Status OH_JSVM_NewInstance(JSVM_Env env, * should be a static method on the class that calls the actual class constructor, then * wraps the new C++ instance in a JavaScript object, and returns the wrapper object. * - * @param env: The environment that the API is invoked under. - * @param utf8name: Name of the JavaScript constructor function. For clarity, it is + * @param env The environment that the API is invoked under. + * @param utf8name Name of the JavaScript constructor function. For clarity, it is * recommended to use the C++ class name when wrapping a C++ class. - * @param length: The length of the utf8name in bytes, or JSVM_AUTO_LENGTH if it + * @param length The length of the utf8name in bytes, or JSVM_AUTO_LENGTH if it * is null-terminated. - * @param constructor: Struct include callback function that handles constructing instances of the class. + * @param constructor Struct include callback function that handles constructing instances of the class. * When wrapping a C++ class, this method must be a static member with the JSVM_Callback.callback * signature. A C++ class constructor cannot be used. * Include Optional data to be passed to the constructor callback as the data * property of the callback info. JSVM_Callback provides more details. - * @param propertyCount: Number of items in the properties array argument. - * @param properties: Array of property descriptors describing static and instance data + * @param propertyCount Number of items in the properties array argument. + * @param properties Array of property descriptors describing static and instance data * properties, accessors, and methods on the class See JSVM_PropertyDescriptor. - * @param result: A JSVM_Value representing the constructor function for the class. + * @param result A JSVM_Value representing the constructor function for the class. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2081,14 +2081,14 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DefineClass(JSVM_Env env, * @brief Wraps a native instance in a JavaScript object. The native instance can * be retrieved later using OH_JSVM_Unwrap(). * - * @param env: The environment that the API is invoked under. - * @param jsObject: The JavaScript object that will be the wrapper for the native object. - * @param nativeObject: The native instance that will be wrapped in the JavaScript object. - * @param finalizeCb: Optional native callback that can be used to free the native instance + * @param env The environment that the API is invoked under. + * @param jsObject The JavaScript object that will be the wrapper for the native object. + * @param nativeObject The native instance that will be wrapped in the JavaScript object. + * @param finalizeCb Optional native callback that can be used to free the native instance * when the JavaScript object has been garbage-collected. - * @param finalizeHint: Optional contextual hint that is passed to the finalize callback. + * @param finalizeHint Optional contextual hint that is passed to the finalize callback. * properties, accessors, and methods on the class See JSVM_PropertyDescriptor. - * @param result: Optional reference to the wrapped object. + * @param result Optional reference to the wrapped object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2106,9 +2106,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Wrap(JSVM_Env env, * argument to the callback is the wrapper object; the wrapped C++ instance that is the target of * the call can be obtained then by calling OH_JSVM_Unwrap() on the wrapper object. * - * @param env: The environment that the API is invoked under. - * @param jsObject: The object associated with the native instance. - * @param result: Pointer to the wrapped native instance. + * @param env The environment that the API is invoked under. + * @param jsObject The object associated with the native instance. + * @param result Pointer to the wrapped native instance. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2122,9 +2122,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Unwrap(JSVM_Env env, * using OH_JSVM_Wrap() and removes the wrapping. If a finalize callback was associated with the wrapping, * it will no longer be called when the JavaScript object becomes garbage-collected. * - * @param env: The environment that the API is invoked under. - * @param jsObject: The object associated with the native instance. - * @param result: Pointer to the wrapped native instance. + * @param env The environment that the API is invoked under. + * @param jsObject The object associated with the native instance. + * @param result Pointer to the wrapped native instance. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2139,9 +2139,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_RemoveWrap(JSVM_Env env, * object with one owned by the addon to ensure that the object has the right type. * If the object already has an associated type tag, this API will return JSVM_INVALID_ARG. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript object or external to be marked. - * @param typeTag: The tag with which the object is to be marked. + * @param env The environment that the API is invoked under. + * @param value The JavaScript object or external to be marked. + * @param typeTag The tag with which the object is to be marked. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * {@link JSVM_INVALID_ARG } If the object already has an associated type tag.\n @@ -2156,10 +2156,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_TypeTagObject(JSVM_Env env, * If no tag is found on js object or, if a tag is found but it does not match typeTag, * then result is set to false. If a tag is found and it matches typeTag, then result is set to true. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript object or external whose type tag to examine. - * @param typeTag: The tag with which to compare any tag found on the object. - * @param result: Whether the type tag given matched the type tag on the object. false is also returned + * @param env The environment that the API is invoked under. + * @param value The JavaScript object or external whose type tag to examine. + * @param typeTag The tag with which to compare any tag found on the object. + * @param result Whether the type tag given matched the type tag on the object. false is also returned * if no type tag was found on the object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n @@ -2173,13 +2173,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CheckObjectTypeTag(JSVM_Env env, /** * @brief This API can be called multiple times on a single JavaScript object. * - * @param env: The environment that the API is invoked under. - * @param jsObject: The JavaScript object to which the native data will be attached. - * @param finalizeData: Optional data to be passed to finalizeCb. - * @param finalizeCb: Native callback that will be used to free the native data when the + * @param env The environment that the API is invoked under. + * @param jsObject The JavaScript object to which the native data will be attached. + * @param finalizeData Optional data to be passed to finalizeCb. + * @param finalizeCb Native callback that will be used to free the native data when the * JavaScript object has been garbage-collected. JSVM_Finalize provides more details. - * @param finalizeHint: Optional contextual hint that is passed to the finalize callback. - * @param result: Optional reference to the JavaScript object. + * @param finalizeHint Optional contextual hint that is passed to the finalize callback. + * @param result Optional reference to the JavaScript object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2198,8 +2198,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_AddFinalizer(JSVM_Env env, * API functions. In order to allow an addon to use a newer function when running with versions * of JSVM that support it, while providing fallback behavior when running with JSVM * versions that don't support it. - * @param env: The environment that the API is invoked under. - * @param result: The highest version of JSVM-API supported. + * @param env The environment that the API is invoked under. + * @param result The highest version of JSVM-API supported. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2210,7 +2210,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetVersion(JSVM_Env env, /** * @brief Return information of the VM. * - * @param result: The information of the VM. + * @param result The information of the VM. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2224,10 +2224,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetVMInfo(JSVM_VMInfo* result); * externally allocated memory will trigger global garbage collections more often * than it would otherwise. * - * @param env: The environment that the API is invoked under. - * @param changeInBytes: The change in externally allocated memory that is kept + * @param env The environment that the API is invoked under. + * @param changeInBytes The change in externally allocated memory that is kept * alive by JavaScript objects. - * @param result: The adjusted value + * @param result The adjusted value * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2240,8 +2240,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_AdjustExternalMemory(JSVM_Env env, * @brief This function notifies the VM that the system is running low on memory * and optionally triggers a garbage collection. * - * @param env: The environment that the API is invoked under. - * @param level: The memory pressure level set to the current VM. + * @param env The environment that the API is invoked under. + * @param level The memory pressure level set to the current VM. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2252,11 +2252,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_MemoryPressureNotification(JSVM_Env env, /** * @brief This API creates a deferred object and a JavaScript promise. * - * @param env: The environment that the API is invoked under. - * @param deferred: A newly created deferred object which can later be + * @param env The environment that the API is invoked under. + * @param deferred A newly created deferred object which can later be * passed to OH_JSVM_ResolveDeferred() or OH_JSVM_RejectDeferred() to resolve * resp. reject the associated promise. - * @param promise: The JavaScript promise associated with the deferred object. + * @param promise The JavaScript promise associated with the deferred object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2272,9 +2272,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreatePromise(JSVM_Env env, * that the promise must have been created using OH_JSVM_CreatePromise() and the deferred * object returned from that call must have been retained in order to be passed to this API. * - * @param env: The environment that the API is invoked under. - * @param deferred: The deferred object whose associated promise to resolve. - * @param resolution: The value with which to resolve the promise. + * @param env The environment that the API is invoked under. + * @param deferred The deferred object whose associated promise to resolve. + * @param resolution The value with which to resolve the promise. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2290,9 +2290,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ResolveDeferred(JSVM_Env env, * that the promise must have been created using OH_JSVM_CreatePromise() and the deferred * object returned from that call must have been retained in order to be passed to this API. * - * @param env: The environment that the API is invoked under. - * @param deferred: The deferred object whose associated promise to resolve. - * @param rejection: The value with which to reject the promise. + * @param env The environment that the API is invoked under. + * @param deferred The deferred object whose associated promise to resolve. + * @param rejection The value with which to reject the promise. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2303,9 +2303,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_RejectDeferred(JSVM_Env env, /** * @brief This API return indicating whether promise is a native promise object. - * @param env: The environment that the API is invoked under. - * @param value: The value to examine - * @param isPromise: Flag indicating whether promise is a native promise object + * @param env The environment that the API is invoked under. + * @param value The value to examine + * @param isPromise Flag indicating whether promise is a native promise object * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2316,9 +2316,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsPromise(JSVM_Env env, /** * @brief This API parses a JSON string and returns it as value if successful. - * @param env: The environment that the API is invoked under. - * @param jsonString: The string to parse. - * @param result: The parse value if successful. + * @param env The environment that the API is invoked under. + * @param jsonString The string to parse. + * @param result The parse value if successful. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2329,9 +2329,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_JsonParse(JSVM_Env env, /** * @brief This API stringifies the object and returns it as string if successful. - * @param env: The environment that the API is invoked under. - * @param jsonObject: The object to stringify. - * @param result: The string if successfully stringified. + * @param env The environment that the API is invoked under. + * @param jsonObject The object to stringify. + * @param result The string if successfully stringified. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2342,11 +2342,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_JsonStringify(JSVM_Env env, /** * @brief This API create the startup snapshot of the VM. - * @param vm: The environment that the API is invoked under. - * @param contextCount: The object to stringify. - * @param contexts: The array of contexts to add to the snapshot. - * @param blobData: The snapshot data. - * @param blobSize: The size of snapshot data. + * @param vm The environment that the API is invoked under. + * @param contextCount The object to stringify. + * @param contexts The array of contexts to add to the snapshot. + * @param blobData The snapshot data. + * @param blobSize The size of snapshot data. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2360,8 +2360,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateSnapshot(JSVM_VM vm, /** * @brief This function returns a set of statistics data of the heap of the VM. * - * @param vm: The VM whose heap statistics are returned. - * @param result: The heap statistics data. + * @param vm The VM whose heap statistics are returned. + * @param result The heap statistics data. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } in all cases.\n * @since 12 @@ -2372,8 +2372,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetHeapStatistics(JSVM_VM vm, /** * @brief This function creates and starts a CPU profiler. * - * @param vm: The VM to start CPU profiler for. - * @param result: The pointer to the CPU profiler. + * @param vm The VM to start CPU profiler for. + * @param result The pointer to the CPU profiler. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } in all cases.\n * @since 12 @@ -2384,10 +2384,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_StartCpuProfiler(JSVM_VM vm, /** * @brief This function stops the CPU profiler and output to the stream. * - * @param vm: THe VM to start CPU profiler for. - * @param profiler: The CPU profiler to stop. - * @param stream: The output stream callback for receiving the data. - * @param streamData: Optional data to be passed to the stream callback. + * @param vm THe VM to start CPU profiler for. + * @param profiler The CPU profiler to stop. + * @param stream The output stream callback for receiving the data. + * @param streamData Optional data to be passed to the stream callback. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } in all cases.\n * @since 12 @@ -2400,9 +2400,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_StopCpuProfiler(JSVM_VM vm, /** * @brief This funciton takes the current heap snapshot and output to the stream. * - * @param vm: The VM whose heap snapshot is taken. - * @param stream: The output stream callback for receiving the data. - * @param streamData: Optional data to be passed to the stream callback. + * @param vm The VM whose heap snapshot is taken. + * @param stream The output stream callback for receiving the data. + * @param streamData Optional data to be passed to the stream callback. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } in all cases.\n * @since 12 @@ -2414,9 +2414,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_TakeHeapSnapshot(JSVM_VM vm, /** * @brief This functiong activates insepctor on host and port. * - * @param env: The environment that the API is invoked under. - * @param host: The host to listen to for inspector connections. - * @param port: The port to listen to for inspector connections. + * @param env The environment that the API is invoked under. + * @param host The host to listen to for inspector connections. + * @param port The port to listen to for inspector connections. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_PENDING_EXCEPTION } if an exception occurs.\n @@ -2429,7 +2429,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenInspector(JSVM_Env env, /** * @brief This function attempts to close all remaining inspector connections. * - * @param env: The environment that the API is invoked under. + * @param env The environment that the API is invoked under. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_PENDING_EXCEPTION } if an exception occurs.\n @@ -2441,8 +2441,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseInspector(JSVM_Env env); * @brief This function will block until a client (existing or connected later) * has sent Runtime.runIfWaitingForDebugger command. * - * @param env: The environment that the API is invoked under. - * @param breakNextLine: Whether break on the next line of JavaScript code. + * @param env The environment that the API is invoked under. + * @param breakNextLine Whether break on the next line of JavaScript code. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_PENDING_EXCEPTION } if an exception occurs.\n @@ -2455,22 +2455,22 @@ JSVM_EXTERN JSVM_Status OH_JSVM_WaitForDebugger(JSVM_Env env, * @brief Define a JavaScript class with given class name, constructor, properties, callback handlers for * property operations including get, set, delete, enum etc., and call as function callback. * - * @param env: The environment that the API is invoked under. - * @param utf8name: Name of the JavaScript constructor function. For clarity, it is + * @param env The environment that the API is invoked under. + * @param utf8name Name of the JavaScript constructor function. For clarity, it is * recommended to use the C++ class name when wrapping a C++ class. - * @param length: The length of the utf8name in bytes, or JSVM_AUTO_LENGTH if it + * @param length The length of the utf8name in bytes, or JSVM_AUTO_LENGTH if it * is null-terminated. - * @param constructor: Struct include callback function that handles constructing instances of the class. + * @param constructor Struct include callback function that handles constructing instances of the class. * When wrapping a C++ class, this method must be a static member with the JSVM_Callback.callback * signature. A C++ class constructor cannot be used. * Include Optional data to be passed to the constructor callback as the data * property of the callback info. JSVM_Callback provides more details. - * @param propertyCount: Number of items in the properties array argument. - * @param properties: Array of property descriptors describing static and instance data + * @param propertyCount Number of items in the properties array argument. + * @param properties Array of property descriptors describing static and instance data * properties, accessors, and methods on the class See JSVM_PropertyDescriptor. - * @param propertyHandlerCfg: The instance object triggers the corresponding callback function. - * @param callAsFunctionCallback: Calling an instance object as a function will trigger this callback. - * @param result: A JSVM_Value representing the constructor function for the class. + * @param propertyHandlerCfg The instance object triggers the corresponding callback function. + * @param callAsFunctionCallback Calling an instance object as a function will trigger this callback. + * @param result A JSVM_Value representing the constructor function for the class. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -2489,8 +2489,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DefineClassWithPropertyHandler(JSVM_Env env, * @brief Determines whether the current thread holds the lock for the specified environment. * Only threads that hold locks can use the environment. * - * @param env: The environment that the API is invoked under. - * @param isLocked: Flag indicating whether the current thread holds the lock for the specified environment. + * @param env The environment that the API is invoked under. + * @param isLocked Flag indicating whether the current thread holds the lock for the specified environment. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -2501,7 +2501,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsLocked(JSVM_Env env, /** * @brief Acquire the lock for the specified environment. Only threads that hold locks can use the environment. * - * @param env: The environment that the API is invoked under. + * @param env The environment that the API is invoked under. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -2511,7 +2511,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_AcquireLock(JSVM_Env env); /** * @brief Release the lock for the specified environment. Only threads that hold locks can use the environment. * - * @param env: The environment that the API is invoked under. + * @param env The environment that the API is invoked under. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -2544,9 +2544,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_PerformMicrotaskCheckpoint(JSVM_VM vm); /** * @brief This API checks if the value passed in is callable. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isCallable: Whether the given value is callable. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isCallable Whether the given value is callable. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -2559,9 +2559,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsCallable(JSVM_Env env, * @brief This API checks if the value passed in is undefined. * This equals to `value === undefined` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isUndefined: Whether the given value is Undefined. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isUndefined Whether the given value is Undefined. * @return Returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2574,9 +2574,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsUndefined(JSVM_Env env, * @brief This API checks if the value passed in is a null object. * This equals to `value === null` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isNull: Whether the given value is Null. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isNull Whether the given value is Null. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2589,9 +2589,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsNull(JSVM_Env env, * @brief This API checks if the value passed in is either a null or an undefined object. * This is equivalent to `value == null` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isNullOrUndefined: Whether the given value is Null or Undefined. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isNullOrUndefined Whether the given value is Null or Undefined. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2604,9 +2604,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsNullOrUndefined(JSVM_Env env, * @brief This API checks if the value passed in is a boolean. * This equals to `typeof value === 'boolean'` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isBoolean: Whether the given value is Boolean. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isBoolean Whether the given value is Boolean. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2619,9 +2619,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsBoolean(JSVM_Env env, * @brief This API checks if the value passed in is a number. * This equals to `typeof value === 'number'` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isNumber: Whether the given value is Number. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isNumber Whether the given value is Number. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2634,9 +2634,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsNumber(JSVM_Env env, * @brief This API checks if the value passed in is a string. * This equals to `typeof value === 'string'` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isString: Whether the given value is String. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isString Whether the given value is String. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2649,9 +2649,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsString(JSVM_Env env, * @brief This API checks if the value passed in is a symbol. * This equals to `typeof value === 'symbol'` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isSymbol: Whether the given value is Symbol. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isSymbol Whether the given value is Symbol. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2664,9 +2664,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsSymbol(JSVM_Env env, * @brief This API checks if the value passed in is a function. * This equals to `typeof value === 'function'` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isFunction: Whether the given value is Function. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isFunction Whether the given value is Function. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2678,9 +2678,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsFunction(JSVM_Env env, /** * @brief This API checks if the value passed in is an object. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isObject: Whether the given value is Object. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isObject Whether the given value is Object. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2693,9 +2693,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsObject(JSVM_Env env, * @brief This API checks if the value passed in is a bigInt. * This equals to `typeof value === 'bigint'` in JS. * - * @param env: The VM instance on which to check microtasks. - * @param value: The JavaScript value to check. - * @param isBigInt: Whether the given value is BigInt. + * @param env The VM instance on which to check microtasks. + * @param value The JavaScript value to check. + * @param isBigInt Whether the given value is BigInt. * @return Only returns JSVM funtions result code. * {@link JSVM_OK } This API will not trigger any exception.\n * @since 12 @@ -2707,8 +2707,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsBigInt(JSVM_Env env, /** * @brief This API returns a JSVM-API value corresponding to a JavaScript Map type. * - * @param env: The environment that the API is invoked under. - * @param result: A JSVM_Value representing a JavaScript Map. + * @param env The environment that the API is invoked under. + * @param result A JSVM_Value representing a JavaScript Map. * @return Only returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2719,9 +2719,9 @@ JSVM_Status JSVM_CDECL OH_JSVM_CreateMap(JSVM_Env env, JSVM_Value* result); /** * @brief This API checks if the value passed in is a Map. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param isMap: Whether the given value is Map. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param isMap Whether the given value is Map. * @return Only returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2734,8 +2734,8 @@ JSVM_Status JSVM_CDECL OH_JSVM_IsMap(JSVM_Env env, /** * @brief This API returns a JSVM-API value corresponding to a JavaScript Set type. * - * @param env: The environment that the API is invoked under. - * @param result: A JSVM_Value representing a JavaScript Set. + * @param env The environment that the API is invoked under. + * @param result A JSVM_Value representing a JavaScript Set. * @return Returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2747,9 +2747,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateSet(JSVM_Env env, /** * @brief This API checks if the value passed in is a Set. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param isSet: Whether the given value is Set. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param isSet Whether the given value is Set. * @return Returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2763,11 +2763,11 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsSet(JSVM_Env env, * @brief This function compiles a string of JavaScript code with the compile options * and returns the compiled script. * - * @param env: The environment that the JSVM-API call is invoked under. - * @param script: A JavaScript string containing the script to be compiled. - * @param optionCount: length of option array. - * @param options: Compile options to be passed. - * @param result: The compiled script. + * @param env The environment that the JSVM-API call is invoked under. + * @param script A JavaScript string containing the script to be compiled. + * @param optionCount length of option array. + * @param options Compile options to be passed. + * @param result The compiled script. * @return Returns JSVM functions result code * {@link JSVM_OK } if the API succeeded. \n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2782,9 +2782,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileScriptWithOptions(JSVM_Env env, /** * @brief This API implements the abstract operation ToBigInt(). * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to coerce. - * @param result: JSVM_Value representing the coerced JavaScript BigInt. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to coerce. + * @param result JSVM_Value representing the coerced JavaScript BigInt. * @return Returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded. * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2799,9 +2799,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToBigInt(JSVM_Env env, * @brief This API checks if the value passed in is a regExp. * This equals to `value instanceof RegExp` in JS. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param result: Whether the given value is RegExp. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given value is RegExp. * @return Returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2815,9 +2815,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsRegExp(JSVM_Env env, /** * @brief This API checks if the value passed in is a constructor. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param isConstructor: Whether the given value is Constructor. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param isConstructor Whether the given value is Constructor. * @return Only returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2832,10 +2832,10 @@ JSVM_Status JSVM_CDECL OH_JSVM_IsConstructor(JSVM_Env env, * corresponding to the input. * The interface may throw an exception. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript string to convert to a regular expression. - * @param flags: Regular expression flag bits. - * @param result: A JSVM_Value representing a JavaScript RegExp. + * @param env The environment that the API is invoked under. + * @param value The JavaScript string to convert to a regular expression. + * @param flags Regular expression flag bits. + * @param result A JSVM_Value representing a JavaScript RegExp. * @return Only returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2852,10 +2852,10 @@ JSVM_Status JSVM_CDECL OH_JSVM_CreateRegExp(JSVM_Env env, /** * @brief This API returns the Object prototype. * - * @param env: The environment that the API is invoked under. - * @param object: JSVM_Value representing JavaScript Object whose prototype to return. This returns + * @param env The environment that the API is invoked under. + * @param object JSVM_Value representing JavaScript Object whose prototype to return. This returns * the equivalent of Object.getPrototypeOf (which is not the same as the function's prototype property). - * @param result: JSVM_Value representing prototype of the given object. + * @param result JSVM_Value representing prototype of the given object. * @return Returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2868,9 +2868,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ObjectGetPrototypeOf(JSVM_Env env, /** * @brief This API set the prototype on the Object passed in. * - * @param env: The environment that the API is invoked under. - * @param object: The object on which to set the prototype. - * @param prototype: The prototype value. + * @param env The environment that the API is invoked under. + * @param object The object on which to set the prototype. + * @param prototype The prototype value. * @return Returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded.\n * {@link JSVM_INVALID_ARG } If the input parameter is invalid.\n @@ -2883,14 +2883,14 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ObjectSetPrototypeOf(JSVM_Env env, /** * @brief Creates a function with a given script as its body. * - * @param env: The environment that the API is invoked under. - * @param funcName: A string containing the function's name. Pass NULL to create an anonymous function. - * @param length: The length of the funcName in bytes, or JSVM_AUTO_LENGTH if it + * @param env The environment that the API is invoked under. + * @param funcName A string containing the function's name. Pass NULL to create an anonymous function. + * @param length The length of the funcName in bytes, or JSVM_AUTO_LENGTH if it * is null-terminated. - * @param argc: The count of elements in the argv array. - * @param argv: Array of JSVM_Values representing JavaScript strings passed in as arguments to the function. - * @param script: A JavaScript string containing the script to use as the function's body. - * @param result: JSVM_Value representing the JavaScript function object for the newly + * @param argc The count of elements in the argv array. + * @param argv Array of JSVM_Values representing JavaScript strings passed in as arguments to the function. + * @param script A JavaScript string containing the script to use as the function's body. + * @param result JSVM_Value representing the JavaScript function object for the newly * created function. * @return Returns JSVM function's result code. * {@link JSVM_OK } If the API succeeded. @@ -2910,8 +2910,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateFunctionWithScript(JSVM_Env env, * @brief This function keep persistently save a JSVM_Script and extend its lifecycle * beyond the current scope. * - * @param env: The environment that the API is invoked under. - * @param script: A JavaScript string containing the script to be retained. + * @param env The environment that the API is invoked under. + * @param script A JavaScript string containing the script to be retained. * @return Returns JSVM functions result code * {@link JSVM_OK } if the API succeeded. \n * {@link JSVM_INVALID_ARG } if the script is empty or already retained. \n @@ -2922,8 +2922,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_RetainScript(JSVM_Env env, JSVM_Script script); /** * @brief This function release the script retained by OH_JSVM_RetainScript * - * @param env: The environment that the API is invoked under. - * @param script: A JavaScript string containing the script to be retained. + * @param env The environment that the API is invoked under. + * @param script A JavaScript string containing the script to be retained. * @return Returns JSVM functions result code * {@link JSVM_OK } if the API succeeded. \n * {@link JSVM_INVALID_ARG } if the script is empty or not retained. \n @@ -2934,9 +2934,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReleaseScript(JSVM_Env env, JSVM_Script script); /** * @brief This function activates insepctor with pid and alias it. * - * @param env: The environment that the API is invoked under. - * @param pid: A process id to identify the inspector connection. - * @param name: An alias for the inspector that under a specific pid. + * @param env The environment that the API is invoked under. + * @param pid A process id to identify the inspector connection. + * @param name An alias for the inspector that under a specific pid. * default name is jsvm if a nullptr is passed in. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n @@ -2951,13 +2951,13 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenInspectorWithName(JSVM_Env env, * @brief Compile WebAssembly bytecode into a WebAssembly module. * If WebAssembly cache provided, deserialization will be performed. * - * @param env: The environment that the API is invoked under. - * @param wasmBytecode: WebAssembly bytecode. - * @param wasmBytecodeLength: WebAssembly bytecode length in byte. - * @param cacheData: Optional WebAssembly cache. - * @param cacheDataLength: Optional WebAssembly cache length in byte. - * @param cacheRejected: Output parameter representing whether the provided cacheData is rejected. - * @param wasmModule: Output parameter representing compiled WebAssembly module. + * @param env The environment that the API is invoked under. + * @param wasmBytecode WebAssembly bytecode. + * @param wasmBytecodeLength WebAssembly bytecode length in byte. + * @param cacheData Optional WebAssembly cache. + * @param cacheDataLength Optional WebAssembly cache length in byte. + * @param cacheRejected Output parameter representing whether the provided cacheData is rejected. + * @param wasmModule Output parameter representing compiled WebAssembly module. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_INVALID_ARG } if any of env, wasmBytecode is NULL, or data length is invalid.\n @@ -2978,10 +2978,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileWasmModule(JSVM_Env env, * @brief Compile the function with the specified index in the WebAssembly module * into the specified optimization level. * - * @param env: The environment that the API is invoked under. - * @param wasmModule: The WebAssembly module to which the function to compiled belongs. - * @param functionIndex: The index of the function to be compiled, should never be out of range. - * @param optLevel: Optimization level the function will be compiled with. + * @param env The environment that the API is invoked under. + * @param wasmModule The WebAssembly module to which the function to compiled belongs. + * @param functionIndex The index of the function to be compiled, should never be out of range. + * @param optLevel Optimization level the function will be compiled with. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_INVALID_ARG } if env is NULL, or wasmModule is NULL or is not a WebAssembly module.\n @@ -2998,9 +2998,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileWasmFunction(JSVM_Env env, /** * @brief Check whether the given JSVM_Value is a WebAssembly module. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param result: Whether the given value is a WebAssembly module. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given value is a WebAssembly module. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_INVALID_ARG } if any of the input arguments is NULL.\n @@ -3014,10 +3014,10 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsWasmModuleObject(JSVM_Env env, /** * @brief Create cache for compiled WebAssembly module. * - * @param env: The environment that the API is invoked under. - * @param wasmModule: The compiled WebAssembly module. - * @param data: Output parameter representing generated WebAssembly module cache. - * @param length: Output parameter representing byte length of generated WebAssembly module cache. + * @param env The environment that the API is invoked under. + * @param wasmModule The compiled WebAssembly module. + * @param data Output parameter representing generated WebAssembly module cache. + * @param length Output parameter representing byte length of generated WebAssembly module cache. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_INVALID_ARG } if any of the input arguments is NULL.\n @@ -3033,9 +3033,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateWasmCache(JSVM_Env env, /** * @brief Release cache data with specified cache type. * - * @param env: The environment that the API is invoked under. - * @param cacheData: The cache data to be released, double free is undefined behaviors. - * @param cacheType: The type of cache data. + * @param env The environment that the API is invoked under. + * @param cacheData The cache data to be released, double free is undefined behaviors. + * @param cacheType The type of cache data. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL or cacheType is illegal.\n @@ -3048,3 +3048,4 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReleaseCache(JSVM_Env env, EXTERN_C_END /** @} */ #endif /* ARK_RUNTIME_JSVM_JSVM_H */ + diff --git a/ark_runtime/jsvm/jsvm_types.h b/ark_runtime/jsvm/jsvm_types.h index 1141b051f..4ee1793b3 100644 --- a/ark_runtime/jsvm/jsvm_types.h +++ b/ark_runtime/jsvm/jsvm_types.h @@ -12,10 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#ifndef ARK_RUNTIME_JSVM_JSVM_TYPE_H -#define ARK_RUNTIME_JSVM_JSVM_TYPE_H - /** * @addtogroup JSVM * @{ @@ -43,6 +39,10 @@ * @since 11 */ +#ifndef ARK_RUNTIME_JSVM_JSVM_TYPE_H +#define ARK_RUNTIME_JSVM_JSVM_TYPE_H + + #include // NOLINT(modernize-deprecated-headers) #include // NOLINT(modernize-deprecated-headers) #include // NOLINT(modernize-deprecated-headers) @@ -772,3 +772,4 @@ typedef enum { } JSVM_CacheType; /** @} */ #endif /* ARK_RUNTIME_JSVM_JSVM_TYPE_H */ + -- Gitee From bcef4169a31b17b87096b24847db848f5671f7a1 Mon Sep 17 00:00:00 2001 From: huanghan Date: Thu, 21 Nov 2024 22:15:30 +0800 Subject: [PATCH 171/630] =?UTF-8?q?API=20Lint=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huanghan --- ark_runtime/jsvm/jsvm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index 3f47366b4..dc7aea524 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -102,7 +102,7 @@ EXTERN_C_START /** * @brief Init a JavaScript vm. * - * @param options: The options for initialize the JavaScript VM. + * @param options The options for initialize the JavaScript VM. * @return Returns JSVM funtions result code. * Returns {@link JSVM_OK } in all cases.\n * @since 11 @@ -1546,9 +1546,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsArraybuffer(JSVM_Env env, /** * @brief This API checks if the Object passed in is a date. * - * @param env: The environment that the API is invoked under. - * @param value: The JavaScript value to check. - * @param result: Whether the given JSVM_Value represents a JavaScript Date object. + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param isDate Whether the given JSVM_Value represents a JavaScript Date object. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 11 @@ -2522,8 +2522,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReleaseLock(JSVM_Env env); * @brief Starts the running of the task queue inside the VM. * This task queue can be executed by an external event loop. * - * @param env: The VM instance on which to start the task queue. - * @param result: Whether the task queue was successfully started. + * @param vm The VM instance on which to start the task queue. + * @param result Whether the task queue was successfully started. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 @@ -2534,7 +2534,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_PumpMessageLoop(JSVM_VM vm, /** * @brief Check to see if there are any microtasks waiting in the queue, and if there are, execute them. * - * @param env: The VM instance on which to check microtasks. + * @param vm The VM instance on which to check microtasks. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n * @since 12 -- Gitee From 2267e51a18edfe03290e41f0c490ebf3cf1376d7 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Mon, 18 Nov 2024 16:46:41 +0800 Subject: [PATCH 172/630] =?UTF-8?q?keyevent=20=E6=8E=A5=E5=8F=A3=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiuxiu96 Change-Id: Iafe513facda3f037b30d3af63260a330c6121bb1 --- arkui/ace_engine/native/libace.ndk.json | 12 ++----- arkui/ace_engine/native/native_key_event.h | 42 ---------------------- arkui/ace_engine/native/ui_input_event.h | 24 +++++++++++++ 3 files changed, 26 insertions(+), 52 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 98b4908b7..1d822febf 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2449,15 +2449,7 @@ }, { "first_introduced": "14", - "name": "OH_ArkUI_KeyEvent_GetDeviceId" - }, - { - "first_introduced": "14", - "name": "OH_ArkUI_KeyEvent_GetMetaKey" - }, - { - "first_introduced": "14", - "name": "OH_ArkUI_KeyEvent_GetTimestamp" + "name": "OH_ArkUI_UIInputEvent_GetDeviceId" }, { "first_introduced": "14", @@ -2465,7 +2457,7 @@ }, { "first_introduced": "14", - "name": "OH_ArkUI_KeyEvent_GetModifierKeyState" + "name": "OH_ArkUI_UIInputEvent_GetPressedKeys" }, { "first_introduced": "14", diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h index 0ab0303a1..70958a813 100644 --- a/arkui/ace_engine/native/native_key_event.h +++ b/arkui/ace_engine/native/native_key_event.h @@ -447,36 +447,6 @@ const char *OH_ArkUI_KeyEvent_GetKeyText(const ArkUI_UIInputEvent* event); */ ArkUI_KeySourceType OH_ArkUI_KeyEvent_GetKeySource(const ArkUI_UIInputEvent* event); -/** - * @brief Obtains the ID of device that triggers a key event. - * - * @param event Pointer to an ArkUI_UIInputEvent object. - * @return Returns the device ID. - * @since 14 - */ -int32_t OH_ArkUI_KeyEvent_GetDeviceId(const ArkUI_UIInputEvent* event); - -/** - * @brief Obtains the state of the meta key (that is, the WIN key on the Windows keyboard or the Command - * key on the Mac keyboard) when a key event occurs. - * - * @param event Pointer to an ArkUI_UIInputEvent object. - * @return Returns the state of the meta key. The value 1 means that the key is pressed, and 0 means the - * opposite. - * @since 14 - */ -int32_t OH_ArkUI_KeyEvent_GetMetaKey(const ArkUI_UIInputEvent* event); - -/** - * @brief Obtains the timestamp of a key event. It is the interval between the time when the event is triggered and the - * time when the system starts, in nanoseconds. - * - * @param event Pointer to an ArkUI_UIInputEvent object. - * @return Returns the event timestamp, in nanoseconds. - * @since 14 - */ -uint64_t OH_ArkUI_KeyEvent_GetTimestamp(const ArkUI_UIInputEvent* event); - /** * @brief Prevents a key event from bubbling up. * @@ -486,18 +456,6 @@ uint64_t OH_ArkUI_KeyEvent_GetTimestamp(const ArkUI_UIInputEvent* event); */ void OH_ArkUI_KeyEvent_StopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation); -/** - * @brief Obtains the pressed status of modifier keys from a key event. - * The following modifier keys are supported: Ctrl, Alt, Shift, Fn. However, the Fn key on external keyboards - * is not supported. - * - * @param event Pointer to an ArkUI_UIInputEvent object. - * @param modifierKeys Modifier keys to check, which must be created using {@link ArkUI_ModifierKeyName}. - * @return Returns whether the pressed status of the modifier keys. - * @since 14 - */ -bool OH_ArkUI_KeyEvent_GetModifierKeyState(const ArkUI_UIInputEvent* event, uint32_t modifierKeys); - /** * @brief Obtains the intention code associated with a key event. * diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index c9373cf0e..9b5aa63fb 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -716,6 +716,30 @@ int32_t OH_ArkUI_MouseEvent_GetMouseAction(const ArkUI_UIInputEvent* event); */ int32_t OH_ArkUI_PointerEvent_SetStopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation); +/** + * @brief Obtains the ID of device that triggers UI input event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the device ID. + * @since 14 + */ +int32_t OH_ArkUI_UIInputEvent_GetDeviceId(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the pressed status of modifier keys from UI input event. + * The following modifier keys are supported: Ctrl, Alt, Shift, Fn. However, the Fn key on external keyboards + * is not supported. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param pressedKeyCodes Indicates the list of the Modifier keys.You need to create a int array first. + * @param length Indicates the total length of the list array. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the giving buffer is not enough. + * @since 14 + */ +int32_t OH_ArkUI_UIInputEvent_GetPressedKeys(const ArkUI_UIInputEvent* event, int32_t* pressedKeyCodes, int32_t length); + #ifdef __cplusplus }; #endif -- Gitee From 3146164c9651a294126a98ba9ae1454d32a478b2 Mon Sep 17 00:00:00 2001 From: jiangwei Date: Fri, 22 Nov 2024 10:49:28 +0800 Subject: [PATCH 173/630] =?UTF-8?q?fix:=20trace.h=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=B7=BB=E5=8A=A0=E7=BB=93=E6=9D=9F=E6=A0=87?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jiangwei --- hiviewdfx/hitrace/include/hitrace/trace.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hiviewdfx/hitrace/include/hitrace/trace.h b/hiviewdfx/hitrace/include/hitrace/trace.h index d9ebed256..21c1c6d82 100644 --- a/hiviewdfx/hitrace/include/hitrace/trace.h +++ b/hiviewdfx/hitrace/include/hitrace/trace.h @@ -687,4 +687,6 @@ void OH_HiTrace_CountTrace(const char *name, int64_t count); #ifdef __cplusplus } #endif +/** @} */ + #endif // HIVIEWDFX_HITRACE_H -- Gitee From e64d1e5cac1e782bedb55554901d7c83441980e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E4=B8=80=E9=B8=A3?= Date: Fri, 22 Nov 2024 13:58:34 +0800 Subject: [PATCH 174/630] API Lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蔡一鸣 --- .../memory_utils/libpurgeablemem/purgeable_memory.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h b/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h index f8510ba94..2f9cb9ef2 100644 --- a/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h +++ b/commonlibrary/memory_utils/libpurgeablemem/purgeable_memory.h @@ -15,6 +15,7 @@ /** * @addtogroup memory + * @{ * * @brief provides memory management capabilities * @@ -32,7 +33,7 @@ * provides features include create, begin read ,end read, begin write, end write, rebuild, and so on. * when using, it is necessary to link libpurgeable_memory_ndk.z.so * - * @library libpurgeablemem.so + * @library libpurgeablemem.z.so * @syscap SystemCapability.Kernel.Memory * @kit KernelEnhanceKit * @since 10 @@ -206,4 +207,5 @@ bool OH_PurgeableMemory_AppendModify(OH_PurgeableMemory *purgObj, #ifdef __cplusplus } #endif /* End of #ifdef __cplusplus */ -#endif /* OHOS_UTILS_MEMORY_LIBPURGEABLEMEM_C_INCLUDE_PURGEABLE_MEMORY_H */ \ No newline at end of file +#endif /* OHOS_UTILS_MEMORY_LIBPURGEABLEMEM_C_INCLUDE_PURGEABLE_MEMORY_H */ +/** @} */ \ No newline at end of file -- Gitee From cf2e9e51e34062b2151d081114b08fe0b7bba82b Mon Sep 17 00:00:00 2001 From: ZhaoJinghui Date: Fri, 22 Nov 2024 15:11:10 +0800 Subject: [PATCH 175/630] C API syntax correction Change-Id: I535e0a96eb84998aadea6517c1eb2d817ac71772 Signed-off-by: ZhaoJinghui --- .../relational_store/include/data_asset.h | 5 +++++ .../relational_store/include/oh_cursor.h | 18 ++++++++++++++++-- .../relational_store/include/oh_predicates.h | 16 ++++++++++++++-- .../relational_store/include/oh_value_object.h | 17 +++++++++++++++-- .../include/oh_values_bucket.h | 17 +++++++++++++++-- .../include/relational_store.h | 2 +- 6 files changed, 66 insertions(+), 9 deletions(-) diff --git a/distributeddatamgr/relational_store/include/data_asset.h b/distributeddatamgr/relational_store/include/data_asset.h index a8bc9e16a..7178748fd 100644 --- a/distributeddatamgr/relational_store/include/data_asset.h +++ b/distributeddatamgr/relational_store/include/data_asset.h @@ -36,7 +36,12 @@ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 11 */ +#ifdef __cplusplus #include +#else +#include +#endif + #include #ifdef __cplusplus extern "C" { diff --git a/distributeddatamgr/relational_store/include/oh_cursor.h b/distributeddatamgr/relational_store/include/oh_cursor.h index 30d208ab4..b9b35fa8e 100644 --- a/distributeddatamgr/relational_store/include/oh_cursor.h +++ b/distributeddatamgr/relational_store/include/oh_cursor.h @@ -38,7 +38,12 @@ * @since 10 */ +#ifdef __cplusplus #include +#else +#include +#endif + #include #include #include "database/data/data_asset.h" @@ -93,7 +98,16 @@ typedef enum OH_ColumnType { * * @since 10 */ -typedef struct OH_Cursor { +typedef struct OH_Cursor OH_Cursor; + +/** + * @brief Define the OH_Cursor structure type. + * + * Provides methods for accessing a database result set generated by query the database. + * + * @since 10 + */ +struct OH_Cursor { /** * The id used to uniquely identify the OH_Cursor struct. */ @@ -286,7 +300,7 @@ typedef struct OH_Cursor { * @since 11 */ int (*getAssets)(OH_Cursor *cursor, int32_t columnIndex, Data_Asset **value, uint32_t *length); -} OH_Cursor; +}; #ifdef __cplusplus }; diff --git a/distributeddatamgr/relational_store/include/oh_predicates.h b/distributeddatamgr/relational_store/include/oh_predicates.h index 71f496459..c8fe58ccb 100644 --- a/distributeddatamgr/relational_store/include/oh_predicates.h +++ b/distributeddatamgr/relational_store/include/oh_predicates.h @@ -38,7 +38,12 @@ * @since 10 */ +#ifdef __cplusplus #include +#else +#include +#endif + #include #include "database/rdb/oh_value_object.h" @@ -67,7 +72,14 @@ typedef enum OH_OrderType { * * @since 10 */ -typedef struct OH_Predicates { +typedef struct OH_Predicates OH_Predicates; + +/** + * @brief Define the OH_Predicates structure type. + * + * @since 10 + */ +struct OH_Predicates { /** * The id used to uniquely identify the OH_Predicates struct. */ @@ -395,7 +407,7 @@ typedef struct OH_Predicates { * @since 10 */ int (*destroy)(OH_Predicates *predicates); -} OH_Predicates; +}; #ifdef __cplusplus }; diff --git a/distributeddatamgr/relational_store/include/oh_value_object.h b/distributeddatamgr/relational_store/include/oh_value_object.h index dbe5d0d18..85ee3229e 100644 --- a/distributeddatamgr/relational_store/include/oh_value_object.h +++ b/distributeddatamgr/relational_store/include/oh_value_object.h @@ -38,7 +38,12 @@ * @since 10 */ +#ifdef __cplusplus #include +#else +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -48,7 +53,15 @@ extern "C" { * * @since 10 */ -typedef struct OH_VObject { +typedef struct OH_VObject OH_VObject; + + +/** + * @brief Define the OH_VObject structure type. + * + * @since 10 + */ +struct OH_VObject { /** * The id used to uniquely identify the OH_VObject struct. */ @@ -112,7 +125,7 @@ typedef struct OH_VObject { * @since 10 */ int (*destroy)(OH_VObject *valueObject); -} OH_VObject; +}; #ifdef __cplusplus }; diff --git a/distributeddatamgr/relational_store/include/oh_values_bucket.h b/distributeddatamgr/relational_store/include/oh_values_bucket.h index db822d1de..6d21d0879 100644 --- a/distributeddatamgr/relational_store/include/oh_values_bucket.h +++ b/distributeddatamgr/relational_store/include/oh_values_bucket.h @@ -38,7 +38,12 @@ * @since 10 */ +#ifdef __cplusplus #include +#else +#include +#endif + #include "database/data/data_asset.h" #ifdef __cplusplus extern "C" { @@ -49,7 +54,15 @@ extern "C" { * * @since 10 */ -typedef struct OH_VBucket { +typedef struct OH_VBucket OH_VBucket; + + +/** + * @brief Define the OH_VBucket structure type. + * + * @since 10 + */ +struct OH_VBucket { /** * The id used to uniquely identify the OH_VBucket struct. */ @@ -139,7 +152,7 @@ typedef struct OH_VBucket { * @since 10 */ int (*destroy)(OH_VBucket *bucket); -} OH_VBucket; +}; /** * @brief Put the {@link Data_Asset} * value to this {@link OH_VBucket} object for the given column name. diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index b8be9a6aa..2320b635b 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -212,7 +212,7 @@ int OH_Rdb_DestroyConfig(OH_Rdb_ConfigV2 *config); * * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. * Indicates the configuration of the database related to this RDB store. - * @param dataBaseDir Indicates the directory of the database. + * @param databaseDir Indicates the directory of the database. * @return Returns the status code of the execution. Successful execution returns RDB_OK, * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. -- Gitee From 1413867be458d4dacaa6cebf774f1ca26751fa65 Mon Sep 17 00:00:00 2001 From: wangyulie Date: Fri, 22 Nov 2024 16:38:16 +0800 Subject: [PATCH 176/630] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E6=89=93?= =?UTF-8?q?=E5=8C=85=E7=9A=84=E5=A4=B4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyulie --- resourceschedule/ffrt/ffrt.h | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 resourceschedule/ffrt/ffrt.h diff --git a/resourceschedule/ffrt/ffrt.h b/resourceschedule/ffrt/ffrt.h deleted file mode 100644 index 32a4ccf54..000000000 --- a/resourceschedule/ffrt/ffrt.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef FFRT_API_FFRT_H -#define FFRT_API_FFRT_H -#ifdef __cplusplus -#include "cpp/task.h" -#include "cpp/mutex.h" -#include "cpp/condition_variable.h" -#include "cpp/sleep.h" -#include "cpp/queue.h" -#include "c/timer.h" -#else -#include "c/task.h" -#include "c/mutex.h" -#include "c/condition_variable.h" -#include "c/sleep.h" -#include "c/queue.h" -#include "c/timer.h" -#endif -#endif -- Gitee From f41b68ef57d53756bf343f7dd9ce88ad2822b9e0 Mon Sep 17 00:00:00 2001 From: leafly2021 Date: Fri, 22 Nov 2024 17:51:58 +0800 Subject: [PATCH 177/630] =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: leafly2021 --- graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json index 28ff64c27..5362d474e 100644 --- a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json +++ b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json @@ -4,6 +4,7 @@ { "name": "OH_NativeVSync_RequestFrame" }, { "name": "OH_NativeVSync_RequestFrameWithMultiCallback" }, { "name": "OH_NativeVSync_GetPeriod" }, + { "name": "OH_NativeVSync_Create_ForAssociatedWindow" }, { "first_introduced": "14", "name": "OH_NativeVSync_DVSyncSwitch" -- Gitee From 25b0388abcef2cc934cd2d8b0c2254c8b2ac9b83 Mon Sep 17 00:00:00 2001 From: l00844999 Date: Fri, 22 Nov 2024 17:59:02 +0800 Subject: [PATCH 178/630] drawing fix Signed-off-by: l00844999 --- .../graphic_2d/native_drawing/drawing_image.h | 2 +- .../native_drawing/drawing_memory_stream.h | 2 +- .../native_drawing/drawing_path_effect.h | 2 +- .../native_drawing/drawing_sampling_options.h | 2 +- .../graphic_2d/native_drawing/drawing_types.h | 8 ++++---- .../native_drawing/libnative_drawing.ndk.json | 20 +++++++++---------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_image.h b/graphic/graphic_2d/native_drawing/drawing_image.h index f4c9fed10..ed2d09789 100644 --- a/graphic/graphic_2d/native_drawing/drawing_image.h +++ b/graphic/graphic_2d/native_drawing/drawing_image.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/graphic/graphic_2d/native_drawing/drawing_memory_stream.h b/graphic/graphic_2d/native_drawing/drawing_memory_stream.h index 3188d3be9..c131dc6b2 100644 --- a/graphic/graphic_2d/native_drawing/drawing_memory_stream.h +++ b/graphic/graphic_2d/native_drawing/drawing_memory_stream.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h index 7e3bd8e16..7576c2500 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/graphic/graphic_2d/native_drawing/drawing_sampling_options.h b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h index ee55c81b1..12a90a087 100644 --- a/graphic/graphic_2d/native_drawing/drawing_sampling_options.h +++ b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index 3827d52ea..c1bfda620 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -106,20 +106,20 @@ typedef struct OH_Drawing_Bitmap OH_Drawing_Bitmap; typedef struct OH_Drawing_Point OH_Drawing_Point; /** - * @brief Define color space to determine color information. + * @brief Defines a pixelmap, which is used to wrap real pixelmap supported by image framework. * * @since 12 * @version 1.0 */ -typedef struct OH_Drawing_ColorSpace OH_Drawing_ColorSpace; +typedef struct OH_Drawing_PixelMap OH_Drawing_PixelMap; /** - * @brief Defines a pixelmap, which is used to wrap real pixelmap supported by image framework. + * @brief Define color space to determine color information. * * @since 12 * @version 1.0 */ -typedef struct OH_Drawing_PixelMap OH_Drawing_PixelMap; +typedef struct OH_Drawing_ColorSpace OH_Drawing_ColorSpace; /** * @brief Defines a point of 2d. diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 353ce3f53..20b31b7a1 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -122,13 +122,10 @@ "first_introduced": "12", "name": "OH_Drawing_CanvasSkew" }, - { "name": "OH_Drawing_CanvasSetMatrix" }, { "first_introduced": "12", "name": "OH_Drawing_CanvasResetMatrix" }, - { "name": "OH_Drawing_CanvasReadPixels" }, - { "name": "OH_Drawing_CanvasReadPixelsToBitmap" }, { "name": "OH_Drawing_CanvasGetWidth" }, { "name": "OH_Drawing_CanvasGetHeight" }, { "name": "OH_Drawing_CanvasGetLocalClipBounds" }, @@ -139,6 +136,9 @@ "name": "OH_Drawing_MatrixGetAll" }, { "name": "OH_Drawing_CanvasDrawShadow" }, + { "name": "OH_Drawing_CanvasSetMatrix" }, + { "name": "OH_Drawing_CanvasReadPixels" }, + { "name": "OH_Drawing_CanvasReadPixelsToBitmap" }, { "first_introduced": "12", "name": "OH_Drawing_CanvasIsClipEmpty" @@ -284,8 +284,8 @@ { "name": "OH_Drawing_FontCountText" }, { "name": "OH_Drawing_FontSetTextSkewX" }, { "name": "OH_Drawing_FontSetTypeface" }, - { "name": "OH_Drawing_FontGetMetrics" }, { "name": "OH_Drawing_FontGetTypeface" }, + { "name": "OH_Drawing_FontGetMetrics" }, { "first_introduced": "12", "name": "OH_Drawing_GpuContextCreateFromGL" @@ -752,6 +752,12 @@ { "name": "OH_Drawing_ImageBuildFromBitmap" }, { "name": "OH_Drawing_ImageGetWidth" }, { "name": "OH_Drawing_ImageGetHeight" }, + { + "first_introduced": "12", + "name": "OH_Drawing_ImageGetImageInfo" + }, + { "name": "OH_Drawing_SamplingOptionsCreate" }, + { "name": "OH_Drawing_SamplingOptionsDestroy" }, { "first_introduced": "12", "name": "OH_Drawing_TextStyleGetShadowWithIndex" @@ -788,12 +794,6 @@ "first_introduced": "12", "name": "OH_Drawing_TypographySetIndents" }, - { - "first_introduced": "12", - "name": "OH_Drawing_ImageGetImageInfo" - }, - { "name": "OH_Drawing_SamplingOptionsCreate" }, - { "name": "OH_Drawing_SamplingOptionsDestroy" }, { "first_introduced": "11", "name": "OH_Drawing_TypographyHandlerAddPlaceholder" -- Gitee From 162ca79e8881214aa16dd91d278590845433b4e3 Mon Sep 17 00:00:00 2001 From: bluhuang Date: Mon, 25 Nov 2024 15:40:38 +0800 Subject: [PATCH 179/630] fix preferences ndk warning Signed-off-by: bluhuang --- .../preferences/include/oh_preferences_err_code.h | 2 +- distributeddatamgr/preferences/include/oh_preferences_option.h | 1 + distributeddatamgr/preferences/include/oh_preferences_value.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/distributeddatamgr/preferences/include/oh_preferences_err_code.h b/distributeddatamgr/preferences/include/oh_preferences_err_code.h index 5b77219b9..90a2c6818 100644 --- a/distributeddatamgr/preferences/include/oh_preferences_err_code.h +++ b/distributeddatamgr/preferences/include/oh_preferences_err_code.h @@ -73,5 +73,5 @@ typedef enum OH_Preferences_ErrCode { #ifdef __cplusplus }; #endif - +/** @} */ #endif // OH_PREFERENCES_ERR_CODE_H diff --git a/distributeddatamgr/preferences/include/oh_preferences_option.h b/distributeddatamgr/preferences/include/oh_preferences_option.h index a8a25af9f..80ae78809 100644 --- a/distributeddatamgr/preferences/include/oh_preferences_option.h +++ b/distributeddatamgr/preferences/include/oh_preferences_option.h @@ -115,4 +115,5 @@ int OH_PreferencesOption_Destroy(OH_PreferencesOption *option); #ifdef __cplusplus }; #endif +/** @} */ #endif // OH_PREFERENCES_OPTION_H \ No newline at end of file diff --git a/distributeddatamgr/preferences/include/oh_preferences_value.h b/distributeddatamgr/preferences/include/oh_preferences_value.h index 945e28fc6..5be471f18 100644 --- a/distributeddatamgr/preferences/include/oh_preferences_value.h +++ b/distributeddatamgr/preferences/include/oh_preferences_value.h @@ -172,4 +172,5 @@ int OH_PreferencesValue_GetString(const OH_PreferencesValue *object, char **valu #ifdef __cplusplus }; #endif +/** @} */ #endif // OH_PREFERENCES_VALUE_H \ No newline at end of file -- Gitee From e44c86a2461474ee45b4723c7eee68d27022f392 Mon Sep 17 00:00:00 2001 From: huchang Date: Mon, 25 Nov 2024 21:21:52 +0800 Subject: [PATCH 180/630] add support for float32 in audiokit Signed-off-by: huchang Change-Id: Idd5ae94c33c1ac586fdba092ffc7f6ddb0c52891 --- .../audio_framework/common/native_audiostream_base.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index 44dacf0d0..16912ad99 100644 --- a/multimedia/audio_framework/common/native_audiostream_base.h +++ b/multimedia/audio_framework/common/native_audiostream_base.h @@ -132,6 +132,13 @@ typedef enum { * @since 10 */ AUDIOSTREAM_SAMPLE_S32LE = 3, + + /** + * Float 32, little endian. + * + * @since 16 + */ + AUDIOSTREAM_SAMPLE_F32LE = 4, } OH_AudioStream_SampleFormat; /** -- Gitee From 08622c8c8601c1aceec18d1921e41c2fb834aa51 Mon Sep 17 00:00:00 2001 From: houguobiao Date: Mon, 25 Nov 2024 22:56:54 +0800 Subject: [PATCH 181/630] =?UTF-8?q?CalendarPicker=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E6=9C=80=E5=A4=A7=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houguobiao Change-Id: I48903638e7fc1344018abb2bdaa75ed26e3629d5 --- arkui/ace_engine/native/native_node.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f83f1a181..079513926 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3891,6 +3891,32 @@ typedef enum { * */ NODE_CALENDAR_PICKER_TEXT_STYLE, + /** + * @brief Defines the start date of the calendar picker. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: date. The value like "1970-1-1". \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: date. \n + * + * @since 16 + */ + NODE_CALENDAR_PICKER_START = 16004, + /** + * @brief Defines the end date of the calendar picker. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: date. The value like "2100-12-31". \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: date. \n + * + * @since 16 + */ + NODE_CALENDAR_PICKER_END = 16005, /** * @brief Defines the color of the slider. This attribute can be set, reset, and obtained as required through APIs. * -- Gitee From e091a59fac70ee4fcd5b1b3cda64c45a91cdbfd3 Mon Sep 17 00:00:00 2001 From: shilong Date: Tue, 26 Nov 2024 02:53:43 +0000 Subject: [PATCH 182/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9sdk=E7=9A=84=E4=BA=A7?= =?UTF-8?q?=E5=87=BA=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/base/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/base/BUILD.gn b/drivers/external_device_manager/base/BUILD.gn index f02cd7542..48407c555 100644 --- a/drivers/external_device_manager/base/BUILD.gn +++ b/drivers/external_device_manager/base/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") ohos_ndk_headers("ddk_header") { - dest_dir = "$ndk_headers_out_dir/ddk/" + dest_dir = "$ndk_headers_out_dir/base/" sources = [ "ddk_api.h", "ddk_types.h", -- Gitee From b3bc677bdd1c9766b8c8c3914ed18b2dacfeade7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=91=E5=B1=91=E5=B1=91?= Date: Tue, 26 Nov 2024 11:53:40 +0800 Subject: [PATCH 183/630] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 屑屑屑 --- .../include/image/pixelmap_native.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index b897e2a12..c7ea3eb57 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -858,21 +858,6 @@ Image_ErrorCode OH_PixelmapNative_SetMetadata(OH_PixelmapNative *pixelmap, OH_Pi */ Image_ErrorCode OH_PixelmapNative_GetNativeBuffer(OH_PixelmapNative *pixelmap, OH_NativeBuffer **nativeBuffer); -/** - * @brief Set pixelmap memory name. - * - * @param pixelmap The Pixelmap pointer to be operated. - * @param name The pointer of name that needs to be set. - * @param size The size of name size that needs to be set. - * @return Function result code: - * {@link IMAGE_SUCCESS} If the operation is successful. - * {@link IMAGE_BAD_PARAMETER} If invalid parameter, name and size are incorrect. - * {@link IMAGE_UNSUPPORTED_MEMORY_FORMAT} If memory format is unsupported. - * @see OH_PixelmapNative - * @since 13 - */ -Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, char *name, size_t *size); - /** * @brief Get the native colorspace from the PixelMap. * @@ -901,6 +886,21 @@ Image_ErrorCode OH_PixelmapNative_GetColorSpaceNative(OH_PixelmapNative *pixelma Image_ErrorCode OH_PixelmapNative_SetColorSpaceNative(OH_PixelmapNative *pixelmap, OH_NativeColorSpaceManager *colorSpaceNative); +/** + * @brief Set pixelmap memory name. + * + * @param pixelmap The Pixelmap pointer to be operated. + * @param name The pointer of name that needs to be set. + * @param size The size of name size that needs to be set. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, name and size are incorrect. + * {@link IMAGE_UNSUPPORTED_MEMORY_FORMAT} If memory format is unsupported. + * @see OH_PixelmapNative + * @since 13 + */ +Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, char *name, size_t *size); + #ifdef __cplusplus }; #endif -- Gitee From bff4625f23dd15bc7a5358bb9e85a5c8205c51bc Mon Sep 17 00:00:00 2001 From: linchengfeng Date: Tue, 26 Nov 2024 19:30:07 +0800 Subject: [PATCH 184/630] add OH_CaptureSession_SetQualityPrioritization interface Signed-off-by: linchengfeng --- multimedia/camera_framework/camera.h | 18 ++++++++++++++++++ multimedia/camera_framework/camera.ndk.json | 4 ++++ multimedia/camera_framework/capture_session.h | 13 +++++++++++++ 3 files changed, 35 insertions(+) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 1a907e0f7..14bf57d0e 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -1060,6 +1060,24 @@ Camera_ErrorCode OH_Camera_GetCameraManager(Camera_Manager** cameraManager); */ Camera_ErrorCode OH_Camera_DeleteCameraManager(Camera_Manager* cameraManager); +/** + * @brief Enum for quality prioritization. + * + * @since 14 + * @version 1.0 + */ +typedef enum Camera_QualityPrioritization { + /** + * Hight quality priority. + */ + HIGH_QUALITY = 0, + + /** + * Power balance priority. + */ + POWER_BALANCE = 1 +} Camera_QualityPrioritization; + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index dd8d98bbc..1be252eaa 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -630,5 +630,9 @@ { "first_introduced": "13", "name": "OH_CaptureSession_EnableAutoDeviceSwitch" + }, + { + "first_introduced": "14", + "name": "OH_CaptureSession_SetQualityPrioritization" } ] diff --git a/multimedia/camera_framework/capture_session.h b/multimedia/camera_framework/capture_session.h index 54786c5d9..e1a5bf243 100644 --- a/multimedia/camera_framework/capture_session.h +++ b/multimedia/camera_framework/capture_session.h @@ -916,6 +916,19 @@ Camera_ErrorCode OH_CaptureSession_IsAutoDeviceSwitchSupported(Camera_CaptureSes */ Camera_ErrorCode OH_CaptureSession_EnableAutoDeviceSwitch(Camera_CaptureSession* session, bool enabled); +/** + * @brief Set quality prioritization. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param qualityPrioritization the target {@link Camera_QualityPrioritization} to set. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config. + * @since 14 + */ +Camera_ErrorCode OH_CaptureSession_SetQualityPrioritization( + Camera_CaptureSession* session, Camera_QualityPrioritization qualityPrioritization); + #ifdef __cplusplus } #endif -- Gitee From 667dc7701b73b456838aadb0f70cf36f294a0cf2 Mon Sep 17 00:00:00 2001 From: hongzexuan Date: Tue, 26 Nov 2024 21:09:05 +0800 Subject: [PATCH 185/630] fix node_scroll_size Signed-off-by: hongzexuan Change-Id: Ic41a40d2c73a24e085dc3f370e67533181f7c9f5 --- arkui/ace_engine/native/native_node.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f83f1a181..0058332d4 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4534,6 +4534,9 @@ typedef enum { * The default unit is vp. \n * .value[1].f32: total height of all child components when fully expanded in the scrollable component. * The default unit is vp. \n + * When NODE_PADDING, NODE_MARGIN, or NODE_BORDER_WIDTH is set, the values are rounded to the + * nearest pixel when being converted from vp to px. + * The returned values are calculated based on these rounded pixel values. \n * * @since 14 */ -- Gitee From 78e31c654a55ed9f577792c7b4eb7abb154d0243 Mon Sep 17 00:00:00 2001 From: "xuqinfeng1@huawei.com" Date: Tue, 26 Nov 2024 21:49:24 +0800 Subject: [PATCH 186/630] =?UTF-8?q?drawable=E7=9A=84=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuqinfeng1@huawei.com Change-Id: I95d8891ec8b1497635a7541611ae6065773db9d9 --- arkui/ace_engine/native/drawable_descriptor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/drawable_descriptor.h b/arkui/ace_engine/native/drawable_descriptor.h index 76b2f1723..ba221641f 100644 --- a/arkui/ace_engine/native/drawable_descriptor.h +++ b/arkui/ace_engine/native/drawable_descriptor.h @@ -142,7 +142,7 @@ int32_t OH_ArkUI_DrawableDescriptor_GetAnimationDuration(ArkUI_DrawableDescripto * @brief Sets the number of playback times. * * @param drawableDescriptor Indicates the pointer to the drawableDescriptor. - * @param iterations Indicates the number of playback times. + * @param iteration Indicates the number of playback times. * @since 12 */ void OH_ArkUI_DrawableDescriptor_SetAnimationIteration( -- Gitee From 6a77f3e8891eb315966aebee1401dcb81208227e Mon Sep 17 00:00:00 2001 From: wangxiuxiu Date: Mon, 25 Nov 2024 12:52:05 +0800 Subject: [PATCH 187/630] keyEvent Signed-off-by: wangxiuxiu --- arkui/ace_engine/native/ui_input_event.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 9b5aa63fb..85a377f12 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -731,14 +731,17 @@ int32_t OH_ArkUI_UIInputEvent_GetDeviceId(const ArkUI_UIInputEvent* event); * is not supported. * * @param event Pointer to an ArkUI_UIInputEvent object. - * @param pressedKeyCodes Indicates the list of the Modifier keys.You need to create a int array first. - * @param length Indicates the total length of the list array. + * @param pressedKeyCodes Array of all keys that are pressed. You need to allocate the memory space. + * @param length Length of the passed pressedKeyCodes array (when used as an input parameter); + * number of the keys pressed (when used as an output parameter). * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the giving buffer is not enough. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * @since 14 */ -int32_t OH_ArkUI_UIInputEvent_GetPressedKeys(const ArkUI_UIInputEvent* event, int32_t* pressedKeyCodes, int32_t length); +int32_t OH_ArkUI_UIInputEvent_GetPressedKeys( + const ArkUI_UIInputEvent* event, int32_t* pressedKeyCodes, int32_t* length); #ifdef __cplusplus }; -- Gitee From e81ec4be55dd335c6a5c132eecdcad331b196231 Mon Sep 17 00:00:00 2001 From: happy Date: Wed, 27 Nov 2024 20:02:45 +0800 Subject: [PATCH 188/630] =?UTF-8?q?api=20Lint=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: happy Change-Id: I2eebe7fe93e9e64ce2e2249ccfc8f29c7edb71c7 --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f83f1a181..c1f1aece8 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7951,4 +7951,4 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontSty #endif #endif // ARKUI_NATIVE_NODE_H -/** @}*/ +/** @} */ -- Gitee From 9c505c221ea2cbc525f9afabb5a23c2d1fbc0dc5 Mon Sep 17 00:00:00 2001 From: ji_xinliu Date: Wed, 27 Nov 2024 11:41:07 +0800 Subject: [PATCH 189/630] Lint Alarm fix Signed-off-by: ji_xinliu --- web/webview/interfaces/native/arkweb_error_code.h | 1 + web/webview/interfaces/native/arkweb_interface.h | 3 ++- web/webview/interfaces/native/arkweb_net_error_list.h | 1 + web/webview/interfaces/native/arkweb_scheme_handler.h | 3 ++- web/webview/interfaces/native/arkweb_type.h | 3 ++- web/webview/interfaces/native/native_interface_arkweb.h | 3 ++- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_error_code.h b/web/webview/interfaces/native/arkweb_error_code.h index a445de2c7..64db3082c 100644 --- a/web/webview/interfaces/native/arkweb_error_code.h +++ b/web/webview/interfaces/native/arkweb_error_code.h @@ -56,3 +56,4 @@ ARKWEB_INVALID_COOKIE_VALUE = 17100104, } ArkWeb_ErrorCode; #endif // ARKWEB_ERROR_CODE_H +/** @} */ diff --git a/web/webview/interfaces/native/arkweb_interface.h b/web/webview/interfaces/native/arkweb_interface.h index f204dab32..03f9f612b 100644 --- a/web/webview/interfaces/native/arkweb_interface.h +++ b/web/webview/interfaces/native/arkweb_interface.h @@ -87,4 +87,5 @@ ArkWeb_AnyNativeAPI* OH_ArkWeb_GetNativeAPI(ArkWeb_NativeAPIVariantKind type); #ifdef __cplusplus }; #endif -#endif // ARKWEB_INTERFACE_H \ No newline at end of file +#endif // ARKWEB_INTERFACE_H +/** @} */ \ No newline at end of file diff --git a/web/webview/interfaces/native/arkweb_net_error_list.h b/web/webview/interfaces/native/arkweb_net_error_list.h index 4a579c45e..feabf1440 100644 --- a/web/webview/interfaces/native/arkweb_net_error_list.h +++ b/web/webview/interfaces/native/arkweb_net_error_list.h @@ -1402,3 +1402,4 @@ typedef enum ArkWeb_NetError { } ArkWeb_NetError; #endif // ARKWEB_NET_ERROR_LIST_H +/** @} */ diff --git a/web/webview/interfaces/native/arkweb_scheme_handler.h b/web/webview/interfaces/native/arkweb_scheme_handler.h index 4ab4b8b94..d88272e7e 100644 --- a/web/webview/interfaces/native/arkweb_scheme_handler.h +++ b/web/webview/interfaces/native/arkweb_scheme_handler.h @@ -672,7 +672,7 @@ void OH_ArkWeb_CreateSchemeHandler(ArkWeb_SchemeHandler** schemeHandler); /** * @brief Destroy a SchemeHandler. - * @param The ArkWeb_SchemeHandler to be destroy. + * @param schemeHandler The ArkWeb_SchemeHandler to be destroy. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -995,3 +995,4 @@ void OH_ArkWeb_ReleaseByteArray(uint8_t* byteArray); }; #endif #endif // ARKWEB_SCHEME_HANDLER_H +/** @} */ diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index e6738810a..206d6b5d1 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -538,4 +538,5 @@ typedef struct { #ifdef __cplusplus } #endif -#endif // ARKWEB_TYPE_H \ No newline at end of file +#endif // ARKWEB_TYPE_H +/** @} */ \ No newline at end of file diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h index 48c114fce..96b779bf4 100644 --- a/web/webview/interfaces/native/native_interface_arkweb.h +++ b/web/webview/interfaces/native/native_interface_arkweb.h @@ -156,4 +156,5 @@ NativeArkWeb_OnDestroyCallback OH_NativeArkWeb_GetDestroyCallback(const char* we #ifdef __cplusplus }; #endif -#endif // NATIVE_INTERFACE_ARKWEB_H \ No newline at end of file +#endif // NATIVE_INTERFACE_ARKWEB_H +/** @} */ \ No newline at end of file -- Gitee From c6b91438ef92cb7842f96321d6e18f5c2957c499 Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 28 Nov 2024 09:08:12 +0000 Subject: [PATCH 190/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9ndk.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/base/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/base/BUILD.gn b/drivers/external_device_manager/base/BUILD.gn index 48407c555..f02cd7542 100644 --- a/drivers/external_device_manager/base/BUILD.gn +++ b/drivers/external_device_manager/base/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") ohos_ndk_headers("ddk_header") { - dest_dir = "$ndk_headers_out_dir/base/" + dest_dir = "$ndk_headers_out_dir/ddk/" sources = [ "ddk_api.h", "ddk_types.h", -- Gitee From 027fa38b64aeb54ecf719a5a0746f8ec99b088a8 Mon Sep 17 00:00:00 2001 From: shilong Date: Thu, 28 Nov 2024 09:08:41 +0000 Subject: [PATCH 191/630] =?UTF-8?q?=E6=96=B0=E5=A2=9Endk.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilong --- drivers/external_device_manager/usb/libusb.ndk.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/external_device_manager/usb/libusb.ndk.json b/drivers/external_device_manager/usb/libusb.ndk.json index d3ad5dbd3..eb677bfee 100644 --- a/drivers/external_device_manager/usb/libusb.ndk.json +++ b/drivers/external_device_manager/usb/libusb.ndk.json @@ -5,6 +5,9 @@ { "name": "OH_Usb_Release" }, + { + "name": "OH_Usb_ReleaseResource" + }, { "name": "OH_Usb_GetDeviceDescriptor" }, -- Gitee From 67570a933b3a13952503a7e9e12c83bb01412cab Mon Sep 17 00:00:00 2001 From: xukun_cai <401117262@qq.com> Date: Thu, 28 Nov 2024 12:00:34 +0000 Subject: [PATCH 192/630] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=BC=96=E8=AF=91sdk=E4=BA=A7=E7=89=A9=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xukun_cai <401117262@qq.com> --- ndk_targets.gni | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ndk_targets.gni b/ndk_targets.gni index a97312222..3a6755a88 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -294,21 +294,21 @@ _parse_args += _ndk_targets_list all_ndk_targets_list = exec_script(_parse_script, _parse_args, "list lines") -if (ndk_platform == "win") { +if (build_windows_ndk_target) { all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:windows_x86_64" ] -} else if (ndk_platform == "mac") { - if (host_cpu == "arm64") { - all_ndk_targets_list += +} if (build_mac_ndk_target) { + if (host_cpu == "arm64") { + all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_arm64" ] - } else { - all_ndk_targets_list += + } else { + all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_x86_64" ] } -} else if (ndk_platform == "linux") { +} if (build_linux_ndk_target) { all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:linux_x86_64" ] -} else if (ndk_platform == "ohos") { +} if (build_ohos_ndk_target) { all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:ohos_arm64" ] } else if (ndk_platform == "default") { -- Gitee From b014775b8d2132fca84923b52a85f7dce3dd59c8 Mon Sep 17 00:00:00 2001 From: xukun_cai <401117262@qq.com> Date: Fri, 29 Nov 2024 10:59:48 +0800 Subject: [PATCH 193/630] gn check Signed-off-by: xukun_cai <401117262@qq.com> --- ndk_targets.gni | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ndk_targets.gni b/ndk_targets.gni index 3a6755a88..fa07e23a9 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -297,18 +297,21 @@ all_ndk_targets_list = exec_script(_parse_script, _parse_args, "list lines") if (build_windows_ndk_target) { all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:windows_x86_64" ] -} if (build_mac_ndk_target) { - if (host_cpu == "arm64") { - all_ndk_targets_list += +} +if (build_mac_ndk_target) { + if (host_cpu == "arm64") { + all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_arm64" ] - } else { - all_ndk_targets_list += + } else { + all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:darwin_x86_64" ] } -} if (build_linux_ndk_target) { +} +if (build_linux_ndk_target) { all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:linux_x86_64" ] -} if (build_ohos_ndk_target) { +} +if (build_ohos_ndk_target) { all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:ohos_arm64" ] } else if (ndk_platform == "default") { -- Gitee From 8d1aafdb3739509cfa760c179bb3809c7c46cf1f Mon Sep 17 00:00:00 2001 From: liuzerun Date: Fri, 29 Nov 2024 11:26:14 +0800 Subject: [PATCH 194/630] fix Signed-off-by: liuzerun --- filemanagement/environment/include/oh_environment.h | 2 ++ filemanagement/fileio/include/error_code.h | 3 ++- filemanagement/fileio/include/oh_fileio.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/filemanagement/environment/include/oh_environment.h b/filemanagement/environment/include/oh_environment.h index 71d1e8495..299e1272b 100644 --- a/filemanagement/environment/include/oh_environment.h +++ b/filemanagement/environment/include/oh_environment.h @@ -15,6 +15,7 @@ /** * @addtogroup Environment + * @{ * * @brief This module provides the ability to access the environment directory and obtain the native interface for public root directory. @@ -80,3 +81,4 @@ FileManagement_ErrCode OH_Environment_GetUserDocumentDir(char **result); #endif #endif //FILE_MANAGEMENT_ENVIRONMENT_OH_ENVIRONMENT_H +/** @} */ diff --git a/filemanagement/fileio/include/error_code.h b/filemanagement/fileio/include/error_code.h index 2fb9847fe..08b32f3a1 100644 --- a/filemanagement/fileio/include/error_code.h +++ b/filemanagement/fileio/include/error_code.h @@ -24,7 +24,7 @@ /** * @file error_code.h * @kit CoreFileKit - * + * @library NA * @brief Declare the error codes of file management module. * @syscap SystemCapability.FileManagement.File.FileIO * @since 12 @@ -81,3 +81,4 @@ typedef enum FileManagement_ErrCode { #endif #endif // FILE_MANAGEMENT_FILEIO_ERROR_CODE_H +/** @} */ diff --git a/filemanagement/fileio/include/oh_fileio.h b/filemanagement/fileio/include/oh_fileio.h index 5fa1677da..b318d4f84 100644 --- a/filemanagement/fileio/include/oh_fileio.h +++ b/filemanagement/fileio/include/oh_fileio.h @@ -15,6 +15,7 @@ /** * @addtogroup FileIO + * @{ * * @brief This module provides the basic file operations. * @since 12 @@ -78,3 +79,4 @@ FileManagement_ErrCode OH_FileIO_GetFileLocation(char *uri, int uriLength, #endif #endif //FILE_MANAGEMENT_FILEIO_OH_FILEIO_H +/** @} */ -- Gitee From b45bba7c4b402409bfb4dd26e78ec01b68225518 Mon Sep 17 00:00:00 2001 From: shilei Date: Fri, 29 Nov 2024 14:37:09 +0800 Subject: [PATCH 195/630] modify napi interface notation Signed-off-by: shilei Change-Id: I1c85ab512d0aa46391b84afee7361bda6d98136f --- arkui/napi/native_api.h | 439 +++++++++++++++++++++++++++++++++------- 1 file changed, 369 insertions(+), 70 deletions(-) diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h index a45ce8476..d140aa622 100644 --- a/arkui/napi/native_api.h +++ b/arkui/napi/native_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,33 +15,53 @@ #ifndef FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H #define FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H +/** + * @addtogroup ArkTS_Napi_NativeModule + * @{ + * + * + * @brief Provides native api of ArkTS native module. + * + * @since 10 + */ + +/** + * @file native_api.h + * + * @brief Defines native api of ArkTS native module. + * + * @kit ArkTS + * @library libace_napi.z.so + * @syscap SystemCapability.ArkUI.ArkUI.Napi + * @since 10 + * @version 1.0 + */ #ifndef NAPI_VERSION #define NAPI_VERSION 8 -#endif +#endif // NAPI_VERSION #ifndef NAPI_EXPERIMENTAL #define NAPI_EXPERIMENTAL -#endif +#endif // NAPI_EXPERIMENTAL #include "common.h" #include "node_api.h" #ifdef NAPI_TEST -#ifdef _WIN32 +#ifdef _WIN32 // WIN32 #define NAPI_INNER_EXTERN __declspec(dllexport) -#else +#else // NON-WIN32 #define NAPI_INNER_EXTERN __attribute__((visibility("default"))) -#endif -#else +#endif // _WIN32 + +#else // NAPI_TEST #ifdef _WIN32 #define NAPI_INNER_EXTERN __declspec(deprecated) #else #define NAPI_INNER_EXTERN __attribute__((__deprecated__)) +#endif // __WIN32 #endif -#endif - -NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, napi_value err); NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env, const char16_t* str, @@ -67,7 +87,6 @@ NAPI_INNER_EXTERN napi_status napi_adjust_external_memory(napi_env env, int64_t change_in_bytes, int64_t* adjusted_value); - #ifdef __cplusplus extern "C" { #endif @@ -79,6 +98,7 @@ extern "C" { * @since 11 */ typedef void* (*napi_native_binding_detach_callback)(napi_env env, void* native_object, void* hint); + /** * @brief Native attach callback of napi_coerce_to_native_binding_object that can be used to * bind the js object and the native object. @@ -89,68 +109,216 @@ typedef napi_value (*napi_native_binding_attach_callback)(napi_env env, void* na NAPI_EXTERN napi_status napi_run_script_path(napi_env env, const char* path, napi_value* result); NAPI_EXTERN napi_status napi_queue_async_work_with_qos(napi_env env, napi_async_work work, napi_qos_t qos); -NAPI_EXTERN napi_status napi_load_module(napi_env env, const char* path, napi_value* result); /** - * @brief The module is loaded through the NAPI. By default, the default object is exported from the module. + * @brief Loads an .abc file as a module. This API returns the namespace of the module. + * @param env Current running virtual machine context. + * @param path Path of the .abc file or name of the module to load. + * @param result Result of the module object. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_load_module(napi_env env, + const char* path, + napi_value* result); + +/** + * @brief Associates data with the currently running environment. * * @param env Current running virtual machine context. - * @param path Path name of the module to be loaded, like @ohos.hilog. - * @param module_info Path names of bundle and module, like com.example.application/entry. - * @param result Result of loading a module, which is an exported object of the module. + * @param data Data item to bind with the 'env'. + * @param finalize_cb Optional native callback that will be triggered when 'env' is destroyed or this interface repeatedly calls. + * @param finalize_hint Optional contextual hint that is passed to the finalize callback. + * * @return Returns the function execution status. - * @since 12 -*/ -NAPI_EXTERN napi_status napi_load_module_with_info(napi_env env, - const char* path, - const char* module_info, - napi_value* result); -NAPI_EXTERN napi_status napi_get_instance_data(napi_env env, void** data); + * @since 11 + */ NAPI_EXTERN napi_status napi_set_instance_data(napi_env env, void* data, napi_finalize finalize_cb, void* finalize_hint); -NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(napi_env env, void (*fun)(void* arg), void* arg); -NAPI_EXTERN napi_status napi_add_env_cleanup_hook(napi_env env, void (*fun)(void* arg), void* arg); -NAPI_EXTERN napi_status napi_remove_async_cleanup_hook(napi_async_cleanup_hook_handle remove_handle); + +/** + * @brief Retrieves the data that was previously associated with the currently running environment. + * + * @param env Current running virtual machine context. + * @param data Data item is bound with the 'env'. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_get_instance_data(napi_env env, + void** data); + +/** + * @brief Registers a clean-up hook for releasing resources when the environment exits. + * + * @param env Current running virtual machine context. + * @param fun Function pointer which will be triggered when environment is destroy. + * @param arg The argument is passed to the function pointer 'fun'. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_add_env_cleanup_hook(napi_env env, + void (*fun)(void* arg), + void* arg); + +/** + * @brief Unregisters the clean-up hook. + * + * @param env Current running virtual machine context. + * @param fun Function pointer which will be triggered when environment is destroy. + * @param arg The argument is passed to the function pointer 'fun'. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(napi_env env, + void (*fun)(void* arg), + void* arg); + +/** + * @brief Registers an asynchronous clean-up hook for releasing resources when the environment exits. + * + * @param env Current running virtual machine context. + * @param hook The function pointer to call at environment teardown. + * @param arg The pointer to pass to `hook` when it gets called. + * @param remove_handle Optional handle that refers to the asynchronous cleanup. + * + * @return Returns the function execution status. + * @since 11 + */ NAPI_EXTERN napi_status napi_add_async_cleanup_hook(napi_env env, napi_async_cleanup_hook hook, void* arg, napi_async_cleanup_hook_handle* remove_handle); -NAPI_EXTERN napi_status napi_async_destroy(napi_env env, - napi_async_context async_context); + +/** + * @brief Unregisters the asynchronous clean-up hook. + * + * @param remove_handle Optional handle that refers to the asynchronous cleanup. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_remove_async_cleanup_hook(napi_async_cleanup_hook_handle remove_handle); + +/** + * @brief Creates an asynchronous context. The capabilities related to 'async_hook' are not supported currently. + * + * @param env Current running virtual machine context. + * @param async_resource Object associated with the async work that will be passed to possible 'async_hook'. + * @param async_resource_name Identifier for the kind of resource that is being provided for diagnostic information + * exposed by the async_hooks API. + * @param result The initialized async context. + * + * @return Returns the function execution status. + * @since 11 + */ NAPI_EXTERN napi_status napi_async_init(napi_env env, napi_value async_resource, napi_value async_resource_name, napi_async_context* result); -NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env, napi_callback_scope scope); + +/** + * @brief Destroys the previously created asynchronous context. The capabilities related to 'async_hook' are not supported currently. + * + * @param env Current running virtual machine context. + * @param async_context The async context to be destroyed. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_async_destroy(napi_env env, + napi_async_context async_context); + +/** + * @brief Opens a callback scope. The capabilities related to 'async_hook' are not supported currently. + * @param env Current running virtual machine context. + * @param resource_object The resource object to be passed to possible 'async_hook'. + * @param context The context environment for the async operation. + * @param result The generated callback scope. + * + * @return Returns the function execution status. + * @since 11 + */ NAPI_EXTERN napi_status napi_open_callback_scope(napi_env env, napi_value resource_object, napi_async_context context, napi_callback_scope* result); -NAPI_EXTERN napi_status node_api_get_module_file_name(napi_env env, const char** result); -// Create JSObject with initial properties given by descriptors, note that property key must be String, -// and must can not convert to element_index, also all keys must not duplicate. + +/** + * @brief Closes the callback scope. The capabilities related to 'async_hook' are not supported currently. + * + * @param env Current running virtual machine context. + * @param scope The callback scope to be closed. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env, + napi_callback_scope scope); + +/** + * @brief Obtains the absolute path of the location, from which the addon is loaded. + * + * @param env Current running virtual machine context. + * @param result The absolute path of the location of the loaded addon. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status node_api_get_module_file_name(napi_env env, + const char** result); + +/** + * @brief Create JSObject with initial properties given by descriptors, note that property key must be String, and + * must can not convert to element_index, also all keys must not duplicate. + * + * @param env Current running virtual machine context. + * @param result The created ArkTS object. + * @param property_count Number of the property descriptors. + * @param properties Array of property descriptors which are expected to be applied to the ArkTS object. + * + * @return Returns the function execution status. + * @since 11 + */ NAPI_EXTERN napi_status napi_create_object_with_properties(napi_env env, napi_value* result, size_t property_count, const napi_property_descriptor* properties); -// Create JSObject with initial properties given by keys and values, note that property key must be String, -// and must can not convert to element_index, also all keys must not duplicate. + +/** + * @brief Create JSObject with initial properties given by keys and values, note that property key must be String, and + * must can not convert to element_index, also all keys must not duplicate. + * + * @param env Current running virtual machine context. + * @param result The absolute path of the location of the loaded addon. + * @param property_count Number of the propertied which needs to be applied on the ArkTS object. + * @param keys Array of the keys of the properties. + * @param values Array of the values of the properties. + * + * @return Returns the function execution status. + * @since 11 + */ NAPI_EXTERN napi_status napi_create_object_with_named_properties(napi_env env, napi_value* result, size_t property_count, const char** keys, const napi_value* values); + /** * @brief This API sets native properties to a object and converts this js object to native binding object. * - * @param[in] env Current running virtual machine context. - * @param[in] js_object The JavaScript value to coerce. - * @param[in] detach_cb Native callback that can be used to detach the js object and the native object. - * @param[in] attach_cb Native callback that can be used to bind the js object and the native object. - * @param[in] native_object User-provided native instance to pass to thr detach callback and attach callback. - * @param[in] hint Optional hint to pass to the detach callback and attach callback. + * @param env Current running virtual machine context. + * @param js_object The JavaScript value to coerce. + * @param detach_cb Native callback that can be used to detach the js object and the native object. + * @param attach_cb Native callback that can be used to bind the js object and the native object. + * @param native_object User-provided native instance to pass to thr detach callback and attach callback. + * @param hint Optional hint to pass to the detach callback and attach callback. + * * @return Return the function execution status. * @since 11 */ @@ -160,16 +328,50 @@ NAPI_EXTERN napi_status napi_coerce_to_native_binding_object(napi_env env, napi_native_binding_attach_callback attach_cb, void* native_object, void* hint); + +/** + * @brief Adds a 'napi_finalize' callback, which will be called when the ArkTS object is garbage-collected. + * + * @param env Current running virtual machine context. + * @param js_object The ArkTS object value. + * @param native_object Native object to bind with the ArkTS object. + * @param finalize_cb Native callback that can be used to free the native object when the ArkTS object is + garbage-collected. + * @param finalize_hint Optional contextual hint that is passed to the finalize callback. + * @param result Optional reference of the ArkTS object. + * + * @return Return the function execution status. + * @since 11 + */ NAPI_EXTERN napi_status napi_add_finalizer(napi_env env, napi_value js_object, void* native_object, napi_finalize finalize_cb, void* finalize_hint, napi_ref* result); + +/** + * @brief The module is loaded through the NAPI. By default, the default object is exported from the module. + * + * @param env Current running virtual machine context. + * @param path Path name of the module to be loaded, like @ohos.hilog. + * @param module_info Path names of bundle and module, like com.example.application/entry. + * @param result Result of loading a module, which is an exported object of the module. + * + * @return Returns the function execution status. + * @since 12 + */ +NAPI_EXTERN napi_status napi_load_module_with_info(napi_env env, + const char* path, + const char* module_info, + napi_value* result); + /** * @brief Create the ark runtime. * * @param env Indicates the ark runtime environment. + * + * @return Return the function execution status. * @since 12 */ NAPI_EXTERN napi_status napi_create_ark_runtime(napi_env* env); @@ -178,11 +380,13 @@ NAPI_EXTERN napi_status napi_create_ark_runtime(napi_env* env); * @brief Destroy the ark runtime. * * @param env Indicates the ark runtime environment. + * + * @return Return the function execution status. * @since 12 */ NAPI_EXTERN napi_status napi_destroy_ark_runtime(napi_env* env); -/* +/** * @brief Defines a sendable class. * * @param env: The environment that the API is invoked under. @@ -192,9 +396,10 @@ NAPI_EXTERN napi_status napi_destroy_ark_runtime(napi_env* env); * @param data: Optional data to be passed to the constructor callback as the data property of the callback info. * @param property_count: Number of items in the properties array argument. * @param properties: Array of property descriptors describing static and instance data properties, accessors, and - * methods on the class. See napi_property_descriptor. + * methods on the class. See napi_property_descriptor. * @param parent: A napi_value representing the Superclass. * @param result: A napi_value representing the constructor function for the class. + * * @return Return the function execution status. * @since 12 */ @@ -214,116 +419,151 @@ NAPI_EXTERN napi_status napi_define_sendable_class(napi_env env, * @param env The environment that the API is invoked under. * @param value The napi_value to be checked. * @param result Boolean value that is set to true if napi_value is sendable, false otherwise. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_is_sendable(napi_env env, napi_value value, bool* result); +NAPI_EXTERN napi_status napi_is_sendable(napi_env env, + napi_value value, + bool* result); + /** * @brief Defines a sendable object. * * @param env The environment that the API is invoked under. * @param property_count The count of object properties. * @param properties Object properties. + * @param result The created sendable object. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_create_sendable_object_with_properties(napi_env env, size_t property_count, +NAPI_EXTERN napi_status napi_create_sendable_object_with_properties(napi_env env, + size_t property_count, const napi_property_descriptor* properties, napi_value* result); + /** * @brief Wraps a native instance in a ArkTS object. * * @param env The environment that the API is invoked under. * @param js_object The ArkTS object that will be the wrapper for the native object. * @param native_object The native instance that will be wrapped in the ArkTS object. - * @param finalize_lib Optional native callback that can be used to free the native instance when the ArkTS object + * @param finalize_cb Optional native callback that can be used to free the native instance when the ArkTS object * has been garbage-collected. * @param finalize_hint Optional contextual hint that is passed to the finalize callback. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_wrap_sendable(napi_env env, napi_value js_object, void* native_object, - napi_finalize finalize_cb, void* finalize_hint); +NAPI_EXTERN napi_status napi_wrap_sendable(napi_env env, + napi_value js_object, + void* native_object, + napi_finalize finalize_cb, + void* finalize_hint); + /** * @brief Wraps a native instance in a ArkTS object. * * @param env The environment that the API is invoked under. * @param js_object The ArkTS object that will be the wrapper for the native object. * @param native_object The native instance that will be wrapped in the ArkTS object. - * @param finalize_lib Optional native callback that can be used to free the native instance when the ArkTS object - * has been garbage-collected. + * @param finalize_cb Optional native callback that can be used to free the native instance when the ArkTS object + * has been garbage-collected. * @param finalize_hint Optional contextual hint that is passed to the finalize callback. * @param native_binding_size The size of native binding. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_wrap_sendable_with_size(napi_env env, napi_value js_object, void* native_object, - napi_finalize finalize_cb, void* finalize_hint, +NAPI_EXTERN napi_status napi_wrap_sendable_with_size(napi_env env, + napi_value js_object, + void* native_object, + napi_finalize finalize_cb, + void* finalize_hint, size_t native_binding_size); + /** * @brief Retrieves a native instance that was previously wrapped in a ArkTS object. * * @param env The environment that the API is invoked under. * @param js_object The object associated with the native instance. * @param result Pointer to the wrapped native instance. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_unwrap_sendable(napi_env env, napi_value js_object, void** result); +NAPI_EXTERN napi_status napi_unwrap_sendable(napi_env env, + napi_value js_object, + void** result); + /** * @brief Retrieves a native instance that was previously wrapped in a ArkTS object and removes the wrapping. * * @param env The environment that the API is invoked under. * @param js_object The object associated with the native instance. * @param result Pointer to the wrapped native instance. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_remove_wrap_sendable(napi_env env, napi_value js_object, void** result); -/* +NAPI_EXTERN napi_status napi_remove_wrap_sendable(napi_env env, + napi_value js_object, + void** result); + +/** * @brief Create a sendable array. * * @param env: The environment that the API is invoked under. * @param result: A napi_value representing a sendable array. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_create_sendable_array(napi_env env, napi_value* result); +NAPI_EXTERN napi_status napi_create_sendable_array(napi_env env, + napi_value* result); -/* +/** * @brief Create a sendable array with length. * * @param env: The environment that the API is invoked under. * @param length: The initial length of the sendable array. * @param result: A napi_value representing a sendable array. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_create_sendable_array_with_length(napi_env env, size_t length, napi_value* result); +NAPI_EXTERN napi_status napi_create_sendable_array_with_length(napi_env env, + size_t length, + napi_value* result); -/* +/** * @brief Create a sendable arraybuffer. * * @param env: The environment that the API is invoked under. * @param byte_length: The length in bytes of the sendable arraybuffer to create. * @param data: Pointer to the underlying byte buffer of the sendable arraybuffer. * @param result: A napi_value representing a sendable arraybuffer. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_create_sendable_arraybuffer(napi_env env, size_t byte_length, - void** data, napi_value* result); +NAPI_EXTERN napi_status napi_create_sendable_arraybuffer(napi_env env, + size_t byte_length, + void** data, + napi_value* result); -/* +/** * @brief Create a sendable typedarray. * * @param env: The environment that the API is invoked under. * @param type: Scalar datatype of the elements within the sendable typedarray. * @param length: Number of elements in the typedarray. * @param arraybuffer: Sendable arraybuffer underlying the sendable typedarray. - * @param byte_offset: The byte offset within the sendable arraybuffer from - * which to start projecting the sendable typedarray. + * @param byte_offset: The byte offset within the sendable arraybuffer from which to start projecting the + * sendable typedarray. * @param result: A napi_value representing a sendable typedarray. + * * @return Return the function execution status. * @since 12 */ @@ -341,10 +581,12 @@ NAPI_EXTERN napi_status napi_create_sendable_typedarray(napi_env env, * * @param env Current running virtual machine context. * @param mode Indicates the running mode of the native event loop. + * * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_run_event_loop(napi_env env, napi_event_mode mode); +NAPI_EXTERN napi_status napi_run_event_loop(napi_env env, + napi_event_mode mode); /** * @brief Stop the event loop in current thread. @@ -352,6 +594,7 @@ NAPI_EXTERN napi_status napi_run_event_loop(napi_env env, napi_event_mode mode); * Support to stop the running event loop in current native thread. * * @param env Current running virtual machine context. + * * @return Return the function execution status. * @since 12 */ @@ -365,9 +608,10 @@ NAPI_EXTERN napi_status napi_stop_event_loop(napi_env env); * @param transfer_list List of data to transfer in transfer mode. * @param clone_list List of Sendable data to transfer in clone mode. * @param result Serialization result of the JS object. + * * @return Returns the function execution status. * @since 12 -*/ + */ NAPI_EXTERN napi_status napi_serialize(napi_env env, napi_value object, napi_value transfer_list, @@ -380,20 +624,25 @@ NAPI_EXTERN napi_status napi_serialize(napi_env env, * @param env Current running virtual machine context. * @param buffer Data to deserialize. * @param object ArkTS object obtained by deserialization. + * * @return Returns the function execution status. * @since 12 -*/ -NAPI_EXTERN napi_status napi_deserialize(napi_env env, void* buffer, napi_value* object); + */ +NAPI_EXTERN napi_status napi_deserialize(napi_env env, + void* buffer, + napi_value* object); /** * @brief Delete serialization data. * * @param env Current running virtual machine context. * @param buffer Data to delete. + * * @return Returns the function execution status. * @since 12 -*/ -NAPI_EXTERN napi_status napi_delete_serialization_data(napi_env env, void* buffer); + */ +NAPI_EXTERN napi_status napi_delete_serialization_data(napi_env env, + void* buffer); /** * @brief Dispatch a task with specified priority from a native thread to an ArkTS thread, the task will execute @@ -405,6 +654,7 @@ NAPI_EXTERN napi_status napi_delete_serialization_data(napi_env env, void* buffe * @param isTail Indicates the way of the task dispatched into the native event queue. When "isTail" is true, * the task will be dispatched to the tail of the native event queue. Conversely, when "isTail" is false, the * tasks will be dispatched to the head of the native event queue. + * * @return Return the function execution status. * @since 12 */ @@ -412,7 +662,56 @@ NAPI_EXTERN napi_status napi_call_threadsafe_function_with_priority(napi_threads void *data, napi_task_priority priority, bool isTail); + +/** + * @brief Throws UncaughtException to ArkTS. + * @param env Current running virtual machine context. + * @param err Error object which is passed to 'UncaughtException'. + * + * @return Returns the function execution status. + * @since 12 + */ +NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, + napi_value err); + +/** + * @brief Allows a JS function to be called in the asynchronous context. The capabilities related to **async_hook** are not supported currently. + * @param env Current running virtual machine context. + * @param async_context The context environment for the async operation. + * @param recv The 'this' pointer of the function. + * @param func ArkTS function to be called. + * @param argc Size of the argument array which is passed to 'func'. + * @param argv Argument array. + * @param result Result returned by the ArkTS function. + * + * @return Returns the function execution status. + * @since 11 + */ +NAPI_EXTERN napi_status napi_make_callback(napi_env env, + napi_async_context async_context, + napi_value recv, + napi_value func, + size_t argc, + const napi_value* argv, + napi_value* result); + +/** + * @brief Creates a ArkTS buffer of the specified size. + * @param env Current running virtual machine context. + * @param length The size of the buffer to be created. + * @param data Raw pointer of the ArkTS buffer. + * @param result Result returned by the ArkTS function. + * + * @return Returns the function execution status. + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_buffer(napi_env env, + size_t length, + void** data, + napi_value* result); + #ifdef __cplusplus } #endif -#endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ + +#endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ \ No newline at end of file -- Gitee From 7a85976c707bac8e66259888c88aef9334243627 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Fri, 29 Nov 2024 11:09:46 +0800 Subject: [PATCH 196/630] capi JSDOC bug fix Signed-off-by: zhouchaobo Change-Id: I87a262b0ab9dc963d971841e993da5387dc33835 --- arkui/ace_engine/native/native_gesture.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index 42b37aa9c..4551c782c 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -649,6 +649,7 @@ int32_t OH_ArkUI_ParallelInnerGestureEvent_GetConflictRecognizers(ArkUI_Parallel * @param userData Indicates the custom data. * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. +* @since 12 */ int32_t OH_ArkUI_SetArkUIGestureRecognizerDisposeNotify(ArkUI_GestureRecognizer* recognizer, ArkUI_GestureRecognizerDisposeNotifyCallback callback, void* userData); -- Gitee From f4cdcaa9383551619262a869c2a04a608a2ac3a6 Mon Sep 17 00:00:00 2001 From: li-jianchao1993 Date: Fri, 29 Nov 2024 17:25:56 +0800 Subject: [PATCH 197/630] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=91=20=E4=B8=8A=E4=BC=A0=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-jianchao1993 --- multimedia/av_codec/native_avcodec_base.h | 16 ++++++++++++++++ .../av_codec/native_avcodec_videoencoder.h | 17 ++++++++++++++--- multimedia/av_codec/native_avdemuxer.h | 4 ++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index a9dbbaa7d..117d5783b 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -348,6 +348,7 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; * @brief Key for timeStamp in surface's extraData, value type is int64_t. * * @syscap SystemCapability.Multimedia.Media.CodecBase + * @deprecated since 14 * @since 9 */ extern const char *OH_ED_KEY_TIME_STAMP; @@ -355,6 +356,7 @@ extern const char *OH_ED_KEY_TIME_STAMP; * @brief Key for endOfStream in surface's extraData, value type is bool. * * @syscap SystemCapability.Multimedia.Media.CodecBase + * @deprecated since 14 * @since 9 */ extern const char *OH_ED_KEY_EOS; @@ -662,6 +664,8 @@ extern const char *OH_MD_KEY_SETUP_HEADER; * @brief Key for video scale type, value type is int32_t, see {@link OH_ScalingMode}. * * @syscap SystemCapability.Multimedia.Media.CodecBase + * @deprecated since 14 + * @useinstead OH_NativeWindow_NativeWindowSetScalingModeV2 * @since 10 */ extern const char *OH_MD_KEY_SCALING_MODE; @@ -1021,7 +1025,11 @@ typedef enum OH_HEVCProfile { HEVC_PROFILE_MAIN = 0, HEVC_PROFILE_MAIN_10 = 1, HEVC_PROFILE_MAIN_STILL = 2, + /* @deprecated since 14 + */ HEVC_PROFILE_MAIN_10_HDR10 = 3, + /* @deprecated since 14 + */ HEVC_PROFILE_MAIN_10_HDR10_PLUS = 4, } OH_HEVCProfile; @@ -1071,10 +1079,18 @@ typedef enum OH_AVSeekMode { * @brief Scaling Mode * * @syscap SystemCapability.Multimedia.Media.CodecBase + * @deprecated since 14 + * @useinstead OHScalingModeV2 * @since 10 */ typedef enum OH_ScalingMode { + /* @deprecated since 14 + * @useinstead OH_SCALING_MODE_SCALE_TO_WINDOW_V2 + */ SCALING_MODE_SCALE_TO_WINDOW = 1, + /* @deprecated since 14 + * @useinstead OH_SCALING_MODE_SCALE_CROP_V2 + */ SCALING_MODE_SCALE_CROP = 2, } OH_ScalingMode; diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h index e66569f4f..038a2f499 100644 --- a/multimedia/av_codec/native_avcodec_videoencoder.h +++ b/multimedia/av_codec/native_avcodec_videoencoder.h @@ -428,14 +428,25 @@ OH_AVErrCode OH_VideoEncoder_IsValid(OH_AVCodec *codec, bool *isValid); /** * @brief The bitrate mode of video encoder. * @syscap SystemCapability.Multimedia.Media.VideoEncoder + * @deprecated since 14 + * @useinstead OH_BitrateMode * @since 9 */ typedef enum OH_VideoEncodeBitrateMode { - /* constant bit rate mode. */ + /* constant bit rate mode. + * @deprecated since 14 + * @useinstead BITRATE_MODE_CBR + */ CBR = 0, - /* variable bit rate mode. */ + /* variable bit rate mode. + * @deprecated since 14 + * @useinstead BITRATE_MODE_VBR + */ VBR = 1, - /* constant quality mode. */ + /* constant quality mode. + * @deprecated since 14 + * @useinstead BITRATE_MODE_CQ + */ CQ = 2, } OH_VideoEncodeBitrateMode; diff --git a/multimedia/av_codec/native_avdemuxer.h b/multimedia/av_codec/native_avdemuxer.h index 491352815..8375deb8c 100644 --- a/multimedia/av_codec/native_avdemuxer.h +++ b/multimedia/av_codec/native_avdemuxer.h @@ -50,6 +50,8 @@ typedef struct DRM_MediaKeySystemInfo DRM_MediaKeySystemInfo; /** * @brief Callback for getting media key system information from media source. +* @deprecated since 14 +* @useinstead Demuxer_MediaKeySystemInfoCallback * @since 11 * @version 1.0 */ @@ -219,6 +221,8 @@ OH_AVErrCode OH_AVDemuxer_SetDemuxerMediaKeySystemInfoCallback(OH_AVDemuxer *dem * {@link AV_ERR_OPERATE_NOT_PERMIT} 2 - If the demuxer engine is not inited or init failed. * {@link AV_ERR_INVALID_VAL} 3 - If the demuxer instance is nullptr or invalid * or the mediaKeySystemInfo is nullptr. + * @deprecated since 14 + * @useinstead OH_AVDemuxer_SetDemuxerMediaKeySystemInfoCallback * @since 11 */ OH_AVErrCode OH_AVDemuxer_GetMediaKeySystemInfo(OH_AVDemuxer *demuxer, DRM_MediaKeySystemInfo *mediaKeySystemInfo); -- Gitee From 751072f1bdd16c346c06e169cda1baf88c68f5ac Mon Sep 17 00:00:00 2001 From: li-jianchao1993 Date: Fri, 29 Nov 2024 17:34:16 +0800 Subject: [PATCH 198/630] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=91=20OH=5FBitrateMode=E5=A4=B4=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BD=8D=E7=BD=AE=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-jianchao1993 --- multimedia/av_codec/native_avcapability.h | 15 +--------- multimedia/av_codec/native_avcodec_base.h | 29 ++++++++++++++++--- .../av_codec/native_avcodec_videoencoder.h | 6 ++-- multimedia/av_codec/native_avdemuxer.h | 17 +++++------ 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index 5f30e6c92..2b6288f4a 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -30,6 +30,7 @@ #include #include "native_averrors.h" #include "native_avformat.h" +#include "native_avcodec_base.h" #ifdef __cplusplus extern "C" { @@ -42,20 +43,6 @@ extern "C" { */ typedef struct OH_AVCapability OH_AVCapability; -/** - * @brief The bitrate mode of encoder. - * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 10 - */ -typedef enum OH_BitrateMode { - /* Constant Bit rate mode. */ - BITRATE_MODE_CBR = 0, - /* Variable Bit rate mode. */ - BITRATE_MODE_VBR = 1, - /* Constant Quality mode. */ - BITRATE_MODE_CQ = 2 -} OH_BitrateMode; - /** * @brief Range contain min and max value * @syscap SystemCapability.Multimedia.Media.CodecBase diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 117d5783b..579849f62 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1025,10 +1025,12 @@ typedef enum OH_HEVCProfile { HEVC_PROFILE_MAIN = 0, HEVC_PROFILE_MAIN_10 = 1, HEVC_PROFILE_MAIN_STILL = 2, - /* @deprecated since 14 + /** + * @deprecated since 14 */ HEVC_PROFILE_MAIN_10_HDR10 = 3, - /* @deprecated since 14 + /** + * @deprecated since 14 */ HEVC_PROFILE_MAIN_10_HDR10_PLUS = 4, } OH_HEVCProfile; @@ -1084,11 +1086,13 @@ typedef enum OH_AVSeekMode { * @since 10 */ typedef enum OH_ScalingMode { - /* @deprecated since 14 + /** + * @deprecated since 14 * @useinstead OH_SCALING_MODE_SCALE_TO_WINDOW_V2 */ SCALING_MODE_SCALE_TO_WINDOW = 1, - /* @deprecated since 14 + /** + * @deprecated since 14 * @useinstead OH_SCALING_MODE_SCALE_CROP_V2 */ SCALING_MODE_SCALE_CROP = 2, @@ -1250,6 +1254,23 @@ typedef enum OH_TemporalGopReferenceMode { UNIFORMLY_SCALED_REFERENCE = 2, } OH_TemporalGopReferenceMode; +/** + * @brief The bitrate mode of encoder. + * + * Change the location of the header file, since 14. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 10 + */ +typedef enum OH_BitrateMode { + /** Constant Bit rate mode. */ + BITRATE_MODE_CBR = 0, + /** Variable Bit rate mode. */ + BITRATE_MODE_VBR = 1, + /** Constant Quality mode. */ + BITRATE_MODE_CQ = 2 +} OH_BitrateMode; + #ifdef __cplusplus } #endif diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h index 038a2f499..2781353f0 100644 --- a/multimedia/av_codec/native_avcodec_videoencoder.h +++ b/multimedia/av_codec/native_avcodec_videoencoder.h @@ -433,17 +433,17 @@ OH_AVErrCode OH_VideoEncoder_IsValid(OH_AVCodec *codec, bool *isValid); * @since 9 */ typedef enum OH_VideoEncodeBitrateMode { - /* constant bit rate mode. + /** constant bit rate mode. * @deprecated since 14 * @useinstead BITRATE_MODE_CBR */ CBR = 0, - /* variable bit rate mode. + /** variable bit rate mode. * @deprecated since 14 * @useinstead BITRATE_MODE_VBR */ VBR = 1, - /* constant quality mode. + /** constant quality mode. * @deprecated since 14 * @useinstead BITRATE_MODE_CQ */ diff --git a/multimedia/av_codec/native_avdemuxer.h b/multimedia/av_codec/native_avdemuxer.h index 8375deb8c..738da2ed8 100644 --- a/multimedia/av_codec/native_avdemuxer.h +++ b/multimedia/av_codec/native_avdemuxer.h @@ -49,13 +49,12 @@ typedef struct OH_AVDemuxer OH_AVDemuxer; typedef struct DRM_MediaKeySystemInfo DRM_MediaKeySystemInfo; /** -* @brief Callback for getting media key system information from media source. -* @deprecated since 14 -* @useinstead Demuxer_MediaKeySystemInfoCallback -* @since 11 -* @version 1.0 -*/ -typedef void (*DRM_MediaKeySystemInfoCallback)(DRM_MediaKeySystemInfo* mediaKeySystemInfo); + * @brief Callback for getting media key system information from media source. + * @deprecated since 14 + * @useinstead Demuxer_MediaKeySystemInfoCallback + * @since 11 + */ +typedef void (*DRM_MediaKeySystemInfoCallback)(DRM_MediaKeySystemInfo *mediaKeySystemInfo); /** * @brief Call back will be invoked when updating DRM information. @@ -193,6 +192,8 @@ OH_AVErrCode OH_AVDemuxer_SeekToTime(OH_AVDemuxer *demuxer, int64_t millisecond, * @return {@link AV_ERR_OK} 0 - Success * {@link AV_ERR_OPERATE_NOT_PERMIT} 2 - If the demuxer engine is not inited or init failed. * {@link AV_ERR_INVALID_VAL} 3 - If the demuxer instance is nullptr or invalid. + * @deprecated since 14 + * @useinstead OH_AVDemuxer_SetDemuxerMediaKeySystemInfoCallback * @since 11 */ OH_AVErrCode OH_AVDemuxer_SetMediaKeySystemInfoCallback(OH_AVDemuxer *demuxer, @@ -221,8 +222,6 @@ OH_AVErrCode OH_AVDemuxer_SetDemuxerMediaKeySystemInfoCallback(OH_AVDemuxer *dem * {@link AV_ERR_OPERATE_NOT_PERMIT} 2 - If the demuxer engine is not inited or init failed. * {@link AV_ERR_INVALID_VAL} 3 - If the demuxer instance is nullptr or invalid * or the mediaKeySystemInfo is nullptr. - * @deprecated since 14 - * @useinstead OH_AVDemuxer_SetDemuxerMediaKeySystemInfoCallback * @since 11 */ OH_AVErrCode OH_AVDemuxer_GetMediaKeySystemInfo(OH_AVDemuxer *demuxer, DRM_MediaKeySystemInfo *mediaKeySystemInfo); -- Gitee From fd2199515b47aba85f6574c5784511c3d4e5633f Mon Sep 17 00:00:00 2001 From: = Date: Thu, 28 Nov 2024 16:05:16 +0800 Subject: [PATCH 199/630] =?UTF-8?q?=E6=8F=92=E5=85=A5=E6=96=B0=E5=AE=8F?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: = --- third_party/musl/ndk_script/BUILD.gn | 14 +++- .../musl/ndk_script/updated_version.py | 74 +++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100755 third_party/musl/ndk_script/updated_version.py diff --git a/third_party/musl/ndk_script/BUILD.gn b/third_party/musl/ndk_script/BUILD.gn index a71e33565..0e08fa68f 100644 --- a/third_party/musl/ndk_script/BUILD.gn +++ b/third_party/musl/ndk_script/BUILD.gn @@ -14,6 +14,7 @@ import("//build/config/clang/clang.gni") import("//build/ohos/ndk/ndk.gni") +import("//build/version.gni") import("//third_party/musl/musl_config.gni") import("//third_party/musl/musl_src.gni") import("//third_party/musl/musl_template.gni") @@ -21,6 +22,8 @@ import("//third_party/musl/musl_template.gni") musl_target_out_dir = "${root_out_dir}/obj/third_party/musl" ndk_musl_include = "ndk_musl_include" interface_musl_dir = "//interface/sdk_c/third_party/musl" +target_version_dir = "ndk_musl_include/info" +target_version_file = "application_target_sdk_version.h" if (host_os == "mac") { if (host_cpu == "arm64") { @@ -223,6 +226,15 @@ action("copy_ndk_musl_headers") { deps = [ ":copy_ndk_uapi" ] } +action("updated_version") { + outputs = [ "${musl_target_out_dir}/${target_version_dir}" ] + script = "updated_version.py" + args = [ "-p" ] + [ rebase_path( + "${musl_target_out_dir}/${target_version_dir}/${target_version_file}") ] + args += [ "-v" ] + [ api_version ] + deps = [ ":copy_ndk_musl_headers" ] +} + action("copy_musl_sysroot") { outputs = [ "${ndk_headers_out_dir}" ] script = "copy_musl_sysroot.sh" @@ -230,7 +242,7 @@ action("copy_musl_sysroot") { [ "-i" ] + [ rebase_path("${musl_target_out_dir}/${ndk_musl_include}") ] args += [ "-o" ] + [ rebase_path("${ndk_headers_out_dir}") ] args += [ "-t" ] + [ "${musl_arch}" ] - deps = [ ":copy_ndk_musl_headers" ] + deps = [ ":updated_version" ] } musl_libs_arm32 = [ diff --git a/third_party/musl/ndk_script/updated_version.py b/third_party/musl/ndk_script/updated_version.py new file mode 100755 index 000000000..362384527 --- /dev/null +++ b/third_party/musl/ndk_script/updated_version.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import argparse + + +# 插入新版宏内容 +def updated_version(file_path: str, new_version: int): + version_define = '#define OH_API_VERSION_' + version_current_define = '#define OH_CURRENT_API_VERSION OH_API_VERSION_' + # 需要插入的内容 + new_content = '' + # 插入的标志位置 + insert_after_line = '#define SDK_VERSION_9 9' + # 旧版本 + old_version = 9 + # 更新需插入的内容 + for i in range(new_version - old_version): + new_content += '{}{} {}\n'.format(version_define, old_version + i + 1, old_version + i + 1) + new_content_tag = '{}{}\n'.format(version_current_define, new_version) + new_content += new_content_tag + + with open(file_path, 'r') as fp: + lines = fp.readlines() + + # 查找插入位置的索引 + insert_position = None + for i, line in enumerate(lines): + if insert_after_line in line: + insert_position = i + 1 # 插入在该行之后 + break + + # 如果找到插入位置 + if (insert_position is not None) and (new_content_tag not in lines): + # 插入新内容 + lines.insert(insert_position, new_content) + # 更新修改后的内容 + with open(file_path, 'w') as fp: + fp.writelines(lines) + elif insert_position is None: + raise Exception('未找到插入位置: {},写入失败'.format(insert_after_line)) + + +# 入口 +def process_target_version(): + try: + parser = argparse.ArgumentParser(description='Updated version') + # 定义命令行参数 + parser.add_argument('-p', '--path', type=str, required=True, help='Path to the input file') + parser.add_argument('-v', '--version', type=str, required=True, help='Version of the api') + args = parser.parse_args() + # 获取文件路径和版本 + input_file = args.path + api_version = int(args.version) + # 写入新版宏内容 + updated_version(input_file, api_version) + except Exception as e: + raise e + + +if __name__ == '__main__': + process_target_version() -- Gitee From f6612c09efba780ccab0fad032297dd4101343da Mon Sep 17 00:00:00 2001 From: shilei Date: Sat, 30 Nov 2024 15:42:55 +0800 Subject: [PATCH 200/630] modify napi interface file Signed-off-by: shilei Change-Id: I82376d1940b90a71488a0efe0fbed61ea104a584 --- arkui/napi/common.h | 25 ++++++++++++++++++++++++- arkui/napi/native_api.h | 8 +++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/arkui/napi/common.h b/arkui/napi/common.h index e5e5c8d5e..b4a5f7b62 100644 --- a/arkui/napi/common.h +++ b/arkui/napi/common.h @@ -13,6 +13,28 @@ * limitations under the License. */ +/** + * @addtogroup ArkTS_Napi_NativeModule + * @{ + * + * + * @brief Provides native api of ArkTS native module. + * + * @since 10 + */ + +/** + * @file common.h + * + * @brief Defines common enum types of ArkTS native module. + * + * @kit ArkTS + * @library libace_napi.z.so + * @syscap SystemCapability.ArkUI.ArkUI.Napi + * @since 10 + * @version 1.0 + */ + #ifndef FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_COMMON_H #define FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_COMMON_H @@ -67,4 +89,5 @@ typedef enum { napi_priority_idle = 3, } napi_task_priority; -#endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ \ No newline at end of file +#endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ +/** @} */ diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h index d140aa622..a3d08dd7b 100644 --- a/arkui/napi/native_api.h +++ b/arkui/napi/native_api.h @@ -13,8 +13,6 @@ * limitations under the License. */ -#ifndef FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H -#define FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H /** * @addtogroup ArkTS_Napi_NativeModule * @{ @@ -37,6 +35,9 @@ * @version 1.0 */ +#ifndef FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H +#define FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H + #ifndef NAPI_VERSION #define NAPI_VERSION 8 #endif // NAPI_VERSION @@ -714,4 +715,5 @@ NAPI_EXTERN napi_status napi_create_buffer(napi_env env, } #endif -#endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ \ No newline at end of file +#endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ +/** @} */ -- Gitee From 69462b6fc381c9ec07762bc202dfc54a267ac047 Mon Sep 17 00:00:00 2001 From: shilei Date: Mon, 2 Dec 2024 21:59:17 +0800 Subject: [PATCH 201/630] modify napi interface notation Signed-off-by: shilei Change-Id: Ic4ce6c44c1ee8d9afe097d7d443d360a11281563 --- arkui/napi/common.h | 2 +- arkui/napi/native_api.h | 61 +++++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/arkui/napi/common.h b/arkui/napi/common.h index b4a5f7b62..6e8ac4aa0 100644 --- a/arkui/napi/common.h +++ b/arkui/napi/common.h @@ -90,4 +90,4 @@ typedef enum { } napi_task_priority; #endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ -/** @} */ +/** @} */ \ No newline at end of file diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h index a3d08dd7b..b05497312 100644 --- a/arkui/napi/native_api.h +++ b/arkui/napi/native_api.h @@ -129,7 +129,8 @@ NAPI_EXTERN napi_status napi_load_module(napi_env env, * * @param env Current running virtual machine context. * @param data Data item to bind with the 'env'. - * @param finalize_cb Optional native callback that will be triggered when 'env' is destroyed or this interface repeatedly calls. + * @param finalize_cb Optional native callback that will be triggered when 'env' is destroyed or this interface + * repeatedly calls. * @param finalize_hint Optional contextual hint that is passed to the finalize callback. * * @return Returns the function execution status. @@ -224,7 +225,8 @@ NAPI_EXTERN napi_status napi_async_init(napi_env env, napi_async_context* result); /** - * @brief Destroys the previously created asynchronous context. The capabilities related to 'async_hook' are not supported currently. + * @brief Destroys the previously created asynchronous context. The capabilities related to 'async_hook' are not + * supported currently. * * @param env Current running virtual machine context. * @param async_context The async context to be destroyed. @@ -390,16 +392,16 @@ NAPI_EXTERN napi_status napi_destroy_ark_runtime(napi_env* env); /** * @brief Defines a sendable class. * - * @param env: The environment that the API is invoked under. - * @param utf8name: Name of the ArkTS constructor function. - * @param length: The length of the utf8name in bytes, or NAPI_AUTO_LENGTH if it is null-terminated. - * @param constructor: Callback function that handles constructing instances of the class. - * @param data: Optional data to be passed to the constructor callback as the data property of the callback info. - * @param property_count: Number of items in the properties array argument. - * @param properties: Array of property descriptors describing static and instance data properties, accessors, and + * @param env The environment that the API is invoked under. + * @param utf8name Name of the ArkTS constructor function. + * @param length The length of the utf8name in bytes, or NAPI_AUTO_LENGTH if it is null-terminated. + * @param constructor Callback function that handles constructing instances of the class. + * @param data Optional data to be passed to the constructor callback as the data property of the callback info. + * @param property_count Number of items in the properties array argument. + * @param properties Array of property descriptors describing static and instance data properties, accessors, and * methods on the class. See napi_property_descriptor. - * @param parent: A napi_value representing the Superclass. - * @param result: A napi_value representing the constructor function for the class. + * @param parent A napi_value representing the Superclass. + * @param result A napi_value representing the constructor function for the class. * * @return Return the function execution status. * @since 12 @@ -439,7 +441,7 @@ NAPI_EXTERN napi_status napi_is_sendable(napi_env env, * @return Return the function execution status. * @since 12 */ -NAPI_EXTERN napi_status napi_create_sendable_object_with_properties(napi_env env, +NAPI_EXTERN napi_status napi_create_sendable_object_with_properties(napi_env env, size_t property_count, const napi_property_descriptor* properties, napi_value* result); @@ -515,8 +517,8 @@ NAPI_EXTERN napi_status napi_remove_wrap_sendable(napi_env env, /** * @brief Create a sendable array. * - * @param env: The environment that the API is invoked under. - * @param result: A napi_value representing a sendable array. + * @param env The environment that the API is invoked under. + * @param result A napi_value representing a sendable array. * * @return Return the function execution status. * @since 12 @@ -527,9 +529,9 @@ NAPI_EXTERN napi_status napi_create_sendable_array(napi_env env, /** * @brief Create a sendable array with length. * - * @param env: The environment that the API is invoked under. - * @param length: The initial length of the sendable array. - * @param result: A napi_value representing a sendable array. + * @param env The environment that the API is invoked under. + * @param length The initial length of the sendable array. + * @param result A napi_value representing a sendable array. * * @return Return the function execution status. * @since 12 @@ -541,10 +543,10 @@ NAPI_EXTERN napi_status napi_create_sendable_array_with_length(napi_env env, /** * @brief Create a sendable arraybuffer. * - * @param env: The environment that the API is invoked under. - * @param byte_length: The length in bytes of the sendable arraybuffer to create. - * @param data: Pointer to the underlying byte buffer of the sendable arraybuffer. - * @param result: A napi_value representing a sendable arraybuffer. + * @param env The environment that the API is invoked under. + * @param byte_length The length in bytes of the sendable arraybuffer to create. + * @param data Pointer to the underlying byte buffer of the sendable arraybuffer. + * @param result A napi_value representing a sendable arraybuffer. * * @return Return the function execution status. * @since 12 @@ -557,13 +559,13 @@ NAPI_EXTERN napi_status napi_create_sendable_arraybuffer(napi_env env, /** * @brief Create a sendable typedarray. * - * @param env: The environment that the API is invoked under. - * @param type: Scalar datatype of the elements within the sendable typedarray. - * @param length: Number of elements in the typedarray. - * @param arraybuffer: Sendable arraybuffer underlying the sendable typedarray. - * @param byte_offset: The byte offset within the sendable arraybuffer from which to start projecting the + * @param env The environment that the API is invoked under. + * @param type Scalar datatype of the elements within the sendable typedarray. + * @param length Number of elements in the typedarray. + * @param arraybuffer Sendable arraybuffer underlying the sendable typedarray. + * @param byte_offset The byte offset within the sendable arraybuffer from which to start projecting the * sendable typedarray. - * @param result: A napi_value representing a sendable typedarray. + * @param result A napi_value representing a sendable typedarray. * * @return Return the function execution status. * @since 12 @@ -676,7 +678,8 @@ NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, napi_value err); /** - * @brief Allows a JS function to be called in the asynchronous context. The capabilities related to **async_hook** are not supported currently. + * @brief Allows a JS function to be called in the asynchronous context. The capabilities related to 'async_hook' are + * not supported currently. * @param env Current running virtual machine context. * @param async_context The context environment for the async operation. * @param recv The 'this' pointer of the function. @@ -716,4 +719,4 @@ NAPI_EXTERN napi_status napi_create_buffer(napi_env env, #endif #endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ -/** @} */ +/** @} */ \ No newline at end of file -- Gitee From 0f33a75ff0fd9a791685a11e2799f16569223f14 Mon Sep 17 00:00:00 2001 From: yuhaoqiang Date: Tue, 3 Dec 2024 09:53:50 +0800 Subject: [PATCH 202/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=98=BE=E5=AD=98=E7=9A=84=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=88=9D=E6=AC=A1=E5=BC=95=E5=85=A5=E4=B8=BAapi14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuhaoqiang --- hiviewdfx/hidebug/libhidebug.ndk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiviewdfx/hidebug/libhidebug.ndk.json b/hiviewdfx/hidebug/libhidebug.ndk.json index 45be9500b..02d50bda9 100644 --- a/hiviewdfx/hidebug/libhidebug.ndk.json +++ b/hiviewdfx/hidebug/libhidebug.ndk.json @@ -36,7 +36,7 @@ "name": "OH_HiDebug_StopAppTraceCapture" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_HiDebug_GetGraphicsMemory" } ] \ No newline at end of file -- Gitee From b00e0f9d117805c76a523bb710849fc87104271e Mon Sep 17 00:00:00 2001 From: z30053720 Date: Tue, 3 Dec 2024 14:17:17 +0800 Subject: [PATCH 203/630] add tag Signed-off-by: z30053720 --- arkui/ace_engine/native/native_dialog.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 95b1a6cbe..c399920d7 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -325,3 +325,4 @@ int32_t OH_ArkUI_DialogDismissEvent_GetDismissReason(ArkUI_DialogDismissEvent* e #endif #endif // ARKUI_NATIVE_DIALOG_H +/** @} */ -- Gitee From c50e4cf69cddbe7ac45c93469c26ed02642919a0 Mon Sep 17 00:00:00 2001 From: GuoLi Date: Wed, 4 Dec 2024 15:57:13 +0800 Subject: [PATCH 204/630] =?UTF-8?q?API=20Lint=E5=91=8A=E8=AD=A6=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: GuoLi --- network/netmanager/include/net_connection.h | 6 +++--- .../netmanager/include/net_connection_type.h | 6 +++--- network/netssl/include/net_ssl_c.h | 7 ++++--- network/netssl/include/net_ssl_c_type.h | 7 ++++--- network/netstack/net_websocket/net_websocket.h | 17 +++++++++-------- .../netstack/net_websocket/net_websocket_type.h | 7 ++++--- 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/network/netmanager/include/net_connection.h b/network/netmanager/include/net_connection.h index 6c5c4c2f2..13294313d 100644 --- a/network/netmanager/include/net_connection.h +++ b/network/netmanager/include/net_connection.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NATIVE_NET_CONN_API_H -#define NATIVE_NET_CONN_API_H - /** * @addtogroup NetConnection * @{ @@ -38,6 +35,9 @@ * @version 1.0 */ +#ifndef NATIVE_NET_CONN_API_H +#define NATIVE_NET_CONN_API_H + #include #include "net_connection_type.h" diff --git a/network/netmanager/include/net_connection_type.h b/network/netmanager/include/net_connection_type.h index 40e80760b..663f39a7d 100644 --- a/network/netmanager/include/net_connection_type.h +++ b/network/netmanager/include/net_connection_type.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NATIVE_NET_CONN_TYPE_H -#define NATIVE_NET_CONN_TYPE_H - /** * @addtogroup NetConnection * @{ @@ -38,6 +35,9 @@ * */ +#ifndef NATIVE_NET_CONN_TYPE_H +#define NATIVE_NET_CONN_TYPE_H + #include #include #include diff --git a/network/netssl/include/net_ssl_c.h b/network/netssl/include/net_ssl_c.h index 779ccab79..136ab3ca3 100644 --- a/network/netssl/include/net_ssl_c.h +++ b/network/netssl/include/net_ssl_c.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NET_SSL_C_H -#define NET_SSL_C_H - /** * @addtogroup netstack * @{ @@ -38,6 +35,9 @@ * @version 1.0 */ +#ifndef NET_SSL_C_H +#define NET_SSL_C_H + #include "net_ssl_c_type.h" #ifdef __cplusplus @@ -113,4 +113,5 @@ void OH_Netstack_DestroyCertificatesContent(NetStack_Certificates *certs); } #endif +/** @} */ #endif // NET_SSL_C_H diff --git a/network/netssl/include/net_ssl_c_type.h b/network/netssl/include/net_ssl_c_type.h index d0bbea496..cea7eba7e 100644 --- a/network/netssl/include/net_ssl_c_type.h +++ b/network/netssl/include/net_ssl_c_type.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NET_SSL_C_TYPE_H -#define NET_SSL_C_TYPE_H - /** * @addtogroup netstack * @{ @@ -37,6 +34,9 @@ * @version 1.0 */ +#ifndef NET_SSL_C_TYPE_H +#define NET_SSL_C_TYPE_H + #include #ifdef __cplusplus #include @@ -134,4 +134,5 @@ typedef struct NetStack_Certificates { } #endif +/** @} */ #endif // NET_SSL_C_TYPE_H diff --git a/network/netstack/net_websocket/net_websocket.h b/network/netstack/net_websocket/net_websocket.h index 6506ba5fa..5381cb8ac 100755 --- a/network/netstack/net_websocket/net_websocket.h +++ b/network/netstack/net_websocket/net_websocket.h @@ -13,13 +13,6 @@ * limitations under the License. */ -#ifndef NET_WEBSOCKET_H -#define NET_WEBSOCKET_H - -#include -#include -#include - /** * @addtogroup netstack * @{ @@ -42,6 +35,13 @@ * @version 1.0 */ +#ifndef NET_WEBSOCKET_H +#define NET_WEBSOCKET_H + +#include +#include +#include + #include "net_websocket_type.h" #ifdef __cplusplus @@ -54,7 +54,7 @@ extern "C" { * @param onOpen Callback function invoked when a connection setup message is received. * @param onMessage Callback function invoked when a message is received. * @param onError Callback function invoked when a connection error message is received. - * @param onClose Callback function invoked when a connection closing message is closed. + * @param onclose Callback function invoked when a connection closing message is closed. * * @return Pointer to the websocket client if success; NULL otherwise. * @syscap SystemCapability.Communication.NetStack @@ -133,4 +133,5 @@ int OH_WebSocketClient_Destroy(struct WebSocket *client); } #endif +/** @} */ #endif // NET_WEBSOCKET_H diff --git a/network/netstack/net_websocket/net_websocket_type.h b/network/netstack/net_websocket/net_websocket_type.h index c22e5ce13..c5f6f7b05 100755 --- a/network/netstack/net_websocket/net_websocket_type.h +++ b/network/netstack/net_websocket/net_websocket_type.h @@ -13,9 +13,6 @@ * limitations under the License. */ -#ifndef NET_WEBSOCKET_TYPE_H -#define NET_WEBSOCKET_TYPE_H - /** * @addtogroup netstack * @{ @@ -37,6 +34,9 @@ * @version 1.0 */ +#ifndef NET_WEBSOCKET_TYPE_H +#define NET_WEBSOCKET_TYPE_H + #ifdef __cplusplus extern "C" { #endif @@ -280,4 +280,5 @@ typedef enum WebSocket_ErrCode { } #endif +/** @} */ #endif // NET_WEBSOCKET_TYPE_H \ No newline at end of file -- Gitee From ecd3d57ab4c51b0bb98d6c40351ea660f04e476f Mon Sep 17 00:00:00 2001 From: zoulinken Date: Wed, 4 Dec 2024 17:30:17 +0800 Subject: [PATCH 205/630] =?UTF-8?q?ActiveChild=E6=8E=A5=E5=8F=A3=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f20102e7c..fd1db5f20 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7819,7 +7819,7 @@ int32_t OH_ArkUI_NodeUtils_GetCustomProperty(ArkUI_NodeHandle node, const char* ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetParentInPageTree(ArkUI_NodeHandle node); /** - * @brief Retrieve all active child nodes of a node. + * @brief Retrieve all active child nodes of a node. Span and ImageSpan will not be counted in the children. * * @param head Pass in the node that needs to be obtained. * @param handle The structure corresponding to the sub node information of the head node. -- Gitee From 1c202d84b6fbfa6e69bb8ba836d298268dc59812 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Wed, 4 Dec 2024 20:36:02 +0800 Subject: [PATCH 206/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0CreateScaledPixelmap?= =?UTF-8?q?=E7=9A=84NDK=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- .../include/image/pixelmap_native.h | 36 +++++++++++++++++++ .../image_framework/libpixelmap.ndk.json | 8 +++++ 2 files changed, 44 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index c7ea3eb57..6d2f8eafa 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -738,6 +738,42 @@ Image_ErrorCode OH_PixelmapNative_Scale(OH_PixelmapNative *pixelmap, float scale Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing(OH_PixelmapNative *pixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level); +/** + * @brief Create a scaled pixelmap based on the source pixelmap and the input width and height. + * + * @param srcpixelmap The source native pixelmap. + * @param dstpixelmap The destination native pixelmap for create. + * @param scaleX Scaling ratio of the width. + * @param scaleY Scaling ratio of the height. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the execution is successful. + * {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid. + * @see OH_PixelmapNative + * @since 16 + */ +Image_ErrorCode OH_PixelmapNative_CreateScaledPixelmap(OH_PixelmapNative *srcpixelmap, OH_PixelmapNative **dstpixelmap, + float scaleX, float scaleY); + +/** + * @brief Create a scaled pixelmap based on the source pixelmap and the input width and height with anti-aliasing. + * + * @param srcpixelmap The source native pixelmap. + * @param dstpixelmap The destination native pixelmap for create. + * @param scaleX Scaling ratio of the width. + * @param scaleY Scaling ratio of the height. + * @param level The anti-aliasing algorithm to be used. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the execution is successful. + * {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid. + * {@link IMAGE_TOO_LARGE} If image is too large. + * {@link IMAGE_ALLOC_FAILED} If device has no memory. + * {@link IMAGE_UNKNOWN_ERROR} Inner unknown error, maybe source pixelmap is released. + * @see OH_PixelmapNative + * @since 16 + */ +Image_ErrorCode OH_PixelmapNative_CreateScaledPixelmapWithAntiAliasing(OH_PixelmapNative *srcpixelmap, + OH_PixelmapNative **dstpixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level); + /** * @brief Translates this image based on the input coordinates. * diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 4c103c8ae..ee5f2aee6 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -123,6 +123,14 @@ "first_introduced": "12", "name": "OH_PixelmapNative_ScaleWithAntiAliasing" }, + { + "first_introduced": "16", + "name": "OH_PixelmapNative_CreateScaledPixelmap" + }, + { + "first_introduced": "16", + "name": "OH_PixelmapNative_CreateScaledPixelmapWithAntiAliasing" + }, { "first_introduced": "12", "name": "OH_PixelmapNative_Translate" -- Gitee From cdbb6e85d403d580e568478eed5b0569883570d0 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Wed, 4 Dec 2024 20:42:58 +0800 Subject: [PATCH 207/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=20?= =?UTF-8?q?PixelMap=20=E5=A4=A7=E5=B0=8F=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- .../include/image/pixelmap_native.h | 26 +++++++++++++++++++ .../image_framework/libpixelmap.ndk.json | 8 ++++++ 2 files changed, 34 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 6d2f8eafa..858043a65 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -937,6 +937,32 @@ Image_ErrorCode OH_PixelmapNative_SetColorSpaceNative(OH_PixelmapNative *pixelma */ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, char *name, size_t *size); +/** + * @brief Get the total number of bytes occupied by all pixels in the Pixelmap, without any padding. + * + * @param pixelmap The Pixelmap pointer to be operated. + * @param byteCount The total number of bytes to be retrieved. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. + * @see OH_PixelmapNative + * @since 16 + */ +Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint32_t *byteCount); + +/** + * @brief Get the capacity of the Pixelmap, which is the number of bytes allocated by the Pixelmap. + * + * @param pixelmap The Pixelmap pointer to be operated. + * @param capacity The capacity to be retrieved. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. + * @see OH_PixelmapNative + * @since 16 + */ +Image_ErrorCode OH_PixelmapNative_GetCapacity(OH_PixelmapNative *pixelmap, uint32_t *capacity); + #ifdef __cplusplus }; #endif diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index ee5f2aee6..8eed2ffed 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -190,5 +190,13 @@ { "first_introduced": "13", "name": "OH_PixelmapNative_SetMemoryName" + }, + { + "first_introduced": "16", + "name": "OH_PixelmapNative_GetByteCount" + }, + { + "first_introduced": "16", + "name": "OH_PixelmapNative_GetCapacity" } ] \ No newline at end of file -- Gitee From 129e2c2c25877dc0802d1cd3534bd4a6c4729b03 Mon Sep 17 00:00:00 2001 From: Hu_zq Date: Tue, 3 Dec 2024 14:57:15 +0800 Subject: [PATCH 208/630] Swiper: add capi PageFlipMode Signed-off-by: Hu_zq Change-Id: Icaf32e5775580fa20737835a044b18b68eef0bc0 --- arkui/ace_engine/native/native_node.h | 13 +++++++++++++ arkui/ace_engine/native/native_type.h | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f20102e7c..54b9efd3b 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4954,6 +4954,19 @@ typedef enum { */ NODE_SWIPER_INDICATOR_INTERACTIVE, + /** + * @brief Sets the page flipping mode using the mouse wheel. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: page flipping mode using the mouse wheel. The parameter type is {@link ArkUI_PageFlipMode}. \n + * \n + * Format of the return value {@link ArkUI_PageFlipMode}:\n + * .value[0].i32: page flipping mode using the mouse wheel. \n + * + * @since 14 + */ + NODE_SWIPER_PAGE_FLIP_MODE, + /** * @brief: Set the delineation component of the ListItem, supporting property settings, property resets, and * property acquisition interfaces. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index ca825e62b..f5c62284c 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -773,6 +773,19 @@ typedef enum { ARKUI_SWIPER_NESTED_SRCOLL_SELF_FIRST, } ArkUI_SwiperNestedScrollMode; +/** + * @brief Enumerates the page flipping modes using the mouse wheel for the Swiper component. + * + * @since 14 + */ +typedef enum { + /** When the mouse wheel is scrolled continuously, multiple pages are flipped, which is determined by the number of + * times that mouse events are reported. */ + ARKUI_PAGE_FLIP_MODE_CONTINUOUS = 0, + /** The system does not respond to other mouse wheel events until the page flipping animation ends. */ + ARKUI_PAGE_FLIP_MODE_SINGLE, +} ArkUI_PageFlipMode; + /** * @brief Enumerates the accessibility modes. * -- Gitee From 8623f6f60c313720a316ddf2a8e7213e4d825984 Mon Sep 17 00:00:00 2001 From: lilanqing Date: Thu, 5 Dec 2024 20:15:06 +0800 Subject: [PATCH 209/630] sync Signed-off-by: lilanqing --- .../native/native_interface_xcomponent.h | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index 301d2a6b9..c06d6cec6 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -724,6 +724,30 @@ int32_t OH_NativeXComponent_AttachNativeRootNode(OH_NativeXComponent* component, */ int32_t OH_NativeXComponent_DetachNativeRootNode(OH_NativeXComponent* component, ArkUI_NodeHandle root); +/** + * @brief Registers a callback for this OH_NativeXComponent instance. + * + * @param component Indicates the pointer to this OH_NativeXComponent instance. + * @param callback Indicates the pointer to a surface show event callback. + * @return Returns the status code of the execution. + * @since 12 + * @version 1.0 + */ +int32_t OH_NativeXComponent_RegisterSurfaceShowCallback( + OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent* component, void* window)); + +/** + * @brief Registers a callback for this OH_NativeXComponent instance. + * + * @param component Indicates the pointer to this OH_NativeXComponent instance. + * @param callback Indicates the pointer to a surface hide event callback. + * @return Returns the status code of the execution. + * @since 12 + * @version 1.0 + */ +int32_t OH_NativeXComponent_RegisterSurfaceHideCallback( + OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent* component, void* window)); + /** * @brief Registers a UI input event callback for this OH_NativeXComponent instance and enables the callback to * be invoked when a UI input event is received. @@ -753,30 +777,6 @@ int32_t OH_NativeXComponent_RegisterUIInputEventCallback( */ int32_t OH_NativeXComponent_SetNeedSoftKeyboard(OH_NativeXComponent* component, bool needSoftKeyboard); -/** - * @brief Registers a callback for this OH_NativeXComponent instance. - * - * @param component Indicates the pointer to this OH_NativeXComponent instance. - * @param callback Indicates the pointer to a surface show event callback. - * @return Returns the status code of the execution. - * @since 12 - * @version 1.0 - */ -int32_t OH_NativeXComponent_RegisterSurfaceShowCallback( - OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent* component, void* window)); - -/** - * @brief Registers a callback for this OH_NativeXComponent instance. - * - * @param component Indicates the pointer to this OH_NativeXComponent instance. - * @param callback Indicates the pointer to a surface hide event callback. - * @return Returns the status code of the execution. - * @since 12 - * @version 1.0 - */ -int32_t OH_NativeXComponent_RegisterSurfaceHideCallback( - OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent* component, void* window)); - /** * @brief Registers a custom event intercept callback for this OH_NativeXComponent and enables the callback * during the hit test. -- Gitee From 2a9912d9d922e78bcc97dae3400344c3e213567b Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Thu, 5 Dec 2024 22:22:29 +0800 Subject: [PATCH 210/630] =?UTF-8?q?[L]=20=E4=BF=AE=E6=94=B9c-api=20node=5F?= =?UTF-8?q?z=5Findex=20Signed-off-by:lisitaolisitao3@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/native_node.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f20102e7c..5fd1c293c 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -475,10 +475,10 @@ typedef enum { * This attribute 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: z-index value. \n + * .value[0].i32: z-index value. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].f32: z-index value. \n + * .value[0].i32: z-index value. \n * */ NODE_Z_INDEX, -- Gitee From c62c7103575bde59076f2600d3a7d6f436cecf7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=86=AC=E5=86=AC=E5=86=AC?= Date: Tue, 26 Nov 2024 10:40:15 +0800 Subject: [PATCH 211/630] Message:fixCodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑冬冬冬 --- .../hicollie/include/hicollie/hicollie.h | 86 +++++++++++++++++++ hiviewdfx/hicollie/libhicollie.ndk.json | 8 ++ 2 files changed, 94 insertions(+) diff --git a/hiviewdfx/hicollie/include/hicollie/hicollie.h b/hiviewdfx/hicollie/include/hicollie/hicollie.h index 8ad4bddcf..ddf579d30 100644 --- a/hiviewdfx/hicollie/include/hicollie/hicollie.h +++ b/hiviewdfx/hicollie/include/hicollie/hicollie.h @@ -62,6 +62,26 @@ typedef enum HiCollie_ErrorCode { HICOLLIE_WRONG_THREAD_CONTEXT = 29800001, /** Remote call failed */ HICOLLIE_REMOTE_FAILED = 29800002, + /** + * Invalid timer name + * @since 16 + */ + HICOLLIE_INVALID_TIMER_NAME = 29800003, + /** + * Invalid timeout value + * @since 16 + */ + HICOLLIE_INVALID_TIMEOUT_VALUE = 29800004, + /** + * Wrong process context + * @since 16 + */ + HICOLLIE_WRONG_PROCESS_CONTEXT = 29800005, + /** + * The pointer used to save returned timer id should not be NULL + * @since 16 + */ + HICOLLIE_WRONG_TIMER_ID_OUTPUT_PARAM = 29800006, } HiCollie_ErrorCode; /** @@ -154,6 +174,72 @@ HiCollie_ErrorCode OH_HiCollie_Init_JankDetection(OH_HiCollie_BeginFunc* beginFu */ HiCollie_ErrorCode OH_HiCollie_Report(bool* isSixSecond); +/** + * @brief When user call {@link OH_HiCollie_SetTimer} and do not call {@link OH_HiCollie_CancelTimer} + * in specific time, the callback function will be executed. + * + * @since 16 + */ +typedef void (*OH_HiCollie_Callback)(void*); + +/** + * @brief Defines the actions that will be executed when timeout happens. + * + * @since 16 + */ +typedef enum HiCollie_Flag { + /** Default action is generate log file and do recovery */ + HICOLLIE_FLAG_DEFAULT = (~0), + /* Do nothing except call the callback function */ + HICOLLIE_FLAG_NOOP = (0), + /* Generate log file */ + HICOLLIE_FLAG_LOG = (1 << 0), + /* Do recovery by call the exit syscall */ + HICOLLIE_FLAG_RECOVERY = (1 << 1) +} HiCollie_Flag; + +/** +* @brief Defines the input parameter for {@link OH_HiCollie_SetTimer} +* +* @since 16 +*/ +typedef struct HiCollie_SetTimerParam { + /** The timer name */ + const char *name; + /** The timeout threshold in seconds */ + unsigned int timeout; + /** The callback function which is excuted when timeout happen */ + OH_HiCollie_Callback func; + /** The callback function's parameter */ + void *arg; + /** The action when timeout happens. Please refer to {@link HiCollie_Flag} */ + HiCollie_Flag flag; +} HiCollie_SetTimerParam; + +/** + * @brief This function should be used before calling a time-consuming function + * + * @param param Define the input parameter. + * @param id The pointer used to save returned timer id, it should not be NULL. + * @return {@link HICOLLIE_SUCCESS} 0 - Success. + * {@link HICOLLIE_INVALID_TIMER_NAME} 29800003 - Invalid timer name, it should not be NULL or empty string. + * {@link HICOLLIE_INVALID_TIMEOUT_VALUE} 29800004 - Invalid timeout value. + * {@link HICOLLIE_WRONG_PROCESS_CONTEXT} 29800005 - Invalid process context, you should not call it + * from appspawn and native process. + * {@link HICOLLIE_WRONG_TIMER_ID_OUTPUT_PARAM} 29800006 - The pointer used to save returned timer id + * should not be NULL. + * @since 16 + */ +HiCollie_ErrorCode OH_HiCollie_SetTimer(HiCollie_SetTimerParam param, int *id); + +/** + * @brief Cancel the timer right after calling the time-consuming function. + * + * @param id The timer id that is return from {@link OH_HiCollie_SetTimer}. + * @since 16 + */ +void OH_HiCollie_CancelTimer(int id); + #ifdef __cplusplus } #endif diff --git a/hiviewdfx/hicollie/libhicollie.ndk.json b/hiviewdfx/hicollie/libhicollie.ndk.json index 4684c9899..bec806ac1 100644 --- a/hiviewdfx/hicollie/libhicollie.ndk.json +++ b/hiviewdfx/hicollie/libhicollie.ndk.json @@ -10,5 +10,13 @@ { "first_introduced": "12", "name": "OH_HiCollie_Report" + }, + { + "first_introduced": "16", + "name": "OH_HiCollie_SetTimer" + }, + { + "first_introduced": "16", + "name": "OH_HiCollie_CancelTimer" } ] -- Gitee From 58c84e185e270db910af4fd89a06383dccb78225 Mon Sep 17 00:00:00 2001 From: changleipeng Date: Fri, 6 Dec 2024 15:27:35 +0800 Subject: [PATCH 212/630] add drawing_error_code.h Signed-off-by: changleipeng Change-Id: I6083b006cdd57cc05f681c8db094972e22bfbb84 --- graphic/graphic_2d/native_drawing/drawing_rect.h | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h index 8e6f1ab10..ce02692a2 100644 --- a/graphic/graphic_2d/native_drawing/drawing_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_rect.h @@ -40,6 +40,7 @@ #ifndef C_INCLUDE_DRAWING_RECT_H #define C_INCLUDE_DRAWING_RECT_H +#include "drawing_error_code.h" #include "drawing_types.h" #ifdef __cplusplus -- Gitee From 3f67a8fcd81bab73933c2792c636c42b7dc3e811 Mon Sep 17 00:00:00 2001 From: duanhan Date: Fri, 6 Dec 2024 15:50:42 +0800 Subject: [PATCH 213/630] 1206 gif api fix Signed-off-by: duanhan --- .../include/image/image_packer_native.h | 28 +++++++++---------- .../image_framework/libimage_packer.ndk.json | 24 ++++++++-------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index b80688711..4078a60da 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -62,14 +62,14 @@ typedef struct OH_PackingOptions OH_PackingOptions; /** * @brief Defines the image sequence packing options. * - * @since 13 + * @since 14 */ struct OH_PackingOptionsForSequence; /** * @brief Defines the image sequence packing options. * - * @since 13 + * @since 14 */ typedef struct OH_PackingOptionsForSequence OH_PackingOptionsForSequence; @@ -203,7 +203,7 @@ Image_ErrorCode OH_PackingOptions_Release(OH_PackingOptions *options); * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_Create(OH_PackingOptionsForSequence **options); @@ -215,7 +215,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_Create(OH_PackingOptionsForSequence * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_SetFrameCount(OH_PackingOptionsForSequence *options, uint32_t frameCount); @@ -228,7 +228,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetFrameCount(OH_PackingOptionsForS * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or frameCount is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_GetFrameCount(OH_PackingOptionsForSequence *options, uint32_t *frameCount); @@ -242,7 +242,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetFrameCount(OH_PackingOptionsForS * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_SetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength); @@ -256,7 +256,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetDelayTimeList(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_GetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength); @@ -270,7 +270,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetDelayTimeList(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_SetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength); @@ -284,7 +284,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetDisposalTypes(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_GetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength); @@ -297,7 +297,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetDisposalTypes(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_SetLoopCount(OH_PackingOptionsForSequence *options, uint32_t loopCount); @@ -309,7 +309,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetLoopCount(OH_PackingOptionsForSe * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or loopCount is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_GetLoopCount(OH_PackingOptionsForSequence *options, uint32_t *loopCount); @@ -320,7 +320,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetLoopCount(OH_PackingOptionsForSe * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 13 + * @since 14 */ Image_ErrorCode OH_PackingOptionsForSequence_Release(OH_PackingOptionsForSequence *options); @@ -392,7 +392,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPicture(OH_ImagePackerNative * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or size/length is invalid * {@link IMAGE_ENCODE_FAILED} encode failed. - * @since 13 + * @since 14 */ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, @@ -452,7 +452,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPicture(OH_ImagePackerNative * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or length is invalid * {@link IMAGE_ENCODE_FAILED} encode failed. - * @since 13 + * @since 14 */ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, size_t sequenceLength, int32_t fd); diff --git a/multimedia/image_framework/libimage_packer.ndk.json b/multimedia/image_framework/libimage_packer.ndk.json index c6f243504..913c46360 100644 --- a/multimedia/image_framework/libimage_packer.ndk.json +++ b/multimedia/image_framework/libimage_packer.ndk.json @@ -40,43 +40,43 @@ "name": "OH_PackingOptions_Release" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_Create" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_SetFrameCount" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_GetFrameCount" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_SetDelayTimeList" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_GetDelayTimeList" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_SetDisposalTypes" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_GetDisposalTypes" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_SetLoopCount" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_GetLoopCount" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_PackingOptionsForSequence_Release" }, { @@ -96,7 +96,7 @@ "name": "OH_ImagePackerNative_PackToDataFromPicture" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_ImagePackerNative_PackToDataFromPixelmapSequence" }, { @@ -112,7 +112,7 @@ "name": "OH_ImagePackerNative_PackToFileFromPicture" }, { - "first_introduced": "13", + "first_introduced": "14", "name": "OH_ImagePackerNative_PackToFileFromPixelmapSequence" }, { -- Gitee From e1ea95db51287f49d97ab3ad136ff94ddb8ea0cd Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Fri, 6 Dec 2024 16:05:25 +0800 Subject: [PATCH 214/630] =?UTF-8?q?OH=5FPixelmapNative=5FCreateScaledPixel?= =?UTF-8?q?map=E6=8E=A5=E5=8F=A3=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- multimedia/image_framework/include/image/pixelmap_native.h | 4 ++-- multimedia/image_framework/libpixelmap.ndk.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 858043a65..48cfbdc1e 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -751,7 +751,7 @@ Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing(OH_PixelmapNative *pixel * @see OH_PixelmapNative * @since 16 */ -Image_ErrorCode OH_PixelmapNative_CreateScaledPixelmap(OH_PixelmapNative *srcpixelmap, OH_PixelmapNative **dstpixelmap, +Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcpixelmap, OH_PixelmapNative **dstpixelmap, float scaleX, float scaleY); /** @@ -771,7 +771,7 @@ Image_ErrorCode OH_PixelmapNative_CreateScaledPixelmap(OH_PixelmapNative *srcpix * @see OH_PixelmapNative * @since 16 */ -Image_ErrorCode OH_PixelmapNative_CreateScaledPixelmapWithAntiAliasing(OH_PixelmapNative *srcpixelmap, +Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing(OH_PixelmapNative *srcpixelmap, OH_PixelmapNative **dstpixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level); /** diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 8eed2ffed..eb97d0670 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -125,11 +125,11 @@ }, { "first_introduced": "16", - "name": "OH_PixelmapNative_CreateScaledPixelmap" + "name": "OH_PixelmapNative_CreateScaledPixelMap" }, { "first_introduced": "16", - "name": "OH_PixelmapNative_CreateScaledPixelmapWithAntiAliasing" + "name": "OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing" }, { "first_introduced": "12", -- Gitee From 4ea18519f0190949e92c1bbad4f7a1ae1fd5c159 Mon Sep 17 00:00:00 2001 From: Cai Xincheng Date: Tue, 26 Nov 2024 10:47:30 +0800 Subject: [PATCH 215/630] add group tag Signed-off-by: Cai Xincheng Change-Id: Ifc08e6aad6954e8a8e1c9993afd9a5712929071d --- security/asset/inc/asset_type.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/security/asset/inc/asset_type.h b/security/asset/inc/asset_type.h index 516ba43e2..fc92c4b9b 100755 --- a/security/asset/inc/asset_type.h +++ b/security/asset/inc/asset_type.h @@ -211,6 +211,12 @@ typedef enum { * @since 14 */ ASSET_TAG_REQUIRE_ATTR_ENCRYPTED = ASSET_TYPE_BOOL | 0x47, + /** + * A tag whose value is a byte array indicating the group id an asset belongs to. + * + * @since 16 + */ + ASSET_TAG_GROUP_ID = ASSET_TYPE_BYTES | 0x48, } Asset_Tag; /** -- Gitee From e21d6e17895dfa32900480932459d603670a17b0 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Sat, 7 Dec 2024 04:04:25 +0000 Subject: [PATCH 216/630] update multimedia/drm_framework/native_mediakeysession.h. Signed-off-by: baoxy92 --- .../drm_framework/native_mediakeysession.h | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/multimedia/drm_framework/native_mediakeysession.h b/multimedia/drm_framework/native_mediakeysession.h index 1eec1dfc3..288dc6a89 100644 --- a/multimedia/drm_framework/native_mediakeysession.h +++ b/multimedia/drm_framework/native_mediakeysession.h @@ -89,7 +89,7 @@ typedef struct MediaKeySession_Callback { /** * @brief Call back will be invoked when event triggers. - * @param mediaKeySessoin MediaKeySession instance. + * @param mediaKeySession MediaKeySession instance. * @param eventType Event type. * @param info Event info gotten from media key session. * @param infoLen Event info len. @@ -98,19 +98,19 @@ typedef struct MediaKeySession_Callback { * @since 12 * @version 1.0 */ -typedef Drm_ErrCode (*OH_MediaKeySession_EventCallback)(MediaKeySession *mediaKeySessoin, DRM_EventType eventType, +typedef Drm_ErrCode (*OH_MediaKeySession_EventCallback)(MediaKeySession *mediaKeySession, DRM_EventType eventType, uint8_t *info, int32_t infoLen, char *extra); /** * @brief Call back will be invoked when key changes. - * @param mediaKeySessoin MediaKeySession instance. + * @param mediaKeySession MediaKeySession instance. * @param keysInfo Key info gotten from media key system. * @param newKeysAvailable Whether new keys available. * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully. * @since 12 * @version 1.0 */ -typedef Drm_ErrCode (*OH_MediaKeySession_KeyChangeCallback)(MediaKeySession *mediaKeySessoin, DRM_KeysInfo *keysInfo, +typedef Drm_ErrCode (*OH_MediaKeySession_KeyChangeCallback)(MediaKeySession *mediaKeySession, DRM_KeysInfo *keysInfo, bool newKeysAvailable); /** @@ -172,7 +172,7 @@ Drm_ErrCode OH_MediaKeySession_ProcessMediaKeyResponse(MediaKeySession *mediaKey * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_CheckMediaKeyStatus(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_CheckMediaKeyStatus(MediaKeySession *mediaKeySession, DRM_MediaKeyStatus *mediaKeyStatus); /** @@ -184,7 +184,7 @@ Drm_ErrCode OH_MediaKeySession_CheckMediaKeyStatus(MediaKeySession *mediaKeySess * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_ClearMediaKeys(MediaKeySession *mediaKeySessoin); +Drm_ErrCode OH_MediaKeySession_ClearMediaKeys(MediaKeySession *mediaKeySession); /** * @brief Generate offline media key release request. @@ -200,7 +200,7 @@ Drm_ErrCode OH_MediaKeySession_ClearMediaKeys(MediaKeySession *mediaKeySessoin); * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_GenerateOfflineReleaseRequest(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_GenerateOfflineReleaseRequest(MediaKeySession *mediaKeySession, uint8_t *offlineMediaKeyId, int32_t offlineMediaKeyIdLen, uint8_t *releaseRequest, int32_t *releaseRequestLen); @@ -217,7 +217,7 @@ Drm_ErrCode OH_MediaKeySession_GenerateOfflineReleaseRequest(MediaKeySession *me * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_ProcessOfflineReleaseResponse(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_ProcessOfflineReleaseResponse(MediaKeySession *mediaKeySession, uint8_t *offlineMediaKeyId, int32_t offlineMediaKeyIdLen, uint8_t *releaseReponse, int32_t releaseReponseLen); @@ -232,7 +232,7 @@ Drm_ErrCode OH_MediaKeySession_ProcessOfflineReleaseResponse(MediaKeySession *me * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_RestoreOfflineMediaKeys(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_RestoreOfflineMediaKeys(MediaKeySession *mediaKeySession, uint8_t *offlineMediaKeyId, int32_t offlineMediaKeyIdLen); /** @@ -245,7 +245,7 @@ Drm_ErrCode OH_MediaKeySession_RestoreOfflineMediaKeys(MediaKeySession *mediaKey * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_GetContentProtectionLevel(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_GetContentProtectionLevel(MediaKeySession *mediaKeySession, DRM_ContentProtectionLevel *contentProtectionLevel); /** @@ -259,7 +259,7 @@ Drm_ErrCode OH_MediaKeySession_GetContentProtectionLevel(MediaKeySession *mediaK * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_RequireSecureDecoderModule(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_RequireSecureDecoderModule(MediaKeySession *mediaKeySession, const char *mimeType, bool *status); /** @@ -271,7 +271,7 @@ Drm_ErrCode OH_MediaKeySession_RequireSecureDecoderModule(MediaKeySession *media * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_SetMediaKeySessionCallback(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_SetMediaKeySessionCallback(MediaKeySession *mediaKeySession, MediaKeySession_Callback *callback); /** @@ -283,7 +283,7 @@ Drm_ErrCode OH_MediaKeySession_SetMediaKeySessionCallback(MediaKeySession *media * @since 12 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_SetCallback(MediaKeySession *mediaKeySessoin, +Drm_ErrCode OH_MediaKeySession_SetCallback(MediaKeySession *mediaKeySession, OH_MediaKeySession_Callback *callback); /** @@ -295,7 +295,7 @@ Drm_ErrCode OH_MediaKeySession_SetCallback(MediaKeySession *mediaKeySessoin, * @since 11 * @version 1.0 */ -Drm_ErrCode OH_MediaKeySession_Destroy(MediaKeySession *mediaKeySessoin); +Drm_ErrCode OH_MediaKeySession_Destroy(MediaKeySession *mediaKeySession); #ifdef __cplusplus } -- Gitee From e37e1e3986a0a6c51fa05b920c53c4952e957a61 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Sat, 7 Dec 2024 04:04:42 +0000 Subject: [PATCH 217/630] update multimedia/drm_framework/native_mediakeysession.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/native_mediakeysession.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multimedia/drm_framework/native_mediakeysession.h b/multimedia/drm_framework/native_mediakeysession.h index 288dc6a89..97fbb493b 100644 --- a/multimedia/drm_framework/native_mediakeysession.h +++ b/multimedia/drm_framework/native_mediakeysession.h @@ -21,6 +21,8 @@ * @kit DrmKit. * @since 11 * @version 1.0 + * + * @} */ /** -- Gitee From 3928e4ed4a8913bfae1d81d48feaab0d34835b9b Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Sat, 7 Dec 2024 04:05:00 +0000 Subject: [PATCH 218/630] update multimedia/drm_framework/native_mediakeysystem.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/native_mediakeysystem.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multimedia/drm_framework/native_mediakeysystem.h b/multimedia/drm_framework/native_mediakeysystem.h index 966948a64..bac9ac605 100644 --- a/multimedia/drm_framework/native_mediakeysystem.h +++ b/multimedia/drm_framework/native_mediakeysystem.h @@ -21,6 +21,8 @@ * @kit DrmKit. * @since 11 * @version 1.0 + * + * @} */ /** -- Gitee From 4f76443b0476d12018d5877888c1019f56791e86 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Sat, 7 Dec 2024 04:05:16 +0000 Subject: [PATCH 219/630] update multimedia/drm_framework/common/native_drm_common.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/common/native_drm_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multimedia/drm_framework/common/native_drm_common.h b/multimedia/drm_framework/common/native_drm_common.h index 410a27f20..9fd6dc7b0 100644 --- a/multimedia/drm_framework/common/native_drm_common.h +++ b/multimedia/drm_framework/common/native_drm_common.h @@ -21,6 +21,8 @@ * @kit DrmKit. * @since 11 * @version 1.0 + * + * @} */ /** -- Gitee From 2cbbd7b31f863a324130c0572826f234567c5c38 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Sat, 7 Dec 2024 04:05:37 +0000 Subject: [PATCH 220/630] update multimedia/drm_framework/common/native_drm_err.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/common/native_drm_err.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multimedia/drm_framework/common/native_drm_err.h b/multimedia/drm_framework/common/native_drm_err.h index cb946274e..843151fe4 100644 --- a/multimedia/drm_framework/common/native_drm_err.h +++ b/multimedia/drm_framework/common/native_drm_err.h @@ -21,6 +21,8 @@ * @kit DrmKit. * @since 11 * @version 1.0 + * + * @} */ /** -- Gitee From 4eedd2fdf9339748ca33c0676daa2bbd68a34acc Mon Sep 17 00:00:00 2001 From: sun-xinyan Date: Sat, 7 Dec 2024 22:06:09 +0800 Subject: [PATCH 221/630] =?UTF-8?q?c=20api=20lint=20=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sun-xinyan Change-Id: I87ba7183c578949e04d449c084704b19f7439a12 --- arkui/ace_engine/native/native_animate.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h index bd5c9303e..1538ee9c5 100644 --- a/arkui/ace_engine/native/native_animate.h +++ b/arkui/ace_engine/native/native_animate.h @@ -936,6 +936,7 @@ int32_t OH_ArkUI_Animator_Reverse(ArkUI_AnimatorHandle animatorHandle); * @param curve Indicates the curve type. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateCurveByType(ArkUI_AnimationCurve curve); @@ -947,6 +948,7 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateCurveByType(ArkUI_AnimationCurve curve); * true: Jumping occurs when the interpolation ends. false: Jumping occurs when the interpolation starts. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateStepsCurve(int32_t count, bool end); @@ -962,6 +964,7 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateStepsCurve(int32_t count, bool end); * @param y2 Indicates the Y coordinate of the second point on the Bezier curve. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateCubicBezierCurve(float x1, float y1, float x2, float y2); @@ -983,6 +986,7 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateCubicBezierCurve(float x1, float y1, floa * the oscillation amplitude. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateSpringCurve(float velocity, float mass, float stiffness, float damping); @@ -1002,6 +1006,7 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateSpringCurve(float velocity, float mass, f * transit smoothly over this duration if they are different. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateSpringMotion(float response, float dampingFraction, float overlapDuration); @@ -1021,6 +1026,7 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateSpringMotion(float response, float dampin * transit smoothly over this duration if they are different. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateResponsiveSpringMotion( float response, float dampingFraction, float overlapDuration); @@ -1047,6 +1053,7 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateResponsiveSpringMotion( * the oscillation amplitude. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateInterpolatingSpring(float velocity, float mass, float stiffness, float damping); @@ -1064,6 +1071,7 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateInterpolatingSpring(float velocity, float * which will result in an effect of transition from that end value to the value of the state variable. * @return Returns the pointer to the interpolation object of the curve. * Returns NULL if a parameter error occurs. + * @since 12 */ ArkUI_CurveHandle OH_ArkUI_Curve_CreateCustomCurve( void* userData, float (*interpolate)(float fraction, void* userdata)); @@ -1071,7 +1079,8 @@ ArkUI_CurveHandle OH_ArkUI_Curve_CreateCustomCurve( /** * @brief Disposes of a custom curve. * - * @param curve Indicates the pointer to the interpolation object of the curve. + * @param curveHandle Indicates the pointer to the interpolation object of the curve. + * @since 12 */ void OH_ArkUI_Curve_DisposeCurve(ArkUI_CurveHandle curveHandle); @@ -1179,4 +1188,5 @@ int32_t OH_ArkUI_TransitionEffect_SetAnimation( }; #endif -#endif // ARKUI_NATIVE_ANIMATE_H \ No newline at end of file +#endif // ARKUI_NATIVE_ANIMATE_H +/** @}*/ \ No newline at end of file -- Gitee From ee67e8ff7ef7d92178c01fa363495a85a7ddca59 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Sun, 8 Dec 2024 09:10:32 +0000 Subject: [PATCH 222/630] update multimedia/image_framework/include/image/pixelmap_native.h. Signed-off-by: shenshiyi2 --- .../image_framework/include/image/pixelmap_native.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 48cfbdc1e..6e46e7e58 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -951,17 +951,17 @@ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, cha Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint32_t *byteCount); /** - * @brief Get the capacity of the Pixelmap, which is the number of bytes allocated by the Pixelmap. + * @brief Get the size of the allocated memory used to store this pixelmap's pixels. * * @param pixelmap The Pixelmap pointer to be operated. - * @param capacity The capacity to be retrieved. + * @param allocationByteCount The size of the allocated memory. * @return Function result code: * {@link IMAGE_SUCCESS} If the operation is successful. - * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or allocationByteCount are invalid. * @see OH_PixelmapNative * @since 16 */ -Image_ErrorCode OH_PixelmapNative_GetCapacity(OH_PixelmapNative *pixelmap, uint32_t *capacity); +Image_ErrorCode OH_PixelmapNative_GetAllocationByteCount(OH_PixelmapNative *pixelmap, uint32_t *allocationByteCount); #ifdef __cplusplus }; -- Gitee From 6d6a1202e6ad08089fa8bd34107b77489ba91d97 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Sun, 8 Dec 2024 09:10:53 +0000 Subject: [PATCH 223/630] update multimedia/image_framework/libpixelmap.ndk.json. Signed-off-by: shenshiyi2 --- multimedia/image_framework/libpixelmap.ndk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index eb97d0670..d6f723b63 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -197,6 +197,6 @@ }, { "first_introduced": "16", - "name": "OH_PixelmapNative_GetCapacity" + "name": "OH_PixelmapNative_GetAllocationByteCount" } ] \ No newline at end of file -- Gitee From e163a45881bf4423bb785ed7948763f74bc76dc3 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 9 Dec 2024 09:19:39 +0800 Subject: [PATCH 224/630] =?UTF-8?q?CreateScaledPixelMap=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=94=B9=E4=B8=BA=E9=A9=BC=E5=B3=B0=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- .../include/image/pixelmap_native.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 6e46e7e58..5f1a289f5 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -741,8 +741,8 @@ Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing(OH_PixelmapNative *pixel /** * @brief Create a scaled pixelmap based on the source pixelmap and the input width and height. * - * @param srcpixelmap The source native pixelmap. - * @param dstpixelmap The destination native pixelmap for create. + * @param srcPixelmap The source native pixelmap. + * @param dstPixelmap The destination native pixelmap for create. * @param scaleX Scaling ratio of the width. * @param scaleY Scaling ratio of the height. * @return Function result code: @@ -751,14 +751,14 @@ Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing(OH_PixelmapNative *pixel * @see OH_PixelmapNative * @since 16 */ -Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcpixelmap, OH_PixelmapNative **dstpixelmap, +Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcPixelmap, OH_PixelmapNative **dstPixelmap, float scaleX, float scaleY); /** * @brief Create a scaled pixelmap based on the source pixelmap and the input width and height with anti-aliasing. * - * @param srcpixelmap The source native pixelmap. - * @param dstpixelmap The destination native pixelmap for create. + * @param srcPixelmap The source native pixelmap. + * @param dstPixelmap The destination native pixelmap for create. * @param scaleX Scaling ratio of the width. * @param scaleY Scaling ratio of the height. * @param level The anti-aliasing algorithm to be used. @@ -771,8 +771,8 @@ Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcpix * @see OH_PixelmapNative * @since 16 */ -Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing(OH_PixelmapNative *srcpixelmap, - OH_PixelmapNative **dstpixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level); +Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing(OH_PixelmapNative *srcPixelmap, + OH_PixelmapNative **dstPixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level); /** * @brief Translates this image based on the input coordinates. -- Gitee From 5fc00e76e43f3c46944d9e572f86eba068015931 Mon Sep 17 00:00:00 2001 From: liyang Date: Mon, 9 Dec 2024 10:57:33 +0800 Subject: [PATCH 225/630] =?UTF-8?q?screencapture=E6=8E=A5=E5=8F=A3=20doc?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=92=8C=E5=8F=82=E6=95=B0=E5=90=8D=E4=B8=8D?= =?UTF-8?q?=E7=AC=A6=20api=20init=E5=91=8A=E8=AD=A6=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liyang --- multimedia/player_framework/native_avscreen_capture.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 48af8569d..a58f46164 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -374,8 +374,8 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ExcludeContent(struct OH_AVScreen * @brief Add Window content to the screen capture content filter * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @param filter Pointer to an OH_AVScreenCapture_ContentFilter instance - * @param Pointer to windowIDs to be added - * @param windowCount to be added + * @param windowIDs Pointer to windowIDs to be added + * @param windowCount length of windowID list * @return Returns AV_SCREEN_CAPTURE_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVSCREEN_CAPTURE_ErrCode} * @since 12 @@ -404,8 +404,8 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ResizeCanvas(struct OH_AVScreenCa * @brief skip some windows' privacy mode of current app during the screen recording * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @param capture Pointer to an OH_AVScreenCapture instance - * @param Pointer of windowID list - * @param length of windowID list + * @param windowIDs Pointer of windowID list + * @param windowCount length of windowID list * @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 windowIDs are not belong current @@ -421,7 +421,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SkipPrivacyMode(struct OH_AVScree * @brief set up the max number of video frame per second * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @param capture Pointer to an OH_AVScreenCapture instance - * @param max frame rate of video + * @param frameRate max frame rate of video * @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 frameRate is not support. -- Gitee From 5da51ac33b1058527e65babfcc5b9c65e6c51852 Mon Sep 17 00:00:00 2001 From: liuweili Date: Thu, 28 Nov 2024 19:58:14 +0800 Subject: [PATCH 226/630] Add JSVM_API to Private and External String Signed-off-by: yanghaiming --- ark_runtime/jsvm/jsvm.h | 162 ++++++++++++++++++++++++++++++ ark_runtime/jsvm/jsvm_types.h | 7 ++ ark_runtime/jsvm/libjsvm.ndk.json | 32 ++++++ 3 files changed, 201 insertions(+) diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index b5771f107..830971a20 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -3045,6 +3045,168 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateWasmCache(JSVM_Env env, JSVM_EXTERN JSVM_Status OH_JSVM_ReleaseCache(JSVM_Env env, const uint8_t* cacheData, JSVM_CacheType cacheType); + +/** + * @brief This API creates an external JavaScript string value from an ISO-8859-1-encoded C + * string. The native string is copied when failed to create external string. + * + * @param env The environment that the API is invoked under. + * @param str Character buffer representing an ISO-8859-1-encoded string. + * @param length The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. + * @param finalizeCallback Optional callback to call when the external value is being collected. + * JSVM_Finalize provides more details. + * @param finalizeHint Optional hint to pass to the finalize callback during collection. + * @param result A JSVM_Value representing a JavaScript external string. + * @param copied flag indicate whether the external string is successfully created, + * true for faild to create external ones and fall back to non-external strings, false for success. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if one of env, str and copied is NULL.\n + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternalStringLatin1(JSVM_Env env, + char* str, + size_t length, + JSVM_Finalize finalizeCallback, + void* finalizeHint, + JSVM_Value* result, + bool* copied); + +/** + * @brief This API creates an external JavaScript string value from an UTF16-LE-encoded C + * string. The native string is copied when failed to create external string. + * + * @param env The environment that the API is invoked under. + * @param str Character buffer representing an UTF16-LE-encoded string. + * @param length The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated. + * @param finalizeCallback Optional callback to call when the external value is being collected. + * JSVM_Finalize provides more details. + * @param finalizeHint Optional hint to pass to the finalize callback during collection. + * @param result A JSVM_Value representing a JavaScript external string. + * @param copied flag indicate whether the external string is successfully created, + * true for faild to create external ones and fall back to non-external strings, false for success. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if one of env, str and copied is NULL.\n + * @since 16 + */ + +JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternalStringUtf16(JSVM_Env env, + char16_t* str, + size_t length, + JSVM_Finalize finalizeCallback, + void* finalizeHint, + JSVM_Value* result, + bool* copied); + +/** + * @brief This API creates a JavaScript private key. + * + * @param env The environment that the API is invoked under. + * @param description Optional JSVM_Value which refers to a JavaScript string to be set as the description + * for the private key. + * @param result A JSVM_Data representing a JavaScript private key. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if env or result is NULL.\n + * {@link JSVM_STRING_EXPECTED } if the description is not a string.\n + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_CreatePrivate(JSVM_Env env, + JSVM_Value description, + JSVM_Data* result); + +/** + * @brief This API set a private property on the Object passed in. + * + * @param env The environment that the API is invoked under. + * @param object The object on which to set the private property. + * @param key The private key of the property. + * @param value The private property value. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the arguments is NULL or the key is not a private key.\n + * {@link JSVM_OBJECT_EXPECTED } object passed in is not a real object.\n + * {@link JSVM_GENERIC_FAILURE } if failed to set the private key but no exception is pending.\n + * {@link JSVM_PENDING_EXCPTION } if an exception occurs.\n + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_SetPrivate(JSVM_Env env, + JSVM_Value object, + JSVM_Data key, + JSVM_Value value); + +/** + * @brief This API gets the requested private property from the Object passed in. + * + * @param env The environment that the API is invoked under. + * @param object The object from which to retrieve the private property. + * @param key The private key of the property. + * @param result The value of the private property. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the arguments is NULL or the key is not a private key.\n + * {@link JSVM_OBJECT_EXPECTED } object passed in is not a real object.\n + * {@link JSVM_GENERIC_FAILURE } if failed to get the private key but no exception is pending.\n + * {@link JSVM_PENDING_EXCPTION } if an exception occurs.\n + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetPrivate(JSVM_Env env, + JSVM_Value object, + JSVM_Data key, + JSVM_Value *result); + +/** + * @brief This API attempts to delete the property of the private key from object. + * + * @param env The environment that the API is invoked under. + * @param object The object to query. + * @param key The private key of the property to delete. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the arguments is NULL or the key is not a private key.\n + * {@link JSVM_OBJECT_EXPECTED } object passed in is not a real object.\n + * {@link JSVM_GENERIC_FAILURE } if failed to delete the private key but no exception is pending.\n + * {@link JSVM_PENDING_EXCPTION } if an exception occurs.\n + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_DeletePrivate(JSVM_Env env, + JSVM_Value object, + JSVM_Data key); + +/** + * @brief This API creates a new reference with the specified reference count to the data passed in. + * + * @param env The environment that the API is invoked under. + * @param data The JSVM_Data for which a reference is being created. + * @param initialRefcount Initial reference count for the new reference. + * @param result JSVM_Ref pointing to the new reference. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any parameter is null or the value of initialRefcount is 0.\n + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_CreateDataReference(JSVM_Env env, + JSVM_Data data, + uint32_t initialRefcount, + JSVM_Ref* result); + +/** + * @brief If still valid, this API returns the JSVM_Data representing the + * JavaScript data associated with the JSVM_Ref. Otherwise, result will be NULL. + * + * @param env The environment that the API is invoked under. + * @param ref The JSVM_Ref for which the corresponding value is being requested. + * @param result The JSVM_Data referenced by the JSVM_Ref. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any parameter is null or the ref is not a reference to JSVM_Data.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetReferenceData(JSVM_Env env, + JSVM_Ref ref, + JSVM_Data* result); EXTERN_C_END /** @} */ #endif /* ARK_RUNTIME_JSVM_JSVM_H */ diff --git a/ark_runtime/jsvm/jsvm_types.h b/ark_runtime/jsvm/jsvm_types.h index 4ee1793b3..9c834bc11 100644 --- a/ark_runtime/jsvm/jsvm_types.h +++ b/ark_runtime/jsvm/jsvm_types.h @@ -770,6 +770,13 @@ typedef enum { /** WebAssembly cache, generated by OH_JSVM_CreateWasmCache */ JSVM_CACHE_TYPE_WASM, } JSVM_CacheType; + +/** + * @brief To represent a JavaScript Data type. + * + * @since 16 + */ +typedef struct JSVM_Data__* JSVM_Data; /** @} */ #endif /* ARK_RUNTIME_JSVM_JSVM_TYPE_H */ diff --git a/ark_runtime/jsvm/libjsvm.ndk.json b/ark_runtime/jsvm/libjsvm.ndk.json index e0157b772..ea0cb6092 100644 --- a/ark_runtime/jsvm/libjsvm.ndk.json +++ b/ark_runtime/jsvm/libjsvm.ndk.json @@ -734,5 +734,37 @@ { "first_introduced": "12", "name": "OH_JSVM_ReleaseCache" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_CreateExternalStringLatin1" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_CreateExternalStringUtf16" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_CreatePrivate" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_SetPrivate" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetPrivate" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_DeletePrivate" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_CreateDataReference" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetReferenceData" } ] -- Gitee From 41fb36411c193712455ce5c62a711de5df5c3723 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Mon, 9 Dec 2024 07:08:46 +0000 Subject: [PATCH 227/630] update multimedia/drm_framework/common/native_drm_common.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/common/native_drm_common.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/multimedia/drm_framework/common/native_drm_common.h b/multimedia/drm_framework/common/native_drm_common.h index 9fd6dc7b0..956498448 100644 --- a/multimedia/drm_framework/common/native_drm_common.h +++ b/multimedia/drm_framework/common/native_drm_common.h @@ -21,8 +21,6 @@ * @kit DrmKit. * @since 11 * @version 1.0 - * - * @} */ /** @@ -538,4 +536,5 @@ typedef struct DRM_MediaKeySystemDescription { } #endif -#endif // NATIVE_DRM_COMMON_H \ No newline at end of file +#endif // NATIVE_DRM_COMMON_H +/** @} */ \ No newline at end of file -- Gitee From ea4725a273bec30ebfb45508e6bcda075cc236c5 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Mon, 9 Dec 2024 07:09:10 +0000 Subject: [PATCH 228/630] update multimedia/drm_framework/common/native_drm_err.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/common/native_drm_err.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multimedia/drm_framework/common/native_drm_err.h b/multimedia/drm_framework/common/native_drm_err.h index 843151fe4..882cf41be 100644 --- a/multimedia/drm_framework/common/native_drm_err.h +++ b/multimedia/drm_framework/common/native_drm_err.h @@ -21,8 +21,6 @@ * @kit DrmKit. * @since 11 * @version 1.0 - * - * @} */ /** @@ -114,3 +112,4 @@ typedef enum Drm_ErrCode { #endif #endif // NATIVE_DRM_ERR_H +/** @} */ \ No newline at end of file -- Gitee From bcbd3a909fa7c71993236484f85f137a23f1d055 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Mon, 9 Dec 2024 07:09:30 +0000 Subject: [PATCH 229/630] update multimedia/drm_framework/native_mediakeysession.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/native_mediakeysession.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multimedia/drm_framework/native_mediakeysession.h b/multimedia/drm_framework/native_mediakeysession.h index 97fbb493b..2d5b72dd7 100644 --- a/multimedia/drm_framework/native_mediakeysession.h +++ b/multimedia/drm_framework/native_mediakeysession.h @@ -21,8 +21,6 @@ * @kit DrmKit. * @since 11 * @version 1.0 - * - * @} */ /** @@ -304,3 +302,4 @@ Drm_ErrCode OH_MediaKeySession_Destroy(MediaKeySession *mediaKeySession); #endif #endif // OHOS_DRM_NATIVE_MEDIA_KEY_SYSTEM_H +/** @} */ \ No newline at end of file -- Gitee From b645efc923fe846df10c6dbc2061eeaee24956a6 Mon Sep 17 00:00:00 2001 From: baoxy92 Date: Mon, 9 Dec 2024 07:10:02 +0000 Subject: [PATCH 230/630] update multimedia/drm_framework/native_mediakeysystem.h. Signed-off-by: baoxy92 --- multimedia/drm_framework/native_mediakeysystem.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multimedia/drm_framework/native_mediakeysystem.h b/multimedia/drm_framework/native_mediakeysystem.h index bac9ac605..d2f35fc90 100644 --- a/multimedia/drm_framework/native_mediakeysystem.h +++ b/multimedia/drm_framework/native_mediakeysystem.h @@ -21,8 +21,6 @@ * @kit DrmKit. * @since 11 * @version 1.0 - * - * @} */ /** @@ -364,3 +362,4 @@ Drm_ErrCode OH_MediaKeySystem_Destroy(MediaKeySystem *mediaKeySystem); #endif #endif // OHOS_DRM_NATIVE_MEDIA_KEY_SYSTEM_H +/** @} */ \ No newline at end of file -- Gitee From 199b0ca0aa797eaf03d569a26af0018a1201ebed Mon Sep 17 00:00:00 2001 From: wanglingyi Date: Mon, 9 Dec 2024 15:44:03 +0800 Subject: [PATCH 231/630] 1209 Signed-off-by: wanglingyi --- multimedia/player_framework/avplayer.h | 3 ++- multimedia/player_framework/avplayer_base.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h index ce355909a..8cdba3b86 100644 --- a/multimedia/player_framework/avplayer.h +++ b/multimedia/player_framework/avplayer.h @@ -19,7 +19,7 @@ * * @brief Provides APIs of Playback capability for Media Source. * - * @Syscap SystemCapability.Multimedia.Media.AVPlayer + * @syscap SystemCapability.Multimedia.Media.AVPlayer * @since 11 * @version 1.0 */ @@ -596,3 +596,4 @@ OH_AVErrCode OH_AVPlayer_SetOnErrorCallback(OH_AVPlayer *player, OH_AVPlayerOnEr #endif #endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVPLAYER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/player_framework/avplayer_base.h b/multimedia/player_framework/avplayer_base.h index 8a3b311fc..f3306fa35 100644 --- a/multimedia/player_framework/avplayer_base.h +++ b/multimedia/player_framework/avplayer_base.h @@ -19,7 +19,7 @@ * * @brief Provides APIs of Playback capability for Media Source. * - * @Syscap SystemCapability.Multimedia.Media.AVPlayer + * @syscap SystemCapability.Multimedia.Media.AVPlayer * @since 11 * @version 1.0 */ @@ -426,3 +426,4 @@ typedef struct AVPlayerCallback { } #endif #endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVPLAYER_BASH_H +/** @} */ \ No newline at end of file -- Gitee From 56f2f6d66358d52784c2e40bdfc5360bdbb10e88 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 9 Dec 2024 15:47:26 +0800 Subject: [PATCH 232/630] =?UTF-8?q?OH=5FPixelmapNative=5FCreateScaledPixel?= =?UTF-8?q?MapWithAntiAliasing=E6=8E=A5=E5=8F=A3=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- multimedia/image_framework/include/image/pixelmap_native.h | 1 - 1 file changed, 1 deletion(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 5f1a289f5..8430d4673 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -767,7 +767,6 @@ Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcPix * {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid. * {@link IMAGE_TOO_LARGE} If image is too large. * {@link IMAGE_ALLOC_FAILED} If device has no memory. - * {@link IMAGE_UNKNOWN_ERROR} Inner unknown error, maybe source pixelmap is released. * @see OH_PixelmapNative * @since 16 */ -- Gitee From 922d4dc8fd6031f75fbae0ce77fbfbecca073b94 Mon Sep 17 00:00:00 2001 From: zhenghongda <13135671+zhenghongda@user.noreply.gitee.com> Date: Mon, 9 Dec 2024 07:58:49 +0000 Subject: [PATCH 233/630] The cenc module api link problem has been solved Signed-off-by: zhenghongda --- multimedia/av_codec/native_cencinfo.h | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/av_codec/native_cencinfo.h b/multimedia/av_codec/native_cencinfo.h index f0a5a8e8c..14e84db52 100644 --- a/multimedia/av_codec/native_cencinfo.h +++ b/multimedia/av_codec/native_cencinfo.h @@ -246,3 +246,4 @@ OH_AVErrCode OH_AVCencInfo_SetAVBuffer(OH_AVCencInfo *cencInfo, OH_AVBuffer *buf #endif #endif // NATIVE_AVCENCINFO_H +/** @} */ \ No newline at end of file -- Gitee From d026542975150a3b64b1485f64467a5d7ce385e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Mon, 9 Dec 2024 16:42:27 +0800 Subject: [PATCH 234/630] [localSDKc2] add addtogroup title in sdk_c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子微 --- multimedia/av_codec/native_avcapability.h | 13 ++++++++++++- multimedia/av_codec/native_avcodec_base.h | 12 ++++++++++++ multimedia/av_codec/native_avcodec_videodecoder.h | 14 +++++++++++++- multimedia/av_codec/native_avcodec_videoencoder.h | 13 ++++++++++++- multimedia/av_codec/native_avdemuxer.h | 11 +++++++++++ multimedia/av_codec/native_avsource.h | 13 ++++++++++++- multimedia/media_foundation/native_avbuffer.h | 12 ++++++++++++ multimedia/media_foundation/native_avbuffer_info.h | 12 ++++++++++++ multimedia/media_foundation/native_averrors.h | 12 ++++++++++++ multimedia/media_foundation/native_avformat.h | 14 +++++++++++++- multimedia/media_foundation/native_avmemory.h | 12 ++++++++++++ 11 files changed, 133 insertions(+), 5 deletions(-) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index 5f30e6c92..8d01314d2 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -13,6 +13,16 @@ * limitations under the License. */ +/** + * @addtogroup AVCapability + * @{ + * + * @brief The AVCapability module provide functions for querying encoding and decoding capabilities. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 10 + */ + /** * @file native_avcapability.h * @@ -437,4 +447,5 @@ OH_AVFormat *OH_AVCapability_GetFeatureProperties(OH_AVCapability *capability, O #ifdef __cplusplus } #endif -#endif // NATIVE_AVCAPABILITY_H \ No newline at end of file +#endif // NATIVE_AVCAPABILITY_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 147a7268e..f1189f430 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -13,6 +13,17 @@ * limitations under the License. */ +/** + * @addtogroup CodecBase + * @{ + * + * @brief The CodecBase module provide variables, properties, and functions + * for audio and video muxer, demuxer, and basic encoding and decoding functions. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 9 + */ + /** * @file native_avcodec_base.h * @@ -1229,3 +1240,4 @@ typedef enum OH_TemporalGopReferenceMode { #endif #endif // NATIVE_AVCODEC_BASE_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avcodec_videodecoder.h b/multimedia/av_codec/native_avcodec_videodecoder.h index f4b58bcbc..03419364f 100644 --- a/multimedia/av_codec/native_avcodec_videodecoder.h +++ b/multimedia/av_codec/native_avcodec_videodecoder.h @@ -13,6 +13,17 @@ * limitations under the License. */ +/** + * @addtogroup VideoDecoder + * @{ + * + * @brief The VideoDecoder module provide interfaces for video decoding + * + * @syscap SystemCapability.Multimedia.Media.VideoDecoder + * @since 9 + * @version 1.0 + */ + /** * @file native_avcodec_videodecoder.h * @@ -460,4 +471,5 @@ OH_AVErrCode OH_VideoDecoder_SetDecryptionConfig(OH_AVCodec *codec, MediaKeySess } #endif -#endif // NATIVE_AVCODEC_VIDEODECODER_H \ No newline at end of file +#endif // NATIVE_AVCODEC_VIDEODECODER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h index e66569f4f..5f12a3c05 100644 --- a/multimedia/av_codec/native_avcodec_videoencoder.h +++ b/multimedia/av_codec/native_avcodec_videoencoder.h @@ -13,6 +13,16 @@ * limitations under the License. */ +/** + * @addtogroup VideoEncoder + * @{ + * + * @brief The VideoEncoder module provide interfaces for video encoding + * + * @syscap SystemCapability.Multimedia.VideoEncoder + * @since 9 + */ + /** * @file native_avcodec_videoencoder.h * @@ -443,4 +453,5 @@ typedef enum OH_VideoEncodeBitrateMode { } #endif -#endif // NATIVE_AVCODEC_VIDEOENCODER_H \ No newline at end of file +#endif // NATIVE_AVCODEC_VIDEOENCODER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avdemuxer.h b/multimedia/av_codec/native_avdemuxer.h index 491352815..841f60eca 100644 --- a/multimedia/av_codec/native_avdemuxer.h +++ b/multimedia/av_codec/native_avdemuxer.h @@ -13,6 +13,16 @@ * limitations under the License. */ +/** + * @addtogroup AVDemuxer + * @{ + * + * @brief The AVDemuxer module provide an interface for extracting samples from media file streams. + * + * @syscap SystemCapability.Multimedia.Media.Spliter + * @since 10 + */ + /** * @file native_avdemuxer.h * @@ -228,3 +238,4 @@ OH_AVErrCode OH_AVDemuxer_GetMediaKeySystemInfo(OH_AVDemuxer *demuxer, DRM_Media #endif #endif // NATIVE_AVDEMUXER_H +/** @} */ diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index acda07885..7120f8806 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -13,6 +13,16 @@ * limitations under the License. */ +/** + * @addtogroup AVSource + * @{ + * + * @brief The AVSource module provide functions for constructing media resource object functionality. + * + * @syscap SystemCapability.Multimedia.Media.Spliter + * @since 10 + */ + /** * @file native_avsource.h * @@ -127,4 +137,5 @@ OH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackIndex } #endif -#endif // NATIVE_AVSOURCE_H \ No newline at end of file +#endif // NATIVE_AVSOURCE_H +/** @} */ \ No newline at end of file diff --git a/multimedia/media_foundation/native_avbuffer.h b/multimedia/media_foundation/native_avbuffer.h index 726f06c4f..7db2d5397 100644 --- a/multimedia/media_foundation/native_avbuffer.h +++ b/multimedia/media_foundation/native_avbuffer.h @@ -13,6 +13,17 @@ * limitations under the License. */ +/** + * @addtogroup Core + * @{ + * + * @brief The Core module provides basic backbone capabilities for media frameworks, + * including functions such as memory, error codes, and media data structures. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @since 9 + */ + /** * @file native_avbuffer.h * @@ -166,3 +177,4 @@ OH_NativeBuffer *OH_AVBuffer_GetNativeBuffer(OH_AVBuffer *buffer); #endif #endif // NATIVE_AVBUFFER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/media_foundation/native_avbuffer_info.h b/multimedia/media_foundation/native_avbuffer_info.h index afd1ce3bd..14d3a95a4 100644 --- a/multimedia/media_foundation/native_avbuffer_info.h +++ b/multimedia/media_foundation/native_avbuffer_info.h @@ -13,6 +13,17 @@ * limitations under the License. */ +/** + * @addtogroup Core + * @{ + * + * @brief The Core module provides basic backbone capabilities for media frameworks, + * including functions such as memory, error codes, and media data structures. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @since 9 + */ + /** * @file native_avbuffer_info.h * @@ -81,3 +92,4 @@ typedef struct OH_AVCodecBufferAttr { #endif #endif // NATIVE_AVBUFFER_INFO_H +/** @} */ diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index edecfa2a8..3651622a6 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -13,6 +13,17 @@ * limitations under the License. */ +/** + * @addtogroup Core + * @{ + * + * @brief The Core module provides basic backbone capabilities for media frameworks, + * including functions such as memory, error codes, and media data structures. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @since 9 + */ + /** * @file native_averrors.h * @@ -114,3 +125,4 @@ typedef enum OH_AVErrCode { #endif #endif // NATIVE_AVERRORS_H +/** @} */ \ No newline at end of file diff --git a/multimedia/media_foundation/native_avformat.h b/multimedia/media_foundation/native_avformat.h index d07ee0c6d..52ff2bc86 100644 --- a/multimedia/media_foundation/native_avformat.h +++ b/multimedia/media_foundation/native_avformat.h @@ -13,6 +13,17 @@ * limitations under the License. */ +/** + * @addtogroup Core + * @{ + * + * @brief The Core module provides basic backbone capabilities for media frameworks, + * including functions such as memory, error codes, and media data structures. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @since 9 + */ + /** * @file native_avformat.h * @@ -315,4 +326,5 @@ const char *OH_AVFormat_DumpInfo(struct OH_AVFormat *format); } #endif -#endif // NATIVE_AVFORMAT_H \ No newline at end of file +#endif // NATIVE_AVFORMAT_H +/** @} */ \ No newline at end of file diff --git a/multimedia/media_foundation/native_avmemory.h b/multimedia/media_foundation/native_avmemory.h index b00f2b45b..4534a7d7b 100644 --- a/multimedia/media_foundation/native_avmemory.h +++ b/multimedia/media_foundation/native_avmemory.h @@ -13,6 +13,17 @@ * limitations under the License. */ +/** + * @addtogroup Core + * @{ + * + * @brief The Core module provides basic backbone capabilities for media frameworks, + * including functions such as memory, error codes, and media data structures. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @since 9 + */ + /** * @file native_avmemory.h * @@ -99,3 +110,4 @@ OH_AVErrCode OH_AVMemory_Destroy(struct OH_AVMemory *mem); #endif #endif // NATIVE_AVMEMORY_H +/** @} */ -- Gitee From a2f4daf9dad72971a53e101f20ad4a497c0adc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Mon, 9 Dec 2024 17:28:43 +0800 Subject: [PATCH 235/630] [localSDKc2] fix compliation error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子微 --- multimedia/av_codec/native_avcapability.h | 2 +- multimedia/av_codec/native_avcodec_base.h | 2 +- multimedia/av_codec/native_avcodec_videodecoder.h | 4 ++-- multimedia/av_codec/native_avcodec_videoencoder.h | 4 ++-- multimedia/av_codec/native_avdemuxer.h | 2 +- multimedia/av_codec/native_avsource.h | 2 +- multimedia/media_foundation/native_avbuffer.h | 2 +- multimedia/media_foundation/native_avbuffer_info.h | 2 +- multimedia/media_foundation/native_averrors.h | 2 +- multimedia/media_foundation/native_avformat.h | 2 +- multimedia/media_foundation/native_avmemory.h | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index 8d01314d2..89cec8d1c 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -18,7 +18,7 @@ * @{ * * @brief The AVCapability module provide functions for querying encoding and decoding capabilities. - * + * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 10 */ diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index f1189f430..ccad9646c 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -19,7 +19,7 @@ * * @brief The CodecBase module provide variables, properties, and functions * for audio and video muxer, demuxer, and basic encoding and decoding functions. - * + * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 9 */ diff --git a/multimedia/av_codec/native_avcodec_videodecoder.h b/multimedia/av_codec/native_avcodec_videodecoder.h index 03419364f..9dc145dc4 100644 --- a/multimedia/av_codec/native_avcodec_videodecoder.h +++ b/multimedia/av_codec/native_avcodec_videodecoder.h @@ -16,9 +16,9 @@ /** * @addtogroup VideoDecoder * @{ - * + * * @brief The VideoDecoder module provide interfaces for video decoding - * + * * @syscap SystemCapability.Multimedia.Media.VideoDecoder * @since 9 * @version 1.0 diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h index 5f12a3c05..de8b767f1 100644 --- a/multimedia/av_codec/native_avcodec_videoencoder.h +++ b/multimedia/av_codec/native_avcodec_videoencoder.h @@ -16,9 +16,9 @@ /** * @addtogroup VideoEncoder * @{ - * + * * @brief The VideoEncoder module provide interfaces for video encoding - * + * * @syscap SystemCapability.Multimedia.VideoEncoder * @since 9 */ diff --git a/multimedia/av_codec/native_avdemuxer.h b/multimedia/av_codec/native_avdemuxer.h index 841f60eca..3348005db 100644 --- a/multimedia/av_codec/native_avdemuxer.h +++ b/multimedia/av_codec/native_avdemuxer.h @@ -18,7 +18,7 @@ * @{ * * @brief The AVDemuxer module provide an interface for extracting samples from media file streams. - * + * * @syscap SystemCapability.Multimedia.Media.Spliter * @since 10 */ diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index 7120f8806..7941f549c 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -18,7 +18,7 @@ * @{ * * @brief The AVSource module provide functions for constructing media resource object functionality. - * + * * @syscap SystemCapability.Multimedia.Media.Spliter * @since 10 */ diff --git a/multimedia/media_foundation/native_avbuffer.h b/multimedia/media_foundation/native_avbuffer.h index 7db2d5397..4d80dba03 100644 --- a/multimedia/media_foundation/native_avbuffer.h +++ b/multimedia/media_foundation/native_avbuffer.h @@ -19,7 +19,7 @@ * * @brief The Core module provides basic backbone capabilities for media frameworks, * including functions such as memory, error codes, and media data structures. - * + * * @syscap SystemCapability.Multimedia.Media.Core * @since 9 */ diff --git a/multimedia/media_foundation/native_avbuffer_info.h b/multimedia/media_foundation/native_avbuffer_info.h index 14d3a95a4..f5f3d8c36 100644 --- a/multimedia/media_foundation/native_avbuffer_info.h +++ b/multimedia/media_foundation/native_avbuffer_info.h @@ -19,7 +19,7 @@ * * @brief The Core module provides basic backbone capabilities for media frameworks, * including functions such as memory, error codes, and media data structures. - * + * * @syscap SystemCapability.Multimedia.Media.Core * @since 9 */ diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index 3651622a6..f03ddfd4a 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -19,7 +19,7 @@ * * @brief The Core module provides basic backbone capabilities for media frameworks, * including functions such as memory, error codes, and media data structures. - * + * * @syscap SystemCapability.Multimedia.Media.Core * @since 9 */ diff --git a/multimedia/media_foundation/native_avformat.h b/multimedia/media_foundation/native_avformat.h index 52ff2bc86..4d607854e 100644 --- a/multimedia/media_foundation/native_avformat.h +++ b/multimedia/media_foundation/native_avformat.h @@ -19,7 +19,7 @@ * * @brief The Core module provides basic backbone capabilities for media frameworks, * including functions such as memory, error codes, and media data structures. - * + * * @syscap SystemCapability.Multimedia.Media.Core * @since 9 */ diff --git a/multimedia/media_foundation/native_avmemory.h b/multimedia/media_foundation/native_avmemory.h index 4534a7d7b..620f00862 100644 --- a/multimedia/media_foundation/native_avmemory.h +++ b/multimedia/media_foundation/native_avmemory.h @@ -19,7 +19,7 @@ * * @brief The Core module provides basic backbone capabilities for media frameworks, * including functions such as memory, error codes, and media data structures. - * + * * @syscap SystemCapability.Multimedia.Media.Core * @since 9 */ -- Gitee From 94b99611ad1fb363b5b29e6e066d69e37e429b51 Mon Sep 17 00:00:00 2001 From: shihongjie Date: Mon, 9 Dec 2024 19:57:22 +0800 Subject: [PATCH 236/630] =?UTF-8?q?list=20sdk=5Fc=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shihongjie Change-Id: I5b1d8b2f4e849fdca16c0c8b432fa37cf5e09410 --- arkui/ace_engine/native/native_type.h | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index ca825e62b..0ac2b3e48 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -3190,7 +3190,7 @@ ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create(); /** * @brief Destroy the ListitemSwipeActionItem instance. * -* @param option List Item SwipeActionItem instance to be destroyed. +* @param item List Item SwipeActionItem instance to be destroyed. * @since 12 */ void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item); @@ -3198,8 +3198,8 @@ void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* ite /** * @brief Set the layout content of ListItem SwipeActionItem. * -* @param option List Item SwipeActionItem instance. -* @param builder Layout information. +* @param item List Item SwipeActionItem instance. +* @param node Layout information. * @since 12 */ void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node); @@ -3207,7 +3207,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* /** * @brief Set the threshold for long-distance sliding deletion distance of components. * -* @param option List Item SwipeActionItem instance. +* @param item List Item SwipeActionItem instance. * @param distance Component long-distance sliding deletion distance threshold. * @since 12 */ @@ -3216,7 +3216,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeA /** * @brief Obtain the threshold for long-distance sliding deletion distance of components. * -* @param option List Item SwipeActionItem instance. +* @param item List Item SwipeActionItem instance. * @return Component long-distance sliding deletion distance threshold. If -1.0f is returned, the return fails. * The possible cause of the failure is that the item parameter is abnormal, such as a null pointer. * @since 12 @@ -3226,7 +3226,7 @@ float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipe /** * @brief Set the event to be called when a sliding entry enters the deletion area. * -* @param option List Item SwipeActionItem instance. +* @param item List Item SwipeActionItem instance. * @param callback Callback Events. * @since 12 */ @@ -3235,7 +3235,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeAc /** * @brief Set the event triggered when a sliding entry enters the deletion area. * - * @param option List Item SwipeActionItem instance. + * @param item List Item SwipeActionItem instance. * @param userData User defined data. * @param callback Callback Events. * @since 12 @@ -3246,7 +3246,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData(ArkUI_Lis /** * @brief Set the event to be called when a component enters the long-range deletion area and deletes a ListItem. * -* @param option List Item SwipeActionItem instance. +* @param item List Item SwipeActionItem instance. * @param callback Callback Events. * @since 12 */ @@ -3255,7 +3255,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* /** * @brief Set the event triggered when a component enters the long-range deletion area and deletes a ListItem. * - * @param option List Item SwipeActionItem instance. + * @param item List Item SwipeActionItem instance. * @param userData User defined data. * @param callback Callback Events. * @since 12 @@ -3266,7 +3266,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(ArkUI_ListItemSwip /** * @brief Set the event to be called when a sliding entry exits the deletion area. * -* @param option List Item SwipeActionItem instance. +* @param item List Item SwipeActionItem instance. * @param callback Callback Events. * @since 12 */ @@ -3275,7 +3275,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeAct /** * @brief Set the event triggered when a sliding entry exits the deletion area. * - * @param option List Item SwipeActionItem instance. + * @param item List Item SwipeActionItem instance. * @param userData User defined data. * @param callback Callback Events. * @since 12 @@ -3286,7 +3286,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData(ArkUI_List /** * @brief Set the event triggered when the sliding state of a list item changes. * -* @param option List Item SwipeActionItem instance. +* @param item List Item SwipeActionItem instance. * @param callback Callback Events. * swipeActionState The changed state. * @since 12 @@ -3297,7 +3297,7 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange(ArkUI_ListItemSwipeAction /** * @brief Set the event triggered when the sliding state of a list item changes. * - * @param option List Item SwipeActionItem instance. + * @param item List Item SwipeActionItem instance. * @param userData User defined data. * @param callback Callback Events. * swipeActionState The changed state. @@ -3328,7 +3328,7 @@ void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* * of the ListItem SwipeActionItem. * * @param option List Item SwipeActionItem instance. -* @param builder Layout information. +* @param item Layout information. * @since 12 */ void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option, @@ -3339,7 +3339,7 @@ void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption * of the ListItem SwipeActionItem. * * @param option List Item SwipeActionItem instance. -* @param builder Layout information. +* @param item Layout information. * @since 12 */ void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option, -- Gitee From 4a1244de3ecedf2fdf1212475559c44818ba3ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Mon, 9 Dec 2024 20:15:39 +0800 Subject: [PATCH 237/630] [localSDKc2] fix file descriptiom MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子微 --- multimedia/av_codec/native_avcapability.h | 2 +- multimedia/av_codec/native_avcodec_base.h | 4 ++-- multimedia/av_codec/native_avcodec_videodecoder.h | 2 +- multimedia/av_codec/native_avcodec_videoencoder.h | 2 +- multimedia/av_codec/native_avdemuxer.h | 2 +- multimedia/av_codec/native_avsource.h | 2 +- multimedia/media_foundation/native_avbuffer.h | 2 +- multimedia/media_foundation/native_avbuffer_info.h | 2 +- multimedia/media_foundation/native_averrors.h | 2 +- multimedia/media_foundation/native_avformat.h | 2 +- multimedia/media_foundation/native_avmemory.h | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index 89cec8d1c..eb00d42fd 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -26,7 +26,7 @@ /** * @file native_avcapability.h * - * @brief Provides audio and video capability queries. + * @brief Declare the Native API used for querying encoding and decoding capabilities. * * @kit AVCodecKit * @library libnative_media_codecbase.so diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index ccad9646c..e249d047b 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -27,8 +27,8 @@ /** * @file native_avcodec_base.h * - * @brief Provides audio and video codec base. - * + * @brief Declare the Native API used for audio and video muxer, + * demuxer and basic encoding and decoding functions. * @kit AVCodecKit * @library libnative_media_codecbase.so * @syscap SystemCapability.Multimedia.Media.CodecBase diff --git a/multimedia/av_codec/native_avcodec_videodecoder.h b/multimedia/av_codec/native_avcodec_videodecoder.h index 9dc145dc4..01fa3245a 100644 --- a/multimedia/av_codec/native_avcodec_videodecoder.h +++ b/multimedia/av_codec/native_avcodec_videodecoder.h @@ -27,7 +27,7 @@ /** * @file native_avcodec_videodecoder.h * - * @brief Provides video decoder capabilities. + * @brief Declare the Native API used for video decoding. * * @kit AVCodecKit * @library libnative_media_vdec.so diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h index de8b767f1..6dc7f4bfc 100644 --- a/multimedia/av_codec/native_avcodec_videoencoder.h +++ b/multimedia/av_codec/native_avcodec_videoencoder.h @@ -26,7 +26,7 @@ /** * @file native_avcodec_videoencoder.h * - * @brief Provides video encoder capabilities. + * @brief Declare the interface used for video encoding. * * @kit AVCodecKit * @library libnative_media_venc.so diff --git a/multimedia/av_codec/native_avdemuxer.h b/multimedia/av_codec/native_avdemuxer.h index 3348005db..11fd627f6 100644 --- a/multimedia/av_codec/native_avdemuxer.h +++ b/multimedia/av_codec/native_avdemuxer.h @@ -26,7 +26,7 @@ /** * @file native_avdemuxer.h * - * @brief Provides audio and video demuxer capabilities. + * @brief Declare the interface for parsing audio and video media data. * * @kit AVCodecKit * @library libnative_media_avdemuxer.so diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index 7941f549c..3496ac2cc 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -26,7 +26,7 @@ /** * @file native_avsource.h * - * @brief Provides audio and video suorce capabilities. + * @brief Declare the interface for parsing audio and video media data. * * @kit AVCodecKit * @library libnative_media_avsource.so diff --git a/multimedia/media_foundation/native_avbuffer.h b/multimedia/media_foundation/native_avbuffer.h index 4d80dba03..29ff41d31 100644 --- a/multimedia/media_foundation/native_avbuffer.h +++ b/multimedia/media_foundation/native_avbuffer.h @@ -27,7 +27,7 @@ /** * @file native_avbuffer.h * - * @brief Provides audio and video buffer. + * @brief Declared the function interface of media data structure AVBuffer. * * @kit AVCodecKit * @library libnative_media_core.so diff --git a/multimedia/media_foundation/native_avbuffer_info.h b/multimedia/media_foundation/native_avbuffer_info.h index f5f3d8c36..490891710 100644 --- a/multimedia/media_foundation/native_avbuffer_info.h +++ b/multimedia/media_foundation/native_avbuffer_info.h @@ -27,7 +27,7 @@ /** * @file native_avbuffer_info.h * - * @brief Provides audio and video buffer info. + * @brief Declared the definition of the AVBuffer property for media data structures. * * @kit AVCodecKit * @library libnative_media_core.so diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index f03ddfd4a..98c6beb7e 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -27,7 +27,7 @@ /** * @file native_averrors.h * - * @brief Provides audio and video error description. + * @brief Media framework error code. * * @kit AVCodecKit * @library libnative_media_core.so diff --git a/multimedia/media_foundation/native_avformat.h b/multimedia/media_foundation/native_avformat.h index 4d607854e..ac30d2d47 100644 --- a/multimedia/media_foundation/native_avformat.h +++ b/multimedia/media_foundation/native_avformat.h @@ -27,7 +27,7 @@ /** * @file native_avformat.h * - * @brief Provides audio and video format. + * @brief Declared functions and enumerations related to OH_AVFormat. * * @kit AVCodecKit * @library libnative_media_core.so diff --git a/multimedia/media_foundation/native_avmemory.h b/multimedia/media_foundation/native_avmemory.h index 620f00862..224f34004 100644 --- a/multimedia/media_foundation/native_avmemory.h +++ b/multimedia/media_foundation/native_avmemory.h @@ -27,7 +27,7 @@ /** * @file native_avmemory.h * - * @brief Provides audio and video memory. + * @brief Declared the definition of media data structure AVMemory. * * @kit AVCodecKit * @library libnative_media_core.so -- Gitee From 0f83bcaa8d65aa88c2fd1ef47ba65177b258898b Mon Sep 17 00:00:00 2001 From: zhangkai Date: Sat, 7 Dec 2024 16:33:27 +0800 Subject: [PATCH 238/630] =?UTF-8?q?api=20lint=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangkai --- .../audio_framework/audio_capturer/native_audiocapturer.h | 2 ++ .../audio_framework/audio_manager/native_audio_manager.h | 6 ++++-- .../audio_manager/native_audio_routing_manager.h | 3 ++- .../audio_manager/native_audio_session_manager.h | 5 +++-- .../audio_framework/audio_renderer/native_audiorenderer.h | 2 ++ multimedia/audio_framework/common/native_audio_common.h | 3 ++- .../audio_framework/common/native_audio_device_base.h | 3 ++- multimedia/audio_framework/common/native_audiostream_base.h | 1 + .../audio_framework/common/native_audiostreambuilder.h | 3 ++- 9 files changed, 20 insertions(+), 8 deletions(-) diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h index 6daac56a3..c2c3216f6 100644 --- a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h +++ b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h @@ -288,4 +288,6 @@ OH_AudioStream_Result OH_AudioCapturer_GetOverflowCount(OH_AudioCapturer* captur #ifdef __cplusplus } #endif + #endif // NATIVE_AUDIOCAPTURER_H +/** @} */ diff --git a/multimedia/audio_framework/audio_manager/native_audio_manager.h b/multimedia/audio_framework/audio_manager/native_audio_manager.h index 24c37f94b..0c5232d6c 100644 --- a/multimedia/audio_framework/audio_manager/native_audio_manager.h +++ b/multimedia/audio_framework/audio_manager/native_audio_manager.h @@ -66,6 +66,7 @@ OH_AudioCommon_Result OH_GetAudioManager(OH_AudioManager **audioManager); /** * @brief Get audio scene. + * * @param audioManager the {@link OH_AudioManager} handle received from {@link OH_GetAudioManager}. * @param scene the {@link OH_AudioScene} pointer to receive the result. * @return Function result code: @@ -80,5 +81,6 @@ OH_AudioCommon_Result OH_GetAudioScene(OH_AudioManager* manager, OH_AudioScene * #ifdef __cplusplus } #endif -/** @} */ -#endif // NATIVE_AUDIO_ROUTING_MANAGER_H \ No newline at end of file + +#endif // NATIVE_AUDIO_ROUTING_MANAGER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h b/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h index b5f363ac7..b0f360a95 100644 --- a/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h +++ b/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h @@ -295,5 +295,6 @@ OH_AudioCommon_Result OH_AudioRoutingManager_SetMicBlockStatusCallback( #ifdef __cplusplus } #endif -/** @} */ + #endif // NATIVE_AUDIO_ROUTING_MANAGER_H +/** @} */ diff --git a/multimedia/audio_framework/audio_manager/native_audio_session_manager.h b/multimedia/audio_framework/audio_manager/native_audio_session_manager.h index 08ae35748..01df4fea3 100644 --- a/multimedia/audio_framework/audio_manager/native_audio_session_manager.h +++ b/multimedia/audio_framework/audio_manager/native_audio_session_manager.h @@ -218,5 +218,6 @@ OH_AudioCommon_Result OH_AudioSessionManager_UnregisterSessionDeactivatedCallbac #ifdef __cplusplus } #endif -/** @} */ -#endif // NATIVE_AUDIO_ROUTING_MANAGER_H \ No newline at end of file + +#endif // NATIVE_AUDIO_ROUTING_MANAGER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 90255a7fd..6bfcb82ae 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -507,4 +507,6 @@ OH_AudioStream_Result OH_AudioRenderer_SetDefaultOutputDevice( #ifdef __cplusplus } #endif + #endif // NATIVE_AUDIORENDERER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/audio_framework/common/native_audio_common.h b/multimedia/audio_framework/common/native_audio_common.h index 6a50df302..2dfd609df 100644 --- a/multimedia/audio_framework/common/native_audio_common.h +++ b/multimedia/audio_framework/common/native_audio_common.h @@ -133,5 +133,6 @@ typedef enum { #ifdef __cplusplus } #endif -/** @} */ + #endif // NATIVE_AUDIO_COMMON_H +/** @} */ diff --git a/multimedia/audio_framework/common/native_audio_device_base.h b/multimedia/audio_framework/common/native_audio_device_base.h index 573e07fed..bb8f3f9f8 100644 --- a/multimedia/audio_framework/common/native_audio_device_base.h +++ b/multimedia/audio_framework/common/native_audio_device_base.h @@ -404,5 +404,6 @@ OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceEncodingTypes(OH_AudioDe #ifdef __cplusplus } #endif -/** @} */ + #endif // NATIVE_AUDIO_DEVICE_BASE_H +/** @} */ diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index 44dacf0d0..718976920 100644 --- a/multimedia/audio_framework/common/native_audiostream_base.h +++ b/multimedia/audio_framework/common/native_audiostream_base.h @@ -718,3 +718,4 @@ typedef OH_AudioData_Callback_Result (*OH_AudioRenderer_OnWriteDataCallback)(OH_ #endif #endif // NATIVE_AUDIOSTREAM_BASE_H +/** @} */ \ No newline at end of file diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index 4989046d3..de4451adf 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -289,7 +289,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateRenderer(OH_AudioStreamBuild * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: * 1.The param of builder is nullptr; * 2.StreamType invalid; - * 3.Create OHAudioRenderer failed. + * 3.Create OHAudioCapturer failed. */ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateCapturer(OH_AudioStreamBuilder* builder, OH_AudioCapturer** audioCapturer); @@ -366,3 +366,4 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererWriteDataCallback(OH_Audi #endif #endif // NATIVE_AUDIOSTREAM_BUILDER_H +/** @} */ \ No newline at end of file -- Gitee From 7e29445d0a502077a7866c62903d97bba822ccad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Tue, 10 Dec 2024 11:48:06 +0800 Subject: [PATCH 239/630] [localSDKc2] fix comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子微 --- multimedia/av_codec/native_avcapability.h | 2 +- multimedia/av_codec/native_avcodec_base.h | 2 +- multimedia/av_codec/native_avcodec_videodecoder.h | 2 +- multimedia/av_codec/native_avcodec_videoencoder.h | 2 +- multimedia/av_codec/native_avdemuxer.h | 2 +- multimedia/av_codec/native_avsource.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index eb00d42fd..ec43e7c69 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -17,7 +17,7 @@ * @addtogroup AVCapability * @{ * - * @brief The AVCapability module provide functions for querying encoding and decoding capabilities. + * @brief The AVCapability module provides functions for querying encoding and decoding capabilities. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 10 diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index e249d047b..45b7b085d 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -17,7 +17,7 @@ * @addtogroup CodecBase * @{ * - * @brief The CodecBase module provide variables, properties, and functions + * @brief The CodecBase module provides variables, properties, and functions * for audio and video muxer, demuxer, and basic encoding and decoding functions. * * @syscap SystemCapability.Multimedia.Media.CodecBase diff --git a/multimedia/av_codec/native_avcodec_videodecoder.h b/multimedia/av_codec/native_avcodec_videodecoder.h index 01fa3245a..6b1c85fb9 100644 --- a/multimedia/av_codec/native_avcodec_videodecoder.h +++ b/multimedia/av_codec/native_avcodec_videodecoder.h @@ -17,7 +17,7 @@ * @addtogroup VideoDecoder * @{ * - * @brief The VideoDecoder module provide interfaces for video decoding + * @brief The VideoDecoder module provides interfaces for video decoding * * @syscap SystemCapability.Multimedia.Media.VideoDecoder * @since 9 diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h index 6dc7f4bfc..6b6003138 100644 --- a/multimedia/av_codec/native_avcodec_videoencoder.h +++ b/multimedia/av_codec/native_avcodec_videoencoder.h @@ -17,7 +17,7 @@ * @addtogroup VideoEncoder * @{ * - * @brief The VideoEncoder module provide interfaces for video encoding + * @brief The VideoEncoder module provides interfaces for video encoding * * @syscap SystemCapability.Multimedia.VideoEncoder * @since 9 diff --git a/multimedia/av_codec/native_avdemuxer.h b/multimedia/av_codec/native_avdemuxer.h index 11fd627f6..b0ec5e015 100644 --- a/multimedia/av_codec/native_avdemuxer.h +++ b/multimedia/av_codec/native_avdemuxer.h @@ -17,7 +17,7 @@ * @addtogroup AVDemuxer * @{ * - * @brief The AVDemuxer module provide an interface for extracting samples from media file streams. + * @brief The AVDemuxer module provides an interface for extracting samples from media file streams. * * @syscap SystemCapability.Multimedia.Media.Spliter * @since 10 diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index 3496ac2cc..4c44206d0 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -17,7 +17,7 @@ * @addtogroup AVSource * @{ * - * @brief The AVSource module provide functions for constructing media resource object functionality. + * @brief The AVSource module provides functions for constructing media resource object functionality. * * @syscap SystemCapability.Multimedia.Media.Spliter * @since 10 -- Gitee From a4f6a578cc069a3b2d67a6c86a023aaaf8d65225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Tue, 10 Dec 2024 14:39:56 +0800 Subject: [PATCH 240/630] [localSDKc2] fix comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子微 --- multimedia/av_codec/native_avcodec_videodecoder.h | 2 +- multimedia/av_codec/native_avcodec_videoencoder.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_videodecoder.h b/multimedia/av_codec/native_avcodec_videodecoder.h index 6b1c85fb9..462d5011d 100644 --- a/multimedia/av_codec/native_avcodec_videodecoder.h +++ b/multimedia/av_codec/native_avcodec_videodecoder.h @@ -17,7 +17,7 @@ * @addtogroup VideoDecoder * @{ * - * @brief The VideoDecoder module provides interfaces for video decoding + * @brief The VideoDecoder module provides interfaces for video decoding. * * @syscap SystemCapability.Multimedia.Media.VideoDecoder * @since 9 diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h index 6b6003138..334fd53d2 100644 --- a/multimedia/av_codec/native_avcodec_videoencoder.h +++ b/multimedia/av_codec/native_avcodec_videoencoder.h @@ -17,7 +17,7 @@ * @addtogroup VideoEncoder * @{ * - * @brief The VideoEncoder module provides interfaces for video encoding + * @brief The VideoEncoder module provides interfaces for video encoding. * * @syscap SystemCapability.Multimedia.VideoEncoder * @since 9 -- Gitee From 41f1b4ac3643a01a94b878586c1bc9ef689988cb Mon Sep 17 00:00:00 2001 From: wangsh88 Date: Tue, 10 Dec 2024 20:32:03 +0800 Subject: [PATCH 241/630] API lint fix Signed-off-by: wangsh88 Change-Id: I5c84f528cd8337eb59d476d8ec068a924eef8930 --- arkui/ace_engine/native/native_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index ca825e62b..5ce6029e0 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2729,7 +2729,7 @@ uint32_t OH_ArkUI_SwiperIndicator_GetColor(ArkUI_SwiperIndicator* indicator); * @brief Sets the color of the selected dot for the navigation indicator. * * @param indicator Indicates the pointer to the indicator. - * @param color the color of the selected dot, in 0xARGB format. + * @param selectedColor the color of the selected dot, in 0xARGB format. * @since 12 */ void OH_ArkUI_SwiperIndicator_SetSelectedColor(ArkUI_SwiperIndicator* indicator, uint32_t selectedColor); -- Gitee From d72c5e976bc251caebba03f200b15656dca60557 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Wed, 20 Nov 2024 14:18:56 +0800 Subject: [PATCH 242/630] cursorless axis event capi Signed-off-by: zhouchaobo Change-Id: Ic34394256f1d709d97ed21e9ee6bfa7af0a7172d --- arkui/ace_engine/native/libace.ndk.json | 8 ++++ arkui/ace_engine/native/native_key_event.h | 6 +++ arkui/ace_engine/native/native_node.h | 10 +++++ arkui/ace_engine/native/ui_input_event.h | 46 ++++++++++++++++++++++ 4 files changed, 70 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 1d822febf..5d2f41050 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2470,5 +2470,13 @@ { "first_introduced": "14", "name": "OH_ArkUI_KeyEvent_SetConsumed" + }, + { + "first_introduced": "15", + "name": "OH_ArkUI_FocusAxisEvent_GetAxisValue" + }, + { + "first_introduced": "15", + "name": "OH_ArkUI_FocusAxisEvent_SetStopPropagation" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h index 70958a813..c9c2c4fb1 100644 --- a/arkui/ace_engine/native/native_key_event.h +++ b/arkui/ace_engine/native/native_key_event.h @@ -349,6 +349,12 @@ typedef enum { ARKUI_KEY_SOURCE_TYPE_MOUSE = 1, /** Keyboard **/ ARKUI_KEY_SOURCE_TYPE_KEYBOARD = 4, + /** + * @brief Joystick. + * + * @since 15 + */ + ARKUI_KEY_SOURCE_TYPE_JOYSTICK = 5, } ArkUI_KeySourceType; /** diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f83f1a181..eaeb57736 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5713,6 +5713,16 @@ typedef enum { * @since 14 */ NODE_ON_KEY_PRE_IME = 22, + /** + * @brief Defines the event triggered when the bound component receives a focus axis event after gaining focus. + * + * The event callback is triggered by interactions with a joystick and a focused component. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_UIInputEvent}. \n + * + * @since 15 + */ + NODE_ON_FOCUS_AXIS = 23, /** * @brief Triggers onDetectResultUpdate callback diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 9b5aa63fb..51cccdef8 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -196,6 +196,30 @@ typedef enum { ARKUI_MODIFIER_KEY_FN = 1 << 3, } ArkUI_ModifierKeyName; +/** + * @brief Defines an enum for the axis types for focus axis events. + * + * @since 15 + */ +enum { + /** ABS_X. */ + UI_FOCUS_AXIS_EVENT_ABS_X = 0, + /** ABS_Y. */ + UI_FOCUS_AXIS_EVENT_ABS_Y = 1, + /** ABS_Z. */ + UI_FOCUS_AXIS_EVENT_ABS_Z = 2, + /** ABS_RZ. */ + UI_FOCUS_AXIS_EVENT_ABS_RZ = 3, + /** ABS_GAS. */ + UI_FOCUS_AXIS_EVENT_ABS_GAS = 4, + /** ABS_BRAKE. */ + UI_FOCUS_AXIS_EVENT_ABS_BRAKE = 5, + /** ABS_HAT0X. */ + UI_FOCUS_AXIS_EVENT_ABS_HAT0X = 6, + /** ABS_HAT0Y. */ + UI_FOCUS_AXIS_EVENT_ABS_HAT0Y = 7, +}; + /** * @brief Obtains the type of this UI input event. * @@ -740,6 +764,28 @@ int32_t OH_ArkUI_UIInputEvent_GetDeviceId(const ArkUI_UIInputEvent* event); */ int32_t OH_ArkUI_UIInputEvent_GetPressedKeys(const ArkUI_UIInputEvent* event, int32_t* pressedKeyCodes, int32_t length); +/** + * @brief Obtains the axis value of a focus axis event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param axis Axis type of the focus axis event. + * @return Returns the axis value of the focus axis event; returns 0.0 if any parameter error occurs. + * @since 15 + */ +double OH_ArkUI_FocusAxisEvent_GetAxisValue(const ArkUI_UIInputEvent* event, int32_t axis); + +/** + * @brief Sets whether to prevent a focus axis event from bubbling up. + * + * @param event Indicates the pointer to the current UI input event. + * @param stopPropagation Indicates whether to stop event propagation. + * @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. + * @since 15 + */ +int32_t OH_ArkUI_FocusAxisEvent_SetStopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation); + #ifdef __cplusplus }; #endif -- Gitee From 0f5de555c7d58be715e7eb2b498029ff8d28c502 Mon Sep 17 00:00:00 2001 From: zzm Date: Wed, 11 Dec 2024 03:11:41 +0000 Subject: [PATCH 243/630] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=91=EF=BC=9Aadd=20@addtogroup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zzm --- .../av_codec/avcodec_audio_channel_layout.h | 25 ++++++++++++++++++- .../av_codec/native_avcodec_audiocodec.h | 15 +++++++++-- .../av_codec/native_avcodec_audiodecoder.h | 15 +++++++++-- .../av_codec/native_avcodec_audioencoder.h | 15 +++++++++-- multimedia/av_codec/native_avmuxer.h | 15 +++++++++-- 5 files changed, 76 insertions(+), 9 deletions(-) diff --git a/multimedia/av_codec/avcodec_audio_channel_layout.h b/multimedia/av_codec/avcodec_audio_channel_layout.h index 4cc2a5eee..5afc6f04c 100644 --- a/multimedia/av_codec/avcodec_audio_channel_layout.h +++ b/multimedia/av_codec/avcodec_audio_channel_layout.h @@ -13,6 +13,28 @@ * limitations under the License. */ +/** + * @addtogroup CodecBase + * @{ + * + * @brief The CodecBase module provides variables, properties, and functions + * for audio and video muxer, demuxer, and basic encoding and decoding functions. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 9 + */ + +/** + * @file avcodec_audio_channel_layout.h + * + * @brief Declare the enumeration used for audio encoding and decoding. + * + * @kit AVCodecKit + * @library libnative_media_codecbase.so + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 9 + */ + #ifndef AVCODEC_AUDIO_CHANNEL_LAYOUT_H #define AVCODEC_AUDIO_CHANNEL_LAYOUT_H #include @@ -175,4 +197,5 @@ enum AudioChannelLayout : uint64_t { #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif // AVCODEC_AUDIO_CHANNEL_LAYOUT_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avcodec_audiocodec.h b/multimedia/av_codec/native_avcodec_audiocodec.h index 8ae03c4bb..5495a534b 100644 --- a/multimedia/av_codec/native_avcodec_audiocodec.h +++ b/multimedia/av_codec/native_avcodec_audiocodec.h @@ -13,10 +13,20 @@ * limitations under the License. */ +/** + * @addtogroup AudioCodec + * @{ + * + * @brief The AudioCodec module provides functions for audio encoding and decoding. + * + * @syscap SystemCapability.Multimedia.Media.AudioCodec + * @since 11 + */ + /** * @file native_avcodec_audiocodec.h * - * @brief Provides audio encoder and decoder capabilities. + * @brief Declare the Native API used for audio encoding and decoding. * * @kit AVCodecKit * @library libnative_media_acodec.so @@ -288,4 +298,5 @@ OH_AVErrCode OH_AudioCodec_SetDecryptionConfig(OH_AVCodec *codec, MediaKeySessio #ifdef __cplusplus } #endif -#endif // NATIVE_AVCODEC_AUDIOCODEC_H \ No newline at end of file +#endif // NATIVE_AVCODEC_AUDIOCODEC_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avcodec_audiodecoder.h b/multimedia/av_codec/native_avcodec_audiodecoder.h index f2269e3e8..979eda38a 100644 --- a/multimedia/av_codec/native_avcodec_audiodecoder.h +++ b/multimedia/av_codec/native_avcodec_audiodecoder.h @@ -13,10 +13,20 @@ * limitations under the License. */ +/** + * @addtogroup AudioDecoder + * @{ + * + * @brief The AudioDecoder module provides functions for audio decoding. + * + * @syscap SystemCapability.Multimedia.Media.AudioDecoder + * @since 9 + */ + /** * @file native_avcodec_audiodecoder.h * - * @brief Provides audio decoder capabilities. + * @brief Declare the Native API used for audio decoding. * * @kit AVCodecKit * @library libnative_media_adec.so @@ -244,4 +254,5 @@ OH_AVErrCode OH_AudioDecoder_IsValid(OH_AVCodec *codec, bool *isValid); #ifdef __cplusplus } #endif -#endif // NATIVE_AVCODEC_AUDIODECODER_H \ No newline at end of file +#endif // NATIVE_AVCODEC_AUDIODECODER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avcodec_audioencoder.h b/multimedia/av_codec/native_avcodec_audioencoder.h index a01215f8f..611ac03fd 100644 --- a/multimedia/av_codec/native_avcodec_audioencoder.h +++ b/multimedia/av_codec/native_avcodec_audioencoder.h @@ -13,10 +13,20 @@ * limitations under the License. */ +/** + * @addtogroup AudioEncoder + * @{ + * + * @brief The AudioEncoder module provides functions for audio encoding. + * + * @syscap SystemCapability.Multimedia.Media.AudioEncoder + * @since 9 + */ + /** * @file native_avcodec_audioencoder.h * - * @brief Provides audio encoder capabilities. + * @brief Declare the Native API used for audio encoding. * * @kit AVCodecKit * @library libnative_media_aenc.so @@ -254,4 +264,5 @@ OH_AVErrCode OH_AudioEncoder_IsValid(OH_AVCodec *codec, bool *isValid); #ifdef __cplusplus } #endif -#endif // NATIVE_AVCODEC_AUDIOENCODER_H \ No newline at end of file +#endif // NATIVE_AVCODEC_AUDIOENCODER_H +/** @} */ \ No newline at end of file diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h index af3c44b12..e50b31cee 100644 --- a/multimedia/av_codec/native_avmuxer.h +++ b/multimedia/av_codec/native_avmuxer.h @@ -13,10 +13,20 @@ * limitations under the License. */ +/** + * @addtogroup AVMuxer + * @{ + * + * @brief The AVMuxer module provides functions for audio and video muxer. + * + * @syscap SystemCapability.Multimedia.Media.Muxer + * @since 10 + */ + /** * @file native_avmuxer.h * - * @brief Provides audio and video muxer capabilities. + * @brief Declare the Native API used for audio and video muxer. * * @kit AVCodecKit * @library libnative_media_avmuxer.so @@ -171,4 +181,5 @@ OH_AVErrCode OH_AVMuxer_Destroy(OH_AVMuxer *muxer); } #endif -#endif // NATIVE_AVMUXER_H \ No newline at end of file +#endif // NATIVE_AVMUXER_H +/** @} */ \ No newline at end of file -- Gitee From b51941b65154aaa430b93b5c87c3d893772caabc Mon Sep 17 00:00:00 2001 From: liumingxiang1 Date: Wed, 11 Dec 2024 20:45:28 +0800 Subject: [PATCH 244/630] =?UTF-8?q?word=20break=E6=96=B0=E5=A2=9E=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=EF=BC=9AWORD=5FBREAK=5FTYPE=5FHYPHEN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang1 --- graphic/graphic_2d/native_drawing/drawing_text_typography.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 275f0af37..998932c6a 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -279,6 +279,8 @@ typedef enum { WORD_BREAK_TYPE_BREAK_ALL = 1, /** Break Word type */ WORD_BREAK_TYPE_BREAK_WORD = 2, + /** Attempt break word with hyphens */ + WORD_BREAK_TYPE_HYPHEN = 3, } OH_Drawing_WordBreakType; /** -- Gitee From f3b09f59b8d45ec7ec411909fb911240d2cbd44b Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 11 Dec 2024 21:31:57 +0800 Subject: [PATCH 245/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=AD=97=E4=BD=93=E6=9E=9A=E4=B8=BE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 2ae193b58..4ba3ee2e6 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -60,6 +60,8 @@ typedef enum { STYLISH = 1 << 2, /** Installed font types */ INSTALLED = 1 << 3, + /** Customized font types */ + CUSTOMIZED = 1 << 4; } OH_Drawing_SystemFontType; /** -- Gitee From 974be7e7dd2503ddfa093624265a7c07b7c8d4d4 Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 11 Dec 2024 21:44:03 +0800 Subject: [PATCH 246/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=AD=97=E4=BD=93=E6=9E=9A=E4=B8=BE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 2ae193b58..4ba3ee2e6 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -60,6 +60,8 @@ typedef enum { STYLISH = 1 << 2, /** Installed font types */ INSTALLED = 1 << 3, + /** Customized font types */ + CUSTOMIZED = 1 << 4; } OH_Drawing_SystemFontType; /** -- Gitee From f1ce79855a2a94e0f232588cec85b6369f058224 Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 11 Dec 2024 23:09:40 +0800 Subject: [PATCH 247/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 4ba3ee2e6..adf1c2cde 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -61,7 +61,7 @@ typedef enum { /** Installed font types */ INSTALLED = 1 << 3, /** Customized font types */ - CUSTOMIZED = 1 << 4; + CUSTOMIZED = 1 << 4, } OH_Drawing_SystemFontType; /** -- Gitee From 63ca93d3f6f8bb856c4aaf158422daae50ddee2f Mon Sep 17 00:00:00 2001 From: cjj Date: Thu, 12 Dec 2024 09:28:11 +0800 Subject: [PATCH 248/630] fix_code Signed-off-by: cjj --- multimedia/camera_framework/camera_manager.h | 2 +- multimedia/camera_framework/capture_session.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/camera_framework/camera_manager.h b/multimedia/camera_framework/camera_manager.h index 3c7f2fee0..71a8f4616 100644 --- a/multimedia/camera_framework/camera_manager.h +++ b/multimedia/camera_framework/camera_manager.h @@ -197,7 +197,7 @@ Camera_ErrorCode OH_CameraManager_DeleteSupportedCameras(Camera_Manager* cameraM * @brief Gets the supported output capability for the specific camera and specific mode. * * @param cameraManager the {@link Camera_Manager} instance. - * @param cameras the {@link Camera_Device} to be queryed. + * @param camera the {@link Camera_Device} to be queryed. * @param cameraOutputCapability the supported {@link Camera_OutputCapability} will be filled * if the method call succeeds. * @return {@link #CAMERA_OK} if the method call succeeds. diff --git a/multimedia/camera_framework/capture_session.h b/multimedia/camera_framework/capture_session.h index 54786c5d9..0e8e03546 100644 --- a/multimedia/camera_framework/capture_session.h +++ b/multimedia/camera_framework/capture_session.h @@ -550,7 +550,7 @@ Camera_ErrorCode OH_CaptureSession_IsFocusModeSupported(Camera_CaptureSession* s * @brief Get current focus mode. * * @param session the {@link Camera_CaptureSession} instance. - * @param exposureBias the current {@link Camera_FocusMode}. + * @param focusMode the current {@link Camera_FocusMode}. * @return {@link #CAMERA_OK} if the method call succeeds. * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect. * {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config. -- Gitee From 61c5d97e11169d4d852c927ce4f54a865856f66f Mon Sep 17 00:00:00 2001 From: wanglingyi Date: Thu, 12 Dec 2024 08:14:04 +0000 Subject: [PATCH 249/630] 12121 Signed-off-by: wanglingyi --- multimedia/player_framework/avplayer.h | 1 + multimedia/player_framework/avplayer_base.h | 1 + 2 files changed, 2 insertions(+) diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h index 8cdba3b86..474b2885a 100644 --- a/multimedia/player_framework/avplayer.h +++ b/multimedia/player_framework/avplayer.h @@ -32,6 +32,7 @@ * * @kit MediaKit * @library libavplayer.so + * @syscap SystemCapability.Multimedia.Media.AVPlayer * @since 11 * @version 1.0 */ diff --git a/multimedia/player_framework/avplayer_base.h b/multimedia/player_framework/avplayer_base.h index f3306fa35..b351f5cdd 100644 --- a/multimedia/player_framework/avplayer_base.h +++ b/multimedia/player_framework/avplayer_base.h @@ -31,6 +31,7 @@ * * @kit MediaKit * @library libavplayer.so + * @syscap SystemCapability.Multimedia.Media.AVPlayer * @since 11 * @version 1.0 */ -- Gitee From 5294d0982d97df53097cfc484c78aabd4e839a7d Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Wed, 13 Nov 2024 14:34:07 +0800 Subject: [PATCH 250/630] Add ndk interface Signed-off-by: sunjiakun --- .../ability_runtime/application_context.h | 136 ++++++++++++++++++ .../libability_runtime.ndk.json | 32 +++++ 2 files changed, 168 insertions(+) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 1ba53503d..6a1266d94 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -92,6 +92,142 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetAreaMode(Ability AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleName( char* buffer, int32_t bufferSize, int32_t* writeLength); +/** + * @brief Obtain the temp directory of the application. + * + * @param buffer A pointer to a buffer that receives the temp directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetTempDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the resource directory of the application. + * + * @param buffer A pointer to a buffer that receives the resource directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetResourceDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the files directory of the application. + * + * @param buffer A pointer to a buffer that receives the files directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetFilesDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the database directory of the application. + * + * @param buffer A pointer to a buffer that receives the database directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetDatabaseDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the preferences directory of the application. + * + * @param buffer A pointer to a buffer that receives the preferences directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetPreferencesDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the bundle code directory of the application. + * + * @param buffer A pointer to a buffer that receives the bundle code directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleCodeDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the distributed files directory of the application. + * + * @param buffer A pointer to a buffer that receives the distributed files directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetDistributedFilesDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the cloud file directory of the application. + * + * @param buffer A pointer to a buffer that receives the cloud file directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 16 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCloudFileDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + #ifdef __cplusplus } // extern "C" #endif diff --git a/AbilityKit/ability_runtime/libability_runtime.ndk.json b/AbilityKit/ability_runtime/libability_runtime.ndk.json index 239f84f61..f761059ab 100644 --- a/AbilityKit/ability_runtime/libability_runtime.ndk.json +++ b/AbilityKit/ability_runtime/libability_runtime.ndk.json @@ -10,5 +10,37 @@ { "first_introduced": "13", "name": "OH_AbilityRuntime_ApplicationContextGetBundleName" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetTempDir" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetResourceDir" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetFilesDir" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetDatabaseDir" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetPreferencesDir" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetBundleCodeDir" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetDistributedFilesDir" + }, + { + "first_introduced": "16", + "name": "OH_AbilityRuntime_ApplicationContextGetCloudFileDir" } ] \ No newline at end of file -- Gitee From b8684728d10bc915484b6744a3360aca1cc08dc4 Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Fri, 22 Nov 2024 14:57:04 +0800 Subject: [PATCH 251/630] back GetResourceDir Signed-off-by: sunjiakun --- .../ability_runtime/application_context.h | 17 ----------------- .../ability_runtime/libability_runtime.ndk.json | 4 ---- 2 files changed, 21 deletions(-) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 6a1266d94..4ac78aa5a 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -109,23 +109,6 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleName( AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetTempDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); -/** - * @brief Obtain the resource directory of the application. - * - * @param buffer A pointer to a buffer that receives the resource directory of the application. - * @param bufferSize The length of the buffer. - * @param writeLength The string length actually written to the buffer, - * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. - * @return The error code. - * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. - * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, - * or the buffer size is less than the minimum buffer size. - * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 - */ -AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetResourceDir( - char* buffer, const int32_t bufferSize, int32_t* writeLength); - /** * @brief Obtain the files directory of the application. * diff --git a/AbilityKit/ability_runtime/libability_runtime.ndk.json b/AbilityKit/ability_runtime/libability_runtime.ndk.json index f761059ab..fcde96f6c 100644 --- a/AbilityKit/ability_runtime/libability_runtime.ndk.json +++ b/AbilityKit/ability_runtime/libability_runtime.ndk.json @@ -15,10 +15,6 @@ "first_introduced": "16", "name": "OH_AbilityRuntime_ApplicationContextGetTempDir" }, - { - "first_introduced": "16", - "name": "OH_AbilityRuntime_ApplicationContextGetResourceDir" - }, { "first_introduced": "16", "name": "OH_AbilityRuntime_ApplicationContextGetFilesDir" -- Gitee From 4733f048bb09e1507695dbcb63efcc19c8601257 Mon Sep 17 00:00:00 2001 From: ajajaaj1024 Date: Thu, 12 Dec 2024 17:23:04 +0800 Subject: [PATCH 252/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=BE=E7=BD=AEAcc?= =?UTF-8?q?essibilityValue=E5=B1=9E=E6=80=A7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ajajaaj1024 Change-Id: I33c5b1b08216087a3bd841cbe9b9e0edb30c8922 --- arkui/ace_engine/native/libace.ndk.json | 80 ++++++++++++++++--------- arkui/ace_engine/native/native_type.h | 57 ++++++++++++++++++ 2 files changed, 109 insertions(+), 28 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 5d2f41050..d4a39a67f 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -510,75 +510,75 @@ { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryPointerId" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryX" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryY" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryWindowX" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryWindowY" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryDisplayX" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryDisplayY" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryPressure" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryTiltX" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryTiltY" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeEvent_GetEventType" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeEvent_GetTargetId" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeEvent_GetNodeHandle" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeEvent_GetInputEvent" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeEvent_GetNodeComponentEvent" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeEvent_GetStringAsyncEvent" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeEvent_GetUserData" @@ -592,7 +592,7 @@ "name": "OH_ArkUI_GetModuleInterface" }, { - "first_introduced": "12", + "first_introduced": "12", "name": "OH_ArkUI_NodeAdapter_Create" }, { @@ -678,11 +678,11 @@ { "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_SetSize" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_SetItemCount" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_SetCrossCount" @@ -706,7 +706,7 @@ { "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_GetItemCount" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_GetCrossCount" @@ -810,15 +810,15 @@ { "first_introduced": "12", "name": "OH_ArkUI_NodeContent_InsertNode" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeContent_RemoveNode" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeContent_RegisterCallback" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_NodeContentEvent_GetEventType" @@ -852,7 +852,7 @@ "name": "OH_ArkUI_MouseEvent_GetMouseAction" }, { - "first_introduced": "12", + "first_introduced": "12", "name": "OH_ArkUI_GuidelineOption_Create" }, { @@ -1022,7 +1022,7 @@ { "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_GetBiasVertical" - }, + }, { "first_introduced": "12", "name": "OH_ArkUI_SwiperIndicator_Create" @@ -1519,6 +1519,30 @@ "first_introduced": "12", "name": "OH_ArkUI_AccessibilityValue_GetCurrent" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AccessibilityValue_SetRangeMin" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AccessibilityValue_GetRangeMin" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AccessibilityValue_SetRangeMax" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AccessibilityValue_GetRangeMax" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AccessibilityValue_SetRangeCurrent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AccessibilityValue_GetRangeCurrent" + }, { "first_introduced": "12", "name": "OH_ArkUI_AccessibilityValue_SetText" @@ -2432,7 +2456,7 @@ "name": "OH_NativeXComponent_RegisterKeyEventCallbackWithResult" }, { - "first_introduced": "14", + "first_introduced": "14", "name": "OH_ArkUI_KeyEvent_GetType" }, { diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f5c62284c..8ebb2055e 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -3887,6 +3887,63 @@ void OH_ArkUI_AccessibilityValue_SetCurrent(ArkUI_AccessibilityValue* value, int */ int32_t OH_ArkUI_AccessibilityValue_GetCurrent(ArkUI_AccessibilityValue* value); +/** + * @brief Set accessibility minimum value. + * + * @param value accessibility value object. + * @param rangeMin minimum value based on range components, The default value is -1. + * @since 16 +*/ +void OH_ArkUI_AccessibilityValue_SetRangeMin(ArkUI_AccessibilityValue* value, int32_t rangeMin); + +/** + * @brief Get accessibility minimum value. + * + * @param value accessibility value object. + * @return minimum value based on range components, The default value is -1. + * If the function parameter is abnormal, return -1. + * @since 16 +*/ +int32_t OH_ArkUI_AccessibilityValue_GetRangeMin(ArkUI_AccessibilityValue* value); + +/** + * @brief Set accessibility maximum value. + * + * @param value accessibility value object. + * @param rangeMax maximum value based on range components, The default value is -1. + * @since 16 +*/ +void OH_ArkUI_AccessibilityValue_SetRangeMax(ArkUI_AccessibilityValue* value, int32_t rangeMax); + +/** + * @brief Get accessibility maximum value. + * + * @param value accessibility value object. + * @return maximum value based on range components, The default value is -1. + * If the function parameter is abnormal, return -1. + * @since 16 +*/ +int32_t OH_ArkUI_AccessibilityValue_GetRangeMax(ArkUI_AccessibilityValue* value); + +/** + * @brief Set accessibility current value. + * + * @param value accessibility value object. + * @param rangeCurrent value based on range components, The default value is -1. + * @since 16 +*/ +void OH_ArkUI_AccessibilityValue_SetRangeCurrent(ArkUI_AccessibilityValue* value, int32_t rangeCurrent); + +/** + * @brief Get accessibility current value. + * + * @param value accessibility value object. + * @return current value based on range components, The default value is -1. + * If the function parameter is abnormal, return -1. + * @since 16 +*/ +int32_t OH_ArkUI_AccessibilityValue_GetRangeCurrent(ArkUI_AccessibilityValue* value); + /** * @brief Set accessibility text value. * -- Gitee From b49d2a5da67d17bfb7c3e24bed34ad0a730b1888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=B9=94=E5=BC=82?= Date: Fri, 13 Dec 2024 18:31:24 +0800 Subject: [PATCH 253/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=86=85=E5=AD=98=E5=83=8F=E7=B4=A0=E5=9C=B0=E5=9D=80=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈乔异 --- .../include/image/pixelmap_native.h | 26 +++++++++++++++++++ .../image_framework/libpixelmap.ndk.json | 8 ++++++ 2 files changed, 34 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index c7ea3eb57..6d33db8d4 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -901,6 +901,32 @@ Image_ErrorCode OH_PixelmapNative_SetColorSpaceNative(OH_PixelmapNative *pixelma */ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, char *name, size_t *size); +/** + * @brief Obtains the memory address of a PixelMap and locks the memory. + * + * @param pixelmap The PixelMap pointer to be operated. + * @param addr The double pointer to the memory address of the PixelMap. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or addr are invalid. + * @see OH_PixelmapNative + * @since 16 + */ +Image_ErrorCode OH_PixelmapNative_AccessPixels(OH_PixelmapNative *pixelmap, void **addr); + +/** + * @brief Unlocks the memory of the PixelMap data. + * This function is used with {@link OH_PixelmapNative_AccessPixels} in pairs. + * + * @param pixelmap The PixelMap pointer to be operated. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap is invalid. + * @see OH_PixelmapNative + * @since 16 + */ +Image_ErrorCode OH_PixelmapNative_UnaccessPixels(OH_PixelmapNative *pixelmap); + #ifdef __cplusplus }; #endif diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 4c103c8ae..c276ec615 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -182,5 +182,13 @@ { "first_introduced": "13", "name": "OH_PixelmapNative_SetMemoryName" + }, + { + "first_introduced": "16", + "name": "OH_PixelmapNative_AccessPixels" + }, + { + "first_introduced": "16", + "name": "OH_PixelmapNative_UnaccessPixels" } ] \ No newline at end of file -- Gitee From 8765ac390b524c02e58265f7697e602e93d5af9e Mon Sep 17 00:00:00 2001 From: wujinhui Date: Mon, 16 Dec 2024 11:07:32 +0800 Subject: [PATCH 254/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=8F=82=E6=95=B0=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wujinhui --- arkui/ace_engine/native/native_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_interface.h b/arkui/ace_engine/native/native_interface.h index 2c138912c..64cae7e06 100644 --- a/arkui/ace_engine/native/native_interface.h +++ b/arkui/ace_engine/native/native_interface.h @@ -64,7 +64,7 @@ typedef enum { * * @param type Indicates the type of the native API set provided by ArkUI, for example, ARKUI_NATIVE_NODE * and ARKUI_NATIVE_GESTURE. - * @param sturctName Indicates the name of a native struct defined in the corresponding header file, for example, + * @param structName Indicates the name of a native struct defined in the corresponding header file, for example, * ArkUI_NativeNodeAPI_1 in . * @return Returns the pointer to the abstract native API, which can be used after being converted into a specific type. * @code {.cpp} -- Gitee From b5132fdb807b1fc4b3ea532e2126d4b764b698db Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Mon, 16 Dec 2024 14:53:21 +0800 Subject: [PATCH 255/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- graphic/graphic_2d/native_drawing/drawing_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index c1bfda620..65a39f672 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -486,7 +486,7 @@ typedef struct { * @version 1.0 */ typedef struct { - /** A pointer to a byte string containing UTF-16BE(Big Endian) encoded entities */ + /** A pointer to a byte string containing UTF-16 encoded entities */ uint8_t* strData; /** The length of `strData` in bytes */ uint32_t strLen; -- Gitee From 599a1e0e473cba255d818df02c0d30d1eb2f1340 Mon Sep 17 00:00:00 2001 From: zhouyan Date: Mon, 16 Dec 2024 15:49:00 +0800 Subject: [PATCH 256/630] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAPI=20Lint=E5=91=8A?= =?UTF-8?q?=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyan Change-Id: I3abd2498536cbbb3bdb5c302e7638df02334ad9a --- arkui/ace_engine/native/native_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 8ebb2055e..0e7abf9f0 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -3522,7 +3522,7 @@ ArkUI_CustomSpanMetrics* OH_ArkUI_CustomSpanMetrics_Create(); /** * @brief Disposes of measurement metrics of this custom span. * - * @param info The CustomSpanMetrics instance to be destroyed. + * @param metrics The CustomSpanMetrics instance to be destroyed. * @since 12 */ void OH_ArkUI_CustomSpanMetrics_Dispose(ArkUI_CustomSpanMetrics* metrics); -- Gitee From 8a33122f14959c8564a95261fb8b1a15c9fc4ae9 Mon Sep 17 00:00:00 2001 From: w30052974 Date: Mon, 16 Dec 2024 19:13:42 +0800 Subject: [PATCH 257/630] interface_sdk addtogroup fixed Signed-off-by: w30052974 --- ai/neural_network_runtime/neural_network_core.h | 2 +- ai/neural_network_runtime/neural_network_runtime.h | 2 +- ai/neural_network_runtime/neural_network_runtime_type.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ai/neural_network_runtime/neural_network_core.h b/ai/neural_network_runtime/neural_network_core.h index 8d0665738..c3485d5c5 100644 --- a/ai/neural_network_runtime/neural_network_core.h +++ b/ai/neural_network_runtime/neural_network_core.h @@ -14,7 +14,7 @@ */ /** - * @addtogroup NeuralNeworkRuntime + * @addtogroup NeuralNetworkRuntime * @{ * * @brief Provides APIs of Neural Network Runtime for accelerating the model inference. diff --git a/ai/neural_network_runtime/neural_network_runtime.h b/ai/neural_network_runtime/neural_network_runtime.h index 294b362f5..a92a27d83 100644 --- a/ai/neural_network_runtime/neural_network_runtime.h +++ b/ai/neural_network_runtime/neural_network_runtime.h @@ -14,7 +14,7 @@ */ /** - * @addtogroup NeuralNeworkRuntime + * @addtogroup NeuralNetworkRuntime * @{ * * @brief Provides APIs of Neural Network Runtime for accelerating the model inference. diff --git a/ai/neural_network_runtime/neural_network_runtime_type.h b/ai/neural_network_runtime/neural_network_runtime_type.h index 414fa872c..5c003b0a8 100644 --- a/ai/neural_network_runtime/neural_network_runtime_type.h +++ b/ai/neural_network_runtime/neural_network_runtime_type.h @@ -14,7 +14,7 @@ */ /** - * @addtogroup NeuralNeworkRuntime + * @addtogroup NeuralNetworkRuntime * @{ * * @brief Provides APIs for accelerating the Neural Network Runtime model inference. -- Gitee From 27ac054255ca1c88fd0b11f818f7c25b59a42324 Mon Sep 17 00:00:00 2001 From: WangJiazhen Date: Tue, 17 Dec 2024 10:39:45 +0800 Subject: [PATCH 258/630] api lint Signed-off-by: WangJiazhen --- .../native/native_interface_xcomponent.h | 4 +++- arkui/ace_engine/native/native_type.h | 14 +++++++------- .../native/native_xcomponent_key_event.h | 9 ++++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index c06d6cec6..5bdad5100 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -28,7 +28,8 @@ * @file native_interface_xcomponent.h * * @brief Declares APIs for accessing a Native XComponent. - * + * @library libace_ndk.z.so + * @syscap SystemCapability.ArkUI.ArkUI.Full * @kit ArkUI * @since 8 * @version 1.0 @@ -848,3 +849,4 @@ int32_t OH_NativeXComponent_RegisterKeyEventCallbackWithResult( }; #endif #endif // _NATIVE_INTERFACE_XCOMPONENT_H_ +/** @} */ \ No newline at end of file diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 8ebb2055e..674e103b1 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2986,7 +2986,7 @@ void OH_ArkUI_AlignmentRuleOption_Dispose(ArkUI_AlignmentRuleOption* option); * * @param option Alignment rule information of subcomponents in the relative container. * @param id The id value of the anchor component. - * @param value Alignment relative to the anchor component. + * @param alignment Alignment relative to the anchor component. * @since 12 */ void OH_ArkUI_AlignmentRuleOption_SetStart( @@ -2997,7 +2997,7 @@ void OH_ArkUI_AlignmentRuleOption_SetStart( * * @param option Alignment rule information of subcomponents in the relative container. * @param id The id value of the anchor component. - * @param value Alignment relative to the anchor component. + * @param alignment Alignment relative to the anchor component. * @since 12 */ void OH_ArkUI_AlignmentRuleOption_SetEnd( @@ -3008,7 +3008,7 @@ void OH_ArkUI_AlignmentRuleOption_SetEnd( * * @param option Alignment rule information of subcomponents in the relative container. * @param id The id value of the anchor component. -* @param value Alignment relative to anchor component +* @param alignment Alignment relative to anchor component * @since 12 */ void OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal( @@ -3019,7 +3019,7 @@ void OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal( * * @param option Alignment rule information of subcomponents in the relative container. * @param id The id value of the anchor component. - * @param value Alignment relative to anchor component + * @param alignment Alignment relative to anchor component * @since 12 */ void OH_ArkUI_AlignmentRuleOption_SetTop(ArkUI_AlignmentRuleOption* option, const char* id, @@ -3030,7 +3030,7 @@ void OH_ArkUI_AlignmentRuleOption_SetTop(ArkUI_AlignmentRuleOption* option, cons * * @param option Alignment rule information of subcomponents in the relative container. * @param id The id value of the anchor component. - * @param value Alignment relative to anchor component + * @param alignment Alignment relative to anchor component * @since 12 */ void OH_ArkUI_AlignmentRuleOption_SetBottom( @@ -3041,7 +3041,7 @@ void OH_ArkUI_AlignmentRuleOption_SetBottom( * * @param option Alignment rule information of subcomponents in the relative container. * @param id The id value of the anchor component. -* @param value Alignment relative to the anchor component. +* @param alignment Alignment relative to the anchor component. * @since 12 */ void OH_ArkUI_AlignmentRuleOption_SetCenterVertical( @@ -3060,7 +3060,7 @@ void OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(ArkUI_AlignmentRuleOption* o * @brief Set the vertical offset parameter of the component under the anchor point constraint. * * @param option Alignment rule information of subcomponents in the relative container. - * @param horizontal bias value in the vertical direction. + * @param vertical bias value in the vertical direction. * @since 12 */ void OH_ArkUI_AlignmentRuleOption_SetBiasVertical(ArkUI_AlignmentRuleOption* option, float vertical); diff --git a/arkui/ace_engine/native/native_xcomponent_key_event.h b/arkui/ace_engine/native/native_xcomponent_key_event.h index 3bde2de13..f4b178cc1 100644 --- a/arkui/ace_engine/native/native_xcomponent_key_event.h +++ b/arkui/ace_engine/native/native_xcomponent_key_event.h @@ -16,13 +16,19 @@ /** * @addtogroup OH_NativeXComponent Native XComponent * @{ + * + * @brief Describes the key event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES. + * + * @since 10 + * @version 1.0 */ /** * @file native_xcomponent_key_event.h * * @brief Declares enums for key event of Native XComponent. - * + * @library libace_ndk.z.so + * @syscap SystemCapability.ArkUI.ArkUI.Full * @kit ArkUI * @since 10 * @version 1.0 @@ -390,3 +396,4 @@ typedef enum { }; #endif #endif // _NATIVE_INTERFACE_XCOMPONENT_KEY_EVENT_H_ +/** @} */ \ No newline at end of file -- Gitee From 4659b12cda5a7becb3aa18a930809eb584c98bd3 Mon Sep 17 00:00:00 2001 From: y30053096 Date: Tue, 26 Nov 2024 20:34:04 +0800 Subject: [PATCH 259/630] add enum for ndk Signed-off-by: y30053096 Change-Id: I000536d9cd10d1f3092ff3f0019766dc5e341313 --- security/huks/include/native_huks_type.h | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index b7d00d8ca..49f976334 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -137,6 +137,14 @@ enum OH_Huks_KeyPadding { OH_HUKS_PADDING_PKCS5 = 4, /** PKCS #7. */ OH_HUKS_PADDING_PKCS7 = 5, + /** ISO IEC 9796-2 + * @since 16 + */ + OH_HUKS_PADDING_ISO_IEC_9796_2 = 6, + /** ISO IEC 9797-1 + * @since 16 + */ + OH_HUKS_PADDING_ISO_IEC_9797_1 = 7, }; /** @@ -217,6 +225,19 @@ enum OH_Huks_KeySize { OH_HUKS_SM2_KEY_SIZE_256 = 256, /** ShangMi4 (SM4) key of 128 bits. */ OH_HUKS_SM4_KEY_SIZE_128 = 128, + + /** DES key of 64 bits. + * @since 16 + */ + OH_HUKS_DES_KEY_SIZE_64 = 64, + /** 3DES key of 128 bits. + * @since 16 + */ + OH_HUKS_3DES_KEY_SIZE_128 = 128, + /** 3DES key of 192 bits. + * @since 16 + */ + OH_HUKS_3DES_KEY_SIZE_192 = 192, }; /** @@ -257,6 +278,19 @@ enum OH_Huks_KeyAlg { OH_HUKS_ALG_SM3 = 151, /** SM4. */ OH_HUKS_ALG_SM4 = 152, + + /** DES. + * @since 16 + */ + OH_HUKS_ALG_DES = 160, + /** 3DES. + * @since 16 + */ + OH_HUKS_ALG_3DES = 161, + /** CMAC. + * @since 16 + */ + OH_HUKS_ALG_CMAC = 162, }; /** -- Gitee From a710f02a71385289d26eb1fca77905b58660212b Mon Sep 17 00:00:00 2001 From: chenjunxiang Date: Tue, 17 Dec 2024 17:58:31 +0800 Subject: [PATCH 260/630] =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenjunxiang Change-Id: I1d1d30199733564b67f6fe83d9b0ff3e45ea366f --- arkui/ace_engine/native/native_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 8ebb2055e..8ffdba928 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -3825,7 +3825,7 @@ ArkUI_AccessibilityValue* OH_ArkUI_AccessibilityValue_Create(void); /** * @brief Dispose accessibility value. * -* @param state accessibility value object. +* @param value accessibility value object. * @since 12 */ void OH_ArkUI_AccessibilityValue_Dispose(ArkUI_AccessibilityValue* value); -- Gitee From 53fadeca1a3cc4da3869f5dc07f3daae9a06e8a2 Mon Sep 17 00:00:00 2001 From: sun-xinyan Date: Tue, 17 Dec 2024 20:15:46 +0800 Subject: [PATCH 261/630] =?UTF-8?q?CAPI=20Lint=E5=91=8A=E8=AD=A6=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sun-xinyan Change-Id: Ie8e63e10bae5a586e9aece6d0a628f299571a039 --- arkui/ace_engine/native/native_animate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h index 1538ee9c5..858ccfa39 100644 --- a/arkui/ace_engine/native/native_animate.h +++ b/arkui/ace_engine/native/native_animate.h @@ -1189,4 +1189,4 @@ int32_t OH_ArkUI_TransitionEffect_SetAnimation( #endif #endif // ARKUI_NATIVE_ANIMATE_H -/** @}*/ \ No newline at end of file +/** @} */ \ No newline at end of file -- Gitee From 9ab3dcef694a62aba2c9d992372ac01cfcb74f29 Mon Sep 17 00:00:00 2001 From: WangYing225 Date: Mon, 16 Dec 2024 15:09:52 +0800 Subject: [PATCH 262/630] =?UTF-8?q?=E8=A1=A5=E5=85=85CAPI=E5=88=9B?= =?UTF-8?q?=E5=BB=BATEXTURE=E7=B1=BB=E5=9E=8Bxcomponent=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: WangYing225 --- arkui/ace_engine/native/native_node.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 14ac42137..ccbb77543 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -92,6 +92,10 @@ typedef enum { ARKUI_NODE_RADIO = 18, /** Image animator. */ ARKUI_NODE_IMAGE_ANIMATOR = 19, + /** XComponent of type TEXTURE. + * @since 16 + */ + ARKUI_NODE_XCOMPONENT_TEXTURE, /** Stack container. */ ARKUI_NODE_STACK = MAX_NODE_SCOPE_NUM, /** Swiper. */ -- Gitee From 19c4b90667392feba0798395542f7f3d32db9081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=B9=94=E5=BC=82?= Date: Wed, 18 Dec 2024 12:06:02 +0800 Subject: [PATCH 263/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈乔异 --- multimedia/image_framework/include/image/image_common.h | 2 ++ multimedia/image_framework/include/image/pixelmap_native.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 43c3af017..d414451ba 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -174,6 +174,8 @@ typedef enum { IMAGE_ALLOC_FAILED = 7600301, /** memory copy failed */ IMAGE_COPY_FAILED = 7600302, + /** @error memory lock or unlock failed */ + IMAGE_LOCK_UNLOCK_FAILED = 7600303, /** unknown error */ IMAGE_UNKNOWN_ERROR = 7600901, /** decode data source exception */ diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 6d33db8d4..ad645d2c8 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -903,12 +903,15 @@ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, cha /** * @brief Obtains the memory address of a PixelMap and locks the memory. + * When the memory is locked, any operation that modifies or releases the PixelMap will fail and return + * {@link IMAGE_BAD_PARAMETER}. * * @param pixelmap The PixelMap pointer to be operated. * @param addr The double pointer to the memory address of the PixelMap. * @return Function result code: * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or addr are invalid. + * {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be locked. * @see OH_PixelmapNative * @since 16 */ @@ -922,6 +925,7 @@ Image_ErrorCode OH_PixelmapNative_AccessPixels(OH_PixelmapNative *pixelmap, void * @return Function result code: * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap is invalid. + * {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be unlocked. * @see OH_PixelmapNative * @since 16 */ -- Gitee From 20148b77fd42ae452f3fb57ed886e2b012c4c6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=B9=94=E5=BC=82?= Date: Wed, 18 Dec 2024 14:25:14 +0800 Subject: [PATCH 264/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈乔异 --- multimedia/image_framework/include/image/image_common.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index d414451ba..1626ecbee 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -174,7 +174,10 @@ typedef enum { IMAGE_ALLOC_FAILED = 7600301, /** memory copy failed */ IMAGE_COPY_FAILED = 7600302, - /** @error memory lock or unlock failed */ + /** + * @error memory lock or unlock failed + * @since 16 + */ IMAGE_LOCK_UNLOCK_FAILED = 7600303, /** unknown error */ IMAGE_UNKNOWN_ERROR = 7600901, -- Gitee From 6f280ffeee81b7247bf4a1ad0589e7a7cb7b7747 Mon Sep 17 00:00:00 2001 From: owenCreeper Date: Wed, 18 Dec 2024 07:13:47 +0000 Subject: [PATCH 265/630] add unprocessed Signed-off-by: owenCreeper --- .../audio_framework/common/native_audiostream_base.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index 718976920..894bc4fd4 100644 --- a/multimedia/audio_framework/common/native_audiostream_base.h +++ b/multimedia/audio_framework/common/native_audiostream_base.h @@ -445,7 +445,13 @@ typedef enum { * * @since 13 */ - AUDIOSTREAM_SOURCE_TYPE_CAMCORDER = 13 + AUDIOSTREAM_SOURCE_TYPE_CAMCORDER = 13, + /** + * Unprocessed source type. + * + * @since 14 + */ + AUDIOSTREAM_SOURCE_TYPE_UNPROCESSED = 14 } OH_AudioStream_SourceType; /** -- Gitee From a5fd86f95ed41abe1d737702ed4a63b3c966b32d Mon Sep 17 00:00:00 2001 From: zhangkai Date: Wed, 18 Dec 2024 16:05:06 +0800 Subject: [PATCH 266/630] =?UTF-8?q?api=20lint=E5=91=8A=E8=AD=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangkai --- multimedia/audio_framework/audio_manager/native_audio_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/audio_framework/audio_manager/native_audio_manager.h b/multimedia/audio_framework/audio_manager/native_audio_manager.h index 0c5232d6c..8bfbf2c89 100644 --- a/multimedia/audio_framework/audio_manager/native_audio_manager.h +++ b/multimedia/audio_framework/audio_manager/native_audio_manager.h @@ -67,7 +67,7 @@ OH_AudioCommon_Result OH_GetAudioManager(OH_AudioManager **audioManager); /** * @brief Get audio scene. * - * @param audioManager the {@link OH_AudioManager} handle received from {@link OH_GetAudioManager}. + * @param manager the {@link OH_AudioManager} handle received from {@link OH_GetAudioManager}. * @param scene the {@link OH_AudioScene} pointer to receive the result. * @return Function result code: * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful. -- Gitee From 4942fdc41217704e8386fab638163c2005f81276 Mon Sep 17 00:00:00 2001 From: bluhuang Date: Wed, 6 Nov 2024 15:13:04 +0800 Subject: [PATCH 267/630] preferences support CLKV Signed-off-by: bluhuang --- .../preferences/include/oh_preferences.h | 12 +++++++++ .../include/oh_preferences_option.h | 25 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/distributeddatamgr/preferences/include/oh_preferences.h b/distributeddatamgr/preferences/include/oh_preferences.h index 944fa9dff..837891ae7 100644 --- a/distributeddatamgr/preferences/include/oh_preferences.h +++ b/distributeddatamgr/preferences/include/oh_preferences.h @@ -263,6 +263,18 @@ int OH_Preferences_RegisterDataObserver(OH_Preferences *preference, void *contex int OH_Preferences_UnregisterDataObserver(OH_Preferences *preference, void *context, OH_PreferencesDataObserver observer, const char *keys[], uint32_t keyCount); +/** + * @brief Check if a type is supported or not. + * + * @param type the storage type of {@Link Preferences_StorageType}. + * @param isSupported Pointer to the Boolean value obtained. + * @return Returns the status code of the execution. + * {@link PREFERENCES_OK} indicates the operation is successful. + * {@link PREFERENCES_ERROR_INVALID_PARAM} indicates invalid args are passed in. + * @since 16 + */ +int OH_Preferences_IsStorageTypeSupported(Preferences_StorageType type, bool *isSupported); + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/preferences/include/oh_preferences_option.h b/distributeddatamgr/preferences/include/oh_preferences_option.h index 80ae78809..9100f4054 100644 --- a/distributeddatamgr/preferences/include/oh_preferences_option.h +++ b/distributeddatamgr/preferences/include/oh_preferences_option.h @@ -52,6 +52,18 @@ extern "C" { */ typedef struct OH_PreferencesOption OH_PreferencesOption; +/** + * @brief Enumerates the preferences storage types. + * + * @since 16 + */ +typedef enum Preferences_StorageType { + /** XML storage*/ + PREFERENCES_STORAGE_XML = 0, + /** CLKV storage */ + PREFERENCES_STORAGE_CLKV +} Preferences_StorageType; + /** * @brief Creates an {@Link OH_PreferencesOption} instance. * @@ -101,6 +113,19 @@ int OH_PreferencesOption_SetBundleName(OH_PreferencesOption *option, const char */ int OH_PreferencesOption_SetDataGroupId(OH_PreferencesOption *option, const char *dataGroupId); +/** + * @brief Sets the storage type in an {@Link OH_PreferencesOption} instance. + * + * @param option Represents a pointer to an {@link OH_PreferencesOption} instance. + * @param type Represents preferences storage type. + * @return Returns the status code of the execution. + * {@link PREFERENCES_OK} success. + * {@link PREFERENCES_ERROR_INVALID_PARAM} indicates invalid args are passed in. + * @see OH_PreferencesOption. + * @since 16 + */ +int OH_PreferencesOption_SetStorageType(OH_PreferencesOption *option, Preferences_StorageType type); + /** * @brief Destroys an {@Link OH_PreferencesOption} instance. * -- Gitee From 3287b43a3308e2df0db3663f93c8d5c1b95d62ac Mon Sep 17 00:00:00 2001 From: lihui Date: Mon, 9 Dec 2024 15:00:08 +0800 Subject: [PATCH 268/630] add native buffer format enum Signed-off-by: lihui --- graphic/graphic_2d/native_buffer/native_buffer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h index 154df76d3..9460c7bc9 100644 --- a/graphic/graphic_2d/native_buffer/native_buffer.h +++ b/graphic/graphic_2d/native_buffer/native_buffer.h @@ -193,6 +193,16 @@ typedef enum OH_NativeBuffer_Format { * @since 12 */ NATIVEBUFFER_PIXEL_FMT_RAW10, + /** + * BLOB format + * @since 16 + */ + NATIVEBUFFER_PIXEL_FMT_BLOB, + /** + * RGBA16 float format + * @since 16 + */ + NATIVEBUFFER_PIXEL_FMT_RGBA16_FLOAT, /** * vender mask format * @since 12 -- Gitee From 6cceaafa56df8932398f489555c70a842671786a Mon Sep 17 00:00:00 2001 From: wangyimin Date: Mon, 16 Dec 2024 16:54:50 +0800 Subject: [PATCH 269/630] cherry-pick jsvm api Signed-off-by: wangyimin --- ark_runtime/jsvm/jsvm.h | 465 ++++++++++++++++++++++++++++++ ark_runtime/jsvm/jsvm_types.h | 234 +++++++++++++++ ark_runtime/jsvm/libjsvm.ndk.json | 116 ++++++++ 3 files changed, 815 insertions(+) diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index 830971a20..3a5d3f7a3 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -121,6 +121,18 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Init(const JSVM_InitOptions* options); JSVM_EXTERN JSVM_Status OH_JSVM_CreateVM(const JSVM_CreateVMOptions* options, JSVM_VM* result); +/** + * @brief This function controls how Microtasks are invoked of the vm. If the method is not + * called, the default microtask policy of vm is JSVM_MicrotaskPolicy::JSVM_MICROTASK_AUTO. + * + * @param vm The VM instance to set mircrotasks policy. + * @param policy Policy for running microtasks. + * @return Returns JSVM_OK if the API succeeded. + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_SetMicrotaskPolicy(JSVM_VM vm, + JSVM_MicrotaskPolicy policy); + /** * @brief Destroys VM instance. * @@ -131,6 +143,61 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateVM(const JSVM_CreateVMOptions* options, */ JSVM_EXTERN JSVM_Status OH_JSVM_DestroyVM(JSVM_VM vm); +/** + * @brief This API allocates a default JavaScript Proxy. It is the equivalent of + * doing new Proxy(target, handler) in JavaScript. + * + * @param env The environment that the API is invoked under. + * @param target A JSVM_Value representing the JavaScript Object which you want to proxy. + * @param handler A JSVM_Value representing the JavaScript Object that defines which + * operations will be intercepted and how to redefine intercepted operations. + * @param result A JSVM_Value representing a JavaScript Proxy. + * @return Returns JSVM functions result code. + * {@link JSVM_OK } if the API succeeded. \n + * {@link JSVM_INVALID_ARG } if the any of the input arguments is NULL. \n + * {@link JSVM_OBJECT_EXPECTED} if target or handler is not Javascript Object. \n + * {@link JSVM_PENDING_EXCEPTION} if an exception occurs. \n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_CreateProxy(JSVM_Env env, + JSVM_Value target, + JSVM_Value handler, + JSVM_Value* result); + +/** + * @brief This API checks if the value passed in is a Proxy. + * + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param isProxy Whether the given value is Proxy. + * @return Returns JSVM functions result code. + * {@link JSVM_OK } if the API succeeded. \n + * {@link JSVM_INVALID_ARG } if the any of the input arguments is NULL. \n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_IsProxy(JSVM_Env env, + JSVM_Value value, + bool* isProxy); + +/** + * @brief This API gets target from proxy. + * + * @param env The environment that the API is invoked under. + * @param value JSVM_Value representing JavaScript Proxy whose target to return. + * @param result Target of the given proxy. + * @return Returns JSVM functions result code. + * {@link JSVM_OK } if the API succeeded. \n + * {@link JSVM_INVALID_ARG } if the any of the input arguments is NULL. \n + * {@link JSVM_INVALID_TYPE} if value is not a Javascript Proxy. \n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_ProxyGetTarget(JSVM_Env env, + JSVM_Value value, + JSVM_Value* result); + /** * @brief This API open a new VM scope for the VM instance. * @@ -2314,6 +2381,28 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsPromise(JSVM_Env env, JSVM_Value value, bool* isPromise); +/** + * @brief This API register a resolution/rejection handler with a promise. + * @param env The environment that the API is invoked under. + * @param promise The promise to be handled. + * @param onFulfilled The function to be invoked if promise is resolved. + * @param onRejected The function to be invoked if promise is rejected. + * @param result Another promise returned from promise then/catch method. + * @return Returns JSVM functions result code. + * {@link JSVM_OK } if the API succeeded. \n + * {@link JSVM_INVALID_ARG } if the arguments are invalid. \n + * {@link JSVM_INVALID_TYPE } if the arguments are invalid Javascript type. \n + * {@link JSVM_PENDING_EXCEPTION} if an exception occurs. \n + * {@link JSVM_GENERIC_FAILURE} if the API failed. \n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_PromiseRegisterHandler(JSVM_Env env, + JSVM_Value promise, + JSVM_Value onFulfilled, + JSVM_Value onRejected, + JSVM_Value* result); + /** * @brief This API parses a JSON string and returns it as value if successful. * @param env The environment that the API is invoked under. @@ -3207,6 +3296,382 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDataReference(JSVM_Env env, JSVM_EXTERN JSVM_Status OH_JSVM_GetReferenceData(JSVM_Env env, JSVM_Ref ref, JSVM_Data* result); + +/** + * @brief Check whether the given JSVM_Value is a BigInt Object. + * + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given value is a BigInt Object. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_IsBigIntObject(JSVM_Env env, + JSVM_Value value, + bool* result); + +/** + * @brief Check whether the given JSVM_Value is a Boolean Object. + * + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given value is a Boolean Object. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_IsBooleanObject(JSVM_Env env, + JSVM_Value value, + bool* result); + +/** + * @brief Check whether the given JSVM_Value is a String Object. + * + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given value is a String Object. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_IsStringObject(JSVM_Env env, + JSVM_Value value, + bool* result); + +/** + * @brief Check whether the given JSVM_Value is a Number Object. + * + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given value is a Number Object. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_IsNumberObject(JSVM_Env env, + JSVM_Value value, + bool* result); + +/** + * @brief Check whether the given JSVM_Value is a Symbol Object. + * + * @param env The environment that the API is invoked under. + * @param value The JavaScript value to check. + * @param result Whether the given value is a Symbol Object. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_IsSymbolObject(JSVM_Env env, + JSVM_Value value, + bool* result); + +/** + * @brief This API returns the Symbol.asyncIterator of Well-Known Symbols. + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.asyncIterator of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolAsyncIterator(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.hasInstance of Well-Known Symbols. + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.hasInstance of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolHasInstance(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.isConcatSpreadable of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.isConcatSpreadable of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolIsConcatSpreadable(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.match of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.match of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolMatch(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.replace of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.replace of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolReplace(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.search of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.search of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolSearch(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.split of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.split of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolSplit(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.toPrimitive of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.toPrimitive of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolToPrimitive(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.unscopables of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.unscopables of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolUnscopables(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.toStringTag of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.toStringTag of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolToStringTag(JSVM_Env env, JSVM_Value* result); + +/** + * @brief This API returns the Symbol.iterator of Well-Known Symbols + * + * @param env The environment that the API is invoked under. + * @param result The Symbol.iterator of Well-Known Symbols. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolIterator(JSVM_Env env, JSVM_Value* result); + +/** + * @brief Trace start with specified categories for all JSVM VM.(Non-thread-safe) + * + * @param count The count of trace categories. + * @param categories Select internal trace events for tracing by categories. + * @param tag User-defined tag of trace data. + * @param eventsCount Number of trace events. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if categories or count is illegal.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_TraceStart(size_t count, const JSVM_TraceCategory* categories, + const char* tag, size_t eventsCount); + +/** + * @brief Trace stop for specified categories for all JSVM VM.(Non-thread-safe) + * + * @param stream The output stream callback for receiving the data. + * @param streamData Data passed to the stream callback. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if stream or streamData is NULL\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_TraceStop(JSVM_OutputStream stream, void* streamData); + +/** + * @brief Set Handler For OOM Error. If this function is invoked repeatedly, + * only the last time takes effect. When handler is null, the previous setting is canceled. + * + * @param vm The environment that the API is invoked under. + * @param handler The handler for OOM Error. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if vm is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForOOMError(JSVM_VM vm, + JSVM_HandlerForOOMError handler); + +/** + * @brief Set Handler For Fatal Error. If this function is invoked repeatedly, + * only the last time takes effect. When handler is null, the previous setting is canceled. + * + * @param vm The environment that the API is invoked under. + * @param handler The handler for Fatal Error. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if vm is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForFatalError(JSVM_VM vm, + JSVM_HandlerForFatalError handler); + +/** + * @brief Set Handler For Promise Reject. If this function is invoked repeatedly, + * only the last time takes effect. When handler is null, the previous setting is canceled. + * + * @param vm The environment that the API is invoked under. + * @param handler The handler for Promise Reject. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if vm is NULL.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForPromiseReject(JSVM_VM vm, + JSVM_HandlerForPromiseReject handler); + +/** + * @brief When wrapping a C++ class, the C++ constructor callback passed via constructor + * should be a static method on the class that calls the actual class constructor, then + * wraps the new C++ instance in a JavaScript object according to the different Options + * passed in, and returns the wrapper object. + * + * @param env The environment that the API is invoked under. + * @param utf8name Name of the JavaScript constructor function. For clarity, it is + * recommended to use the C++ class name when wrapping a C++ class. + * @param length The length of the utf8name in bytes, or JSVM_AUTO_LENGTH if it + * is null-terminated. + * @param constructor Struct include callback function that handles constructing instances of the class. + * When wrapping a C++ class, this method must be a static member with the JSVM_Callback.callback + * signature. A C++ class constructor cannot be used. + * Include Optional data to be passed to the constructor callback as the data + * property of the callback info. JSVM_Callback provides more details. + * @param propertyCount Number of items in the properties array argument. + * @param properties Array of property descriptors describing static and instance data + * properties, accessors, and methods on the class See JSVM_PropertyDescriptor. + * @param parentClass The parent-class of the currently defined class. + * @param option_count Number of items in an option array argument. + * @param options DefineClass options to be passed. + * @param result A JSVM_Value representing the constructor function for the class. + * @return Returns JSVM functions result code. + * {@link JSVM_OK } if the function executed successfully. \n + * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL. \n + * {@link JSVM_GENERIC_FAILURE} if the input utf8name | constructor | properties is invalid. \n + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_DefineClassWithOptions(JSVM_Env env, + const char* utf8name, + size_t length, + JSVM_Callback constructor, + size_t propertyCount, + const JSVM_PropertyDescriptor* properties, + JSVM_Value parentClass, + size_t option_count, + JSVM_DefineClassOptions options[], + JSVM_Value* result); + +/** + * @brief Add VM GC Callback. + * + * @param vm The environment that the API is invoked under. + * @param triggerTime The timing of GC callback trigger. + * @param handler When Trigger gc, the callback function will be called. + * @param gcType The type of gc. + * @param userData The native pointer data. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if the vm or the handler is NULL or the handler has been added before.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_AddHandlerForGC(JSVM_VM vm, + JSVM_CBTriggerTimeForGC triggerTime, + JSVM_HandlerForGC handler, + JSVM_GCType gcType, + void* userData); + +/** + * @brief Remove VM GC Callback. + * + * @param vm The environment that the API is invoked under. + * @param triggerTime The timing of GC callback trigger. + * @param handler When Trigger gc, the callback function will be called. + * @param userData The native pointer data. + * @return Returns JSVM funtions result code. + * {@link JSVM_OK } if the function executed successfully.\n + * {@link JSVM_INVALID_ARG } if the vm or the handler is NULL, or the handler has been removed, + * or the handler has never been added.\n + * + * @since 16 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_RemoveHandlerForGC(JSVM_VM vm, + JSVM_CBTriggerTimeForGC triggerTime, + JSVM_HandlerForGC handler, + void* userData); EXTERN_C_END /** @} */ #endif /* ARK_RUNTIME_JSVM_JSVM_H */ diff --git a/ark_runtime/jsvm/jsvm_types.h b/ark_runtime/jsvm/jsvm_types.h index 9c834bc11..069bc95b5 100644 --- a/ark_runtime/jsvm/jsvm_types.h +++ b/ark_runtime/jsvm/jsvm_types.h @@ -327,6 +327,10 @@ typedef enum { JSVM_NO_EXTERNAL_BUFFERS_ALLOWED, /** cannot run +js status. */ JSVM_CANNOT_RUN_JS, + /** invalid input type status. + * @since 16 + */ + JSVM_INVALID_TYPE, } JSVM_Status; /** @@ -771,6 +775,236 @@ typedef enum { JSVM_CACHE_TYPE_WASM, } JSVM_CacheType; +/** + * @brief Microtask policies of JSVM. + * + * @since 16 + */ +typedef enum { + /** Microtasks are invoked with the OH_JSVM_PerformMicrotaskCheckpoint() method. */ + JSVM_MICROTASK_EXPLICIT = 0, + /** Microtasks are invoked when the script call depth decrements to zero. + * Default mode. + */ + JSVM_MICROTASK_AUTO, +} JSVM_MicrotaskPolicy; + +/** + * @brief Trace category for jsvm internal trace events. + * + * @since 16 + */ +typedef enum { + /** Tracing main interface invoking of JSVM, such as run scripts. */ + JSVM_TRACE_VM, + /** Tracing interface invoking about compilation, such as CompileCodeBackground. */ + JSVM_TRACE_COMPILE, + /** Tracing interface invoking about execution status, such as Interrupts and Microtasks. */ + JSVM_TRACE_EXECUTE, + /** Tracing external callback */ + JSVM_TRACE_RUNTIME, + /** Tracing stack trace in JSVM. */ + JSVM_TRACE_STACK_TRACE, + /** Tracing Main interface invoking of WASM, such as Compile Wasm Module and Instantiate. */ + JSVM_TRACE_WASM, + /** Tracing more detailed interface invoking of WASM, such as background compilation and wrappers. */ + JSVM_TRACE_WASM_DETAILED +} JSVM_TraceCategory; + +/** + * @brief The promise-reject event. + * + * @since 16 + */ +typedef enum { + /** Promise is rejected for other reasons. */ + JSVM_PROMISE_REJECT_OTHER_REASONS = 0, + /** Promise rejected with no handler. */ + JSVM_PROMISE_REJECT_WITH_NO_HANDLER = 1, + /** Add the handler after Promise has been rejected. */ + JSVM_PROMISE_ADD_HANDLER_AFTER_REJECTED = 2, + /** After the Promise has been resolved, try to reject the Promise again. */ + JSVM_PROMISE_REJECT_AFTER_RESOLVED = 3, + /** After the Promise has been resolved, try resolving the Promise again. */ + JSVM_PROMISE_RESOLVE_AFTER_RESOLVED = 4, +} JSVM_PromiseRejectEvent; + +/** + * @brief The level of message error. + * + * @since 16 + */ +typedef enum { + /** Log level message. */ + JSVM_MESSAGE_LOG = (1 << 0), + /** Debug level message. */ + JSVM_MESSAGE_DEBUG = (1 << 1), + /** Info level message. */ + JSVM_MESSAGE_INFO = (1 << 2), + /** Error level message. */ + JSVM_MESSAGE_ERROR = (1 << 3), + /** Warning level message. */ + JSVM_MESSAGE_WARNING = (1 << 4), + /** All level message. */ + JSVM_MESSAGE_ALL = JSVM_MESSAGE_LOG | JSVM_MESSAGE_DEBUG | JSVM_MESSAGE_INFO | JSVM_MESSAGE_ERROR | + JSVM_MESSAGE_WARNING, +} JSVM_MessageErrorLevel; + +/** + * @brief Function pointer type of OOM-Error callback. + * + * @param location The location information of the OOM error. + * @param detail The detail of the OOM error. + * @param isHeapOOM Determine whether the OOM type is Heap OOM. + * + * @since 16 + */ +typedef void(JSVM_CDECL* JSVM_HandlerForOOMError)(const char* location, + const char* detail, + bool isHeapOOM); + +/** + * @brief Function pointer type of Fatal-Error callback. + * + * @param location The location information of the Fatal error. + * @param message The message of the Fatal error. + * + * @since 16 + */ +typedef void(JSVM_CDECL* JSVM_HandlerForFatalError)(const char* location, + const char* message); + +/** + * @brief Function pointer type of Promise-Reject callback. + * + * @param env The environment that the function is invoked under. + * @param rejectEvent The promise-reject event. + * @param rejectInfo An JS-object containing two properties: 'promise' and 'value'. + * The 'promise' represents a reference to the Promise object that was rejected. + * The 'value' represents the rejection reason associated with that promise. + * + * @since 16 + */ +typedef void(JSVM_CDECL* JSVM_HandlerForPromiseReject)(JSVM_Env env, + JSVM_PromiseRejectEvent rejectEvent, + JSVM_Value rejectInfo); + +/** + * @brief DefineClass options id. + * + * @since 16 + */ +typedef enum { + /** Defining a class in normal mode. */ + JSVM_DEFINE_CLASS_NORMAL, + /** Defining a class with count. */ + JSVM_DEFINE_CLASS_WITH_COUNT, + /** Defining a class with property handler. */ + JSVM_DEFINE_CLASS_WITH_PROPERTY_HANDLER, +} JSVM_DefineClassOptionsId; + +/** + * @brief DefineClass options. + * + * @since 16 + */ +typedef struct { + /** DefineClass option id. */ + JSVM_DefineClassOptionsId id; + /** option content. */ + union { + /** for option value with pointer type. */ + void* ptr; + /** for option value with integer type */ + int num; + /** for option value with bool type */ + bool boolean; + } content; +} JSVM_DefineClassOptions; + +/** + * @brief The property-handler used to define class. + * + * @since 16 + */ +typedef struct { + /** The instance object triggers the corresponding callback function. */ + JSVM_PropertyHandlerCfg propertyHandlerCfg; + /** Calling an instance object as a function will trigger this callback. */ + JSVM_Callback callAsFunctionCallback; +} JSVM_PropertyHandler; + +/** + * @brief The timing of GC callback trigger. + * + * @since 16 + */ +typedef enum { + /** Trigger GC callback before GC. */ + JSVM_CB_TRIGGER_BEFORE_GC, + /** Trigger GC callback after GC. */ + JSVM_CB_TRIGGER_AFTER_GC, +} JSVM_CBTriggerTimeForGC; + +/** + * @brief The GC type. + * + * @since 16 + */ +typedef enum { + /** The GC algorithm is Scavenge. */ + JSVM_GC_TYPE_SCAVENGE = 1 << 0, + /** The GC algorithm is Minor-Mark-Compact. */ + JSVM_GC_TYPE_MINOR_MARK_COMPACT = 1 << 1, + /** The GC algorithm is Mark-Sweep-Compact. */ + JSVM_GC_TYPE_MARK_SWEEP_COMPACT = 1 << 2, + /** The GC algorithm is Incremental-Marking. */ + JSVM_GC_TYPE_INCREMENTAL_MARKING = 1 << 3, + /** The GC algorithm is Weak-Callbacks. */ + JSVM_GC_TYPE_PROCESS_WEAK_CALLBACKS = 1 << 4, + /** All GC algorithm. */ + JSVM_GC_TYPE_ALL = JSVM_GC_TYPE_SCAVENGE | JSVM_GC_TYPE_MINOR_MARK_COMPACT | + JSVM_GC_TYPE_MARK_SWEEP_COMPACT | JSVM_GC_TYPE_INCREMENTAL_MARKING | + JSVM_GC_TYPE_PROCESS_WEAK_CALLBACKS, +} JSVM_GCType; + +/** + * @brief The GC callback flags. + * + * @since 16 + */ +typedef enum { + /** No GC callback falgs. */ + JSVM_NO_GC_CALLBACK_FLAGS, + /** Reserved object information will be built in the garbage collection callback. */ + JSVM_GC_CALLBACK_CONSTRUCT_RETAINED_OBJECT_INFOS, + /** Enforce Garbage Collection Callback. */ + JSVM_GC_CALLBACK_FORCED, + /** Synchronous phantom callback processing. */ + JSVM_GC_CALLBACK_SYNCHRONOUS_PHANTOM_CALLBACK_PROCESSING, + /** All available garbage objects are collected during garbage collection. */ + JSVM_GC_CALLBACK_COLLECT_ALL_AVAILABLE_GARBAGE, + /** Garbage collection collects all external memory. */ + JSVM_GC_CALLBACK_COLLECT_ALL_EXTERNAL_MEMORY, + /** Schedule Garbage Collection at Idle Time. */ + JSVM_GC_CALLBACK_SCHEDULE_IDLE_GARBAGE_COLLECTION, +} JSVM_GCCallbackFlags; + +/** + * @brief Function pointer type of GC callback. + * + * @param vm The VM instance that the JSVM-API call is invoked under. + * @param gcType The gc type. + * @param flags The GC callback flags. + * @param data The native pointer data. + * + * @since 16 + */ +typedef void(JSVM_CDECL* JSVM_HandlerForGC)(JSVM_VM vm, + JSVM_GCType gcType, + JSVM_GCCallbackFlags flags, + void* data); + /** * @brief To represent a JavaScript Data type. * diff --git a/ark_runtime/jsvm/libjsvm.ndk.json b/ark_runtime/jsvm/libjsvm.ndk.json index ea0cb6092..abfded3f9 100644 --- a/ark_runtime/jsvm/libjsvm.ndk.json +++ b/ark_runtime/jsvm/libjsvm.ndk.json @@ -735,6 +735,122 @@ "first_introduced": "12", "name": "OH_JSVM_ReleaseCache" }, + { + "first_introduced": "16", + "name": "OH_JSVM_PromiseRegisterHandler" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_CreateProxy" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_IsProxy" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_ProxyGetTarget" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_IsBigIntObject" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_IsBooleanObject" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_IsStringObject" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_IsNumberObject" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_IsSymbolObject" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolAsyncIterator" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolHasInstance" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolIsConcatSpreadable" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolMatch" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolReplace" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolSearch" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolSplit" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolToPrimitive" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolUnscopables" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolToStringTag" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_GetSymbolIterator" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_SetMicrotaskPolicy" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_TraceStart" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_TraceStop" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_SetHandlerForOOMError" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_SetHandlerForFatalError" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_SetHandlerForPromiseReject" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_DefineClassWithOptions" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_AddHandlerForGC" + }, + { + "first_introduced": "16", + "name": "OH_JSVM_RemoveHandlerForGC" + }, { "first_introduced": "16", "name": "OH_JSVM_CreateExternalStringLatin1" -- Gitee From 5bfe56fc390b3e517d45b6df16585242439c4e97 Mon Sep 17 00:00:00 2001 From: sunyaozu Date: Wed, 18 Dec 2024 18:31:11 +0800 Subject: [PATCH 270/630] provide icu ndk function Signed-off-by: sunyaozu --- third_party/icu4c/BUILD.gn | 4 + third_party/icu4c/libicu.ndk.json | 272 ++++ .../icu4c/ndk_headers/unicode/ustring.h | 1353 +++++++++++++++++ third_party/icu4c/ndk_headers/unicode/utext.h | 582 +++++++ .../icu4c/ndk_headers/unicode/utypes.h | 8 + 5 files changed, 2219 insertions(+) create mode 100644 third_party/icu4c/ndk_headers/unicode/ustring.h create mode 100644 third_party/icu4c/ndk_headers/unicode/utext.h diff --git a/third_party/icu4c/BUILD.gn b/third_party/icu4c/BUILD.gn index d3466f1eb..c5dd29f72 100644 --- a/third_party/icu4c/BUILD.gn +++ b/third_party/icu4c/BUILD.gn @@ -45,6 +45,8 @@ ohos_ndk_library("libicu_ndk") { "unicode/unumberformatter.h", "unicode/uscript.h", "unicode/uset.h", + "unicode/ustring.h", + "unicode/utext.h", "unicode/utrans.h", "unicode/utypes.h", ] @@ -79,6 +81,8 @@ ohos_ndk_headers("icu_unicode_header") { "ndk_headers/unicode/unumberformatter.h", "ndk_headers/unicode/uscript.h", "ndk_headers/unicode/uset.h", + "ndk_headers/unicode/ustring.h", + "ndk_headers/unicode/utext.h", "ndk_headers/unicode/utrans.h", "ndk_headers/unicode/utypes.h", ] diff --git a/third_party/icu4c/libicu.ndk.json b/third_party/icu4c/libicu.ndk.json index 5fc158cad..40397f053 100644 --- a/third_party/icu4c/libicu.ndk.json +++ b/third_party/icu4c/libicu.ndk.json @@ -1814,5 +1814,277 @@ { "first_introduced": "12", "name":"uidna_nameToUnicodeUTF8" + }, + { + "first_introduced": "15", + "name":"utext_close" + }, + { + "first_introduced": "15", + "name":"utext_openUTF8" + }, + { + "first_introduced": "15", + "name":"utext_openUChars" + }, + { + "first_introduced": "15", + "name":"utext_clone" + }, + { + "first_introduced": "15", + "name":"utext_equals" + }, + { + "first_introduced": "15", + "name":"utext_nativeLength" + }, + { + "first_introduced": "15", + "name":"utext_char32At" + }, + { + "first_introduced": "15", + "name":"utext_current32" + }, + { + "first_introduced": "15", + "name":"utext_next32" + }, + { + "first_introduced": "15", + "name":"utext_previous32" + }, + { + "first_introduced": "15", + "name":"utext_next32From" + }, + { + "first_introduced": "15", + "name":"utext_previous32From" + }, + { + "first_introduced": "15", + "name":"utext_getNativeIndex" + }, + { + "first_introduced": "15", + "name":"utext_setNativeIndex" + }, + { + "first_introduced": "15", + "name":"utext_moveIndex32" + }, + { + "first_introduced": "15", + "name":"utext_getPreviousNativeIndex" + }, + { + "first_introduced": "15", + "name":"utext_extract" + }, + { + "first_introduced": "15", + "name":"u_strlen" + }, + { + "first_introduced": "15", + "name":"u_countChar32" + }, + { + "first_introduced": "15", + "name":"u_strHasMoreChar32Than" + }, + { + "first_introduced": "15", + "name":"u_strcat" + }, + { + "first_introduced": "15", + "name":"u_strncat" + }, + { + "first_introduced": "15", + "name":"u_strstr" + }, + { + "first_introduced": "15", + "name":"u_strFindFirst" + }, + { + "first_introduced": "15", + "name":"u_strchr" + }, + { + "first_introduced": "15", + "name":"u_strchr32" + }, + { + "first_introduced": "15", + "name":"u_strrstr" + }, + { + "first_introduced": "15", + "name":"u_strFindLast" + }, + { + "first_introduced": "15", + "name":"u_strrchr" + }, + { + "first_introduced": "15", + "name":"u_strrchr32" + }, + { + "first_introduced": "15", + "name":"u_strpbrk" + }, + { + "first_introduced": "15", + "name":"u_strcspn" + }, + { + "first_introduced": "15", + "name":"u_strspn" + }, + { + "first_introduced": "15", + "name":"u_strtok_r" + }, + { + "first_introduced": "15", + "name":"u_strcmp" + }, + { + "first_introduced": "15", + "name":"u_strcmpCodePointOrder" + }, + { + "first_introduced": "15", + "name":"u_strCompare" + }, + { + "first_introduced": "15", + "name":"u_strCaseCompare" + }, + { + "first_introduced": "15", + "name":"u_strncmp" + }, + { + "first_introduced": "15", + "name":"u_strncmpCodePointOrder" + }, + { + "first_introduced": "15", + "name":"u_strcasecmp" + }, + { + "first_introduced": "15", + "name":"u_strncasecmp" + }, + { + "first_introduced": "15", + "name":"u_memcasecmp" + }, + { + "first_introduced": "15", + "name":"u_strcpy" + }, + { + "first_introduced": "15", + "name":"u_strncpy" + }, + { + "first_introduced": "15", + "name":"u_memcpy" + }, + { + "first_introduced": "15", + "name":"u_memmove" + }, + { + "first_introduced": "15", + "name":"u_memset" + }, + { + "first_introduced": "15", + "name":"u_memcmp" + }, + { + "first_introduced": "15", + "name":"u_memcmpCodePointOrder" + }, + { + "first_introduced": "15", + "name":"u_memchr" + }, + { + "first_introduced": "15", + "name":"u_memchr32" + }, + { + "first_introduced": "15", + "name":"u_memrchr" + }, + { + "first_introduced": "15", + "name":"u_memrchr32" + }, + { + "first_introduced": "15", + "name":"u_strToUpper" + }, + { + "first_introduced": "15", + "name":"u_strToLower" + }, + { + "first_introduced": "15", + "name":"u_strToTitle" + }, + { + "first_introduced": "15", + "name":"u_strFoldCase" + }, + { + "first_introduced": "15", + "name":"u_strToUTF8" + }, + { + "first_introduced": "15", + "name":"u_strFromUTF8" + }, + { + "first_introduced": "15", + "name":"u_strToUTF8WithSub" + }, + { + "first_introduced": "15", + "name":"u_strFromUTF8WithSub" + }, + { + "first_introduced": "15", + "name":"u_strFromUTF8Lenient" + }, + { + "first_introduced": "15", + "name":"u_strToUTF32" + }, + { + "first_introduced": "15", + "name":"u_strFromUTF32" + }, + { + "first_introduced": "15", + "name":"u_strToUTF32WithSub" + }, + { + "first_introduced": "15", + "name":"u_strFromUTF32WithSub" + }, + { + "first_introduced": "15", + "name":"u_errorName" } ] diff --git a/third_party/icu4c/ndk_headers/unicode/ustring.h b/third_party/icu4c/ndk_headers/unicode/ustring.h new file mode 100644 index 000000000..bbb1ee309 --- /dev/null +++ b/third_party/icu4c/ndk_headers/unicode/ustring.h @@ -0,0 +1,1353 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (C) 1998-2014, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* +* File ustring.h +* +* Modification History: +* +* Date Name Description +* 12/07/98 bertrand Creation. +****************************************************************************** +*/ + +#ifndef USTRING_H +#define USTRING_H + +#include "unicode/utypes.h" + +/** + * \def UBRK_TYPEDEF_UBREAK_ITERATOR + * @internal + */ + +#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR +# define UBRK_TYPEDEF_UBREAK_ITERATOR +/** Simple declaration for u_strToTitle() to avoid including unicode/ubrk.h. @stable ICU 2.1*/ + typedef struct UBreakIterator UBreakIterator; +#endif + +/** + * \file + * \brief C API: Unicode string handling functions + * + * These C API functions provide general Unicode string handling. + * + * Some functions are equivalent in name, signature, and behavior to the ANSI C + * functions. (For example, they do not check for bad arguments like NULL string pointers.) + * In some cases, only the thread-safe variant of such a function is implemented here + * (see u_strtok_r()). + * + * Other functions provide more Unicode-specific functionality like locale-specific + * upper/lower-casing and string comparison in code point order. + * + * ICU uses 16-bit Unicode (UTF-16) in the form of arrays of UChar code units. + * UTF-16 encodes each Unicode code point with either one or two UChar code units. + * (This is the default form of Unicode, and a forward-compatible extension of the original, + * fixed-width form that was known as UCS-2. UTF-16 superseded UCS-2 with Unicode 2.0 + * in 1996.) + * + * Some APIs accept a 32-bit UChar32 value for a single code point. + * + * ICU also handles 16-bit Unicode text with unpaired surrogates. + * Such text is not well-formed UTF-16. + * Code-point-related functions treat unpaired surrogates as surrogate code points, + * i.e., as separate units. + * + * Although UTF-16 is a variable-width encoding form (like some legacy multi-byte encodings), + * it is much more efficient even for random access because the code unit values + * for single-unit characters vs. lead units vs. trail units are completely disjoint. + * This means that it is easy to determine character (code point) boundaries from + * random offsets in the string. + * + * Unicode (UTF-16) string processing is optimized for the single-unit case. + * Although it is important to support supplementary characters + * (which use pairs of lead/trail code units called "surrogates"), + * their occurrence is rare. Almost all characters in modern use require only + * a single UChar code unit (i.e., their code point values are <=0xffff). + * + * For more details see the User Guide Strings chapter (https://unicode-org.github.io/icu/userguide/strings/). + * For a discussion of the handling of unpaired surrogates see also + * Jitterbug 2145 and its icu mailing list proposal on 2002-sep-18. + */ + +/** + * \defgroup ustring_ustrlen String Length + * \ingroup ustring_strlen + */ +/*@{*/ +/** + * Determine the length of an array of UChar. + * + * @param s The array of UChars, NULL (U+0000) terminated. + * @return The number of UChars in chars, minus the terminator. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strlen(const UChar *s); +/*@}*/ + +/** + * Count Unicode code points in the length UChar code units of the string. + * A code point may occupy either one or two UChar code units. + * Counting code points involves reading all code units. + * + * This functions is basically the inverse of the U16_FWD_N() macro (see utf.h). + * + * @param s The input string. + * @param length The number of UChar code units to be checked, or -1 to count all + * code points before the first NUL (U+0000). + * @return The number of code points in the specified code units. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_countChar32(const UChar *s, int32_t length); + +/** + * Check if the string contains more Unicode code points than a certain number. + * This is more efficient than counting all code points in the entire string + * and comparing that number with a threshold. + * This function may not need to scan the string at all if the length is known + * (not -1 for NUL-termination) and falls within a certain range, and + * never needs to count more than 'number+1' code points. + * Logically equivalent to (u_countChar32(s, length)>number). + * A Unicode code point may occupy either one or two UChar code units. + * + * @param s The input string. + * @param length The length of the string, or -1 if it is NUL-terminated. + * @param number The number of code points in the string is compared against + * the 'number' parameter. + * @return Boolean value for whether the string contains more Unicode code points + * than 'number'. Same as (u_countChar32(s, length)>number). + * @stable ICU 2.4 + */ +U_CAPI UBool U_EXPORT2 +u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number); + +/** + * Concatenate two ustrings. Appends a copy of src, + * including the null terminator, to dst. The initial copied + * character from src overwrites the null terminator in dst. + * + * @param dst The destination string. + * @param src The source string. + * @return A pointer to dst. + * @stable ICU 2.0 + */ +U_CAPI UChar* U_EXPORT2 +u_strcat(UChar *dst, + const UChar *src); + +/** + * Concatenate two ustrings. + * Appends at most n characters from src to dst. + * Adds a terminating NUL. + * If src is too long, then only n-1 characters will be copied + * before the terminating NUL. + * If n<=0 then dst is not modified. + * + * @param dst The destination string. + * @param src The source string (can be NULL/invalid if n<=0). + * @param n The maximum number of characters to append; no-op if <=0. + * @return A pointer to dst. + * @stable ICU 2.0 + */ +U_CAPI UChar* U_EXPORT2 +u_strncat(UChar *dst, + const UChar *src, + int32_t n); + +/** + * Find the first occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search (NUL-terminated). + * @param substring The substring to find (NUL-terminated). + * @return A pointer to the first occurrence of substring in s, + * or s itself if the substring is empty, + * or NULL if substring is not in s. + * @stable ICU 2.0 + * + * @see u_strrstr + * @see u_strFindFirst + * @see u_strFindLast + */ +U_CAPI UChar * U_EXPORT2 +u_strstr(const UChar *s, const UChar *substring); + +/** + * Find the first occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search. + * @param length The length of s (number of UChars), or -1 if it is NUL-terminated. + * @param substring The substring to find (NUL-terminated). + * @param subLength The length of substring (number of UChars), or -1 if it is NUL-terminated. + * @return A pointer to the first occurrence of substring in s, + * or s itself if the substring is empty, + * or NULL if substring is not in s. + * @stable ICU 2.4 + * + * @see u_strstr + * @see u_strFindLast + */ +U_CAPI UChar * U_EXPORT2 +u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); + +/** + * Find the first occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The BMP code point to find. + * @return A pointer to the first occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.0 + * + * @see u_strchr32 + * @see u_memchr + * @see u_strstr + * @see u_strFindFirst + */ +U_CAPI UChar * U_EXPORT2 +u_strchr(const UChar *s, UChar c); + +/** + * Find the first occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The code point to find. + * @return A pointer to the first occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.0 + * + * @see u_strchr + * @see u_memchr32 + * @see u_strstr + * @see u_strFindFirst + */ +U_CAPI UChar * U_EXPORT2 +u_strchr32(const UChar *s, UChar32 c); + +/** + * Find the last occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search (NUL-terminated). + * @param substring The substring to find (NUL-terminated). + * @return A pointer to the last occurrence of substring in s, + * or s itself if the substring is empty, + * or NULL if substring is not in s. + * @stable ICU 2.4 + * + * @see u_strstr + * @see u_strFindFirst + * @see u_strFindLast + */ +U_CAPI UChar * U_EXPORT2 +u_strrstr(const UChar *s, const UChar *substring); + +/** + * Find the last occurrence of a substring in a string. + * The substring is found at code point boundaries. + * That means that if the substring begins with + * a trail surrogate or ends with a lead surrogate, + * then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against + * halves of surrogate pairs. + * + * @param s The string to search. + * @param length The length of s (number of UChars), or -1 if it is NUL-terminated. + * @param substring The substring to find (NUL-terminated). + * @param subLength The length of substring (number of UChars), or -1 if it is NUL-terminated. + * @return A pointer to the last occurrence of substring in s, + * or s itself if the substring is empty, + * or NULL if substring is not in s. + * @stable ICU 2.4 + * + * @see u_strstr + * @see u_strFindLast + */ +U_CAPI UChar * U_EXPORT2 +u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); + +/** + * Find the last occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The BMP code point to find. + * @return A pointer to the last occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.4 + * + * @see u_strrchr32 + * @see u_memrchr + * @see u_strrstr + * @see u_strFindLast + */ +U_CAPI UChar * U_EXPORT2 +u_strrchr(const UChar *s, UChar c); + +/** + * Find the last occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (NUL-terminated). + * @param c The code point to find. + * @return A pointer to the last occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.4 + * + * @see u_strrchr + * @see u_memchr32 + * @see u_strrstr + * @see u_strFindLast + */ +U_CAPI UChar * U_EXPORT2 +u_strrchr32(const UChar *s, UChar32 c); + +/** + * Locates the first occurrence in the string string of any of the characters + * in the string matchSet. + * Works just like C's strpbrk but with Unicode. + * + * @param string The string in which to search, NUL-terminated. + * @param matchSet A NUL-terminated string defining a set of code points + * for which to search in the text string. + * @return A pointer to the character in string that matches one of the + * characters in matchSet, or NULL if no such character is found. + * @stable ICU 2.0 + */ +U_CAPI UChar * U_EXPORT2 +u_strpbrk(const UChar *string, const UChar *matchSet); + +/** + * Returns the number of consecutive characters in string, + * beginning with the first, that do not occur somewhere in matchSet. + * Works just like C's strcspn but with Unicode. + * + * @param string The string in which to search, NUL-terminated. + * @param matchSet A NUL-terminated string defining a set of code points + * for which to search in the text string. + * @return The number of initial characters in string that do not + * occur in matchSet. + * @see u_strspn + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strcspn(const UChar *string, const UChar *matchSet); + +/** + * Returns the number of consecutive characters in string, + * beginning with the first, that occur somewhere in matchSet. + * Works just like C's strspn but with Unicode. + * + * @param string The string in which to search, NUL-terminated. + * @param matchSet A NUL-terminated string defining a set of code points + * for which to search in the text string. + * @return The number of initial characters in string that do + * occur in matchSet. + * @see u_strcspn + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strspn(const UChar *string, const UChar *matchSet); + +/** + * The string tokenizer API allows an application to break a string into + * tokens. Unlike strtok(), the saveState (the current pointer within the + * original string) is maintained in saveState. In the first call, the + * argument src is a pointer to the string. In subsequent calls to + * return successive tokens of that string, src must be specified as + * NULL. The value saveState is set by this function to maintain the + * function's position within the string, and on each subsequent call + * you must give this argument the same variable. This function does + * handle surrogate pairs. This function is similar to the strtok_r() + * the POSIX Threads Extension (1003.1c-1995) version. + * + * @param src String containing token(s). This string will be modified. + * After the first call to u_strtok_r(), this argument must + * be NULL to get to the next token. + * @param delim Set of delimiter characters (Unicode code points). + * @param saveState The current pointer within the original string, + * which is set by this function. The saveState + * parameter should the address of a local variable of type + * UChar *. (i.e. defined "UChar *myLocalSaveState" and use + * &myLocalSaveState for this parameter). + * @return A pointer to the next token found in src, or NULL + * when there are no more tokens. + * @stable ICU 2.0 + */ +U_CAPI UChar * U_EXPORT2 +u_strtok_r(UChar *src, + const UChar *delim, + UChar **saveState); + +/** + * Compare two Unicode strings for bitwise equality (code unit order). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @return 0 if s1 and s2 are bitwise equal; a negative + * value if s1 is bitwise less than s2,; a positive + * value if s1 is bitwise greater than s2. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strcmp(const UChar *s1, + const UChar *s2); + +/** + * Compare two Unicode strings in code point order. + * See u_strCompare for details. + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @return a negative/zero/positive integer corresponding to whether + * the first string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strcmpCodePointOrder(const UChar *s1, const UChar *s2); + +/** + * Compare two Unicode strings (binary order). + * + * The comparison can be done in code unit order or in code point order. + * They differ only in UTF-16 when + * comparing supplementary code points (U+10000..U+10ffff) + * to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). + * In code unit order, high BMP code points sort after supplementary code points + * because they are stored as pairs of surrogates which are at U+d800..U+dfff. + * + * This functions works with strings of different explicitly specified lengths + * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. + * NUL-terminated strings are possible with length arguments of -1. + * + * @param s1 First source string. + * @param length1 Length of first source string, or -1 if NUL-terminated. + * + * @param s2 Second source string. + * @param length2 Length of second source string, or -1 if NUL-terminated. + * + * @param codePointOrder Choose between code unit order (false) + * and code point order (true). + * + * @return <0 or 0 or >0 as usual for string comparisons + * + * @stable ICU 2.2 + */ +U_CAPI int32_t U_EXPORT2 +u_strCompare(const UChar *s1, int32_t length1, + const UChar *s2, int32_t length2, + UBool codePointOrder); + + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to + * u_strCompare(u_strFoldCase(s1, options), + * u_strFoldCase(s2, options), + * (options&U_COMPARE_CODE_POINT_ORDER)!=0). + * + * The comparison can be done in UTF-16 code unit order or in code point order. + * They differ only when comparing supplementary code points (U+10000..U+10ffff) + * to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). + * In code unit order, high BMP code points sort after supplementary code points + * because they are stored as pairs of surrogates which are at U+d800..U+dfff. + * + * This functions works with strings of different explicitly specified lengths + * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. + * NUL-terminated strings are possible with length arguments of -1. + * + * @param s1 First source string. + * @param length1 Length of first source string, or -1 if NUL-terminated. + * + * @param s2 Second source string. + * @param length2 Length of second source string, or -1 if NUL-terminated. + * + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * + * @return <0 or 0 or >0 as usual for string comparisons + * + * @stable ICU 2.2 + */ +U_CAPI int32_t U_EXPORT2 +u_strCaseCompare(const UChar *s1, int32_t length1, + const UChar *s2, int32_t length2, + uint32_t options, + UErrorCode *pErrorCode); + +/** + * Compare two ustrings for bitwise equality. + * Compares at most n characters. + * + * @param ucs1 A string to compare (can be NULL/invalid if n<=0). + * @param ucs2 A string to compare (can be NULL/invalid if n<=0). + * @param n The maximum number of characters to compare; always returns 0 if n<=0. + * @return 0 if s1 and s2 are bitwise equal; a negative + * value if s1 is bitwise less than s2; a positive + * value if s1 is bitwise greater than s2. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strncmp(const UChar *ucs1, + const UChar *ucs2, + int32_t n); + +/** + * Compare two Unicode strings in code point order. + * This is different in UTF-16 from u_strncmp() if supplementary characters are present. + * For details, see u_strCompare(). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param n The maximum number of characters to compare. + * @return a negative/zero/positive integer corresponding to whether + * the first string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n); + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to u_strcmp(u_strFoldCase(s1, options), u_strFoldCase(s2, options)). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options); + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to u_strcmp(u_strFoldCase(s1, at most n, options), + * u_strFoldCase(s2, at most n, options)). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param n The maximum number of characters each string to case-fold and then compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options); + +/** + * Compare two strings case-insensitively using full case folding. + * This is equivalent to u_strcmp(u_strFoldCase(s1, n, options), + * u_strFoldCase(s2, n, options)). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param length The number of characters in each string to case-fold and then compare. + * @param options A bit set of options: + * - U_FOLD_CASE_DEFAULT or 0 is used for default options: + * Comparison in code unit order with default case folding. + * + * - U_COMPARE_CODE_POINT_ORDER + * Set to choose code point order instead of code unit order + * (see u_strCompare for details). + * + * - U_FOLD_CASE_EXCLUDE_SPECIAL_I + * + * @return A negative, zero, or positive integer indicating the comparison result. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options); + +/** + * Copy a ustring. Adds a null terminator. + * + * @param dst The destination string. + * @param src The source string. + * @return A pointer to dst. + * @stable ICU 2.0 + */ +U_CAPI UChar* U_EXPORT2 +u_strcpy(UChar *dst, + const UChar *src); + +/** + * Copy a ustring. + * Copies at most n characters. The result will be null terminated + * if the length of src is less than n. + * + * @param dst The destination string. + * @param src The source string (can be NULL/invalid if n<=0). + * @param n The maximum number of characters to copy; no-op if <=0. + * @return A pointer to dst. + * @stable ICU 2.0 + */ +U_CAPI UChar* U_EXPORT2 +u_strncpy(UChar *dst, + const UChar *src, + int32_t n); + + +/** + * Synonym for memcpy(), but with UChars only. + * @param dest The destination string + * @param src The source string (can be NULL/invalid if count<=0) + * @param count The number of characters to copy; no-op if <=0 + * @return A pointer to dest + * @stable ICU 2.0 + */ +U_CAPI UChar* U_EXPORT2 +u_memcpy(UChar *dest, const UChar *src, int32_t count); + +/** + * Synonym for memmove(), but with UChars only. + * @param dest The destination string + * @param src The source string (can be NULL/invalid if count<=0) + * @param count The number of characters to move; no-op if <=0 + * @return A pointer to dest + * @stable ICU 2.0 + */ +U_CAPI UChar* U_EXPORT2 +u_memmove(UChar *dest, const UChar *src, int32_t count); + +/** + * Initialize count characters of dest to c. + * + * @param dest The destination string. + * @param c The character to initialize the string. + * @param count The maximum number of characters to set. + * @return A pointer to dest. + * @stable ICU 2.0 + */ +U_CAPI UChar* U_EXPORT2 +u_memset(UChar *dest, UChar c, int32_t count); + +/** + * Compare the first count UChars of each buffer. + * + * @param buf1 The first string to compare. + * @param buf2 The second string to compare. + * @param count The maximum number of UChars to compare. + * @return When buf1 < buf2, a negative number is returned. + * When buf1 == buf2, 0 is returned. + * When buf1 > buf2, a positive number is returned. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count); + +/** + * Compare two Unicode strings in code point order. + * This is different in UTF-16 from u_memcmp() if supplementary characters are present. + * For details, see u_strCompare(). + * + * @param s1 A string to compare. + * @param s2 A string to compare. + * @param count The maximum number of characters to compare. + * @return a negative/zero/positive integer corresponding to whether + * the first string is less than/equal to/greater than the second one + * in code point order + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count); + +/** + * Find the first occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains count UChars). + * @param c The BMP code point to find. + * @param count The length of the string. + * @return A pointer to the first occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.0 + * + * @see u_strchr + * @see u_memchr32 + * @see u_strFindFirst + */ +U_CAPI UChar* U_EXPORT2 +u_memchr(const UChar *s, UChar c, int32_t count); + +/** + * Find the first occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains count UChars). + * @param c The code point to find. + * @param count The length of the string. + * @return A pointer to the first occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.0 + * + * @see u_strchr32 + * @see u_memchr + * @see u_strFindFirst + */ +U_CAPI UChar* U_EXPORT2 +u_memchr32(const UChar *s, UChar32 c, int32_t count); + +/** + * Find the last occurrence of a BMP code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains count UChars). + * @param c The BMP code point to find. + * @param count The length of the string. + * @return A pointer to the last occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.4 + * + * @see u_strrchr + * @see u_memrchr32 + * @see u_strFindLast + */ +U_CAPI UChar* U_EXPORT2 +u_memrchr(const UChar *s, UChar c, int32_t count); + +/** + * Find the last occurrence of a code point in a string. + * A surrogate code point is found only if its match in the text is not + * part of a surrogate pair. + * A NUL character is found at the string terminator. + * + * @param s The string to search (contains count UChars). + * @param c The code point to find. + * @param count The length of the string. + * @return A pointer to the last occurrence of c in s + * or NULL if c is not in s. + * @stable ICU 2.4 + * + * @see u_strrchr32 + * @see u_memrchr + * @see u_strFindLast + */ +U_CAPI UChar* U_EXPORT2 +u_memrchr32(const UChar *s, UChar32 c, int32_t count); + +/** + * Unicode String literals in C. + * We need one macro to declare a variable for the string + * and to statically preinitialize it if possible, + * and a second macro to dynamically initialize such a string variable if necessary. + * + * The macros are defined for maximum performance. + * They work only for strings that contain "invariant characters", i.e., + * only latin letters, digits, and some punctuation. + * See utypes.h for details. + * + * A pair of macros for a single string must be used with the same + * parameters. + * The string parameter must be a C string literal. + * The length of the string, not including the terminating + * `NUL`, must be specified as a constant. + * The U_STRING_DECL macro should be invoked exactly once for one + * such string variable before it is used. + * + * Usage: + * + * U_STRING_DECL(ustringVar1, "Quick-Fox 2", 11); + * U_STRING_DECL(ustringVar2, "jumps 5%", 8); + * static UBool didInit=false; + * + * int32_t function() { + * if(!didInit) { + * U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11); + * U_STRING_INIT(ustringVar2, "jumps 5%", 8); + * didInit=true; + * } + * return u_strcmp(ustringVar1, ustringVar2); + * } + * + * Note that the macros will NOT consistently work if their argument is another #`define`. + * The following will not work on all platforms, don't use it. + * + * #define GLUCK "Mr. Gluck" + * U_STRING_DECL(var, GLUCK, 9) + * U_STRING_INIT(var, GLUCK, 9) + * + * Instead, use the string literal "Mr. Gluck" as the argument to both macro + * calls. + * + * + * @stable ICU 2.0 + */ +#if defined(U_DECLARE_UTF16) +# define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs) + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) +#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16))) +# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=L ## cs + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) +#elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY +# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=cs + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) +#else +# define U_STRING_DECL(var, cs, length) static UChar var[(length)+1] + /**@stable ICU 2.0 */ +# define U_STRING_INIT(var, cs, length) u_charsToUChars(cs, var, length+1) +#endif + + +/** + * Uppercase the characters in a string. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param locale The locale to consider, or "" for the root locale or NULL for the default locale. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strToUpper(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + const char *locale, + UErrorCode *pErrorCode); + +/** + * Lowercase the characters in a string. + * Casing is locale-dependent and context-sensitive. + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param locale The locale to consider, or "" for the root locale or NULL for the default locale. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strToLower(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + const char *locale, + UErrorCode *pErrorCode); + +#if !UCONFIG_NO_BREAK_ITERATION + +/** + * Titlecase a string. + * Casing is locale-dependent and context-sensitive. + * Titlecasing uses a break iterator to find the first characters of words + * that are to be titlecased. It titlecases those characters and lowercases + * all others. + * + * The titlecase break iterator can be provided to customize for arbitrary + * styles, using rules and dictionaries beyond the standard iterators. + * It may be more efficient to always provide an iterator to avoid + * opening and closing one for each string. + * The standard titlecase iterator for the root locale implements the + * algorithm of Unicode TR 21. + * + * This function uses only the setText(), first() and next() methods of the + * provided break iterator. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param titleIter A break iterator to find the first characters of words + * that are to be titlecased. + * If none is provided (NULL), then a standard titlecase + * break iterator is opened. + * @param locale The locale to consider, or "" for the root locale or NULL for the default locale. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.1 + */ +U_CAPI int32_t U_EXPORT2 +u_strToTitle(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + UBreakIterator *titleIter, + const char *locale, + UErrorCode *pErrorCode); + +#endif + +/** + * Case-folds the characters in a string. + * + * Case-folding is locale-independent and not context-sensitive, + * but there is an option for whether to include or exclude mappings for dotted I + * and dotless i that are marked with 'T' in CaseFolding.txt. + * + * The result may be longer or shorter than the original. + * The source string and the destination buffer are allowed to overlap. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the result + * without writing any of the result string. + * @param src The original string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The length of the result string. It may be greater than destCapacity. In that case, + * only some of the result was written to the destination buffer. + * @stable ICU 2.0 + */ +U_CAPI int32_t U_EXPORT2 +u_strFoldCase(UChar *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + uint32_t options, + UErrorCode *pErrorCode); + + +/** + * Convert a UTF-16 string to UTF-8. + * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error code is set. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of chars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @stable ICU 2.0 + * @see u_strToUTF8WithSub + * @see u_strFromUTF8 + */ +U_CAPI char* U_EXPORT2 +u_strToUTF8(char *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-8 string to UTF-16. + * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error code is set. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param pErrorCode Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. + * @stable ICU 2.0 + * @see u_strFromUTF8WithSub + * @see u_strFromUTF8Lenient + */ +U_CAPI UChar* U_EXPORT2 +u_strFromUTF8(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const char *src, + int32_t srcLength, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-16 string to UTF-8. + * + * Same as u_strToUTF8() except for the additional subchar which is output for + * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND error code. + * With subchar==U_SENTINEL, this function behaves exactly like u_strToUTF8(). + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of chars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strToUTF8 + * @see u_strFromUTF8WithSub + * @stable ICU 3.6 + */ +U_CAPI char* U_EXPORT2 +u_strToUTF8WithSub(char *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-8 string to UTF-16. + * + * Same as u_strFromUTF8() except for the additional subchar which is output for + * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND error code. + * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF8(). + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strFromUTF8 + * @see u_strFromUTF8Lenient + * @see u_strToUTF8WithSub + * @stable ICU 3.6 + */ +U_CAPI UChar* U_EXPORT2 +u_strFromUTF8WithSub(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const char *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-8 string to UTF-16. + * + * Same as u_strFromUTF8() except that this function is designed to be very fast, + * which it achieves by being lenient about malformed UTF-8 sequences. + * This function is intended for use in environments where UTF-8 text is + * expected to be well-formed. + * + * Its semantics are: + * - Well-formed UTF-8 text is correctly converted to well-formed UTF-16 text. + * - The function will not read beyond the input string, nor write beyond + * the destCapacity. + * - Malformed UTF-8 results in "garbage" 16-bit Unicode strings which may not + * be well-formed UTF-16. + * The function will resynchronize to valid code point boundaries + * within a small number of code points after an illegal sequence. + * - Non-shortest forms are not detected and will result in "spoofing" output. + * + * For further performance improvement, if srcLength is given (>=0), + * then it must be destCapacity>=srcLength. + * + * There is no inverse u_strToUTF8Lenient() function because there is practically + * no performance gain from not checking that a UTF-16 string is well-formed. + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * Unlike for other ICU functions, if srcLength>=0 then it + * must be destCapacity>=srcLength. + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * Unlike for other ICU functions, if srcLength>=0 but + * destCapacity=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strToUTF32 + * @see u_strFromUTF32WithSub + * @stable ICU 4.2 + */ +U_CAPI UChar32* U_EXPORT2 +u_strToUTF32WithSub(UChar32 *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + +/** + * Convert a UTF-32 string to UTF-16. + * + * Same as u_strFromUTF32() except for the additional subchar which is output for + * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND error code. + * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF32(). + * + * @param dest A buffer for the result string. The result will be zero-terminated if + * the buffer is large enough. + * @param destCapacity The size of the buffer (number of UChars). If it is 0, then + * dest may be NULL and the function will only return the length of the + * result without writing any of the result string (pre-flighting). + * @param pDestLength A pointer to receive the number of units written to the destination. If + * pDestLength!=NULL then *pDestLength is always set to the + * number of output units corresponding to the transformation of + * all the input units, even in case of a buffer overflow. + * @param src The original source string + * @param srcLength The length of the original string. If -1, then src must be zero-terminated. + * @param subchar The substitution character to use in place of an illegal input sequence, + * or U_SENTINEL if the function is to return with U_INVALID_CHAR_FOUND instead. + * A substitution character can be any valid Unicode code point (up to U+10FFFF) + * except for surrogate code points (U+D800..U+DFFF). + * The recommended value is U+FFFD "REPLACEMENT CHARACTER". + * @param pNumSubstitutions Output parameter receiving the number of substitutions if subchar>=0. + * Set to 0 if no substitutions occur or subchar<0. + * pNumSubstitutions can be NULL. + * @param pErrorCode Pointer to a standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return The pointer to destination buffer. + * @see u_strFromUTF32 + * @see u_strToUTF32WithSub + * @stable ICU 4.2 + */ +U_CAPI UChar* U_EXPORT2 +u_strFromUTF32WithSub(UChar *dest, + int32_t destCapacity, + int32_t *pDestLength, + const UChar32 *src, + int32_t srcLength, + UChar32 subchar, int32_t *pNumSubstitutions, + UErrorCode *pErrorCode); + + +#endif diff --git a/third_party/icu4c/ndk_headers/unicode/utext.h b/third_party/icu4c/ndk_headers/unicode/utext.h new file mode 100644 index 000000000..66e557ccf --- /dev/null +++ b/third_party/icu4c/ndk_headers/unicode/utext.h @@ -0,0 +1,582 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 2004-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utext.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2004oct06 +* created by: Markus W. Scherer +*/ + +#ifndef __UTEXT_H__ +#define __UTEXT_H__ + +/** + * \file + * \brief C API: Abstract Unicode Text API + * + * The Text Access API provides a means to allow text that is stored in alternative + * formats to work with ICU services. ICU normally operates on text that is + * stored in UTF-16 format, in (UChar *) arrays for the C APIs or as type + * UnicodeString for C++ APIs. + * + * ICU Text Access allows other formats, such as UTF-8 or non-contiguous + * UTF-16 strings, to be placed in a UText wrapper and then passed to ICU services. + * + * There are three general classes of usage for UText: + * + * Application Level Use. This is the simplest usage - applications would + * use one of the utext_open() functions on their input text, and pass + * the resulting UText to the desired ICU service. + * + * Second is usage in ICU Services, such as break iteration, that will need to + * operate on input presented to them as a UText. These implementations + * will need to use the iteration and related UText functions to gain + * access to the actual text. + * + * The third class of UText users are "text providers." These are the + * UText implementations for the various text storage formats. An application + * or system with a unique text storage format can implement a set of + * UText provider functions for that format, which will then allow + * ICU services to operate on that format. + * + * + * Iterating over text + * + * Here is sample code for a forward iteration over the contents of a UText + * + * \code + * UChar32 c; + * UText *ut = whatever(); + * + * for (c=utext_next32From(ut, 0); c>=0; c=utext_next32(ut)) { + * // do whatever with the codepoint c here. + * } + * \endcode + * + * And here is similar code to iterate in the reverse direction, from the end + * of the text towards the beginning. + * + * \code + * UChar32 c; + * UText *ut = whatever(); + * int textLength = utext_nativeLength(ut); + * for (c=utext_previous32From(ut, textLength); c>=0; c=utext_previous32(ut)) { + * // do whatever with the codepoint c here. + * } + * \endcode + * + * Characters and Indexing + * + * Indexing into text by UText functions is nearly always in terms of the native + * indexing of the underlying text storage. The storage format could be UTF-8 + * or UTF-32, for example. When coding to the UText access API, no assumptions + * can be made regarding the size of characters, or how far an index + * may move when iterating between characters. + * + * All indices supplied to UText functions are pinned to the length of the + * text. An out-of-bounds index is not considered to be an error, but is + * adjusted to be in the range 0 <= index <= length of input text. + * + * + * When an index position is returned from a UText function, it will be + * a native index to the underlying text. In the case of multi-unit characters, + * it will always refer to the first position of the character, + * never to the interior. This is essentially the same thing as saying that + * a returned index will always point to a boundary between characters. + * + * When a native index is supplied to a UText function, all indices that + * refer to any part of a multi-unit character representation are considered + * to be equivalent. In the case of multi-unit characters, an incoming index + * will be logically normalized to refer to the start of the character. + * + * It is possible to test whether a native index is on a code point boundary + * by doing a utext_setNativeIndex() followed by a utext_getNativeIndex(). + * If the index is returned unchanged, it was on a code point boundary. If + * an adjusted index is returned, the original index referred to the + * interior of a character. + * + * Conventions for calling UText functions + * + * Most UText access functions have as their first parameter a (UText *) pointer, + * which specifies the UText to be used. Unless otherwise noted, the + * pointer must refer to a valid, open UText. Attempting to + * use a closed UText or passing a NULL pointer is a programming error and + * will produce undefined results or NULL pointer exceptions. + * + * The UText_Open family of functions can either open an existing (closed) + * UText, or heap allocate a new UText. Here is sample code for creating + * a stack-allocated UText. + * + * \code + * char *s = whatever(); // A utf-8 string + * U_ErrorCode status = U_ZERO_ERROR; + * UText ut = UTEXT_INITIALIZER; + * utext_openUTF8(ut, s, -1, &status); + * if (U_FAILURE(status)) { + * // error handling + * } else { + * // work with the UText + * } + * \endcode + * + * Any existing UText passed to an open function _must_ have been initialized, + * either by the UTEXT_INITIALIZER, or by having been originally heap-allocated + * by an open function. Passing NULL will cause the open function to + * heap-allocate and fully initialize a new UText. + * + */ + + + +#include "unicode/utypes.h" +#include "unicode/uchar.h" +#if U_SHOW_CPLUSPLUS_API +#include "unicode/localpointer.h" +#include "unicode/rep.h" +#include "unicode/unistr.h" +#include "unicode/chariter.h" +#endif + + +U_CDECL_BEGIN + +struct UText; +typedef struct UText UText; /**< C typedef for struct UText. @stable ICU 3.6 */ + + +/*************************************************************************************** + * + * C Functions for creating UText wrappers around various kinds of text strings. + * + ****************************************************************************************/ + + +/** + * Close function for UText instances. + * Cleans up, releases any resources being held by an open UText. + *

+ * If the UText was originally allocated by one of the utext_open functions, + * the storage associated with the utext will also be freed. + * If the UText storage originated with the application, as it would with + * a local or static instance, the storage will not be deleted. + * + * An open UText can be reset to refer to new string by using one of the utext_open() + * functions without first closing the UText. + * + * @param ut The UText to be closed. + * @return NULL if the UText struct was deleted by the close. If the UText struct + * was originally provided by the caller to the open function, it is + * returned by this function, and may be safely used again in + * a subsequent utext_open. + * + * @stable ICU 3.4 + */ +U_CAPI UText * U_EXPORT2 +utext_close(UText *ut); + +/** + * Open a read-only UText implementation for UTF-8 strings. + * + * \htmlonly + * Any invalid UTF-8 in the input will be handled in this way: + * a sequence of bytes that has the form of a truncated, but otherwise valid, + * UTF-8 sequence will be replaced by a single unicode replacement character, \uFFFD. + * Any other illegal bytes will each be replaced by a \uFFFD. + * \endhtmlonly + * + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an initialized UText struct, which will then + * be reset to reference the specified UTF-8 string. + * @param s A UTF-8 string. Must not be NULL. + * @param length The length of the UTF-8 string in bytes, or -1 if the string is + * zero terminated. + * @param status Errors are returned here. + * @return A pointer to the UText. If a pre-allocated UText was provided, it + * will always be used and returned. + * @stable ICU 3.4 + */ +U_CAPI UText * U_EXPORT2 +utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status); + + +/** + * Open a read-only UText for UChar * string. + * + * @param ut Pointer to a UText struct. If NULL, a new UText will be created. + * If non-NULL, must refer to an initialized UText struct, which will then + * be reset to reference the specified UChar string. + * @param s A UChar (UTF-16) string + * @param length The number of UChars in the input string, or -1 if the string is + * zero terminated. + * @param status Errors are returned here. + * @return A pointer to the UText. If a pre-allocated UText was provided, it + * will always be used and returned. + * @stable ICU 3.4 + */ +U_CAPI UText * U_EXPORT2 +utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status); + + +/** + * Clone a UText. This is much like opening a UText where the source text is itself + * another UText. + * + * A deep clone will copy both the UText data structures and the underlying text. + * The original and cloned UText will operate completely independently; modifications + * made to the text in one will not affect the other. Text providers are not + * required to support deep clones. The user of clone() must check the status return + * and be prepared to handle failures. + * + * The standard UText implementations for UTF8, UChar *, UnicodeString and + * Replaceable all support deep cloning. + * + * The UText returned from a deep clone will be writable, assuming that the text + * provider is able to support writing, even if the source UText had been made + * non-writable by means of UText_freeze(). + * + * A shallow clone replicates only the UText data structures; it does not make + * a copy of the underlying text. Shallow clones can be used as an efficient way to + * have multiple iterators active in a single text string that is not being + * modified. + * + * A shallow clone operation will not fail, barring truly exceptional conditions such + * as memory allocation failures. + * + * Shallow UText clones should be avoided if the UText functions that modify the + * text are expected to be used, either on the original or the cloned UText. + * Any such modifications can cause unpredictable behavior. Read Only + * shallow clones provide some protection against errors of this type by + * disabling text modification via the cloned UText. + * + * A shallow clone made with the readOnly parameter == false will preserve the + * utext_isWritable() state of the source object. Note, however, that + * write operations must be avoided while more than one UText exists that refer + * to the same underlying text. + * + * A UText and its clone may be safely concurrently accessed by separate threads. + * This is true for read access only with shallow clones, and for both read and + * write access with deep clones. + * It is the responsibility of the Text Provider to ensure that this thread safety + * constraint is met. + * + * @param dest A UText struct to be filled in with the result of the clone operation, + * or NULL if the clone function should heap-allocate a new UText struct. + * If non-NULL, must refer to an already existing UText, which will then + * be reset to become the clone. + * @param src The UText to be cloned. + * @param deep true to request a deep clone, false for a shallow clone. + * @param readOnly true to request that the cloned UText have read only access to the + * underlying text. + + * @param status Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR + * will be returned if the text provider is unable to clone the + * original text. + * @return The newly created clone, or NULL if the clone operation failed. + * @stable ICU 3.4 + */ +U_CAPI UText * U_EXPORT2 +utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status); + + +/** + * Compare two UText objects for equality. + * UTexts are equal if they are iterating over the same text, and + * have the same iteration position within the text. + * If either or both of the parameters are NULL, the comparison is false. + * + * @param a The first of the two UTexts to compare. + * @param b The other UText to be compared. + * @return true if the two UTexts are equal. + * @stable ICU 3.6 + */ +U_CAPI UBool U_EXPORT2 +utext_equals(const UText *a, const UText *b); + + +/***************************************************************************** + * + * Functions to work with the text represented by a UText wrapper + * + *****************************************************************************/ + +/** + * Get the length of the text. Depending on the characteristics + * of the underlying text representation, this may be expensive. + * @see utext_isLengthExpensive() + * + * + * @param ut the text to be accessed. + * @return the length of the text, expressed in native units. + * + * @stable ICU 3.4 + */ +U_CAPI int64_t U_EXPORT2 +utext_nativeLength(UText *ut); + +/** + * Returns the code point at the requested index, + * or U_SENTINEL (-1) if it is out of bounds. + * + * If the specified index points to the interior of a multi-unit + * character - one of the trail bytes of a UTF-8 sequence, for example - + * the complete code point will be returned. + * + * The iteration position will be set to the start of the returned code point. + * + * This function is roughly equivalent to the sequence + * utext_setNativeIndex(index); + * utext_current32(); + * (There is a subtle difference if the index is out of bounds by being less than zero - + * utext_setNativeIndex(negative value) sets the index to zero, after which utext_current() + * will return the char at zero. utext_char32At(negative index), on the other hand, will + * return the U_SENTINEL value of -1.) + * + * @param ut the text to be accessed + * @param nativeIndex the native index of the character to be accessed. If the index points + * to other than the first unit of a multi-unit character, it will be adjusted + * to the start of the character. + * @return the code point at the specified index. + * @stable ICU 3.4 + */ +U_CAPI UChar32 U_EXPORT2 +utext_char32At(UText *ut, int64_t nativeIndex); + + +/** + * + * Get the code point at the current iteration position, + * or U_SENTINEL (-1) if the iteration has reached the end of + * the input text. + * + * @param ut the text to be accessed. + * @return the Unicode code point at the current iterator position. + * @stable ICU 3.4 + */ +U_CAPI UChar32 U_EXPORT2 +utext_current32(UText *ut); + + +/** + * Get the code point at the current iteration position of the UText, and + * advance the position to the first index following the character. + * + * If the position is at the end of the text (the index following + * the last character, which is also the length of the text), + * return U_SENTINEL (-1) and do not advance the index. + * + * This is a post-increment operation. + * + * An inline macro version of this function, UTEXT_NEXT32(), + * is available for performance critical use. + * + * @param ut the text to be accessed. + * @return the Unicode code point at the iteration position. + * @see UTEXT_NEXT32 + * @stable ICU 3.4 + */ +U_CAPI UChar32 U_EXPORT2 +utext_next32(UText *ut); + + +/** + * Move the iterator position to the character (code point) whose + * index precedes the current position, and return that character. + * This is a pre-decrement operation. + * + * If the initial position is at the start of the text (index of 0) + * return U_SENTINEL (-1), and leave the position unchanged. + * + * An inline macro version of this function, UTEXT_PREVIOUS32(), + * is available for performance critical use. + * + * @param ut the text to be accessed. + * @return the previous UChar32 code point, or U_SENTINEL (-1) + * if the iteration has reached the start of the text. + * @see UTEXT_PREVIOUS32 + * @stable ICU 3.4 + */ +U_CAPI UChar32 U_EXPORT2 +utext_previous32(UText *ut); + + +/** + * Set the iteration index and return the code point at that index. + * Leave the iteration index at the start of the following code point. + * + * This function is the most efficient and convenient way to + * begin a forward iteration. The results are identical to the those + * from the sequence + * \code + * utext_setIndex(); + * utext_next32(); + * \endcode + * + * @param ut the text to be accessed. + * @param nativeIndex Iteration index, in the native units of the text provider. + * @return Code point which starts at or before index, + * or U_SENTINEL (-1) if it is out of bounds. + * @stable ICU 3.4 + */ +U_CAPI UChar32 U_EXPORT2 +utext_next32From(UText *ut, int64_t nativeIndex); + + + +/** + * Set the iteration index, and return the code point preceding the + * one specified by the initial index. Leave the iteration position + * at the start of the returned code point. + * + * This function is the most efficient and convenient way to + * begin a backwards iteration. + * + * @param ut the text to be accessed. + * @param nativeIndex Iteration index in the native units of the text provider. + * @return Code point preceding the one at the initial index, + * or U_SENTINEL (-1) if it is out of bounds. + * + * @stable ICU 3.4 + */ +U_CAPI UChar32 U_EXPORT2 +utext_previous32From(UText *ut, int64_t nativeIndex); + +/** + * Get the current iterator position, which can range from 0 to + * the length of the text. + * The position is a native index into the input text, in whatever format it + * may have (possibly UTF-8 for example), and may not always be the same as + * the corresponding UChar (UTF-16) index. + * The returned position will always be aligned to a code point boundary. + * + * @param ut the text to be accessed. + * @return the current index position, in the native units of the text provider. + * @stable ICU 3.4 + */ +U_CAPI int64_t U_EXPORT2 +utext_getNativeIndex(const UText *ut); + +/** + * Set the current iteration position to the nearest code point + * boundary at or preceding the specified index. + * The index is in the native units of the original input text. + * If the index is out of range, it will be pinned to be within + * the range of the input text. + *

+ * It will usually be more efficient to begin an iteration + * using the functions utext_next32From() or utext_previous32From() + * rather than setIndex(). + *

+ * Moving the index position to an adjacent character is best done + * with utext_next32(), utext_previous32() or utext_moveIndex32(). + * Attempting to do direct arithmetic on the index position is + * complicated by the fact that the size (in native units) of a + * character depends on the underlying representation of the character + * (UTF-8, UTF-16, UTF-32, arbitrary codepage), and is not + * easily knowable. + * + * @param ut the text to be accessed. + * @param nativeIndex the native unit index of the new iteration position. + * @stable ICU 3.4 + */ +U_CAPI void U_EXPORT2 +utext_setNativeIndex(UText *ut, int64_t nativeIndex); + +/** + * Move the iterator position by delta code points. The number of code points + * is a signed number; a negative delta will move the iterator backwards, + * towards the start of the text. + *

+ * The index is moved by delta code points + * forward or backward, but no further backward than to 0 and + * no further forward than to utext_nativeLength(). + * The resulting index value will be in between 0 and length, inclusive. + * + * @param ut the text to be accessed. + * @param delta the signed number of code points to move the iteration position. + * @return true if the position could be moved the requested number of positions while + * staying within the range [0 - text length]. + * @stable ICU 3.4 + */ +U_CAPI UBool U_EXPORT2 +utext_moveIndex32(UText *ut, int32_t delta); + +/** + * Get the native index of the character preceding the current position. + * If the iteration position is already at the start of the text, zero + * is returned. + * The value returned is the same as that obtained from the following sequence, + * but without the side effect of changing the iteration position. + * + * \code + * UText *ut = whatever; + * ... + * utext_previous(ut) + * utext_getNativeIndex(ut); + * \endcode + * + * This function is most useful during forwards iteration, where it will get the + * native index of the character most recently returned from utext_next(). + * + * @param ut the text to be accessed + * @return the native index of the character preceding the current index position, + * or zero if the current position is at the start of the text. + * @stable ICU 3.6 + */ +U_CAPI int64_t U_EXPORT2 +utext_getPreviousNativeIndex(UText *ut); + + +/** + * + * Extract text from a UText into a UChar buffer. The range of text to be extracted + * is specified in the native indices of the UText provider. These may not necessarily + * be UTF-16 indices. + *

+ * The size (number of 16 bit UChars) of the data to be extracted is returned. The + * full number of UChars is returned, even when the extracted text is truncated + * because the specified buffer size is too small. + *

+ * The extracted string will (if you are a user) / must (if you are a text provider) + * be NUL-terminated if there is sufficient space in the destination buffer. This + * terminating NUL is not included in the returned length. + *

+ * The iteration index is left at the position following the last extracted character. + * + * @param ut the UText from which to extract data. + * @param nativeStart the native index of the first character to extract.\ + * If the specified index is out of range, + * it will be pinned to be within 0 <= index <= textLength + * @param nativeLimit the native string index of the position following the last + * character to extract. If the specified index is out of range, + * it will be pinned to be within 0 <= index <= textLength. + * nativeLimit must be >= nativeStart. + * @param dest the UChar (UTF-16) buffer into which the extracted text is placed + * @param destCapacity The size, in UChars, of the destination buffer. May be zero + * for precomputing the required size. + * @param status receives any error status. + * U_BUFFER_OVERFLOW_ERROR: the extracted text was truncated because the + * buffer was too small. Returns number of UChars for preflighting. + * @return Number of UChars in the data to be extracted. Does not include a trailing NUL. + * + * @stable ICU 3.4 + */ +U_CAPI int32_t U_EXPORT2 +utext_extract(UText *ut, + int64_t nativeStart, int64_t nativeLimit, + UChar *dest, int32_t destCapacity, + UErrorCode *status); + + +U_CDECL_END + + +#endif diff --git a/third_party/icu4c/ndk_headers/unicode/utypes.h b/third_party/icu4c/ndk_headers/unicode/utypes.h index 5f6cac32a..8293ca70e 100644 --- a/third_party/icu4c/ndk_headers/unicode/utypes.h +++ b/third_party/icu4c/ndk_headers/unicode/utypes.h @@ -637,5 +637,13 @@ typedef enum UErrorCode { # define U_FAILURE(x) ((x)>U_ZERO_ERROR) #endif +/** + * Return a string for a UErrorCode value. + * The string will be the same as the name of the error code constant + * in the UErrorCode enum above. + * @stable ICU 2.0 + */ +U_CAPI const char * U_EXPORT2 +u_errorName(UErrorCode code); #endif /* _UTYPES */ -- Gitee From 66a34cbed3d6631a33a2d69e85fd51c67eed5396 Mon Sep 17 00:00:00 2001 From: Zhang Jinyu Date: Fri, 20 Dec 2024 16:14:54 +0800 Subject: [PATCH 271/630] =?UTF-8?q?TextPicker=E6=94=AF=E6=8C=81=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=AF=8F=E4=B8=80=E5=88=97=E7=9A=84=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhang Jinyu Change-Id: I7f993139dbb364f0a360dba3603b6601a04b68a0 --- arkui/ace_engine/native/native_node.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f20102e7c..fbbc866b6 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5423,6 +5423,28 @@ typedef enum { * .value[0].i32: number of cached items in the grid adapter. \n */ NODE_GRID_CACHED_COUNT, + + /** + * @brief Defines the column width of the text picker. + * This attribute 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: percentage of total width. The default value is that all colulmns are equal width.\n + * .value[1]?.f32: percentage of total width. The default value is that all colulmns are equal width.\n + * .value[2]?.f32: percentage of total width. The default value is that all colulmns are equal width.\n + * ...\n + * .value[n]?.f32: percentage of total width. The default value is that all colulmns are equal width.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].f32: percentage of total width.\n + * value[1].f32: percentage of total width.\n + * value[2].f32: percentage of total width.\n + * ...\n + * value[n].f32: percentage of total width.\n + * + * @since 16 + */ + NODE_TEXT_PICKER_COLUMN_WIDTHS = 15009, } ArkUI_NodeAttributeType; #define MAX_COMPONENT_EVENT_ARG_NUM 12 -- Gitee From 105abd67e3b90bb1de97ef03e4d4da0fdb42f7d8 Mon Sep 17 00:00:00 2001 From: fandongyu Date: Sat, 7 Dec 2024 12:10:37 +0800 Subject: [PATCH 272/630] Signed-off-by:fandongyu Signed-off-by: fandongyu --- .../include/image/image_packer_native.h | 4 +- .../include/image/image_source_native.h | 4 +- .../include/image/picture_native.h | 4 +- .../image_framework/include/image_mdk.h | 4 +- .../include/image_mdk_common.h | 4 +- .../include/image_packer_mdk.h | 2 +- .../include/image_receiver_mdk.h | 4 +- .../include/image_source_mdk.h | 88 ++++++++++--------- 8 files changed, 61 insertions(+), 53 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index 4078a60da..068deed46 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -327,7 +327,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_Release(OH_PackingOptionsForSequenc /** * @brief Create a pointer for OH_ImagePackerNative struct. * - * @param options The OH_ImagePackerNative pointer will be operated. + * @param imagePacker The imagePacker to be created. * @return Returns {@link Image_ErrorCode} * @since 12 */ @@ -469,5 +469,5 @@ Image_ErrorCode OH_ImagePackerNative_Release(OH_ImagePackerNative *imagePacker); #ifdef __cplusplus }; #endif -/* *@} */ +/** @} */ #endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_PACKER_NATIVE_H_ \ No newline at end of file diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 7e54b94ef..b48056ff5 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -353,7 +353,7 @@ Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFil * @param source Indicates a void pointer(from ImageSource pointer convert). * @param options Indicates a pointer to the options for decoding the image source. * For details, see {@link OH_DecodingOptions}. - * @param resPixMap Indicates a void pointer to the Pixelmap object obtained at the C++ native layer. + * @param pixelmap Indicates a void pointer to the Pixelmap object obtained at the C++ native layer. * @return Returns {@link Image_ErrorCode} * @since 12 */ @@ -448,7 +448,7 @@ Image_ErrorCode OH_ImageSourceNative_ModifyImageProperty(OH_ImageSourceNative *s * @brief Obtains the number of frames from an ImageSource object. * * @param source Indicates a pointer to the {@link OH_ImageSource} object at the C++ native layer. - * @param res Indicates a pointer to the number of frames obtained. + * @param frameCount The number of image frameCount. * @return Returns {@link Image_ErrorCode} * @since 12 */ diff --git a/multimedia/image_framework/include/image/picture_native.h b/multimedia/image_framework/include/image/picture_native.h index 42eed5065..1602c85b0 100644 --- a/multimedia/image_framework/include/image/picture_native.h +++ b/multimedia/image_framework/include/image/picture_native.h @@ -19,7 +19,7 @@ * * @brief Provides APIs for obtaining picture data and information. * - * @Syscap SystemCapability.Multimedia.Image.Core + * @syscap SystemCapability.Multimedia.Image.Core * @since 13 */ @@ -30,7 +30,7 @@ * * @library libpicture.so * @kit ImageKit - * @Syscap SystemCapability.Multimedia.Image.Core + * @syscap SystemCapability.Multimedia.Image.Core * @since 13 */ #ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PICTURE_NATIVE_H_ diff --git a/multimedia/image_framework/include/image_mdk.h b/multimedia/image_framework/include/image_mdk.h index 3b3653658..053fbde05 100644 --- a/multimedia/image_framework/include/image_mdk.h +++ b/multimedia/image_framework/include/image_mdk.h @@ -19,7 +19,7 @@ * * @brief Provides APIs for access to the image interface. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 2.0 */ @@ -30,7 +30,9 @@ * @brief Declares functions that access the image rectangle, size, format, and component data. * Need link libimagendk.z.so * + * @library libimage_ndk.z.so * @kit ImageKit + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 2.0 */ diff --git a/multimedia/image_framework/include/image_mdk_common.h b/multimedia/image_framework/include/image_mdk_common.h index 2ed208982..c34252403 100644 --- a/multimedia/image_framework/include/image_mdk_common.h +++ b/multimedia/image_framework/include/image_mdk_common.h @@ -19,7 +19,7 @@ * * @brief Provides APIs for access to the image interface. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 2.0 */ @@ -30,6 +30,8 @@ * @brief Declares the common enums and structs used by the image interface. * * @kit ImageKit + * @library libimage_ndk.z.so + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 2.0 */ diff --git a/multimedia/image_framework/include/image_packer_mdk.h b/multimedia/image_framework/include/image_packer_mdk.h index 48a26cf4c..c7783cfc0 100644 --- a/multimedia/image_framework/include/image_packer_mdk.h +++ b/multimedia/image_framework/include/image_packer_mdk.h @@ -95,7 +95,7 @@ typedef struct ImagePacker_Opts_ ImagePacker_Opts; * @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful. * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 11 * @version 4.1 */ diff --git a/multimedia/image_framework/include/image_receiver_mdk.h b/multimedia/image_framework/include/image_receiver_mdk.h index 1033f0bfe..9f90dc947 100644 --- a/multimedia/image_framework/include/image_receiver_mdk.h +++ b/multimedia/image_framework/include/image_receiver_mdk.h @@ -19,7 +19,7 @@ * * @brief Provides APIs for obtaining image data from the native layer. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 2.0 */ @@ -30,7 +30,9 @@ * @brief Declares the APIs for obtaining image data from the native layer. * Need link libimagendk.z.so and libimage_receiverndk.z.so * + * @library libimage_receiver_ndk.z.so * @kit ImageKit + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 2.0 */ diff --git a/multimedia/image_framework/include/image_source_mdk.h b/multimedia/image_framework/include/image_source_mdk.h index 91b4b5abd..aa5014037 100644 --- a/multimedia/image_framework/include/image_source_mdk.h +++ b/multimedia/image_framework/include/image_source_mdk.h @@ -19,7 +19,7 @@ * * @brief Provides native APIs for image sources. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -29,8 +29,9 @@ * * @brief Declares APIs for decoding an image source into a pixel map. * + * @library libimage_source_ndk.z.so * @kit ImageKit - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -52,7 +53,7 @@ extern "C" { /** * @brief Defines a native image source object for the image source APIs. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -61,7 +62,7 @@ struct ImageSourceNative_; /** * @brief Defines a native image source object for the image source APIs. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -72,7 +73,7 @@ typedef struct ImageSourceNative_ ImageSourceNative; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -83,7 +84,7 @@ static const char* OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -94,7 +95,7 @@ static const char* OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -105,7 +106,7 @@ static const char* OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -116,7 +117,7 @@ static const char* OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -127,7 +128,7 @@ static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -138,7 +139,7 @@ static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -149,7 +150,7 @@ static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -160,7 +161,7 @@ static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -171,7 +172,7 @@ static const char* OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -182,7 +183,7 @@ static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -193,7 +194,7 @@ static const char* OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -204,7 +205,7 @@ static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -215,7 +216,7 @@ static const char* OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"; * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n * Add static keyword since API 12, it is used to limit the scope of the constant to a single file.\n * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -226,7 +227,7 @@ static const char* OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBi * It is used in {@link OhosImageDecodingOps}, {@link OH_ImageSource_CreatePixelMap}, and * {@link OH_ImageSource_CreatePixelMapList}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -245,7 +246,7 @@ struct OhosImageRegion { * @brief Defines image source options infomation * {@link OH_ImageSource_Create} and {@link OH_ImageSource_CreateIncremental}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -262,7 +263,7 @@ struct OhosImageSourceOps { * @brief Defines the options for decoding the image source. * It is used in {@link OH_ImageSource_CreatePixelMap} and {@link OH_ImageSource_CreatePixelMapList}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -288,7 +289,7 @@ struct OhosImageDecodingOps { /** * @brief Defines the image source information, which is obtained by calling {@link OH_ImageSource_GetImageInfo}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -331,7 +332,7 @@ struct OhosImageSource { * @brief Defines the delay time list of the image source. It is obtained by calling * {@link OH_ImageSource_GetDelayTime}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -346,7 +347,7 @@ struct OhosImageSourceDelayTimeList { * @brief Defines image source supported format string. * {@link OhosImageSourceSupportedFormatList} and {@link OH_ImageSource_GetSupportedFormats} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -361,7 +362,7 @@ struct OhosImageSourceSupportedFormat { * @brief Defines the format string list supported by the image source. * It is obtained by calling {@link OH_ImageSource_GetSupportedFormats}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -376,7 +377,7 @@ struct OhosImageSourceSupportedFormatList { * @brief Defines the property string (in key-value format) of the image source. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -390,7 +391,7 @@ struct OhosImageSourceProperty { /** * @brief Defines the update data of the image source. It is obtained by calling {@link OH_ImageSource_UpdateData}. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -463,7 +464,7 @@ int32_t OH_ImageSource_Create(napi_env env, struct OhosImageSource* src, * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. * @see {@link OhosImageSourceOps} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 11 * @version 4.1 */ @@ -485,7 +486,7 @@ int32_t OH_ImageSource_CreateFromUri(napi_env env, char* uri, size_t size, * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. * @see {@link OhosImageSourceOps} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 11 * @version 4.1 */ @@ -508,7 +509,7 @@ int32_t OH_ImageSource_CreateFromFd(napi_env env, int32_t fd, * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. * @see {@link OhosImageSourceOps} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 11 * @version 4.1 */ @@ -530,7 +531,7 @@ int32_t OH_ImageSource_CreateFromData(napi_env env, uint8_t* data, size_t dataSi * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. * @see {@link OhosImageSourceOps} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 11 * @version 4.1 */ @@ -594,7 +595,7 @@ int32_t OH_ImageSource_CreateIncremental(napi_env env, struct OhosImageSource* s * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. * @see {@link OhosImageSourceOps}, {@link OH_ImageSource_UpdateData} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 11 * @version 4.1 */ @@ -617,7 +618,7 @@ int32_t OH_ImageSource_CreateIncrementalFromData(napi_env env, uint8_t* data, si * returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if decode fail. * @see {@link OhosImageSourceSupportedFormatList}, {@link OhosImageSourceSupportedFormat} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -633,7 +634,7 @@ int32_t OH_ImageSource_GetSupportedFormats(struct OhosImageSourceSupportedFormat * returns a null pointer otherwise. * @see {@link ImageSourceNative}, {@link OH_ImageSource_Release} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -678,7 +679,7 @@ ImageSourceNative* OH_ImageSource_InitNative(napi_env env, napi_value source); * returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed. * @see {@link ImageSourceNative}, {@link OhosImageDecodingOps} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -726,7 +727,7 @@ int32_t OH_ImageSource_CreatePixelMap(const ImageSourceNative* native, * returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist. * @see {@link ImageSourceNative}, {@link OhosImageDecodingOps} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -761,7 +762,7 @@ int32_t OH_ImageSource_CreatePixelMapList(const ImageSourceNative* native, * returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist. * @see {@link ImageSourceNative}, {@link OhosImageSourceDelayTimeList} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -793,7 +794,7 @@ int32_t OH_ImageSource_GetDelayTime(const ImageSourceNative* native, * returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist. * @see {@link ImageSourceNative} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -826,7 +827,7 @@ int32_t OH_ImageSource_GetFrameCount(const ImageSourceNative* native, uint32_t * * returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist. * @see {@link ImageSourceNative}, {@link OhosImageSourceInfo} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -862,7 +863,7 @@ int32_t OH_ImageSource_GetImageInfo(const ImageSourceNative* native, int32_t ind * returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist. * @see {@link ImageSourceNative}, {@link OhosImageSourceProperty} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -895,7 +896,7 @@ int32_t OH_ImageSource_GetImageProperty(const ImageSourceNative* native, * returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist. * @see {@link ImageSourceNative}, {@link OhosImageSourceProperty} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -938,7 +939,7 @@ int32_t OH_ImageSource_ModifyImageProperty(const ImageSourceNative* native, * returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed. * @see {@link ImageSourceNative}, {@link OhosImageSourceUpdateData} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -957,7 +958,7 @@ int32_t OH_ImageSource_UpdateData(const ImageSourceNative* native, struct OhosIm * returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error. * @see {@link ImageSourceNative}, {@link OH_ImageSource_Create}, {@link OH_ImageSource_CreateIncremental} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ @@ -966,3 +967,4 @@ int32_t OH_ImageSource_Release(ImageSourceNative* native); }; #endif #endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_SOURCE_MDK_H_ +/** @} */ -- Gitee From fac57ef4d4538de99754fb97ee6246c1707953a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=91=E5=B1=91=E5=B1=91?= Date: Fri, 20 Dec 2024 19:23:36 +0800 Subject: [PATCH 273/630] api link fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 屑屑屑 --- multimedia/image_framework/include/image_pixel_map_mdk.h | 4 +++- multimedia/image_framework/include/image_pixel_map_napi.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/multimedia/image_framework/include/image_pixel_map_mdk.h b/multimedia/image_framework/include/image_pixel_map_mdk.h index b05dc9ca7..2fd6f9f22 100644 --- a/multimedia/image_framework/include/image_pixel_map_mdk.h +++ b/multimedia/image_framework/include/image_pixel_map_mdk.h @@ -19,7 +19,7 @@ * * @brief Provides APIs for obtaining pixel map data and information. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 1.0 */ @@ -30,6 +30,8 @@ * @brief Declares the APIs that can lock, access, and unlock a pixel map. * Need link libpixelmapndk.z.so * + * @library libpixelmap_ndk.so + * @syscap SystemCapability.Multimedia.Image * @kit ImageKit * @since 10 * @version 1.0 diff --git a/multimedia/image_framework/include/image_pixel_map_napi.h b/multimedia/image_framework/include/image_pixel_map_napi.h index 3608dac13..91328b45e 100644 --- a/multimedia/image_framework/include/image_pixel_map_napi.h +++ b/multimedia/image_framework/include/image_pixel_map_napi.h @@ -19,7 +19,7 @@ * * @brief Provides APIs for obtaining pixel map data and information. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 8 * @version 1.0 */ @@ -29,6 +29,8 @@ * * @brief Declares the APIs that can lock, access, and unlock a pixel map. * + * @library libpixelmap_ndk.so + * @syscap SystemCapability.Multimedia.Image * @kit ImageKit * @since 8 * @version 1.0 -- Gitee From ea2c8395e9099c3028ca76f42642aab2e48a9f51 Mon Sep 17 00:00:00 2001 From: yangqirun Date: Sat, 21 Dec 2024 11:15:16 +0800 Subject: [PATCH 274/630] Add ndk interfaces of processor Signed-off-by: yangqirun Change-Id: I0c0ef03b9fcfb8ab9e24933a64c81a757d9c0747 --- .../include/hiappevent/hiappevent.h | 188 ++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index 26a001799..d2867a903 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -87,6 +87,30 @@ extern "C" { #endif +/** + * @brief Defines error code + * + * @since 16 + */ +typedef enum { + /** @error The operation is successful. */ + HIAPPEVENT_SUCCESS = 0, + /** @error Invalid param value length */ + HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH = 4, + /** @error Processor is null */ + HIAPPEVENT_PROCESSOR_IS_NULL = -7, + /** @error Processor not found */ + HIAPPEVENT_PROCESSOR_NOT_FOUND = -8, + /** @error Invalid param value */ + HIAPPEVENT_INVALID_PARAM_VALUE = -9, + /** @error event config is null */ + HIAPPEVENT_EVENT_CONFIG_IS_NULL = -10, + /** @error Operate failed */ + HIAPPEVENT_OPERATE_FAILED = -100, + /** @error Invalid uid */ + HIAPPEVENT_INVALID_UID = -200 +} HiAppEvent_ErrorCode; + /** * @brief Event types. * @@ -164,6 +188,13 @@ typedef struct ParamListNode* ParamList; */ typedef struct HiAppEvent_Watcher HiAppEvent_Watcher; +/** + * @brief The HiAppEvent_Processor structure is designed for event report. + * + * @since 16 + */ +typedef struct HiAppEvent_Processor HiAppEvent_Processor; + /** * @brief The OH_HiAppEvent_OnReceive function acts as the callback function for the HiAppEvent_Watcher. It is called * when an event occurs. @@ -610,6 +641,163 @@ int OH_HiAppEvent_RemoveWatcher(HiAppEvent_Watcher* watcher); * @version 1.0 */ void OH_HiAppEvent_ClearData(); + +/** + * @brief Create a HiAppEvent_Processor handler pointer to set the property. + * + * @param name The name of the processor. + * @return Returns a pointer to the HiAppEvent_Processor instance. + * @since 16 + */ +HiAppEvent_Processor* OH_HiAppEvent_CreateProcessor(const char* name); + +/** + * @brief The interface to set route for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param appId The appid of the processor. + * @param routeInfo The server location information. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetReportRoute(HiAppEvent_Processor* processor, const char* appId, const char* routeInfo); + +/** + * @brief The interface to set policy for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param periodReport The time interval to report. + * @param batchReport The threthold to report. + * @param onStartReport The strategy to report. + * @param onBackgroundReport The strategy to report. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_SetReportPolicy(HiAppEvent_Processor* processor, int periodReport, int batchReport, + bool onStartReport, bool onBackgroundReport); + +/** + * @brief The interface to set report event for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param domain The event domain to report. + * @param name The event name to report. + * @param isRealTime The strategy to report. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_SetReportEvent(HiAppEvent_Processor* processor, const char* domain, const char* name, + bool isRealTime); + +/** + * @brief The interface to set config for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param key The custom key of processor. + * @param value The custom value of processor. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetCustomConfig(HiAppEvent_Processor* processor, const char* key, const char* value); + +/** + * @brief The interface to set configId for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param configId The configId of processor. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_SetConfigId(HiAppEvent_Processor* processor, int configId); + +/** + * @brief The interface to set user info for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param userIdNames The userIdNames of processor. + * @param size The size of userIdNames array. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetReportUserId(HiAppEvent_Processor* processor, const char* const * userIdNames, int size); + +/** + * @brief The interface to set user property for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param userPropertyNames The userPropertyNames of processor. + * @param size The size of userPropertyNames array. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetReportUserProperty(HiAppEvent_Processor* processor, const char* const * userPropertyNames, + int size); + +/** + * @brief The interface to add processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @return process id if set is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_OPERATE_FAILED} Name not found or register processor error. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int64_t OH_HiAppEvent_AddProcessor(HiAppEvent_Processor* processor); + +/** + * @brief The interface to destroy processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @since 16 + */ +void OH_HiAppEvent_DestoryProcessor(HiAppEvent_Processor* processor); + +/** + * @brief The interface to remove processor. + * + * @param processorId The id of the processor. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_NOT_FOUND} Processor not add. + * {@link HIAPPEVENT_OPERATE_FAILED} The operation is failed. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_RemoveProcessor(int64_t processorId); #ifdef __cplusplus } #endif -- Gitee From e978df42ace9871fde1edf991bf096ec763be18a Mon Sep 17 00:00:00 2001 From: l00844999 Date: Wed, 27 Nov 2024 15:36:43 +0800 Subject: [PATCH 275/630] Drawing ThemeFont Signed-off-by: l00844999 --- .../graphic_2d/native_drawing/drawing_font.h | 26 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 8 ++++++ 2 files changed, 34 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index 364ffb886..df5d11398 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -552,6 +552,32 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, OH_Drawing_ErrorCode OH_Drawing_FontGetTextPath(const OH_Drawing_Font* font, const void* text, size_t byteLength, OH_Drawing_TextEncoding encoding, float x, float y, OH_Drawing_Path* path); +/** + * @brief Sets whether to follow the theme font. If the value is true, the theme font is used when typeface is not set. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param followed Indicates whether to follow the theme font. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font is nullptr. + * @since 16 + */ +OH_Drawing_ErrorCode OH_Drawing_FontSetThemeFontFollowed(OH_Drawing_Font* font, bool followed); + +/** + * @brief Gets whether to follow the theme font. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param font Indicates the pointer to an OH_Drawing_Font object. + * @param followed Indicates whether to follow the theme font. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font or followed is nullptr. + * @since 16 + */ +OH_Drawing_ErrorCode OH_Drawing_FontIsThemeFontFollowed(const OH_Drawing_Font* font, bool* followed); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 827409165..c33c60140 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -238,6 +238,10 @@ "first_introduced": "12", "name": "OH_Drawing_FontIsSubpixel" }, + { + "first_introduced": "16", + "name": "OH_Drawing_FontIsThemeFontFollowed" + }, { "first_introduced": "12", "name": "OH_Drawing_FontMeasureSingleCharacter" @@ -276,6 +280,10 @@ "first_introduced": "12", "name": "OH_Drawing_FontSetSubpixel" }, + { + "first_introduced": "16", + "name": "OH_Drawing_FontSetThemeFontFollowed" + }, { "first_introduced": "12", "name": "OH_Drawing_FontTextToGlyphs" -- Gitee From 9f1ca80c9c11bc622f18c20dbc544a0190eb0c64 Mon Sep 17 00:00:00 2001 From: AnBetter Date: Sat, 21 Dec 2024 14:20:15 +0800 Subject: [PATCH 276/630] =?UTF-8?q?Progress=E7=BA=BF=E6=80=A7=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=A2=9E=E5=8A=A0CAPI=E6=8E=A5=E5=8F=A3=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=B8=BB=E5=B9=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AnBetter --- arkui/ace_engine/native/libace.ndk.json | 40 ++++++++++ arkui/ace_engine/native/native_node.h | 13 ++++ arkui/ace_engine/native/native_type.h | 99 +++++++++++++++++++++++++ 3 files changed, 152 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d4a39a67f..1ffea35d0 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2502,5 +2502,45 @@ { "first_introduced": "15", "name": "OH_ArkUI_FocusAxisEvent_SetStopPropagation" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_Create" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_Destroy" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index ccbb77543..5a66cb05b 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3339,6 +3339,19 @@ typedef enum { * */ NODE_PROGRESS_TYPE, + /** + * @brief Sets the style of the linear progress indicator. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object: Use the {@link ArkUI_ProgressLinearStyleOption} object to set the style. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object: Use the {@link ArkUI_ProgressLinearStyleOption} object to get the style. \n + * + * @since 16 + */ + NODE_PROGRESS_LINEAR_STYLE, /** * @brief Defines whether the check box is selected. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index d5062eb60..91d8f9944 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -207,6 +207,13 @@ typedef struct ArkUI_CustomProperty ArkUI_CustomProperty; */ typedef struct ArkUI_ActiveChildrenInfo ArkUI_ActiveChildrenInfo; +/** + * @brief Set the linear progress indicator style. + * + * @since 16 + */ +typedef struct ArkUI_ProgressLinearStyleOption ArkUI_ProgressLinearStyleOption; + /** * @brief Defines the event callback type. * @@ -4005,6 +4012,98 @@ ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildren * @since 14 */ int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle); + +/** + * @brief Create linear progress indicator style information. + * + * @return Returns a ProgressLinearStyleOption instance. + *
If the result returns nullptr, there may be out of memory. + * @since 16 + */ +ArkUI_ProgressLinearStyleOption* OH_ArkUI_ProgressLinearStyleOption_Create(); + +/** + * @brief Destroy linear progress indicator style information. + * + * @param option Linear progress indicator style information. + * @since 16 + */ +void OH_ArkUI_ProgressLinearStyleOption_Destroy(ArkUI_ProgressLinearStyleOption* option); + +/** + * @brief Set whether the scan effect is enabled. + * + * @param option Linear progress indicator style information. + * @param enabled Whether to enable the scan effect. Default value: false. + * @since 16 + */ +void OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled); + +/** + * @brief Set whether smoothing effect is enabled. + * + * @param option Linear progress indicator style information. + * @param enabled Whether to enable the smooth effect. When this effect is enabled, the progress change to + * the set value takes place gradually. Otherwise, it takes place immediately. Default value: true. + * @since 16 + */ +void OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled); + +/** + * @brief Set linear progress indicator stroke width. + * + * @param option Linear progress indicator style information. + * @param strokeWidth Stroke width of the progress indicator. It cannot be set in percentage. + * Default value: 4.0vp. + * @since 16 + */ +void OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth(ArkUI_ProgressLinearStyleOption* option, float strokeWidth); + +/** + * @brief Set linear progress indicator stroke radius. + * + * @param option Linear progress indicator style information. + * @param strokeRadius Rounded corner radius of the progress indicator. Value range: [0, strokeWidth/2]. + * Default value: strokeWidth/2. + * @since 16 + */ +void OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius(ArkUI_ProgressLinearStyleOption* option, float strokeRadius); + +/** + * @brief Get whether scan effect is enable. + * + * @param option Linear progress indicator style information. + * @return Whether to enable the scan effect. + * @since 16 + */ +bool OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option); + +/** + * @brief Get whether smoothing effect is enabled. + * + * @param option Linear progress indicator style information. + * @return Whether to enable the smooth effect. + * @since 16 + */ +bool OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option); + +/** + * @brief Get linear progress indicator stroke width. + * + * @param option Linear progress indicator style information. + * @return Stroke width of the progress indicator. + * @since 16 + */ +float OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth(ArkUI_ProgressLinearStyleOption* option); + +/** + * @brief Get linear progress indicator stroke radius. + * + * @param option Linear progress indicator style information. + * @return Rounded corner radius of the progress indicator. + * @since 16 + */ +float OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius(ArkUI_ProgressLinearStyleOption* option); #ifdef __cplusplus }; #endif -- Gitee From dfc96a623f3af812a7e8939eb283a382798d4e3b Mon Sep 17 00:00:00 2001 From: zoulinken Date: Sat, 21 Dec 2024 16:59:36 +0800 Subject: [PATCH 277/630] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E5=B9=B6=E6=B6=88=E9=99=A4=E4=BB=A3=E7=A0=81=E5=B7=AE=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/native_type.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index d5062eb60..360fc3bd6 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -4001,6 +4001,7 @@ ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildren * @brief Retrieve the number of nodes within the structure of ActiveChildenInfo. * * @param handle The ActiveChildenInfo instance for obtaining information. + * @param index The index of child nodes * @return Number of child nodes. Default value: 0. * @since 14 */ -- Gitee From 4e1509eaf97498a1157ca8a6f6148703967bab15 Mon Sep 17 00:00:00 2001 From: wanjining Date: Sat, 21 Dec 2024 18:49:29 +0800 Subject: [PATCH 278/630] =?UTF-8?q?TextInput/TextArea=20CAPI=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanjining --- arkui/ace_engine/native/libace.ndk.json | 4 + arkui/ace_engine/native/native_node.h | 107 ++++++++++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 1ffea35d0..ca090d8b7 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2542,5 +2542,9 @@ { "first_introduced": "16", "name": "OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeEvent_GetTextChangeEvent" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 5a66cb05b..e008614e1 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2970,6 +2970,34 @@ typedef enum { * */ NODE_TEXT_INPUT_NUMBER_OF_LINES, + + /** + * @brief Sets the letter spacing of the TextInput component. + * This attribute 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: letter spacing. The default unit is fp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: letter spacing. The default unit is fp. \n + * + * @since 16 + */ + NODE_TEXT_INPUT_LETTER_SPACING = 7032, + /** + * @brief Sets whether to enable preview text for the TextInput component. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to enable preview tex. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to enable preview tex. \n + * + * @since 16 + */ + NODE_TEXT_INPUT_ENABLE_PREVIEW_TEXT = 7033, + /** * @brief Defines the default placeholder text for the multi-line text box. * This attribute can be set, reset, and obtained as required through APIs. @@ -3264,6 +3292,34 @@ typedef enum { * */ NODE_TEXT_AREA_NUMBER_OF_LINES, + + /** + * @brief Sets the letter spacing of the TextArea component. + * This attribute 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: letter spacing. The default unit is fp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: letter spacing. The default unit is fp. \n + * + * @since 16 + */ + NODE_TEXT_AREA_LETTER_SPACING = 8023, + /** + * @brief Sets whether to enable preview text for the TextArea component. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to enable preview tex. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to enable preview tex. \n + * + * @since 16 + */ + NODE_TEXT_AREA_ENABLE_PREVIEW_TEXT = 8024, + /** * @brief Defines the button text content. This attribute can be set, reset, and obtained as required through APIs. * @@ -5476,6 +5532,20 @@ typedef struct { const char* pStr; } ArkUI_StringAsyncEvent; +/** + * @brief Defines a hybrid data structure for component events. + * + * @since 16 + */ +typedef struct { + /** String data */ + const char* pStr; + /** Extended string data */ + const char* pExtendStr; + /** Numeric data */ + int32_t number; +} ArkUI_TextChangeEvent; + /** * @brief Enumerates the event types supported by the NativeNode component. * @@ -5998,6 +6068,20 @@ typedef enum { */ NODE_TEXT_INPUT_ON_DID_DELETE = 7012, + /** + * @brief Defines the event triggered when content (including preview text) changes in the TextInput + * component. + * + * When the event callback occurs, the union type {@link ArkUI_NodeEvent} is {@link ArkUI_TextChangeEvent}. \n + * {@link ArkUI_TextChangeEvent} contains the following parameters: \n + * ArkUI_TextChangeEvent.pStr: content in the TextInput component. + * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextInput component. + * ArkUI_TextChangeEvent.number: start position of the preview text in the TextInput component. + * + * @since 16 + */ + NODE_TEXT_INPUT_ON_CHANGE_WITH_PREVIEW_TEXT = 7013, + /** * @brief Defines the event triggered when the input in the text box changes. * @@ -6150,6 +6234,20 @@ typedef enum { */ NODE_TEXT_AREA_ON_DID_DELETE = 8011, + /** + * @brief Defines the event triggered when content (including preview text) changes in the TextArea + * component. + * + * When the event callback occurs, the union type {@link ArkUI_NodeEvent} is {@link ArkUI_TextChangeEvent}. \n + * {@link ArkUI_TextChangeEvent} contains the following parameters: \n + * ArkUI_TextChangeEvent.pStr: content in the TextArea component. + * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextArea component. + * ArkUI_TextChangeEvent.number: start position of the preview text in the TextArea component. + * + * @since 16 + */ + NODE_TEXT_AREA_ON_CHANGE_WITH_PREVIEW_TEXT = 8012, + /** * @brief Defines the event triggered when the selected status of the ARKUI_NODE_CHECKBOX component changes. * @@ -6696,6 +6794,15 @@ ArkUI_NodeComponentEvent* OH_ArkUI_NodeEvent_GetNodeComponentEvent(ArkUI_NodeEve */ ArkUI_StringAsyncEvent* OH_ArkUI_NodeEvent_GetStringAsyncEvent(ArkUI_NodeEvent* event); +/** + * @brief Obtains the ArkUI_TextChangeEvent data from a component event. + * + * @param event Pointer to a component event. It cannot be null. + * @return Returns the pointer to the ArkUI_TextChangeEvent object. + * @since 16 + */ +ArkUI_TextChangeEvent* OH_ArkUI_NodeEvent_GetTextChangeEvent(ArkUI_NodeEvent* event); + /** * @brief Obtains the custom data in a component event. * -- Gitee From 7ba803fe3f9ad41b89748d2ee8bdec5ec8cb8123 Mon Sep 17 00:00:00 2001 From: peng Date: Sat, 21 Dec 2024 13:21:19 +0000 Subject: [PATCH 279/630] add muxer ndk interface Signed-off-by: peng --- multimedia/av_codec/native_avcodec_base.h | 10 +++++++++- multimedia/av_codec/native_avmuxer.h | 14 +++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 3fcd8cc53..547268a0e 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -977,6 +977,14 @@ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE; */ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR; +/** + * @brief Key for creation timestamp of a media file, value type is int64_t. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 14 + */ +extern const char *OH_MD_KEY_CREATION_TIME; + /** * @brief Media type. * @@ -1366,4 +1374,4 @@ typedef enum OH_BitrateMode { #endif #endif // NATIVE_AVCODEC_BASE_H -/** @} */ \ No newline at end of file +/** @} */ diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h index e50b31cee..8cd87e5dc 100644 --- a/multimedia/av_codec/native_avmuxer.h +++ b/multimedia/av_codec/native_avmuxer.h @@ -76,6 +76,18 @@ OH_AVMuxer *OH_AVMuxer_Create(int32_t fd, OH_AVOutputFormat format); */ OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation); +/** + * @brief Set format to the muxer. + * @syscap SystemCapability.Multimedia.Media.Muxer + * @param muxer Pointer to an OH_AVMuxer instance + * @param format OH_AVFormat handle pointer contain format + * @return Returns AV_ERR_OK if the execution is successful, + * otherwise returns a specific error code, refer to {@link OH_AVErrCode} + * {@link AV_ERR_INVALID_VAL}, the muxer or format invalid. + * @since 14 + */ +OH_AVErrCode OH_AVMuxer_SetFormat(OH_AVMuxer *muxer, OH_AVFormat *format); + /** * @brief Add track format to the muxer. * Note: This interface can only be called before OH_AVMuxer_Start. @@ -182,4 +194,4 @@ OH_AVErrCode OH_AVMuxer_Destroy(OH_AVMuxer *muxer); #endif #endif // NATIVE_AVMUXER_H -/** @} */ \ No newline at end of file +/** @} */ -- Gitee From dcba35d3a25ba82defc25310354cd3521105a938 Mon Sep 17 00:00:00 2001 From: Hu_zq Date: Sat, 21 Dec 2024 22:28:15 +0800 Subject: [PATCH 280/630] Swiper: pageflipmode change 14 to 15 Signed-off-by: Hu_zq Change-Id: Ie349fe4ddec67f9aa34a71a0621fb9dafc56f609 --- arkui/ace_engine/native/native_node.h | 2 +- arkui/ace_engine/native/native_type.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e008614e1..ad33dc659 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5036,7 +5036,7 @@ typedef enum { * Format of the return value {@link ArkUI_PageFlipMode}:\n * .value[0].i32: page flipping mode using the mouse wheel. \n * - * @since 14 + * @since 15 */ NODE_SWIPER_PAGE_FLIP_MODE, diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 08542a381..fdf5bb169 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -783,7 +783,7 @@ typedef enum { /** * @brief Enumerates the page flipping modes using the mouse wheel for the Swiper component. * - * @since 14 + * @since 15 */ typedef enum { /** When the mouse wheel is scrolled continuously, multiple pages are flipped, which is determined by the number of -- Gitee From b434d394183880438d4b42dca28c5e519dd91961 Mon Sep 17 00:00:00 2001 From: zcdqs Date: Sun, 22 Dec 2024 11:10:14 +0800 Subject: [PATCH 281/630] add stop when touched to swiper autoplay Signed-off-by: zcdqs Change-Id: I31e41759ec2d2dc645aaf2294f15146b3e2b29d0 --- arkui/ace_engine/native/native_node.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e008614e1..ee0c94de8 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4768,9 +4768,15 @@ typedef enum { * .value[0].i32: whether to enable automatic playback for child component switching. The value 1 * means to enable automatic playback, and 0 means the opposite. The default value is 0. \n * \n + * .value[1]?.i32: whether to stop automatic playback when the user touches the screen. The value 1 means + * to stop automatic playback, and 0 means the opposite. The default value is 1. This parameter is + * supported since API version 16. \n + * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: whether to enable automatic playback for child component switching. The value 1 means * to enable automatic playback, and 0 means the opposite. The default value is 0. \n + * .value[1].i32: whether to stop automatic playback when the user touches the screen. The value 1 means to + * stop automatic playback, and 0 means the opposite. This parameter is supported since API version 16. \n * */ NODE_SWIPER_AUTO_PLAY, -- Gitee From e33146cec32a73c8932548fdd371421400fa5ce6 Mon Sep 17 00:00:00 2001 From: wangxiuxiu Date: Fri, 20 Dec 2024 15:16:17 +0800 Subject: [PATCH 282/630] change keyEvent note Signed-off-by: wangxiuxiu --- arkui/ace_engine/native/ui_input_event.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 85a377f12..00ea54539 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -726,9 +726,7 @@ int32_t OH_ArkUI_PointerEvent_SetStopPropagation(const ArkUI_UIInputEvent* event int32_t OH_ArkUI_UIInputEvent_GetDeviceId(const ArkUI_UIInputEvent* event); /** - * @brief Obtains the pressed status of modifier keys from UI input event. - * The following modifier keys are supported: Ctrl, Alt, Shift, Fn. However, the Fn key on external keyboards - * is not supported. + * @brief Obtains all keys that are pressed from UI input event. * * @param event Pointer to an ArkUI_UIInputEvent object. * @param pressedKeyCodes Array of all keys that are pressed. You need to allocate the memory space. @@ -736,7 +734,7 @@ int32_t OH_ArkUI_UIInputEvent_GetDeviceId(const ArkUI_UIInputEvent* event); * number of the keys pressed (when used as an output parameter). * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. - * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the giving buffer is not enough. + * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH} if the giving buffer is not enough. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * @since 14 */ -- Gitee From a30f53c70b77387c4ed046546977b76ed59eb5dc Mon Sep 17 00:00:00 2001 From: liuyifei Date: Mon, 23 Dec 2024 02:46:52 +0000 Subject: [PATCH 283/630] add hilog ndk interface Signed-off-by: liuyifei --- hiviewdfx/hilog/include/hilog/log.h | 72 +++++++++++++++++++++++++++++ hiviewdfx/hilog/libhilog.ndk.json | 12 +++++ 2 files changed, 84 insertions(+) diff --git a/hiviewdfx/hilog/include/hilog/log.h b/hiviewdfx/hilog/include/hilog/log.h index 5fa41928a..6d4914dc9 100644 --- a/hiviewdfx/hilog/include/hilog/log.h +++ b/hiviewdfx/hilog/include/hilog/log.h @@ -63,6 +63,7 @@ #ifndef HIVIEWDFX_HILOG_H #define HIVIEWDFX_HILOG_H +#include #include #include @@ -155,6 +156,69 @@ typedef enum { int OH_LOG_Print(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *fmt, ...) __attribute__((__format__(os_log, 5, 6))); +/** + * @brief Outputs logs. + * + * You can use this function to output logs based on the specified log type, log level, service domain, log tag, + * and message text. + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN, + * LOG_ERROR, and LOG_FATAL. + * @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF. + * @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior. + * @param message Indicates the log string. + * @return Returns 0 or a larger value if the operation is successful; returns a value smaller + * than 0 otherwise. + * @since 16 + */ +int OH_LOG_PrintMsg(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *message); + +/** + * @brief Outputs logs. + * + * You can use this function to output logs based on the specified log type, log level, service domain, log tag, + * message text and message length. + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN, + * LOG_ERROR, and LOG_FATAL. + * @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF. + * @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior. + * @param tagLen Indicates the length of tag. + * @param message Indicates the log string. + * @param messageLen Indicates the length of message. + * @return Returns 0 or a larger value if the operation is successful; returns a value smaller + * than 0 otherwise. + * @since 16 + */ +int OH_LOG_PrintMsgByLen(LogType type, LogLevel level, unsigned int domain, const char *tag, size_t tagLen, + const char *message, size_t messageLen); + +/** + * @brief Outputs logs. + * + * You can use this function to output logs based on the specified log type, log level, service domain, log tag, + * and a va_list instead of variable parameters determined by the format specifier and privacy identifier in the printf + * format. + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN, + * LOG_ERROR, and LOG_FATAL. + * @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF. + * @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior. + * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy + * identifier. Specifically, {public} or {private} is added between the % character and the format specifier + * in each parameter. \n + * @param ap Indicates a list of parameters. The number and type of parameters must map onto the format specifiers + * in the format string. + * @return Returns 0 or a larger value if the operation is successful; returns a value smaller + * than 0 otherwise. + * @since 16 + */ +int OH_LOG_VPrint(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *fmt, va_list ap) + __attribute__((__format__(os_log, 5, 0))); + /** * @brief Checks whether logs of the specified service domain, log tag, and log level can be output. * @@ -279,6 +343,14 @@ typedef void (*LogCallback)(const LogType type, const LogLevel level, const unsi */ void OH_LOG_SetCallback(LogCallback callback); +/** + * @brief Sets the lowest log level of the current application process. + * + * @param level log level + * @since 16 + */ +void OH_LOG_SetMinLogLevel(LogLevel level); + #ifdef __cplusplus } #endif diff --git a/hiviewdfx/hilog/libhilog.ndk.json b/hiviewdfx/hilog/libhilog.ndk.json index 2ca6bed2c..0d14010e0 100644 --- a/hiviewdfx/hilog/libhilog.ndk.json +++ b/hiviewdfx/hilog/libhilog.ndk.json @@ -7,5 +7,17 @@ }, { "name": "OH_LOG_SetCallback" + }, + { + "name": "OH_LOG_PrintMsg" + }, + { + "name": "OH_LOG_PrintMsgByLen" + }, + { + "name": "OH_LOG_VPrint" + }, + { + "name": "OH_LOG_SetMinLogLevel" } ] -- Gitee From aa9e9689426ba35f9f85bad8f56ffe7af23fda32 Mon Sep 17 00:00:00 2001 From: sd_wu Date: Mon, 23 Dec 2024 11:48:00 +0800 Subject: [PATCH 284/630] capi xcomponent support surface rect setting and enable analyzer Signed-off-by: sd_wu --- arkui/ace_engine/native/native_node.h | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e008614e1..9e4c08ef3 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3517,6 +3517,37 @@ typedef enum { * */ NODE_XCOMPONENT_SURFACE_SIZE, + /** + * @brief Defines the rectangle information of surface created by the component. + * This attribute can be set and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: The horizontal offset of the surface relative to XComponent, in pixels. \n + * .value[1].i32: The vertical offset of the surface relative to XComponent, in pixels. \n + * .value[2].i32: The width of the surface created by XComponent, in pixels. \n + * .value[3].i32: The height of the surface created by XComponent, in pixels. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: The horizontal offset of the surface relative to XComponent, in pixels. \n + * .value[1].i32: The vertical offset of the surface relative to XComponent, in pixels. \n + * .value[2].i32: The width of the surface created by XComponent, in pixels. \n + * .value[3].i32: The height of the surface created by XComponent, in pixels. \n + * @since 16 + */ + NODE_XCOMPONENT_SURFACE_RECT, + /** + * @brief Defines whether to enable the AI analyzer for the component. + * This attribute can be set and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * value[0].i32: The parameter type is 1 or 0. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: The parameter type is 1 or 0. + * @since 16 + */ + NODE_XCOMPONENT_ENABLE_ANALYZER, /** * @brief Defines whether to display the lunar calendar in the date picker. -- Gitee From 49740acafa3cb78d6ee1b4734732af68f0202d2e Mon Sep 17 00:00:00 2001 From: liujiaxing19 Date: Fri, 20 Dec 2024 15:53:56 +0800 Subject: [PATCH 285/630] =?UTF-8?q?=E3=80=90hiappevent=E3=80=91=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=B0=83=E6=95=B4=E7=B3=BB=E7=BB=9F=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E8=A7=A6=E5=8F=91=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujiaxing19 Change-Id: I56a35906bda91e8e8dbbbcf1097af280dd2ad72f --- .../include/hiappevent/hiappevent.h | 237 ++++++++++++++++++ 1 file changed, 237 insertions(+) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index 26a001799..a159aae9b 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -87,6 +87,30 @@ extern "C" { #endif +/** + * @brief Defines error code + * + * @since 16 + */ +typedef enum { + /** @error The operation is successful. */ + HIAPPEVENT_SUCCESS = 0, + /** @error Invalid param value length */ + HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH = 4, + /** @error Processor is null */ + HIAPPEVENT_PROCESSOR_IS_NULL = -7, + /** @error Processor not found */ + HIAPPEVENT_PROCESSOR_NOT_FOUND = -8, + /** @error Invalid param value */ + HIAPPEVENT_INVALID_PARAM_VALUE = -9, + /** @error event config is null */ + HIAPPEVENT_EVENT_CONFIG_IS_NULL = -10, + /** @error Operate failed */ + HIAPPEVENT_OPERATE_FAILED = -100, + /** @error Invalid uid */ + HIAPPEVENT_INVALID_UID = -200 +} HiAppEvent_ErrorCode; + /** * @brief Event types. * @@ -164,6 +188,20 @@ typedef struct ParamListNode* ParamList; */ typedef struct HiAppEvent_Watcher HiAppEvent_Watcher; +/** + * @brief The HiAppEvent_Processor structure is designed for event report. + * + * @since 16 + */ +typedef struct HiAppEvent_Processor HiAppEvent_Processor; + +/** + * @brief The HiAppEvent_Config structure is designed for configuration. + * + * @since 16 + */ +typedef struct HiAppEvent_Config HiAppEvent_Config; + /** * @brief The OH_HiAppEvent_OnReceive function acts as the callback function for the HiAppEvent_Watcher. It is called * when an event occurs. @@ -610,6 +648,205 @@ int OH_HiAppEvent_RemoveWatcher(HiAppEvent_Watcher* watcher); * @version 1.0 */ void OH_HiAppEvent_ClearData(); + +/** + * @brief Create a HiAppEvent_Processor handler pointer to set the property. + * + * @param name The name of the processor. + * @return Returns a pointer to the HiAppEvent_Processor instance. + * @since 16 + */ +HiAppEvent_Processor* OH_HiAppEvent_CreateProcessor(const char* name); + +/** + * @brief The interface to set route for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param appId The appid of the processor. + * @param routeInfo The server location information. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetReportRoute(HiAppEvent_Processor* processor, const char* appId, const char* routeInfo); + +/** + * @brief The interface to set policy for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param periodReport The time interval to report. + * @param batchReport The threthold to report. + * @param onStartReport The strategy to report. + * @param onBackgroundReport The strategy to report. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_SetReportPolicy(HiAppEvent_Processor* processor, int periodReport, int batchReport, + bool onStartReport, bool onBackgroundReport); + +/** + * @brief The interface to set report event for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param domain The event domain to report. + * @param name The event name to report. + * @param isRealTime The strategy to report. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_SetReportEvent(HiAppEvent_Processor* processor, const char* domain, const char* name, + bool isRealTime); + +/** + * @brief The interface to set config for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param key The custom key of processor. + * @param value The custom value of processor. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetCustomConfig(HiAppEvent_Processor* processor, const char* key, const char* value); + +/** + * @brief The interface to set configId for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param configId The configId of processor. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_SetConfigId(HiAppEvent_Processor* processor, int configId); + +/** + * @brief The interface to set user info for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param userIdNames The userIdNames of processor. + * @param size The size of userIdNames array. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetReportUserId(HiAppEvent_Processor* processor, const char* const * userIdNames, int size); + +/** + * @brief The interface to set user property for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param userPropertyNames The userPropertyNames of processor. + * @param size The size of userPropertyNames array. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 16 + */ +int OH_HiAppEvent_SetReportUserProperty(HiAppEvent_Processor* processor, const char* const * userPropertyNames, + int size); + +/** + * @brief The interface to add processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @return process id if set is successful. + * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_OPERATE_FAILED} Name not found or register processor error. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int64_t OH_HiAppEvent_AddProcessor(HiAppEvent_Processor* processor); + +/** + * @brief The interface to destroy processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @since 16 + */ +void OH_HiAppEvent_DestoryProcessor(HiAppEvent_Processor* processor); + +/** + * @brief The interface to remove processor. + * + * @param processorId The id of the processor. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_NOT_FOUND} Processor not add. + * {@link HIAPPEVENT_OPERATE_FAILED} The operation is failed. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * @since 16 + */ +int OH_HiAppEvent_RemoveProcessor(int64_t processorId); + +/** + * @brief Create a HiAppEvent_Config handler pointer to set the config. + * + * @return Returns a pointer to the HiAppEvent_Config instance. + * @since 16 + */ +HiAppEvent_Config* OH_HiAppEvent_CreateConfig(); + +/** + * @brief Destroy the specified HiAppEvent_Config handle resource. + * + * @param config The pointer to the HiAppEvent_Config instance. + * @since 16 + */ +void OH_HiAppEvent_DestroyConfig(HiAppEvent_Config* config); + +/** + * @brief The interface to set item to the config. + * + * @param config The pointer to the HiAppEvent_Config instance. + * @param itemName The name of config item. + * @param itemValue The value of config item. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_EVENT_CONFIG_IS_NULL} The event config is null. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} The item is invalid. + * @since 16 + */ +int OH_HiAppEvent_SetConfigItem(HiAppEvent_Config* config, const char* itemName, const char* itemValue); + +/** + * @brief The interface to set the config. + * + * @param name The name of the os event. + * @param config The pointer to the HiAppEvent_Config instance. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} The config is invalid. + * @since 16 + */ +int OH_HiAppEvent_SetEventConfig(const char* name, HiAppEvent_Config* config); #ifdef __cplusplus } #endif -- Gitee From 0229c8a998443e51bf1bdfc079428289cd287e33 Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Mon, 23 Dec 2024 15:55:18 +0800 Subject: [PATCH 286/630] =?UTF-8?q?[L]=20capi=E6=8C=89=E9=94=AE=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=94=AF=E6=8C=81=E6=8B=A6=E6=88=AA=E5=92=8C=E5=88=86?= =?UTF-8?q?=E5=8F=91=20Signed-off-by:lisitaolisitao3@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/native_key_event.h | 9 +++++++++ arkui/ace_engine/native/native_node.h | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ca090d8b7..5d8b8a8aa 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2503,6 +2503,10 @@ "first_introduced": "15", "name": "OH_ArkUI_FocusAxisEvent_SetStopPropagation" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_KeyEvent_Dispatch" + }, { "first_introduced": "16", "name": "OH_ArkUI_ProgressLinearStyleOption_Create" diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h index c9c2c4fb1..2aa2fe849 100644 --- a/arkui/ace_engine/native/native_key_event.h +++ b/arkui/ace_engine/native/native_key_event.h @@ -491,6 +491,15 @@ uint32_t OH_ArkUI_KeyEvent_GetUnicode(const ArkUI_UIInputEvent* event); * @since 14 */ void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsumed); + +/** + * @brief Dispatch key event to a specific component node. + * + * @param node Indicates the pointer to a component node. + * @param event Pointer to an ArkUI_UIInputEvent object. + * @since 16 + */ +void OH_ArkUI_KeyEvent_Dispatch(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event); #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e008614e1..4bac35463 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5827,6 +5827,18 @@ typedef enum { */ NODE_ON_FOCUS_AXIS = 23, + /** + * @brief Dispatch key event on the component node. + * + * When the component node receives a key event, this callback will be triggered instead of dispatching event to its + * children. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * + * @since 16 + */ + NODE_DISPATCH_KEY_EVENT = 24, + /** * @brief Triggers onDetectResultUpdate callback * when the text is set to TextDataDetectorConfig and recognized successfully. -- Gitee From b547223630c0eb593c0830a0f4fcb777cf86e7a5 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Fri, 29 Nov 2024 16:41:51 +0800 Subject: [PATCH 287/630] =?UTF-8?q?C-API=E6=94=AF=E6=8C=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=8B=E4=B8=80=E5=B8=A7=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiuxiu96 Change-Id: If6d345808c11ce1efbc946ec9081651bb63c6501 --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/native_node_napi.h | 19 +++++++++++++++++++ arkui/ace_engine/native/native_type.h | 15 +++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ca090d8b7..44a9f81ca 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2546,5 +2546,9 @@ { "first_introduced": "16", "name": "OH_ArkUI_NodeEvent_GetTextChangeEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PostFrameCallback" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node_napi.h b/arkui/ace_engine/native/native_node_napi.h index ade5e7edf..bba66d373 100644 --- a/arkui/ace_engine/native/native_node_napi.h +++ b/arkui/ace_engine/native/native_node_napi.h @@ -355,6 +355,25 @@ ArkUI_ErrorCode OH_ArkUI_GetRouterPageState(ArkUI_NodeHandle node, ArkUI_RouterP ArkUI_ErrorCode OH_ArkUI_GetRouterPageId( ArkUI_NodeHandle node, char* buffer, int32_t bufferSize, int32_t* writeLength); +/** + * @brief Register a callback to be executed when rendering in the next frame. Cannot be called on + * the non-UI thread. Checking for non-UI thread calls will abort. + * + * @param uiContext ArkUI_ContextHandle. + * @param userData Indicates the custom data to be saved. + * @param callback Custom callback function. + * @param nanoTimestamp Timestamp of frame signal. + * @param frameCount Frame count. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * Returns {@link ARKUI_ERROR_CODE_UI_CONTEXT_INVALID} if the uiContext is invalid. + * Returns {@link ARKUI_ERROR_CODE_CALLBACK_INVALID} if the callback function is invalid. + * @since 16 + */ +int32_t OH_ArkUI_PostFrameCallback(ArkUI_ContextHandle uiContext, void* userData, + void (*callback)(uint64_t nanoTimestamp, uint32_t frameCount, void* userData)); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 08542a381..252a2c457 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1926,6 +1926,11 @@ typedef enum { ARKUI_ERROR_CODE_NO_ERROR = 0, /** @error Parameter error. */ ARKUI_ERROR_CODE_PARAM_INVALID = 401, + /** + * @error CAPI init error. + * @since 16 + */ + ARKUI_ERROR_CODE_CAPI_INIT_ERROR = 500, /** @error The component does not support specific properties or events. */ ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102, /** @error The corresponding operation does not support nodes created by ArkTS. */ @@ -1957,6 +1962,16 @@ typedef enum { * @since 14 */ ARKUI_ERROR_CODE_INVALID_STYLED_STRING = 180101, + /** + * @error The uiContext is invalid. + * @since 16 + */ + ARKUI_ERROR_CODE_UI_CONTEXT_INVALID = 190001, + /** + * @error The callback function is invalid. + * @since 16 + */ + ARKUI_ERROR_CODE_CALLBACK_INVALID = 190002, } ArkUI_ErrorCode; /** -- Gitee From 88e592f8c9e75120283c1cfc3c81ebd6edae7d6f Mon Sep 17 00:00:00 2001 From: zoulinken Date: Mon, 23 Dec 2024 20:15:02 +0800 Subject: [PATCH 288/630] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e008614e1..f6e7ea1cd 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7966,7 +7966,7 @@ int32_t OH_ArkUI_NodeUtils_GetCustomProperty(ArkUI_NodeHandle node, const char* ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetParentInPageTree(ArkUI_NodeHandle node); /** - * @brief Retrieve all active child nodes of a node. Span and ImageSpan will not be counted in the children. + * @brief Retrieve all active child nodes of a node. Span will not be counted in the children. * * @param head Pass in the node that needs to be obtained. * @param handle The structure corresponding to the sub node information of the head node. -- Gitee From 007739b6376c9d6a4930daf4fb0e2347910bf0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E7=82=9C=E5=B3=B0?= Date: Mon, 23 Dec 2024 20:19:05 +0800 Subject: [PATCH 289/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0avi=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E7=A0=81=E6=B5=81=E6=A0=BC=E5=BC=8F=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 董炜峰 --- .../codec_base/libnative_media_codecbase.ndk.json | 4 ++++ multimedia/av_codec/native_avcodec_base.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 715c18d86..bdbf37e1c 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -59,6 +59,10 @@ "first_introduced": "11", "name": "OH_AVCODEC_MIMETYPE_AUDIO_G711MU" }, + { + "first_introduced": "14", + "name": "OH_AVCODEC_MIMETYPE_AUDIO_PCM" + }, { "first_introduced": "12", "name": "OH_AVCODEC_MIMETYPE_AUDIO_APE" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 3fcd8cc53..d437bc5f6 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -323,6 +323,14 @@ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_OPUS; */ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_G711MU; +/** + * @brief Enumerates the mime types of audio pcm codec. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 14 + */ +extern const char *OH_AVCODEC_MIMETYPE_AUDIO_PCM; + /** * @brief Enumerates the mime type of audio ape codec. * -- Gitee From 6a24dac07c110acbdc8392bd6d8577da64ca96b7 Mon Sep 17 00:00:00 2001 From: l00844999 Date: Mon, 23 Dec 2024 22:07:22 +0800 Subject: [PATCH 290/630] drawing errcode Signed-off-by: l00844999 --- graphic/graphic_2d/native_drawing/drawing_error_code.h | 8 ++++++++ .../graphic_2d/native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h index 38e135e3b..7b0503528 100644 --- a/graphic/graphic_2d/native_drawing/drawing_error_code.h +++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h @@ -82,6 +82,14 @@ typedef enum { */ OH_Drawing_ErrorCode OH_Drawing_ErrorCodeGet(); +/** + * @brief Resets the error code of the drawing module to OH_DRAWING_SUCCESS. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @since 16 + * @version 1.0 + */ +void OH_Drawing_ErrorCodeReset(); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index c33c60140..a4cd9973f 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -164,6 +164,10 @@ "first_introduced": "12", "name": "OH_Drawing_ErrorCodeGet" }, + { + "first_introduced": "16", + "name": "OH_Drawing_ErrorCodeReset" + }, { "name": "OH_Drawing_FilterCreate" }, { "name": "OH_Drawing_FilterSetColorFilter" }, { -- Gitee From f70a3e615d896db6fe1c3a7ab1063b0d8ca596d2 Mon Sep 17 00:00:00 2001 From: peng Date: Mon, 23 Dec 2024 14:20:55 +0000 Subject: [PATCH 291/630] modify comment Signed-off-by: peng --- multimedia/av_codec/native_avmuxer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h index 8cd87e5dc..361bf3193 100644 --- a/multimedia/av_codec/native_avmuxer.h +++ b/multimedia/av_codec/native_avmuxer.h @@ -83,7 +83,7 @@ OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation); * @param format OH_AVFormat handle pointer contain format * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} - * {@link AV_ERR_INVALID_VAL}, the muxer or format invalid. + * {@link AV_ERR_INVALID_VAL}, the muxer or format is invalid. * @since 14 */ OH_AVErrCode OH_AVMuxer_SetFormat(OH_AVMuxer *muxer, OH_AVFormat *format); -- Gitee From bfc70587b018edde4f8b97a46cd41701ac6acfe1 Mon Sep 17 00:00:00 2001 From: peng Date: Tue, 24 Dec 2024 02:14:23 +0000 Subject: [PATCH 292/630] add space line Signed-off-by: peng --- multimedia/av_codec/native_avmuxer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h index 361bf3193..553bdae56 100644 --- a/multimedia/av_codec/native_avmuxer.h +++ b/multimedia/av_codec/native_avmuxer.h @@ -78,6 +78,7 @@ OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation); /** * @brief Set format to the muxer. + * * @syscap SystemCapability.Multimedia.Media.Muxer * @param muxer Pointer to an OH_AVMuxer instance * @param format OH_AVFormat handle pointer contain format -- Gitee From 20022d74e62a228e24b47ee79b30857592f4512f Mon Sep 17 00:00:00 2001 From: j00466033 Date: Tue, 24 Dec 2024 10:45:31 +0800 Subject: [PATCH 293/630] jd-ndk-api16 Signed-off-by: j00466033 --- web/webview/interfaces/native/arkweb_interface.h | 2 +- web/webview/interfaces/native/arkweb_type.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_interface.h b/web/webview/interfaces/native/arkweb_interface.h index 03f9f612b..2b1045249 100644 --- a/web/webview/interfaces/native/arkweb_interface.h +++ b/web/webview/interfaces/native/arkweb_interface.h @@ -68,7 +68,7 @@ typedef enum { /** * @brief API type related to ArkWeb JavaScript value. * - * @since 14 + * @since 16 */ ARKWEB_NATIVE_JAVASCRIPT_VALUE, } ArkWeb_NativeAPIVariantKind; diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index 206d6b5d1..b0cdabe2e 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -71,7 +71,7 @@ typedef enum ArkWeb_WebMessageType { /** * @brief Defines the data type carried in a ArkWeb_JavaScriptValue. * - * @since 14 + * @since 16 */ typedef enum ArkWeb_JavaScriptValueType { /** Represent error data */ @@ -92,7 +92,7 @@ typedef struct ArkWeb_WebMessage* ArkWeb_WebMessagePtr; /** * @brief Defines the ArkWeb_JavaScriptValuePtr. * - * @since 14 + * @since 16 */ typedef struct ArkWeb_JavaScriptValue* ArkWeb_JavaScriptValuePtr; @@ -120,7 +120,7 @@ typedef void (*ArkWeb_OnJavaScriptProxyCallback)( * @param arraySize The number of elements in the array. * @param userData The data set by user. * - * @since 14 + * @since 16 */ typedef ArkWeb_JavaScriptValuePtr (*ArkWeb_OnJavaScriptProxyCallbackWithResult)( const char* webTag, const ArkWeb_JavaScriptBridgeData* dataArray, size_t arraySize, void* userData); @@ -185,7 +185,7 @@ typedef struct { /** * @brief Defines the JavaScript proxy method with a return value. * - * @since 14 + * @since 16 */ typedef struct { /** The method of the application side JavaScript object participating in the registration. */ @@ -213,7 +213,7 @@ typedef struct { /** * @brief Defines the JavaScript proxy registered object with methodList that has a return value. * - * @since 14 + * @since 16 */ typedef struct { /** The name of the registered object. */ @@ -294,7 +294,7 @@ typedef struct { * @param permission The JSON string, which defaults to null, is used to configure the permission control for * JSBridge, allowing for the definition of URL whitelists at the object and method levels. * - * @since 14 + * @since 16 */ void (*registerJavaScriptProxyEx)(const char* webTag, const ArkWeb_ProxyObjectWithResult* proxyObject, const char* permission); @@ -307,7 +307,7 @@ typedef struct { * @param permission The JSON string, which defaults to null, is used to configure the permission control * for JSBridge, allowing for the definition of URL whitelists at the object and method levels. * - * @since 14 + * @since 16 */ void (*registerAsyncJavaScriptProxyEx)(const char* webTag, const ArkWeb_ProxyObject* proxyObject, const char* permission); @@ -502,7 +502,7 @@ typedef struct { * whether the function structure has a corresponding function pointer to avoid crash * caused by mismatch between the SDK and the device ROM. * - * @since 14 + * @since 16 */ typedef struct { /** The ArkWeb_JavaScriptValueAPI struct size. */ -- Gitee From df78a27a42fd229b101360c19e4df64c72f6793d Mon Sep 17 00:00:00 2001 From: lwx1281857 Date: Tue, 24 Dec 2024 10:51:18 +0800 Subject: [PATCH 294/630] Description: Code optimization Feature or Bugfix: Bugfix Binary Source:No Signed-off-by: lwx1281857 --- startup/init/syscap/include/syscap_ndk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/init/syscap/include/syscap_ndk.h b/startup/init/syscap/include/syscap_ndk.h index 590e70eab..a52f30603 100644 --- a/startup/init/syscap/include/syscap_ndk.h +++ b/startup/init/syscap/include/syscap_ndk.h @@ -23,7 +23,7 @@ */ /** - * @file deviceinfo.h + * @file syscap_ndk.h * @kit BasicServicesKit * @brief Declares APIs for acquiring the set of system capabilities . * @library NA -- Gitee From 1087ae44b2f6a83a6dbc158e60a29b32d6e2f240 Mon Sep 17 00:00:00 2001 From: peng Date: Tue, 24 Dec 2024 02:56:40 +0000 Subject: [PATCH 295/630] modify comment Signed-off-by: peng --- multimedia/av_codec/native_avcodec_base.h | 2 +- multimedia/av_codec/native_avmuxer.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 547268a0e..07e356e9d 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -978,7 +978,7 @@ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE; extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR; /** - * @brief Key for creation timestamp of a media file, value type is int64_t. + * @brief Key for creation timestamp of a media file, value type is string. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 14 diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h index 553bdae56..a2a3fb8e8 100644 --- a/multimedia/av_codec/native_avmuxer.h +++ b/multimedia/av_codec/native_avmuxer.h @@ -82,9 +82,9 @@ OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation); * @syscap SystemCapability.Multimedia.Media.Muxer * @param muxer Pointer to an OH_AVMuxer instance * @param format OH_AVFormat handle pointer contain format - * @return Returns AV_ERR_OK if the execution is successful, - * otherwise returns a specific error code, refer to {@link OH_AVErrCode} - * {@link AV_ERR_INVALID_VAL}, the muxer or format is invalid. + * @return Returns AV_ERR_OK if the execution is successful + * {@link AV_ERR_INVALID_VAL}, the muxer or format is invalid + * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state * @since 14 */ OH_AVErrCode OH_AVMuxer_SetFormat(OH_AVMuxer *muxer, OH_AVFormat *format); -- Gitee From 804f7aab84a9896cafbf1af5838b844f96b582a7 Mon Sep 17 00:00:00 2001 From: peng Date: Tue, 24 Dec 2024 02:59:21 +0000 Subject: [PATCH 296/630] modify comment Signed-off-by: peng --- multimedia/av_codec/native_avmuxer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h index a2a3fb8e8..559161b19 100644 --- a/multimedia/av_codec/native_avmuxer.h +++ b/multimedia/av_codec/native_avmuxer.h @@ -78,7 +78,7 @@ OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation); /** * @brief Set format to the muxer. - * + * * @syscap SystemCapability.Multimedia.Media.Muxer * @param muxer Pointer to an OH_AVMuxer instance * @param format OH_AVFormat handle pointer contain format -- Gitee From 1530d10cf9fec3f741aa5864ff0ca4e94c7996be Mon Sep 17 00:00:00 2001 From: peng Date: Tue, 24 Dec 2024 03:39:41 +0000 Subject: [PATCH 297/630] modify comment Signed-off-by: peng --- multimedia/av_codec/native_avmuxer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h index 559161b19..d2b5be3e4 100644 --- a/multimedia/av_codec/native_avmuxer.h +++ b/multimedia/av_codec/native_avmuxer.h @@ -78,13 +78,13 @@ OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation); /** * @brief Set format to the muxer. - * + * * @syscap SystemCapability.Multimedia.Media.Muxer * @param muxer Pointer to an OH_AVMuxer instance * @param format OH_AVFormat handle pointer contain format * @return Returns AV_ERR_OK if the execution is successful - * {@link AV_ERR_INVALID_VAL}, the muxer or format is invalid - * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state + * {@link AV_ERR_INVALID_VAL}, the muxer or format is invalid + * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state * @since 14 */ OH_AVErrCode OH_AVMuxer_SetFormat(OH_AVMuxer *muxer, OH_AVFormat *format); -- Gitee From ab168934988a7978f28dc89d1a6200264d275479 Mon Sep 17 00:00:00 2001 From: zhangjinyu101 Date: Tue, 24 Dec 2024 13:32:30 +0800 Subject: [PATCH 298/630] =?UTF-8?q?SDK-C=E6=94=AF=E6=8C=81EdgeEffectOption?= =?UTF-8?q?s=E5=AF=B9=E8=B1=A1=E6=96=B0=E5=A2=9E=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangjinyu101 --- arkui/ace_engine/native/native_node.h | 5 +++++ arkui/ace_engine/native/native_type.h | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f6e7ea1cd..52529f9c9 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4416,12 +4416,17 @@ typedef enum { * .value[1]?.i32: whether to enable the scroll effect when the component content size is smaller than the * component itself. Optional. The value 1 means to enable the scroll effect, and 0 means the * opposite. The default value is 1. \n + * .value[2]?.i32: direction in which the effect takes effect. The parameter type is {@link ArkUI_EffectEdge}. + * The default value is ARKUI_EFFECT_EDGE_START | ARKUI_EFFECT_EDGE_END. This parameter is supported since + * API version 16. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached. * The parameter type is {@link ArkUI_EdgeEffect}. \n * .value[1].i32: whether to enable the scroll effect when the component content size is smaller than the component * itself. Optional. The value 1 means to enable the scroll effect, and 0 means the opposite. \n + * .value[2].i32: edge for which the effect takes effect when the boundary of the scrollable content is reached. + * The parameter type is {@link ArkUI_EffectEdge}. This parameter is supported since API version 16. \n * */ NODE_SCROLL_EDGE_EFFECT, diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 08542a381..1e989e6ab 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -593,6 +593,18 @@ typedef enum { ARKUI_EDGE_EFFECT_NONE, } ArkUI_EdgeEffect; +/** + * @brief Enumerates the edges for which the effect takes effect when the boundary of the scrollable content is reached. + * + * @since 16 + */ +typedef enum { + /** Start edge. */ + ARKUI_EFFECT_EDGE_START = 1, + /** End edge. */ + ARKUI_EFFECT_EDGE_END = 2, +} ArkUI_EffectEdge; + /** * @brief Enumerates the scroll directions for the component. * -- Gitee From 7f7a81fcb4a4b52551abe6de35f42b993568e9bb Mon Sep 17 00:00:00 2001 From: wangxiuxiu Date: Wed, 18 Dec 2024 10:52:41 +0800 Subject: [PATCH 299/630] add mouse cancel Signed-off-by: wangxiuxiu --- arkui/ace_engine/native/native_interface_xcomponent.h | 4 ++++ arkui/ace_engine/native/ui_input_event.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index c06d6cec6..4b1b3c77a 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -151,6 +151,10 @@ typedef enum { OH_NATIVEXCOMPONENT_MOUSE_PRESS, OH_NATIVEXCOMPONENT_MOUSE_RELEASE, OH_NATIVEXCOMPONENT_MOUSE_MOVE, + /** Triggered when the mouse event is canceled. + * @since 16 + */ + OH_NATIVEXCOMPONENT_MOUSE_CANCEL, } OH_NativeXComponent_MouseEventAction; /** diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 85a377f12..0cea62d8e 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -158,6 +158,10 @@ enum { UI_MOUSE_EVENT_ACTION_RELEASE = 2, /** Move. */ UI_MOUSE_EVENT_ACTION_MOVE = 3, + /** Cancel. + * @since 16 + */ + UI_MOUSE_EVENT_ACTION_CANCEL = 13, }; /** -- Gitee From 3c9dd5b0e3e07495a2b5c6832b76b15203d5ab18 Mon Sep 17 00:00:00 2001 From: shilei Date: Wed, 18 Dec 2024 22:29:57 +0800 Subject: [PATCH 300/630] modify napi interface notation Signed-off-by: shilei Change-Id: I82fb77c0f7c68aef83d8467dd0a135de30ebae6e --- arkui/napi/common.h | 2 +- arkui/napi/native_api.h | 937 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 918 insertions(+), 21 deletions(-) diff --git a/arkui/napi/common.h b/arkui/napi/common.h index 6e8ac4aa0..50f8ee327 100644 --- a/arkui/napi/common.h +++ b/arkui/napi/common.h @@ -89,5 +89,5 @@ typedef enum { napi_priority_idle = 3, } napi_task_priority; +/** @} */ #endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ -/** @} */ \ No newline at end of file diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h index b05497312..69d1cd7c3 100644 --- a/arkui/napi/native_api.h +++ b/arkui/napi/native_api.h @@ -94,7 +94,7 @@ extern "C" { /** * @brief Native detach callback of napi_coerce_to_native_binding_object that can be used to - * detach the js object and the native object. + * detach the ArkTS object and the native object. * * @since 11 */ @@ -102,7 +102,7 @@ typedef void* (*napi_native_binding_detach_callback)(napi_env env, void* native_ /** * @brief Native attach callback of napi_coerce_to_native_binding_object that can be used to - * bind the js object and the native object. + * bind the ArkTS object and the native object. * * @since 11 */ @@ -277,7 +277,7 @@ NAPI_EXTERN napi_status node_api_get_module_file_name(napi_env env, const char** result); /** - * @brief Create JSObject with initial properties given by descriptors, note that property key must be String, and + * @brief Create ArkTS Object with initial properties given by descriptors, note that property key must be String, and * must can not convert to element_index, also all keys must not duplicate. * * @param env Current running virtual machine context. @@ -294,8 +294,8 @@ NAPI_EXTERN napi_status napi_create_object_with_properties(napi_env env, const napi_property_descriptor* properties); /** - * @brief Create JSObject with initial properties given by keys and values, note that property key must be String, and - * must can not convert to element_index, also all keys must not duplicate. + * @brief Create ArkTS Object with initial properties given by keys and values, note that property key must be String, + * and must can not convert to element_index, also all keys must not duplicate. * * @param env Current running virtual machine context. * @param result The absolute path of the location of the loaded addon. @@ -313,12 +313,12 @@ NAPI_EXTERN napi_status napi_create_object_with_named_properties(napi_env env, const napi_value* values); /** - * @brief This API sets native properties to a object and converts this js object to native binding object. + * @brief This API sets native properties to a object and converts this ArkTS object to native binding object. * * @param env Current running virtual machine context. * @param js_object The JavaScript value to coerce. - * @param detach_cb Native callback that can be used to detach the js object and the native object. - * @param attach_cb Native callback that can be used to bind the js object and the native object. + * @param detach_cb Native callback that can be used to detach the ArkTS object and the native object. + * @param attach_cb Native callback that can be used to bind the ArkTS object and the native object. * @param native_object User-provided native instance to pass to thr detach callback and attach callback. * @param hint Optional hint to pass to the detach callback and attach callback. * @@ -604,13 +604,13 @@ NAPI_EXTERN napi_status napi_run_event_loop(napi_env env, NAPI_EXTERN napi_status napi_stop_event_loop(napi_env env); /** - * @brief Serialize a JS object. + * @brief Serialize a ArkTS object. * * @param env Current running virtual machine context. - * @param object The JavaScript value to serialize. + * @param object The ArkTS object to serialize. * @param transfer_list List of data to transfer in transfer mode. * @param clone_list List of Sendable data to transfer in clone mode. - * @param result Serialization result of the JS object. + * @param result Serialization result of the ArkTS object. * * @return Returns the function execution status. * @since 12 @@ -678,8 +678,8 @@ NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, napi_value err); /** - * @brief Allows a JS function to be called in the asynchronous context. The capabilities related to 'async_hook' are - * not supported currently. + * @brief Allows a ArkTS function to be called in the asynchronous context. The capabilities related to 'async_hook' + * are not supported currently. * @param env Current running virtual machine context. * @param async_context The context environment for the async operation. * @param recv The 'this' pointer of the function. @@ -700,13 +700,16 @@ NAPI_EXTERN napi_status napi_make_callback(napi_env env, napi_value* result); /** - * @brief Creates a ArkTS buffer of the specified size. - * @param env Current running virtual machine context. - * @param length The size of the buffer to be created. - * @param data Raw pointer of the ArkTS buffer. - * @param result Result returned by the ArkTS function. + * @brief Creates an ArkTS ArrayBuffer object of the specified size. * + * @param env Current running virtual machine context. + * @param length Bytes size of the underlying arraybuffer. + * @param data Raw pointer to the underlying arraybuffer. + * @param result Created ArkTS ArrayBuffer object. * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, data or result is nullptr, or length is larger than 2097152, + * or length is less than zero.\n * @since 10 */ NAPI_EXTERN napi_status napi_create_buffer(napi_env env, @@ -714,9 +717,903 @@ NAPI_EXTERN napi_status napi_create_buffer(napi_env env, void** data, napi_value* result); +/** + * @brief Creates a deferred object and an ArkTS promise. + * @param env Current running virtual machine context. + * @param deferred The created deferred object which will be passed to 'napi_resolve_deferred()' or + * 'napi_reject_deferred()' to resolve or reject the promise. + * @param promise The ArkTS promise which is associated with the deferred object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, deferred or resolution is nullptr.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * {@link napi_generic_failure } If create promise failed.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_promise(napi_env env, + napi_deferred* deferred, + napi_value* promise); + +/** + * @brief Resolves a promise by way of the deferred object associated. + * @param env Current running virtual machine context. + * @param deferred The deferred object which is utilized to resolve the promise. + * @param resolution The resolution value used to resolve the promise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, deferred or resolution is nullptr.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_resolve_deferred(napi_env env, + napi_deferred deferred, + napi_value resolution); + +/** + * @brief Rejects a promise by way of the deferred object associated. + * @param env Current running virtual machine context. + * @param deferred The deferred object which is utilized to reject the promise. + * @param rejection The rejection value used to reject the promise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, deferred or rejection is nullptr.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_reject_deferred(napi_env env, + napi_deferred deferred, + napi_value rejection); + +/** + * @brief Checks whether the given 'napi_value' is a promise object. + * @param env Current running virtual machine context. + * @param value The 'napi_value' to be checked. + * @param is_promise Boolean value that is set to true if the 'value' is a promise object, false otherwise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or is_promise is nullptr.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_is_promise(napi_env env, + napi_value value, + bool* is_promise); + +/** + * @brief Obtains the current libuv loop instance. + * @param env Current running virtual machine context. + * @param loop Libuv event loop. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or loop is nullptr.\n + * {@link napi_generic_failure } If env is invalid.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env, + struct uv_loop_s** loop); + +/** + * @brief Creates a thread-safe function. + * @param env Current running virtual machine context. + * @param func ArkTS function to be called. + * @param async_resource An optional Object associated with the async work that will be passed to possible + * 'async_hooks'. + * @param async_resource_name An ArkTS string to provide an identifier for the kind of resource that is being + * provided for diagnostic information exposed by the `async_hooks` interface. + * @param max_queue_size Maximum size of the event queue in the thread-safe function. + * @param initial_thread_count Initial thread count of the thread-safe function. + * @param thread_finalize_data Data passed to the finalize callback. + * @param thread_finalize_cb Finalize callback function which will be triggered when the thread-safe function is + * released. + * @param context Optional data is passed to 'call_js_cb'. + * @param call_js_cb Callback function which will be triggered after 'napi_call_threadsafe_function()' is called. + * @param result The created thread-safe function. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, async_resource_name or result is nullptr; max_queue_size is less than 0;\n + * initial_thread_count is greater than 128 or less than 0; func and call_js_cb are\n + * nullptr at same time.\n + * {@link napi_generic_failure } If create thread-safe function failed.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_threadsafe_function(napi_env env, + napi_value func, + napi_value async_resource, + napi_value async_resource_name, + size_t max_queue_size, + size_t initial_thread_count, + void* thread_finalize_data, + napi_finalize thread_finalize_cb, + void* context, + napi_threadsafe_function_call_js call_js_cb, + napi_threadsafe_function* result); + +/** + * @brief Obtains the context of a thread-safe function. + * @param func The created thread-safe function. + * @param result Pointer pointer to the context of the thread-safe function. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If func or result is nullptr.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_threadsafe_function_context(napi_threadsafe_function func, + void** result); + +/** + * @brief Calls a thread-safe function. + * @param func The created thread-safe function. + * @param data Data passed to the callback function 'call_js_cb' which is registered by calling + * 'napi_create_threadsafe_function()'. + * @param is_blocking If true, this function blocks until the event queue is not full. If false, return directly. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If func is nullptr.\n + * {@link napi_queue_full } If event queue is full.\n + * {@link napi_closing } If the thread-safe function is closing.\n + * {@link napi_generic_failure } If call thread-safe function failed.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_call_threadsafe_function(napi_threadsafe_function func, + void* data, + napi_threadsafe_function_call_mode is_blocking); + +/** + * @brief Acquires a thread-safe function. + * @param func The created thread-safe function. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If func is nullptr.\n + * {@link napi_generic_failure } If acquire thread-safe function failed.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_acquire_threadsafe_function(napi_threadsafe_function func); + +/** + * @brief Releases a thread-safe function. + * @param func The created thread-safe function. + * @param mode Value of mode can be either 'napi_tsfn_release' to indicate that no more calls should be made + * to the thread-safe function from current thread or 'napi_tsfn_abort' to indicate that the queue + * of the thread-safe function will be closed and 'napi_closing' will be return when calling + * 'napi_call_threadsafe_function()' under the circumstance. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If func is nullptr.\n + * {@link napi_generic_failure } If release thread-safe function failed.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_release_threadsafe_function(napi_threadsafe_function func, + napi_threadsafe_function_release_mode mode); + +/** + * @brief Indicates that the event loop running on the main thread may exit before the thread-safe function + * is destroyed. + * @param env Current running virtual machine context. + * @param func The created thread-safe function. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or func is nullptr.\n + * {@link napi_generic_failure } If unref thread-safe function failed.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_unref_threadsafe_function(napi_env env, + napi_threadsafe_function func); + +/** + * @brief Indicates that the event loop running on the main thread should not exit until the thread-safe + * function is destroyed. + * @param env Current running virtual machine context. + * @param func The created thread-safe function. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or func is nullptr.\n + * {@link napi_generic_failure } If ref thread-safe function failed.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_ref_threadsafe_function(napi_env env, + napi_threadsafe_function func); + +/** + * @brief Creates an ArkTS 'Date' object from C double data + * @param env Current running virtual machine context. + * @param time ArkTS time value in milliseconds format since 01 January, 1970 UTC. + * @param result Created ArkTS data object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_date(napi_env env, + double time, + napi_value* result); + +/** + * @brief Checks whether the given ArkTS value is a 'Date' object. You can use this API to check the type + * of the parameter passed from ArkTS. + * @param env Current running virtual machine context. + * @param value ArkTS data object. + * @param is_date Boolean value that is set to true if the 'value' is a 'Date' object, false otherwise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or is_date is nullptr.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_is_date(napi_env env, + napi_value value, + bool* is_date); + +/** + * @brief Obtains the C equivalent of the given ArkTS 'Date' object. + * + * @param env Current running virtual machine context. + * @param value ArkTS data object. + * @param result C time value in milliseconds format since 01 January, 1970 UTC. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or result is nullptr.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * {@link napi_date_expected } If the 'value' is not a 'Date' object.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_date_value(napi_env env, + napi_value value, + double* result); + +/** + * @brief Creates a ArkTS BigInt from C int64 data. + * + * @param env Current running virtual machine context. + * @param value C int64 data. + * @param result Created ArkTS BigInt object from C int64 data. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_bigint_int64(napi_env env, + int64_t value, + napi_value* result); + +/** + * @brief Creates a ArkTS BigInt from C int64 data. + * + * @param env Current running virtual machine context. + * @param value C int64 data. + * @param result Created ArkTS BigInt object from C int64 data. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_bigint_uint64(napi_env env, + uint64_t value, + napi_value* result); + +/** + * @brief Creates a single ArkTS BigInt from a C uint64 array. + * + * @param env Current running virtual machine context. + * @param sign_bit Sign bit of the BigInt. If sign_bit is 0, the BigInt is positive, otherwise it is negative. + * @param word_count The size of the words array. + * @param words C uint64 array in little-endian 64-bit format. + * @param result Created ArkTS BigInt object from C int64 array. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, words or result is nullptr or word_count is larger than 2147483647.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_bigint_words(napi_env env, + int sign_bit, + size_t word_count, + const uint64_t* words, + napi_value* result); + +/** + * @brief Obtains a signed 64-bit integer from an ArkTS BigInt object. + * + * @param env Current running virtual machine context. + * @param value ArkTS BigInt object. + * @param result Pointer points to the location where store the C signed 64-bit integer value. + * @param lossless Indicates whether the conversion is lossless. If lossless is true, the conversion is lossless, + * false otherwise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value, result or lossless is nullptr or word_count is larger than\n + * 2147483647.\n + * {@link napi_bigint_expected } If the 'value' is not an ArkTS bigint object.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_value_bigint_int64(napi_env env, + napi_value value, + int64_t* result, + bool* lossless); + +/** + * @brief Obtains an unsigned 64-bit integer from an ArkTS BigInt object. + * + * @param env Current running virtual machine context. + * @param value ArkTS BigInt object. + * @param result Pointer points to the location where store the C unsigned 64-bit integer value. + * @param lossless Indicates whether the conversion is lossless. If lossless is true, the conversion is lossless, + * false otherwise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value, result or lossless is nullptr or word_count is larger than\n + * 2147483647.\n + * {@link napi_bigint_expected } If the 'value' is not an ArkTS bigint object.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_value_bigint_uint64(napi_env env, + napi_value value, + uint64_t* result, + bool* lossless); + +/** + * @brief Obtains the underlying 64-bit unsigned (uint64) byte data from an ArkTS BigInt object. + * + * @param env Current running virtual machine context. + * @param value ArkTS BigInt object. + * @param sign_bit Sign bit of the BigInt. If sign_bit is 0, the BigInt is positive, otherwise it is negative. + * @param word_count The size of the words array. + * @param words C uint64 array in little-endian 64-bit format. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or word_count is nullptr or word_count is larger than 2147483647.\n + * {@link napi_bigint_expected } If the 'value' is not an ArkTS bigint object.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_value_bigint_words(napi_env env, + napi_value value, + int* sign_bit, + size_t* word_count, + uint64_t* words); + +/** + * @brief Creates an ArkTS ArrayBuffer object of the specified size and initializes it with the given data. + * + * @param env Current running virtual machine context.n + * @param length Bytes size of the given data. + * @param data Given data. + * @param finalize_cb Optional native callback that can be used to free the given data when the ArkTS ArrayBuffer + * object has been garbage-collected. + * @param finalize_hint Optional contextual hint that is passed to the finalize callback. + * @param result Created ArkTS ArrayBuffer object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, data or result is nullptr, or length is larger than 2097152, + * or length is less than or equal to zero.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env, + size_t length, + void* data, + napi_finalize finalize_cb, + void* finalize_hint, + napi_value* result); + +/** + * @brief Creates an ArkTS ArrayBuffer object of the specified size and initializes it with the given data. + * + * @param env Current running virtual machine context. + * @param length Bytes size of the given data. + * @param data Given data. + * @param result_data Raw pointer to the underlying arraybuffer. + * @param result Created ArkTS ArrayBuffer object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, data or result is nullptr, or length is larger than 2097152, + * or length is less than or equal to zero.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env, + size_t length, + const void* data, + void** result_data, + napi_value* result); + +/** + * @brief Checks whether the given ArkTS value is a 'ArrayBuffer' object. + * + * @param env Current running virtual machine context. + * @param value ArkTS ArrayBuffer object. + * @param result Boolean value that is set to true if the 'value' is a 'ArrayBuffer' object, false otherwise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or result is nullptr.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_is_buffer(napi_env env, + napi_value value, + bool* result); + +/** + * @brief Obtains the underlying data of 'ArrayBuffer' and its length. + * + * @param env Current running virtual machine context. + * @param value ArkTS ArrayBuffer object. + * @param data Raw pointer to the underlying arraybuffer. + * @param length Bytes size of the underlying arraybuffer. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or result is nullptr.\n + * {@link napi_arraybuffer_expected } If the 'value' is not an ArkTS array buffer object.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env, + napi_value value, + void** data, + size_t* length); + +/** + * @brief Freezes an ArkTS object. Once an object is frozen, its properties are immutable. + * + * @param env Current running virtual machine context. + * @param object The given ArkTS object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or object is nullptr.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_object_freeze(napi_env env, + napi_value object); + +/** + * @brief Seals an ArkTS object. Once an object is sealed, its properties cannot be added or deleted, but property + * values can be modified. + * + * @param env Current running virtual machine context. + * @param object The given ArkTS object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or object is nullptr.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_object_seal(napi_env env, + napi_value object); + +/** + * @brief Detaches the underlying data from an 'ArrayBuffer' object. After the data is detached, you + * can operate the data in C/C++. + * + * @param env Current running virtual machine context. + * @param arraybuffer ArkTS ArrayBuffer object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or arraybuffer is nullptr, if 'arraybuffer' is not an ArrayBuffer object.\n + * {@link napi_object_expected } If the 'arraybuffer' is not an ArkTS object.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_detach_arraybuffer(napi_env env, + napi_value arraybuffer); + +/** + * @brief Checks whether the given 'ArrayBuffer' has been detached. + * + * @param env Current running virtual machine context. + * @param value ArkTS ArrayBuffer object. + * @param result Boolean value that is set to true if the 'value' has been detached, false otherwise. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or result is nullptr.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_is_detached_arraybuffer(napi_env env, + napi_value value, + bool* result); + +/** + * @brief Obtains the names of all properties of an ArkTS object. + * + * @param env Current running virtual machine context. + * @param object ArkTS object. + * @param key_mode Key collection mode. If key_mode is napi_key_include_prototypes, the result includes properties on + * prototypes. If key_mode is napi_key_own_only, the result includes only properties directly on own + * object. + * @param key_filter Which properties to be collected. + * @param key_conversion Key conversion mode. If key_conversion is napi_key_keep_numbers, the numbered property keys + * will keep number type. If key_conversion is napi_key_numbers_to_strings, the numbered property + * keys will be convert to string type. + * @param result An array of ArkTS object that represent the property names of the object. + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, object or result is nullptr;\n + * key_mode is not enumeration value of napi_key_collection_mode;\n + * key_conversion is not enumeration value of napi_key_conversion.\n + * {@link napi_pending_exception } If a ArkTS exception existed when the function was called.\n + * {@link napi_object_expected } If object is not object type and function type.\n + * @since 10 + */ +NAPI_EXTERN napi_status napi_get_all_property_names(napi_env env, + napi_value object, + napi_key_collection_mode key_mode, + napi_key_filter key_filter, + napi_key_conversion key_conversion, + napi_value* result); + +/** + * @brief Registers a native module. + * + * @param mod Native module of type 'napi_module' to be registered. + * @since 10 +*/ +NAPI_EXTERN void napi_module_register(napi_module* mod); + +/** + * @brief Obtains the napi_extended_error_info struct, which contains the latest error information. + * + * @param env Current running virtual machine context. + * @param result The error info about the error. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_get_last_error_info(napi_env env, + const napi_extended_error_info** result); + +/** + * @brief Throws a ArkTS error. + * @param env Current running virtual machine context. + * @param error The ArkTS error to be thrown. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or error is nullptr, or error is not an error object.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error); + +/** + * @brief Throws a ArkTS Error with text information. + * @param env Current running virtual machine context. + * @param code Optional error code to set on the error. + * @param msg C string representing the text to be associated with the error. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or msg is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_throw_error(napi_env env, + const char* code, + const char* msg); + +/** + * @brief Throws a ArkTS TypeError with text information. + * @param env Current running virtual machine context. + * @param code Optional error code to set on the error. + * @param msg C string representing the text to be associated with the error. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or msg is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, + const char* code, + const char* msg); + +/** + * @brief Throws a ArkTS RangeError with text information. + * @param env Current running virtual machine context. + * @param code Optional error code to set on the error. + * @param msg C string representing the text to be associated with the error. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or msg is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, + const char* code, + const char* msg); + +/** + * @brief Checks whether a 'napi_value' is an error object. + * @param env Current running virtual machine context. + * @param value The value to check + * @param result Boolean value that is set to true if the value represents an error object, false otherwise. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_is_error(napi_env env, + napi_value value, + bool* result); + +/** + * @brief Creates a ArkTS Error with text information. + * @param env Current running virtual machine context. + * @param code Optional error code to set on the error. + * @param msg napi_value representing the EcmaScript string to be associated with the error. + * @param result napi_value representing the error created. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, msg or result is nullptr, code is not string and number type or msg is + * not a string type.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_create_error(napi_env env, + napi_value code, + napi_value msg, + napi_value* result); + +/** + * @brief Creates a ArkTS TypeError with text information. + * @param env Current running virtual machine context. + * @param code Optional error code to set on the error. + * @param msg napi_value representing the EcmaScript string to be associated with the error. + * @param result napi_value representing the error created. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, msg or result is nullptr, code is not string and number type or msg is + * not a string type.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_create_type_error(napi_env env, + napi_value code, + napi_value msg, + napi_value* result); + +/** + * @brief Creates a ArkTS RangeError with text information. + * @param env Current running virtual machine context. + * @param code Optional error code to set on the error. + * @param msg napi_value representing the EcmaScript string to be associated with the error. + * @param result napi_value representing the error created. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, msg or result is nullptr, code is not string and number type or msg is + * not a string type.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_create_range_error(napi_env env, + napi_value code, + napi_value msg, + napi_value* result); + +/** + * @brief Checks whether an exception occurs. + * @param env Current running virtual machine context. + * @param result Boolean value that is true if there is a pending exception. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result); + +/** + * @brief Obtains and clears the latest exception. + * @param env Current running virtual machine context. + * @param result The exception if there is a pending exception; otherwise return a null value. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env, + napi_value* result); + +/** + * @brief Raises a fatal error to terminate the process immediately. + * @param location Optional location for the error occurrence. + * @param location_len The byte length of the location, or NAPI_AUTO_LENGTH if it is terminated by a null character. + * @param message The message associated with the error. + * @param message_len The byte length of the message, or NAPI_AUTO_LENGTH if it is terminated by a null character. + * + * @since 10 +*/ +NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location, + size_t location_len, + const char* message, + size_t message_len); + +/** + * @brief Opens a scope. + * @param env Current running virtual machine context. + * @param result napi_value representing the new scope. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env, + napi_handle_scope* result); + +/** + * @brief Closes the scope passed in. After the scope is closed, all references declared in it are closed. + * @param env Current running virtual machine context. + * @param scope The scope to close. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or scope is nullptr.\n + * {@link napi_handle_scope_mismatch } If there is no scope still existed.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env, + napi_handle_scope scope); + +/** + * @brief Opens an escapable handle scope from which the declared values can be returned to the outer scope. + * @param env Current running virtual machine context. + * @param result The new scope. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_open_escapable_handle_scope(napi_env env, + napi_escapable_handle_scope* result); + +/** + * @brief Closes the escapable handle scope passed in. + * @param env Current running virtual machine context. + * @param scope The scope to close. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or scope is nullptr.\n + * {@link napi_handle_scope_mismatch } If there is no scope still existed.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_close_escapable_handle_scope(napi_env env, + napi_escapable_handle_scope scope); + +/** + * @brief Promotes the handle to the input ArkTS object so that it is valid for the lifespan of its outer scope. + * @param env Current running virtual machine context. + * @param scope Current scope. + * @param escapee The ArkTS object to be escaped. + * @param result The handle to the escaped object in the outer scope. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, scope, escapee or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_escape_handle(napi_env env, + napi_escapable_handle_scope scope, + napi_value escapee, + napi_value* result); + +/** + * @brief Creates a reference for an object to extend its lifespan. The caller needs to manage the reference lifespan. + * @param env Current running virtual machine context. + * @param value The napi_value that is being referenced. + * @param initial_refcount The initial count for the new reference. + * @param result napi_ref pointing to the new reference. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, value or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_create_reference(napi_env env, + napi_value value, + uint32_t initial_refcount, + napi_ref* result); + +/** + * @brief Deletes the reference passed in. + * @param env Current running virtual machine context. + * @param ref The napi_ref to be deleted. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or ref is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref); + +/** + * @brief Increments the reference count for the reference passed in and returns the count. + * @param env Current running virtual machine context. + * @param ref The napi_ref whose reference count will be incremented. + * @param result The new reference count. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or ref is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_reference_ref(napi_env env, + napi_ref ref, + uint32_t* result); + +/** + * @brief Decrements the reference count for the reference passed in and returns the count. + * @param env Current running virtual machine context. + * @param ref The napi_ref whose reference count will be decremented. + * @param result The new reference count. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env or ref is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_reference_unref(napi_env env, + napi_ref ref, + uint32_t* result); + +/** + * @brief Obtains the ArkTS Object associated with the reference. + * @param env Current running virtual machine context. + * @param ref The napi_ref of the value being requested. + * @param result The napi_value referenced by the napi_ref. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If env, ref or result is nullptr.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_get_reference_value(napi_env env, + napi_ref ref, + napi_value* result); + +/** + * @brief Check if the given ArkTS Object has the named own property or not. + * @param env Current running virtual machine context. + * @param object The ArkTS object. + * @param key The name of the property to check. + * @param result Whether the own property exists on the object or not. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If the param env, object, key and(or) result is nullptr.\n + * {@link napi_object_expected } If the param object is not an ArkTS Object.\n + * {@link napi_pending_exception } If have uncaught exception, or exception occurs in execution.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_has_own_property(napi_env env, + napi_value object, + napi_value key, + bool* result); + +/** + * @brief Defines an ArkTS class, including constructor function and properties. + * @param env Current running virtual machine context. + * @param utf8name Name of the ArkTS constructor function. + * @param length The length of the utf8name in bytes, or NAPI_AUTO_LENGTH if it is null-terminated. + * @param constructor Callback function that handles constructing instances of the class. + * @param data Optional data to be passed to the constructor callback as the data property of the callback info. + * @param property_count Number of items in the properties array argument. + * @param properties Array of property descriptors. + * @param result A napi_value representing the constructor function for the class. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n execution.\n + * {@link napi_invalid_arg } If the param env, utf8name and(or) result is nullptr. If napi_property_descriptor + * is nullptr but property_count greater than 0.\n + * {@link napi_function_expected } If the param func is not an ArkTS Function.\n + * {@link napi_pending_exception } If have uncaught exception, or exception occurs in execution.\n + * @since 10 +*/ +NAPI_EXTERN napi_status napi_define_class(napi_env env, + const char* utf8name, + size_t length, + napi_callback constructor, + void* data, + size_t property_count, + const napi_property_descriptor* properties, + napi_value* result); #ifdef __cplusplus } #endif - +/** @} */ #endif /* FOUNDATION_ACE_NAPI_INTERFACES_KITS_NAPI_NATIVE_API_H */ -/** @} */ \ No newline at end of file -- Gitee From 434e029dffb166435b3fc87bbe77cc900c4862cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E7=82=9C=E5=B3=B0?= Date: Tue, 24 Dec 2024 15:38:39 +0800 Subject: [PATCH 301/630] add pcm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 董炜峰 --- .../libnative_media_codecbase.ndk.json | 8 ++++---- multimedia/av_codec/native_avcodec_base.h | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index bdbf37e1c..f97fce20a 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -59,10 +59,6 @@ "first_introduced": "11", "name": "OH_AVCODEC_MIMETYPE_AUDIO_G711MU" }, - { - "first_introduced": "14", - "name": "OH_AVCODEC_MIMETYPE_AUDIO_PCM" - }, { "first_introduced": "12", "name": "OH_AVCODEC_MIMETYPE_AUDIO_APE" @@ -79,6 +75,10 @@ "first_introduced": "12", "name": "OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT" }, + { + "first_introduced": "14", + "name": "OH_AVCODEC_MIMETYPE_AUDIO_PCM" + }, { "first_introduced": "9", "name": "OH_ED_KEY_TIME_STAMP" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index d437bc5f6..8cba8b2dc 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -323,14 +323,6 @@ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_OPUS; */ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_G711MU; -/** - * @brief Enumerates the mime types of audio pcm codec. - * - * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 14 - */ -extern const char *OH_AVCODEC_MIMETYPE_AUDIO_PCM; - /** * @brief Enumerates the mime type of audio ape codec. * @@ -363,6 +355,14 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_SRT; */ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; +/** + * @brief Enumerates the mime types of audio pcm codec. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 14 + */ +extern const char *OH_AVCODEC_MIMETYPE_AUDIO_PCM; + /** * @brief Key for timeStamp in surface's extraData, value type is int64_t. * -- Gitee From 746cc66e7c655219d7085e2b1d0362e5ef38b699 Mon Sep 17 00:00:00 2001 From: AnBetter Date: Tue, 24 Dec 2024 17:21:36 +0800 Subject: [PATCH 302/630] =?UTF-8?q?progress=E7=BA=BF=E6=80=A7=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=B3=A8=E9=87=8A=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AnBetter --- arkui/ace_engine/native/native_node.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f6e7ea1cd..f1bd97fba 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3398,6 +3398,7 @@ typedef enum { /** * @brief Sets the style of the linear progress indicator. * This attribute can be set, reset, and obtained as required through APIs. + * If the progress indicator type is not linear, it will not take effect. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .object: Use the {@link ArkUI_ProgressLinearStyleOption} object to set the style. \n -- Gitee From 50c420ca78fcdc3122e3e9380f29bfa7478b3b05 Mon Sep 17 00:00:00 2001 From: wangtao Date: Thu, 19 Dec 2024 15:34:59 +0800 Subject: [PATCH 303/630] add new NODE_IMMUTABLE_FONT_WEIGHT Signed-off-by: wangtao Change-Id: I1b6e2c16dfdeb6f46ff78c11bef91ed406b14e2c --- arkui/ace_engine/native/native_node.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f6e7ea1cd..b6e8fd6bf 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2217,6 +2217,21 @@ typedef enum { */ NODE_TEXT_HALF_LEADING = 1029, + /** + * @brief Defines the font weight attribute, which can be set, reset, and obtained as required through APIs. + * The font weight set through this interface does not support adaptive adjustment. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: font weight {@link ArkUI_FontWeight}. The default value is ARKUI_FONT_WEIGHT_NORMAL.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: font weight {@link ArkUI_FontWeight}.\n + + * @since 16 + * + */ + NODE_IMMUTABLE_FONT_WEIGHT = 1030, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * -- Gitee From b926e650e83598cb740794f10e3ab2e4e733f8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=86=AC=E5=86=AC=E5=86=AC?= Date: Tue, 24 Dec 2024 19:21:39 +0800 Subject: [PATCH 304/630] Message:fixCodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑冬冬冬 --- .../hiappevent/include/hiappevent/hiappevent_event.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h index bfcad3409..6ae0c342a 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h @@ -152,6 +152,14 @@ extern "C" { */ #define EVENT_MAIN_THREAD_JANK "MAIN_THREAD_JANK" +/** + * @brief app hicollie event. + * + * @since 16 + * @version 1.0 + */ +#define EVENT_APP_HICOLLIE "APP_HICOLLIE" + /** * @brief OS domain. * -- Gitee From b3a010e41a2a76c2bf02fca823a4221c73a0eabc Mon Sep 17 00:00:00 2001 From: AnBetter Date: Mon, 23 Dec 2024 20:58:06 +0800 Subject: [PATCH 305/630] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AnBetter --- arkui/ace_engine/native/native_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 08542a381..8d0fbd78b 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -4020,7 +4020,7 @@ int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle); *
If the result returns nullptr, there may be out of memory. * @since 16 */ -ArkUI_ProgressLinearStyleOption* OH_ArkUI_ProgressLinearStyleOption_Create(); +ArkUI_ProgressLinearStyleOption* OH_ArkUI_ProgressLinearStyleOption_Create(void); /** * @brief Destroy linear progress indicator style information. -- Gitee From c5a28f28c4c0e29f74df330223508f4c1ea7910c Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Mon, 16 Dec 2024 17:52:38 +0800 Subject: [PATCH 306/630] =?UTF-8?q?TextInput/TextArea=E6=94=AF=E6=8C=81hal?= =?UTF-8?q?fLeading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiuxiu96 --- arkui/ace_engine/native/native_node.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 6a60ecb13..804b7bf14 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3013,6 +3013,19 @@ typedef enum { */ NODE_TEXT_INPUT_ENABLE_PREVIEW_TEXT = 7033, + /** + * @brief Sets whether to center text vertically in the textInput 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 false. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to center text vertically. \n + * + * @since 16 + */ + NODE_TEXT_INPUT_HALF_LEADING = 7034, + /** * @brief Defines the default placeholder text for the multi-line text box. * This attribute can be set, reset, and obtained as required through APIs. @@ -3335,6 +3348,19 @@ typedef enum { */ NODE_TEXT_AREA_ENABLE_PREVIEW_TEXT = 8024, + /** + * @brief Sets whether to center text vertically in the textArea 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 false. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to center text vertically. \n + * + * @since 16 + */ + NODE_TEXT_AREA_HALF_LEADING = 8025, + /** * @brief Defines the button text content. This attribute can be set, reset, and obtained as required through APIs. * -- Gitee From 70ed7b7c74cd021849c2955f64b9886190901d76 Mon Sep 17 00:00:00 2001 From: wangtao Date: Wed, 25 Dec 2024 09:28:26 +0800 Subject: [PATCH 307/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20NODE=5FIMMUTABLE?= =?UTF-8?q?=5FFONT=5FWEIGHT=20=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangtao Change-Id: Id0a6c2340a8586307aa8faf772465ae568d78739 --- arkui/ace_engine/native/native_node.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 6a60ecb13..735757dea 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2219,16 +2219,15 @@ typedef enum { /** * @brief Defines the font weight attribute, which can be set, reset, and obtained as required through APIs. - * The font weight set through this interface does not support adaptive adjustment. + * The font weight specified by this API is not affected by any changes in the system font weight settings. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .value[0].i32: font weight {@link ArkUI_FontWeight}. The default value is ARKUI_FONT_WEIGHT_NORMAL.\n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: font weight {@link ArkUI_FontWeight}.\n - - * @since 16 * + * @since 16 */ NODE_IMMUTABLE_FONT_WEIGHT = 1030, -- Gitee From 52b901e06e638502ff05f537eb43673ef22220cb Mon Sep 17 00:00:00 2001 From: zoulinken Date: Tue, 24 Dec 2024 20:32:59 +0800 Subject: [PATCH 308/630] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E8=8A=82=E7=82=B9id=E8=8E=B7=E5=8F=96=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/native_node.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ca090d8b7..024b8be06 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1347,6 +1347,10 @@ "first_introduced": "14", "name": "OH_ArkUI_ActiveChildrenInfo_GetCount" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_GetAttachedNodeHandleById" + }, { "first_introduced": "12", "name": "OH_ArkUI_ListChildrenMainSizeOption_Create" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 6a60ecb13..c5c77065d 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8133,6 +8133,20 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale(const ArkUI_SystemFontStyle */ float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontStyleEvent* event); +/** + * @brief Get the node handle by id. This interface only works on the main thread. + * + * @param id The id of the target node handle. + * @param node The handle of target node handle. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * {@link ARKUI_ERROR_CODE_UI_CONTEXT_INVALID} if the uiContext is invalid. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node); + #ifdef __cplusplus }; #endif -- Gitee From 54a68c92754bffa99d9df368090ba76fa44fc7f7 Mon Sep 17 00:00:00 2001 From: Tintin9529 Date: Wed, 25 Dec 2024 13:41:39 +0800 Subject: [PATCH 309/630] =?UTF-8?q?TextPicker=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=A3=B0=E6=8C=AF=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tintin9529 --- arkui/ace_engine/native/native_node.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 07f56e7da..dfcd5ae7f 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3895,6 +3895,20 @@ typedef enum { * */ NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT, + /** + * @brief Defines whether haptic feedback. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to feedback. The value true means to feedback, and + * false means the opposite.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: whether to feedback.\n + * + * @since 16 + */ + NODE_TEXT_PICKER_ENABLE_HAPTIC_FEEDBACK = 15010, /** * @brief Defines the style of the background in the selected state of the calendar picker. * This attribute can be set, reset, and obtained as required through APIs. -- Gitee From c5019b83a09963a7cb0b089dc34f9d58a1202d85 Mon Sep 17 00:00:00 2001 From: wangxiuxiu Date: Wed, 25 Dec 2024 10:15:50 +0800 Subject: [PATCH 310/630] change getPressedKeys note Signed-off-by: wangxiuxiu --- arkui/ace_engine/native/ui_input_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 1a32d70c3..b45e8b3e8 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -750,7 +750,7 @@ int32_t OH_ArkUI_PointerEvent_SetStopPropagation(const ArkUI_UIInputEvent* event int32_t OH_ArkUI_UIInputEvent_GetDeviceId(const ArkUI_UIInputEvent* event); /** - * @brief Obtains all keys that are pressed from UI input event. + * @brief Obtains all keys that are pressed from UI input event. Only supports key events currently. * * @param event Pointer to an ArkUI_UIInputEvent object. * @param pressedKeyCodes Array of all keys that are pressed. You need to allocate the memory space. -- Gitee From 53d8e8deaf0b3dd2bc7c0b206fbd6f15aa6bfaef Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 25 Dec 2024 20:03:21 +0800 Subject: [PATCH 311/630] api14to16 Signed-off-by: liumingxiang --- .../graphic_2d/native_drawing/drawing_font.h | 6 +- .../graphic_2d/native_drawing/drawing_rect.h | 8 +- .../native_drawing/drawing_text_declaration.h | 8 +- .../drawing_text_font_descriptor.h | 4 +- .../native_drawing/drawing_text_line.h | 38 +++--- .../drawing_text_lineTypography.h | 8 +- .../native_drawing/drawing_text_run.h | 30 ++--- .../native_drawing/drawing_text_typography.h | 16 +-- .../graphic_2d/native_drawing/drawing_types.h | 2 +- .../native_drawing/libnative_drawing.ndk.json | 108 +++++++++--------- 10 files changed, 114 insertions(+), 114 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index df5d11398..f7e6311de 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -509,7 +509,7 @@ float OH_Drawing_FontGetMetrics(OH_Drawing_Font* font, OH_Drawing_Font_Metrics* * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs * and bounds is nullptr or count is 0. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontGetBounds(const OH_Drawing_Font* font, const uint16_t* glyphs, uint32_t count, @@ -526,7 +526,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetBounds(const OH_Drawing_Font* font, const * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, path * is nullptr or glyph not exist. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, uint16_t glyph, @@ -547,7 +547,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text or path is nullptr. - * @since 14 + * @since 16 */ OH_Drawing_ErrorCode OH_Drawing_FontGetTextPath(const OH_Drawing_Font* font, const void* text, size_t byteLength, OH_Drawing_TextEncoding encoding, float x, float y, OH_Drawing_Path* path); diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h index ce02692a2..ecabab963 100644 --- a/graphic/graphic_2d/native_drawing/drawing_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_rect.h @@ -225,7 +225,7 @@ void OH_Drawing_RectDestroy(OH_Drawing_Rect* rect); * If nullptr is returned, the creation fails. * The possible cause of the failure is that the available memory is empty, * or size is invalid. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_Array* OH_Drawing_RectCreateArray(size_t size); @@ -239,7 +239,7 @@ OH_Drawing_Array* OH_Drawing_RectCreateArray(size_t size); * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or pSize is nullptr. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_RectGetArraySize(OH_Drawing_Array* rectArray, size_t* pSize); @@ -255,7 +255,7 @@ OH_Drawing_ErrorCode OH_Drawing_RectGetArraySize(OH_Drawing_Array* rectArray, si * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or rect is nullptr, * or index is valid. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_RectGetArrayElement(OH_Drawing_Array* rectArray, size_t index, @@ -269,7 +269,7 @@ OH_Drawing_ErrorCode OH_Drawing_RectGetArrayElement(OH_Drawing_Array* rectArray, * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray is nullptr. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_RectDestroyArray(OH_Drawing_Array* rectArray); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h index 505001519..f9650a951 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h @@ -63,7 +63,7 @@ typedef struct OH_Drawing_Typography OH_Drawing_Typography; /** * @brief Defines an OH_Drawing_LineTypography, which is used to perform line layout. * - * @since 14 + * @since 16 * @version 1.0 */ typedef struct OH_Drawing_LineTypography OH_Drawing_LineTypography; @@ -136,7 +136,7 @@ typedef struct OH_Drawing_TextShadow OH_Drawing_TextShadow; /** * @brief Defines an OH_Drawing_TextTab, which is used to to store the tab alignment type and position. * - * @since 14 + * @since 16 * @version 1.0 */ typedef struct OH_Drawing_TextTab OH_Drawing_TextTab; @@ -144,7 +144,7 @@ typedef struct OH_Drawing_TextTab OH_Drawing_TextTab; /** * @brief Defines an OH_Drawing_TextLine, which is used to manage text line. * - * @since 14 + * @since 16 * @version 1.0 */ typedef struct OH_Drawing_TextLine OH_Drawing_TextLine; @@ -152,7 +152,7 @@ typedef struct OH_Drawing_TextLine OH_Drawing_TextLine; /** * @brief Defines an OH_Drawing_Run, which is used to manage run. * - * @since 14 + * @since 16 * @version 1.0 */ typedef struct OH_Drawing_Run OH_Drawing_Run; diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 4ba3ee2e6..23f25a213 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -78,7 +78,7 @@ typedef enum { * @param num Indicates the count of obtained OH_Drawing_FontDescriptor. * @return Returns an array of OH_Drawing_FontDescriptor. Released through the * OH_Drawing_DestroyFontDescriptors interface after use. - * @since 14 + * @since 16 */ OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescriptor* desc, size_t* num); @@ -88,7 +88,7 @@ OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescri * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param descriptors OH_Drawing_FontDescriptor object array. * @param num Represents the number of members of the OH_Drawing_FontDescriptor array. - * @since 14 + * @since 16 */ void OH_Drawing_DestroyFontDescriptors(OH_Drawing_FontDescriptor* descriptors, size_t num); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_line.h b/graphic/graphic_2d/native_drawing/drawing_text_line.h index 256251146..d04de9b4c 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_line.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_line.h @@ -53,7 +53,7 @@ extern "C" { * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. * @return Indicates the pointer to a text line array object OH_Drawing_Array. - * @since 14 + * @since 16 */ OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typography); @@ -62,7 +62,7 @@ OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typog * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param lines Indicates the pointer to the text line array object OH_Drawing_Array. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_DestroyTextLines(OH_Drawing_Array* lines); @@ -72,7 +72,7 @@ void OH_Drawing_DestroyTextLines(OH_Drawing_Array* lines); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to the text line object OH_Drawing_TextLine. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_DestroyTextLine(OH_Drawing_TextLine* line); @@ -84,7 +84,7 @@ void OH_Drawing_DestroyTextLine(OH_Drawing_TextLine* line); * @param lines Indicates the pointer to the text line array object OH_Drawing_Array. * @param index The text line object index. * @return Indicates the pointer to a text line object OH_Drawing_TextLine. - * @since 14 + * @since 16 */ OH_Drawing_TextLine* OH_Drawing_GetTextLineByIndex(OH_Drawing_Array* lines, size_t index); @@ -94,7 +94,7 @@ OH_Drawing_TextLine* OH_Drawing_GetTextLineByIndex(OH_Drawing_Array* lines, size * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Returns the count of glyphs. - * @since 14 + * @since 16 * @version 1.0 */ double OH_Drawing_TextLineGetGlyphCount(OH_Drawing_TextLine* line); @@ -106,7 +106,7 @@ double OH_Drawing_TextLineGetGlyphCount(OH_Drawing_TextLine* line); * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param start Indicates the pointer to text line start position. * @param end Indicates the pointer to text line end position. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_TextLineGetTextRange(OH_Drawing_TextLine* line, size_t* start, size_t* end); @@ -117,7 +117,7 @@ void OH_Drawing_TextLineGetTextRange(OH_Drawing_TextLine* line, size_t* start, s * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Indicates the pointer to a glyph runs array object of text line OH_Drawing_Array. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_Array* OH_Drawing_TextLineGetGlyphRuns(OH_Drawing_TextLine* line); @@ -127,7 +127,7 @@ OH_Drawing_Array* OH_Drawing_TextLineGetGlyphRuns(OH_Drawing_TextLine* line); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param runs Indicates the pointer to the run array object OH_Drawing_Array. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_DestroyRuns(OH_Drawing_Array* runs); @@ -139,7 +139,7 @@ void OH_Drawing_DestroyRuns(OH_Drawing_Array* runs); * @param runs Indicates the pointer to the run array object OH_Drawing_Array. * @param index The run object index. * @return Indicates the pointer to a run object OH_Drawing_Run. - * @since 14 + * @since 16 */ OH_Drawing_Run* OH_Drawing_GetRunByIndex(OH_Drawing_Array* runs, size_t index); @@ -151,7 +151,7 @@ OH_Drawing_Run* OH_Drawing_GetRunByIndex(OH_Drawing_Array* runs, size_t index); * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param x Represents the X-axis position on the canvas. * @param y Represents the Y-axis position on the canvas. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_TextLinePaint(OH_Drawing_TextLine* line, OH_Drawing_Canvas* canvas, double x, double y); @@ -166,7 +166,7 @@ void OH_Drawing_TextLinePaint(OH_Drawing_TextLine* line, OH_Drawing_Canvas* canv * For details, see the enum OH_Drawing_EllipsisModal. * @param ellipsis Indicates the ellipsis string to set. * @return Returns the pointer to the OH_Drawing_TextLine object created. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_TextLine* OH_Drawing_TextLineCreateTruncatedLine(OH_Drawing_TextLine* line, double width, int mode, @@ -181,7 +181,7 @@ OH_Drawing_TextLine* OH_Drawing_TextLineCreateTruncatedLine(OH_Drawing_TextLine* * @param descent Indicates the pointer to the distance that remains below the baseline. * @param leading Indicates the pointer to the line Spacing. * @return Returns The total width of the typesetting border. - * @since 14 + * @since 16 * @version 1.0 */ double OH_Drawing_TextLineGetTypographicBounds(OH_Drawing_TextLine* line, double* ascent, double* descent, @@ -193,7 +193,7 @@ double OH_Drawing_TextLineGetTypographicBounds(OH_Drawing_TextLine* line, double * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Returns the pointer to the OH_Drawing_Rect struct created. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_Rect* OH_Drawing_TextLineGetImageBounds(OH_Drawing_TextLine* line); @@ -204,7 +204,7 @@ OH_Drawing_Rect* OH_Drawing_TextLineGetImageBounds(OH_Drawing_TextLine* line); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Returns the tail space width. - * @since 14 + * @since 16 * @version 1.0 */ double OH_Drawing_TextLineGetTrailingSpaceWidth(OH_Drawing_TextLine* line); @@ -216,7 +216,7 @@ double OH_Drawing_TextLineGetTrailingSpaceWidth(OH_Drawing_TextLine* line); * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param point Indicates the pointer to an OH_Drawing_Point object. * @return Returns the string index for a given position. - * @since 14 + * @since 16 */ int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, OH_Drawing_Point* point); @@ -227,7 +227,7 @@ int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param index The given string index. * @return Returns the offset for a given string index. - * @since 14 + * @since 16 */ double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int32_t index); @@ -241,7 +241,7 @@ double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int * @return The return value of the user-defined callback function. * If false is returned, the traversal continues. * If true is returned, the traversal stops. - * @since 14 + * @since 16 * @version 1.0 */ typedef bool (*Drawing_CaretOffsetsCallback)(double offset, int32_t index, bool leadingEdge); @@ -252,7 +252,7 @@ typedef bool (*Drawing_CaretOffsetsCallback)(double offset, int32_t index, bool * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param callback User-defined callback functions, see Drawing_CaretOffsetsCallback. - * @since 14 + * @since 16 */ void OH_Drawing_TextLineEnumerateCaretOffsets(OH_Drawing_TextLine* line, Drawing_CaretOffsetsCallback callback); @@ -267,7 +267,7 @@ void OH_Drawing_TextLineEnumerateCaretOffsets(OH_Drawing_TextLine* line, Drawing * @param alignmentWidth The width of the text to be aligned. * Returns 0 if it is less than the actual width of the text. * @return Returns the offset of the aligned text. - * @since 14 + * @since 16 * @version 1.0 */ double OH_Drawing_TextLineGetAlignmentOffset(OH_Drawing_TextLine* line, double alignmentFactor, double alignmentWidth); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h index d37e6e3b2..1184ce909 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h @@ -52,7 +52,7 @@ extern "C" { * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. * @return Returns the pointer to the OH_Drawing_LineTypography object created. - * @since 14 + * @since 16 */ OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_TypographyCreate* handler); @@ -61,7 +61,7 @@ OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_Typography * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param lineTypography Indicates the pointer to an OH_Drawing_LineTypography object. - * @since 14 + * @since 16 */ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography); @@ -73,7 +73,7 @@ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography) * @param startIndex Indicates the starting point for the line-break calculations. * @param width Indicates the requested line-break width. * @return Returns the count of the characters from startIndex that would cause the line break. - * @since 14 + * @since 16 */ size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypography, size_t startIndex, double width); @@ -86,7 +86,7 @@ size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypo * @param startIndex Indicates the starting index of the text range. * @param count Indicates the characters count of the text range. * @return Returns the pointer to the OH_Drawing_TextLine object created. - * @since 14 + * @since 16 */ OH_Drawing_TextLine* OH_Drawing_LineTypographyCreateLine(OH_Drawing_LineTypography* lineTypography, size_t startIndex, size_t count); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index 7237fd88c..d0275044b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -54,7 +54,7 @@ extern "C" { * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. * @return Run of glyph indices array object OH_Drawing_Array. - * @since 14 + * @since 16 */ OH_Drawing_Array* OH_Drawing_GetRunStringIndices(OH_Drawing_Run* run, int64_t start, int64_t length); @@ -65,7 +65,7 @@ OH_Drawing_Array* OH_Drawing_GetRunStringIndices(OH_Drawing_Run* run, int64_t st * @param stringIndices the run glyph indices array object OH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph indices element. - * @since 14 + * @since 16 */ uint64_t OH_Drawing_GetRunStringIndicesByIndex(OH_Drawing_Array* stringIndices, size_t index); @@ -74,7 +74,7 @@ uint64_t OH_Drawing_GetRunStringIndicesByIndex(OH_Drawing_Array* stringIndices, * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param stringIndices glyph indices array object OH_Drawing_Array. - * @since 14 + * @since 16 */ void OH_Drawing_DestroyRunStringIndices(OH_Drawing_Array* stringIndices); @@ -85,7 +85,7 @@ void OH_Drawing_DestroyRunStringIndices(OH_Drawing_Array* stringIndices); * @param run Indicates the pointer to an OH_Drawing_Run object. * @param location The run of glyph location. * @param length The run of glyph length. - * @since 14 + * @since 16 */ void OH_Drawing_GetRunStringRange(OH_Drawing_Run* run, uint64_t* location, uint64_t* length); @@ -98,7 +98,7 @@ void OH_Drawing_GetRunStringRange(OH_Drawing_Run* run, uint64_t* location, uint6 * @param descent The run of descent. * @param leading The run of leading. * @return run typographic width. - * @since 14 + * @since 16 */ float OH_Drawing_GetRunTypographicBounds(OH_Drawing_Run* run, float* ascent, float* descent, float* leading); @@ -110,7 +110,7 @@ float OH_Drawing_GetRunTypographicBounds(OH_Drawing_Run* run, float* ascent, flo * @param run Indicates the pointer to an OH_Drawing_Run object. * @param x Indicates the x coordinate. * @param y Indicates the y coordinate. - * @since 14 + * @since 16 */ void OH_Drawing_RunPaint(OH_Drawing_Canvas* canvas, OH_Drawing_Run* run, double x, double y); @@ -120,7 +120,7 @@ void OH_Drawing_RunPaint(OH_Drawing_Canvas* canvas, OH_Drawing_Run* run, double * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param run Indicates the pointer to an OH_Drawing_Run object. * @return The run image bounds to an OH_Drawing_Rect object. - * @since 14 + * @since 16 */ OH_Drawing_Rect* OH_Drawing_GetRunImageBounds(OH_Drawing_Run* run); @@ -129,7 +129,7 @@ OH_Drawing_Rect* OH_Drawing_GetRunImageBounds(OH_Drawing_Run* run); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param rect Run image bounds to an OH_Drawing_Rect object. - * @since 14 + * @since 16 */ void OH_Drawing_DestroyRunImageBounds(OH_Drawing_Rect* rect); @@ -141,7 +141,7 @@ void OH_Drawing_DestroyRunImageBounds(OH_Drawing_Rect* rect); * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. * @return Run of glyph array object OH_Drawing_ArrayOH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph element. - * @since 14 + * @since 16 * @version 1.0 */ uint16_t OH_Drawing_GetRunGlyphsByIndex(OH_Drawing_Array* glyphs, size_t index); @@ -162,7 +162,7 @@ uint16_t OH_Drawing_GetRunGlyphsByIndex(OH_Drawing_Array* glyphs, size_t index); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param glyphs The run of glyph array object OH_Drawing_Array. - * @since 14 + * @since 16 */ void OH_Drawing_DestroyRunGlyphs(OH_Drawing_Array* glyphs); @@ -174,7 +174,7 @@ void OH_Drawing_DestroyRunGlyphs(OH_Drawing_Array* glyphs); * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. * @return Run of position array object OH_Drawing_Array. - * @since 14 + * @since 16 */ OH_Drawing_Array* OH_Drawing_GetRunPositions(OH_Drawing_Run* run, int64_t start, int64_t length); @@ -185,7 +185,7 @@ OH_Drawing_Array* OH_Drawing_GetRunPositions(OH_Drawing_Run* run, int64_t start, * @param positions The run of position array object OH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph position pointer to an OH_Drawing_Point object. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_Point* OH_Drawing_GetRunPositionsByIndex(OH_Drawing_Array* positions, size_t index); @@ -195,7 +195,7 @@ OH_Drawing_Point* OH_Drawing_GetRunPositionsByIndex(OH_Drawing_Array* positions, * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param positions The run of position array object OH_Drawing_Array. - * @since 14 + * @since 16 */ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); @@ -205,7 +205,7 @@ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param run Indicates the pointer to an OH_Drawing_Run object. * @return The number of glyph. - * @since 14 + * @since 16 */ uint32_t OH_Drawing_GetRunGlyphCount(OH_Drawing_Run* run); #ifdef __cplusplus diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 998932c6a..94dd59675 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -765,7 +765,7 @@ void OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle* style, int decorati * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param decoration Indicates the text decoration to add. For details, see the enum OH_Drawing_TextDecoration. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle* style, int decoration); @@ -777,7 +777,7 @@ void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle* style, int decorati * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param decoration Indicates the text decoration to remove, shoud be match existing text decorations. * For details, see the enum OH_Drawing_TextDecoration. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_RemoveTextStyleDecoration(OH_Drawing_TextStyle* style, int decoration); @@ -2834,7 +2834,7 @@ void OH_Drawing_SetTextShadow(OH_Drawing_TextShadow* shadow, uint32_t color, OH_ * @return Returns the pointer to the OH_Drawing_TextTab object created. If the object returns NULL, * the creation failed. The possible cause of the failure is that the application address space is used up. * As a result, space cannot be allocated. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_TextTab* OH_Drawing_CreateTextTab(OH_Drawing_TextAlign alignment, float location); @@ -2844,7 +2844,7 @@ OH_Drawing_TextTab* OH_Drawing_CreateTextTab(OH_Drawing_TextAlign alignment, flo * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param tab Indicates the pointer to an OH_Drawing_TextTab object. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab* tab); @@ -2855,7 +2855,7 @@ void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab* tab); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @return Returns align of an OH_Drawing_TextTab object. - * @since 14 + * @since 16 * @version 1.0 */ OH_Drawing_TextAlign OH_Drawing_GetTextTabAlignment(OH_Drawing_TextTab* tab); @@ -2866,7 +2866,7 @@ OH_Drawing_TextAlign OH_Drawing_GetTextTabAlignment(OH_Drawing_TextTab* tab); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @return Returns location of an OH_Drawing_TextTab object. - * @since 14 + * @since 16 * @version 1.0 */ float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab* tab); @@ -2880,7 +2880,7 @@ float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab* tab); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param tab Indicates the pointer to an OH_Drawing_TextTab object. - * @since 14 + * @since 16 * @version 1.0 */ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawing_TextTab* tab); @@ -2891,7 +2891,7 @@ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawi * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param drawingArray Indicates the pointer to the array object OH_Drawing_Array. * @return Size of array. - * @since 14 + * @since 16 * @version 1.0 */ size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index 65a39f672..e84488f7a 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -543,7 +543,7 @@ typedef struct OH_Drawing_RecordCmd OH_Drawing_RecordCmd; /** * @brief Defines an array object, which is used to store multiple NDK object. * - * @since 14 + * @since 16 * @version 1.0 */ typedef struct OH_Drawing_Array OH_Drawing_Array; diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index c33c60140..9951b7fdd 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -636,11 +636,11 @@ { "name": "OH_Drawing_SetTextStyleBaseLine" }, { "name": "OH_Drawing_SetTextStyleDecoration" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_AddTextStyleDecoration" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_RemoveTextStyleDecoration" }, { "name": "OH_Drawing_SetTextStyleDecorationColor" }, @@ -943,11 +943,11 @@ "name": "OH_Drawing_DestroyFontDescriptor" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_MatchFontDescriptors" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_DestroyFontDescriptors" }, { @@ -1531,203 +1531,203 @@ "name":"OH_Drawing_RecordCmdDestroy" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_CreateLineTypography" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_DestroyLineTypography" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_LineTypographyGetLineBreak" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_LineTypographyCreateLine" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_FontGetBounds" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_FontGetPathForGlyph" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_RectCreateArray" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_RectGetArraySize" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_RectGetArrayElement" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_RectDestroyArray" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_CreateTextTab" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyTextTab" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetTextTabAlignment" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetTextTabLocation" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_SetTypographyTextTab" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_FontGetTextPath" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetDrawingArraySize" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TypographyGetTextLines" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyTextLines" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyTextLine" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetTextLineByIndex" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetGlyphCount" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetTextRange" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetGlyphRuns" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyRuns" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunByIndex" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLinePaint" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineCreateTruncatedLine" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetTypographicBounds" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetImageBounds" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetTrailingSpaceWidth" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetStringIndexForPosition" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetOffsetForStringIndex" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_Drawing_TextLineEnumerateCaretOffsets" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_TextLineGetAlignmentOffset" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunStringIndices" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunStringIndicesByIndex" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyRunStringIndices" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunStringRange" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunTypographicBounds" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_RunPaint" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunImageBounds" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyRunImageBounds" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunGlyphs" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunGlyphsByIndex" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyRunGlyphs" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunPositions" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunPositionsByIndex" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_DestroyRunPositions" }, { - "first_introduced": "14", + "first_introduced": "16", "name":"OH_Drawing_GetRunGlyphCount" }, { -- Gitee From 8633feecf3fe6d2e027c26e42e8cdf5ab683c6a3 Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 25 Dec 2024 20:05:47 +0800 Subject: [PATCH 312/630] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 23f25a213..0fd243680 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -60,8 +60,6 @@ typedef enum { STYLISH = 1 << 2, /** Installed font types */ INSTALLED = 1 << 3, - /** Customized font types */ - CUSTOMIZED = 1 << 4; } OH_Drawing_SystemFontType; /** -- Gitee From 22fe479df4aab46998e81d2df0a7741fd16e45fe Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 25 Dec 2024 20:07:31 +0800 Subject: [PATCH 313/630] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- graphic/graphic_2d/native_drawing/drawing_text_typography.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 94dd59675..a0d488ad2 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -279,8 +279,6 @@ typedef enum { WORD_BREAK_TYPE_BREAK_ALL = 1, /** Break Word type */ WORD_BREAK_TYPE_BREAK_WORD = 2, - /** Attempt break word with hyphens */ - WORD_BREAK_TYPE_HYPHEN = 3, } OH_Drawing_WordBreakType; /** -- Gitee From 5ee76b28f0d059aa063e972d0b8b339ad042bcdd Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 25 Dec 2024 20:45:11 +0800 Subject: [PATCH 314/630] =?UTF-8?q?=E6=95=B4=E6=94=B9=E9=81=97=E6=BC=8F?= =?UTF-8?q?=E7=9A=84api14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- graphic/graphic_2d/native_drawing/drawing_text_line.h | 4 ++-- .../graphic_2d/native_drawing/drawing_text_lineTypography.h | 4 ++-- graphic/graphic_2d/native_drawing/drawing_text_run.h | 4 ++-- graphic/graphic_2d/native_drawing/drawing_text_typography.h | 2 +- graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_line.h b/graphic/graphic_2d/native_drawing/drawing_text_line.h index d04de9b4c..2d69ae963 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_line.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_line.h @@ -21,7 +21,7 @@ * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * - * @since 14 + * @since 16 * @version 1.0 */ @@ -33,7 +33,7 @@ * @kit ArkGraphics2D * @library libnative_drawing.so * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 14 + * @since 16 * @version 1.0 */ diff --git a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h index 1184ce909..0ab0b3a1f 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h @@ -21,7 +21,7 @@ * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * - * @since 14 + * @since 16 * @version 1.0 */ @@ -33,7 +33,7 @@ * @kit ArkGraphics2D * @library libnative_drawing.so * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 14 + * @since 16 * @version 1.0 */ diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index d0275044b..f37f6afad 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -21,7 +21,7 @@ * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * - * @since 14 + * @since 16 * @version 1.0 */ @@ -33,7 +33,7 @@ * @kit ArkGraphics2D * @library libnative_drawing.so * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 14 + * @since 16 * @version 1.0 */ diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index a0d488ad2..292a26f06 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2889,7 +2889,7 @@ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawi * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param drawingArray Indicates the pointer to the array object OH_Drawing_Array. * @return Size of array. - * @since 16 + * @since 14 * @version 1.0 */ size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 9951b7fdd..88b5ef39f 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1595,7 +1595,7 @@ "name":"OH_Drawing_FontGetTextPath" }, { - "first_introduced": "16", + "first_introduced": "14", "name":"OH_Drawing_GetDrawingArraySize" }, { -- Gitee From 6053c3ff5cd5ab9a11e54c69479bf76ad008b1e2 Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Wed, 25 Dec 2024 21:51:53 +0800 Subject: [PATCH 315/630] =?UTF-8?q?=E5=9B=9E=E9=80=80drawingArray?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- graphic/graphic_2d/native_drawing/drawing_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index e84488f7a..65a39f672 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -543,7 +543,7 @@ typedef struct OH_Drawing_RecordCmd OH_Drawing_RecordCmd; /** * @brief Defines an array object, which is used to store multiple NDK object. * - * @since 16 + * @since 14 * @version 1.0 */ typedef struct OH_Drawing_Array OH_Drawing_Array; -- Gitee From a2ef1a6c6412f979fbe0edb24578869e5011afc3 Mon Sep 17 00:00:00 2001 From: fandongyu Date: Thu, 26 Dec 2024 12:07:48 +0800 Subject: [PATCH 316/630] Signed-off-by:fandongyu Signed-off-by: fandongyu --- multimedia/image_framework/include/image_source_mdk.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/image_framework/include/image_source_mdk.h b/multimedia/image_framework/include/image_source_mdk.h index aa5014037..35278f5aa 100644 --- a/multimedia/image_framework/include/image_source_mdk.h +++ b/multimedia/image_framework/include/image_source_mdk.h @@ -310,7 +310,7 @@ struct OhosImageSourceInfo { * @brief Defines the input resource of the image source. It is obtained by calling {@link OH_ImageSource_Create}. * Only one type of resource is accepted at a time. * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 * @deprecated since 11 @@ -437,7 +437,7 @@ struct OhosImageSourceUpdateData { * returns {@link IRNdkErrCode} IMAGE_RESULT_FREAD_FAILED - if read file failed. * @see {@link OhosImageSource}, {@link OhosImageSourceOps} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 * @deprecated since 11 @@ -569,7 +569,7 @@ int32_t OH_ImageSource_CreateFromRawFile(napi_env env, RawFileDescriptor rawFile * returns {@link IRNdkErrCode} IMAGE_RESULT_FREAD_FAILED - if read file failed. * @see {@link OhosImageSource}, {@link OhosImageSourceOps}, {@link OH_ImageSource_UpdateData} * - * @Syscap SystemCapability.Multimedia.Image + * @syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 * @deprecated since 11 -- Gitee From 1ce30b9324763463bee1041c25b2f8d5adebc422 Mon Sep 17 00:00:00 2001 From: sqwlly Date: Thu, 26 Dec 2024 08:59:51 +0000 Subject: [PATCH 317/630] OH_NativeImage_GetBufferMatrix version change Signed-off-by: s30029175 Signed-off-by: sqwlly Change-Id: I8cb07f7341da29464f1c557f770734b930f1b783 --- graphic/graphic_2d/native_image/libnative_image.ndk.json | 2 +- graphic/graphic_2d/native_image/native_image.h | 2 +- graphic/graphic_2d/native_window/graphic_error_code.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphic/graphic_2d/native_image/libnative_image.ndk.json b/graphic/graphic_2d/native_image/libnative_image.ndk.json index 11e9be9cf..1b40db3aa 100644 --- a/graphic/graphic_2d/native_image/libnative_image.ndk.json +++ b/graphic/graphic_2d/native_image/libnative_image.ndk.json @@ -12,7 +12,7 @@ { "name": "OH_NativeImage_Destroy" }, { "name": "OH_NativeImage_GetTransformMatrixV2" }, { - "first_introduced": "14", + "first_introduced": "15", "name": "OH_NativeImage_GetBufferMatrix" }, { diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index 4bb8ba30a..9ad3ebbd7 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -252,7 +252,7 @@ int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[ * @return {@link NATIVE_ERROR_OK} 0 - Success. * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - image is NULL. * {@link NATIVE_ERROR_MEM_OPERATION_ERROR} 30001000 - Memory operation error, failed to get transform matrix. - * @since 14 + * @since 15 * @version 1.0 */ int32_t OH_NativeImage_GetBufferMatrix(OH_NativeImage* image, float matrix[16]); diff --git a/graphic/graphic_2d/native_window/graphic_error_code.h b/graphic/graphic_2d/native_window/graphic_error_code.h index 0bc361b65..fe1df86f5 100644 --- a/graphic/graphic_2d/native_window/graphic_error_code.h +++ b/graphic/graphic_2d/native_window/graphic_error_code.h @@ -54,7 +54,7 @@ typedef enum OHNativeErrorCode { NATIVE_ERROR_OK = 0, /** * @error memory operation error - * @since 14 + * @since 15 */ NATIVE_ERROR_MEM_OPERATION_ERROR = 30001000, /** @error input invalid parameter */ -- Gitee From 7d06cc508d269f893052898cb66a82583c40afd9 Mon Sep 17 00:00:00 2001 From: Zhang Jinyu Date: Thu, 26 Dec 2024 17:15:17 +0800 Subject: [PATCH 318/630] =?UTF-8?q?TimePicker=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=8112=E5=B0=8F=E6=97=B6=E5=88=B6=E6=97=B6=E4=B8=8A?= =?UTF-8?q?=E5=8D=88=E4=B8=8B=E5=8D=88=E8=B7=9F=E9=9A=8F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=81=94=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhang Jinyu --- arkui/ace_engine/native/native_node.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e008614e1..6fab0769e 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3735,6 +3735,19 @@ typedef enum { * */ NODE_TIME_PICKER_SELECTED_TEXT_STYLE, + /** + * @brief Defines whether the AM/PM option is cascaded with the time in 12-hour mode. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to enable cascade. The default value is false.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to enable cascade.\n + * + * @since 16 + */ + NODE_TIME_PICKER_ENABLE_CASCADE = 14007, /** * @brief Defines the data selection range of the text picker. -- Gitee From 9ee4928fd3e92270d597f3892e2260f7ee399639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Thu, 26 Dec 2024 20:26:08 +0800 Subject: [PATCH 319/630] add showCursor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- .../player_framework/native_avscreen_capture.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index a58f46164..c508cae4f 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -431,6 +431,21 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SkipPrivacyMode(struct OH_AVScree */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetMaxVideoFrameRate(struct OH_AVScreenCapture *capture, int32_t frameRate); + +/** + * @brief determines whether the cursor is visible in the session + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param capture Pointer to an OH_AVScreenCapture instance + * @param showCursor The switch of the cursor + * @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. + * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted, show cursor failed. + * @since 15 + * @version 1.0 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapture *capture, + bool showCursor); #ifdef __cplusplus } #endif -- Gitee From 9439ce7abebadaec128edc21d081c5eb6ee21977 Mon Sep 17 00:00:00 2001 From: Tintin9529 Date: Fri, 27 Dec 2024 13:26:01 +0800 Subject: [PATCH 320/630] checkboxgroup capi Signed-off-by: Tintin9529 --- arkui/ace_engine/native/native_node.h | 135 +++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e9f10a7c8..9c8ecd92e 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -96,6 +96,10 @@ typedef enum { * @since 16 */ ARKUI_NODE_XCOMPONENT_TEXTURE, + /** Check box group. + * @since 16 + */ + ARKUI_NODE_CHECKBOX_GROUP = 21, /** Stack container. */ ARKUI_NODE_STACK = MAX_NODE_SCOPE_NUM, /** Swiper. */ @@ -3520,6 +3524,34 @@ typedef enum { */ NODE_CHECKBOX_SHAPE, + /** + * @brief Defines the name of the checkbox. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: component name. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: component name. \n + * + * @since 16 + */ + NODE_CHECKBOX_NAME, + + /** + * @brief Defines the name of the checkbox. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: component name. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: component name. \n + * + * @since 16 + */ + NODE_CHECKBOX_GROUP, + /** * @brief Defines the ID of the component. * This attribute can be set and obtained as required through APIs. @@ -4399,6 +4431,95 @@ typedef enum { */ NODE_IMAGE_ANIMATOR_ITERATION = 19006, + /** + * @brief Defines the name of the checkboxgroup. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: component name. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: component name. \n + * + * @since 16 + */ + NODE_CHECKBOX_GROUP_NAME = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX_GROUP, + + /** + * @brief Defines whether the checkboxgroup is selected. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether the checkboxgroup is selected. + * The value 1 means that the checkboxgroup is selected, and 0 means the opposite. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The value 1 means that the checkboxgroup is selected, and 0 means the opposite. \n + * + * @since 16 + */ + NODE_CHECKBOX_GROUP_SELECT_ALL, + + /** + * @brief Defines the color of the checkboxgroup when it is selected. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: color of the checkboxgroup when it is selected, in 0xARGB format, + * for example, 0xFF1122FF. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: color of the checkboxgroup when it is selected, in 0xARGB format, for example, 0xFF1122FF. + * + * @since 16 + */ + NODE_CHECKBOX_GROUP_SELECTED_COLOR, + /** + * @brief Defines the border color of the checkboxgroup when it is not selected. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF. + * + * @since 16 + */ + NODE_CHECKBOX_GROUP_UNSELECTED_COLOR, + + /** + * @brief Defines the internal icon style of the checkboxgroup. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.\n + * .value[1]?.f32: size of the internal mark, in vp. Optional.\n + * .value[2]?.f32: stroke width of the internal mark, in vp. Optional. The default value is 2. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.\n + * .value[1].f32: size of the internal mark, in vp. \n + * .value[2].f32: stroke width of the internal mark, in vp. The default value is 2. \n + * + * @since 16 + */ + NODE_CHECKBOX_GROUP_MARK, + + /** + * @brief Defines the shape of the checkboxgroup. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: component shape. The parameter type is {@link ArkUI_CheckboxShape}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: component shape. The parameter type is {@link ArkUI_CheckboxShape}. + * + * @since 16 + */ + NODE_CHECKBOX_GROUP_SHAPE, + /** * @brief Defines the alignment mode of the child components in the container. This attribute can be set, reset, * and obtained as required through APIs. @@ -6464,7 +6585,19 @@ typedef enum { * */ NODE_IMAGE_ANIMATOR_EVENT_ON_FINISH = 19004, - + + /** + * @brief Defines the event triggered when the selected status of the ARKUI_NODE_CHECKBOX_GROOUP + * component changes. + * + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * ArkUI_NodeComponentEvent.data[0].i321: selected; 0: not selected.\n + * + * @since 16 + */ + NODE_CHECKBOX_GROUP_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX_GROUP, + /** * @brief Defines the event triggered when the index of the currently displayed element of this * ARKUI_NODE_SWIPER instance changes. -- Gitee From ffbcba607916f6e08cf8545b4603d24e6bb1874f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=9E=97=E8=82=AF?= <735001321@qq.com> Date: Fri, 27 Dec 2024 07:32:11 +0000 Subject: [PATCH 321/630] update arkui/ace_engine/native/native_node.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹林肯 <735001321@qq.com> --- arkui/ace_engine/native/native_node.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c5c77065d..f416bffc8 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8142,7 +8142,6 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontSty * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * {@link ARKUI_ERROR_CODE_UI_CONTEXT_INVALID} if the uiContext is invalid. * @since 16 */ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node); -- Gitee From 3c07db9e055a6edac9d4a46ab6afdb81e5bd1a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=9E=97=E8=82=AF?= <735001321@qq.com> Date: Fri, 27 Dec 2024 07:36:47 +0000 Subject: [PATCH 322/630] update arkui/ace_engine/native/native_type.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹林肯 <735001321@qq.com> --- arkui/ace_engine/native/native_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 360fc3bd6..6a33c3f37 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -3992,6 +3992,7 @@ void OH_ArkUI_ActiveChildrenInfo_Destroy(ArkUI_ActiveChildrenInfo* handle); * @brief Retrieve the child nodes of ActiveChildenInfo with the structure index. * * @param handle The ActiveChildenInfo instance for obtaining information. + * @param index The index of child nodes. * @return The child node pointer corresponding to the index. Return nullptr in case of exception. * @since 14 */ @@ -4001,7 +4002,6 @@ ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildren * @brief Retrieve the number of nodes within the structure of ActiveChildenInfo. * * @param handle The ActiveChildenInfo instance for obtaining information. - * @param index The index of child nodes * @return Number of child nodes. Default value: 0. * @since 14 */ -- Gitee From 199b93fbc39faee4b0751effd1649f650c8ad261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A6=E5=9B=BD=E5=AE=81?= Date: Wed, 11 Dec 2024 22:22:34 +0800 Subject: [PATCH 323/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E9=BC=A0=E6=A0=87=E4=BA=8B=E4=BB=B6=E7=9A=84?= =?UTF-8?q?ndk=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 韦国宁 --- arkui/window_manager/libwm.ndk.json | 16 +++++ arkui/window_manager/oh_window_event_filter.h | 70 +++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index 3ed362ce4..eef5bc066 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -6,5 +6,21 @@ { "first_instroduced":"12", "name":"OH_NativeWindowManager_UnregisterKeyEventFilter" + }, + { + "first_instroduced":"15", + "name":"OH_NativeWindowManager_RegisterMouseEventFilter" + }, + { + "first_instroduced":"15", + "name":"OH_NativeWindowManager_UnregisterMouseEventFilter" + }, + { + "first_instroduced":"15", + "name":"OH_NativeWindowManager_RegisterTouchEventFilter" + }, + { + "first_instroduced":"15", + "name":"OH_NativeWindowManager_UnregisterTouchEventFilter" } ] \ No newline at end of file diff --git a/arkui/window_manager/oh_window_event_filter.h b/arkui/window_manager/oh_window_event_filter.h index e4651cd59..56a726525 100644 --- a/arkui/window_manager/oh_window_event_filter.h +++ b/arkui/window_manager/oh_window_event_filter.h @@ -75,6 +75,76 @@ WindowManager_ErrorCode OH_NativeWindowManager_RegisterKeyEventFilter(int32_t wi */ WindowManager_ErrorCode OH_NativeWindowManager_UnregisterKeyEventFilter(int32_t windowId); +/** + * @brief the callback function type when mouseEvent was filter + * @param mouseEvent multimodal mouseEvent + * @since 15 + */ +typedef bool (*OH_NativeWindowManager_MouseEventFilter)(Input_MouseEvent* mouseEvent); + +/** + * @brief Registers a filter callback for the window, the callback is called when the + * window is dispatched to the event + * + * @param windowId windowId when window is created + * @param mouseEventFilter mouse event callback, called when the window is dispatched + * to the event + * @return Returns the status code of the execution. + * Returns {@link OK} if the operation is successful. + * Returns {@link INVAILD_WINDOW_ID} if the window id is invalid. + * Returns {@link SERVICE_ERROR} if the window manager service error occurs. + * @since 15 + */ +WindowManager_ErrorCode OH_NativeWindowManager_RegisterMouseEventFilter(int32_t windowId, + OH_NativeWindowManager_MouseEventFilter mouseEventFilter); + +/** + * @brief clear callback for the window + * + * @param windowId windowId when window is created + * @return Returns the status code of the execution. + * Returns {@link OK} if the operation is successful. + * Returns {@link INVAILD_WINDOW_ID} if the window id is invalid. + * Returns {@link SERVICE_ERROR} if the window manager service error occurs. + * @since 15 + */ +WindowManager_ErrorCode OH_NativeWindowManager_UnregisterMouseEventFilter(int32_t windowId); + +/** + * @brief the callback function type when touchEvent was filter + * @param touchEvent multimodal touchEvent + * @since 15 + */ +typedef bool (*OH_NativeWindowManager_TouchEventFilter)(Input_TouchEvent* touchEvent); + +/** + * @brief Registers a filter callback for the window, the callback is called when the + * window is dispatched to the event + * + * @param windowId windowId when window is created + * @param touchEventFilter touch event callback, called when the window is dispatched + * to the event + * @return Returns the status code of the execution. + * Returns {@link OK} if the operation is successful. + * Returns {@link INVAILD_WINDOW_ID} if the window id is invalid. + * Returns {@link SERVICE_ERROR} if the window manager service error occurs. + * @since 15 + */ +WindowManager_ErrorCode OH_NativeWindowManager_RegisterTouchEventFilter(int32_t windowId, + OH_NativeWindowManager_TouchEventFilter touchEventFilter); + +/** + * @brief clear callback for the window + * + * @param windowId windowId when window is created + * @return Returns the status code of the execution. + * Returns {@link OK} if the operation is successful. + * Returns {@link INVAILD_WINDOW_ID} if the window id is invalid. + * Returns {@link SERVICE_ERROR} if the window manager service error occurs. + * @since 15 + */ +WindowManager_ErrorCode OH_NativeWindowManager_UnregisterTouchEventFilter(int32_t windowId); + #ifdef __cplusplus } #endif -- Gitee From d3660e27f45ea1b8831ec75c13ec07912579deb2 Mon Sep 17 00:00:00 2001 From: yangqirun Date: Sat, 28 Dec 2024 09:08:47 +0800 Subject: [PATCH 324/630] fix interface error Signed-off-by: yangqirun Change-Id: I9008a4df756625aa42618e30ca06f16a5cc9266c --- hiviewdfx/hiappevent/include/hiappevent/hiappevent.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index a159aae9b..a71e1d86e 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -732,7 +732,7 @@ int OH_HiAppEvent_SetCustomConfig(HiAppEvent_Processor* processor, const char* k * @param configId The configId of processor. * @return set result. * {@link HIAPPEVENT_SUCCESS} The operation is successful. - * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. * @since 16 @@ -747,7 +747,7 @@ int OH_HiAppEvent_SetConfigId(HiAppEvent_Processor* processor, int configId); * @param size The size of userIdNames array. * @return set result. * {@link HIAPPEVENT_SUCCESS} The operation is successful. - * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. @@ -763,7 +763,7 @@ int OH_HiAppEvent_SetReportUserId(HiAppEvent_Processor* processor, const char* c * @param size The size of userPropertyNames array. * @return set result. * {@link HIAPPEVENT_SUCCESS} The operation is successful. - * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. @@ -777,7 +777,7 @@ int OH_HiAppEvent_SetReportUserProperty(HiAppEvent_Processor* processor, const c * * @param processor The pointer to the HiAppEvent_Processor instance. * @return process id if set is successful. - * {@link HIAPPEVENT_INVALID_PROCESSOR} The processor is nullptr. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_OPERATE_FAILED} Name not found or register processor error. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. @@ -791,7 +791,7 @@ int64_t OH_HiAppEvent_AddProcessor(HiAppEvent_Processor* processor); * @param processor The pointer to the HiAppEvent_Processor instance. * @since 16 */ -void OH_HiAppEvent_DestoryProcessor(HiAppEvent_Processor* processor); +void OH_HiAppEvent_DestroyProcessor(HiAppEvent_Processor* processor); /** * @brief The interface to remove processor. -- Gitee From d7281c7968ed7f9523c9006a9cdf76e2187904f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=97=AD?= Date: Sat, 28 Dec 2024 01:34:18 +0000 Subject: [PATCH 325/630] update multimodalinput/kits/c/input/oh_input_manager.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郭旭 --- multimodalinput/kits/c/input/oh_input_manager.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 38470f93d..0969d87e1 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -249,6 +249,8 @@ typedef enum Input_Result { INPUT_NOT_SYSTEM_APPLICATION = 202, /** @error Parameter check failed */ INPUT_PARAMETER_ERROR = 401, + /** @error Device not support */ + INPUT_DEVICE_NOT_SUPPORTED = 801, /** @error Service error */ INPUT_SERVICE_EXCEPTION = 3800001, /** @error Interceptor repeatedly created for an application */ @@ -1328,7 +1330,8 @@ void OH_Input_SetPreKeys(Input_Hotkey *hotkey, int32_t *preKeys, int32_t size); * @return OH_Input_GetPreKeys status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the pressedKeys is NULL or the pressedKeyCount - * is NULL.\n + * is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1351,7 +1354,8 @@ void OH_Input_SetFinalKey(Input_Hotkey *hotkey, int32_t finalKey); * @param finalKeyCode Returns the key value of the decorated key. * @return OH_Input_GetfinalKey status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n - * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the finalKeyCode is NULL.\n + * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the finalKeyCode is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1390,7 +1394,8 @@ void OH_Input_DestroyAllSystemHotkeys(Input_Hotkey **hotkeys, int32_t count); * @return OH_Input_GetAllSystemHotkeys status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey or count is NULL, or the value of count does not match the number - * of system shortcut keys supported by the system. + * of system shortcut keys supported by the system; + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1414,7 +1419,8 @@ void OH_Input_SetRepeat(Input_Hotkey* hotkey, bool isRepeat); * @param isRepeat Whether a key event is repeated. * @return OH_Input_GetIsRepeat status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n - * {@link INPUT_PARAMETER_ERROR} otherwise.\n + * {@link INPUT_PARAMETER_ERROR} otherwise;\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1428,6 +1434,7 @@ Input_Result OH_Input_GetRepeat(const Input_Hotkey* hotkey, bool *isRepeat); * @return OH_Input_AddHotkeyMonitor status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} if hotkey or callback is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported;\n * {@Link INPUT_OCCUPIED_BY_SYSTEM} The hotkey has been used by the system. You can call the {@Link * GetAllSystemHotkeys} interface to query all system shortcut keys.\n * {@Link INPUT_OCCUPIED_BY_OTHER} The hotkey has been subscribed to by another.\n @@ -1444,6 +1451,7 @@ Input_Result OH_Input_AddHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyC * @return OH_Input_RemoveHotkeyMonitor status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} if hotkey or callback is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ -- Gitee From 07954853457091c6e33e140cb73c80d0a8ec2cf0 Mon Sep 17 00:00:00 2001 From: zhangjinyu101 Date: Thu, 12 Dec 2024 16:20:59 +0800 Subject: [PATCH 326/630] =?UTF-8?q?TimePicker=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=85=8D=E7=BD=AE=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=92=8C=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangjinyu101 --- arkui/ace_engine/native/native_node.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index bf7955e8f..01b682059 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3808,6 +3808,32 @@ typedef enum { * */ NODE_TIME_PICKER_SELECTED_TEXT_STYLE, + /** + * @brief Defines the start time of the time picker. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: time. The default value is "00:00:00".\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: time. The default value is "00:00:00".\n + * + * @since 16 + */ + NODE_TIME_PICKER_START = 14005, + /** + * @brief Defines the end time of the time picker. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: time. The default value is "23:59:59".\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: time. The default value is "23:59:59".\n + * + * @since 16 + */ + NODE_TIME_PICKER_END = 14006, /** * @brief Defines whether the AM/PM option is cascaded with the time in 12-hour mode. * This attribute can be set, reset, and obtained as required through APIs. -- Gitee From c9bede39ec19288f70dadbd36c88c3b2435e2d76 Mon Sep 17 00:00:00 2001 From: yangxuguang-huawei Date: Sun, 15 Dec 2024 16:06:58 +0800 Subject: [PATCH 327/630] feat: add StartSelfUIAbility Signed-off-by: yangxuguang-huawei --- .../ability_runtime/ability_runtime_common.h | 65 +++++++++++++++++++ .../ability_runtime/application_context.h | 27 ++++++++ .../libability_runtime.ndk.json | 4 ++ 3 files changed, 96 insertions(+) diff --git a/AbilityKit/ability_runtime/ability_runtime_common.h b/AbilityKit/ability_runtime/ability_runtime_common.h index e4cf556e4..228ae33b0 100644 --- a/AbilityKit/ability_runtime/ability_runtime_common.h +++ b/AbilityKit/ability_runtime/ability_runtime_common.h @@ -49,10 +49,75 @@ extern "C" { typedef enum { /** @error No error. */ ABILITY_RUNTIME_ERROR_CODE_NO_ERROR = 0, + /** + * @error permission denied. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_PERMISSION_DENIED = 201, /** @error Invalid parameters. */ ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID = 401, + /** + * @error StartSelfUIAbility is not supported. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_NOT_SUPPORTED = 801, + /** + * @error No such ability. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_NO_SUCH_ABILITY = 16000001, + /** + * @error Incorrect ability type. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_INCORRECT_ABILITY_TYPE = 16000002, + /** + * @error Starting invisible ability is not allowed. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_INVISIBLE = 16000004, + /** + * @error Cross-user start app is not allowed. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_CROSS_USER = 16000006, + /** + * @error The crowdtesting application expires. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_CROWDTEST_EXPIRED = 16000008, + /** + * @error The ability cannot be started in Wukong Mode. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_WUKONG_MODE = 16000009, /** @error The context does not exist. */ ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST = 16000011, + /** + * @error The app is controlled. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_CONTROLLED = 16000012, + /** + * @error The app is controlled by EDM. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_EDM_CONTROLLED = 16000013, + /** + * @error Cross-app start is not allowed. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_CROSS_APP = 16000018, + /** + * @error Internal error. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_INTERNAL = 16000050, + /** + * @error Not top ability. + * @since 15 + */ + ABILITY_RUNTIME_ERROR_CODE_NOT_TOP_ABILITY = 16000053, } AbilityRuntime_ErrorCode; #ifdef __cplusplus diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 4ac78aa5a..41b340af9 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -39,6 +39,7 @@ #include #include +#include #include "ability_runtime_common.h" #include "context_constant.h" @@ -211,6 +212,32 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetDistributedFiles AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCloudFileDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); +/** + * @brief Starts self UIAbility. + * + * @permission {@code ohos.permission.NDK_START_SELF_UI_ABILITY} + * @param want The arguments passed to start self UIAbility. + * For details, see {@link AbilityRuntime_Want}. + * @return Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the call is successful.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_PERMISSION_DENIED} if the caller has no correct permission.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INVALID_PARAM} if the arguments provided is invalid.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_SUPPORTED} if the device does not support starting self uiability.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_SUCH_ABILITY} if the target ability does not exist.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INCORRECT_ABILITY_TYPE} if the ability type is incorrect.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INVISIBLE} if the target ability is invisible.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROSS_USER} if the caller tries to start cross-user ability.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROWDTEST_EXPIRED} if the crowdtesting application expires.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_WUKONG_MODE} if the ability cannot be started in Wukong mode.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CONTROLLED} if the app is controlled.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_EDM_CONTROLLED} if the app is controlled by EDM.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROSS_APP} if the caller tries to start a different application.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INTERNAL} if internal error occurs.\n + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_TOP_ABILITY} if the caller is not top ability.\n + * For details, see {@link AbilityRuntime_ErrorCode}. + * @since 15 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbility(AbilityRuntime_Want *want); + #ifdef __cplusplus } // extern "C" #endif diff --git a/AbilityKit/ability_runtime/libability_runtime.ndk.json b/AbilityKit/ability_runtime/libability_runtime.ndk.json index fcde96f6c..4ef2c9800 100644 --- a/AbilityKit/ability_runtime/libability_runtime.ndk.json +++ b/AbilityKit/ability_runtime/libability_runtime.ndk.json @@ -11,6 +11,10 @@ "first_introduced": "13", "name": "OH_AbilityRuntime_ApplicationContextGetBundleName" }, + { + "first_introduced": "15", + "name": "OH_AbilityRuntime_StartSelfUIAbility" + }, { "first_introduced": "16", "name": "OH_AbilityRuntime_ApplicationContextGetTempDir" -- Gitee From 0a041929acbd770ccd3171ecaa0de98b654bfa3c Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 28 Dec 2024 18:18:09 +0800 Subject: [PATCH 328/630] add avrecorder ndk interfaces Signed-off-by: Steven --- multimedia/player_framework/avrecorder.h | 253 +++++++++++++ .../player_framework/avrecorder/BUILD.gn | 35 ++ .../avrecorder/libavrecorder.ndk.json | 62 ++++ multimedia/player_framework/avrecorder_base.h | 345 ++++++++++++++++++ 4 files changed, 695 insertions(+) create mode 100644 multimedia/player_framework/avrecorder.h create mode 100644 multimedia/player_framework/avrecorder/BUILD.gn create mode 100644 multimedia/player_framework/avrecorder/libavrecorder.ndk.json create mode 100644 multimedia/player_framework/avrecorder_base.h diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h new file mode 100644 index 000000000..555013461 --- /dev/null +++ b/multimedia/player_framework/avrecorder.h @@ -0,0 +1,253 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /** + * @addtogroup AVRecorder + * @{ + * + * @brief Provides APIs of request capability for Recorder. + * + * @Syscap systemcapability.multimedia.media.avrecorder + * @since 16 + * @version 1.0 + * @} + */ + + /** + * @file avrecorder.h + * + * @brief Defines the avrecorder APIs. Uses the Native APIs provided by Media AVRecorder + * to record media data. + * + * @kit MediaKit + * @library libavrecorder.so + * @Syscap SystemCapability.Multimedia.Media.AVRecorder + * @since 16 + * @version 1.0 + */ + +#ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_H +#define MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_H + +#include +#include +#include +#include "avrecorder_base.h" +#include "native_averrors.h" +#include "native_window/external_window.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Create a recorder + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @return Returns a pointer to an OH_AVRecorder instance for success, nullptr for failure + * @since 16 + * @version 1.0 +*/ +OH_AVRecorder *OH_AVRecorder_Create(void); + +/** + * @brief Prepare for recording with some parameters. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param config Pointer to an OH_AVRecorderConfig instance, see {@link OH_AVRecorderConfig} + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder Prepare failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_Prepare(OH_AVRecorder *recorder, OH_AVRecorder_Config *config); + +/** + * @brief Get current recording parameters, it must be called after prepare. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param config Pointer to an OH_AVRecorderConfig instance, see {@link OH_AVRecorderConfig} + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or config is null. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_GetAVRecorderConfig(OH_AVRecorder *recorder, OH_AVRecorder_Config **config); + +/** + * @brief Get input surface, it must be called between prepare completed and start. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param window Pointer to an OHNativeWindow instance, see {@link OHNativeWindow} + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_GetInputSurface(OH_AVRecorder *recorder, OHNativeWindow **window); + +/** + * @brief Update the video orientation before recorder start. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param rotation angle, should be [0, 90, 180, 270] + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or update rotation failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_UpdateRotation(OH_AVRecorder *recorder, int32_t rotation); + +/** + * @brief Start AVRecorder. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder start failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_Start(OH_AVRecorder *recorder); + +/** + * @brief Pause AVRecorder. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder pause failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_Pause(OH_AVRecorder *recorder); + +/** + * @brief Resume AVRecorder. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder resume failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_Resume(OH_AVRecorder *recorder); + +/** + * @brief Stop AVRecorder. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder stop failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_Stop(OH_AVRecorder *recorder); + +/** + * @brief Reset AVRecorder. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder reset failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_Reset(OH_AVRecorder *recorder); + +/** + * @brief Release AVRecorder. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder release failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder); + +/** + * @brief Get available encoder and encoder info for AVRecorder. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param info Double Pointer to an OH_EncoderInfo instance, see {@link OH_AVRecorder_EncoderInfo} + * @param length Length of available encoders + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder release failed. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_GetAvailableEncoder(OH_AVRecorder *recorder, OH_AVRecorder_EncoderInfo **info, + int32_t *length); + +/** + * @brief Set the state callback function so that your application can respond to the + * state change events generated by the av recorder. This interface must be called before Start is called. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param callback State callback function, see {@link OH_AVRecorder_OnStateChange} + * @param userData Pointer to user specific data + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_SetStateCallback( + OH_AVRecorder *recorder, OH_AVRecorder_OnStateChange callback, void *userData); + +/** + * @brief Set the error callback function so that your application can respond to the + * error events generated by the av recorder. This interface must be called before Start is called. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param callback Error callback function, see {@link OH_AVRecorder_OnError} + * @param userData Pointer to user specific data + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_SetErrorCallback(OH_AVRecorder *recorder, OH_AVRecorder_OnError callback, void *userData); + +/** + * @brief Set the URI callback function so that your application can respond to the + * URI events generated by the av recorder. This interface must be called before Start is called. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance + * @param callback Error callback function, see {@link OH_AVRecorder_OnUri} + * @param userData Pointer to user specific data + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. + * @since 16 + * @version 1.0 + */ +OH_AVErrCode OH_AVRecorder_SetUriCallback(OH_AVRecorder *recorder, OH_AVRecorder_OnUri callback, void *userData); + +#ifdef __cplusplus +} +#endif + +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_H \ No newline at end of file diff --git a/multimedia/player_framework/avrecorder/BUILD.gn b/multimedia/player_framework/avrecorder/BUILD.gn new file mode 100644 index 000000000..3ca4f1bce --- /dev/null +++ b/multimedia/player_framework/avrecorder/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright (C) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") +import("//foundation/multimedia/player_framework/config.gni") + +ohos_ndk_headers("avrecorder_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/player_framework" + sources = [ + "../avrecorder.h", + "../avrecorder_base.h", + ] +} + +ohos_ndk_library("libavrecorder") { + ndk_description_file = "./libavrecorder.ndk.json" + output_name = "avrecorder" + output_extension = "so" + system_capability = "SystemCapability.Multimedia.Media.AVRecorder" + system_capability_headers = [ + "multimedia/player_framework/avrecorder.h", + "multimedia/player_framework/avrecorder_base.h", + ] +} diff --git a/multimedia/player_framework/avrecorder/libavrecorder.ndk.json b/multimedia/player_framework/avrecorder/libavrecorder.ndk.json new file mode 100644 index 000000000..c5f0ad4e1 --- /dev/null +++ b/multimedia/player_framework/avrecorder/libavrecorder.ndk.json @@ -0,0 +1,62 @@ +[ + { + "first_introduced": "16", + "name": "OH_AVRecorder_Create" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_Prepare" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_GetAVRecorderConfig" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_GetInputSurface" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_UpdateRotation" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_Start" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_Pause" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_Resume" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_Stop" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_Reset" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_Release" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_GetAvailableEncoder" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_SetStateCallback" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_SetErrorCallback" + }, + { + "first_introduced": "16", + "name": "OH_AVRecorder_SetUriCallback" + } +] \ No newline at end of file diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h new file mode 100644 index 000000000..abad8dbaf --- /dev/null +++ b/multimedia/player_framework/avrecorder_base.h @@ -0,0 +1,345 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /** + * @addtogroup AVRecorder + * @{ + * + * @brief Provides APIs of request capability for Recorder. + * + * @Syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ + +/** + * @file avrecorder_base.h + * + * @brief Defines the structure and enumeration for Media AVRecorder. + * + * @kit MediaKit + * @library libavrecorder.so +@since 16 + * @version 1.0 + */ + +#ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_BASE_H +#define MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_BASE_H + +#include +#include +#include "native_avbuffer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Initialization of avrecorder + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder OH_AVRecorder; + +/** + * @brief audio source type for recorder + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef enum OH_AVRecorder_AudioSourceType { + /* Default audio source type. */ + DEFAULT = 0, + /* Source type mic. */ + MIC = 1, + /* Source type Voice recognition. */ + VOICE_RECOGNITION = 2, + /* Source type Voice communication. */ + VOICE_COMMUNICATION = 7, + /* Source type Voice message. */ + VOICE_MESSAGE = 10, + /* Source type Camcorder. */ + CAMCORDER = 13, +} OH_AVRecorder_AudioSourceType; + +/** + * @brief video source type for recorder + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef enum OH_AVRecorder_VideoSourceType { + /* Surface raw data. */ + SURFACE_YUV = 0, + /* Surface ES data. */ + SURFACE_ES = 1, +} OH_AVRecorder_VideoSourceType; + +/** + * @brief Enumerates Codec MIME types + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef enum OH_AVRecorder_CodecMimeType { + /* H.264 codec MIME type. */ + VIDEO_AVC = 2, + /* AAC codec MIME type. */ + AUDIO_AAC = 3, + /* mp3 codec MIME type. */ + AUDIO_MP3 = 4, + /* G711-mulaw codec MIME type. */ + AUDIO_G711MU = 5, + /* MPEG4 codec MIME type. */ + VIDEO_MPEG4 = 6, + /* H.265 codec MIME type. */ + VIDEO_HEVC = 8, +} OH_AVRecorder_CodecMimeType; + +/** + * @brief Enumerates container format type(The abbreviation for 'container format type' is CFT) + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef enum OH_AVRecorder_ContainerFormatType { + /* A video container format type mp4. */ + CFT_MPEG_4 = 2, + /* A audio container format type m4a. */ + CFT_MPEG_4A = 6, + /* A audio container format type mp3. */ + CFT_MP3 = 9, + /* A audio container format type wav. */ + CFT_WAV = 10, +} OH_AVRecorder_ContainerFormatType; + +/** + * @brief Recorder States + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef enum OH_AVRecorder_State { + /* idle states */ + IDLE = 0, + /* prepared states */ + PREPARED = 1, + /* started states */ + STARTED = 2, + /* paused states */ + PAUSED = 3, + /* stopped states */ + STOPPED = 4, + /* released states */ + RELEASED = 5, + /* error states */ + ERROR = 6, +} OH_AVRecorder_State; + +/** + * @brief reason of recorder state change + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef enum OH_AVRecorder_StateChangeReason { + /* State changed by user operation */ + USER = 0, + /* State changed by background action */ + BACKGROUND = 1, +} OH_AVRecorder_StateChangeReason; + +/** + * @brief mode of creating recorder file + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef enum OH_AVRecorder_FileGenerationMode { + /* Application Creation */ + APP_CREATE = 0, + /* System Creation. Valid only in camera scene */ + AUTO_CREATE_CAMERA_SCENE = 1, +} OH_AVRecorder_FileGenerationMode; + +/** + * @brief Provides the media recorder profile definitions + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder_Profile { + /* Indicates the audio bitrate */ + int32_t audioBitrate; + /* Indicates the number of audio channels */ + int32_t audioChannels; + /* Indicates the audio encoding format */ + OH_AVRecorder_CodecMimeType audioCodec; + /* Indicates the audio sampling rate */ + int32_t audioSampleRate; + /* Indicates the output file format */ + OH_AVRecorder_ContainerFormatType fileFormat; + /* Indicates the video bitrate */ + int32_t videoBitrate; + /* Indicates the video encoding format */ + OH_AVRecorder_CodecMimeType videoCodec; + /* Indicates the video width */ + int32_t videoFrameWidth; + /* Indicates the video height */ + int32_t videoFrameHeight; + /* Indicates the video frame rate */ + int32_t videoFrameRate; + /* Whether to record HDR video */ + bool isHdr; + /* Whether to encode the video in temporal scale mode */ + bool enableTemporalScale; +} OH_AVRecorder_Profile; + +/** + * @brief Provides the geographical location definitions for media resources + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder_Location { + /* Latitude */ + float latitude; + /* Longitude */ + float longitude; +} OH_AVRecorder_Location; + +/** + * @brief define the basic template of metadata + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder_MetadataTemplate { + /* key value of the matadata */ + char *key; + /* contents of the matadata */ + char *value; +} OH_AVRecorder_MetadataTemplate; + +/** + * @brief Provides the container definition for media data + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder_Metadata { + /* The metadata to retrieve the content type or genre of the data source */ + char *genre; + /* The metadata to retrieve the information about the video orientation */ + char *videoOrientation; + /* The geographical location info of the video */ + OH_AVRecorder_Location location; + /* Custom parameter key-value map read from moov.meta.list */ + OH_AVRecorder_MetadataTemplate customInfo; +} OH_AVRecorder_Metadata; + +/** + * @brief Provides the media recorder configuration definitions + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder_Config { + /* Indicates the recording audio source type */ + OH_AVRecorder_AudioSourceType audioSourceType; + /* Indicates the recording video source type */ + OH_AVRecorder_VideoSourceType videoSourceType; + /* Contains the audio and video encoding profile settings */ + OH_AVRecorder_Profile profile; + /* Defines the file URL */ + char *url; + /* Specifies the file generation mode for recording output */ + OH_AVRecorder_FileGenerationMode fileGenerationMode; + /* Contains additional metadata for the recorded media */ + OH_AVRecorder_Metadata metadata; +} OH_AVRecorder_Config; + +/** + * @brief Provides Range with lower and upper limit + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder_Range { + /* lower limit of the range */ + int32_t min; + /* upper limit of the range */ + int32_t max; +} OH_AVRecorder_Range; + +/** + * @brief Provides encoder info + * @syscap SystemCapability.Multimedia.Media.AVRecorder +@since 16 + * @version 1.0 + */ +typedef struct OH_AVRecorder_EncoderInfo { + /* encoder format MIME */ + OH_AVRecorder_CodecMimeType mimeType; + /* encoder type, audio or video */ + char *type; + /* audio or video encoder bitRate range */ + OH_AVRecorder_Range bitRate; + /* video encoder frame rate range */ + OH_AVRecorder_Range frameRate; + /* video encoder width range */ + OH_AVRecorder_Range width; + /* video encoder height range */ + OH_AVRecorder_Range height; + /* audio encoder channel range */ + OH_AVRecorder_Range channels; + /* audio encoder sample rate collection */ + int32_t *sampleRate; + /* length of sampleRate list */ + int32_t sampleRateLen; +} OH_AVRecorder_EncoderInfo; + +/** + * @brief Called when the state changed of current recording. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder The pointer to an OH_AVRecorder instance. + * @param state Indicates the recorder state. For details, see {@link OH_AVRecorder_State}. + * @param reason for recorder state change. For details, see {@link OH_AVRecorder_StateChangeReason}. + * @param userData Pointer to user specific data. +@since 16 + * @version 1.0 + */ +typedef void (*OH_AVRecorder_OnStateChange)(OH_AVRecorder *recorder, + OH_AVRecorder_State state, OH_AVRecorder_StateChangeReason reason, void *userData); + +/** + * @brief Called when an error occurred during recording + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance. + * @param errorCode Error code. + * @param errorMsg Error message. + * @param userData Pointer to user specific data. +@since 16 + * @version 1.0 + */ +typedef void (*OH_AVRecorder_OnError)(OH_AVRecorder *recorder, int32_t errorCode, const char *errorMsg, + void *userData); + +#ifdef __cplusplus +} +#endif + +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_BASE_H \ No newline at end of file -- Gitee From 142ba68a0fe4706606736c21872c5562f0374ef8 Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Sat, 28 Dec 2024 20:13:30 +0800 Subject: [PATCH 329/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0since?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index adf1c2cde..40efcb930 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -60,7 +60,10 @@ typedef enum { STYLISH = 1 << 2, /** Installed font types */ INSTALLED = 1 << 3, - /** Customized font types */ + /** + * Customized font types + * @since 16 + */ CUSTOMIZED = 1 << 4, } OH_Drawing_SystemFontType; -- Gitee From 1ea4a87a12bcb11b86f80f32a81e6a861d3ac14b Mon Sep 17 00:00:00 2001 From: liumingxiang Date: Sat, 28 Dec 2024 21:25:16 +0800 Subject: [PATCH 330/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 40efcb930..fbd6b51eb 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -60,10 +60,7 @@ typedef enum { STYLISH = 1 << 2, /** Installed font types */ INSTALLED = 1 << 3, - /** - * Customized font types - * @since 16 - */ + /** Customized font types */ CUSTOMIZED = 1 << 4, } OH_Drawing_SystemFontType; -- Gitee From 7e21a936d3663cfc6185bf411d1bad6705f3a7b1 Mon Sep 17 00:00:00 2001 From: yangxuguang-huawei Date: Sun, 29 Dec 2024 11:08:23 +0800 Subject: [PATCH 331/630] feat: change AbilityRuntime_Want to AbilityBase_Want Signed-off-by: yangxuguang-huawei Change-Id: I429d9add58a8aa545a65e4f306258d5dbd2ef61c --- AbilityKit/ability_runtime/application_context.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 41b340af9..c42fee6ca 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -217,7 +217,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCloudFileDir( * * @permission {@code ohos.permission.NDK_START_SELF_UI_ABILITY} * @param want The arguments passed to start self UIAbility. - * For details, see {@link AbilityRuntime_Want}. + * For details, see {@link AbilityBase_Want}. * @return Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the call is successful.\n * Returns {@link ABILITY_RUNTIME_ERROR_CODE_PERMISSION_DENIED} if the caller has no correct permission.\n * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INVALID_PARAM} if the arguments provided is invalid.\n @@ -236,7 +236,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCloudFileDir( * For details, see {@link AbilityRuntime_ErrorCode}. * @since 15 */ -AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbility(AbilityRuntime_Want *want); +AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbility(AbilityBase_Want *want); #ifdef __cplusplus } // extern "C" -- Gitee From a3287b166ff8a7bd3449a009432e8e6309b0cc1a Mon Sep 17 00:00:00 2001 From: liujiaxing19 Date: Mon, 30 Dec 2024 11:38:55 +0800 Subject: [PATCH 332/630] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujiaxing19 Change-Id: I1e94cdb053ee400bf5f265fd0486e2a509f7c8f3 --- hiviewdfx/hiappevent/include/hiappevent/hiappevent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index a159aae9b..05e13e7e7 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -812,7 +812,7 @@ int OH_HiAppEvent_RemoveProcessor(int64_t processorId); * @return Returns a pointer to the HiAppEvent_Config instance. * @since 16 */ -HiAppEvent_Config* OH_HiAppEvent_CreateConfig(); +HiAppEvent_Config* OH_HiAppEvent_CreateConfig(void); /** * @brief Destroy the specified HiAppEvent_Config handle resource. -- Gitee From 6fdef2e400550fe5b7c89d5bf741697a901f2393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=9E=97=E8=82=AF?= <735001321@qq.com> Date: Mon, 30 Dec 2024 07:46:14 +0000 Subject: [PATCH 333/630] update arkui/ace_engine/native/native_node.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹林肯 <735001321@qq.com> --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f416bffc8..51a0c93f2 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8134,7 +8134,7 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale(const ArkUI_SystemFontStyle float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontStyleEvent* event); /** - * @brief Get the node handle by id. This interface only works on the main thread. + * @brief Get the node handle by id. * * @param id The id of the target node handle. * @param node The handle of target node handle. -- Gitee From 06dfdd7978322a8027ac3b57d293bb1e174641a6 Mon Sep 17 00:00:00 2001 From: liumingxiang1 Date: Wed, 11 Dec 2024 20:45:28 +0800 Subject: [PATCH 334/630] =?UTF-8?q?word=20break=E6=96=B0=E5=A2=9E=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=EF=BC=9AWORD=5FBREAK=5FTYPE=5FBREAK=5FHYPHEN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingxiang1 --- graphic/graphic_2d/native_drawing/drawing_text_typography.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 275f0af37..ecac4517d 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -279,6 +279,11 @@ typedef enum { WORD_BREAK_TYPE_BREAK_ALL = 1, /** Break Word type */ WORD_BREAK_TYPE_BREAK_WORD = 2, + /** + * Break word with hyphens + * @since 16 + */ + WORD_BREAK_TYPE_BREAK_HYPHEN = 3, } OH_Drawing_WordBreakType; /** -- Gitee From ded35781108b12cd9eb0d28fd4eca3eb757a64d6 Mon Sep 17 00:00:00 2001 From: zhuhan Date: Tue, 17 Dec 2024 10:45:42 +0800 Subject: [PATCH 335/630] cwant Signed-off-by: zhuhan Change-Id: I9a4f52097d5d76fd51339b621c030aa149fed5f4 --- AbilityKit/ability_base/BUILD.gn | 34 ++++ AbilityKit/ability_base/ability_base_common.h | 61 +++++++ .../ability_base/libability_base_want.json | 34 ++++ AbilityKit/ability_base/want.h | 169 ++++++++++++++++++ ndk_targets.gni | 2 + 5 files changed, 300 insertions(+) create mode 100644 AbilityKit/ability_base/BUILD.gn create mode 100644 AbilityKit/ability_base/ability_base_common.h create mode 100644 AbilityKit/ability_base/libability_base_want.json create mode 100644 AbilityKit/ability_base/want.h diff --git a/AbilityKit/ability_base/BUILD.gn b/AbilityKit/ability_base/BUILD.gn new file mode 100644 index 000000000..7965528f8 --- /dev/null +++ b/AbilityKit/ability_base/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright (c) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") +ohos_ndk_headers("ability_base_want_ndk_header") { + dest_dir = "$ndk_headers_out_dir/AbilityKit/ability_base" + sources = [ + "./ability_base_common.h", + "./want.h", + ] +} + +ohos_ndk_library("libability_base_want") { + output_name = "ability_base_want" + output_extension = "so" + system_capability = "SystemCapability.Ability.AbilityBase" + ndk_description_file = "./libability_base_want.json" + min_compact_version = "15" + system_capability_headers = [ + "AbilityKit/ability_base/ability_base_common.h", + "AbilityKit/ability_base/want.h", + ] +} diff --git a/AbilityKit/ability_base/ability_base_common.h b/AbilityKit/ability_base/ability_base_common.h new file mode 100644 index 000000000..382f72910 --- /dev/null +++ b/AbilityKit/ability_base/ability_base_common.h @@ -0,0 +1,61 @@ +/* +* Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup AbilityBase + * @{ + * + * @brief Provide the definition of the C interface for the native AbilityBase + * + * @syscap SystemCapability.Ability.AbilityBase + * @since 15 + */ + +/** + * @file ability_base_common.h + * + * @brief Declare the common types for the native AbilityBase. + * + * @library libability_base_want.so + * @kit AbilityKit + * @syscap SystemCapability.Ability.AbilityBase + * @since 15 + */ + +#ifndef ABILITY_BASE_COMMON_H +#define ABILITY_BASE_COMMON_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumerates the error codes. + * + * @since 15 + */ +typedef enum { + /** @error No error. */ + ABILITY_BASE_ERROR_CODE_NO_ERROR = 0, + /** @error Invalid parameters. */ + ABILITY_BASE_ERROR_CODE_PARAM_INVALID = 401, +} AbilityBase_ErrorCode; + +#ifdef __cplusplus +} +#endif + +/** @} */ +#endif // ABILITY_BASE_COMMON_H diff --git a/AbilityKit/ability_base/libability_base_want.json b/AbilityKit/ability_base/libability_base_want.json new file mode 100644 index 000000000..efde6fe47 --- /dev/null +++ b/AbilityKit/ability_base/libability_base_want.json @@ -0,0 +1,34 @@ +[ + { + "first_introduced": "15", + "name": "OH_AbilityBase_CreateWant" + }, + { + "first_introduced": "15", + "name": "OH_AbilityBase_DestroyWant" + }, + { + "first_introduced": "15", + "name": "OH_AbilityBase_SetWantElement" + }, + { + "first_introduced": "15", + "name": "OH_AbilityBase_GetWantElement" + }, + { + "first_introduced": "15", + "name": "OH_AbilityBase_SetWantCharParam" + }, + { + "first_introduced": "15", + "name": "OH_AbilityBase_GetWantCharParam" + }, + { + "first_introduced": "15", + "name": "OH_AbilityBase_AddWantFd" + }, + { + "first_introduced": "15", + "name": "OH_AbilityBase_GetWantFd" + } +] \ No newline at end of file diff --git a/AbilityKit/ability_base/want.h b/AbilityKit/ability_base/want.h new file mode 100644 index 000000000..49110a541 --- /dev/null +++ b/AbilityKit/ability_base/want.h @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup AbilityBase + * @{ + * + * @brief Describe the functions of want. + * + * @syscap SystemCapability.Ability.AbilityBase + * @since 15 + */ + +/** + * @file want.h + * + * @brief Defines the want APIs. + * + * @library libability_base_want.so + * @kit AbilityKit + * @syscap SystemCapability.Ability.AbilityBase + * @since 15 + */ + +#ifndef ABILITY_BASE_WANT_H +#define ABILITY_BASE_WANT_H + +#include +#include +#include "ability_base_common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Indicates information of element. + * + * @since 15 + */ +typedef struct AbilityBase_Element { + /** Indicates the name of application. */ + char* bundleName; + /** Indicates the name of module. */ + char* moduleName; + /** Indicates the name of ability. */ + char* abilityName; +} AbilityBase_Element; + +struct AbilityBase_Want; +typedef struct AbilityBase_Want AbilityBase_Want; + +/** + * @brief Create want. + * + * @param element Information of element. + * @return Returns the newly created AbilityBase_Want object. + * + * @since 15 + */ +AbilityBase_Want* OH_AbilityBase_CreateWant(AbilityBase_Element element); + +/** + * @brief Destroy input want. + * + * @param want The want to be deleted. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the want is invalid. + * @since 15 + */ +AbilityBase_ErrorCode OH_AbilityBase_DestroyWant(AbilityBase_Want* want); + +/** + * @brief Set want element. + * + * @param want The want that needs to be set element. + * @param element Information of element. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the want is invalid. + * @since 15 + */ +AbilityBase_ErrorCode OH_AbilityBase_SetWantElement(AbilityBase_Want* want, AbilityBase_Element element); + +/** + * @brief Get want element. + * + * @param want The want for the element that has been obtained. + * @param element The element obtained from want. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the want or element is invalid. + * @since 15 + */ +AbilityBase_ErrorCode OH_AbilityBase_GetWantElement(AbilityBase_Want* want, AbilityBase_Element* element); + +/** + * @brief Set want char param. + * + * @param want The want needs to be set char param. + * @param key The key of char param. + * @param value The value of char param. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 15 + */ +AbilityBase_ErrorCode OH_AbilityBase_SetWantCharParam(AbilityBase_Want* want, const char* key, const char* value); + +/** + * @brief Get want char param. + * + * @param want The want for the char param that has been obtained. + * @param key The key of char param. + * @param value The value of char param. + * @param valueSize Size of the value. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 15 + */ +AbilityBase_ErrorCode OH_AbilityBase_GetWantCharParam(AbilityBase_Want* want, const char* key, + char* value, size_t valueSize); + +/** + * @brief Add fd to want. + * + * @param want The want needs to be add fd. + * @param key The key of the fd. + * @param fd File Descriptor. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 15 + */ +AbilityBase_ErrorCode OH_AbilityBase_AddWantFd(AbilityBase_Want* want, const char* key, int32_t fd); + +/** + * @brief Get fd from want. + * + * @param want The want that includes fd. + * @param key The key of the fd. + * @param fd File Descriptor. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 15 + */ +AbilityBase_ErrorCode OH_AbilityBase_GetWantFd(AbilityBase_Want* want, const char* key, int32_t* fd); + +#ifdef __cplusplus +} // extern "C" +#endif + +/** @} */ +#endif // ABILITY_BASE_WANT_H diff --git a/ndk_targets.gni b/ndk_targets.gni index a97312222..aaccc9a7d 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -55,6 +55,8 @@ _ndk_library_targets = [ "//interface/sdk_c/ability/ability_runtime/child_process:libchild_process", "//interface/sdk_c/AbilityKit/ability_runtime:ability_runtime_ndk_header", "//interface/sdk_c/AbilityKit/ability_runtime:libability_runtime", + "//interface/sdk_c/AbilityKit/ability_base:ability_base_want_ndk_header", + "//interface/sdk_c/AbilityKit/ability_base:libability_base_want", "//interface/sdk_c/arkui/ace_engine/native:ace_header", "//interface/sdk_c/arkui/ace_engine/native:arkui_header", "//interface/sdk_c/arkui/ace_engine/native:libace_ndk", -- Gitee From bf3e098c65bb8e8fe62c6a7621418b1127d50e4a Mon Sep 17 00:00:00 2001 From: kangchongtao Date: Mon, 30 Dec 2024 17:21:47 +0800 Subject: [PATCH 336/630] fix build bug Signed-off-by: kangchongtao --- third_party/node/BUILD.gn | 8 ++++---- third_party/node/src/js_native_api_types.h | 3 --- third_party/node/src/node_api.h | 8 ++++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/third_party/node/BUILD.gn b/third_party/node/BUILD.gn index 254f38555..8429a6bc3 100644 --- a/third_party/node/BUILD.gn +++ b/third_party/node/BUILD.gn @@ -16,9 +16,9 @@ import("//build/ohos.gni") ohos_ndk_headers("node_header") { dest_dir = "$ndk_headers_out_dir" sources = [ - "//third_party/node/src/js_native_api.h", - "//third_party/node/src/js_native_api_types.h", - "//third_party/node/src/node_api.h", - "//third_party/node/src/node_api_types.h", + "src/js_native_api.h", + "src/js_native_api_types.h", + "src/node_api.h", + "src/node_api_types.h", ] } diff --git a/third_party/node/src/js_native_api_types.h b/third_party/node/src/js_native_api_types.h index 74dc6d148..464d49832 100644 --- a/third_party/node/src/js_native_api_types.h +++ b/third_party/node/src/js_native_api_types.h @@ -93,11 +93,8 @@ typedef enum { napi_arraybuffer_expected, napi_detachable_arraybuffer_expected, napi_would_deadlock, // unused - // Created too many ark runtime environment, up to 16. napi_create_ark_runtime_too_many_envs = 22, - // Only one ark runtime environment can be created per thread. napi_create_ark_runtime_only_one_env_per_thread = 23, - // The ark runtime environment to be destroyed does not exist. napi_destroy_ark_runtime_env_not_exist = 24 } napi_status; // Note: when adding a new enum value to `napi_status`, please also update diff --git a/third_party/node/src/node_api.h b/third_party/node/src/node_api.h index f51d42c31..79371815e 100644 --- a/third_party/node/src/node_api.h +++ b/third_party/node/src/node_api.h @@ -14,8 +14,8 @@ /** * @brief Struct declaration used in the napi_get_uv_event_loop interface - * @deprecated since 12 - * @since since 8 + * @deprecated since 16 + * @since 8 */ struct uv_loop_s; // Forward declaration. @@ -190,8 +190,8 @@ napi_status napi_get_node_version(napi_env env, * @param env The environment that the API is invoked under. * @param loop The current libuv loop instance. * @return A napi_status value is returned, which is used to check whether the UV is successfully obtained. - * @deprecated since 12 - * @since since 8 + * @deprecated since 16 + * @since 8 */ NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env, struct uv_loop_s** loop); -- Gitee From 6a04b74d3e2dafed79cc1ba9494084187d7a3e89 Mon Sep 17 00:00:00 2001 From: eager1 Date: Fri, 27 Dec 2024 15:37:48 +0800 Subject: [PATCH 337/630] CAPI OH_ArkUI_NodeUtils_GetWindowName Signed-off-by: eager1 Change-Id: I9835676beb6f764af0169d923b2f90445aade19e --- arkui/ace_engine/native/libace.ndk.json | 12 ++++++++++++ arkui/ace_engine/native/native_node.h | 14 +++++++++++++ arkui/ace_engine/native/native_type.h | 26 +++++++++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 44a9f81ca..db58aabfa 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1327,6 +1327,10 @@ "first_introduced": "14", "name": "OH_ArkUI_NodeUtils_GetNodeType" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_GetWindowInfo" + }, { "first_introduced": "14", "name": "OH_ArkUI_CustomProperty_Destroy" @@ -2550,5 +2554,13 @@ { "first_introduced": "16", "name": "OH_ArkUI_PostFrameCallback" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_HostWindowInfo_GetName" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_HostWindowInfo_Destroy" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 22d56c281..41b810749 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8089,6 +8089,20 @@ bool OH_ArkUI_NodeUtils_IsCreatedByNDK(ArkUI_NodeHandle node); */ int32_t OH_ArkUI_NodeUtils_GetNodeType(ArkUI_NodeHandle node); +/** + * @brief Get info of the window to which the node belongs. + * + * @param node Target node object. + * @param info Window info. Use {@link OH_ArkUI_HostWindowInfo_Destroy} to release memory. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} C-API initialization error. + * {@link ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE} The node is not mounted. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_GetWindowInfo(ArkUI_NodeHandle node, ArkUI_HostWindowInfo** info); + /** * @brief Collapse the ListItem in its expanded state. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 18f28994e..aa874a04d 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -200,6 +200,13 @@ typedef struct ArkUI_AccessibilityValue ArkUI_AccessibilityValue; */ typedef struct ArkUI_CustomProperty ArkUI_CustomProperty; +/** + * @brief Define the information of the HostWindowInfo class for window properties. + * + * @since 16 + */ +typedef struct ArkUI_HostWindowInfo ArkUI_HostWindowInfo; + /** * @brief Define ActiveChildenInfo class information. * @@ -1965,6 +1972,8 @@ typedef enum { ARKUI_ERROR_CODE_GET_INFO_FAILED = 106201, /** The buffer size is not large enough. */ ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR = 106202, + /** The node is not on main tree. */ + ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE = 106203, /** The component is not a scroll container. */ ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER = 180001, /** The buffer is not large enough. */ @@ -4014,6 +4023,23 @@ void OH_ArkUI_CustomProperty_Destroy(ArkUI_CustomProperty* handle); */ const char* OH_ArkUI_CustomProperty_GetStringValue(ArkUI_CustomProperty* handle); +/** + * @brief Get window name from HostWindowInfo. + * + * @param info HostWindowInfo object pointer. + * @return Window name in HostWindowInfo. + * @since 16 + */ +const char* OH_ArkUI_HostWindowInfo_GetName(ArkUI_HostWindowInfo* info); + +/** + * @brief Destroy the instance of HostWindowInfo. + * + * @param info Instance of HostWindowInfo to be destroyed. + * @since 16 + */ +void OH_ArkUI_HostWindowInfo_Destroy(ArkUI_HostWindowInfo* info); + /** * @brief Destroy ActiveChildenInfo instance. * -- Gitee From ac3aecba74db837ffdd5d8d79159fed6be592c4a Mon Sep 17 00:00:00 2001 From: qiu_yu_jia Date: Thu, 19 Dec 2024 16:18:50 +0800 Subject: [PATCH 338/630] deprecated get_device_api_version interface Signed-off-by: qiu_yu_jia --- third_party/musl/ndk_musl_include/info/device_api_version.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/third_party/musl/ndk_musl_include/info/device_api_version.h b/third_party/musl/ndk_musl_include/info/device_api_version.h index 1708aa441..20f22c077 100644 --- a/third_party/musl/ndk_musl_include/info/device_api_version.h +++ b/third_party/musl/ndk_musl_include/info/device_api_version.h @@ -22,7 +22,10 @@ extern "C" { /** * @brief Get the api version number of the device. + * Note: the interface function is not implemented. * @return The api version number of the device. + * @since 12 + * @deprecated since 15 */ int get_device_api_version(void); -- Gitee From 30fd7d11107dfe84e29ce7c72e17d20fd61520a4 Mon Sep 17 00:00:00 2001 From: Zhang Jinyu Date: Wed, 1 Jan 2025 14:47:48 +0800 Subject: [PATCH 339/630] =?UTF-8?q?DatePicker=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=85=8D=E7=BD=AE=E8=A6=81=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E5=88=97C=E6=8E=A5=E5=8F=A3=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhang Jinyu --- arkui/ace_engine/native/native_node.h | 13 +++++++++++++ arkui/ace_engine/native/native_type.h | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d62a76a0a..5d7afe068 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3711,6 +3711,19 @@ typedef enum { * */ NODE_DATE_PICKER_SELECTED_TEXT_STYLE, + /** + * @brief Defines the mode of the date picker. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * value[0].i32: the mode. The value is and enum of {@link ArkUI_DatePickerMode}.\n. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: the mode. The value is and enum of {@link ArkUI_DatePickerMode}.\n. + * + * @since 16 + */ + NODE_DATE_PICKER_MODE = 13007, /** * @brief Defines the time of the selected item. in the timer picker. * This attribute can be set, reset, and obtained as required through APIs. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 18f28994e..05352dd08 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -535,6 +535,20 @@ typedef enum { ARKUI_SHADOW_TYPE_BLUR } ArkUI_ShadowType; +/** + * @brief Enumerates the modes of the date picker. + * + * @since 16 + */ +typedef enum { + /** A mode that displays the date in months, days of month, and years. */ + ARKUI_DATEPICKER_MODE_DATE = 0, + /** A mode that displays the date in months and years. */ + ARKUI_DATEPICKER_YEAR_AND_MONTH = 1, + /** A mode that displays the date in months and days of the month. */ + ARKUI_DATEPICKER_MONTH_AND_DAY = 2, +} ArkUI_DatePickerMode; + /** * @brief Enumerates the types of the text picker. * -- Gitee From 48f8f4e563ca68b13102664545b0a877f1f0747d Mon Sep 17 00:00:00 2001 From: sunxuejiao Date: Thu, 12 Dec 2024 16:52:02 +0800 Subject: [PATCH 340/630] feat: add pasteboard progress interface Signed-off-by: sunxuejiao --- .../pasteboard/include/oh_pasteboard.h | 128 ++++++++++++++++++ .../include/oh_pasteboard_err_code.h | 20 +++ .../pasteboard/libpasteboard.ndk.json | 4 + 3 files changed, 152 insertions(+) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 15d489623..9b68da156 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -63,6 +63,120 @@ typedef enum Pasteboard_NotifyType { NOTIFY_REMOTE_DATA_CHANGE = 2 } Pasteboard_NotifyType; +/** + * @brief Enumerates the types of file confilct options when getting data from the Pastedboard. + * + * @since 15 + */ +typedef enum Pasteboard_FileConflictOption { + /** + * @brief Overwrite when destUir has file with same name. + */ + OH_PASTEBOARD_OVERWRITE = 0, + /** + * @brief Skip when destUir has file with same name. + */ + OH_PASTEBOARD_SKIP = 1 +} Pasteboard_FileConflictOption; + +/** + * @brief Enumerates the types of progress indicator when getting data from the Pastedboard. + * + * @since 15 + */ +typedef enum Pasteboard_ProgressIndicator { + /** + * @brief Getting data without system default progress indicator. + */ + OH_PASTEBOARD_NONE = 0, + /** + * @brief Getting data with system default progress indicator. + */ + OH_PASTEBOARD_DEFAULT = 1 +} Pasteboard_ProgressIndicator; + +/** + * @brief Represents the Pasteboard progress information. + * + * @since 15 + */ +typedef struct Pasteboard_ProgressInfo { + /** Percentage of progress when getting PasteData without using default system progress. + */ + int progress; +} Pasteboard_ProgressInfo; + +/** + * @brief Defines the callback function used to return the progress information when getting OH_UdmfData. + * + * @param progressInfo The progress information notified to Application. + * @since 15 + */ +typedef void (*Pasteboard_ProgressNotify)(Pasteboard_ProgressInfo progressInfo); + +/** + * @brief Represents the Pasteboard progress listener when getting OH_UdmfData. + * + * @since 15 + */ +typedef struct Pasteboard_ProgressListener { + /** + * Indicates the callback function used to return the progress information. + */ + Pasteboard_ProgressNotify callback; +} Pasteboard_ProgressListener; + +/** + * @brief Defines the cancel function used to cancel the progress when getting OH_PasteData. + * + * @since 15 + */ +typedef void (*Pasteboard_ProgressCancel)(void); + +/** + * brief Represents the Pasteboard progress signal when getting data. + * + * @since 15 + */ +typedef struct Pasteboard_ProgressSignal { + /** + * Indicates the signal function used to cancel the progress process. + */ + Pasteboard_ProgressCancel cancel; +} Pasteboard_ProgressSignal; + +/** + * @brief Represents the pasteboard get data parameters when getting data from Pasteboard. + * + * @param destUri Indicates the uri of dest path where copy file will be copied to in sandbox of Application. + * @param destUriLen Indicates the length of destUir. + * @param fileConflictOption Indicates fileConflictOption when dest path has file with same name. + * @param progressIndicator Indicates whether to use default system progress indacator. + * @param progressListener Indicates the progress listener when getting PasteData without using default system progress. + * @param progressSignal Indicates progress signal when getting PasteData with system progress indacator. + * @since 15 + */ +typedef struct OH_Pasteboard_GetDataParams { + /** Indicates the uri of dest path where copy files will be copied to sandbox of Application. + */ + char *destUri; + /** Indicates the length of destUir. + */ + unsigned int destUriLen; + /** Indicates fileConflictOptions when dest path has file with same name. + */ + Pasteboard_FileConflictOption fileConflictOption; + /** Indicates whether to use default system progress indicator. + */ + Pasteboard_ProgressIndicator progressIndicator; + /** Indicates the progress listener when getting PasteData without using default system progress. + */ + Pasteboard_ProgressListener progressListener; + /** Indicates progress signal when getting PasteData with system progress indacator. + */ + Pasteboard_ProgressSignal progressSignal; +} OH_Pasteboard_GetDataParams; + /** * @brief Defines the callback function used to return the Pasteboard data changed. * @@ -279,6 +393,20 @@ int OH_Pasteboard_ClearData(OH_Pasteboard* pasteboard); * @since 14 */ char **OH_Pasteboard_GetMimeTypes(OH_Pasteboard *pasteboard, unsigned int *count); + +/** + * @brief Obtains data from the Pasteboard with system progress indicator. + * + * @permission ohos.permission.READ_PASTEBOARD + * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. + * @param params Pointer to indicates the {@link OH_Pasteboard_GetDataParams}. + * @param status The status code of the execution. For details, see {@link PASTEBOARD_Errcode}. + * @return Returns the pointer to the {@link OH_PasteData} instance. + * @see OH_Pasteboard OH_PasteData PASTEBOARD_ErrCode. + * @since 15 + */ +OH_UdmfData *OH_Pasteboard_GetDataWithProgress(OH_Pasteboard *pasteboard, OH_Pasteboard_GetDataParams *params, + int *status); #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h index 36f30f1a9..aafcb849d 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h @@ -74,6 +74,26 @@ typedef enum PASTEBOARD_ErrCode { * @error Another copy is in progress. */ ERR_BUSY = 12900003, + /** + * @error Copy file failed. + * @since 15 + */ + OH_PASTEBOARD_COPY_FILE_ERROR = 12900007, + /** + * @error Failed to start progress. + * @since 15 + */ + OH_PASTEBOARD_PROGRESS_START_ERROR = 12900008, + /** + * @error Progress exits abnormally. + * @since 15 + */ + OH_PASTEBOARD_PROGRESS_ABNORMAL = 12900009, + /** + * @error Get Data failed. + * @since 15 + */ + OH_PASTEBOARD_GET_DATA_FAILED = 12900010, } PASTEBOARD_ErrCode; #ifdef __cplusplus }; diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index c47c8a475..3e66a29f4 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -58,5 +58,9 @@ { "first_introduced": "14", "name": "OH_Pasteboard_GetMimeTypes" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_GetDataWithProgress" } ] \ No newline at end of file -- Gitee From 6024adeffa40b84ab006a04b344d7e8a2026cde6 Mon Sep 17 00:00:00 2001 From: yangxuguang-huawei Date: Thu, 2 Jan 2025 11:23:04 +0800 Subject: [PATCH 341/630] feat: update include Signed-off-by: yangxuguang-huawei Change-Id: Ib2ffabfda630039bbecc3b353a1d0ed57e31f95b --- AbilityKit/ability_runtime/application_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index c42fee6ca..b6813877a 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -39,7 +39,7 @@ #include #include -#include +#include #include "ability_runtime_common.h" #include "context_constant.h" -- Gitee From c83b0b1c936d6af8e49748131fdba8aaba0d02a3 Mon Sep 17 00:00:00 2001 From: yangxiaodong Date: Mon, 30 Dec 2024 20:54:17 +0800 Subject: [PATCH 342/630] modify comment Signed-off-by: yangxiaodong --- distributeddatamgr/pasteboard/include/oh_pasteboard.h | 10 ++++++++++ distributeddatamgr/pasteboard/libpasteboard.ndk.json | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 15d489623..9619d07c0 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -279,6 +279,16 @@ int OH_Pasteboard_ClearData(OH_Pasteboard* pasteboard); * @since 14 */ char **OH_Pasteboard_GetMimeTypes(OH_Pasteboard *pasteboard, unsigned int *count); + +/** + * @brief Gets the number of Pasteboard data changes. + * + * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. + * @return the number of Pasteboard data changes. + * Returns 0 means initial value or invalid value.In this case, no action is required. + * @since 16 + */ +uint32_t OH_Pasteboard_GetChangeCount(OH_Pasteboard *pasteboard); #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index c47c8a475..f271cbd4a 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -58,5 +58,9 @@ { "first_introduced": "14", "name": "OH_Pasteboard_GetMimeTypes" + }, + { + "first_introduced": "16", + "name": "OH_Pasteboard_GetChangeCount" } ] \ No newline at end of file -- Gitee From 307bac5f4c46e9e99ac5610f99ae60dc89ed5bf3 Mon Sep 17 00:00:00 2001 From: peng Date: Thu, 2 Jan 2025 07:58:35 +0000 Subject: [PATCH 343/630] add muxer ndk json Signed-off-by: peng --- multimedia/av_codec/avmuxer/libnative_media_avmuxer.ndk.json | 4 ++++ .../av_codec/codec_base/libnative_media_codecbase.ndk.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/multimedia/av_codec/avmuxer/libnative_media_avmuxer.ndk.json b/multimedia/av_codec/avmuxer/libnative_media_avmuxer.ndk.json index 097dd37d0..bd99200d2 100644 --- a/multimedia/av_codec/avmuxer/libnative_media_avmuxer.ndk.json +++ b/multimedia/av_codec/avmuxer/libnative_media_avmuxer.ndk.json @@ -7,6 +7,10 @@ "first_introduced": "10", "name": "OH_AVMuxer_SetRotation" }, + { + "first_introduced": "14", + "name": "OH_AVMuxer_SetFormat" + }, { "first_introduced": "10", "name": "OH_AVMuxer_AddTrack" diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 715c18d86..5ddaeb1a0 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -395,6 +395,10 @@ "first_introduced": "14", "name": "OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR" }, + { + "first_introduced": "14", + "name": "OH_MD_KEY_CREATION_TIME" + }, { "first_introduced": "10", "name": "OH_AVCodec_GetCapability" -- Gitee From b4b24548a45bc263176f8a57cc3b7af3f24450cf Mon Sep 17 00:00:00 2001 From: z00544238 Date: Sat, 21 Dec 2024 20:07:56 +0800 Subject: [PATCH 344/630] rdb transaction ndk interface Signed-off-by: z00544238 --- distributeddatamgr/relational_store/BUILD.gn | 14 +- .../relational_store/include/oh_cursor.h | 41 +- .../relational_store/include/oh_data_value.h | 452 +++++++++++++ .../relational_store/include/oh_data_values.h | 443 +++++++++++++ .../include/oh_data_values_buckets.h | 117 ++++ .../include/oh_rdb_transaction.h | 347 ++++++++++ .../include/oh_values_bucket.h | 31 + .../include/relational_store.h | 28 + .../include/relational_store_error_code.h | 107 ++- .../relational_store/libnative_rdb.ndk.json | 622 ++++++++++++++---- 10 files changed, 2041 insertions(+), 161 deletions(-) create mode 100644 distributeddatamgr/relational_store/include/oh_data_value.h create mode 100644 distributeddatamgr/relational_store/include/oh_data_values.h create mode 100644 distributeddatamgr/relational_store/include/oh_data_values_buckets.h create mode 100644 distributeddatamgr/relational_store/include/oh_rdb_transaction.h diff --git a/distributeddatamgr/relational_store/BUILD.gn b/distributeddatamgr/relational_store/BUILD.gn index a720869f7..203e78f46 100644 --- a/distributeddatamgr/relational_store/BUILD.gn +++ b/distributeddatamgr/relational_store/BUILD.gn @@ -20,6 +20,7 @@ ohos_ndk_headers("native_rdb_ndk_header") { sources = [ "./include/oh_cursor.h", "./include/oh_predicates.h", + "./include/oh_rdb_transaction.h", "./include/oh_value_object.h", "./include/oh_values_bucket.h", "./include/relational_store.h", @@ -29,7 +30,12 @@ ohos_ndk_headers("native_rdb_ndk_header") { ohos_ndk_headers("data_ndk_header") { dest_dir = "$ndk_headers_out_dir/database/data/" - sources = [ "./include/data_asset.h" ] + sources = [ + "./include/data_asset.h", + "./include/oh_data_value.h", + "./include/oh_data_values.h", + "./include/oh_data_values_buckets.h", + ] } ohos_ndk_library("libnative_rdb_ndk") { @@ -40,11 +46,15 @@ ohos_ndk_library("libnative_rdb_ndk") { min_compact_version = "11" system_capability_headers = [ "$ndk_headers_out_dir/database/data/data_asset.h", + "$ndk_headers_out_dir/database/data/oh_data_value.h", + "$ndk_headers_out_dir/database/data/oh_data_values.h", + "$ndk_headers_out_dir/database/data/oh_data_values_buckets.h", "$ndk_headers_out_dir/database/rdb/oh_cursor.h", "$ndk_headers_out_dir/database/rdb/oh_predicates.h", + "$ndk_headers_out_dir/database/rdb/oh_rdb_transaction.h", "$ndk_headers_out_dir/database/rdb/oh_value_object.h", "$ndk_headers_out_dir/database/rdb/oh_values_bucket.h", "$ndk_headers_out_dir/database/rdb/relational_store.h", "$ndk_headers_out_dir/database/rdb/relational_store_error_code.h", ] -} +} \ No newline at end of file diff --git a/distributeddatamgr/relational_store/include/oh_cursor.h b/distributeddatamgr/relational_store/include/oh_cursor.h index 0785f850e..2f8c2a5ae 100644 --- a/distributeddatamgr/relational_store/include/oh_cursor.h +++ b/distributeddatamgr/relational_store/include/oh_cursor.h @@ -48,50 +48,11 @@ #include #include #include "database/data/data_asset.h" +#include "database/data/oh_data_value.h" #ifdef __cplusplus extern "C" { #endif -/** - * @brief Indicates the column type. - * - * @since 10 - */ -typedef enum OH_ColumnType { - /** - * Indicates the column type is NULL. - */ - TYPE_NULL = 0, - /** - * Indicates the column type is INT64. - */ - TYPE_INT64, - /** - * Indicates the column type is REAL. - */ - TYPE_REAL, - /** - * Indicates the column type is TEXT. - */ - TYPE_TEXT, - /** - * Indicates the column type is BLOB. - */ - TYPE_BLOB, - /** - * Indicates the column type is {@link Data_Asset}. - * - * @since 11 - */ - TYPE_ASSET, - /** - * Indicates the column type is array of {@link Data_Asset}. - * - * @since 11 - */ - TYPE_ASSETS -} OH_ColumnType; - /** * @brief Define the OH_Cursor structure type. * diff --git a/distributeddatamgr/relational_store/include/oh_data_value.h b/distributeddatamgr/relational_store/include/oh_data_value.h new file mode 100644 index 000000000..efdd3a2f5 --- /dev/null +++ b/distributeddatamgr/relational_store/include/oh_data_value.h @@ -0,0 +1,452 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup RDB + * @{ + * + * @brief The relational database (RDB) store manages data based on relational models. + * With the underlying SQLite database, the RDB store provides a complete mechanism for managing local databases. + * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations + * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. + * + * @since 10 + */ + +/** + * @file oh_data_value.h + * + * @brief Provides functions and enumerations related to the data value. + * + * @kit ArkData + * @library libnative_rdb_ndk.z.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * + * @since 16 + */ + +#ifndef OH_DATA_VALUE_H +#define OH_DATA_VALUE_H + +#include +#include "database/data/data_asset.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Indicates the column type. + * + * @since 10 + */ +typedef enum OH_ColumnType { + /** + * @brief Indicates the column type is NULL. + * + * @since 10 Moved from oh_cursor.h file. + */ + TYPE_NULL = 0, + /** + * @brief Indicates the column type is INT64. + * + * @since 10 Moved from oh_cursor.h file. + */ + TYPE_INT64, + /** + * @brief Indicates the column type is REAL. + * + * @since 10 Moved from oh_cursor.h file. + */ + TYPE_REAL, + /** + * @brief Indicates the column type is TEXT. + * + * @since 10 Moved from oh_cursor.h file. + */ + TYPE_TEXT, + /** + * @brief Indicates the column type is BLOB. + * + * @since 10 Moved from oh_cursor.h file. + */ + TYPE_BLOB, + /** + * @brief Indicates the column type is {@link Data_Asset}. + * + * @since 11 Moved from oh_cursor.h file. + */ + TYPE_ASSET, + /** + * @brief Indicates the column type is array of {@link Data_Asset}. + * + * @since 11 Moved from oh_cursor.h file. + */ + TYPE_ASSETS, + /** + * @brief Indicates the column type is FLOAT VECTOR. + * + * @since 16 + */ + TYPE_FLOAT_VECTOR, + /** + * @brief Indicates that the column type is a number whose length is greater than 64 bits. + * + * @since 16 + */ + TYPE_UNLIMITED_INT, +} OH_ColumnType; + +/** + * @brief Define the OH_Data_Value structure type. + * + * @since 16 + */ +typedef struct OH_Data_Value OH_Data_Value; + +/** + * @brief Creates an OH_Data_Value instance object. + * + * @return Returns a pointer to OH_Data_Value instance when the execution is successful. + * Otherwise, nullptr is returned. The memory must be released through the OH_Value_Destroy + * interface after the use is complete. + * @see OH_Value_Destroy. + * @since 16 + */ +OH_Data_Value *OH_Value_Create(); + +/** + * @brief Destroys an OH_Data_Value instance object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_Destroy(OH_Data_Value *value); + +/** + * @brief Set empty data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutNull(OH_Data_Value *value); + +/** + * @brief Set integer data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a integer data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutInt(OH_Data_Value *value, int64_t val); + +/** + * @brief Set decimal data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a decimal data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutReal(OH_Data_Value *value, double val); + +/** + * @brief Set string data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a string data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutText(OH_Data_Value *value, const char *val); + +/** + * @brief Set binary data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a binary data. + * @param length Represents the size of binary data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutBlob(OH_Data_Value *value, const unsigned char *val, size_t length); + +/** + * @brief Set Data_Asset data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to an instance of Data_Asset. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutAsset(OH_Data_Value *value, const Data_Asset *val); + +/** + * @brief Set multiple Data_Asset data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to multiple Data_Asset. + * @param length Represents the count of multiple data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutAssets(OH_Data_Value *value, const Data_Asset * const * val, size_t length); + +/** + * @brief Set float array data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to float array. + * @param length Represents the size of float array. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutFloatVector(OH_Data_Value *value, const float *val, size_t length); + +/** + * @brief Set an integer of any length data to the OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param sign Represents 0 is positive integer, 1 is negative integer. + * @param trueForm Represents a pointer to integer array. + * @param length Represents the size of integer array. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_PutUnlimitedInt(OH_Data_Value *value, int sign, const uint64_t *trueForm, size_t length); + +/** + * @brief Get data type from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param type Represents the parameter of the data type. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_GetType(OH_Data_Value *value, OH_ColumnType *type); + +/** + * @brief Check whether the data is empty from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents empty data flag. It is an output parameter. Ture is empty, false is not empty. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Value_IsNull(OH_Data_Value *value, bool *val); + +/** + * @brief Get integer data from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to an integer data. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetInt(OH_Data_Value *value, int64_t *val); + +/** + * @brief Get decimal data from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to an decimal data. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetReal(OH_Data_Value *value, double *val); + +/** + * @brief Get string data from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to a string data. It is an output parameter. + * The caller does not need to apply for memory and release memory. The life cycle of val follows value. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetText(OH_Data_Value *value, const char **val); + +/** + * @brief Get binary data from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to a binary data. It is an output parameter. + * The caller does not need to apply for memory and release memory. The life cycle of val follows value. + * @param length Represents the size of binary array. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetBlob(OH_Data_Value *value, const uint8_t **val, size_t *length); + +/** + * @brief Get Data_Asset data from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to an instance of Data_Asset. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetAsset(OH_Data_Value *value, Data_Asset *val); + +/** + * @brief Get multiple Data_Asset size from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param length Represents the size of Data_Asset array. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetAssetsCount(OH_Data_Value *value, size_t *length); + +/** + * @brief Get multiple Data_Asset data from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to Data_Asset array. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @param inLen Represents the size of val. It can be obtained through the OH_Value_GetAssetsCount function. + * @param outLen Represents the actual amount of data obtained. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @see OH_Value_GetAssetsCount. + * @since 16 + */ +int OH_Value_GetAssets(OH_Data_Value *value, Data_Asset **val, size_t inLen, size_t *outLen); + +/** + * @brief Get float array data size from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param length Represents the size of float array. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetFloatVectorCount(OH_Data_Value *value, size_t *length); + +/** + * @brief Get float array from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param val Represents a pointer to float array. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @param inLen Represents the size of val. It can be obtained through the OH_Value_GetFloatVectorCount function. + * @param outLen Represents the actual amount of data obtained. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @see OH_Value_GetFloatVectorCount. + * @since 16 + */ +int OH_Value_GetFloatVector(OH_Data_Value *value, float *val, size_t inLen, size_t *outLen); + +/** + * @brief Get an integer of any length data size from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param length Represents the size of integer array. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Value_GetUnlimitedIntBand(OH_Data_Value *value, size_t *length); + +/** + * @brief Get an integer of any length data from OH_Data_Value object. + * + * @param value Represents a pointer to an instance of OH_Data_Value. + * @param sign Represents 0 is positive integer, 1 is negative integer. It is an output parameter. + * @param trueForm Represents a pointer to integer array. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @param inLen Represents the size of trueForm. It can be obtained through the OH_Value_GetUnlimitedIntBand function. + * @param outLen Represents the actual amount of data obtained. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @see OH_Value_GetUnlimitedIntBand. + * @since 16 + */ +int OH_Value_GetUnlimitedInt(OH_Data_Value *value, int *sign, uint64_t *trueForm, size_t inLen, size_t *outLen); + +#ifdef __cplusplus +}; +#endif +#endif +/** @} */ \ No newline at end of file diff --git a/distributeddatamgr/relational_store/include/oh_data_values.h b/distributeddatamgr/relational_store/include/oh_data_values.h new file mode 100644 index 000000000..791c7d0f8 --- /dev/null +++ b/distributeddatamgr/relational_store/include/oh_data_values.h @@ -0,0 +1,443 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup RDB + * @{ + * + * @brief The relational database (RDB) store manages data based on relational models. + * With the underlying SQLite database, the RDB store provides a complete mechanism for managing local databases. + * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations + * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. + * + * @since 10 + */ + +/** + * @file oh_data_values.h + * + * @brief Provides functions and enumerations related to the data values. + * + * @kit ArkData + * @library libnative_rdb_ndk.z.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * + * @since 16 + */ +#ifndef OH_DATA_VALUES_H +#define OH_DATA_VALUES_H +#include + +#include "database/data/data_asset.h" +#include "database/data/oh_data_value.h" +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Define the OH_Data_Values structure type. + * + * @since 16 + */ +typedef struct OH_Data_Values OH_Data_Values; + +/** + * @brief Creates an OH_Data_Values instance object. + * + * @return Returns a pointer to OH_Data_Values instance when the execution is successful. + * Otherwise, nullptr is returned. The memory must be released through the OH_Values_Destroy + * interface after the use is complete. + * @see OH_Values_Destroy. + * @since 16 + */ +OH_Data_Values *OH_Values_Create(); + +/** + * @brief Destroys an OH_Data_Values instance object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_Destroy(OH_Data_Values *values); + +/** + * @brief Add OH_Data_Value data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a pointer to an instance of OH_Data_Value. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_Put(OH_Data_Values *values, const OH_Data_Value *val); + +/** + * @brief Add empty data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutNull(OH_Data_Values *values); + +/** + * @brief Add integer data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a integer data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutInt(OH_Data_Values *values, int64_t val); + +/** + * @brief Add decimal data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a decimal data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutReal(OH_Data_Values *values, double val); + +/** + * @brief Add string data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a string data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutText(OH_Data_Values *values, const char *val); + +/** + * @brief Add binary data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a binary data. + * @param length Represents the size of binary data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutBlob(OH_Data_Values *values, const unsigned char *val, size_t length); + +/** + * @brief Add Data_Asset data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a pointer to an instance of Data_Asset. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutAsset(OH_Data_Values *values, const Data_Asset *val); + +/** + * @brief Add multiple Data_Asset data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a pointer to multiple Data_Asset. + * @param length Represents the count of multiple data. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutAssets(OH_Data_Values *values, const Data_Asset * const * val, size_t length); + +/** + * @brief Add float array data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param val Represents a pointer to float array. + * @param length Represents the size of float array. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutFloatVector(OH_Data_Values *values, const float *val, size_t length); + +/** + * @brief Add an integer of any length data to the OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param sign Represents 0 is positive integer, 1 is negative integer. + * @param trueForm Represents a pointer to integer array. + * @param length Represents the size of integer array. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_PutUnlimitedInt(OH_Data_Values *values, int sign, const uint64_t *trueForm, size_t length); + +/** + * @brief Get data count from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param count Represents the count of data in values. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_Count(OH_Data_Values *values, size_t *count); + +/** + * @brief Get data type from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param type Represents the parameter of the data type. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_GetType(OH_Data_Values *values, int index, OH_ColumnType *type); + +/** + * @brief Get OH_Data_Value data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to an instance of OH_Data_Value. It is an output parameter. + * The caller does not need to apply for memory and release memory. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_Get(OH_Data_Values *values, int index, OH_Data_Value **val); + +/** + * @brief Check whether the data is empty from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents empty data flag. It is an output parameter. Ture is empty, false is not empty. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_Values_IsNull(OH_Data_Values *values, int index, bool *val); + +/** + * @brief Get integer data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to an integer data. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetInt(OH_Data_Values *values, int index, int64_t *val); + +/** + * @brief Get decimal data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to an decimal data. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetReal(OH_Data_Values *values, int index, double *val); + +/** + * @brief Get string data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to a string data. It is an output parameter. + * The caller does not need to apply for memory and release memory. + * The life cycle of val follows the value of index in values. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetText(OH_Data_Values *values, int index, const char **val); + +/** + * @brief Get binary data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to a binary data. It is an output parameter. + * The caller does not need to apply for memory and release memory. + * The life cycle of val follows the value of index in values. + * @param length Represents the size of binary array. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetBlob(OH_Data_Values *values, int index, const uint8_t **val, size_t *length); + +/** + * @brief Get Data_Asset data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to an instance of Data_Asset. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetAsset(OH_Data_Values *values, int index, Data_Asset *val); + +/** + * @brief Get multiple Data_Asset size from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param length Represents the size of Data_Asset array. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetAssetsCount(OH_Data_Values *values, int index, size_t *length); + +/** + * @brief Get multiple Data_Asset data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to Data_Asset array. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @param inLen Represents the size of val. It can be obtained through the OH_Values_GetAssetsCount function. + * @param outLen Represents the actual amount of data obtained. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @see OH_Values_GetAssetsCount. + * @since 16 + */ +int OH_Values_GetAssets(OH_Data_Values *values, int index, Data_Asset **val, size_t inLen, size_t *outLen); + +/** + * @brief Get float array data size from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param length Represents the size of float array. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetFloatVectorCount(OH_Data_Values *values, int index, size_t *length); + +/** + * @brief Get float array from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param val Represents a pointer to float array. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @param inLen Represents the size of val. It can be obtained through the OH_Values_GetFloatVectorCount function. + * @param outLen Represents the actual amount of data obtained. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @see OH_Values_GetFloatVectorCount. + * @since 16 + */ +int OH_Values_GetFloatVector(OH_Data_Values *values, int index, float *val, size_t inLen, size_t *outLen); + +/** + * @brief Get an integer of any length data size from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param length Represents the size of integer array. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @since 16 + */ +int OH_Values_GetUnlimitedIntBand(OH_Data_Values *values, int index, size_t *length); + +/** + * @brief Get an integer of any length data from OH_Data_Values object. + * + * @param values Represents a pointer to an instance of OH_Data_Values. + * @param index Represents the zero-based index of target data in values. + * @param sign Represents 0 is positive integer, 1 is negative integer. It is an output parameter. + * @param trueForm Represents a pointer to integer array. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @param inLen Represents the size of trueForm. It can be obtained through the OH_Values_GetUnlimitedIntBand function. + * @param outLen Represents the actual amount of data obtained. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. + * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. + * @see OH_Values_GetUnlimitedIntBand. + * @since 16 + */ +int OH_Values_GetUnlimitedInt(OH_Data_Values *values, int index, int *sign, uint64_t *trueForm, size_t inLen, + size_t *outLen); + +#ifdef __cplusplus +}; +#endif +#endif +/** @} */ \ No newline at end of file diff --git a/distributeddatamgr/relational_store/include/oh_data_values_buckets.h b/distributeddatamgr/relational_store/include/oh_data_values_buckets.h new file mode 100644 index 000000000..46cfc4b8d --- /dev/null +++ b/distributeddatamgr/relational_store/include/oh_data_values_buckets.h @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup RDB + * @{ + * + * @brief The relational database (RDB) store manages data based on relational models. + * With the underlying SQLite database, the RDB store provides a complete mechanism for managing local databases. + * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations + * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. + * + * @since 10 + */ + +/** + * @file oh_data_values_buckets.h + * + * @brief Provides functions and enumerations related to the data value buckets. + * + * @kit ArkData + * @library libnative_rdb_ndk.z.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * + * @since 16 + */ + + +#ifndef OH_VALUES_BUCKETS_H +#define OH_VALUES_BUCKETS_H +#include "database/rdb/oh_values_bucket.h" +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Define the OH_Data_VBuckets structure type. + * + * @since 16 + */ +typedef struct OH_Data_VBuckets OH_Data_VBuckets; + +/** + * @brief Creates an OH_Data_VBuckets instance object. + * + * @return Returns a pointer to OH_Data_VBuckets instance when the execution is successful. + * Otherwise, nullptr is returned. The memory must be released through the OH_VBuckets_Destroy + * interface after the use is complete. + * @see OH_VBuckets_Destroy. + * @since 16 + */ +OH_Data_VBuckets *OH_VBuckets_Create(); + +/** + * @brief Destroys an OH_Data_VBuckets instance object. + * + * @param buckets Represents a pointer to an instance of OH_Data_VBuckets. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_VBuckets_Destroy(OH_Data_VBuckets *buckets); + +/** + * @brief Add an OH_VBucket to OH_Data_VBuckets object. + * + * @param buckets Represents a pointer to an instance of OH_Data_VBuckets. + * @param row Represents a pointer to an instance of OH_VBucket. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_VBuckets_PutRow(OH_Data_VBuckets *buckets, const OH_VBucket *row); + +/** + * @brief Add an OH_Data_VBuckets to OH_Data_VBuckets object. + * + * @param buckets Represents a pointer to an instance of OH_Data_VBuckets. + * @param rows Represents a pointer to an instance of OH_Data_VBuckets. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_VBuckets_PutRows(OH_Data_VBuckets *buckets, const OH_Data_VBuckets *rows); + +/** + * @brief Add an OH_Data_VBuckets to OH_Data_VBuckets object. + * + * @param buckets Represents a pointer to an instance of OH_Data_VBuckets. + * @param count Represents the count of OH_VBucket in OH_Data_VBuckets. It is an output parameter. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_VBuckets_RowCount(OH_Data_VBuckets *buckets, size_t *count); + +#ifdef __cplusplus +}; +#endif +#endif +/** @} */ diff --git a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h new file mode 100644 index 000000000..e302f677d --- /dev/null +++ b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h @@ -0,0 +1,347 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup RDB + * @{ + * + * @brief The relational database (RDB) store manages data based on relational models. + * With the underlying SQLite database, the RDB store provides a complete mechanism for managing local databases. + * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations + * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. + * + * @since 10 + */ + +/** + * @file oh_rdb_transaction.h + * + * @brief Provides database transaction related functions and enumerations. + * + * @kit ArkData + * @library libnative_rdb_ndk.z.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * + * @since 16 + */ + +#ifndef OH_RDB_TRANSACTION_H +#define OH_RDB_TRANSACTION_H + +#include "database/rdb/oh_cursor.h" +#include "database/rdb/oh_predicates.h" +#include "database/rdb/oh_values_bucket.h" +#include "database/data/oh_data_values.h" +#include "database/data/oh_data_values_buckets.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Indicates relation database transaction type. + * + * @since 16 + */ +typedef enum OH_RDB_TransType { + /** + * @brief Indicates the transaction does not actually start until the database is first accessed. It's a default. + */ + RDB_TRANS_DEFERRED = 0, + /** + * @brief Indicates the database connection to start a new write immediately, without waiting for a write statement. + */ + RDB_TRANS_IMMEDIATE, + /** + * @brief Indicates it is similar to RDB_TRANS_IMMEDIATE in that a write transaction is started immediately. + * RDB_TRANS_EXCLUSIVE and RDB_TRANS_IMMEDIATE are the same in WAL mode, but in other journaling modes, + * EXCLUSIVE prevents other database connections from reading the database while the transaction is underway. + */ + RDB_TRANS_EXCLUSIVE, + /** + * The largest value for rdb transaction type. + */ + RDB_TRANS_BUTT, +} OH_RDB_TransType; + +/** + * @brief Define the OH_RDB_TransOptions structure type. + * + * @since 16 + */ +typedef struct OH_RDB_TransOptions OH_RDB_TransOptions; + +/** + * @brief Define the OH_Rdb_Transaction structure type. + * + * @since 16 + */ +typedef struct OH_Rdb_Transaction OH_Rdb_Transaction; + +/** + * @brief Creates an OH_RDB_TransOptions instance object. + * + * @return Returns a pointer to OH_RDB_TransOptions instance when the execution is successful. + * Otherwise, nullptr is returned. The memory must be released through the OH_RdbTrans_DestroyOptions + * interface after the use is complete. + * @see OH_RdbTrans_DestroyOptions. + * @since 16 + */ +OH_RDB_TransOptions *OH_RdbTrans_CreateOptions(); + +/** + * @brief Destroys an OH_RDB_TransOptions instance object. + * + * @param opitons Represents a pointer to an instance of OH_RDB_TransOptions. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_RdbTrans_DestroyOptions(OH_RDB_TransOptions *opitons); + +/** + * @brief Sets integer data to the opitons object. + * + * @param opitons Represents a pointer to an instance of OH_RDB_TransOptions. + * @param type Represents relation database transaction type. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_RdbTransOption_SetType(OH_RDB_TransOptions *opitons, OH_RDB_TransType type); + +/** + * @brief Commits a transaction of a relational database. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * @since 16 + */ +int OH_RdbTrans_Commit(OH_Rdb_Transaction *trans); + +/** + * @brief Roll back a transaction of a relational database. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * @since 16 + */ +int OH_RdbTrans_Rollback(OH_Rdb_Transaction *trans); + +/** + * @brief Inserts a row of data into the target table. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param table Represents the target table. + * @param row Represents the row data to be inserted into the table. + * @param rowId Represents row line number when insert successfully. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + + * @since 16 + */ +int OH_RdbTrans_Insert(OH_Rdb_Transaction *trans, const char *table, const OH_VBucket *row, int64_t *rowId); + +/** + * @brief Inserts a batch of data into the target table. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param table Represents the target table. + * @param rows Represents the rows data to be inserted into the table. + * @param changes Represents the number of successful insertions. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * @since 16 + */ +int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const OH_Data_VBuckets *rows, + int64_t *changes); + +/** + * @brief Updates data in the database based on specified conditions. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param row Represents the row data to be updated into the table. + * @param predicates Represents the specified update condition by the instance object of OH_Predicates. + * @param changes Represents the number of successful insertions. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * @since 16 + */ +int OH_RdbTrans_Update(OH_Rdb_Transaction *trans, const OH_VBucket *row, const OH_Predicates *predicates, + int64_t *changes); + +/** + * @brief Deletes data from the database based on specified conditions + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param predicates Represents the specified update condition by the instance object of OH_Predicates. + * @param changes Represents the number of successfully Deleted. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * @since 16 + */ +int OH_RdbTrans_Delete(OH_Rdb_Transaction *trans, const OH_Predicates *predicates, int64_t *changes); + +/** + * @brief Queries data in the database based on specified conditions. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param predicates Represents the specified update condition by the instance object of OH_Predicates. + * @param columns Represents the columns to query. If the value is empty array, the query applies to all columns. + * @param len Represents the number of columns elements. + * @return If the operation is successful, a pointer to the instance of the OH_Cursor structure is returned. + * If database has closed or the database does not respond, nullptr is returned. + * @since 16 + */ +OH_Cursor *OH_RdbTrans_Query(OH_Rdb_Transaction *trans, const OH_Predicates *predicates, const char *columns[], + int len); + +/** + * @brief Queries data in the database based on SQL statement. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param sql Represents the SQL statement to execute. + * @param args Represents a pointer to an instance of OH_Data_Values and it is the selection arguments. + * @return If the operation is successful, a pointer to the instance of the OH_Cursor structure is returned. + * If database has closed or the database does not respond, nullptr is returned. + * @since 16 + */ +OH_Cursor *OH_RdbTrans_QuerySql(OH_Rdb_Transaction *trans, const char *sql, const OH_Data_Values *args); + +/** + * @brief Executes an SQL statement that contains specified parameters. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param sql Represents the SQL statement to execute. + * @param args Represents the values of the parameters in the SQL statement. + * @param result Represents a pointer to OH_Data_Value instance when the execution is successful. + * The memory must be released through the OH_Value_Destroy interface after the use is complete. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * @see OH_Value_Destroy. + * @since 16 + */ +int OH_RdbTrans_Execute(OH_Rdb_Transaction *trans, const char *sql, const OH_Data_Values *args, OH_Data_Value **result); + +/** + * @brief Destroys an OH_Rdb_Transaction instance object. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * @since 16 + */ +int OH_RdbTrans_Destroy(OH_Rdb_Transaction *trans); + +#ifdef __cplusplus +}; +#endif +#endif // OH_RDB_TRANSACTION_H +/** @} */ diff --git a/distributeddatamgr/relational_store/include/oh_values_bucket.h b/distributeddatamgr/relational_store/include/oh_values_bucket.h index 99794efbb..87c90608f 100644 --- a/distributeddatamgr/relational_store/include/oh_values_bucket.h +++ b/distributeddatamgr/relational_store/include/oh_values_bucket.h @@ -183,6 +183,37 @@ int OH_VBucket_PutAsset(OH_VBucket *bucket, const char *field, Data_Asset *value * @since 11 */ int OH_VBucket_PutAssets(OH_VBucket *bucket, const char *field, Data_Asset **value, uint32_t count); + +/** + * @brief Put the float vector to the OH_VBucket object. + * + * @param bucket Represents a pointer to an {@link OH_VBucket} instance. + * @param field Represents the name of the column. + * @param vec Represents a pointer to float array. + * @param len Represents the size of float array. + * @return Returns the status code of the execution. + * {@link RDB_OK} - success. + * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. + * @see OH_VBucket. + * @since 16 + */ +int OH_VBucket_PutFloatVector(OH_VBucket *bucket, const char *field, const float *vec, size_t len); + +/** + * @brief Put the an integer of any length to the OH_VBucket object. + * + * @param bucket Represents a pointer to an {@link OH_VBucket} instance. + * @param field Represents the name of the column. + * @param sign Represents 0 is positive integer, 1 is negative integer. + * @param trueForm Represents a pointer to integer array. + * @param len Represents the size of integer array. + * @return Returns the status code of the execution. + * {@link RDB_OK} - success. + * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. + * @see OH_VBucket. + * @since 16 + */ +int OH_VBucket_PutUnlimitedInt(OH_VBucket *bucket, const char *field, int sign, const uint64_t *trueForm, size_t len); #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 8f4d63962..8f64decb2 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -43,6 +43,7 @@ #include "database/rdb/oh_predicates.h" #include "database/rdb/oh_value_object.h" #include "database/rdb/oh_values_bucket.h" +#include "database/rdb/oh_rdb_transaction.h" #ifdef __cplusplus extern "C" { @@ -1247,6 +1248,33 @@ int OH_Rdb_UnlockRow(OH_Rdb_Store *store, OH_Predicates *predicates); */ OH_Cursor *OH_Rdb_QueryLockedRow( OH_Rdb_Store *store, OH_Predicates *predicates, const char *const *columnNames, int length); + +/** + * @brief Creates an OH_Rdb_Transaction instance object. + * + * @param store Represents a pointer to an instance of OH_Rdb_Store. + * @param options Represents a pointer to an instance of OH_RDB_TransOptions. + * @param trans Represents a pointer to OH_Rdb_Transaction instance when the execution is successful. + * Otherwise, nullptr is returned. The memory must be released through the OH_RdbTrans_Destroy + * interface after the use is complete. + * @return Returns the error code. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_DATABASE_BUSY} database does not respond. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_CANT_OPEN} SQLite: Unable to open the database file. + * @see OH_RdbTrans_Destroy. + * @since 16 + */ +int OH_Rdb_CreateTransaction(OH_Rdb_Store *store, const OH_RDB_TransOptions *options, OH_Rdb_Transaction **trans); + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/relational_store/include/relational_store_error_code.h b/distributeddatamgr/relational_store/include/relational_store_error_code.h index 83b18cc8f..fb9a20805 100644 --- a/distributeddatamgr/relational_store/include/relational_store_error_code.h +++ b/distributeddatamgr/relational_store/include/relational_store_error_code.h @@ -307,7 +307,112 @@ typedef enum OH_Rdb_ErrCode { /** * @brief The error when the connection count is used up. */ - RDB_E_CON_OVER_LIMIT = (E_BASE + 48) + RDB_E_CON_OVER_LIMIT = (E_BASE + 48), + + /** + * @brief Database already closed. + * + * @since 16 + */ + RDB_E_ALREADY_CLOSED = (E_BASE + 50), + + /** + * @brief The database does not respond. + * + * @since 16 + */ + RDB_E_DATABASE_BUSY = (E_BASE + 51), + + /** + * @brief Database corrupted. + * + * @since 16 + */ + RDB_E_SQLITE_CORRUPT = (E_BASE + 52), + + /** + * @brief SQLite: Access permission denied. + * + * @since 16 + */ + RDB_E_SQLITE_PERM = (E_BASE + 53), + + /** + * @brief SQLite: The database file is locked. + * + * @since 16 + */ + RDB_E_SQLITE_BUSY = (E_BASE + 54), + + /** + * @brief SQLite: A table in the database is locked. + * + * @since 16 + */ + RDB_E_SQLITE_LOCKED = (E_BASE + 55), + + /** + * @brief SQLite: The database is out of memory. + * + * @since 16 + */ + RDB_E_SQLITE_NOMEM = (E_BASE + 56), + + /** + * @brief SQLite: Attempt to write a readonly database. + * + * @since 16 + */ + RDB_E_SQLITE_READONLY = (E_BASE + 57), + + /** + * @brief SQLite: Some kind of disk I/O error occurred. + * + * @since 16 + */ + RDB_E_SQLITE_IOERR = (E_BASE + 58), + + /** + * @brief SQLite: The database is full. + * + * @since 16 + */ + RDB_E_SQLITE_FULL = (E_BASE + 59), + + /** + * @brief SQLite: Unable to open the database file. + * + * @since 16 + */ + RDB_E_SQLITE_CANT_OPEN = (E_BASE + 60), + + /** + * @brief SQLite: TEXT or BLOB exceeds size limit. + * + * @since 16 + */ + RDB_E_SQLITE_TOO_BIG = (E_BASE + 61), + + /** + * @brief SQLite: Data type mismatch. + * + * @since 16 + */ + RDB_E_SQLITE_MISMATCH = (E_BASE + 62), + + /** + * @brief Data value type is null. + * + * @since 16 + */ + RDB_E_DATA_TYPE_NULL = (E_BASE + 63), + + /** + * @brief Data value type mismatch. + * + * @since 16 + */ + RDB_E_TYPE_MISMATCH = (E_BASE + 64), } OH_Rdb_ErrCode; #ifdef __cplusplus diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index 5e0681865..abd77163e 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -1,120 +1,506 @@ [ - {"name":"OH_Rdb_CreatePredicates" }, - {"name":"OH_Rdb_CreateValueObject" }, - {"name":"OH_Rdb_CreateValuesBucket" }, - { - "first_introduced":"14", - "name":"OH_Rdb_CreateConfig" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetDatabaseDir" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetStoreName" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetBundleName" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetModuleName" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetEncrypted" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetSecurityLevel" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetArea" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_SetDbType" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_GetSupportedDbType" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_DestroyConfig" - }, - {"name":"OH_Rdb_GetOrOpen" }, - { - "first_introduced": "14", - "name":"OH_Rdb_CreateOrOpen" - }, - {"name":"OH_Rdb_CloseStore" }, - {"name":"OH_Rdb_DeleteStore" }, - { - "first_introduced": "14", - "name":"OH_Rdb_DeleteStoreV2" - }, - {"name":"OH_Rdb_Insert" }, - {"name":"OH_Rdb_Update" }, - {"name":"OH_Rdb_Delete" }, - {"name":"OH_Rdb_Query" }, - {"name":"OH_Rdb_Execute" }, - { - "first_introduced": "14", - "name":"OH_Rdb_ExecuteByTrxId" - }, - {"name":"OH_Rdb_ExecuteQuery" }, - {"name":"OH_Rdb_BeginTransaction" }, - {"name":"OH_Rdb_RollBack" }, - {"name":"OH_Rdb_Commit" }, - { - "first_introduced": "14", - "name":"OH_Rdb_BeginTransWithTrxId" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_RollBackByTrxId" - }, - { - "first_introduced": "14", - "name":"OH_Rdb_CommitByTrxId" - }, - {"name":"OH_Rdb_Backup" }, - {"name":"OH_Rdb_Restore"}, - {"name":"OH_Rdb_GetVersion"}, - {"name":"OH_Rdb_SetVersion"}, - {"name":"OH_Rdb_SetDistributedTables"}, - {"name":"OH_Rdb_FindModifyTime"}, - {"name":"OH_Rdb_GetTableDetails"}, - {"name":"OH_Rdb_CloudSync"}, - {"name":"OH_VBucket_PutAsset"}, - {"name":"OH_VBucket_PutAssets"}, - {"name":"OH_Data_Asset_SetName"}, - {"name":"OH_Data_Asset_SetUri"}, - {"name":"OH_Data_Asset_SetPath"}, - {"name":"OH_Data_Asset_SetCreateTime"}, - {"name":"OH_Data_Asset_SetModifyTime"}, - {"name":"OH_Data_Asset_SetSize"}, - {"name":"OH_Data_Asset_SetStatus"}, - {"name":"OH_Data_Asset_GetName"}, - {"name":"OH_Data_Asset_GetUri"}, - {"name":"OH_Data_Asset_GetPath"}, - {"name":"OH_Data_Asset_GetCreateTime"}, - {"name":"OH_Data_Asset_GetModifyTime"}, - {"name":"OH_Data_Asset_GetSize"}, - {"name":"OH_Data_Asset_GetStatus"}, - {"name":"OH_Data_Asset_CreateOne"}, - {"name":"OH_Data_Asset_DestroyOne"}, - {"name":"OH_Data_Asset_CreateMultiple"}, - {"name":"OH_Data_Asset_DestroyMultiple"}, - {"name":"OH_Rdb_Subscribe"}, - {"name":"OH_Rdb_Unsubscribe"}, - {"name":"OH_Rdb_SubscribeAutoSyncProgress"}, - {"name":"OH_Rdb_UnsubscribeAutoSyncProgress"}, - {"name":"OH_Rdb_LockRow"}, - {"name":"OH_Rdb_UnlockRow"}, - {"name":"OH_Rdb_QueryLockedRow"} + { + "name":"OH_Rdb_CreatePredicates" + }, + { + "name":"OH_Rdb_CreateValueObject" + }, + { + "name":"OH_Rdb_CreateValuesBucket" + }, + { + "first_introduced":"14", + "name":"OH_Rdb_CreateConfig" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetDatabaseDir" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetStoreName" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetBundleName" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetModuleName" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetEncrypted" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetSecurityLevel" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetArea" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_SetDbType" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_GetSupportedDbType" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_DestroyConfig" + }, + {"name":"OH_Rdb_GetOrOpen" }, + { + "first_introduced": "14", + "name":"OH_Rdb_CreateOrOpen" + }, + { + "name":"OH_Rdb_CloseStore" + }, + { + "name":"OH_Rdb_DeleteStore" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_DeleteStoreV2" + }, + { + "name":"OH_Rdb_Insert" + }, + { + "name":"OH_Rdb_Update" + }, + { + "name":"OH_Rdb_Delete" + }, + { + "name":"OH_Rdb_Query" + }, + { + "name":"OH_Rdb_Execute" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_ExecuteByTrxId" + }, + { + "name":"OH_Rdb_ExecuteQuery" + }, + { + "name":"OH_Rdb_BeginTransaction" + }, + { + "name":"OH_Rdb_RollBack" + }, + { + "name":"OH_Rdb_Commit" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_BeginTransWithTrxId" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_RollBackByTrxId" + }, + { + "first_introduced": "14", + "name":"OH_Rdb_CommitByTrxId" + }, + { + "name":"OH_Rdb_Backup" + }, + { + "name":"OH_Rdb_Restore" + }, + { + "name":"OH_Rdb_GetVersion" + }, + { + "name":"OH_Rdb_SetVersion" + }, + { + "name":"OH_Rdb_SetDistributedTables" + }, + { + "name":"OH_Rdb_FindModifyTime" + }, + { + "name":"OH_Rdb_GetTableDetails" + }, + { + "name":"OH_Rdb_CloudSync" + }, + { + "name":"OH_VBucket_PutAsset" + }, + { + "name":"OH_VBucket_PutAssets" + }, + { + "name":"OH_Data_Asset_SetName" + }, + { + "name":"OH_Data_Asset_SetUri" + }, + { + "name":"OH_Data_Asset_SetPath" + }, + { + "name":"OH_Data_Asset_SetCreateTime" + }, + { + "name":"OH_Data_Asset_SetModifyTime" + }, + { + "name":"OH_Data_Asset_SetSize" + }, + { + "name":"OH_Data_Asset_SetStatus" + }, + { + "name":"OH_Data_Asset_GetName" + }, + { + "name":"OH_Data_Asset_GetUri" + }, + { + "name":"OH_Data_Asset_GetPath" + }, + { + "name":"OH_Data_Asset_GetCreateTime" + }, + { + "name":"OH_Data_Asset_GetModifyTime" + }, + { + "name":"OH_Data_Asset_GetSize" + }, + { + "name":"OH_Data_Asset_GetStatus" + }, + { + "name":"OH_Data_Asset_CreateOne" + }, + { + "name":"OH_Data_Asset_DestroyOne" + }, + { + "name":"OH_Data_Asset_CreateMultiple" + }, + { + "name":"OH_Data_Asset_DestroyMultiple" + }, + { + "name":"OH_Rdb_Subscribe" + }, + { + "name":"OH_Rdb_Unsubscribe" + }, + { + "name":"OH_Rdb_SubscribeAutoSyncProgress" + }, + { + "name":"OH_Rdb_UnsubscribeAutoSyncProgress" + }, + { + "name":"OH_Rdb_LockRow" + }, + { + "name":"OH_Rdb_UnlockRow" + }, + { + "name":"OH_Rdb_QueryLockedRow" + }, + { + "first_introduced": "16", + "name":"OH_Value_Create" + }, + { + "first_introduced": "16", + "name":"OH_Value_Destroy" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutNull" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutInt" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutReal" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutText" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutBlob" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutAsset" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutAssets" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutFloatVector" + }, + { + "first_introduced": "16", + "name":"OH_Value_PutUnlimitedInt" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetType" + }, + { + "first_introduced": "16", + "name":"OH_Value_IsNull" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetInt" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetReal" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetText" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetBlob" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetAsset" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetAssetsCount" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetAssets" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetFloatVectorCount" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetFloatVector" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetUnlimitedIntBand" + }, + { + "first_introduced": "16", + "name":"OH_Value_GetUnlimitedInt" + }, + { + "first_introduced": "16", + "name":"OH_VBuckets_Create" + }, + { + "first_introduced": "16", + "name":"OH_VBuckets_Destroy" + }, + { + "first_introduced": "16", + "name":"OH_VBuckets_PutRow" + }, + { + "first_introduced": "16", + "name":"OH_VBuckets_PutRows" + }, + { + "first_introduced": "16", + "name":"OH_VBuckets_RowCount" + }, + { + "first_introduced": "16", + "name":"OH_Values_Create" + }, + { + "first_introduced": "16", + "name":"OH_Values_Destroy" + }, + { + "first_introduced": "16", + "name":"OH_Values_Put" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutNull" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutInt" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutReal" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutText" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutBlob" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutAsset" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutAssets" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutFloatVector" + }, + { + "first_introduced": "16", + "name":"OH_Values_PutUnlimitedInt" + }, + { + "first_introduced": "16", + "name":"OH_Values_Count" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetType" + }, + { + "first_introduced": "16", + "name":"OH_Values_Get" + }, + { + "first_introduced": "16", + "name":"OH_Values_IsNull" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetInt" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetReal" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetText" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetBlob" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetAsset" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetAssetsCount" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetAssets" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetFloatVectorCount" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetFloatVector" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetUnlimitedIntBand" + }, + { + "first_introduced": "16", + "name":"OH_Values_GetUnlimitedInt" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_CreateOptions" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_DestroyOptions" + }, + { + "first_introduced": "16", + "name":"OH_RdbTransOption_SetType" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Commit" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Rollback" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Insert" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_BatchInsert" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Update" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Delete" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Query" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_QuerySql" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Execute" + }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_Destroy" + }, + { + "first_introduced": "16", + "name":"OH_Rdb_CreateTransaction" + }, + { + "first_introduced": "16", + "name":"OH_VBucket_PutFloatVector" + }, + { + "first_introduced": "16", + "name":"OH_VBucket_PutUnlimitedInt" + } ] \ No newline at end of file -- Gitee From ea0a8ca11e9c4e2359167b3db3f0ca6b072cb409 Mon Sep 17 00:00:00 2001 From: zwtmichael Date: Tue, 31 Dec 2024 14:31:37 +0800 Subject: [PATCH 345/630] add tokenizer interface Signed-off-by: zwtmichael --- .../include/relational_store.h | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 8f4d63962..0ed341f7d 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -185,6 +185,26 @@ typedef enum Rdb_DBType { DBTYPE_BUTT = 64, } Rdb_DBType; +/** + * @brief Define Rdb_Tokenizer type. + * + * @since 16 + */ +typedef enum Rdb_Tokenizer { + /** + * @brief Means not using tokenizer. + */ + RDB_NONE_TOKENIZER = 1, + /** + * @brief Means using native icu tokenizer. + */ + RDB_ICU_TOKENIZER = 2, + /** + * @brief Means using self-developed enhance tokenizer. + */ + RDB_CUSTOM_TOKENIZER = 3, +} Rdb_Tokenizer; + /** * @brief Create OH_Rdb_ConfigV2 which is used to open store * @@ -311,6 +331,18 @@ int OH_Rdb_SetArea(OH_Rdb_ConfigV2 *config, int area); */ int OH_Rdb_SetDbType(OH_Rdb_ConfigV2 *config, int dbType); +/** + * @brief Set property tokenizer into config + * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. + * @param tokenizer Indicates the tokenizer {@link Rdb_Tokenizer} of the database + * @return Returns the status code of the execution. Successful execution returns RDB_OK, + * {@link RDB_OK} - success. + * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. + * {@link RDB_E_NOT_SUPPORTED} - The error code for not support tokenizer. + * @since 16 + */ +int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); + /** * @brief Get support db type list * @param typeCount The output parameter, which is used to recieve the length of the support db type array. -- Gitee From e1324c9697ff9048d5d2383e2b81f8c2bd8d3eaa Mon Sep 17 00:00:00 2001 From: guochengying <346447065@qq.com> Date: Fri, 3 Jan 2025 09:50:51 +0800 Subject: [PATCH 346/630] fix: add enter and exit hibernate mode usual event Signed-off-by: guochengying <346447065@qq.com> --- .../commonevent/oh_commonevent_support.h | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/BasicServicesKit/commonevent/oh_commonevent_support.h b/BasicServicesKit/commonevent/oh_commonevent_support.h index 6d1256b95..29f2a6375 100644 --- a/BasicServicesKit/commonevent/oh_commonevent_support.h +++ b/BasicServicesKit/commonevent/oh_commonevent_support.h @@ -98,6 +98,34 @@ static const char* const COMMON_EVENT_SCREEN_OFF = "usual.event.SCREEN_OFF"; */ static const char* const COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON"; +/** + * @brief This commonEvent means when the device is is about to enter the force sleep mode. + * + * @since 12 + */ +static const char* const COMMON_EVENT_ENTER_FORCE_SLEEP = "usual.event.ENTER_FORCE_SLEEP"; + +/** + * @brief This commonEvent means when the device is exits the force sleep mode. + * + * @since 12 + */ +static const char* const COMMON_EVENT_EXIT_FORCE_SLEEP = "usual.event.EXIT_FORCE_SLEEP"; + +/** + * @brief This commonEvent means when the device is is about to enter the hibernate mode. + * + * @since 16 + */ +static const char* const COMMON_EVENT_ENTER_HIBERNATE = "usual.event.ENTER_HIBERNATE"; + +/** + * @brief This commonEvent means when the device is exits the hibernate mode. + * + * @since 16 + */ +static const char* const COMMON_EVENT_EXIT_HIBERNATE = "usual.event.EXIT_HIBERNATE"; + /** * @brief This commonEvent means when the thermal state level change * -- Gitee From eb1fe7704a122fee6bc670f7c3e4592e748025b4 Mon Sep 17 00:00:00 2001 From: guochengying <346447065@qq.com> Date: Fri, 3 Jan 2025 06:09:42 +0000 Subject: [PATCH 347/630] update BasicServicesKit/commonevent/oh_commonevent_support.h. Signed-off-by: guochengying <346447065@qq.com> --- BasicServicesKit/commonevent/oh_commonevent_support.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BasicServicesKit/commonevent/oh_commonevent_support.h b/BasicServicesKit/commonevent/oh_commonevent_support.h index 29f2a6375..102a28dee 100644 --- a/BasicServicesKit/commonevent/oh_commonevent_support.h +++ b/BasicServicesKit/commonevent/oh_commonevent_support.h @@ -115,14 +115,14 @@ static const char* const COMMON_EVENT_EXIT_FORCE_SLEEP = "usual.event.EXIT_FORCE /** * @brief This commonEvent means when the device is is about to enter the hibernate mode. * - * @since 16 + * @since 14 */ static const char* const COMMON_EVENT_ENTER_HIBERNATE = "usual.event.ENTER_HIBERNATE"; /** * @brief This commonEvent means when the device is exits the hibernate mode. * - * @since 16 + * @since 14 */ static const char* const COMMON_EVENT_EXIT_HIBERNATE = "usual.event.EXIT_HIBERNATE"; -- Gitee From 57400316e20c1307b9613520e1efbd70d4b74889 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 3 Jan 2025 07:48:28 +0000 Subject: [PATCH 348/630] update multimedia/player_framework/avrecorder.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h index 555013461..daff56f98 100644 --- a/multimedia/player_framework/avrecorder.h +++ b/multimedia/player_framework/avrecorder.h @@ -21,7 +21,6 @@ * * @Syscap systemcapability.multimedia.media.avrecorder * @since 16 - * @version 1.0 * @} */ @@ -35,7 +34,6 @@ * @library libavrecorder.so * @Syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_H @@ -57,7 +55,6 @@ extern "C" { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @return Returns a pointer to an OH_AVRecorder instance for success, nullptr for failure * @since 16 - * @version 1.0 */ OH_AVRecorder *OH_AVRecorder_Create(void); @@ -70,7 +67,6 @@ OH_AVRecorder *OH_AVRecorder_Create(void); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder Prepare failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_Prepare(OH_AVRecorder *recorder, OH_AVRecorder_Config *config); @@ -83,7 +79,6 @@ OH_AVErrCode OH_AVRecorder_Prepare(OH_AVRecorder *recorder, OH_AVRecorder_Config * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or config is null. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_GetAVRecorderConfig(OH_AVRecorder *recorder, OH_AVRecorder_Config **config); @@ -96,7 +91,6 @@ OH_AVErrCode OH_AVRecorder_GetAVRecorderConfig(OH_AVRecorder *recorder, OH_AVRec * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_GetInputSurface(OH_AVRecorder *recorder, OHNativeWindow **window); @@ -109,7 +103,6 @@ OH_AVErrCode OH_AVRecorder_GetInputSurface(OH_AVRecorder *recorder, OHNativeWind * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or update rotation failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_UpdateRotation(OH_AVRecorder *recorder, int32_t rotation); @@ -121,7 +114,6 @@ OH_AVErrCode OH_AVRecorder_UpdateRotation(OH_AVRecorder *recorder, int32_t rotat * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder start failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_Start(OH_AVRecorder *recorder); @@ -133,7 +125,6 @@ OH_AVErrCode OH_AVRecorder_Start(OH_AVRecorder *recorder); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder pause failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_Pause(OH_AVRecorder *recorder); @@ -145,7 +136,6 @@ OH_AVErrCode OH_AVRecorder_Pause(OH_AVRecorder *recorder); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder resume failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_Resume(OH_AVRecorder *recorder); @@ -157,7 +147,6 @@ OH_AVErrCode OH_AVRecorder_Resume(OH_AVRecorder *recorder); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder stop failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_Stop(OH_AVRecorder *recorder); @@ -169,7 +158,6 @@ OH_AVErrCode OH_AVRecorder_Stop(OH_AVRecorder *recorder); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder reset failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_Reset(OH_AVRecorder *recorder); @@ -181,7 +169,6 @@ OH_AVErrCode OH_AVRecorder_Reset(OH_AVRecorder *recorder); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder release failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder); @@ -195,7 +182,6 @@ OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder release failed. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_GetAvailableEncoder(OH_AVRecorder *recorder, OH_AVRecorder_EncoderInfo **info, int32_t *length); @@ -211,7 +197,6 @@ OH_AVErrCode OH_AVRecorder_GetAvailableEncoder(OH_AVRecorder *recorder, OH_AVRec * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_SetStateCallback( OH_AVRecorder *recorder, OH_AVRecorder_OnStateChange callback, void *userData); @@ -227,7 +212,6 @@ OH_AVErrCode OH_AVRecorder_SetStateCallback( * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_SetErrorCallback(OH_AVRecorder *recorder, OH_AVRecorder_OnError callback, void *userData); @@ -242,7 +226,6 @@ OH_AVErrCode OH_AVRecorder_SetErrorCallback(OH_AVRecorder *recorder, OH_AVRecord * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. * @since 16 - * @version 1.0 */ OH_AVErrCode OH_AVRecorder_SetUriCallback(OH_AVRecorder *recorder, OH_AVRecorder_OnUri callback, void *userData); -- Gitee From 71fd0015e4c2d5a294f39d30168dd6bd58674dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Fri, 3 Jan 2025 16:21:38 +0800 Subject: [PATCH 349/630] add json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- .../avscreen_capture/libnative_avscreen_capture.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json index 8464ce4fd..8b135b291 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -102,5 +102,9 @@ { "first_introduced": "14", "name": "OH_AVScreenCapture_SetMaxVideoFrameRate" + }, + { + "first_introduced": "15", + "name": "OH_AVScreenCapture_ShowCursor" } ] \ No newline at end of file -- Gitee From ea15427ea6c99c277c5d3a7d5a6f8e28289e12ee Mon Sep 17 00:00:00 2001 From: Zhang Jinyu Date: Fri, 3 Jan 2025 17:48:44 +0800 Subject: [PATCH 350/630] =?UTF-8?q?Button=E6=94=AF=E6=8C=81=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=A4=A7=E5=AD=97=E4=BD=93=E7=9A=84=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=94=BE=E5=A4=A7=E7=BC=A9=E5=B0=8F=E5=80=8D=E6=95=B0=E8=8C=83?= =?UTF-8?q?=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhang Jinyu --- arkui/ace_engine/native/native_node.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 122967c2c..f0d609295 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3390,6 +3390,32 @@ typedef enum { */ NODE_BUTTON_TYPE, + /** + * @brief Defines the minimum font scale 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: minimum font scale, in fp. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: minimum font scale, in fp. + * + * @since 16 + */ + NODE_BUTTON_MIN_FONT_SCALE, + + /** + * @brief Defines the maximum font scale 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: maximum font scale, in fp. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: maximum font scale, in fp. + * + * @since 16 + */ + NODE_BUTTON_MAX_FONT_SCALE, + /** * @brief Defines the current value of the progress indicator. * This attribute can be set, reset, and obtained as required through APIs. -- Gitee From eb10d40adad44bbd73f5b968d92b8cc6401f91bf Mon Sep 17 00:00:00 2001 From: fandongyu Date: Sat, 4 Jan 2025 14:50:49 +0800 Subject: [PATCH 351/630] Signed-off-by:fandongyu Signed-off-by: fandongyu --- .../include/image/image_packer_native.h | 28 +++++++++---------- .../image_framework/libimage_packer.ndk.json | 24 ++++++++-------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index 068deed46..f31105200 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -62,14 +62,14 @@ typedef struct OH_PackingOptions OH_PackingOptions; /** * @brief Defines the image sequence packing options. * - * @since 14 + * @since 16 */ struct OH_PackingOptionsForSequence; /** * @brief Defines the image sequence packing options. * - * @since 14 + * @since 16 */ typedef struct OH_PackingOptionsForSequence OH_PackingOptionsForSequence; @@ -203,7 +203,7 @@ Image_ErrorCode OH_PackingOptions_Release(OH_PackingOptions *options); * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_Create(OH_PackingOptionsForSequence **options); @@ -215,7 +215,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_Create(OH_PackingOptionsForSequence * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_SetFrameCount(OH_PackingOptionsForSequence *options, uint32_t frameCount); @@ -228,7 +228,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetFrameCount(OH_PackingOptionsForS * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or frameCount is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_GetFrameCount(OH_PackingOptionsForSequence *options, uint32_t *frameCount); @@ -242,7 +242,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetFrameCount(OH_PackingOptionsForS * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_SetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength); @@ -256,7 +256,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetDelayTimeList(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_GetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength); @@ -270,7 +270,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetDelayTimeList(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_SetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength); @@ -284,7 +284,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetDisposalTypes(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_GetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength); @@ -297,7 +297,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetDisposalTypes(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_SetLoopCount(OH_PackingOptionsForSequence *options, uint32_t loopCount); @@ -309,7 +309,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetLoopCount(OH_PackingOptionsForSe * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or loopCount is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_GetLoopCount(OH_PackingOptionsForSequence *options, uint32_t *loopCount); @@ -320,7 +320,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetLoopCount(OH_PackingOptionsForSe * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 14 + * @since 16 */ Image_ErrorCode OH_PackingOptionsForSequence_Release(OH_PackingOptionsForSequence *options); @@ -392,7 +392,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPicture(OH_ImagePackerNative * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or size/length is invalid * {@link IMAGE_ENCODE_FAILED} encode failed. - * @since 14 + * @since 16 */ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, @@ -452,7 +452,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPicture(OH_ImagePackerNative * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or length is invalid * {@link IMAGE_ENCODE_FAILED} encode failed. - * @since 14 + * @since 16 */ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, size_t sequenceLength, int32_t fd); diff --git a/multimedia/image_framework/libimage_packer.ndk.json b/multimedia/image_framework/libimage_packer.ndk.json index 913c46360..59cc97ad8 100644 --- a/multimedia/image_framework/libimage_packer.ndk.json +++ b/multimedia/image_framework/libimage_packer.ndk.json @@ -40,43 +40,43 @@ "name": "OH_PackingOptions_Release" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_Create" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_SetFrameCount" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_GetFrameCount" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_SetDelayTimeList" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_GetDelayTimeList" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_SetDisposalTypes" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_GetDisposalTypes" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_SetLoopCount" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_GetLoopCount" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_PackingOptionsForSequence_Release" }, { @@ -96,7 +96,7 @@ "name": "OH_ImagePackerNative_PackToDataFromPicture" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_ImagePackerNative_PackToDataFromPixelmapSequence" }, { @@ -112,7 +112,7 @@ "name": "OH_ImagePackerNative_PackToFileFromPicture" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_ImagePackerNative_PackToFileFromPixelmapSequence" }, { -- Gitee From 5e14fd7535106713ade98df445b4fddd41716c11 Mon Sep 17 00:00:00 2001 From: pengzhiwen Date: Fri, 22 Nov 2024 17:42:47 +0800 Subject: [PATCH 352/630] =?UTF-8?q?=E9=9C=80=E8=A6=81capi=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E5=B8=83=E5=B1=80=E7=BB=98=E5=88=B6=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: pengzhiwen --- arkui/ace_engine/native/libace.ndk.json | 16 ++++++ arkui/ace_engine/native/native_node.h | 66 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index f72f7e8f1..93b14a1c3 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2558,5 +2558,21 @@ { "first_introduced": "16", "name": "OH_ArkUI_PostFrameCallback" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_RegisterLayoutCallbackOnNodeHandle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_RegisterDrawCallbackOnNodeHandle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UnregisterDrawCallbackOnNodeHandle" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 122967c2c..2daab8f56 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8057,6 +8057,21 @@ typedef enum { NODE_CONTENT_EVENT_ON_DETACH_FROM_WINDOW = 1, } ArkUI_NodeContentEventType; +/** + * @brief Enumerates the inspector error codes. + * @since 16 + */ +typedef enum { + /** + * @error Success. + */ + ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL = 0, + /** + * @error Invalid parameter. + */ + ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER = -1, +} ArkUI_InspectorErrorCode; + /** * @brief Defines the general structure of a node content event. * @since 12 @@ -8420,6 +8435,57 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontSty */ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node); +/** + * @brief Registers a callback for node when layout is completed. + * + * @param node Indicates the target node. + * @param userData Indicates the custom data used in onLayoutCompleted callback function. + * @param onLayoutCompleted Indicates the function when layout completed is callback. + * @return error code + {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + * @since 16 + */ +int32_t OH_ArkUI_RegisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node, + void* userData, void (*onLayoutCompleted)(void* userData)); + + +/** + * @brief Registers a callback for node when draw is completed. + * + * @param node Indicates the target node. + * @param userData Indicates the custom data used in onDrawCompleted callback function. + * @param onDrawCompleted Indicates the function when draw completed is callback. + * @return error code + {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + * @since 16 + */ +int32_t OH_ArkUI_RegisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node, + void* userData, void (*onDrawCompleted)(void* userData)); + +/** + * @brief Unregisters the layout completed callback for node. + * + * @param node Indicates the target node. + * @return error code + {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + * @since 16 + */ +int32_t OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node); + +/** + * @brief Unregisters the draw completed callback for node. + * + * @param node Indicates the target node. + * @return error code + {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + * @since 16 + */ +int32_t OH_ArkUI_UnregisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node); + #ifdef __cplusplus }; #endif -- Gitee From 02610baa7c32c27dcaa4e4377be09507b82aa67f Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 4 Jan 2025 13:26:05 +0000 Subject: [PATCH 353/630] update multimedia/player_framework/avrecorder_base.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder_base.h | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index abad8dbaf..a95144d92 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -20,7 +20,7 @@ * @brief Provides APIs of request capability for Recorder. * * @Syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ @@ -31,7 +31,7 @@ * * @kit MediaKit * @library libavrecorder.so -@since 16 + * @since 16 * @version 1.0 */ @@ -40,7 +40,7 @@ #include #include -#include "native_avbuffer.h" +#include "media_asset_base_capi.h" #ifdef __cplusplus extern "C" { @@ -49,7 +49,7 @@ extern "C" { /** * @brief Initialization of avrecorder * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder OH_AVRecorder; @@ -57,7 +57,7 @@ typedef struct OH_AVRecorder OH_AVRecorder; /** * @brief audio source type for recorder * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef enum OH_AVRecorder_AudioSourceType { @@ -78,7 +78,7 @@ typedef enum OH_AVRecorder_AudioSourceType { /** * @brief video source type for recorder * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef enum OH_AVRecorder_VideoSourceType { @@ -91,7 +91,7 @@ typedef enum OH_AVRecorder_VideoSourceType { /** * @brief Enumerates Codec MIME types * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef enum OH_AVRecorder_CodecMimeType { @@ -112,7 +112,7 @@ typedef enum OH_AVRecorder_CodecMimeType { /** * @brief Enumerates container format type(The abbreviation for 'container format type' is CFT) * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef enum OH_AVRecorder_ContainerFormatType { @@ -129,7 +129,7 @@ typedef enum OH_AVRecorder_ContainerFormatType { /** * @brief Recorder States * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef enum OH_AVRecorder_State { @@ -152,7 +152,7 @@ typedef enum OH_AVRecorder_State { /** * @brief reason of recorder state change * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef enum OH_AVRecorder_StateChangeReason { @@ -165,7 +165,7 @@ typedef enum OH_AVRecorder_StateChangeReason { /** * @brief mode of creating recorder file * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef enum OH_AVRecorder_FileGenerationMode { @@ -178,7 +178,7 @@ typedef enum OH_AVRecorder_FileGenerationMode { /** * @brief Provides the media recorder profile definitions * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder_Profile { @@ -211,7 +211,7 @@ typedef struct OH_AVRecorder_Profile { /** * @brief Provides the geographical location definitions for media resources * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder_Location { @@ -224,7 +224,7 @@ typedef struct OH_AVRecorder_Location { /** * @brief define the basic template of metadata * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder_MetadataTemplate { @@ -237,7 +237,7 @@ typedef struct OH_AVRecorder_MetadataTemplate { /** * @brief Provides the container definition for media data * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder_Metadata { @@ -254,7 +254,7 @@ typedef struct OH_AVRecorder_Metadata { /** * @brief Provides the media recorder configuration definitions * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder_Config { @@ -275,7 +275,7 @@ typedef struct OH_AVRecorder_Config { /** * @brief Provides Range with lower and upper limit * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder_Range { @@ -288,7 +288,7 @@ typedef struct OH_AVRecorder_Range { /** * @brief Provides encoder info * @syscap SystemCapability.Multimedia.Media.AVRecorder -@since 16 + * @since 16 * @version 1.0 */ typedef struct OH_AVRecorder_EncoderInfo { @@ -319,7 +319,7 @@ typedef struct OH_AVRecorder_EncoderInfo { * @param state Indicates the recorder state. For details, see {@link OH_AVRecorder_State}. * @param reason for recorder state change. For details, see {@link OH_AVRecorder_StateChangeReason}. * @param userData Pointer to user specific data. -@since 16 + * @since 16 * @version 1.0 */ typedef void (*OH_AVRecorder_OnStateChange)(OH_AVRecorder *recorder, @@ -332,12 +332,23 @@ typedef void (*OH_AVRecorder_OnStateChange)(OH_AVRecorder *recorder, * @param errorCode Error code. * @param errorMsg Error message. * @param userData Pointer to user specific data. -@since 16 + * @since 16 * @version 1.0 */ typedef void (*OH_AVRecorder_OnError)(OH_AVRecorder *recorder, int32_t errorCode, const char *errorMsg, void *userData); +/** + * @brief Called when current recording is finished in OH_AVRecorder_FileGenerationMode.AUTO_CREATE_CAMERA_SCENE + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @param recorder Pointer to an OH_AVRecorder instance. + * @param asset Error code. + * @param userData Pointer to user specific data. + * @since 16 + * @version 1.0 + */ +typedef void (*OH_AVRecorder_OnUri)(OH_AVRecorder *recorder, OH_MediaAsset *asset, void *userData); + #ifdef __cplusplus } #endif -- Gitee From e900d6e8d6c661a0ce1fcba7949eb7605ffffd3c Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 4 Jan 2025 13:34:42 +0000 Subject: [PATCH 354/630] update multimedia/player_framework/avrecorder.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h index daff56f98..d3e039e73 100644 --- a/multimedia/player_framework/avrecorder.h +++ b/multimedia/player_framework/avrecorder.h @@ -176,7 +176,7 @@ OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder); * @brief Get available encoder and encoder info for AVRecorder. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder Pointer to an OH_AVRecorder instance - * @param info Double Pointer to an OH_EncoderInfo instance, see {@link OH_AVRecorder_EncoderInfo} + * @param info Pointer to an OH_EncoderInfo instance, see {@link OH_AVRecorder_EncoderInfo} * @param length Length of available encoders * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. -- Gitee From 59b26ccbe5ac59732caa5f24ef4db6a6a0390344 Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 4 Jan 2025 21:56:37 +0800 Subject: [PATCH 355/630] add avrecorder ndk interfaces Signed-off-by: Steven --- ndk_targets.gni | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ndk_targets.gni b/ndk_targets.gni index fa07e23a9..aa427b31d 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -134,6 +134,8 @@ _ndk_library_targets = [ "//interface/sdk_c/multimedia/player_framework/avscreen_capture:native_avscreen_capture_header", "//interface/sdk_c/multimedia/player_framework/avplayer:libavplayer", "//interface/sdk_c/multimedia/player_framework/avplayer:avplayer_header", + "//interface/sdk_c/multimedia/player_framework/avrecorder:libavrecorder", + "//interface/sdk_c/multimedia/player_framework/avrecorder:avrecorder_header", "//interface/sdk_c/multimedia/audio_framework:libohaudio_ndk", "//interface/sdk_c/multimedia/audio_framework:ohaudio_header", "//interface/sdk_c/multimedia/av_session:libohavsession_ndk", -- Gitee From 31c4294b109e2a8e97951b677c2da44ab86c32b5 Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 4 Jan 2025 14:16:11 +0000 Subject: [PATCH 356/630] update multimedia/player_framework/avrecorder.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h index d3e039e73..58da0ec9c 100644 --- a/multimedia/player_framework/avrecorder.h +++ b/multimedia/player_framework/avrecorder.h @@ -62,7 +62,7 @@ OH_AVRecorder *OH_AVRecorder_Create(void); * @brief Prepare for recording with some parameters. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder Pointer to an OH_AVRecorder instance - * @param config Pointer to an OH_AVRecorderConfig instance, see {@link OH_AVRecorderConfig} + * @param config Pointer to an OH_AVRecorder_Config instance, see {@link OH_AVRecorder_Config} * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder Prepare failed. @@ -74,7 +74,7 @@ OH_AVErrCode OH_AVRecorder_Prepare(OH_AVRecorder *recorder, OH_AVRecorder_Config * @brief Get current recording parameters, it must be called after prepare. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder Pointer to an OH_AVRecorder instance - * @param config Pointer to an OH_AVRecorderConfig instance, see {@link OH_AVRecorderConfig} + * @param config Pointer to an OH_AVRecorder_Config instance, see {@link OH_AVRecorder_Config} * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or config is null. @@ -176,11 +176,11 @@ OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder); * @brief Get available encoder and encoder info for AVRecorder. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder Pointer to an OH_AVRecorder instance - * @param info Pointer to an OH_EncoderInfo instance, see {@link OH_AVRecorder_EncoderInfo} + * @param info Pointer to an OH_AVRecorder_EncoderInfo instance, see {@link OH_AVRecorder_EncoderInfo} * @param length Length of available encoders * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder release failed. + * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr. * @since 16 */ OH_AVErrCode OH_AVRecorder_GetAvailableEncoder(OH_AVRecorder *recorder, OH_AVRecorder_EncoderInfo **info, -- Gitee From 9038abf835f1b52107fff81383c0f7b1fc19a422 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 5 Jan 2025 10:28:58 +0000 Subject: [PATCH 357/630] update multimedia/player_framework/avrecorder.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h index 58da0ec9c..2661abc48 100644 --- a/multimedia/player_framework/avrecorder.h +++ b/multimedia/player_framework/avrecorder.h @@ -19,7 +19,7 @@ * * @brief Provides APIs of request capability for Recorder. * - * @Syscap systemcapability.multimedia.media.avrecorder + * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 * @} */ @@ -32,7 +32,7 @@ * * @kit MediaKit * @library libavrecorder.so - * @Syscap SystemCapability.Multimedia.Media.AVRecorder + * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 */ -- Gitee From b354dbd2cf09b2f3400a7d312a1df02bec3f3b20 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 5 Jan 2025 10:32:11 +0000 Subject: [PATCH 358/630] update multimedia/player_framework/avrecorder_base.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder_base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index a95144d92..69c3d379e 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -19,9 +19,10 @@ * * @brief Provides APIs of request capability for Recorder. * - * @Syscap SystemCapability.Multimedia.Media.AVRecorder + * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 * @version 1.0 + * @} */ /** -- Gitee From b144333c26980c96d139627cc8310b9c59859092 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 5 Jan 2025 11:26:58 +0000 Subject: [PATCH 359/630] update multimedia/player_framework/avrecorder_base.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder_base.h | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index 69c3d379e..27f397f69 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -32,6 +32,7 @@ * * @kit MediaKit * @library libavrecorder.so + * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 * @version 1.0 */ -- Gitee From 5427ed592c0aeab2a6b912fcb7a964df157340a5 Mon Sep 17 00:00:00 2001 From: Tintin9529 Date: Tue, 24 Dec 2024 15:15:02 +0800 Subject: [PATCH 360/630] =?UTF-8?q?DatePicker=E5=92=8CDatePickerDialog?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81=E5=A3=B0=E6=8C=AF=E8=83=BD?= =?UTF-8?q?=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tintin9529 --- arkui/ace_engine/native/native_node.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0d609295..616db1014 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3750,6 +3750,20 @@ typedef enum { * @since 16 */ NODE_DATE_PICKER_MODE = 13007, + /** + * @brief Defines whether haptic feedback. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to feedback. The value true means to feedback, and + * false means the opposite.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: whether to feedback.\n + * + * @since 16 + */ + NODE_DATE_PICKER_ENABLE_HAPTIC_FEEDBACK = 13008, /** * @brief Defines the time of the selected item. in the timer picker. * This attribute can be set, reset, and obtained as required through APIs. -- Gitee From 5ca93fd186e8c1cb42e36f2cb1675c1afe620a46 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Wed, 25 Dec 2024 17:44:59 +0800 Subject: [PATCH 361/630] =?UTF-8?q?Feat:=E3=80=90=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E3=80=91=E8=BE=93=E5=85=A5=E7=B1=BB=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6(TextInput/TextArea)=E6=89=A9=E5=B1=95ContentType?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiuxiu96 Change-Id: I7432623b0e4e675bf570727cb9742fb9a461a979 --- arkui/ace_engine/native/native_type.h | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 05352dd08..1e5e61e4e 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1871,6 +1871,77 @@ typedef enum { /** Standard address. The scenario-based autofill feature, when enabled, can automatically save and fill in standard * addresses. */ ARKUI_TEXTINPUT_CONTENT_TYPE_FORMAT_ADDRESS, + /** + * Passport number. The scenario-based autofill feature, when enabled, can automatically save and fill in passport + * numbers. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PASSPORT_NUMBER, + /** + * Passport validity. The scenario-based autofill feature, when enabled, can automatically save and fill in + * passport validities. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_VALIDITY, + /** + * Place of issue. The scenario-based autofill feature, when enabled, can automatically save and fill in + * place of issues. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_ISSUE_AT, + /** + * Tax organization. The scenario-based autofill feature, when enabled, can automatically save and fill in tax + * organizations. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_ORGANIZATION, + /** + * Tax id. The scenario-based autofill feature, when enabled, can automatically save and fill in standard Tax ids. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_TAX_ID, + /** + * City name and state name or state code. The scenario-based autofill feature, when enabled, can automatically + * save and fill in city names and state names or state codes. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_ADDRESS_CITY_AND_STATE, + /** + * Flight number. The scenario-based autofill feature, when enabled, can automatically save and fill in flight + * numbers. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_FLIGHT_NUMBER, + /** + * License number. The scenario-based autofill feature, when enabled, can automatically save and fill in license + * numbers. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_NUMBER, + /** + * License file number. The scenario-based autofill feature, when enabled, can automatically save and fill in + * license file numbers. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_FILE_NUMBER, + /** + * License plate number. The scenario-based autofill feature, when enabled, can automatically save and fill in + * license plate numbers. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_PLATE, + /** + * Engine number. The scenario-based autofill feature, when enabled, can automatically save and fill in engine + * numbers. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_ENGINE_NUMBER, + /** + * License chassis number. The scenario-based autofill feature, when enabled, can automatically save and fill in + * license chassis numbers. + * @since 16 + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_CHASSIS_NUMBER, } ArkUI_TextInputContentType; /** -- Gitee From 51165918288015527464decb9f35d212c90629c5 Mon Sep 17 00:00:00 2001 From: xuzhangchi Date: Mon, 6 Jan 2025 14:10:47 +0800 Subject: [PATCH 362/630] =?UTF-8?q?VRR=20=E6=8E=A5=E5=8F=A3=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuzhangchi --- .../av_codec/codec_base/libnative_media_codecbase.ndk.json | 2 +- multimedia/av_codec/native_avcodec_base.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 5ddaeb1a0..d21bd5da7 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -392,7 +392,7 @@ "name": "OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE" }, { - "first_introduced": "14", + "first_introduced": "15", "name": "OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR" }, { diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 07e356e9d..5a2efc9d7 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -973,10 +973,9 @@ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE; * This is an optional key that applies only to video decoder. It is used in configure. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 14 + * @since 15 */ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR; - /** * @brief Key for creation timestamp of a media file, value type is string. * -- Gitee From 58869f6792fec807e5049aea28b46e67bcc65856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Mon, 6 Jan 2025 15:18:46 +0800 Subject: [PATCH 363/630] [sdk5.0.2release] add unit description for key in sdk_c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子微 --- multimedia/av_codec/native_avcodec_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 07e356e9d..fca824fae 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -941,14 +941,14 @@ extern const char *OH_MD_KEY_BUFFER_DURATION; */ extern const char *OH_MD_KEY_VIDEO_SAR; /** - * @brief Key for start time of file, value type is int64_t. + * @brief Key for start time of file in microseconds, value type is int64_t. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 12 */ extern const char *OH_MD_KEY_START_TIME; /** - * @brief Key for start time of track, value type is int64_t. + * @brief Key for start time of track in microseconds, value type is int64_t. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 12 -- Gitee From 26bcde5ae389f269c6131580673417ceedb1fd56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Mon, 6 Jan 2025 07:38:21 +0000 Subject: [PATCH 364/630] update multimedia/av_codec/native_avcodec_base.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子微 --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index fca824fae..3ac7a56ba 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -941,7 +941,7 @@ extern const char *OH_MD_KEY_BUFFER_DURATION; */ extern const char *OH_MD_KEY_VIDEO_SAR; /** - * @brief Key for start time of file in microseconds, value type is int64_t. + * @brief Key for start time of the first frame in the media file in microseconds, value type is int64_t. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 12 -- Gitee From 3ef554e3322201f25ea7a57eb5828376818c0304 Mon Sep 17 00:00:00 2001 From: wanxiaoqing Date: Mon, 6 Jan 2025 16:07:26 +0800 Subject: [PATCH 365/630] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E6=80=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanxiaoqing --- distributeddatamgr/udmf/include/udmf.h | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/distributeddatamgr/udmf/include/udmf.h b/distributeddatamgr/udmf/include/udmf.h index 5a8491cfc..b846fc026 100644 --- a/distributeddatamgr/udmf/include/udmf.h +++ b/distributeddatamgr/udmf/include/udmf.h @@ -467,22 +467,6 @@ int OH_UdmfRecord_GetHtml(OH_UdmfRecord* pThis, OH_UdsHtml* html); int OH_UdmfRecord_GetAppItem(OH_UdmfRecord* pThis, OH_UdsAppItem* appItem); /** - * @brief Set the data provider of the types. - * - * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}. - * @param types Represents a pointer to a group of data types; - * @param count Represents the number of data types; - * @param provider Represents a pointer an instance of {@link OH_UdmfRecordProvider}. - * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. - * {@link UDMF_E_OK} success. - * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. - * @see OH_UdmfRecord OH_UdmfRecordProvider Udmf_ErrCode. - * @since 13 - */ -int OH_UdmfRecord_SetProvider(OH_UdmfRecord* pThis, const char* const* types, unsigned int count, - OH_UdmfRecordProvider* provider); - -/** * @brief Get one {OH_UdsFileUri} data from the {@link OH_UdmfRecord} record. * * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}. @@ -508,6 +492,22 @@ int OH_UdmfRecord_GetFileUri(OH_UdmfRecord* pThis, OH_UdsFileUri* fileUri); */ int OH_UdmfRecord_GetPixelMap(OH_UdmfRecord* pThis, OH_UdsPixelMap* pixelMap); +/** + * @brief Set the data provider of the types. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}. + * @param types Represents a pointer to a group of data types; + * @param count Represents the number of data types; + * @param provider Represents a pointer an instance of {@link OH_UdmfRecordProvider}. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdmfRecord OH_UdmfRecordProvider Udmf_ErrCode. + * @since 13 + */ +int OH_UdmfRecord_SetProvider(OH_UdmfRecord* pThis, const char* const* types, unsigned int count, + OH_UdmfRecordProvider* provider); + /** * @brief Get one {@link OH_UdsArrayBuffer} data from the {@link OH_UdmfRecord} record. * -- Gitee From 67730f32060a221d524a563cdcbd2b0f4f0bed99 Mon Sep 17 00:00:00 2001 From: zww Date: Mon, 6 Jan 2025 17:18:44 +0800 Subject: [PATCH 366/630] fix format Signed-off-by: zww --- security/huks/include/native_huks_api.h | 104 ++++++++++++------------ 1 file changed, 51 insertions(+), 53 deletions(-) diff --git a/security/huks/include/native_huks_api.h b/security/huks/include/native_huks_api.h index 9bde4391f..37d74511b 100644 --- a/security/huks/include/native_huks_api.h +++ b/security/huks/include/native_huks_api.h @@ -55,7 +55,7 @@ extern "C" { * @param sdkVersion Indicates the pointer to the SDK version (in string format) obtained. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If sdkVersion or - * sdkVersion->data is null, or if sdkVersion->size is too small. + * sdkVersion->data is null, or if sdkVersion->size is too small. * @since 9 * @version 1.0 */ @@ -71,21 +71,21 @@ struct OH_Huks_Result OH_Huks_GetSdkVersion(struct OH_Huks_Blob *sdkVersion); * not of a temporary type, this parameter is a null pointer. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSetIn or - * paramSetOut is invalid. + * paramSetOut is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file, - * or if failed to write file. + * or if failed to write file. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the base key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required - * but not set. + * but not set. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. * @since 9 * @version 1.0 @@ -102,15 +102,14 @@ struct OH_Huks_Result OH_Huks_GenerateKeyItem(const struct OH_Huks_Blob *keyAlia * @param key Indicates the pointer to the key to import. The key must be in the format required by the HUKS. * For details, see {@link HuksTypeApi}. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. - * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or - * key is invalid. + * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or key is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file, - * or if failed to write file. + * or if failed to write file. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed. @@ -133,14 +132,14 @@ struct OH_Huks_Result OH_Huks_ImportKeyItem(const struct OH_Huks_Blob *keyAlias, * The key must be in the format required by the HUKS. For details, see {@link OH_Huks_AlgSuite}. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or wrappingKeyAlias or - * paramSet or wrappedKeyData is invalid. + * paramSet or wrappedKeyData is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file, - * or if failed to write file. + * or if failed to write file. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. @@ -161,14 +160,13 @@ struct OH_Huks_Result OH_Huks_ImportWrappedKeyItem(const struct OH_Huks_Blob *ke * @param paramSet Indicates the pointer to the parameters required for exporting the public key. * @param key Indicates the pointer to the public key exported. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. - * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or - * paramSet or key is invalid. + * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or key is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. @@ -189,10 +187,10 @@ struct OH_Huks_Result OH_Huks_ExportPublicKeyItem(const struct OH_Huks_Blob *key * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * @since 9 @@ -210,13 +208,13 @@ struct OH_Huks_Result OH_Huks_DeleteKeyItem(const struct OH_Huks_Blob *keyAlias, * @param paramSetOut Indicates the pointer to the attributes obtained. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSetIn or - * paramSetOut is invalid. + * paramSetOut is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. @@ -236,10 +234,10 @@ struct OH_Huks_Result OH_Huks_GetKeyItemParamSet(const struct OH_Huks_Blob *keyA * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * @since 9 @@ -256,20 +254,20 @@ struct OH_Huks_Result OH_Huks_IsKeyItemExist(const struct OH_Huks_Blob *keyAlias * @param paramSet Indicates the pointer to the parameters required for obtaining the key certificate. * @param certChain Indicates the pointer to the key certificate chain obtained. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. - * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or - * certChain is invalid. + * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or + * paramSet or certChain is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_PERMISSION_FAIL} 201 - If the permission check failed, - * please apply for the required permissions first. + * please apply for the required permissions first. * @since 9 * @version 1.0 */ @@ -284,19 +282,19 @@ struct OH_Huks_Result OH_Huks_AttestKeyItem(const struct OH_Huks_Blob *keyAlias, * @param certChain Indicates the pointer to the key certificate chain obtained. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or - * paramSet or certChain is invalid. + * paramSet or certChain is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_PERMISSION_FAIL} 201 - If the permission check failed, - * please apply for the required permissions first. + * please apply for the required permissions first. * @since 11 * @version 1.0 * @note this is a networking duration interface caller need to get the certChain in asynchronous thread @@ -315,13 +313,13 @@ struct OH_Huks_Result OH_Huks_AnonAttestKeyItem(const struct OH_Huks_Blob *keyAl * @param token Indicates the pointer to the token used for key access control. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or handle or - * token is invalid. + * token is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_SESSION_LIMIT} 12000010 - If reached max session limit. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. @@ -347,24 +345,24 @@ struct OH_Huks_Result OH_Huks_InitSession(const struct OH_Huks_Blob *keyAlias, * @param outData Indicates the pointer to the output data. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or - * outData is invalid. + * outData is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit, - * or if the handle is not exist. + * or if the handle is not exist. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED} 12000008 - If auth token verify failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED} 12000007 - If auth token info - * verify failed. + * verify failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT} 12000009 - If authentication token timed out. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required - * but not set. + * but not set. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. * @since 9 * @version 1.0 @@ -384,24 +382,24 @@ struct OH_Huks_Result OH_Huks_UpdateSession(const struct OH_Huks_Blob *handle, * @param outData Indicates the pointer to the output data. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or - * outData is invalid. + * outData is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit, - * or if the handle is not exist. + * or if the handle is not exist. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED} 12000008 - If auth token verify failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED} 12000007 - If auth token info - * verify failed. + * verify failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT} 12000009 - If authentication token timed out. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required - * but not set. + * but not set. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. * @since 9 * @version 1.0 @@ -420,13 +418,13 @@ struct OH_Huks_Result OH_Huks_FinishSession(const struct OH_Huks_Blob *handle, * By default, this parameter is a null pointer. * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or - * outData is invalid. + * outData is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument - * is invalid. + * is invalid. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - or if the handle is not exist. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to - * get key argument. + * get key argument. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist. * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. -- Gitee From 19bb5af9d782c975c76051e989b4ecf5a5adcf74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E7=82=9C=E5=B3=B0?= Date: Mon, 6 Jan 2025 17:21:39 +0800 Subject: [PATCH 367/630] add audio raw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 董炜峰 --- .../av_codec/codec_base/libnative_media_codecbase.ndk.json | 2 +- multimedia/av_codec/native_avcodec_base.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index f97fce20a..8d74d681b 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -77,7 +77,7 @@ }, { "first_introduced": "14", - "name": "OH_AVCODEC_MIMETYPE_AUDIO_PCM" + "name": "OH_AVCODEC_MIMETYPE_AUDIO_RAW" }, { "first_introduced": "9", diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 8cba8b2dc..b72e37c6a 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -356,12 +356,12 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_SRT; extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; /** - * @brief Enumerates the mime types of audio pcm codec. + * @brief Enumerates the mime types of audio raw codec. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 14 */ -extern const char *OH_AVCODEC_MIMETYPE_AUDIO_PCM; +extern const char *OH_AVCODEC_MIMETYPE_AUDIO_RAW; /** * @brief Key for timeStamp in surface's extraData, value type is int64_t. -- Gitee From 5cb510367a9572da2ba6499f7b38aad3294d9660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E7=82=9C=E5=B3=B0?= Date: Mon, 6 Jan 2025 20:15:18 +0800 Subject: [PATCH 368/630] add raw stream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 董炜峰 --- .../av_codec/codec_base/libnative_media_codecbase.ndk.json | 2 +- multimedia/av_codec/native_avcodec_base.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 8d74d681b..514d2e455 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -76,7 +76,7 @@ "name": "OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT" }, { - "first_introduced": "14", + "first_introduced": "16", "name": "OH_AVCODEC_MIMETYPE_AUDIO_RAW" }, { diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index b72e37c6a..ec38b625e 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -356,10 +356,10 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_SRT; extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; /** - * @brief Enumerates the mime types of audio raw codec. + * @brief Enumerates the mime types of audio raw stream. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 14 + * @since 16 */ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_RAW; -- Gitee From 1e910551d11a46ae07556ac85ef3889bdea2afb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E7=82=9C=E5=B3=B0?= Date: Mon, 6 Jan 2025 20:44:44 +0800 Subject: [PATCH 369/630] add raw stream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 董炜峰 --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index ec38b625e..90c336877 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -356,7 +356,7 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_SRT; extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; /** - * @brief Enumerates the mime types of audio raw stream. + * @brief Enumerates the mime type of audio raw stream. * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 16 -- Gitee From 1049e747b55adfae3e2a84c2ae021e3a2b2cb74c Mon Sep 17 00:00:00 2001 From: zzm Date: Tue, 7 Jan 2025 03:47:15 +0000 Subject: [PATCH 370/630] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=91=EF=BC=9A=E7=89=88=E6=9C=AC=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zzm --- multimedia/av_codec/avcodec_audio_channel_layout.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multimedia/av_codec/avcodec_audio_channel_layout.h b/multimedia/av_codec/avcodec_audio_channel_layout.h index 5afc6f04c..b5f5c95fa 100644 --- a/multimedia/av_codec/avcodec_audio_channel_layout.h +++ b/multimedia/av_codec/avcodec_audio_channel_layout.h @@ -32,7 +32,8 @@ * @kit AVCodecKit * @library libnative_media_codecbase.so * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 9 + * @deprecated since 11 + * @since 10 */ #ifndef AVCODEC_AUDIO_CHANNEL_LAYOUT_H -- Gitee From a9ae75ff3ceac06993690f3d7b5f40e7560aeddc Mon Sep 17 00:00:00 2001 From: guochengying <346447065@qq.com> Date: Tue, 7 Jan 2025 12:49:46 +0000 Subject: [PATCH 371/630] update BasicServicesKit/commonevent/oh_commonevent_support.h. Signed-off-by: guochengying <346447065@qq.com> --- .../commonevent/oh_commonevent_support.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/BasicServicesKit/commonevent/oh_commonevent_support.h b/BasicServicesKit/commonevent/oh_commonevent_support.h index 102a28dee..3a0e678bf 100644 --- a/BasicServicesKit/commonevent/oh_commonevent_support.h +++ b/BasicServicesKit/commonevent/oh_commonevent_support.h @@ -98,31 +98,17 @@ static const char* const COMMON_EVENT_SCREEN_OFF = "usual.event.SCREEN_OFF"; */ static const char* const COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON"; -/** - * @brief This commonEvent means when the device is is about to enter the force sleep mode. - * - * @since 12 - */ -static const char* const COMMON_EVENT_ENTER_FORCE_SLEEP = "usual.event.ENTER_FORCE_SLEEP"; - -/** - * @brief This commonEvent means when the device is exits the force sleep mode. - * - * @since 12 - */ -static const char* const COMMON_EVENT_EXIT_FORCE_SLEEP = "usual.event.EXIT_FORCE_SLEEP"; - /** * @brief This commonEvent means when the device is is about to enter the hibernate mode. * - * @since 14 + * @since 15 */ static const char* const COMMON_EVENT_ENTER_HIBERNATE = "usual.event.ENTER_HIBERNATE"; /** * @brief This commonEvent means when the device is exits the hibernate mode. * - * @since 14 + * @since 15 */ static const char* const COMMON_EVENT_EXIT_HIBERNATE = "usual.event.EXIT_HIBERNATE"; -- Gitee From 4e79e72c0ff418c0ef27d264e5105c9bba40d8f0 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 8 Jan 2025 10:47:49 +0800 Subject: [PATCH 372/630] AVRecorder NDK interfaces revision Signed-off-by: Steven --- multimedia/player_framework/avrecorder.h | 2 +- multimedia/player_framework/avrecorder_base.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h index 2661abc48..e408aa4d9 100644 --- a/multimedia/player_framework/avrecorder.h +++ b/multimedia/player_framework/avrecorder.h @@ -220,7 +220,7 @@ OH_AVErrCode OH_AVRecorder_SetErrorCallback(OH_AVRecorder *recorder, OH_AVRecord * URI events generated by the av recorder. This interface must be called before Start is called. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder Pointer to an OH_AVRecorder instance - * @param callback Error callback function, see {@link OH_AVRecorder_OnUri} + * @param callback Uri callback function, see {@link OH_AVRecorder_OnUri} * @param userData Pointer to user specific data * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index 27f397f69..305b19c83 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -344,7 +344,7 @@ typedef void (*OH_AVRecorder_OnError)(OH_AVRecorder *recorder, int32_t errorCode * @brief Called when current recording is finished in OH_AVRecorder_FileGenerationMode.AUTO_CREATE_CAMERA_SCENE * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder Pointer to an OH_AVRecorder instance. - * @param asset Error code. + * @param Pointer to an OH_MediaAsset instance. * @param userData Pointer to user specific data. * @since 16 * @version 1.0 -- Gitee From 1859ee0fb553f84630dd397d56b6d401b8e038d7 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 8 Jan 2025 02:53:04 +0000 Subject: [PATCH 373/630] update multimedia/player_framework/avrecorder.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h index e408aa4d9..abd2af71e 100644 --- a/multimedia/player_framework/avrecorder.h +++ b/multimedia/player_framework/avrecorder.h @@ -233,4 +233,4 @@ OH_AVErrCode OH_AVRecorder_SetUriCallback(OH_AVRecorder *recorder, OH_AVRecorder } #endif -#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_H \ No newline at end of file +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_H -- Gitee From 1eb0d6b6c4a7e873d55719124b292c3f2cd83078 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 8 Jan 2025 02:53:29 +0000 Subject: [PATCH 374/630] update multimedia/player_framework/avrecorder_base.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder_base.h | 94 ++++++++----------- 1 file changed, 37 insertions(+), 57 deletions(-) diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index 305b19c83..e4eefcdb5 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -21,7 +21,6 @@ * * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 * @} */ @@ -34,7 +33,6 @@ * @library libavrecorder.so * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_BASE_H @@ -52,7 +50,6 @@ extern "C" { * @brief Initialization of avrecorder * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder OH_AVRecorder; @@ -60,128 +57,120 @@ typedef struct OH_AVRecorder OH_AVRecorder; * @brief audio source type for recorder * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef enum OH_AVRecorder_AudioSourceType { /* Default audio source type. */ - DEFAULT = 0, + AVRECORDER_DEFAULT = 0, /* Source type mic. */ - MIC = 1, + AVRECORDER_MIC = 1, /* Source type Voice recognition. */ - VOICE_RECOGNITION = 2, + AVRECORDER_VOICE_RECOGNITION = 2, /* Source type Voice communication. */ - VOICE_COMMUNICATION = 7, + AVRECORDER_VOICE_COMMUNICATION = 7, /* Source type Voice message. */ - VOICE_MESSAGE = 10, + AVRECORDER_VOICE_MESSAGE = 10, /* Source type Camcorder. */ - CAMCORDER = 13, + AVRECORDER_CAMCORDER = 13, } OH_AVRecorder_AudioSourceType; /** * @brief video source type for recorder * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef enum OH_AVRecorder_VideoSourceType { /* Surface raw data. */ - SURFACE_YUV = 0, + AVRECORDER_SURFACE_YUV = 0, /* Surface ES data. */ - SURFACE_ES = 1, + AVRECORDER_SURFACE_ES = 1, } OH_AVRecorder_VideoSourceType; /** * @brief Enumerates Codec MIME types * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef enum OH_AVRecorder_CodecMimeType { /* H.264 codec MIME type. */ - VIDEO_AVC = 2, + AVRECORDER_VIDEO_AVC = 2, /* AAC codec MIME type. */ - AUDIO_AAC = 3, + AVRECORDER_AUDIO_AAC = 3, /* mp3 codec MIME type. */ - AUDIO_MP3 = 4, + AVRECORDER_AUDIO_MP3 = 4, /* G711-mulaw codec MIME type. */ - AUDIO_G711MU = 5, + AVRECORDER_AUDIO_G711MU = 5, /* MPEG4 codec MIME type. */ - VIDEO_MPEG4 = 6, + AVRECORDER_VIDEO_MPEG4 = 6, /* H.265 codec MIME type. */ - VIDEO_HEVC = 8, + AVRECORDER_VIDEO_HEVC = 8, } OH_AVRecorder_CodecMimeType; /** * @brief Enumerates container format type(The abbreviation for 'container format type' is CFT) * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef enum OH_AVRecorder_ContainerFormatType { /* A video container format type mp4. */ - CFT_MPEG_4 = 2, - /* A audio container format type m4a. */ - CFT_MPEG_4A = 6, - /* A audio container format type mp3. */ - CFT_MP3 = 9, - /* A audio container format type wav. */ - CFT_WAV = 10, + AVRECORDER_CFT_MPEG_4 = 2, + /* An audio container format type m4a. */ + AVRECORDER_CFT_MPEG_4A = 6, + /* An audio container format type mp3. */ + AVRECORDER_CFT_MP3 = 9, + /* An audio container format type wav. */ + AVRECORDER_CFT_WAV = 10, } OH_AVRecorder_ContainerFormatType; /** * @brief Recorder States * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef enum OH_AVRecorder_State { /* idle states */ - IDLE = 0, + AVRECORDER_IDLE = 0, /* prepared states */ - PREPARED = 1, + AVRECORDER_PREPARED = 1, /* started states */ - STARTED = 2, + AVRECORDER_STARTED = 2, /* paused states */ - PAUSED = 3, + AVRECORDER_PAUSED = 3, /* stopped states */ - STOPPED = 4, + AVRECORDER_STOPPED = 4, /* released states */ - RELEASED = 5, + AVRECORDER_RELEASED = 5, /* error states */ - ERROR = 6, + AVRECORDER_ERROR = 6, } OH_AVRecorder_State; /** * @brief reason of recorder state change * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef enum OH_AVRecorder_StateChangeReason { /* State changed by user operation */ - USER = 0, + AVRECORDER_USER = 0, /* State changed by background action */ - BACKGROUND = 1, + AVRECORDER_BACKGROUND = 1, } OH_AVRecorder_StateChangeReason; /** * @brief mode of creating recorder file * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef enum OH_AVRecorder_FileGenerationMode { /* Application Creation */ - APP_CREATE = 0, + AVRECORDER_APP_CREATE = 0, /* System Creation. Valid only in camera scene */ - AUTO_CREATE_CAMERA_SCENE = 1, + AVRECORDER_AUTO_CREATE_CAMERA_SCENE = 1, } OH_AVRecorder_FileGenerationMode; /** * @brief Provides the media recorder profile definitions * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_Profile { /* Indicates the audio bitrate */ @@ -214,7 +203,6 @@ typedef struct OH_AVRecorder_Profile { * @brief Provides the geographical location definitions for media resources * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_Location { /* Latitude */ @@ -227,12 +215,11 @@ typedef struct OH_AVRecorder_Location { * @brief define the basic template of metadata * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_MetadataTemplate { - /* key value of the matadata */ + /* key value of the metadata */ char *key; - /* contents of the matadata */ + /* contents of the metadata */ char *value; } OH_AVRecorder_MetadataTemplate; @@ -240,7 +227,6 @@ typedef struct OH_AVRecorder_MetadataTemplate { * @brief Provides the container definition for media data * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_Metadata { /* The metadata to retrieve the content type or genre of the data source */ @@ -257,7 +243,6 @@ typedef struct OH_AVRecorder_Metadata { * @brief Provides the media recorder configuration definitions * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_Config { /* Indicates the recording audio source type */ @@ -278,7 +263,6 @@ typedef struct OH_AVRecorder_Config { * @brief Provides Range with lower and upper limit * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_Range { /* lower limit of the range */ @@ -291,7 +275,6 @@ typedef struct OH_AVRecorder_Range { * @brief Provides encoder info * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_EncoderInfo { /* encoder format MIME */ @@ -319,10 +302,9 @@ typedef struct OH_AVRecorder_EncoderInfo { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder The pointer to an OH_AVRecorder instance. * @param state Indicates the recorder state. For details, see {@link OH_AVRecorder_State}. - * @param reason for recorder state change. For details, see {@link OH_AVRecorder_StateChangeReason}. + * @param reason Reason for recorder state change. For details, see {@link OH_AVRecorder_StateChangeReason}. * @param userData Pointer to user specific data. * @since 16 - * @version 1.0 */ typedef void (*OH_AVRecorder_OnStateChange)(OH_AVRecorder *recorder, OH_AVRecorder_State state, OH_AVRecorder_StateChangeReason reason, void *userData); @@ -335,7 +317,6 @@ typedef void (*OH_AVRecorder_OnStateChange)(OH_AVRecorder *recorder, * @param errorMsg Error message. * @param userData Pointer to user specific data. * @since 16 - * @version 1.0 */ typedef void (*OH_AVRecorder_OnError)(OH_AVRecorder *recorder, int32_t errorCode, const char *errorMsg, void *userData); @@ -344,10 +325,9 @@ typedef void (*OH_AVRecorder_OnError)(OH_AVRecorder *recorder, int32_t errorCode * @brief Called when current recording is finished in OH_AVRecorder_FileGenerationMode.AUTO_CREATE_CAMERA_SCENE * @syscap SystemCapability.Multimedia.Media.AVRecorder * @param recorder Pointer to an OH_AVRecorder instance. - * @param Pointer to an OH_MediaAsset instance. + * @param asset Pointer to an OH_MediaAsset instance. * @param userData Pointer to user specific data. * @since 16 - * @version 1.0 */ typedef void (*OH_AVRecorder_OnUri)(OH_AVRecorder *recorder, OH_MediaAsset *asset, void *userData); @@ -355,4 +335,4 @@ typedef void (*OH_AVRecorder_OnUri)(OH_AVRecorder *recorder, OH_MediaAsset *asse } #endif -#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_BASE_H \ No newline at end of file +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_BASE_H -- Gitee From ec619ee1b9f74ca9bc50e03296bfea3b37c3066e Mon Sep 17 00:00:00 2001 From: Tintin9529 Date: Tue, 24 Dec 2024 17:12:15 +0800 Subject: [PATCH 375/630] support dialog new api Signed-off-by: Tintin9529 --- arkui/ace_engine/native/native_dialog.h | 260 ++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 24 +++ 2 files changed, 284 insertions(+) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index c399920d7..a42030057 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -60,6 +60,18 @@ typedef enum { DIALOG_DISMISS_SLIDE_DOWN, } ArkUI_DismissReason; +/** +* @brief Enumerates the level mode. +* +* @since 16 +*/ +typedef enum { + /** overlay mode. */ + ARKUI_LEVEL_MODE_OVERLAY = 0, + /** embedded mode. */ + ARKUI_LEVEL_MODE_EMBEDDED, +} ArkUI_LevelMode; + /** * @brief Invoked when the dialog box is closed. * @@ -285,6 +297,254 @@ typedef struct { ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(ArkUI_DialogDismissEvent* event)); } ArkUI_NativeDialogAPI_1; +/** + * @brief Provides the custom dialog box APIs for the native side. + * + * @version 2 + * @since 16 + */ +typedef struct { + ArkUI_NativeDialogAPI_1 nativeDialogAPI1; + /** + * @brief Registers a listener callback before the dialog openAnimation starts. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback before the dialog openAnimation starts. + * @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. + * @since 16 + */ + int32_t (*registerOnWillAppear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Registers a listener callback when the dialog appears. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback when the dialog appears. + * @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. + * @since 16 + */ + int32_t (*registerOnDidAppear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Registers a listener callback before the dialog closeAnimation starts. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback before the dialog closeAnimation starts. + * @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. + * @since 16 + */ + int32_t (*registerOnWillDisappear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Registers a listener callback when the dialog disappears. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback when the dialog disappears. + * @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. + * @since 16 + */ + int32_t (*registerOnDidDisappear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Sets the background border widths for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param top width of the top border. + * @param right width of the right border. + * @param bottom width of the bottom border. + * @param left width of the left border. + * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} + * @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. + * @since 16 + */ + int32_t (*setBorderWidth)(ArkUI_NativeDialogHandle handle, float top, float right, float bottom, float left, + ArkUI_LengthMetricUnit unit); + /** + * @brief Sets the background border colors for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param top color of the top border. + * @param right color of the right border. + * @param bottom color of the bottom border. + * @param left width of the left border. + * @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. + * @since 16 + */ + int32_t (*setBorderColor)(ArkUI_NativeDialogHandle handle, uint32_t top, uint32_t right, uint32_t bottom, + uint32_t left); + /** + * @brief Sets the background border styles for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param top style of the top border, The parameter type is {@link ArkUI_BorderStyle}. + * @param right style of the right border, The parameter type is {@link ArkUI_BorderStyle}. + * @param bottom style of the bottom border, The parameter type is {@link ArkUI_BorderStyle}. + * @param left style of the left border, The parameter type is {@link ArkUI_BorderStyle}. + * @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. + * @since 16 + */ + int32_t (*setBorderStyle)(ArkUI_NativeDialogHandle handle, int32_t top, int32_t right, int32_t bottom, + int32_t left); + /** + * @brief Sets the background width for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param width width, in vp. + * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} + * @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. + * @since 16 + */ + int32_t (*setWidth)(ArkUI_NativeDialogHandle handle, float width, ArkUI_LengthMetricUnit unit); + /** + * @brief Sets the background height for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param height height, in vp. + * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} + * @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. + * @since 16 + */ + int32_t (*setHeight)(ArkUI_NativeDialogHandle handle, float height, ArkUI_LengthMetricUnit unit); + /** + * @brief Sets the background shadow for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param shadow shadow effect. The parameter type is {@link ArkUI_ShadowStyle}. + * @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. + * @since 16 + */ + int32_t (*setShadow)(ArkUI_NativeDialogHandle handle, ArkUI_ShadowStyle shadow); + /** + * @brief Sets the background custom shadow for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param customShadow custom shadow effect. + * .value[0]?.f32: blur radius of the shadow, in vp.\n + * .value[1]?.i32: whether to enable the coloring strategy. The value 1 means to enable the coloring + * strategy, and 0 (default value) means the opposite.\n + * .value[2]?.f32: offset of the shadow along the x-axis, in px.\n + * .value[3]?.f32: offset of the shadow along the y-axis, in px.\n + * .value[4]?.i32: shadow type {@link ArkUI_ShadowType}. Default value is ARKUI_SHADOW_TYPE_COLOR.\n + * .value[5]?.u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.\n + * .value[6]?.u32: whether to fill the shadow. The value 1 means to fill the shadow, and 0 + * means the opposite.\n + * @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. + * @since 16 + */ + int32_t (*setCustomShadow)(ArkUI_NativeDialogHandle handle, const ArkUI_AttributeItem* customShadow); + /** + * @brief Sets the background blur attribute for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param blurStyle blue type. The value is an enum of {@link ArkUI_BlurStyle}. + * @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. + * @since 16 + */ + int32_t (*setBackgroundBlurStyle)(ArkUI_NativeDialogHandle handle, ArkUI_BlurStyle blurStyle); + /** + * @brief Set the customDialog's keyboard avoid mode. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param keyboardAvoidMode avoid mode. The value is an enum of {@link ArkUI_KeyboardAvoidMode}. + * @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. + * @since 16 + */ + int32_t (*setKeyboardAvoidMode)(ArkUI_NativeDialogHandle handle, ArkUI_KeyboardAvoidMode keyboardAvoidMode); + /** + * @brief Defines whether to respond to the hover mode. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param enableHoverMode whether to respond to the hover mode, default value is false. + * @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. + * @since 16 + */ + int32_t (*enableHoverMode)(ArkUI_NativeDialogHandle handle, bool enableHoverMode); + /** + * @brief Defines the customDialog's display area in hover mode. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param hoverModeAreaType type of area in hover mode. The value is an enum of {@link ArkUI_HoverModeAreaType}. + * @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. + * @since 16 + */ + int32_t (*setHoverModeArea)(ArkUI_NativeDialogHandle handle, ArkUI_HoverModeAreaType hoverModeAreaType); + /** + * @brief Defines the distance between the customDialog and system keyboard. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param distance distance, in vp. + * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} + * @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. + * @since 16 + */ + int32_t (*setKeyboardAvoidDistance)(ArkUI_NativeDialogHandle handle, float distance, ArkUI_LengthMetricUnit unit); + + /** + * @brief Sets the level mode for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param levelMode Indicates the level mode. The parameter type is {@link ArkUI_LevelMode}. + * @return Returns the error 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. + * @since 16 + */ + int32_t (*setLevelMode)(ArkUI_NativeDialogHandle handle, ArkUI_LevelMode levelMode); +} ArkUI_NativeDialogAPI_2; + /** * @brief Sets whether to block the system behavior of dismissing a dialog box. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 08542a381..c25a69ecd 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2220,6 +2220,30 @@ typedef enum { ARKUI_SAFE_AREA_EDGE_END = 1 << 3, } ArkUI_SafeAreaEdge; +/** + * @brief defines the enumerated value of the customDialog's keyboard avoid mode. + * + * @since 16 + */ +typedef enum { + /** Defines avoid keyboard when keyboard shows. */ + ARKUI_KEYBOARD_AVOID_MODE_DEFAULT = 0, + /** Defines not avoid keyboard when keyboard shows. */ + ARKUI_KEYBOARD_AVOID_MODE_NONE, +} ArkUI_KeyboardAvoidMode; + +/** + * @brief defines the enumerated value of area in hover mode. + * + * @since 16 + */ +typedef enum { + /** Layout top half screen when the phone in hover mode. */ + ARKUI_HOVER_MODE_AREA_TYPE_TOP = 0, + /** Layout bottom half screen when the phone in hover mode. */ + ARKUI_HOVER_MODE_AREA_TYPE_BOTTOM, +} ArkUI_HoverModeAreaType; + /** * @brief Defines parameter used by the system font style callback event. * -- Gitee From 224d3e95d394cacf8353d984c01cf5268ca53271 Mon Sep 17 00:00:00 2001 From: yzj688 Date: Mon, 9 Dec 2024 16:35:24 +0800 Subject: [PATCH 376/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Drawing=20GPU?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20Signed-off-by:=20yzj688=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graphic_2d/native_drawing/drawing_gpu_context.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h index 8d5df8ea9..9bc3239bd 100644 --- a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h +++ b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -68,6 +68,16 @@ typedef struct { */ OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions gpuContextOptions); +/** + * @brief Creates an OH_Drawing_GpuContext object, whose GPU backend context depends on device. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @return Returns the pointer to the OH_Drawing_GpuContext object created. + * @since 16 + * @version 1.0 + */ +OH_Drawing_GpuContext* OH_Drawing_GpuContextCreate(); + /** * @brief Destroys an OH_Drawing_GpuContext object and reclaims the memory occupied by the object. * -- Gitee From 4544fc152d290142ded640865ad998750329e03f Mon Sep 17 00:00:00 2001 From: c30053238 Date: Wed, 8 Jan 2025 17:42:13 +0800 Subject: [PATCH 377/630] add capi backdropblur Signed-off-by: c30053238 --- arkui/ace_engine/native/native_node.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0783cab5..62b2a6f8b 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1848,6 +1848,27 @@ typedef enum { */ NODE_TAB_STOP = 98, + /** + * @brief Defines blur attribute of backdrop, 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:Represents the blur radius of backdrop. The unit is px. The value range is [0,+∞).\n + * .value[1]?.f32:Represents a gray scale blur parameter, which affects the degree of brightening black color.\n + * The value range is [0,127].\n + * .value[2]?.f32:Represents a gray scale blur parameter, which affects the degree of darkening white color.\n + * The value range is [0,127].\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32:Represents the blur radius of backdrop. The unit is px. The value range is [0,+∞).\n + * .value[1].f32:Represents a gray scale blur parameter, which affects the degree of brightening black color.\n + * The value range is [0,127].\n + * .value[2].f32:Represents a gray scale blur parameter, which affects the degree of darkening white color.\n + * The value range is [0,127].\n + * + * @since 16 + */ + NODE_BACKDROP_BLUR = 99, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * -- Gitee From 4a062b66b6268516a62523f72c2285f5d870a7f7 Mon Sep 17 00:00:00 2001 From: LuoBin Date: Tue, 31 Dec 2024 11:26:49 +0800 Subject: [PATCH 378/630] =?UTF-8?q?USB=20DDK=E5=A2=9E=E5=BC=BAndk=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LuoBin Change-Id: I54c7acd5ea74fa12a32ad4a217bcffe7dc80a7e3 --- .../external_device_manager/usb/libusb.ndk.json | 3 +++ drivers/external_device_manager/usb/usb_ddk_api.h | 15 ++++++++++++++- .../external_device_manager/usb/usb_ddk_types.h | 14 +++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/external_device_manager/usb/libusb.ndk.json b/drivers/external_device_manager/usb/libusb.ndk.json index eb677bfee..55f578e40 100644 --- a/drivers/external_device_manager/usb/libusb.ndk.json +++ b/drivers/external_device_manager/usb/libusb.ndk.json @@ -46,5 +46,8 @@ }, { "name": "OH_Usb_DestroyDeviceMemMap" + }, + { + "name": "OH_Usb_GetDevices" } ] \ No newline at end of file diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index 1ee732e19..cd6213272 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -284,6 +284,19 @@ int32_t OH_Usb_CreateDeviceMemMap(uint64_t deviceId, size_t size, UsbDeviceMemMa * @version 1.0 */ void OH_Usb_DestroyDeviceMemMap(UsbDeviceMemMap *devMmap); + +/** + * @brief Obtain USB devices. + * + * @permission ohos.permission.ACCESS_DDK_USB + * @param devices USB device array. + * @return {@link USB_DDK_SUCCESS} the operation is successful. + * {@link USB_DDK_NO_PERM} permission check failed. + * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. + * {@link USB_DDK_INVALID_PARAMETER} devices is null. + * @since 16 + */ +int32_t OH_Usb_GetDevices(struct Usb_DeviceArray *devices); /** @} */ #ifdef __cplusplus } diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 8c51cd726..7378ca454 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -325,6 +325,18 @@ typedef enum { /** @error Transmission timeout. */ USB_DDK_TIMEOUT = 27400004, } UsbDdkErrCode; + +/** + * @brief all usb devices. + * + * @since 16 + */ +typedef struct Usb_DeviceArray { + /** device id array */ + uint64_t* deviceIds; + /** Number of devices. If the value is 0, no device exists */ + uint32_t num; +} Usb_DeviceArray; #ifdef __cplusplus } /** @} */ -- Gitee From 7e3f70727ba055db4d7bf0c5a2f69a566012482e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B3?= Date: Thu, 9 Jan 2025 10:37:21 +0800 Subject: [PATCH 379/630] =?UTF-8?q?List=E7=BB=84=E4=BB=B6C-API=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=A1=A5=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王关 --- arkui/ace_engine/native/native_node.h | 162 +++++++++++++++++++++++++- arkui/ace_engine/native/native_type.h | 18 +++ 2 files changed, 174 insertions(+), 6 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0783cab5..84ae82a28 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4900,6 +4900,32 @@ typedef enum { */ NODE_SCROLL_SIZE, + /** + * @brief Sets the offset from the start of the scrollable components content. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: offset from the start of the content, in vp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: offset from the start of the content, in vp. \n + * + * @since 16 + */ + NODE_SCROLL_CONTENT_START_OFFSET, + + /** + * @brief Sets the offset from the end of the scrollable components content. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: offset from the end of the content, in vp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: offset from the end of the content, in vp. \n + * + * @since 16 + */ + NODE_SCROLL_CONTENT_END_OFFSET, + /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and * obtained as required through APIs. @@ -4950,12 +4976,20 @@ typedef enum { NODE_LIST_NODE_ADAPTER, /** - * @brief Sets the number of cached items in the list adapter. - * This attribute can be set, reset, and obtained as required through APIs. - * - * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].i32: number of cached items in the list adapter. \n - */ + * @brief Sets the number of cached items in the list adapter. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: number of cached items in the list adapter. \n + * .value[1]?.i32: whether to show cached items. The value 0 means to hide cached items, and 0 means + * to show cached items. The default value is 0. This parameter is supported since API version 16. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: number of cached items in the list adapter. \n + * .value[1].i32: whether to show cached items. The value 0 means to hide cached items, and 0 means + * to show cached items. This parameter is supported since API version 16. \n + * + */ NODE_LIST_CACHED_COUNT, /** @@ -4970,6 +5004,8 @@ typedef enum { * 1 indicates an action and 0 indicates no action. Default value: 0。\n * .value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is * {@link ArkUI_ScrollAlignment}, default value is ARKUI_SCROLL_ALIGNMENT_START. \n + * .value[3]?.f32: extra offset, in vp. The default value is 0. + * This parameter is supported since API version 16. \n * */ NODE_LIST_SCROLL_TO_INDEX, @@ -5031,6 +5067,78 @@ typedef enum { */ NODE_LIST_DIVIDER = 1003009, + /** + * @brief Scrolls to the item with the specified index in the specified list item group. + * + * When smooth is set to true, all passed items are loaded and counted in layout calculation. + * This may result in performance issues if a large number of items are involved. \n + * \n + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: index of the target list item group in the current list. \n + *.value[1].i32: index of the target list item in the list item group. \n + * .value[2]?.i32: whether to enable the smooth animation for scrolling to the item with the specified index. + * The value 1 means to enable the animation, and 0 means the opposite. + * The default value is 0. \n + * .value[3]?.i32: how the item to scroll to is aligned with the container. The parameter type is + * {@link ArkUI_ScrollAlignment}. The default value is ARKUI_SCROLL_ALIGNMENT_START. \n + * + * @since 16 + */ + NODE_LIST_SCROLL_TO_INDEX_IN_GROUP = 1003010, + + /** + * @brief Sets the number of lanes in the list. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: number of lanes in the list. If the maximum and minimum lane widths are set, setting the number + * of lanes will not take effect. \n + * .value[1]?.f32: minimum lane width, in vp. \n + * .value[2]?.f32: maximum column width, in vp. \n + * .value[3]?.f32: lane spacing, in vp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: number of lanes in the list. \n + * .value[1].f32: minimum lane width, in vp. \n + * .value[2].f32: maximum column width, in vp. \n + * .value[3].f32: lane spacing, in vp. \n \n + * + * @since 16 + */ + NODE_LIST_LANES = 1003011, + + /** + * @brief Sets the list snap alignment mode. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: alignment mode for the list snap position. The parameter type is {@link ArkUI_ScrollSnapAlign}. + * The default value is ARKUI_SCROLL_SNAP_ALIGN_NONE.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + *.value[0].i32: alignment mode for the list snap position. The parameter type is {@link ArkUI_ScrollSnapAlign}.\n + * + * @since 16 + */ + NODE_LIST_SCROLL_SNAP_ALIGN = 1003012, + + /** + * @brief Sets whether to maintain the visible content's position when data is inserted or deleted outside the + * display area of the List component. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to maintain the visible content's position when data is inserted or deleted outside the + * display area of the List component. The value 0 means not to maintain the visible content's + * position, and 1 means the opposite. The default value is 0. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to maintain the visible content's position when data is inserted or deleted outside the + * display area of the List component. The value 0 means not to maintain the visible content's + * position, and 1 means the opposite. The default value is 0. \n + * + * @since 16 + */ + NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION = 1003013, + /** * @brief Defines whether to enable loop playback for the swiper. * This attribute can be set, reset, and obtained as required through APIs. @@ -5398,6 +5506,20 @@ typedef enum { */ NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE = 1005003, + /** + * @brief Defines the list item group adapter. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object: {@link ArkUI_NodeAdapter} object as the adapter. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object: {@link ArkUI_NodeAdapter} object. \n + * + * @since 16 + */ + NODE_LIST_ITEM_GROUP_NODE_ADAPTER = 1005004, + /** * @brief Defines the horizontal alignment mode of child components in the column. * This attribute can be set, reset, and obtained as required through APIs. @@ -6986,6 +7108,34 @@ typedef enum { */ NODE_LIST_ON_DID_SCROLL, + /** + * @brief Defines the event triggered when the currently displayed content of the ARKUI_NODE_LIST changes. + * + * Notes for triggering the event:\n + * This event is triggered once when the list is initialized and when the index of the first child component or the + * next child component in the list display area changes. + * During index calculation, the list item, header of the list item group, and footer of the list item group each + * are counted as a child component. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains three parameters: \n + * ArkUI_NodeComponentEvent.data[0].i32: index of the first child component in the list display area. \n + * ArkUI_NodeComponentEvent.data[1].i32: area in the list item group where the list display area starts. + * The type is {@link ArkUI_ListItemGroupArea}. \n + * ArkUI_NodeComponentEvent.data[2].i32: index of the list item at the start of the list display area + * in the list item group. + * If the start of the list display area is not on a list item, the value is -1. \n + * ArkUI_NodeComponentEvent.data[3].i32: index of the last child component in the list display area. \n + * ArkUI_NodeComponentEvent.data[4].i32: area in the list item group where the list display area ends. + * The type is {@link ArkUI_ListItemGroupArea}. \n + * ArkUI_NodeComponentEvent.data[5].i32: index of the list item at the end of the list display area in the + * list item group. + * If the end of the list display area is not on a list item, the value is -1. \n + * + * @since 16 + */ + NODE_LIST_ON_SCROLL_VISIBLE_CONTENT_CHANGE, + /** * @brief Defines the event triggered when the refresh state of the ARKUI_NODE_REFRESH object changes. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index e1cffe2c7..9878a469f 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2245,6 +2245,24 @@ typedef enum { ARKUI_SAFE_AREA_TYPE_KEYBOARD = 1 << 2, } ArkUI_SafeAreaType; +/** + * @brief Define an enum for the areas of the ListItemGroup component. + * + * @since 16 + */ +typedef enum { + /** Outside the area of the ListItemGroup component. */ + ARKUI_LIST_ITEM_GROUP_AREA_OUTSIDE = 0, + /** Area when the ListItemGroup component does not have the header, footer, or list item. */ + ARKUI_LIST_ITEM_SWIPE_AREA_NONE, + /** List item area of the ListItemGroup component. */ + ARKUI_LIST_ITEM_SWIPE_AREA_ITEM, + /** Header area of the ListItemGroup component. */ + ARKUI_LIST_ITEM_SWIPE_AREA_HEADER, + /** Footer area of the ListItemGroup component. */ + ARKUI_LIST_ITEM_SWIPE_AREA_FOOTER, +} ArkUI_ListItemGroupArea; + /** * @brief defines the enumerated value of the direction of the extended security zone. * -- Gitee From b66d5fcac3d7cc4cbf03ccd79e0f66ae22eee0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=98=B1=E6=99=94?= Date: Thu, 9 Jan 2025 06:55:23 +0000 Subject: [PATCH 380/630] delete redundant processes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 林昱晔 --- ndk_targets.gni | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/ndk_targets.gni b/ndk_targets.gni index 53517e3d9..80830b487 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -256,18 +256,18 @@ _ndk_base_libs = [ _ndk_sysroot_uapi = [ "//interface/sdk_c/third_party/musl/ndk_script:musl_sysroot" ] -_ndk_cmake = [ - "//prebuilts/cmake/darwin-universal:darwin_cmake_copy", - "//prebuilts/cmake/linux-x86:linux_cmake_copy", - "//prebuilts/cmake/windows-x86:windows_cmake_copy", - "//prebuilts/cmake/ohos:ohos_cmake_copy", - "//build/ohos/ndk:ndk_cmake_files", -] +_ndk_cmake = [ "//build/ohos/ndk:ndk_cmake_files" ] if (host_os == "mac") { - _ndk_cmake += [ "//build/ohos/ndk:copy_darwin_ohos_cmake" ] + _ndk_cmake += [ + "//prebuilts/cmake/darwin-universal:darwin_cmake_copy", + "//build/ohos/ndk:copy_darwin_ohos_cmake", + ] } else { _ndk_cmake += [ + "//prebuilts/cmake/linux-x86:linux_cmake_copy", + "//prebuilts/cmake/windows-x86:windows_cmake_copy", + "//prebuilts/cmake/ohos:ohos_cmake_copy", "//build/ohos/ndk:copy_linux_ohos_cmake", "//build/ohos/ndk:copy_windows_ohos_cmake", "//build/ohos/ndk:copy_ohos_ohos_cmake", @@ -285,19 +285,9 @@ if (host_os == "mac") { ] } -_ndk_targets_list = _ndk_library_targets + _ndk_base_libs + _ndk_sysroot_uapi + +all_ndk_targets_list = _ndk_library_targets + _ndk_base_libs + _ndk_sysroot_uapi + _ndk_cmake + _ndk_ninja -_parse_script = "//build/ohos/ndk/parse_ndk_targets.py" -_parse_args = [ - "--source-root-dir", - rebase_path("//", root_build_dir), - "--ndk-lib-target-list", -] -_parse_args += _ndk_targets_list - -all_ndk_targets_list = exec_script(_parse_script, _parse_args, "list lines") - if (build_windows_ndk_target) { all_ndk_targets_list += [ "//interface/sdk_c/third_party/musl/ndk_script:windows_x86_64" ] -- Gitee From 5ec6f0895ee649290e8a65f31b33434599e71ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=98=B1=E6=99=94?= Date: Thu, 9 Jan 2025 07:18:58 +0000 Subject: [PATCH 381/630] gn check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 林昱晔 --- ndk_targets.gni | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ndk_targets.gni b/ndk_targets.gni index 80830b487..344c73ff8 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -285,8 +285,8 @@ if (host_os == "mac") { ] } -all_ndk_targets_list = _ndk_library_targets + _ndk_base_libs + _ndk_sysroot_uapi + - _ndk_cmake + _ndk_ninja +all_ndk_targets_list = _ndk_library_targets + _ndk_base_libs + + _ndk_sysroot_uapi + _ndk_cmake + _ndk_ninja if (build_windows_ndk_target) { all_ndk_targets_list += -- Gitee From f42ff0daeab080a118f59a369d11446e5ac44813 Mon Sep 17 00:00:00 2001 From: zed Date: Mon, 9 Dec 2024 20:57:16 +0800 Subject: [PATCH 382/630] =?UTF-8?q?=E3=80=90NDK=E3=80=91=E5=B0=81=E8=A3=85?= =?UTF-8?q?PathEffect=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zed --- .../native_drawing/drawing_path_effect.h | 85 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 20 +++++ 2 files changed, 105 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h index 7576c2500..78c5d8f09 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h @@ -46,6 +46,48 @@ extern "C" { #endif +/** + * @brief Enumerate path effect types. + * + * @since 16 + * @version 1.0 + */ +typedef enum { + /** Indicates that the path effect is a translation effect. */ + PATH_EFFECT_TRANSLATE, + /** Indicates that the path effect is a rotation effect. */ + PATH_EFFECT_ROTATE, + /** Indicates that the path effect is a morph effect. */ + PATH_EFFECT_MORPH, +} OH_Drawing_PathEffectType; + +/** + * @brief Creates an OH_Drawing_PathEffect object that is a combination of paths, + * applying the inner path effect first and then the outer path effect. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param outer Indicates an OH_Drawing_PathEffect object + * @param inner Indicates an OH_Drawing_PathEffect object + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * @since 16 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreateComposePathEffect(OH_Drawing_PathEffect* outer, OH_Drawing_PathEffect* inner); + +/** + * @brief Creates an OH_Drawing_PathEffect object + * that turns the included angle of the path into a fillet of a specified radius. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param radius Indicates the degree of curvature of the arc, the radius must be greater than zero. + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * If nullptr is returned, the creation fails. + * The possible cause of the failure is radius is zero or less. + * @since 16 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreateCornerPathEffect(float radius); + /** * @brief Creates an OH_Drawing_PathEffect object. * @@ -59,6 +101,49 @@ extern "C" { */ OH_Drawing_PathEffect* OH_Drawing_CreateDashPathEffect(float* intervals, int count, float phase); +/** + * @brief Creates an OH_Drawing_PathEffect object + * that breaks the path and creates an irregular distribution on the path. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param segLength Indicates the maximum segment length of the path. + * @param deviation Indicates the deviation during drawing. + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * @since 16 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreateDiscretePathEffect(float segLength, float deviation); + +/** + * @brief Creates an OH_Drawing_PathEffect object and sets the path effect to a dash effect. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param advance Indicates the distance between the dashed segments. + * @param phase Indicates the offset into intervals array. + * @param type Indicates the type of the path effect. + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * If nullptr is returned, the creation fails. + * The possible cause of the failure is advance and phase are zero or less. + * @since 16 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreatePathDashEffect(const OH_Drawing_Path* path, float advance, float phase, + OH_Drawing_PathEffectType type); + +/** + * @brief Creates an OH_Drawing_PathEffect object by overlaying two path effects. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param firstPathEffect Indicates the pointer to an OH_Drawing_PathEffect object. + * @param secondPathEffect Indicates the pointer to an OH_Drawing_PathEffect object. + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * @since 16 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreateSumPathEffect(OH_Drawing_PathEffect* firstPathEffect, + OH_Drawing_PathEffect* secondPathEffect); + /** * @brief Destroys an OH_Drawing_PathEffect object and reclaims the memory occupied by the object. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 827409165..df589f07e 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -152,7 +152,27 @@ "name": "OH_Drawing_CanvasGetImageInfo" }, { "name": "OH_Drawing_CreateDashPathEffect" }, + { + "first_introduced": "16", + "name": "OH_Drawing_CreatePathDashEffect" + }, + { + "first_introduced": "16", + "name": "OH_Drawing_CreateSumPathEffect" + }, { "name": "OH_Drawing_PathEffectDestroy" }, + { + "first_introduced": "16", + "name":"OH_Drawing_CreateDiscretePathEffect" + }, + { + "first_introduced": "16", + "name":"OH_Drawing_CreateCornerPathEffect" + }, + { + "first_introduced": "16", + "name":"OH_Drawing_CreateComposePathEffect" + }, { "name": "OH_Drawing_ColorFilterCreateBlendMode" }, { "name": "OH_Drawing_ColorFilterCreateCompose" }, { "name": "OH_Drawing_ColorFilterCreateLinearToSrgbGamma" }, -- Gitee From a7cb79b5e9bd8f098bb9d75fc3ca954dda58cd16 Mon Sep 17 00:00:00 2001 From: liyi0309 Date: Fri, 10 Jan 2025 09:38:05 +0800 Subject: [PATCH 383/630] =?UTF-8?q?dialog=20=E9=A1=B5=E9=9D=A2=E7=BA=A7?= =?UTF-8?q?=E8=83=BD=E5=8A=9BC-API=20Signed-off-by:=20liyi0309?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/native_dialog.h | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index a42030057..164070c4b 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -72,6 +72,20 @@ typedef enum { ARKUI_LEVEL_MODE_EMBEDDED, } ArkUI_LevelMode; +/** +* @brief Enumerates the immersive mode. +* +* @since 16 +*/ +typedef enum { + /** Mask covering the parent node. */ + ARKUI_IMMERSIVE_MODE_DEFAULT = 0, + /** Mask covering the page node. */ + ARKUI_IMMERSIVE_MODE_PAGE, + /** Mask covering the root node. */ + ARKUI_IMMERSIVE_MODE_FULL, +} ArkUI_ImmersiveMode; + /** * @brief Invoked when the dialog box is closed. * @@ -543,6 +557,32 @@ typedef struct { * @since 16 */ int32_t (*setLevelMode)(ArkUI_NativeDialogHandle handle, ArkUI_LevelMode levelMode); + + /** + * @brief Sets the level uniqueId for a custom dialog box. + * + * @note This method must be called before the setLevelMode method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param uniqueId Indicates the uniquedId of any nodes in router or navigation pages. + * @return Returns the error 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. + * @since 16 + */ + int32_t (*setLevelUniqueId)(ArkUI_NativeDialogHandle handle, int32_t uniqueId); + + /** + * @brief Sets the immersive mode for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param immersiveMode Indicates the immersive mode. The parameter type is {@link ArkUI_ImmersiveMode}. + * @return Returns the error 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. + * @since 16 + */ + int32_t (*setImmersiveMode)(ArkUI_NativeDialogHandle handle, ArkUI_ImmersiveMode immersiveMode); } ArkUI_NativeDialogAPI_2; /** -- Gitee From af55ee8468fde4c9de5d3f2cf6c0d2d638dbf44c Mon Sep 17 00:00:00 2001 From: huangweichen Date: Fri, 10 Jan 2025 09:53:01 +0800 Subject: [PATCH 384/630] =?UTF-8?q?ArkUI=E6=8F=90=E4=BE=9BCAPI=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E7=84=A6=E7=82=B9=E5=8F=8A=E5=A4=84=E7=90=86=E7=84=A6?= =?UTF-8?q?=E7=82=B9=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangweichen --- arkui/ace_engine/native/BUILD.gn | 1 + arkui/ace_engine/native/libace.ndk.json | 16 ++++ .../native/native_interface_focus.h | 92 +++++++++++++++++++ arkui/ace_engine/native/native_type.h | 15 +++ 4 files changed, 124 insertions(+) create mode 100644 arkui/ace_engine/native/native_interface_focus.h diff --git a/arkui/ace_engine/native/BUILD.gn b/arkui/ace_engine/native/BUILD.gn index f8f7ff274..b48b73ada 100644 --- a/arkui/ace_engine/native/BUILD.gn +++ b/arkui/ace_engine/native/BUILD.gn @@ -33,6 +33,7 @@ if (!is_arkui_x) { "native_gesture.h", "native_interface.h", "native_interface_accessibility.h", + "native_interface_focus.h", "native_key_event.h", "native_node.h", "native_node_napi.h", diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 93b14a1c3..e0fd5bcfb 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2574,5 +2574,21 @@ { "first_introduced": "16", "name": "OH_ArkUI_UnregisterDrawCallbackOnNodeHandle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_FocusRequest" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_FocusClear" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_FocusActivate" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_FocusSetAutoTransfer" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_focus.h b/arkui/ace_engine/native/native_interface_focus.h new file mode 100644 index 000000000..cdf8d1794 --- /dev/null +++ b/arkui/ace_engine/native/native_interface_focus.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup ArkUI_NativeModule + * @{ + * + * @brief Provides focus capabilities of ArkUI on the native side, such as focus transfer operaions. + * + * @since 16 + */ + +/** + * @file native_interface_focus.h + * + * @brief Declares the APIs used to control the focus system. + * + * @library libace_ndk.z.so + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 16 + */ + +#ifndef ARKUI_NATIVE_INTERFACE_FOCUS_H +#define ARKUI_NATIVE_INTERFACE_FOCUS_H + +#include "napi/native_api.h" +#include "native_type.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Apply focus for a specific node. + * + * @param node The node. + * @return The error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE} if the node is not focusable. + * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR} if the node has unfocusable ancestor. + * {@link ARKUI_ERROR_CODE_FOCUS_NON_EXIST} if the node is not exists. + * @since 16 + */ +ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node); + +/** + * @brief Clear current focus to root scope. + * + * @param uiContext Indicates the pointer to a UI instance. + * @since 16 + */ +void OH_ArkUI_FocusClear(ArkUI_ContextHandle uiContext); + +/** + * @brief Set the focus active state in current window, the focus node would show its focus box. + * + * @param uiContext Indicates the pointer to a UI instance. + * @param isActive Set the state to be active or inactive. + * @param isAutoInactive When touch event or mouse-pressed event triggerd, + * "true" indicates to set state to inactive, + * "false" indicates to maintain the state until relative API is called. + * @since 16 + */ +void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool isAutoInactive); + +/** + * @brief Set the focus transfer behaviour when current focus view changes. + * + * @param uiContext Indicates the pointer to a UI instance. + * @param autoTransfer Indicates whether to transfer focus when focus view show. + * @since 16 + */ +void OH_ArkUI_FocusSetAutoTransfer(ArkUI_ContextHandle uiContext, bool autoTransfer); + +#ifdef __cplusplus +}; +#endif + +#endif // ARKUI_NATIVE_INTERFACE_FOCUS_H +/** @} */ \ No newline at end of file diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index e1cffe2c7..fad7d23fe 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1979,6 +1979,21 @@ typedef enum { ARKUI_ERROR_CODE_GET_INFO_FAILED = 106201, /** The buffer size is not large enough. */ ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR = 106202, + /** + * @error The node requesting focus is not focusable. + * @since 16 + */ + ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE = 150001, + /** + * @error The node requesting focus has unfocusable ancestor. + * @since 16 + */ + ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR = 150002, + /** + * @error The node requesting focus does not exists. + * @since 16 + */ + ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT = 150003, /** The component is not a scroll container. */ ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER = 180001, /** The buffer is not large enough. */ -- Gitee From 114775d422b26aa242ac417c3caa5de1dad05625 Mon Sep 17 00:00:00 2001 From: zed Date: Mon, 9 Dec 2024 17:55:43 +0800 Subject: [PATCH 385/630] =?UTF-8?q?[Canvas]=E5=B0=81=E8=A3=85ArkTS/NDK?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zed --- .../native_drawing/drawing_canvas.h | 92 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 20 ++++ 2 files changed, 112 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_canvas.h b/graphic/graphic_2d/native_drawing/drawing_canvas.h index 5a1de3d15..e152fc0c6 100644 --- a/graphic/graphic_2d/native_drawing/drawing_canvas.h +++ b/graphic/graphic_2d/native_drawing/drawing_canvas.h @@ -42,6 +42,7 @@ #include "drawing_error_code.h" #include "drawing_types.h" +#include "drawing_sampling_options.h" #ifdef __cplusplus extern "C" { @@ -220,6 +221,27 @@ void OH_Drawing_CanvasDrawLine(OH_Drawing_Canvas* canvas, float x1, float y1, fl */ void OH_Drawing_CanvasDrawPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* path); +/** + * @brief Divides the pixelmap into a grid with nine sections: four sides, four corners, and the center. + * Draws the specified section of the pixelmap onto the canvas, corners are unmodified or scaled down if they exceed + * the destination rectangle, center and four sides are scaled to fit remaining space. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param pixelMap Indicates the pointer to an OH_Drawing_PixelMap object. + * @param center Divides the pixelmap into nine sections: four sides, four corners, and the center. + * @param dst The area of destination canvas. + * @param mode Filter mode. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, pixelMap + * and dst is nullptr. + * @since 16 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_CanvasDrawPixelMapNine(OH_Drawing_Canvas* canvas, OH_Drawing_PixelMap* pixelMap, + const OH_Drawing_Rect* center, const OH_Drawing_Rect* dst, OH_Drawing_FilterMode mode); + /** * @brief Draw the specified area of the Media::PixelMap to the specified area of the canvas. * @@ -398,6 +420,25 @@ void OH_Drawing_CanvasDrawOval(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* */ void OH_Drawing_CanvasDrawArc(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, float startAngle, float sweepAngle); + +/** + * @brief Draws an arc with use center. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. + * @param startAngle Indicates the startAngle of the arc. + * @param sweepAngle Indicates the sweepAngle of the arc. + * @param useCenter If true, include the center of the oval in the arc, and close it if it is being stroked. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr. + * @since 16 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_CanvasDrawArcWithCenter(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, + float startAngle, float sweepAngle, bool useCenter); + /** * @brief Draws a roundrect. @@ -410,6 +451,23 @@ void OH_Drawing_CanvasDrawArc(OH_Drawing_Canvas* canvas, */ void OH_Drawing_CanvasDrawRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_RoundRect* roundRect); +/** + * @brief Draw two nested rounded rectangles. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param outer Rounded rectangle object, representing the outer rounded rectangle boundary. + * @param inner Rounded rectangle object, representing the internal rounded rectangle boundary. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, outer + * and inner is nullptr. + * @since 16 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_CanvasDrawNestedRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_RoundRect* outer, + const OH_Drawing_RoundRect* inner); + /** * @brief Draws a single character. * @@ -844,6 +902,40 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasGetImageInfo(OH_Drawing_Canvas* canvas, OH * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawRecordCmd(OH_Drawing_Canvas* canvas, OH_Drawing_RecordCmd* recordCmd); + +/** + * @brief Checks if the path has been cut off. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param path Indicates the pointer to an OH_Drawing_Paht object. + * @param quickReject Indicates if the path has been cut off. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or path is nullptr, + * or quickReject is nullptr. + * @since 16 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_CanvasQuickRejectPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* path, + bool* quickReject); + +/** + * @brief Checks if the rect has been cut off. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param rect Indicates the pointer to an OH_Drawing_Rect object. + * @param quickReject Indicates if the rect has been cut off. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr, + * or quickReject is nullptr. + * @since 16 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_CanvasQuickRejectRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, + bool* quickReject); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 827409165..df75e1fb9 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1725,5 +1725,25 @@ { "first_introduced": "14", "name":"OH_Drawing_GetFontCollectionGlobalInstance" + }, + { + "first_introduced": "16", + "name":"OH_Drawing_CanvasQuickRejectPath" + }, + { + "first_introduced": "16", + "name":"OH_Drawing_CanvasQuickRejectRect" + }, + { + "first_introduced": "16", + "name": "OH_Drawing_CanvasDrawNestedRoundRect" + }, + { + "first_introduced": "16", + "name": "OH_Drawing_CanvasDrawArcWithCenter" + }, + { + "first_introduced": "16", + "name": "OH_Drawing_CanvasDrawPixelMapNine" } ] \ No newline at end of file -- Gitee From bd90ba594074b616203a64e2d165d2353adcfcbc Mon Sep 17 00:00:00 2001 From: yzj688 Date: Mon, 9 Dec 2024 19:37:40 +0800 Subject: [PATCH 386/630] =?UTF-8?q?Drawing=20=E5=A2=9E=E5=8A=A0=E6=94=AF?= =?UTF-8?q?=E6=8C=81GPU=E5=9C=A8=E5=B1=8F=E7=BB=98=E5=88=B6=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20Signed-off-by:=20yzj688=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../native_drawing/drawing_surface.h | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_surface.h b/graphic/graphic_2d/native_drawing/drawing_surface.h index d8aa609ad..67f951f74 100644 --- a/graphic/graphic_2d/native_drawing/drawing_surface.h +++ b/graphic/graphic_2d/native_drawing/drawing_surface.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -37,9 +37,10 @@ * @version 1.0 */ -#ifndef C_INCLUDE_DRAWING_GPU_SURFACE_H -#define C_INCLUDE_DRAWING_GPU_SURFACE_H +#ifndef C_INCLUDE_DRAWING_SURFACE_H +#define C_INCLUDE_DRAWING_SURFACE_H +#include "drawing_error_code.h" #include "drawing_types.h" #ifdef __cplusplus @@ -60,6 +61,20 @@ extern "C" { OH_Drawing_Surface* OH_Drawing_SurfaceCreateFromGpuContext( OH_Drawing_GpuContext* gpuContext, bool flag, OH_Drawing_Image_Info imageInfo); +/** + * @brief Creates an OH_Drawing_Surface object on GPU indicated by context which is on-screen. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param gpuContext Indicates the pointer to an OH_Drawing_GpuContext object. + * @param imageInfo Indicates the image info. + * @param window Indicates the pointer of the screen window. + * @return Returns the pointer to the OH_Drawing_Surface object created. + * @since 16 + * @version 1.0 + */ +OH_Drawing_Surface* OH_Drawing_SurfaceCreateOnScreen( + OH_Drawing_GpuContext* gpuContext, OH_Drawing_Image_Info imageInfo, void* window); + /** * @brief Gets the canvas that draws into surface. * @@ -72,6 +87,19 @@ OH_Drawing_Surface* OH_Drawing_SurfaceCreateFromGpuContext( */ OH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface* surface); +/** + * @brief Resolves all pending GPU operations on the surface. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param surface Indicates the pointer to an OH_Drawing_Surface object. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if surface is nullptr. + * @since 16 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_SurfaceFlush(OH_Drawing_Surface* surface); + /** * @brief Destroys an OH_Drawing_Surface object and reclaims the memory occupied by the object. * -- Gitee From e5f6b1b513dc8a2b6c46e2d08a39800ecf314383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B3?= Date: Thu, 2 Jan 2025 19:28:49 +0800 Subject: [PATCH 387/630] =?UTF-8?q?=E8=A1=A5=E5=85=85Swiper=20CAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王关 --- arkui/ace_engine/native/libace.ndk.json | 144 ++++++++++ arkui/ace_engine/native/native_node.h | 113 +++++--- arkui/ace_engine/native/native_type.h | 349 ++++++++++++++++++++++++ 3 files changed, 571 insertions(+), 35 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index f72f7e8f1..e5c726ddb 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1127,6 +1127,150 @@ "first_introduced": "12", "name": "OH_ArkUI_SwiperIndicator_GetMaxDisplayCount" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_Create" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetStartPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetStartPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetTopPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetTopPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetEndPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetEndPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetBottomPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetBottomPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetFontColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetFontColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetFontSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetFontSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetFontWeight" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetFontWeight" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_Destroy" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_Create" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_SetShowBackground" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_GetShowBackground" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_SetBackgroundSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_GetBackgroundSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_SetBackgroundColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_GetBackgroundColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_SetArrowSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_GetArrowSize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_SetArrowColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_GetArrowColor" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperArrowStyle_Destroy" + }, { "first_introduced": "12", "name": "OH_ArkUI_DrawableDescriptor_CreateFromPixelMap" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 034f2bc3a..479eb6453 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5131,16 +5131,22 @@ typedef enum { NODE_SWIPER_INDEX, /** - * @brief Defines the number of elements to display per page. - * This attribute can be set, reset, and obtained as required through APIs. - * - * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].i32: index value of the child component. \n - * \n - * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].i32: index value of the child component. \n - * - */ + * @brief Defines the number of elements to display per page. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: number of elements to display per page. \n + * .value[1]?.i32: whether to turn pages by group. The value 0 means to turn pages by child element, + * and 1 means to turn pages by group. This parameter is supported since API version 16. \n + * .string?: this parameter can only be set to 'auto'. When 'auto' is set, the value[] parameters are ignored. + * This parameter is supported since API version 16. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: number of elements to display per page. \n + * .value[1].i32: whether to turn pages by group. This parameter is supported since API version 16. \n + * .string: 'auto' or empty string. + * + */ NODE_SWIPER_DISPLAY_COUNT, /** @@ -5159,20 +5165,24 @@ typedef enum { NODE_SWIPER_DISABLE_SWIPE, /** - * @brief Defines whether to show the arrow when the mouse pointer hovers over the navigation point indicator. - * This attribute can be set, reset, and obtained as required through APIs. - * - * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator. - * The parameter type is {@link ArkUI_SwiperArrow}.\n - * The default value is ARKUI_SWIPER_ARROW_HIDE. \n - * \n - * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator. - * The parameter type is {@link ArkUI_SwiperArrow}.\n - * The default value is ARKUI_SWIPER_ARROW_HIDE. \n - * - */ + * @brief Defines whether to show the arrow when the mouse pointer hovers over the navigation point indicator. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator. + * The parameter type is {@link ArkUI_SwiperArrow}.\n + * The default value is ARKUI_SWIPER_ARROW_HIDE. \n + * .?object: arrow style. The parameter type is {@link ArkUI_SwiperArrowStyle}. \n + * This parameter is supported since API version 16. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator. + * The parameter type is {@link ArkUI_SwiperArrow}.\n + * The default value is ARKUI_SWIPER_ARROW_HIDE. \n + * .object: arrow style. The parameter type is {@link ArkUI_SwiperArrowStyle}. \n + * This parameter is supported since API version 16. \n + * + */ NODE_SWIPER_SHOW_DISPLAY_ARROW, /** @@ -5205,6 +5215,14 @@ typedef enum { * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .value[0].i32: number of cached items in the swiper adapter. \n + * .value[1]?.i32: whether the cached items will be displayed. \n + * The value 0 indicates that cached items will not be displayed, \n + * and 1 indicates that cached nodes will be displayed. The default value is 0. \n + * This parameter is supported from API version 16. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: number of cached items in the swiper adapter. \n + * .value[1].i32: whether the cached items will be displayed. This parameter is supported from API version 16. \n */ NODE_SWIPER_CACHED_COUNT, @@ -5239,18 +5257,26 @@ typedef enum { NODE_SWIPER_NEXT_MARGIN, /** - * @brief Defines the navigation indicator type of the swiper. - * The attribute can be set, reset, and obtained as required through APIs. - * - * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].i32: navigation indicator type, the parameter type is {@link ArkUI_SwiperIndicatorType}.\n - * .object: The parameter type is {@link ArkUI_SwiperIndicator}.\n - * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].i32: navigation indicator type, the parameter type is {@link ArkUI_SwiperIndicatorType}.\n - * .object: The parameter type is {@link ArkUI_SwiperIndicator}.\n - * - */ + * @brief Defines the navigation indicator type of the swiper. + * The attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: navigation indicator type, the parameter type is {@link ArkUI_SwiperIndicatorType}.\n + * .object: The parameter type is {@link ArkUI_SwiperIndicator} when the indicator type \n + * is ARKUI_SWIPER_INDICATOR_TYPE_DOT. The parameter type is {@link ArkUI_SwiperDigitIndicator} + * when the indicator type is ARKUI_SWIPER_INDICATOR_TYPE_DIGIT. \n + * {@link ArkUI_SwiperDigitIndicator} is supported since API version 16. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: navigation indicator type, the parameter type is {@link ArkUI_SwiperIndicatorType}.\n + * .object: The parameter type is {@link ArkUI_SwiperIndicator} when the indicator type \n + * is ARKUI_SWIPER_INDICATOR_TYPE_DOT. The parameter type is {@link ArkUI_SwiperDigitIndicator} + * when the indicator type is ARKUI_SWIPER_INDICATOR_TYPE_DIGIT. \n + * {@link ArkUI_SwiperDigitIndicator} is supported since API version 16. \n + * + */ NODE_SWIPER_INDICATOR, + /** * @brief Set the nested scrolling mode for the Swiper component and parent component. * @@ -5299,6 +5325,23 @@ typedef enum { */ NODE_SWIPER_PAGE_FLIP_MODE, + /** + * @brief Defines the minimum main axis size of child element for swiper to works out the display count. + * This attribute 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: minimum main axis size of the child element, Unit: vp. \n + * .value[1]?.i32: whether to turn pages by group. The value 0 means to turn pages by child element, + * and 1 means to turn pages by group. The default value is 0. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: minimum main axis size of the child element, Unit: vp. \n + * .value[1].i32: whether to turn pages by group. \n + * + * @since 16 + */ + NODE_SWIPER_AUTO_FILL, + /** * @brief: Set the delineation component of the ListItem, supporting property settings, property resets, and * property acquisition interfaces. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 05352dd08..72bce68dd 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -136,6 +136,20 @@ typedef struct ArkUI_Context* ArkUI_ContextHandle; */ typedef struct ArkUI_SwiperIndicator ArkUI_SwiperIndicator; +/** + * @brief Defines the digital indicator style for the swiper. + * + * @since 16 + */ +typedef struct ArkUI_SwiperDigitIndicator ArkUI_SwiperDigitIndicator; + +/** + * @brief Defines the arrow style for the swiper. + * + * @since 16 + */ +typedef struct ArkUI_SwiperArrowStyle ArkUI_SwiperArrowStyle; + /** * @brief Define the data objects of styled string supported by text components. * @@ -2826,6 +2840,341 @@ int32_t OH_ArkUI_SwiperIndicator_SetMaxDisplayCount(ArkUI_SwiperIndicator* indic */ int32_t OH_ArkUI_SwiperIndicator_GetMaxDisplayCount(ArkUI_SwiperIndicator* indicator); +/** + * @brief Creates a digital indicator. + * + * @return Returns the pointer to the new indicator. + * @since 16 + */ +ArkUI_SwiperDigitIndicator *OH_ArkUI_SwiperDigitIndicator_Create(); + +/** + * @brief Sets the distance between the digital indicator and the start of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @param value Indicates the distance between the digital indicator and the start of the swiper. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetStartPosition(ArkUI_SwiperDigitIndicator* indicator, float value); + +/** + * @brief Gets the distance between the digital indicator and the start of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @return Returns the distance between the digital indicator and the start of the swiper. + * @since 16 + */ +float OH_ArkUI_SwiperDigitIndicator_GetStartPosition(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the distance between the digital indicator and the top of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @param value Indicates the distance between the digital indicator and the top of the swiper. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetTopPosition(ArkUI_SwiperDigitIndicator* indicator, float value); + +/** + * @brief Gets the distance between the digital indicator and the top of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @return Returns the distance between the digital indicator and the top of the swiper. + * @since 16 + */ +float OH_ArkUI_SwiperDigitIndicator_GetTopPosition(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the distance between the digital indicator and the end of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @param value Indicates the distance between the digital indicator and the end of the swiper. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetEndPosition(ArkUI_SwiperDigitIndicator* indicator, float value); + +/** + * @brief Gets the distance between the digital indicator and the end of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @return Returns the distance between the digital indicator and the end of the swiper. + * @since 16 + */ +float OH_ArkUI_SwiperDigitIndicator_GetEndPosition(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the distance between the digital indicator and the bottom of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @param value Returns the distance between the digital indicator and the bottom of the swiper. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetBottomPosition(ArkUI_SwiperDigitIndicator* indicator, float value); + +/** + * @brief Gets the distance between the digital indicator and the bottom of the swiper. + * + * @param indicator The pointer to the digital indicator. + * @return Returns the distance between the digital indicator and the bottom of the swiper. + * @since 16 + */ +float OH_ArkUI_SwiperDigitIndicator_GetBottomPosition(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the font color of total count in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @param color font color, in 0xARGB format. Default value: 0xFF182431. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t color); + +/** + * @brief Gets the font color of total count in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @return font color, in 0xARGB format. + * @since 16 + */ +uint32_t OH_ArkUI_SwiperDigitIndicator_GetFontColor(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the font color of selected index in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @param selectedColor font color, in 0xARGB format. Default value: 0xFF182431. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t selectedColor); + +/** + * @brief Gets the font color of selected index in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @return font color, in 0xARGB format. + * @since 16 + */ +uint32_t OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the font size of total count in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @param size font size, in fp. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetFontSize(ArkUI_SwiperDigitIndicator* indicator, float size); + +/** + * @brief Gets the font size of total count in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @return font size, in fp. + * @since 16 + */ +float OH_ArkUI_SwiperDigitIndicator_GetFontSize(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the font size of selected index in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @param size font size, in fp. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator, float size); + +/** + * @brief Gets the font size of selected index in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @return font size, in fp. + * @since 16 + */ +float OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the font weight of total count in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @param fontWeight font weight {@link ArkUI_FontWeight}. The default value is ARKUI_FONT_WEIGHT_NORMAL. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight fontWeight); + +/** + * @brief Gets the font weight of total count in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @return font weight {@link ArkUI_FontWeight}. + * @since 16 + */ +ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetFontWeight(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Sets the font weight of selected index in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @param selectedFontWeight font weight {@link ArkUI_FontWeight}. The default value is ARKUI_FONT_WEIGHT_NORMAL. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight( + ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight selectedFontWeight); + +/** + * @brief Gets the font weight of selected index in the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @return font weight {@link ArkUI_FontWeight}. + * @since 16 + */ +ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight(ArkUI_SwiperDigitIndicator* indicator); + +/** + * @brief Destroys the digital indicator. + * + * @param indicator The pointer to the digital indicator. + * @since 16 + */ +void OH_ArkUI_SwiperDigitIndicator_Destroy(ArkUI_SwiperDigitIndicator *indicator); + +/** + * @brief Creates a arrow style for swiper. + * + * @return Returns the pointer to the new arrow style. + * @since 16 + */ +ArkUI_SwiperArrowStyle *OH_ArkUI_SwiperArrowStyle_Create(); + +/** + * @brief Sets whether to show the background for the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @param showBackground whether to show the background for the arrow. + * The value 1 means to show the background, and 0 means the opposite. + * The default value is 0. + * @since 16 + */ +void OH_ArkUI_SwiperArrowStyle_SetShowBackground(ArkUI_SwiperArrowStyle *arrowStyle, int32_t showBackground); + +/** + * @brief Gets whether to show the background for the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @return whether to show the background for the arrow. + * The value 1 means to show the background, and 0 means the opposite. + * @since 16 + */ +int32_t OH_ArkUI_SwiperArrowStyle_GetShowBackground(ArkUI_SwiperArrowStyle* arrowStyle); + +/** + * @brief Sets the display position of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @param showSidebarMiddle the display position of the arrow. + * The value 1 means to display on boths sides of the swiper, + * and 0 means display on boths sides of the swiper indicator. + * The default value is 0. + * @since 16 + */ +void OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle, int32_t showSidebarMiddle); + +/** + * @brief Gets the display position of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @return the display position of the arrow. The value 1 means to display on boths sides of the swiper, + * and 0 means display on boths sides of the swiper indicator. + * @since 16 + */ +int32_t OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle); + +/** + * @brief Sets the background size of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @param backgroundSize the background size of the arrow. The unit is vp. + * The default value is 24 when the arrow displays on both sides of the swiper indicator. + * The default value is 32 when the arrow displays on both sides of the swiper. + * @since 16 + */ +void OH_ArkUI_SwiperArrowStyle_SetBackgroundSize(ArkUI_SwiperArrowStyle* arrowStyle, float backgroundSize); + +/** + * @brief Gets the background size of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @return Returns the background size of the arrow. The unit is vp. + * @since 16 + */ +float OH_ArkUI_SwiperArrowStyle_GetBackgroundSize(ArkUI_SwiperArrowStyle *arrowStyle); + +/** + * @brief Destroys the arrow style. + * + * @param arrowStyle The pointer to the arrow style. + * @since 16 + */ +void OH_ArkUI_SwiperArrowStyle_Destroy(ArkUI_SwiperArrowStyle *arrowStyle); + +/** + * @brief Sets the background color of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @param backgroundColor the background color of the arrow, in 0xARGB format. + * The default value is 0x00000000 when the arrow displays on both sides of the swiper indicator. + * The default value is 0x19182431 when the arrow displays on both sides of the swiper. + * @since 16 + */ +void OH_ArkUI_SwiperArrowStyle_SetBackgroundColor(ArkUI_SwiperArrowStyle *arrowStyle, uint32_t backgroundColor); + +/** + * @brief Gets the background color of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @return Returns the background color of the arrow, in 0xARGB format. + * @since 16 + */ +uint32_t OH_ArkUI_SwiperArrowStyle_GetBackgroundColor(ArkUI_SwiperArrowStyle* arrowStyle); + +/** + * @brief Sets the size of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @param arrowSize the size of the arrow. The unit is vp. + * The default value is 18 when the arrow displays on both sides of the swiper indicator. + * The default value is 24 when the arrow displays on both sides of the swiper. + * The arrow size is fixed to 3/4 of the background size when the background is shown. + * @since 16 + */ +void OH_ArkUI_SwiperArrowStyle_SetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle, float arrowSize); + +/** + * @brief Gets the size of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @return the size of the arrow. The unit is vp. + * @since 16 + */ +float OH_ArkUI_SwiperArrowStyle_GetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle); + +/** + * @brief Sets the color of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @param arrowColor the color of the arrow, in 0xARGB format. The default value is 0x00182431. + * @since 16 + */ +void OH_ArkUI_SwiperArrowStyle_SetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle, uint32_t arrowColor); + +/** + * @brief Gets the color of the arrow. + * + * @param arrowStyle The pointer to the arrow style. + * @return Returns the color of the arrow, in 0xARGB format. + * @since 16 + */ +uint32_t OH_ArkUI_SwiperArrowStyle_GetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle); + /** * @brief Create auxiliary line information in the RelativeContaine container. * -- Gitee From aaf0cd522ec585093efd358378aeec17b4fbd765 Mon Sep 17 00:00:00 2001 From: bluhuang Date: Thu, 9 Jan 2025 14:29:20 +0800 Subject: [PATCH 388/630] add api of tokenizer checking Signed-off-by: bluhuang --- .../relational_store/include/relational_store.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 534cc83ed..db87b3210 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -344,6 +344,18 @@ int OH_Rdb_SetDbType(OH_Rdb_ConfigV2 *config, int dbType); */ int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); +/** + * @brief Check if a tokenizer is supported or not. + * + * @param tokenizer the tokenizer type of {@Link Rdb_Tokenizer}. + * @param isSupported Pointer to the Boolean value obtained. + * @return Returns the status code of the execution. + * {@link RDB_OK} indicates the operation is successful. + * {@link RDB_E_INVALID_ARGS} indicates invalid args are passed in. + * @since 16 + */ +int OH_Rdb_IsTokenizerSupported(Rdb_Tokenizer tokenizer, bool *isSupported); + /** * @brief Get support db type list * @param typeCount The output parameter, which is used to recieve the length of the support db type array. -- Gitee From 618e4fdf647acff3530fbaf73c355181c49eb13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=88=98?= Date: Fri, 20 Dec 2024 17:30:42 +0800 Subject: [PATCH 389/630] =?UTF-8?q?hid=20ndk=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0d80c88dd086e4ba2b5591715a346dbea49b9f61 Signed-off-by: limabiao --- .../external_device_manager/hid/hid_ddk_api.h | 282 ++++++++++++++++++ .../hid/hid_ddk_types.h | 62 ++++ .../hid/libhid.ndk.json | 45 +++ 3 files changed, 389 insertions(+) diff --git a/drivers/external_device_manager/hid/hid_ddk_api.h b/drivers/external_device_manager/hid/hid_ddk_api.h index 44f16c804..14babc5c3 100644 --- a/drivers/external_device_manager/hid/hid_ddk_api.h +++ b/drivers/external_device_manager/hid/hid_ddk_api.h @@ -101,6 +101,288 @@ int32_t OH_Hid_EmitEvent(int32_t deviceId, const Hid_EmitItem items[], uint16_t * @version 1.0 */ int32_t OH_Hid_DestroyDevice(int32_t deviceId); + +/** + * @brief Initializes the HID DDK. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INIT_ERROR} create DDK instance failed. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * @since 16 + */ +int32_t OH_Hid_Init(void); + +/** + * @brief Releases the HID DDK. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * @since 16 + */ +int32_t OH_Hid_Release(void); + +/** + * @brief Open HID device by deviceId in blocking mode. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param deviceId ID of the device to be operated. + * @param interfaceIndex Interface index, which corresponds to interface which supports USB protocol HID. + * @param dev Device operation handle. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } alloc memory of dev failed. + * {@link HID_DDK_IO_ERROR} open device failed. + * {@link HID_DDK_INVALID_PARAMETER} dev is null. + * {@link HID_DDK_DEVICE_NOT_FOUND} device not found by deviceId. + * @since 16 + */ +int32_t OH_Hid_Open(uint64_t deviceId, uint8_t interfaceIndex, Hid_DeviceHandle **dev); + +/** + * @brief Close HID device by dev. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_IO_ERROR} close device failed. + * {@link HID_DDK_INVALID_PARAMETER} dev is null. + * @since 16 + */ +int32_t OH_Hid_Close(Hid_DeviceHandle **dev); + +/** + * @brief Write an Output report to a HID device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param data The data to be sent. + * @param length The length in bytes of the data to send. + * @param bytesWritten The acture bytes of the data be sent. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.length is 0; 4.length is greater than HID_MAX_REPORT_BUFFER_SIZE;\n + * 5.bytesWritten is null. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_IO_ERROR } send data failed. + * @since 16 +*/ +int32_t OH_Hid_Write(Hid_DeviceHandle *dev, uint8_t *data, uint32_t length, uint32_t *bytesWritten); + +/** + * @brief Read an input report from the device with timeout. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param data A buffer to put the read data into. + * @param bufSize A buffer size to put the read data into. + * @param timeout Timeout in milliseconds or -1 for blocking wait. + * @param bytesRead The number of bytes to read. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.bufSize is 0; 4.bufSize is greater than HID_MAX_REPORT_BUFFER_SIZE;\n + * 5.bytesRead is null. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_TIMEOUT } read timeout. + * @since 16 +*/ +int32_t OH_Hid_ReadTimeout(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSize, int timeout, uint32_t *bytesRead); + +/** + * @brief Read an input report from the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param data A buffer to put the read data into. + * @param bufSize A buffer size to put the read data into. + * @param bytesRead The number of bytes to read. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.bufSize is 0; 4.bufSize is greater than HID_MAX_REPORT_BUFFER_SIZE;\n + * 5.bytesRead is null. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_TIMEOUT } read timeout. + * @since 16 +*/ +int32_t OH_Hid_Read(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSize, uint32_t *bytesRead); + +/** + * @brief Set the device handle to be non-blocking. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param nonBlock Enable or not the nonblocking reads + * - 1 to enable nonblocking + * - 0 to disable nonblocking. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes:1.dev is null;\n + * 2.nonBlock is not 1 or 0. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * @since 16 +*/ +int32_t OH_Hid_SetNonBlocking(Hid_DeviceHandle *dev, int nonBlock); + +/** + * @brief Get a raw info from the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param rawDevInfo Vendor id, product id and bus type get from the device. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.rawDevInfo is null. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. + * @since 16 +*/ +int32_t OH_Hid_GetRawInfo(Hid_DeviceHandle *dev, Hid_RawDevInfo *rawDevInfo); + +/** + * @brief Get a raw name from the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param data A buffer to put the read data into. + * @param bufSize A buffer size to put the read data into. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.bufSize is 0; 4.bufSize is greater than HID_MAX_REPORT_BUFFER_SIZE. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. + * @since 16 +*/ +int32_t OH_Hid_GetRawName(Hid_DeviceHandle *dev, char *data, uint32_t bufSize); + +/** + * @brief Get a physical address from the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param data A buffer to put the read data into. + * @param bufSize A buffer size to put the read data into. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.bufSize is 0; 4.bufSize is greater than HID_MAX_REPORT_BUFFER_SIZE. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. + * @since 16 +*/ +int32_t OH_Hid_GetPhysicalAddress(Hid_DeviceHandle *dev, char *data, uint32_t bufSize); + +/** + * @brief Get a raw unique id from the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param data A buffer to put the read data into. + * @param bufSize A buffer size to put the read data into. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.bufSize is 0; 4.bufSize is greater than HID_MAX_REPORT_BUFFER_SIZE. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. + * @since 16 +*/ +int32_t OH_Hid_GetRawUniqueId(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSize); + +/** + * @brief Send a report to the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param reportType Report type will be sent. + * @param data The data to be sent. + * @param length The length in bytes of the data to send. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.length is 0; 4.length is greater than HID_MAX_REPORT_BUFFER_SIZE. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_IO_ERROR } send data failed. + * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. + * @since 16 +*/ +int32_t OH_Hid_SendReport(Hid_DeviceHandle *dev, Hid_ReportType reportType, const uint8_t *data, uint32_t length); + +/** + * @brief Get a report from the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param reportType Report type get from device. + * @param data A buffer to put the read data into. + * @param bufSize A buffer size to put the read data into. + * @return {@link HID_DDK_SUCCESS} the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.bufSize is 0; 4.bufSize is greater than HID_MAX_REPORT_BUFFER_SIZE. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. + * @since 16 +*/ +int32_t OH_Hid_GetReport(Hid_DeviceHandle *dev, Hid_ReportType reportType, uint8_t *data, uint32_t bufSize); + +/** + * @brief Get a report descriptor from the device. + * + * @permission ohos.permission.ACCESS_DDK_HID + * @param dev Device operation handle. + * @param buf The buffer to copy descriptor into. + * @param bufSize The size of the buffer in bytes, the recommended value is HID_MAX_REPORT_DESCRIPTOR_SIZE. + * @param bytesRead The number of bytes to read. + * @return {@link HID_DDK_SUCCESS} if the operation is successful. + * {@link HID_DDK_NO_PERM} permission check failed. + * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.data is null; 3.bufSize is 0; 4.bufSize is greater than HID_MAX_REPORT_BUFFER_SIZE;\n + * 5.bytesRead is null. + * {@link HID_DDK_INIT_ERROR} the DDK not init. + * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. + * {@link HID_DDK_IO_ERROR } read data failed. + * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. + * @since 16 +*/ +int32_t OH_Hid_GetReportDescriptor(Hid_DeviceHandle *dev, uint8_t *buf, uint32_t bufSize, uint32_t *bytesRead); /** @} */ #ifdef __cplusplus } diff --git a/drivers/external_device_manager/hid/hid_ddk_types.h b/drivers/external_device_manager/hid/hid_ddk_types.h index 01dfc5d9b..31d206d89 100644 --- a/drivers/external_device_manager/hid/hid_ddk_types.h +++ b/drivers/external_device_manager/hid/hid_ddk_types.h @@ -603,7 +603,69 @@ typedef enum { HID_DDK_INVALID_OPERATION = 27300003, /** @error Timeout */ HID_DDK_TIMEOUT = 27300004, + /** @error Init operation + * @since 16 + */ + HID_DDK_INIT_ERROR = 27300005, + /** @error Service error operation + * @since 16 + */ + HID_DDK_SERVICE_ERROR = 27300006, + /** @error Buff is outside accessible address space + * @since 16 + */ + HID_DDK_MEMORY_ERROR = 27300007, + /** @error Physical I/O error has occurred. + * @since 16 + */ + HID_DDK_IO_ERROR = 27300008, + /** @error Device not found. + * @since 16 + */ + HID_DDK_DEVICE_NOT_FOUND = 27300009 } Hid_DdkErrCode; + +/** + * @brief max report buffer size. + * + * @since 16 + */ +#define HID_MAX_REPORT_BUFFER_SIZE (16 * 1024 - 1) + +/** + * @brief Opaque usb HID device structure. + * + * @since 16 + */ +typedef struct Hid_DeviceHandle Hid_DeviceHandle; + +/** + * @brief Defines the report type. + * + * @since 16 + */ +typedef enum { + /** Input report */ + HID_INPUT_REPORT = 0, + /** Output report */ + HID_OUTPUT_REPORT = 1, + /** Feature report */ + HID_FEATURE_REPORT = 2 +} Hid_ReportType; + +/** + * @brief Defines the raw dev info. + * + * @since 16 + */ +typedef struct Hid_RawDevInfo { + /** Bus type */ + uint32_t busType; + /** Vendor ID */ + uint16_t vendor; + /** Product ID */ + uint16_t product; +} Hid_RawDevInfo; #ifdef __cplusplus } /** @} */ diff --git a/drivers/external_device_manager/hid/libhid.ndk.json b/drivers/external_device_manager/hid/libhid.ndk.json index 192bc43e1..513f4ac9c 100644 --- a/drivers/external_device_manager/hid/libhid.ndk.json +++ b/drivers/external_device_manager/hid/libhid.ndk.json @@ -7,5 +7,50 @@ }, { "name": "OH_Hid_DestroyDevice" + }, + { + "name": "OH_Hid_Init" + }, + { + "name": "OH_Hid_Release" + }, + { + "name": "OH_Hid_Open" + }, + { + "name": "OH_Hid_Close" + }, + { + "name": "OH_Hid_Write" + }, + { + "name": "OH_Hid_ReadTimeout" + }, + { + "name": "OH_Hid_Read" + }, + { + "name": "OH_Hid_SetNonBlocking" + }, + { + "name": "OH_Hid_GetRawInfo" + }, + { + "name": "OH_Hid_GetRawName" + }, + { + "name": "OH_Hid_GetPhysicalAddress" + }, + { + "name": "OH_Hid_GetRawUniqueId" + }, + { + "name": "OH_Hid_SendReport" + }, + { + "name": "OH_Hid_GetReport" + }, + { + "name": "OH_Hid_GetReportDescriptor" } ] \ No newline at end of file -- Gitee From 1e29cfae213f249d0028b9821573713d9896b76c Mon Sep 17 00:00:00 2001 From: zhufenghao Date: Thu, 2 Jan 2025 10:43:40 +0800 Subject: [PATCH 390/630] add ArkWeb_ComponentAPI onScroll Signed-off-by: zhufenghao --- web/webview/interfaces/native/arkweb_interface.h | 14 ++++++++++++++ web/webview/interfaces/native/arkweb_type.h | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/web/webview/interfaces/native/arkweb_interface.h b/web/webview/interfaces/native/arkweb_interface.h index 2b1045249..8faee797a 100644 --- a/web/webview/interfaces/native/arkweb_interface.h +++ b/web/webview/interfaces/native/arkweb_interface.h @@ -84,6 +84,20 @@ typedef enum { */ ArkWeb_AnyNativeAPI* OH_ArkWeb_GetNativeAPI(ArkWeb_NativeAPIVariantKind type); + +/* + * @brief Register a scrolling event callback. + * @param webTag The name of the web component. + * @param callback The ArkWeb scrolling callback. + * @param userData The data set by user. + * @return Returns whether the registration was successful, false indicates failure. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 16 + */ +bool OH_ArkWeb_RegisterScrollCallback( + const char* webTag, ArkWeb_OnScrollCallback callback, void* userData); + #ifdef __cplusplus }; #endif diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index b0cdabe2e..796325713 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -132,6 +132,18 @@ typedef ArkWeb_JavaScriptValuePtr (*ArkWeb_OnJavaScriptProxyCallbackWithResult)( */ typedef void (*ArkWeb_OnComponentCallback)(const char* webTag, void* userData); +/** + * @brief Defines the scroll callback of the native ArkWeb. + * + * @param webTag The name of the web component. + * @param userData The data set by user. + * @param x X-axis scrolling offset. + * @param y Y-axis scrolling offset. + * + * @since 16 + */ +typedef void (*ArkWeb_OnScrollCallback)(const char* webTag, void* userData, double x, double y); + /** * @brief Defines the ArkWeb_WebMessagePort that represent a HTML5 message port. * -- Gitee From a84b2a229bc038f10244dfe2a3f3a0ba876c0874 Mon Sep 17 00:00:00 2001 From: li-jianchao1993 Date: Sat, 11 Jan 2025 14:43:10 +0800 Subject: [PATCH 391/630] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=91=20=E5=A2=9E=E5=8A=A0=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E7=BC=96=E7=A0=81surface=E6=A8=A1=E5=BC=8Frepeat=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E7=9B=B8=E5=85=B3key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-jianchao1993 --- .../libnative_media_codecbase.ndk.json | 8 ++++++++ multimedia/av_codec/native_avcodec_base.h | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 5ddaeb1a0..b6615ba80 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -399,6 +399,14 @@ "first_introduced": "14", "name": "OH_MD_KEY_CREATION_TIME" }, + { + "first_introduced": "16", + "name": "OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER" + }, + { + "first_introduced": "16", + "name": "OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT" + }, { "first_introduced": "10", "name": "OH_AVCodec_GetCapability" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 3ac7a56ba..af0aa6da0 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -984,6 +984,24 @@ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR; * @since 14 */ extern const char *OH_MD_KEY_CREATION_TIME; +/** + * @brief Key applies only when configuring a video encoder in surface mode, value type is int32_t. + * If no new frame became available since the last frame submitted to the encoder, + * it will sumbit the previous frame repeatly in milliseconds. It is used in configure. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER; +/** + * @brief Key for describing the maximum count that the frame previously submitted to the encoder will be + * repeated, in case no new frame has been available since, value type is int32_t. This key takes effect only when + * {@link VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER} is vaild. It is used in configure. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT; /** * @brief Media type. -- Gitee From d5f7d2a566d25b642159e8e10261634091efaa69 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Sat, 11 Jan 2025 16:07:55 +0800 Subject: [PATCH 392/630] keycode add Signed-off-by: zhouchaobo Change-Id: Ic3ae523deb1b3f9075911c0eae612476499d8654 --- arkui/ace_engine/native/native_key_event.h | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h index 2aa2fe849..34ac146d1 100644 --- a/arkui/ace_engine/native/native_key_event.h +++ b/arkui/ace_engine/native/native_key_event.h @@ -317,6 +317,71 @@ typedef enum { ARKUI_KEYCODE_NUMPAD_LEFT_PAREN = 2121, /** Key ) on numeric keypad **/ ARKUI_KEYCODE_NUMPAD_RIGHT_PAREN = 2122, + /** + * Joystick key A + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_A = 2301, + /** + * Joystick key B + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_B = 2302, + /** + * Joystick key X + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_X = 2304, + /** + * Joystick key Y + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_Y = 2305, + /** + * Joystick key L1 + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_L1 = 2307, + /** + * Joystick key R1 + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_R1 = 2308, + /** + * Joystick key L2 + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_L2 = 2309, + /** + * Joystick key R2 + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_R2 = 2310, + /** + * Joystick key Select + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_SELECT = 2311, + /** + * Joystick key Start + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_START = 2312, + /** + * Joystick key Mode + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_MODE = 2313, + /** + * Joystick key THUMBL + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_THUMBL = 2314, + /** + * Joystick key THUMBR + * @since 15 + */ + ARKUI_KEYCODE_BUTTON_THUMBR = 2315, } ArkUI_KeyCode; /** -- Gitee From 4c4bcacd5f5dcb40509767b941b847d47044eacc Mon Sep 17 00:00:00 2001 From: shegangbin Date: Mon, 13 Jan 2025 08:11:24 +0800 Subject: [PATCH 393/630] fix Signed-off-by: shegangbin --- graphic/graphic_2d/native_vsync/native_vsync.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index 7c2f123d6..d9ef7562e 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -61,10 +61,12 @@ typedef void (*OH_NativeVSync_FrameCallback)(long long timestamp, void *data); OH_NativeVSync* OH_NativeVSync_Create(const char* name, unsigned int length); /** - * @brief Delete the NativeVsync instance. + * @brief Destroys an OH_NativeVSync instance. + * Once the OH_NativeVSync pointer is destroyed, it must not be used to prevent dangling pointer problems. + * Pay special attention to the management of the OH_NativeVSync pointer in concurrent multithreaded scenarios. * * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync - * @param nativeVsync Indicates the pointer to a NativeVsync instance. + * @param nativeVsync Pointer to an OH_NativeVSync instance. * @since 9 * @version 1.0 */ @@ -117,7 +119,12 @@ int OH_NativeVSync_RequestFrameWithMultiCallback( OH_NativeVSync* nativeVsync, OH_NativeVSync_FrameCallback callback, void* data); /** - * @brief Get vsync period. + * @brief Obtains the VSync period. + * The VSync period is refreshed only when the OH_NativeVSync_FrameCallback callback is received + * following a request for a VSync signal via OH_NativeVSync_RequestFrame. + * To obtain the VSync period for the first time using this function, + * you need to call OH_NativeVSync_RequestFrame to request a VSync signal. + * Once the OH_NativeVSync_FrameCallback callback is received, the vsync period can be obtained. * * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync * @param nativeVsync Indicates the pointer to a NativeVsync. -- Gitee From f24514b3e935ba268823a77a7f66960767a3f36c Mon Sep 17 00:00:00 2001 From: yangxuguang-huawei Date: Sat, 11 Jan 2025 10:53:16 +0800 Subject: [PATCH 394/630] refactor: delete unused error codes Signed-off-by: yangxuguang-huawei --- AbilityKit/ability_runtime/ability_runtime_common.h | 10 ---------- AbilityKit/ability_runtime/application_context.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/AbilityKit/ability_runtime/ability_runtime_common.h b/AbilityKit/ability_runtime/ability_runtime_common.h index 228ae33b0..8870470f7 100644 --- a/AbilityKit/ability_runtime/ability_runtime_common.h +++ b/AbilityKit/ability_runtime/ability_runtime_common.h @@ -71,16 +71,6 @@ typedef enum { * @since 15 */ ABILITY_RUNTIME_ERROR_CODE_INCORRECT_ABILITY_TYPE = 16000002, - /** - * @error Starting invisible ability is not allowed. - * @since 15 - */ - ABILITY_RUNTIME_ERROR_CODE_INVISIBLE = 16000004, - /** - * @error Cross-user start app is not allowed. - * @since 15 - */ - ABILITY_RUNTIME_ERROR_CODE_CROSS_USER = 16000006, /** * @error The crowdtesting application expires. * @since 15 diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index b6813877a..0536747d4 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -224,8 +224,6 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCloudFileDir( * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_SUPPORTED} if the device does not support starting self uiability.\n * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_SUCH_ABILITY} if the target ability does not exist.\n * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INCORRECT_ABILITY_TYPE} if the ability type is incorrect.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INVISIBLE} if the target ability is invisible.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROSS_USER} if the caller tries to start cross-user ability.\n * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROWDTEST_EXPIRED} if the crowdtesting application expires.\n * Returns {@link ABILITY_RUNTIME_ERROR_CODE_WUKONG_MODE} if the ability cannot be started in Wukong mode.\n * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CONTROLLED} if the app is controlled.\n -- Gitee From 11542b95e470c1ed2336a65f88fce118d3ff04df Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Tue, 7 Jan 2025 18:31:20 +0800 Subject: [PATCH 395/630] =?UTF-8?q?capi=E6=8F=90=E4=BE=9B=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E4=BA=8B=E4=BB=B6=E8=A7=A6=E5=8F=91=E7=9A=84id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan Change-Id: Iec94cad8c7f7097254f11819f6c4675e8cc6cbb2 --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/ui_input_event.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 44a9f81ca..28c8665da 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2527,6 +2527,10 @@ "first_introduced": "16", "name": "OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_GetChangedPointerId" + }, { "first_introduced": "16", "name": "OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled" diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 1a32d70c3..217f3f705 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -286,6 +286,18 @@ uint32_t OH_ArkUI_PointerEvent_GetPointerCount(const ArkUI_UIInputEvent* event); */ int32_t OH_ArkUI_PointerEvent_GetPointerId(const ArkUI_UIInputEvent* event, uint32_t pointerIndex); +/** + * @brief Obtains the ID of the touch pointer that triggers the current touch event. + * + * @param event Indicates the pointer to the current UI input event. + * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_GetChangedPointerId(const ArkUI_UIInputEvent* event, uint32_t* pointerIndex); + /** * @brief Obtains the X coordinate relative to the upper left corner of the current component from a directional * input event (such as a touch event, mouse event, or axis event). -- Gitee From 0c452bbc8ac4a7dad1b2ef658f9fc448db6ef6b5 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Mon, 13 Jan 2025 13:27:23 +0800 Subject: [PATCH 396/630] Axis action get capi add Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/ui_input_event.h | 27 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 93b14a1c3..481519c8f 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -167,6 +167,10 @@ "first_introduced": "12", "name": "OH_ArkUI_AxisEvent_GetPinchAxisScaleValue" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AxisEvent_GetAxisAction" + }, { "first_introduced": "12", "name": "OH_ArkUI_GetNodeHandleFromNapiValue" diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 503f6f8ca..1b5851db7 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -224,6 +224,24 @@ enum { UI_FOCUS_AXIS_EVENT_ABS_HAT0Y = 7, }; +/** + * @brief Enumerates the action types for axis events. + * + * @since 16 + */ +enum { + /** The axis event is abnormal. */ + UI_AXIS_EVENT_ACTION_NONE = 0, + /** The axis event begins. */ + UI_AXIS_EVENT_ACTION_BEGIN = 1, + /** The axis event is updated. */ + UI_AXIS_EVENT_ACTION_UPDATE = 2, + /** The axis event ends. */ + UI_AXIS_EVENT_ACTION_END = 3, + /** The axis event is canceled. */ + UI_AXIS_EVENT_ACTION_CANCEL = 4, +}; + /** * @brief Obtains the type of this UI input event. * @@ -702,6 +720,15 @@ double OH_ArkUI_AxisEvent_GetHorizontalAxisValue(const ArkUI_UIInputEvent* event */ double OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(const ArkUI_UIInputEvent* event); +/** + * @brief Obtains the action type of the current axis event. + * + * @param event Indicates the pointer to the current UI input event. + * @return Returns the action type of the current axis event. + * @since 16 + */ +int32_t OH_ArkUI_AxisEvent_GetAxisAction(const ArkUI_UIInputEvent* event); + /** * @brief Sets how the component behaves during hit testing. * -- Gitee From ae8b1d1991578a94fb6765b9e3422096e3fc7f8d Mon Sep 17 00:00:00 2001 From: lihui Date: Wed, 23 Oct 2024 16:08:29 +0800 Subject: [PATCH 397/630] Additional Interface Declaration Signed-off-by: lihui --- graphic/graphic_2d/native_window/external_window.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 54ae4efe5..339444ce3 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -142,24 +142,28 @@ typedef enum NativeWindowOperation { * set native window buffer stride, * variable parameter in function is * [in] int32_t stride. + * @deprecated since 14 */ SET_STRIDE, /** * get native window buffer stride, * variable parameter in function is * [out] int32_t *stride. + * @deprecated since 14 */ GET_STRIDE, /** * set native window buffer swap interval, * variable parameter in function is * [in] int32_t interval. + * @deprecated since 14 */ SET_SWAP_INTERVAL, /** * get native window buffer swap interval, * variable parameter in function is * [out] int32_t *interval. + * @deprecated since 14 */ GET_SWAP_INTERVAL, /** -- Gitee From c01f6e8d342f1b98820d56385fea94cb5a057432 Mon Sep 17 00:00:00 2001 From: lihui Date: Mon, 13 Jan 2025 17:13:30 +0800 Subject: [PATCH 398/630] deprecated GET_STRIDE/SET_STRIDE Signed-off-by: lihui --- graphic/graphic_2d/native_window/external_window.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 339444ce3..70bcaffeb 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -142,28 +142,28 @@ typedef enum NativeWindowOperation { * set native window buffer stride, * variable parameter in function is * [in] int32_t stride. - * @deprecated since 14 + * @deprecated since 16 */ SET_STRIDE, /** * get native window buffer stride, * variable parameter in function is * [out] int32_t *stride. - * @deprecated since 14 + * @deprecated since 16 + * @useinstead Use {@link OH_NativeWindow_GetBufferHandleFromNative} to get a {@link BufferHandleand} from a buffer + * and then retrieve the stride from the {@link BufferHandle}. */ GET_STRIDE, /** * set native window buffer swap interval, * variable parameter in function is * [in] int32_t interval. - * @deprecated since 14 */ SET_SWAP_INTERVAL, /** * get native window buffer swap interval, * variable parameter in function is * [out] int32_t *interval. - * @deprecated since 14 */ GET_SWAP_INTERVAL, /** -- Gitee From f4776ffbba49cc6d809f4dae99c613f598727b2f Mon Sep 17 00:00:00 2001 From: liuyifei Date: Tue, 14 Jan 2025 01:23:41 +0000 Subject: [PATCH 399/630] =?UTF-8?q?NDK=E4=B8=AD=E5=BA=94=E8=AF=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8c=E5=BA=93=E6=8E=A5=E5=8F=A3=EF=BC=8C=E8=80=8C?= =?UTF-8?q?=E4=B8=8D=E6=98=AFc++=E5=BA=93=E6=8E=A5=E5=8F=A3-hilog/log.h?= =?UTF-8?q?=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyifei --- hiviewdfx/hilog/include/hilog/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiviewdfx/hilog/include/hilog/log.h b/hiviewdfx/hilog/include/hilog/log.h index 6d4914dc9..2a8c7000e 100644 --- a/hiviewdfx/hilog/include/hilog/log.h +++ b/hiviewdfx/hilog/include/hilog/log.h @@ -63,7 +63,7 @@ #ifndef HIVIEWDFX_HILOG_H #define HIVIEWDFX_HILOG_H -#include +#include #include #include -- Gitee From 9ab832353a8052210e4ad13342391fb67083685d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=B8=B0?= Date: Tue, 14 Jan 2025 02:16:27 +0000 Subject: [PATCH 400/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘丰 --- drivers/external_device_manager/usb/usb_ddk_api.h | 2 +- drivers/external_device_manager/usb/usb_ddk_types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index cd6213272..db91ea97a 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -76,7 +76,7 @@ void OH_Usb_Release(void); * @permission ohos.permission.ACCESS_DDK_USB * @return {@link USB_DDK_SUCCESS} the operation is successful. * {@link USB_DDK_NO_PERM} permission check failed. - * @since 14 + * @since 15 * @version 1.0 */ int32_t OH_Usb_ReleaseResource(void); diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 7378ca454..dddd36680 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -299,7 +299,7 @@ typedef enum { /** @error The operation is successful. */ USB_DDK_SUCCESS = 0, /** @error The operation failed. - * @deprecate since 14 + * @deprecate since 15 */ USB_DDK_FAILED = -1, /** @error Permission denied. */ -- Gitee From 40be079e1f27f406a082e0df24dcdc97614121a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=B8=B0?= Date: Tue, 14 Jan 2025 06:34:15 +0000 Subject: [PATCH 401/630] update drivers/external_device_manager/usb/usb_ddk_types.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘丰 --- drivers/external_device_manager/usb/usb_ddk_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index dddd36680..4491f7928 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -311,11 +311,11 @@ typedef enum { */ USB_DDK_MEMORY_ERROR = 27400001, /** @error Null pointer exception - * @deprecate since 14 + * @deprecate since 15 */ USB_DDK_NULL_PTR = -5, /** @error Device busy. - * @deprecate since 14 + * @deprecate since 15 */ USB_DDK_DEVICE_BUSY = -6, /** @error Invalid operation. */ -- Gitee From 1e02c0e27082605c21082322b110f6f1265e9099 Mon Sep 17 00:00:00 2001 From: lihui Date: Mon, 13 Jan 2025 20:14:02 +0800 Subject: [PATCH 402/630] native buffer spelling correction Signed-off-by: lihui --- .../graphic_2d/native_buffer/native_buffer.h | 34 +++++++++---------- .../graphic_2d/native_image/native_image.h | 14 ++++---- .../native_window/external_window.h | 16 ++++----- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h index c7cab38f9..7723c55fe 100644 --- a/graphic/graphic_2d/native_buffer/native_buffer.h +++ b/graphic/graphic_2d/native_buffer/native_buffer.h @@ -114,42 +114,42 @@ typedef enum OH_NativeBuffer_Format { */ NATIVEBUFFER_PIXEL_FMT_YUV_422_I, /** - * YCBCR422 semi-plannar format + * YCBCR422 semi-planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCBCR_422_SP, /** - * YCRCB422 semi-plannar format + * YCRCB422 semi-planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCRCB_422_SP, /** - * YCBCR420 semi-plannar format + * YCBCR420 semi-planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCBCR_420_SP, /** - * YCRCB420 semi-plannar format + * YCRCB420 semi-planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCRCB_420_SP, /** - * YCBCR422 plannar format + * YCBCR422 planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCBCR_422_P, /** - * YCRCB422 plannar format + * YCRCB422 planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCRCB_422_P, /** - * YCBCR420 plannar format + * YCBCR420 planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCBCR_420_P, /** - * YCRCB420 plannar format + * YCRCB420 planar format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_YCRCB_420_P, @@ -204,7 +204,7 @@ typedef enum OH_NativeBuffer_Format { */ NATIVEBUFFER_PIXEL_FMT_RGBA16_FLOAT, /** - * vender mask format + * vendor mask format * @since 12 */ NATIVEBUFFER_PIXEL_FMT_VENDER_MASK = 0X7FFF0000, @@ -256,7 +256,7 @@ typedef enum OH_NativeBuffer_ColorGamut { /** * @brief OH_NativeBuffer config. \n - * Used to allocating new OH_NativeBuffer andquery parameters if existing ones. + * Used to allocating new OH_NativeBuffer and query parameters if existing ones. * * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer * @since 9 @@ -298,7 +298,7 @@ typedef struct { /** * @brief Alloc a OH_NativeBuffer that matches the passed BufferRequestConfig. \n * A new OH_NativeBuffer instance is created each time this function is called.\n - * This interface needs to be used in conjunction with OH_NativeBuffer_Unreference<\b>, + * This interface needs to be used in conjunction with OH_NativeBuffer_Unreference, * otherwise memory leaks will occur.\n * This interface is a non-thread-safe type interface.\n * @@ -313,7 +313,7 @@ OH_NativeBuffer* OH_NativeBuffer_Alloc(const OH_NativeBuffer_Config* config); /** * @brief Adds the reference count of a OH_NativeBuffer.\n - * This interface needs to be used in conjunction with OH_NativeBuffer_Unreference<\b>, + * This interface needs to be used in conjunction with OH_NativeBuffer_Unreference, * otherwise memory leaks will occur.\n * This interface is a non-thread-safe type interface.\n * @@ -353,7 +353,7 @@ void OH_NativeBuffer_GetConfig(OH_NativeBuffer *buffer, OH_NativeBuffer_Config* /** * @brief Provide direct cpu access to the OH_NativeBuffer in the process's address space.\n - * This interface needs to be used in conjunction with OH_NativeBuffer_Unmap<\b>.\n + * This interface needs to be used in conjunction with OH_NativeBuffer_Unmap.\n * This interface is a non-thread-safe type interface.\n * * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer @@ -379,7 +379,7 @@ int32_t OH_NativeBuffer_Map(OH_NativeBuffer *buffer, void **virAddr); int32_t OH_NativeBuffer_Unmap(OH_NativeBuffer *buffer); /** - * @brief Get the systen wide unique sequence number of the OH_NativeBuffer.\n + * @brief Get the system wide unique sequence number of the OH_NativeBuffer.\n * This interface is a non-thread-safe type interface.\n * * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer @@ -391,14 +391,14 @@ int32_t OH_NativeBuffer_Unmap(OH_NativeBuffer *buffer); uint32_t OH_NativeBuffer_GetSeqNum(OH_NativeBuffer *buffer); /** - * @brief Provide direct cpu access to the potentially multi-plannar OH_NativeBuffer in the process's address space.\n + * @brief Provide direct cpu access to the potentially multi-planar OH_NativeBuffer in the process's address space.\n * This interface is a non-thread-safe type interface.\n * * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer * @param buffer Indicates the pointer to a OH_NativeBuffer instance. * @param virAddr Indicates the address of the OH_NativeBuffer in virtual memory. * @param outPlanes Indicates all image planes that contain the pixel data. - * @return Returns an error code, 0 is sucess, otherwise, failed. + * @return Returns an error code, 0 is success, otherwise, failed. * @since 12 * @version 1.0 */ @@ -411,7 +411,7 @@ int32_t OH_NativeBuffer_MapPlanes(OH_NativeBuffer *buffer, void **virAddr, OH_Na * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer * @param nativeWindowBuffer Indicates the pointer to a OHNativeWindowBuffer instance. * @param buffer Indicates the pointer to a OH_NativeBuffer pointer. - * @return Returns an error code, 0 is sucess, otherwise, failed. + * @return Returns an error code, 0 is success, otherwise, failed. * @since 12 * @version 1.0 */ diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index 9ad3ebbd7..360747f6a 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -79,7 +79,7 @@ typedef struct OH_OnFrameAvailableListener { /** * @brief Create a OH_NativeImage related to an Opengl ES texture and target. \n - * This interface needs to be used in conjunction with OH_NativeImage_Destroy<\b>, + * This interface needs to be used in conjunction with OH_NativeImage_Destroy, * otherwise memory leaks will occur.\n * This interface is a non-thread-safe type interface.\n * @@ -135,7 +135,7 @@ int32_t OH_NativeImage_DetachContext(OH_NativeImage* image); /** * @brief Update the related Opengl ES texture with the OH_NativeImage acquired buffer.\n * This interface needs to be called in the Opengl ES context thread.\n - * This interface needs to be called after receiving the OH_OnFrameAvailableListener<\b> callback.\n + * This interface needs to be called after receiving the OH_OnFrameAvailableListener callback.\n * This interface is a non-thread-safe type interface.\n * * @syscap SystemCapability.Graphic.Graphic2D.NativeImage @@ -226,7 +226,7 @@ void OH_NativeImage_Destroy(OH_NativeImage** image); /** * @brief Obtains the transform matrix of the texture image by producer transform type.\n - * The matrix will not be update until OH_NativeImage_UpdateSurfaceImage<\b> is called.\n + * The matrix will not be update until OH_NativeImage_UpdateSurfaceImage is called.\n * This interface is a non-thread-safe type interface.\n * * @syscap SystemCapability.Graphic.Graphic2D.NativeImage @@ -265,7 +265,7 @@ int32_t OH_NativeImage_GetBufferMatrix(OH_NativeImage* image, float matrix[16]); * by OH_NativeWindow_NativeObjectReference.\n * When the OHNativeWindowBuffer is used up, its reference count needs to be decremented * by OH_NativeWindow_NativeObjectUnreference.\n - * This interface needs to be used in conjunction with OH_NativeImage_ReleaseNativeWindowBuffer<\b>, + * This interface needs to be used in conjunction with OH_NativeImage_ReleaseNativeWindowBuffer, * otherwise memory leaks will occur.\n * When the fenceFd is used up, you need to close it.\n * This interface is a non-thread-safe type interface.\n @@ -308,9 +308,9 @@ int32_t OH_NativeImage_ReleaseNativeWindowBuffer(OH_NativeImage* image, * This interface is only used for memory rotation on the surface consumer, * the OH_NativeImage will not actively perform memory rendering processing.\n * This method can not be used at the same time with OH_NativeImage_UpdateSurfaceImage.\n - * This interface is used in conjunction with OH_NativeImage_AcquireNativeWindowBuffer<\b> and - * OH_NativeImage_ReleaseNativeWindowBuffer<\b>.\n - * This interface needs to be used in conjunction with OH_NativeImage_Destroy<\b>, + * This interface is used in conjunction with OH_NativeImage_AcquireNativeWindowBuffer and + * OH_NativeImage_ReleaseNativeWindowBuffer.\n + * This interface needs to be used in conjunction with OH_NativeImage_Destroy, * otherwise memory leaks will occur.\n * This interface is a non-thread-safe type interface.\n * diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 54ae4efe5..60f44dc56 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -442,7 +442,7 @@ OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer( /** * @brief Creates a OHNativeWindowBuffer instance.\n * A new OHNativeWindowBuffer instance is created each time this function is called.\n - * This interface needs to be used in conjunction with OH_NativeWindow_DestroyNativeWindowBuffer<\b>, + * This interface needs to be used in conjunction with OH_NativeWindow_DestroyNativeWindowBuffer, * otherwise memory leaks will occur.\n * This interface is a non-thread-safe type interface.\n * @@ -470,7 +470,7 @@ void OH_NativeWindow_DestroyNativeWindowBuffer(OHNativeWindowBuffer* buffer); * @brief Requests a OHNativeWindowBuffer through a OHNativeWindow instance for content production.\n * Before calling this interface, you need to set the width and height of * OHNativeWindow through SET_BUFFER_GEOMETRY.\n - * This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowFlushBuffer<\b>, + * This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowFlushBuffer, * otherwise buffer will be exhausted.\n * When the fenceFd is used up, you need to close it.\n * This interface is a non-thread-safe type interface.\n @@ -563,7 +563,7 @@ BufferHandle *OH_NativeWindow_GetBufferHandleFromNative(OHNativeWindowBuffer *bu /** * @brief Adds the reference count of a native object.\n - * This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference<\b>, + * This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference, * otherwise memory leaks will occur.\n * This interface is a non-thread-safe type interface.\n * @@ -663,7 +663,7 @@ int32_t OH_NativeWindow_NativeWindowSetTunnelHandle(OHNativeWindow *window, cons /** * @brief Attach a buffer to an OHNativeWindow instance.\n - * This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowDetachBuffer<\b>, + * This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowDetachBuffer, * otherwise buffer management will be chaotic.\n * This interface is a non-thread-safe type interface.\n * @@ -704,11 +704,11 @@ int32_t OH_NativeWindow_GetSurfaceId(OHNativeWindow *window, uint64_t *surfaceId /** * @brief Creates an OHNativeWindow instance.\n - * This interface needs to be used in conjunction with OH_NativeWindow_DestroyNativeWindow<\b>, + * This interface needs to be used in conjunction with OH_NativeWindow_DestroyNativeWindow, * otherwise memory leaks will occur.\n * If there is a concurrent destroy OHNativeWindow, you need to add once and decrement once to the - * OHNativeWindow reference count through OH_NativeWindow_NativeObjectReference<\b> and - * OH_NativeWindow_NativeObjectUnreference<\b>.\n + * OHNativeWindow reference count through OH_NativeWindow_NativeObjectReference and + * OH_NativeWindow_NativeObjectUnreference.\n * If the surface obtained through surfaceId is created in this process, the surface cannot be obtained * across processes.\n * This interface is a non-thread-safe type interface.\n @@ -777,7 +777,7 @@ int32_t OH_NativeWindow_ReadFromParcel(OHIPCParcel *parcel, OHNativeWindow **win /** * @brief Get the last flushed OHNativeWindowBuffer from an OHNativeWindow instance.\n * When the fenceFd is used up, you need to close it.\n - * This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference<\b>, + * This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference, * otherwise memory leaks will occur.\n * This interface is a non-thread-safe type interface.\n * -- Gitee From ccb820378dcbc11d0324ecfc559e1e7330ae0f7f Mon Sep 17 00:00:00 2001 From: lihui Date: Tue, 14 Jan 2025 15:43:34 +0800 Subject: [PATCH 403/630] fix cleancode Signed-off-by: lihui --- graphic/graphic_2d/native_image/native_image.h | 2 +- graphic/graphic_2d/native_window/external_window.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index 360747f6a..83d30d81f 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -286,7 +286,7 @@ int32_t OH_NativeImage_AcquireNativeWindowBuffer(OH_NativeImage* image, /** * @brief Release the OHNativeWindowBuffer to the buffer queue through an * OH_NativeImage instance for reuse.\n - * The fenceFd will be close by system.\n + * The fenceFd will be closed by system.\n * This interface is a non-thread-safe type interface.\n * * @syscap SystemCapability.Graphic.Graphic2D.NativeImage diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 60f44dc56..d16c521e8 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -185,7 +185,7 @@ typedef enum NativeWindowOperation { /** * get native window buffer colorGamut, * variable parameter in function is - * [out int32_t *colorGamut], the enumeration value refers to {@link OH_NativeBuffer_ColorGamut}. + * [out] int32_t *colorGamut, the enumeration value refers to {@link OH_NativeBuffer_ColorGamut}. */ GET_COLOR_GAMUT, /** -- Gitee From 72aeaa30ffab6c5b8df5d1f8be27ef1c21884c18 Mon Sep 17 00:00:00 2001 From: m00472246 Date: Tue, 14 Jan 2025 09:49:50 +0800 Subject: [PATCH 404/630] =?UTF-8?q?sdk=E6=9B=BF=E4=BB=A3=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20Signed-off-by:=20m00472246=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: m00472246 --- graphic/graphic_2d/native_window/external_window.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 54ae4efe5..d393d42fa 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -275,6 +275,7 @@ typedef enum NativeWindowOperation { * @brief Indicates Scaling Mode. * @since 9 * @deprecated(since = "10") + * @useinstead OHScalingModeV2 */ typedef enum { /** @@ -611,6 +612,7 @@ int32_t OH_NativeWindow_GetNativeObjectMagic(void *obj); * @since 9 * @version 1.0 * @deprecated(since = "10") + * @useinstead OH_NativeWindow_NativeWindowSetScalingModeV2 */ int32_t OH_NativeWindow_NativeWindowSetScalingMode(OHNativeWindow *window, uint32_t sequence, OHScalingMode scalingMode); -- Gitee From 1822b09ec0d9aa7d9fa4301e39ff9665e3a6d07e Mon Sep 17 00:00:00 2001 From: lihui Date: Tue, 14 Jan 2025 11:22:43 +0800 Subject: [PATCH 405/630] add BufferHandle brief Signed-off-by: lihui --- graphic/graphic_2d/native_window/buffer_handle.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/graphic/graphic_2d/native_window/buffer_handle.h b/graphic/graphic_2d/native_window/buffer_handle.h index 441af5e75..8bc87a1ff 100644 --- a/graphic/graphic_2d/native_window/buffer_handle.h +++ b/graphic/graphic_2d/native_window/buffer_handle.h @@ -45,6 +45,11 @@ extern "C" { #endif +/** + * @brief Buffer handle used to transfer and obtain information about the buffer. The handle includes the buffer's + * file descriptor, size, format, usage, virtual address, shared memory key, physical address and reserved data. + * @since 8 + */ typedef struct { int32_t fd; /**< buffer fd, -1 if not supported */ int32_t width; /**< the width of memory */ -- Gitee From 4c377c3aa717363bbb6b045d5b9d65081054bc2d Mon Sep 17 00:00:00 2001 From: huqingyun Date: Tue, 14 Jan 2025 16:42:37 +0800 Subject: [PATCH 406/630] =?UTF-8?q?CAPI=EF=BC=9A=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=88=AA=E5=9B=BE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huqingyun Change-Id: Ief3444c98cb4fa672fe27bca21d314a5e4b9fe06 --- arkui/ace_engine/native/libace.ndk.json | 16 +++++++++ arkui/ace_engine/native/native_node.h | 18 ++++++++++ arkui/ace_engine/native/native_type.h | 47 +++++++++++++++++++++++++ 3 files changed, 81 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 4966489a0..5c2a89ca3 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2602,5 +2602,21 @@ { "first_introduced": "16", "name": "OH_ArkUI_FocusSetAutoTransfer" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_CreateSnapshotOptions" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_DestroySnapshotOptions" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SnapshotOptions_SetScale" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetNodeSnapshot" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 878396f6b..80d68976c 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8697,6 +8697,24 @@ int32_t OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node); */ int32_t OH_ArkUI_UnregisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node); +/** + * @brief Get the snapshot pixelmap for the given node synchronously, will get error if the node is not on the + * tree or is not rendered yet. + * Note: the pixelmap should be released through OH_PixelmapNative_Release when it's not used any more. + * + * @param node Indicates the target node. + * @param snapshotOptions the given configuration for taking snapshot, can be null for using default. + * @param pixelmap Pixelmap pointer created by system, it's the out result. + * @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. + * Returns {@link ARKUI_ERROR_CODE_INTERNAL_ERROR} if the snapshot taking failed will null pixelmap returned. + * Returns {@link ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_TIMEOUT} if the snapshot taking is timeout. + * @since 16 + */ +int32_t OH_ArkUI_GetNodeSnapshot(ArkUI_NodeHandle node, ArkUI_SnapshotOptions* snapshotOptions, + OH_PixelmapNative** pixelmap); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 3ce7f529b..074bfc2e3 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1964,6 +1964,12 @@ typedef enum { * @since 16 */ ARKUI_ERROR_CODE_CAPI_INIT_ERROR = 500, + /** + * @error Internal error occurs, such as failure occurs because of the internal environment error, + * or operation failed because of the internal execution failed. + * @since 16 + */ + ARKUI_ERROR_CODE_INTERNAL_ERROR = 100001, /** @error The component does not support specific properties or events. */ ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102, /** @error The corresponding operation does not support nodes created by ArkTS. */ @@ -2006,6 +2012,11 @@ typedef enum { * @since 16 */ ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT = 150003, + /** + * @error The snapshot taking is timeout. + * @since 16 + */ + ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_TIMEOUT = 160002, /** The component is not a scroll container. */ ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER = 180001, /** The buffer is not large enough. */ @@ -2337,6 +2348,13 @@ typedef enum { */ typedef struct ArkUI_SystemFontStyleEvent ArkUI_SystemFontStyleEvent; +/** + * @brief Defines the options for taking snapshot. + * + * @since 16 + */ +typedef struct ArkUI_SnapshotOptions ArkUI_SnapshotOptions; + /** * @brief Creates a size constraint. * @@ -4231,6 +4249,35 @@ float OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth(ArkUI_ProgressLinearStyl * @since 16 */ float OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius(ArkUI_ProgressLinearStyleOption* option); + +/** + * @brief Creates an option for taking snapshot, the returned value must be released through + * {@link OH_ArkUI_SnapshotOptions_Dispose} when it's not used anymore. + * + * @return Returns the pointer to the created snapshot options object.If the object returns a null pointer, + * it indicates a creation failure, and the reason for the failure may be that the address space is full. + * @since 16 + */ +ArkUI_SnapshotOptions* OH_ArkUI_CreateSnapshotOptions(); + +/** + * @brief Dispose a snapshot option object. + * + * @param snapshotOptions Indicates the pointer to the snapshot option. + * @since 16 + */ +void OH_ArkUI_DestroySnapshotOptions(ArkUI_SnapshotOptions* snapshotOptions); + +/** + * @brief Config the snapshot option with scale. + * + * @param snapshotOptions Indicates the pointer to the snapshot option. + * @param scale Indicates the scale property to take the snapshot. + * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 16 + */ +int32_t OH_ArkUI_SnapshotOptions_SetScale(ArkUI_SnapshotOptions* snapshotOptions, float scale); #ifdef __cplusplus }; #endif -- Gitee From b2bab0e4c72ae1fab3148637f8165792225ef603 Mon Sep 17 00:00:00 2001 From: yangxuguang-huawei Date: Tue, 14 Jan 2025 19:08:57 +0800 Subject: [PATCH 407/630] fix: errcode Signed-off-by: yangxuguang-huawei --- .../ability_runtime/application_context.h | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 0536747d4..c5ac3079d 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -218,19 +218,19 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCloudFileDir( * @permission {@code ohos.permission.NDK_START_SELF_UI_ABILITY} * @param want The arguments passed to start self UIAbility. * For details, see {@link AbilityBase_Want}. - * @return Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the call is successful.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_PERMISSION_DENIED} if the caller has no correct permission.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INVALID_PARAM} if the arguments provided is invalid.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_SUPPORTED} if the device does not support starting self uiability.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_SUCH_ABILITY} if the target ability does not exist.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INCORRECT_ABILITY_TYPE} if the ability type is incorrect.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROWDTEST_EXPIRED} if the crowdtesting application expires.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_WUKONG_MODE} if the ability cannot be started in Wukong mode.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CONTROLLED} if the app is controlled.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_EDM_CONTROLLED} if the app is controlled by EDM.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROSS_APP} if the caller tries to start a different application.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INTERNAL} if internal error occurs.\n - * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_TOP_ABILITY} if the caller is not top ability.\n + * @return Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the call is successful. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_PERMISSION_DENIED} if the caller has no correct permission. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the arguments provided is invalid. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_SUPPORTED} if the device does not support starting self uiability. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_SUCH_ABILITY} if the target ability does not exist. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INCORRECT_ABILITY_TYPE} if the ability type is incorrect. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROWDTEST_EXPIRED} if the crowdtesting application expires. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_WUKONG_MODE} if the ability cannot be started in Wukong mode. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CONTROLLED} if the app is controlled. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_EDM_CONTROLLED} if the app is controlled by EDM. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROSS_APP} if the caller tries to start a different application. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INTERNAL} if internal error occurs. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_TOP_ABILITY} if the caller is not top ability. * For details, see {@link AbilityRuntime_ErrorCode}. * @since 15 */ -- Gitee From 15ca5930ec77aaa8de49119ce04ca43212f4f4fa Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Tue, 14 Jan 2025 15:33:44 +0800 Subject: [PATCH 408/630] Feature:LimitFingerCount Signed-off-by: zhouchaobo Change-Id: Ie0fa437279f4fe2761880d03bf53cb294368497c --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/native_gesture.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 588b1f279..b102dd2fd 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -255,6 +255,10 @@ "first_introduced": "12", "name": "OH_ArkUI_SetGestureRecognizerEnabled" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SetGestureRecognizerLimitFingerCount" + }, { "first_introduced": "12", "name": "OH_ArkUI_GetGestureRecognizerEnabled" diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index 4551c782c..1c03c3746 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -493,6 +493,18 @@ int32_t OH_ArkUI_GetResponseRecognizersFromInterruptInfo(const ArkUI_GestureInte */ int32_t OH_ArkUI_SetGestureRecognizerEnabled(ArkUI_GestureRecognizer* recognizer, bool enabled); +/** +* @brief Sets whether to enable strict finger count checking. If this feature is enabled and the actual number of touch +* fingers does not match the set number, the gesture recognition fails. +* +* @param recognizer Indicates the pointer to a gesture recognizer. +* @param limitFingerCount Indicates whether to enable strict finger count checking. +* @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. +* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. +* @since 16 +*/ +int32_t OH_ArkUI_SetGestureRecognizerLimitFingerCount(ArkUI_GestureRecognizer* recognizer, bool limitFingerCount); + /** * @brief Obtains the enabled state of a gesture recognizer. * -- Gitee From 6be038b1737eb906c681ea342c45806ba3d90144 Mon Sep 17 00:00:00 2001 From: hhl Date: Wed, 15 Jan 2025 14:25:48 +0800 Subject: [PATCH 409/630] add hicollie struck interface Signed-off-by: hhl --- hiviewdfx/hicollie/include/hicollie/hicollie.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hiviewdfx/hicollie/include/hicollie/hicollie.h b/hiviewdfx/hicollie/include/hicollie/hicollie.h index 8ad4bddcf..7ac4ed60b 100644 --- a/hiviewdfx/hicollie/include/hicollie/hicollie.h +++ b/hiviewdfx/hicollie/include/hicollie/hicollie.h @@ -123,6 +123,19 @@ typedef struct HiCollie_DetectionParam { */ HiCollie_ErrorCode OH_HiCollie_Init_StuckDetection(OH_HiCollie_Task task); +/** + * @brief Set up periodic tasks for stuck detection. + * + * @param task Periodic task executed every stuckTimeout seconds. + * @param stuckTimeout Stuck detection interval. + * @return {@link HICOLLIE_SUCCESS} 0 - Success. + * {@link HICOLLIE_INVALID_ARGUMENT} 401 - stuckTimeout is less than 3 seconds and greater than 15 seconds. + * {@link HICOLLIE_WRONG_THREAD_CONTEXT} 29800001 - Wrong thread context + * The function can not be called from main thread. + * @since 16 + */ +HiCollie_ErrorCode OH_HiCollie_Init_StuckDetectionWithTimeout(OH_HiCollie_Task task, uint32_t stuckTimeout); + /** * @brief Set up stub functions for jank detection. * -- Gitee From d09ca25c906cedc91cbd6ee787f78a2ff4671627 Mon Sep 17 00:00:00 2001 From: lizhuojun Date: Tue, 26 Nov 2024 22:09:01 +0800 Subject: [PATCH 410/630] UDMF interface for unified progress bar Signed-off-by: lizhuojun --- distributeddatamgr/udmf/include/udmf.h | 136 ++++++++++++++++++ .../udmf/include/udmf_err_code.h | 40 ++++++ distributeddatamgr/udmf/libudmf.ndk.json | 32 +++++ 3 files changed, 208 insertions(+) diff --git a/distributeddatamgr/udmf/include/udmf.h b/distributeddatamgr/udmf/include/udmf.h index 5a8491cfc..386abe3ab 100644 --- a/distributeddatamgr/udmf/include/udmf.h +++ b/distributeddatamgr/udmf/include/udmf.h @@ -90,6 +90,38 @@ typedef enum Udmf_ShareOption { SHARE_OPTIONS_CROSS_APP } Udmf_ShareOption; +/** + * @brief Describe the types of file conflict options when getting data from the udmf. + * + * @since 15 + */ +typedef enum Udmf_FileConflictOptions { + /** + * @brief Overwrite when dest uri has file with same name. + */ + UDMF_OVERWRITE = 0, + /** + * @brief Skip when dest uri has file with same name. + */ + UDMF_SKIP = 1, +} Udmf_FileConflictOptions; + +/** + * @brief Describe the types of progress indicator when getting data from the udmf. + * + * @since 15 +*/ +typedef enum Udmf_ProgressIndicator { + /** + * @brief Getting data without system default progress indicator. + */ + UDMF_NONE = 0, + /** + * @brief Getting data with system default progress indicator. + */ + UDMF_DEFAULT = 1 +} Udmf_ProgressIndicator; + /** * @brief Describes the unified data type. * @@ -118,6 +150,29 @@ typedef struct OH_UdmfRecordProvider OH_UdmfRecordProvider; */ typedef struct OH_UdmfProperty OH_UdmfProperty; +/** + * @brief Represents the udmf progress information. + * + * @since 15 +*/ +typedef struct OH_Udmf_ProgressInfo OH_Udmf_ProgressInfo; + +/** + * @brief Represents the parameters of udmf get data with progress info. + * + * @since 15 +*/ +typedef struct OH_UdmfGetDataParams OH_UdmfGetDataParams; + +/** + * @brief Defines the callback function used to return the progress information and data. + * + * @param progressInfo The progress information notified to Application. + * @param data Represents the unified data. + * @since 15 +*/ +typedef void (*OH_Udmf_DataProgressListener)(OH_Udmf_ProgressInfo* progressInfo, OH_UdmfData* data); + /** * @brief Creation a pointer to the instance of the {@link OH_UdmfData}. * @@ -757,6 +812,87 @@ int OH_Udmf_GetUnifiedData(const char* key, Udmf_Intention intention, OH_UdmfDat int OH_Udmf_SetUnifiedData(Udmf_Intention intention, OH_UdmfData* unifiedData, char* key, unsigned int keyLen); +/** + * @brief Gets the progress from the {@OH_Udmf_ProgressInfo}. + * + * @param progressInfo Represents a pointer to an instance of {@link OH_Udmf_ProgressInfo}. + * @return Returns the progress. + * @see OH_Udmf_ProgressInfo + * @since 15 + */ +int OH_UdmfProgressInfo_GetProgress(OH_Udmf_ProgressInfo* progressInfo); + +/** + * @brief Gets the status from the {@OH_Udmf_ProgressInfo}. + * + * @param progressInfo Represents a pointer to an instance of {@link OH_Udmf_ProgressInfo}. + * @return Returns the status code. See {@link Udmf_ListenerStatus}. + * @see OH_Udmf_ProgressInfo Udmf_ListenerStatus + * @since 15 + */ +int OH_UdmfProgressInfo_GetStatus(OH_Udmf_ProgressInfo* progressInfo); + +/** + * @brief Creation a pointer to the instance of the {@link OH_UdmfGetDataParams}. + * + * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfGetDataParams} + * structure is returned. If the operation is failed, nullptr is returned. + * @see OH_UdmfGetDataParams + * @since 15 + */ +OH_UdmfGetDataParams* OH_UdmfGetDataParams_Create(); + +/** + * @brief Destroy a pointer that points to an instance of {@link OH_UdmfGetDataParams}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdmfGetDataParams}. + * @see OH_UdmfGetDataParams + * @since 15 + */ +void OH_UdmfGetDataParams_Destroy(OH_UdmfGetDataParams* pThis); + +/** + * @brief Sets the destination uri to the {@OH_UdmfGetDataParams}. + * + * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}. + * @param destUri Pointer to a destination uri. + * @see OH_UdmfGetDataParams + * @since 15 + */ +void OH_UdmfGetDataParams_SetDestUri(OH_UdmfGetDataParams* params, const char* destUri); + +/** + * @brief Sets the file conflict options to the {@OH_UdmfGetDataParams}. + * + * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}. + * @param options Represents to the file conflict options. + * @see OH_UdmfGetDataParams Udmf_FileConflictOptions + * @since 15 + */ +void OH_UdmfGetDataParams_SetFileConflictOptions(OH_UdmfGetDataParams* params, const Udmf_FileConflictOptions options); + +/** + * @brief Sets the progress indicator to the {@OH_UdmfGetDataParams}. + * + * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}. + * @param progressIndicator Represents to the progress indicator. + * @see OH_UdmfGetDataParams Udmf_ProgressIndicator + * @since 15 + */ +void OH_UdmfGetDataParams_SetProgressIndicator(OH_UdmfGetDataParams* params, + const Udmf_ProgressIndicator progressIndicator); + +/** + * @brief Sets the progress indicator to the {@OH_UdmfGetDataParams}. + * + * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}. + * @param dataProgressListener Represents to the data progress listener. + * @see OH_UdmfGetDataParams OH_Udmf_DataProgressListener + * @since 15 + */ +void OH_UdmfGetDataParams_SetDataProgressListener(OH_UdmfGetDataParams* params, + const OH_Udmf_DataProgressListener dataProgressListener); + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/udmf/include/udmf_err_code.h b/distributeddatamgr/udmf/include/udmf_err_code.h index 105191c7c..f3db582c6 100644 --- a/distributeddatamgr/udmf/include/udmf_err_code.h +++ b/distributeddatamgr/udmf/include/udmf_err_code.h @@ -66,6 +66,46 @@ typedef enum Udmf_ErrCode { UDMF_E_INVALID_PARAM = (UDMF_ERR + 1), } Udmf_ErrCode; +/** + * @brief Indicates the error code information. + * + * @since 15 + */ +typedef enum Udmf_ListenerStatus { + /** + * brief Indicates the finished status. + */ + UDMF_FINISHED = 0, + /** + * @brief Indicates that processing is still in progress. + */ + UDMF_PROCESSING, + /** + * @brief Indicates that the process has been canceled. + */ + UDMF_CANCELED, + /** + * @brief Indicates that an internal error has occurred. + */ + UDMF_INNER_ERROR = 200, + /** + * @brief Indicates that the GetDataParams contains invalid parameters. + */ + UDMF_INVALID_PARAMETERS, + /** + * @brief Indicates that no data is obtained. + */ + UDMF_DATA_NOT_FOUND, + /** + * @brief Indicates that an error occurred in the synchronization process. + */ + UDMF_SYNC_FAILED, + /** + * @brief Indicates that an error occurred during file copying. + */ + UDMF_COPY_FILE_FAILED, +} Udmf_ListenerStatus; + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/udmf/libudmf.ndk.json b/distributeddatamgr/udmf/libudmf.ndk.json index 0cef8921c..561cd69eb 100644 --- a/distributeddatamgr/udmf/libudmf.ndk.json +++ b/distributeddatamgr/udmf/libudmf.ndk.json @@ -526,5 +526,37 @@ { "first_introduced": "14", "name": "OH_UdmfRecord_GetContentForm" + }, + { + "first_introduced": "15", + "name": "OH_UdmfProgressInfo_GetProgress" + }, + { + "first_introduced": "15", + "name": "OH_UdmfProgressInfo_GetStatus" + }, + { + "first_introduced": "15", + "name": "OH_UdmfGetDataParams_Create" + }, + { + "first_introduced": "15", + "name": "OH_UdmfGetDataParams_Destroy" + }, + { + "first_introduced": "15", + "name": "OH_UdmfGetDataParams_SetDestUri" + }, + { + "first_introduced": "15", + "name": "OH_UdmfGetDataParams_SetFileConflictOptions" + }, + { + "first_introduced": "15", + "name": "OH_UdmfGetDataParams_SetProgressIndicator" + }, + { + "first_introduced": "15", + "name": "OH_UdmfGetDataParams_SetDataProgressListener" } ] \ No newline at end of file -- Gitee From 2ad6f930e31d8ab7bb039d6cd9c1587f0729289b Mon Sep 17 00:00:00 2001 From: x00893483 Date: Tue, 7 Jan 2025 09:55:11 +0800 Subject: [PATCH 411/630] add ArkUI_KeyboardAppearanceType Signed-off-by: x00893483 --- arkui/ace_engine/native/native_node.h | 26 +++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 28 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0783cab5..4779066b7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3029,6 +3029,19 @@ typedef enum { */ NODE_TEXT_INPUT_HALF_LEADING = 7034, + /** + * @brief Set the keyboard style of textInput + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32:keyboard style,the parameter type is {@link ArkUI_KeyboardAppearanceType}。\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32:keyboard style,the parameter type is {@link ArkUI_KeyboardAppearanceType}。\n + * + * @since 16 + */ + NODE_TEXT_INPUT_KEYBOARD_APPEARANCE = 7035, + /** * @brief Defines the default placeholder text for the multi-line text box. * This attribute can be set, reset, and obtained as required through APIs. @@ -3364,6 +3377,19 @@ typedef enum { */ NODE_TEXT_AREA_HALF_LEADING = 8025, + /** + * @brief Set the keyboard style of textArea + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32:keyboard style,the parameter type is {@link ArkUI_KeyboardAppearanceType}。\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32:keyboard style,the parameter type is {@link ArkUI_KeyboardAppearanceType}。\n + * + * @since 16 + */ + NODE_TEXT_AREA_KEYBOARD_APPEARANCE = 8026, + /** * @brief Defines the button text content. This attribute can be set, reset, and obtained as required through APIs. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 05352dd08..e7eb7637d 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1886,6 +1886,34 @@ typedef enum { ARKUI_TEXTINPUT_STYLE_INLINE } ArkUI_TextInputStyle; +/** + * @brief Defines the keyboard style of input box + * + * @since 16 + */ +typedef enum { + /** + * Default appearance mode, won't adopt immersive styles. + * @since 16 + */ + ARKUI_KEYBOARD_APPEARANCE_NONE_IMMERSIVE = 0, + /** + * Immersive mode. + * @since 16 + */ + ARKUI_KEYBOARD_APPEARANCE_IMMERSIVE = 1, + /** + * Light immersive style. + * @since 16 + */ + ARKUI_KEYBOARD_APPEARANCE_LIGHT_IMMERSIVE = 2, + /** + * Dark immersive style. + * @since 16 + */ + ARKUI_KEYBOARD_APPEARANCE_DARK_IMMERSIVE = 3, +} ArkUI_KeyboardAppearance; + /** * @brief Defines the entity type for text recognition. * -- Gitee From 1c5d6642fc94aeeaaa201ff45d0e852e4caaeeb2 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Tue, 14 Jan 2025 15:39:57 +0800 Subject: [PATCH 412/630] event info enhancement Signed-off-by: zhouchaobo Change-Id: Ibad1130f6d7d944909d323a2d5be5f1c9dee6a6e --- arkui/ace_engine/native/libace.ndk.json | 20 +++++++++ arkui/ace_engine/native/ui_input_event.h | 57 ++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 23b1e95b4..6ac3dda21 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2626,5 +2626,25 @@ { "first_introduced": "16", "name": "OH_ArkUI_GetNodeSnapshot" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_GetPressedTimeByIndex" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_MouseEvent_GetRawDeltaX" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_MouseEvent_GetRawDeltaY" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_MouseEvent_GetPressedButtons" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetTargetDisplayId" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 2f91f8fba..1cc31e0f2 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -830,6 +830,63 @@ double OH_ArkUI_FocusAxisEvent_GetAxisValue(const ArkUI_UIInputEvent* event, int */ int32_t OH_ArkUI_FocusAxisEvent_SetStopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation); +/** + * @brief Obtains the press time of a specific touch point. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param pointerIndex Index of the target touch point in the multi-touch data list. + * @return Returns the press time of the specific touch point; returns 0 if any parameter error occurs. + * @since 16 + */ +int64_t OH_ArkUI_PointerEvent_GetPressedTimeByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex); + +/** + * @brief Obtains the x-axis offset of the mouse pointer position relative to the position in the previously reported + * mouse event. This value may be less than the difference between the two reported X coordinates when the mouse pointer + * is near the screen edge. + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the x-axis offset of the mouse pointer position relative to the position in the previously reported + * mouse event; returns 0.0f if any parameter error occurs. + * @since 16 + */ +float OH_ArkUI_MouseEvent_GetRawDeltaX(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the y-axis offset of the mouse pointer position relative to the position in the previously reported + * mouse event. This value may be less than the difference between the two reported Y coordinates when the mouse pointer + * is near the screen edge. + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the y-axis offset of the mouse pointer position relative to the position in the previously reported + * mouse event; returns 0.0f if any parameter error occurs. + * @since 16 + */ +float OH_ArkUI_MouseEvent_GetRawDeltaY(const ArkUI_UIInputEvent* event); + +/** + * @brief Obtains the pressed buttons from a mouse event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param pressedButtons Array of the pressed buttons. An int array must be created beforehand to store the pressed + * buttons. + * @param length Length of the passed pressedButtons array (when used as an input parameter); + * number of the buttons pressed (when used as an output parameter). + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the given buffer size is insufficient. + * @since 16 + */ +int32_t OH_ArkUI_MouseEvent_GetPressedButtons( + const ArkUI_UIInputEvent* event, int32_t* pressedButtons, int32_t* length); + +/** + * @brief Obtains the ID of the screen where the UI input event occurs. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the screen ID; returns 0 if any parameter error occurs. + * @since 16 + */ +int32_t OH_ArkUI_UIInputEvent_GetTargetDisplayId(const ArkUI_UIInputEvent* event); + #ifdef __cplusplus }; #endif -- Gitee From e732c3a552bfc5e87f1845de335a703945d8f7c3 Mon Sep 17 00:00:00 2001 From: liyi0309 Date: Thu, 16 Jan 2025 11:04:30 +0800 Subject: [PATCH 413/630] =?UTF-8?q?dialog=20=E9=A1=B5=E9=9D=A2=E7=BA=A7?= =?UTF-8?q?=E8=83=BD=E5=8A=9BC-API=20Signed-off-by:=20liyi0309?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/native_dialog.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 164070c4b..d3cfb9dd9 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -78,12 +78,10 @@ typedef enum { * @since 16 */ typedef enum { - /** Mask covering the parent node. */ + /** Mask covering the parent node area. */ ARKUI_IMMERSIVE_MODE_DEFAULT = 0, - /** Mask covering the page node. */ - ARKUI_IMMERSIVE_MODE_PAGE, - /** Mask covering the root node. */ - ARKUI_IMMERSIVE_MODE_FULL, + /** Mask extend safe area includes status bar and navigation bar. */ + ARKUI_IMMERSIVE_MODE_EXTEND, } ArkUI_ImmersiveMode; /** -- Gitee From bd67e0e34990cbbddae5a5b90a6ec094ba95239b Mon Sep 17 00:00:00 2001 From: zhangjinyu101 Date: Sat, 11 Jan 2025 14:54:18 +0800 Subject: [PATCH 414/630] =?UTF-8?q?Slider=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=A3=B0=E6=8C=AF=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangjinyu101 --- arkui/ace_engine/native/native_node.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 5a733f220..39be9a16b 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4403,6 +4403,21 @@ typedef enum { */ NODE_SLIDER_TRACK_THICKNESS, + /** + * @brief Defines whether haptic feedback. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to feedback. The value true means to feedback, and + * false means the opposite.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: whether to feedback.\n + * + * @since 16 + */ + NODE_SLIDER_ENABLE_HAPTIC_FEEDBACK = 17013, + /** * @brief Set the selection status of an option button. Attribute setting, * attribute resetting, and attribute obtaining are supported. -- Gitee From 53942586577db1b215bffd61aae7c976eb21174e Mon Sep 17 00:00:00 2001 From: c30053238 Date: Wed, 15 Jan 2025 14:39:52 +0800 Subject: [PATCH 415/630] backdropblur Signed-off-by: c30053238 --- arkui/ace_engine/native/native_node.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 878396f6b..1b63580a2 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1849,21 +1849,21 @@ typedef enum { NODE_TAB_STOP = 98, /** - * @brief Defines blur attribute of backdrop, which can be set, reset, and obtained as required through APIs. + * @brief Defines the backdrop blur 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:Represents the blur radius of backdrop. The unit is px. The value range is [0,+∞).\n - * .value[1]?.f32:Represents a gray scale blur parameter, which affects the degree of brightening black color.\n - * The value range is [0,127].\n - * .value[2]?.f32:Represents a gray scale blur parameter, which affects the degree of darkening white color.\n - * The value range is [0,127].\n + * .value[0].f32:backdrop blur radius, in px. The value range is [0, +∞).\n + * .value[1]?.f32:grayscale blur settings that control the brightness of the black color.\n + * The value range is [0, 127].\n + * .value[2]?.f32:grayscale blur settings that control the darkness of the white color.\n + * The value range is [0, 127].\n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].f32:Represents the blur radius of backdrop. The unit is px. The value range is [0,+∞).\n - * .value[1].f32:Represents a gray scale blur parameter, which affects the degree of brightening black color.\n - * The value range is [0,127].\n - * .value[2].f32:Represents a gray scale blur parameter, which affects the degree of darkening white color.\n - * The value range is [0,127].\n + * .value[0].f32:backdrop blur radius, in px. The value range is [0, +∞).\n + * .value[1].f32:grayscale blur settings that control the brightness of the black color.\n + * The value range is [0, 127].\n + * .value[2].f32:grayscale blur settings that control the darkness of the white color.\n + * The value range is [0, 127].\n * * @since 16 */ -- Gitee From 8e7d9a1d94e437b4eb33e587fc95781b3df9b4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=8C=AF=E5=BE=B7?= Date: Thu, 9 Jan 2025 10:40:52 +0800 Subject: [PATCH 416/630] add OH_NativeArkWeb_LoadData interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吴振德 --- .../interfaces/native/arkweb_error_code.h | 16 ++++++++++ .../interfaces/native/libohweb.ndk.json | 4 +++ .../native/native_interface_arkweb.h | 32 +++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/web/webview/interfaces/native/arkweb_error_code.h b/web/webview/interfaces/native/arkweb_error_code.h index 64db3082c..a0189434f 100644 --- a/web/webview/interfaces/native/arkweb_error_code.h +++ b/web/webview/interfaces/native/arkweb_error_code.h @@ -53,6 +53,22 @@ ARKWEB_INVALID_URL = 17100103, /** @error Invalid cookie value. */ ARKWEB_INVALID_COOKIE_VALUE = 17100104, + +/* + * @brief Failed to open the library. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 16 + */ +ARKWEB_LIBRARY_OPEN_FAILURE = 17100105, + +/* + * @brief The required symbol was not found in the library. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 16 + */ +ARKWEB_LIBRARY_SYMBOL_NOT_FOUND = 17100106, } ArkWeb_ErrorCode; #endif // ARKWEB_ERROR_CODE_H diff --git a/web/webview/interfaces/native/libohweb.ndk.json b/web/webview/interfaces/native/libohweb.ndk.json index a92438ec8..2babccf41 100644 --- a/web/webview/interfaces/native/libohweb.ndk.json +++ b/web/webview/interfaces/native/libohweb.ndk.json @@ -314,5 +314,9 @@ { "first_introduced": "12", "name": "OH_ArkWeb_GetNativeAPI" + }, + { + "first_introduced": "16", + "name": "OH_NativeArkWeb_LoadData" } ] diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h index 96b779bf4..8477f09c7 100644 --- a/web/webview/interfaces/native/native_interface_arkweb.h +++ b/web/webview/interfaces/native/native_interface_arkweb.h @@ -35,6 +35,8 @@ #include #include +#include "arkweb_error_code.h" + #ifdef __cplusplus extern "C" { #endif @@ -153,6 +155,36 @@ void OH_NativeArkWeb_SetDestroyCallback(const char* webTag, NativeArkWeb_OnDestr */ NativeArkWeb_OnDestroyCallback OH_NativeArkWeb_GetDestroyCallback(const char* webTag); +/** + * @brief Loads the data or URL. + * This function should be called on main thread. + * + * @param webTag The name of the web component. + * @param data A string encoded according to "Base64" or "URL", should not be NULL. + * @param mimeType Media type. For example: "text/html", should not be NULL. + * @param encoding Encoding type. For example: "UTF-8", should not be NULL. + * @param baseUrl A specified URL path ("http"/"https"/"data" protocol), + * which is assigned to window.origin by the Web component. + * @param historyUrl History URL. When it is not empty, it can be managed by + * history records to realize the back and forth function. + * @return LoadData result code. + * {@link ARKWEB_SUCCESS} load data success. + * {@link ARKWEB_INVALID_PARAM} Mandatory parameters are left unspecified or + * Incorrect parameter types or Parameter verification failed. + * {@link ARKWEB_INIT_ERROR} Initialization error, can't get a valid Web for the webTag. + * {@link ARKWEB_LIBRARY_OPEN_FAILURE} Failed to open the library. + * {@link ARKWEB_LIBRARY_SYMBOL_NOT_FOUND} The required symbol was not found in the library. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 16 + */ +ArkWeb_ErrorCode OH_NativeArkWeb_LoadData(const char* webTag, + const char* data, + const char* mimeType, + const char* encoding, + const char* baseUrl, + const char* historyUrl); + #ifdef __cplusplus }; #endif -- Gitee From d2dc508e570f200538e476c59699e87a0fb54b3c Mon Sep 17 00:00:00 2001 From: cuile4 Date: Tue, 7 Jan 2025 20:34:15 +0800 Subject: [PATCH 417/630] Add float vector support for db. Signed-off-by: cuile4 --- .../relational_store/include/oh_cursor.h | 52 ++++++++++++++++++ .../include/oh_value_object.h | 12 ----- .../include/oh_values_bucket.h | 13 ----- .../include/relational_store.h | 54 +++++++++++-------- .../relational_store/libnative_rdb.ndk.json | 16 ++++++ 5 files changed, 101 insertions(+), 46 deletions(-) diff --git a/distributeddatamgr/relational_store/include/oh_cursor.h b/distributeddatamgr/relational_store/include/oh_cursor.h index 2f8c2a5ae..998e028d6 100644 --- a/distributeddatamgr/relational_store/include/oh_cursor.h +++ b/distributeddatamgr/relational_store/include/oh_cursor.h @@ -264,6 +264,58 @@ struct OH_Cursor { int (*getAssets)(OH_Cursor *cursor, int32_t columnIndex, Data_Asset **value, uint32_t *length); }; +/** + * @brief Get float array data size of the requested column from OH_Cursor object. + * + * @param cursor Represents a pointer to an instance of OH_Cursor. + * @param columnIndex Indicates the zero-based column index. + * @param length Represents the size of float array. It is an output parameter. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_STEP_RESULT_CLOSED} the result set has been closed. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * @since 16 + */ +int OH_Cursor_GetFloatVectorCount(OH_Cursor *cursor, int32_t columnIndex, size_t *length); + +/** + * @brief Obtains the value of the requested column as a float array. + * + * @param cursor Represents a pointer to an instance of OH_Cursor. + * @param columnIndex Indicates the zero-based column index. + * @param val Represents a pointer to float array. The caller needs to apply for data memory. + * This function only fills data. Otherwise, the execution fails. + * @param inLen Represents the size of val. It can be obtained through the OH_Cursor_GetFloatVectorCount function. + * @param outLen Represents the actual amount of data obtained. It is an output parameter. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_STEP_RESULT_CLOSED} the result set has been closed. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * @see OH_Cursor_GetFloatVectorCount. + * @since 16 + */ +int OH_Cursor_GetFloatVector(OH_Cursor *cursor, int32_t columnIndex, float *val, size_t inLen, size_t *outLen); + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/relational_store/include/oh_value_object.h b/distributeddatamgr/relational_store/include/oh_value_object.h index c1aa889ed..1c80013f4 100644 --- a/distributeddatamgr/relational_store/include/oh_value_object.h +++ b/distributeddatamgr/relational_store/include/oh_value_object.h @@ -117,18 +117,6 @@ struct OH_VObject { */ int (*putTexts)(OH_VObject *valueObject, const char **value, uint32_t count); - /** - * @brief Convert the float array input parameter to a value of type {@link OH_VObject}. - * - * @param valueObject Represents a pointer to an {@link OH_VObject} instance. - * @param value Represents a pointer to the array of type float. - * @param dimension Represents the size of the array. - * @return Returns the status code of the execution. - * @see OH_VObject. - * @since 14 - */ - int (*putFloatVector)(OH_VObject *valueObject, const float *value, uint32_t dimension); - /** * @brief Destroy the {@link OH_VObject} object and reclaim the memory occupied by the object. * diff --git a/distributeddatamgr/relational_store/include/oh_values_bucket.h b/distributeddatamgr/relational_store/include/oh_values_bucket.h index 681b319e6..87c90608f 100644 --- a/distributeddatamgr/relational_store/include/oh_values_bucket.h +++ b/distributeddatamgr/relational_store/include/oh_values_bucket.h @@ -123,19 +123,6 @@ struct OH_VBucket { */ int (*putBlob)(OH_VBucket *bucket, const char *field, const uint8_t *value, uint32_t size); - /** - * @brief Put the const float * value to this {@link OH_VBucket} object for the given column name. - * - * @param bucket Represents a pointer to an {@link OH_VBucket} instance. - * @param field Indicates the name of the column. - * @param value Indicates the const float * value. - * @param dimension Indicates the dimension of value. - * @return Returns the status code of the execution. - * @see OH_VBucket. - * @since 14 - */ - int (*putFloatVector)(OH_VBucket *bucket, const char *field, const float *value, uint32_t dimension); - /** * @brief Put NULL to this {@link OH_VBucket} object for the given column name. * diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index cd3e76da3..a33d4a2d4 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -534,6 +534,35 @@ OH_Cursor *OH_Rdb_Query(OH_Rdb_Store *store, OH_Predicates *predicates, const ch */ int OH_Rdb_Execute(OH_Rdb_Store *store, const char *sql); +/** + * @brief Executes an SQL statement. + * + * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. + * @param sql Indicates the SQL statement to execute. + * @param args Represents the values of the parameters in the SQL statement. + * @param result Represents a pointer to OH_Data_Value instance when the execution is successful. + * The memory must be released through the OH_Value_Destroy interface after the use is complete. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * @see OH_Value_Destroy. + * @since 16 + */ +int OH_Rdb_ExecuteV2(OH_Rdb_Store *store, const char *sql, const OH_Data_Values *args, OH_Data_Value **result); + /** * @brief Write operations are performed using the specified transaction represented by the transaction ID * @@ -561,35 +590,18 @@ int OH_Rdb_ExecuteByTrxId(OH_Rdb_Store *store, int64_t trxId, const char *sql); */ OH_Cursor *OH_Rdb_ExecuteQuery(OH_Rdb_Store *store, const char *sql); -/** - * @brief Write operations are performed using the specified transaction represented by the transaction ID - * - * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. - * @param trxId The transaction ID of the specified transaction, must be greater than 0 - * @param sql Indicates the SQL statement to execute. - * @param valuesBucket Indicates the row of data {@link OH_VBucket} to be operated into the table. - * @return Returns the status code of the execution. - * {@link RDB_OK} - success. - * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * {@link RDB_E_NOT_SUPPORTED} - The error code for not supprt. - * @see OH_Rdb_Store. - * @since 14 - */ - -int OH_Rdb_ExecuteByTrxIdV2(OH_Rdb_Store *store, int64_t trxId, const char *sql, OH_VBucket *valuesBucket); - /** * @brief Queries data in the database based on an SQL statement. * * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. * @param sql Indicates the SQL statement to execute. - * @param valuesBucket Indicates the row of data {@link OH_VBucket} to be operated into the table. + * @param args Represents a pointer to an instance of OH_Data_Values and it is the selection arguments. * @return If the query is successful, a pointer to the instance of the @link OH_Cursor} structure is returned. - * If Get store failed,sql is nullptr or resultSet is nullptr, nullptr is returned. + * If sql statement is invalid or the memory allocate failed, nullptr is returned. * @see OH_Rdb_Store. - * @since 14 + * @since 16 */ -OH_Cursor *OH_Rdb_ExecuteQueryV2(OH_Rdb_Store *store, const char *sql, OH_VBucket *valuesBucket); +OH_Cursor *OH_Rdb_ExecuteQueryV2(OH_Rdb_Store *store, const char *sql, const OH_Data_Values *args); /** * @brief Begins a transaction in EXCLUSIVE mode. diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index abd77163e..729444292 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -502,5 +502,21 @@ { "first_introduced": "16", "name":"OH_VBucket_PutUnlimitedInt" + }, + { + "first_introduced": "16", + "name":"OH_Rdb_ExecuteV2" + }, + { + "first_introduced": "16", + "name":"OH_Rdb_ExecuteQueryV2" + }, + { + "first_introduced": "16", + "name":"OH_Cursor_GetFloatVectorCount" + }, + { + "first_introduced": "16", + "name":"OH_Cursor_GetFloatVector" } ] \ No newline at end of file -- Gitee From 96b9b8c8bd443a77c9f15278798c26e64286d372 Mon Sep 17 00:00:00 2001 From: zoulinken Date: Thu, 16 Jan 2025 11:25:47 +0800 Subject: [PATCH 418/630] =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=BF=81=E7=A7=BBapi?= =?UTF-8?q?=E5=92=8C=E8=B7=A8=E8=AF=AD=E8=A8=80api=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/libace.ndk.json | 28 +++++++++++++++++ arkui/ace_engine/native/native_node.h | 40 +++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 42 +++++++++++++++++++++++++ 3 files changed, 110 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 23b1e95b4..6b999b86b 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1359,6 +1359,34 @@ "first_introduced": "16", "name": "OH_ArkUI_NodeUtils_GetAttachedNodeHandleById" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_MoveTo" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_SetCrossLanguageOption" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_GetCrossLanguageOption" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_CrossLanguageOption_Create" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_CrossLanguageOption_Destroy" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus" + }, { "first_introduced": "12", "name": "OH_ArkUI_ListChildrenMainSizeOption_Create" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 87fa87452..a105c3588 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8660,6 +8660,46 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontSty */ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node); +/** + * @brief Move the node handle to target parent node as child. + * + * @param node The node handle of the node to move. + * @param target_parent The node handle of target parent. + * @param index Indicates the index which the node is moved to. If the value is a nagative number of invalid, the + * node is moved to the end of the target parent node. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target_parent, int32_t index); + +/** + * @brief Set the cross-language option of the target node handle. + * + * @param node The target node handle. + * @param option The cross-language option {@link ArkUI_CrossLanguageOption}. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_SetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option); + +/** + * @brief Get the cross-language option of the target node handle. + * + * @param node The target node handle. + * @param option The cross-language option {@link ArkUI_CrossLanguageOption}. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_GetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option); + /** * @brief Registers a callback for node when layout is completed. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index d1840ec24..67591e8a6 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -221,6 +221,13 @@ typedef struct ArkUI_ActiveChildrenInfo ArkUI_ActiveChildrenInfo; */ typedef struct ArkUI_ProgressLinearStyleOption ArkUI_ProgressLinearStyleOption; +/** + * @brief The cross-language option. + * + * @since 16 + */ +typedef struct ArkUI_CrossLanguageOption ArkUI_CrossLanguageOption; + /** * @brief Defines the event callback type. * @@ -4349,6 +4356,41 @@ void OH_ArkUI_DestroySnapshotOptions(ArkUI_SnapshotOptions* snapshotOptions); * @since 16 */ int32_t OH_ArkUI_SnapshotOptions_SetScale(ArkUI_SnapshotOptions* snapshotOptions, float scale); + +/** + * @brief Create a cross-language option instance. + * + * @return Returns a cross-language option instance. If the result is a null pointer, it may be out of memory. + * @since 16 + */ +ArkUI_CrossLanguageOption* OH_ArkUI_CrossLanguageOption_Create(void); + +/** + * @brief Destroy the cross-language option instance. + * + * @param option The cross-language option instance. + * @since 16 + */ +void OH_ArkUI_CrossLanguageOption_Destroy(ArkUI_CrossLanguageOption* option); + +/** + * @brief Enable the attribute setting in the cross-language option. + * + * @param option The cross-language option. + * @param enable The attribute setting in the cross-language option. + * Default value: false. + * @since 16 + */ +void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageOption* option, bool enable); + +/** + * @brief Get the attribute setting enable of the cross-language option. + * + * @param option The cross-language option. + * @return The attribute setting enable of the cross-language option. + * @since 16 + */ +bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageOption* option); #ifdef __cplusplus }; #endif -- Gitee From 64276fa21c4653eec6ee5243f97e9c3fb86b2a3d Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Thu, 16 Jan 2025 15:57:24 +0800 Subject: [PATCH 419/630] =?UTF-8?q?=E6=9B=B4=E6=94=B9api=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- arkui/ace_engine/native/native_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index d1840ec24..239085b5d 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -4323,7 +4323,7 @@ float OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius(ArkUI_ProgressLinearSty /** * @brief Creates an option for taking snapshot, the returned value must be released through - * {@link OH_ArkUI_SnapshotOptions_Dispose} when it's not used anymore. + * {@link OH_ArkUI_DestroySnapshotOptions} when it's not used anymore. * * @return Returns the pointer to the created snapshot options object.If the object returns a null pointer, * it indicates a creation failure, and the reason for the failure may be that the address space is full. -- Gitee From 9759db0ae8af5a8efe6882cc5cbc1cd54c7b270e Mon Sep 17 00:00:00 2001 From: liukaii Date: Mon, 9 Dec 2024 20:04:35 +0800 Subject: [PATCH 420/630] add get UDMF data c-api Signed-off-by: liukaii --- arkui/ace_engine/native/drag_and_drop.h | 48 +++++++++++++++++++++++++ arkui/ace_engine/native/libace.ndk.json | 12 +++++++ 2 files changed, 60 insertions(+) diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index 2f68d95b0..ea482af38 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -434,6 +434,54 @@ float OH_ArkUI_DragEvent_GetVelocity(ArkUI_DragEvent* event); */ int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t* keys); +/** + * @brief Request to start the data sync process with the sync option. + * + * @param event Indicates the pointer to an ArkUI_DragEvent object. + * @param options Indicates the pointer to an OH_UdmfGetDataParams object. + * @param key Represents return value after set data to database successfully, it should be not + * less than {@link UDMF_KEY_BUFFER_LEN}. + * @param keyLen Represents the length of key string. + * @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. + * Returns {@link ARKUI_ERROR_CODE_DRAG_DATA_SYNC_FAILED} if the data sync is not allowed or failed. + * @since 16 + */ +int32_t OH_ArkUI_DragEvent_StartDataLoading( + ArkUI_DragEvent* event, OH_UdmfGetDataParams* options, char* key, unsigned int keyLen); + +/** + * @brief Cancel the data sync process. + * + * @param uiContext Indicates the pointer to a UI instance. + * @param key Represents the data key returned by {@link OH_ArkUI_DragEvent_StartDataLoading}. + * @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. + * Returns {@link ARKUI_ERROR_CODE_OPERATION_FAILED} if no any data sync is in progress. + * @since 16 + */ +int32_t OH_ArkUI_CancelDataLoading(ArkUI_ContextHandle uiContext, const char* key); + +/** + * @brief Sets whether to disable data prefetch process before the onDrop callback executing. + * The system will retry to getting data until the max time limit (2.4s for now) reaches, + * this's useful for the cross device draging operation, as the system helps to eliminate + * the communication instability, but it's redundant for {@link OH_ArkUI_DragEvent_StartDataLoading} + * method, as it will take care the data fetching with asynchronous mechanism, so must set this + * field to true if using {@link OH_ArkUI_DragEvent_StartDataLoading} in onDrop to avoid the data is + * fetched before onDrop executing unexpectedly. + * + * @param node Indicates the pointer to a component node. + * @param disabled Indicates whether to disable the data pre-fetch process, true for disable, false for not. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_DisableDropDataPrefetchOnNode(ArkUI_NodeHandle node, bool disabled); + /** * @brief Sets whether to enable strict reporting on drag events. * This feature is disabled by default, and you are advised to enable it. diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 1d822febf..6e708a67c 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2470,5 +2470,17 @@ { "first_introduced": "14", "name": "OH_ArkUI_KeyEvent_SetConsumed" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_DragEvent_StartDataLoading" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_CancelDataLoading" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_DisableDropDataPrefetchOnNode" } ] \ No newline at end of file -- Gitee From 89ac0ded87af7ffb977064c20454cd034aee7cf4 Mon Sep 17 00:00:00 2001 From: yyuanche Date: Thu, 16 Jan 2025 17:45:35 +0800 Subject: [PATCH 421/630] =?UTF-8?q?=E3=80=90CAPI=E3=80=91Button=E6=96=B0?= =?UTF-8?q?=E5=A2=9EROUNDED=5FRECTANGLE=E7=B1=BB=E5=9E=8B=20Signed-off-by:?= =?UTF-8?q?=20yyuanche=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/native_node.h | 2 ++ arkui/ace_engine/native/native_type.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f20102e7c..25bc9820c 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3278,10 +3278,12 @@ typedef enum { * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .value[0].i32: button type. The parameter type is {@link ArkUI_ButtonType}. * The default value is ARKUI_BUTTON_TYPE_CAPSULE. \n + * After api 16 the default value change to ARKUI_BUTTON_ROUNDED_RECTANGLE. * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: button type. The parameter type is {@link ArkUI_ButtonType}. * The default value is ARKUI_BUTTON_TYPE_CAPSULE. \n + * After api 16 the default value change to ARKUI_BUTTON_ROUNDED_RECTANGLE. * */ NODE_BUTTON_TYPE, diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index ca825e62b..174a86d3c 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1763,6 +1763,11 @@ typedef enum { ARKUI_BUTTON_TYPE_CAPSULE, /** Circle button. */ ARKUI_BUTTON_TYPE_CIRCLE, + /** + * Rounded rectangle button. + * @since 16 + */ + ARKUI_BUTTON_ROUNDED_RECTANGLE = 8 } ArkUI_ButtonType; /** -- Gitee From 450bf75bf278a60839f3a1b7df6a84626ddf0f1a Mon Sep 17 00:00:00 2001 From: huangweichen Date: Thu, 16 Jan 2025 19:49:09 +0800 Subject: [PATCH 422/630] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=84=A6=E7=82=B9CAP?= =?UTF-8?q?I=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangweichen --- arkui/ace_engine/native/native_interface_focus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_interface_focus.h b/arkui/ace_engine/native/native_interface_focus.h index cdf8d1794..4fb6643e1 100644 --- a/arkui/ace_engine/native/native_interface_focus.h +++ b/arkui/ace_engine/native/native_interface_focus.h @@ -50,7 +50,7 @@ extern "C" { * {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE} if the node is not focusable. * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR} if the node has unfocusable ancestor. - * {@link ARKUI_ERROR_CODE_FOCUS_NON_EXIST} if the node is not exists. + * {@link ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT} if the node is not exists. * @since 16 */ ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node); -- Gitee From 7a5e68e3839dae61e05551ac41472ca7cbedddfd Mon Sep 17 00:00:00 2001 From: Tintin9529 Date: Thu, 16 Jan 2025 20:06:00 +0800 Subject: [PATCH 423/630] fix dialog new api Signed-off-by: Tintin9529 --- arkui/ace_engine/native/native_dialog.h | 213 +----------------------- 1 file changed, 1 insertion(+), 212 deletions(-) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 164070c4b..f93dccb00 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -319,218 +319,6 @@ typedef struct { */ typedef struct { ArkUI_NativeDialogAPI_1 nativeDialogAPI1; - /** - * @brief Registers a listener callback before the dialog openAnimation starts. - * - * @param handle Indicates the pointer to the custom dialog box controller. - * @param userData Indicates the pointer to the custom data. - * @param callback Indicates the callback before the dialog openAnimation starts. - * @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. - * @since 16 - */ - int32_t (*registerOnWillAppear)( - ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); - - /** - * @brief Registers a listener callback when the dialog appears. - * - * @param handle Indicates the pointer to the custom dialog box controller. - * @param userData Indicates the pointer to the custom data. - * @param callback Indicates the callback when the dialog appears. - * @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. - * @since 16 - */ - int32_t (*registerOnDidAppear)( - ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); - - /** - * @brief Registers a listener callback before the dialog closeAnimation starts. - * - * @param handle Indicates the pointer to the custom dialog box controller. - * @param userData Indicates the pointer to the custom data. - * @param callback Indicates the callback before the dialog closeAnimation starts. - * @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. - * @since 16 - */ - int32_t (*registerOnWillDisappear)( - ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); - - /** - * @brief Registers a listener callback when the dialog disappears. - * - * @param handle Indicates the pointer to the custom dialog box controller. - * @param userData Indicates the pointer to the custom data. - * @param callback Indicates the callback when the dialog disappears. - * @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. - * @since 16 - */ - int32_t (*registerOnDidDisappear)( - ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); - - /** - * @brief Sets the background border widths for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param top width of the top border. - * @param right width of the right border. - * @param bottom width of the bottom border. - * @param left width of the left border. - * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} - * @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. - * @since 16 - */ - int32_t (*setBorderWidth)(ArkUI_NativeDialogHandle handle, float top, float right, float bottom, float left, - ArkUI_LengthMetricUnit unit); - /** - * @brief Sets the background border colors for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param top color of the top border. - * @param right color of the right border. - * @param bottom color of the bottom border. - * @param left width of the left border. - * @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. - * @since 16 - */ - int32_t (*setBorderColor)(ArkUI_NativeDialogHandle handle, uint32_t top, uint32_t right, uint32_t bottom, - uint32_t left); - /** - * @brief Sets the background border styles for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param top style of the top border, The parameter type is {@link ArkUI_BorderStyle}. - * @param right style of the right border, The parameter type is {@link ArkUI_BorderStyle}. - * @param bottom style of the bottom border, The parameter type is {@link ArkUI_BorderStyle}. - * @param left style of the left border, The parameter type is {@link ArkUI_BorderStyle}. - * @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. - * @since 16 - */ - int32_t (*setBorderStyle)(ArkUI_NativeDialogHandle handle, int32_t top, int32_t right, int32_t bottom, - int32_t left); - /** - * @brief Sets the background width for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param width width, in vp. - * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} - * @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. - * @since 16 - */ - int32_t (*setWidth)(ArkUI_NativeDialogHandle handle, float width, ArkUI_LengthMetricUnit unit); - /** - * @brief Sets the background height for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param height height, in vp. - * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} - * @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. - * @since 16 - */ - int32_t (*setHeight)(ArkUI_NativeDialogHandle handle, float height, ArkUI_LengthMetricUnit unit); - /** - * @brief Sets the background shadow for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param shadow shadow effect. The parameter type is {@link ArkUI_ShadowStyle}. - * @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. - * @since 16 - */ - int32_t (*setShadow)(ArkUI_NativeDialogHandle handle, ArkUI_ShadowStyle shadow); - /** - * @brief Sets the background custom shadow for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param customShadow custom shadow effect. - * .value[0]?.f32: blur radius of the shadow, in vp.\n - * .value[1]?.i32: whether to enable the coloring strategy. The value 1 means to enable the coloring - * strategy, and 0 (default value) means the opposite.\n - * .value[2]?.f32: offset of the shadow along the x-axis, in px.\n - * .value[3]?.f32: offset of the shadow along the y-axis, in px.\n - * .value[4]?.i32: shadow type {@link ArkUI_ShadowType}. Default value is ARKUI_SHADOW_TYPE_COLOR.\n - * .value[5]?.u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.\n - * .value[6]?.u32: whether to fill the shadow. The value 1 means to fill the shadow, and 0 - * means the opposite.\n - * @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. - * @since 16 - */ - int32_t (*setCustomShadow)(ArkUI_NativeDialogHandle handle, const ArkUI_AttributeItem* customShadow); - /** - * @brief Sets the background blur attribute for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param blurStyle blue type. The value is an enum of {@link ArkUI_BlurStyle}. - * @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. - * @since 16 - */ - int32_t (*setBackgroundBlurStyle)(ArkUI_NativeDialogHandle handle, ArkUI_BlurStyle blurStyle); - /** - * @brief Set the customDialog's keyboard avoid mode. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param keyboardAvoidMode avoid mode. The value is an enum of {@link ArkUI_KeyboardAvoidMode}. - * @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. - * @since 16 - */ - int32_t (*setKeyboardAvoidMode)(ArkUI_NativeDialogHandle handle, ArkUI_KeyboardAvoidMode keyboardAvoidMode); - /** - * @brief Defines whether to respond to the hover mode. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param enableHoverMode whether to respond to the hover mode, default value is false. - * @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. - * @since 16 - */ - int32_t (*enableHoverMode)(ArkUI_NativeDialogHandle handle, bool enableHoverMode); - /** - * @brief Defines the customDialog's display area in hover mode. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param hoverModeAreaType type of area in hover mode. The value is an enum of {@link ArkUI_HoverModeAreaType}. - * @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. - * @since 16 - */ - int32_t (*setHoverModeArea)(ArkUI_NativeDialogHandle handle, ArkUI_HoverModeAreaType hoverModeAreaType); /** * @brief Defines the distance between the customDialog and system keyboard. * @@ -540,6 +328,7 @@ typedef struct { * @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit} * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * @since 16 */ -- Gitee From 57c1b528aef6edd597bffd95cc023f9d6d5cc41d Mon Sep 17 00:00:00 2001 From: yzj688 Date: Fri, 17 Jan 2025 09:46:34 +0800 Subject: [PATCH 424/630] =?UTF-8?q?Drawing=20=E5=A2=9E=E5=8A=A0gpu?= =?UTF-8?q?=E7=BB=98=E5=88=B6=E6=8E=A5=E5=8F=A3=E8=A1=A5=E5=85=85=20Signed?= =?UTF-8?q?-off-by:=20yzj688=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../native_drawing/libnative_drawing.ndk.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index b4d1207f9..d59106554 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -322,6 +322,10 @@ "first_introduced": "12", "name": "OH_Drawing_GpuContextCreateFromGL" }, + { + "first_introduced": "16", + "name": "OH_Drawing_GpuContextCreate" + }, { "first_introduced": "12", "name": "OH_Drawing_GpuContextDestroy" @@ -708,10 +712,18 @@ "first_introduced": "12", "name": "OH_Drawing_SurfaceCreateFromGpuContext" }, + { + "first_introduced": "16", + "name": "OH_Drawing_SurfaceCreateOnScreen" + }, { "first_introduced": "12", "name": "OH_Drawing_SurfaceGetCanvas" }, + { + "first_introduced": "16", + "name": "OH_Drawing_SurfaceFlush" + }, { "first_introduced": "12", "name": "OH_Drawing_SurfaceDestroy" -- Gitee From 72041d1120aea5f720597a14396689e0d29906aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=9E=97=E8=82=AF?= <735001321@qq.com> Date: Fri, 17 Jan 2025 02:14:45 +0000 Subject: [PATCH 425/630] update arkui/ace_engine/native/native_type.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹林肯 <735001321@qq.com> --- arkui/ace_engine/native/native_type.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 67591e8a6..dd289ab0c 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -4377,11 +4377,11 @@ void OH_ArkUI_CrossLanguageOption_Destroy(ArkUI_CrossLanguageOption* option); * @brief Enable the attribute setting in the cross-language option. * * @param option The cross-language option. - * @param enable The attribute setting in the cross-language option. + * @param enabled The attribute setting in the cross-language option. * Default value: false. * @since 16 */ -void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageOption* option, bool enable); +void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageOption* option, bool enabled); /** * @brief Get the attribute setting enable of the cross-language option. -- Gitee From 6f949ff8b9e054831861b63654723104a3c74e0e Mon Sep 17 00:00:00 2001 From: 15349246236 Date: Fri, 17 Jan 2025 11:40:17 +0800 Subject: [PATCH 426/630] set and get capslock state Signed-off-by: 15349246236 --- multimodalinput/kits/c/input/oh_input_manager.h | 14 ++++++++++++++ multimodalinput/kits/c/ohinput.ndk.json | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 0969d87e1..dbb12d487 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -1645,6 +1645,20 @@ Input_Result OH_Input_GetDeviceVendor(Input_DeviceInfo *deviceInfo, int32_t *ven * @since 13 */ Input_Result OH_Input_GetDeviceAddress(Input_DeviceInfo *deviceInfo, char **address); + +/** + * @brief Obtains the function key status. + * + * @param keyCode Function key value. Supported function keys include capsLock, NumLock, and ScrollLock. + * @param state Function key status. The value 0 indicates that the function key is disabled, + * and the value 1 indicates the opposite. + * @return OH_Input_GetFunctionKeyState function api result code + * {@link INPUT_SUCCESS} if the operation is successful; + * {@link INPUT_PARAMETER_ERROR} if keyCode is invalid or state is a null pointer. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +Input_Result OH_Input_GetFunctionKeyState(int32_t keyCode, int32_t *state); #ifdef __cplusplus } #endif diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index 35791ebb5..ce5a6b5dc 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -430,5 +430,9 @@ { "first_introduced": "13", "name": "OH_Input_UnregisterDeviceListeners" - } + }, + { + "first_introduced": "15", + "name": "OH_Input_GetFunctionKeyState" + } ] \ No newline at end of file -- Gitee From cfe041da53c7caecaa58fcfbd804442e52f1f33b Mon Sep 17 00:00:00 2001 From: Zhang Jinyu Date: Thu, 5 Dec 2024 14:43:09 +0800 Subject: [PATCH 427/630] =?UTF-8?q?Swiper=E5=B8=A6=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9C=5FAPI=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhang Jinyu --- arkui/ace_engine/native/native_node.h | 3 +++ arkui/ace_engine/native/native_type.h | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0783cab5..686f27558 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5155,6 +5155,9 @@ typedef enum { * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .value[0].i32: index value of the child component. \n + * .value[1]?.i32: animation mode, the parameter type is {@link ArkUI_SwiperAnimationMode}. \n + * The default value is ARKUI_SWIPER_NO_ANIMATION. This parameter is valid only for the current call. \n + * This parameter is supported since API version 16. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: index value of the child component. \n diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 05352dd08..b66eae861 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -819,6 +819,20 @@ typedef enum { ARKUI_PAGE_FLIP_MODE_SINGLE, } ArkUI_PageFlipMode; +/** + * @brief Enumerates the animation modes for {@link NODE_SWIPER_INDEX}. + * + * @since 16 + */ +typedef enum { + /** Jump to target index without animation. */ + ARKUI_SWIPER_NO_ANIMATION = 0, + /** Scroll to target index with animation. */ + ARKUI_SWIPER_DEFAULT_ANIMATION = 1, + /** Jump to some index near the target index without animation, then scroll to target index with animation. */ + ARKUI_SWIPER_FAST_ANIMATION = 2, +} ArkUI_SwiperAnimationMode; + /** * @brief Enumerates the accessibility modes. * -- Gitee From 68ed1655a5786b94bdccbb7c1047e6a9ee4cf8c8 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 17 Jan 2025 08:42:44 +0000 Subject: [PATCH 428/630] update multimedia/player_framework/avrecorder_base.h. Signed-off-by: Steven --- multimedia/player_framework/avrecorder_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index e4eefcdb5..4c0b41875 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -40,7 +40,7 @@ #include #include -#include "media_asset_base_capi.h" +#include "multimedia/media_library/media_asset_base_capi.h" #ifdef __cplusplus extern "C" { -- Gitee From 49f61a2243f261609356ac4004f472e049147bc8 Mon Sep 17 00:00:00 2001 From: lihui Date: Fri, 17 Jan 2025 16:59:58 +0800 Subject: [PATCH 429/630] change buffer handle brief Signed-off-by: lihui --- graphic/graphic_2d/native_window/buffer_handle.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_window/buffer_handle.h b/graphic/graphic_2d/native_window/buffer_handle.h index 8bc87a1ff..bf1651335 100644 --- a/graphic/graphic_2d/native_window/buffer_handle.h +++ b/graphic/graphic_2d/native_window/buffer_handle.h @@ -46,8 +46,7 @@ extern "C" { #endif /** - * @brief Buffer handle used to transfer and obtain information about the buffer. The handle includes the buffer's - * file descriptor, size, format, usage, virtual address, shared memory key, physical address and reserved data. + * @brief Buffer handle used to transfer and obtain information about the buffer. * @since 8 */ typedef struct { -- Gitee From b826da8c4e0d140dc943417f481572b6c515fdcd Mon Sep 17 00:00:00 2001 From: sd_wu Date: Thu, 2 Jan 2025 11:33:14 +0800 Subject: [PATCH 430/630] add xcomponent ai image analyzer api Signed-off-by: sd_wu --- arkui/ace_engine/native/libace.ndk.json | 12 +++++ .../native/native_interface_xcomponent.h | 46 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ca090d8b7..72e69a58d 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2546,5 +2546,17 @@ { "first_introduced": "16", "name": "OH_ArkUI_NodeEvent_GetTextChangeEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PostFrameCallback" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_XComponent_StartImageAnalyzer" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_XComponent_StopImageAnalyzer" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index 5bdad5100..94985081e 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -75,6 +75,24 @@ enum { OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2, }; +/** + * @brief Status code for AI analyzer. + * + * @since 16 + */ +typedef enum { + /** AI analyzer execution is finished. */ + ARKUI_XCOMPONENT_AI_ANALYSIS_FINISHED = 0, + /** AI analyzer is disabled. */ + ARKUI_XCOMPONENT_AI_ANALYSIS_DISABLED = 110000, + /** AI analyzer is unsupported. */ + ARKUI_XCOMPONENT_AI_ANALYSIS_UNSUPPORTED = 110001, + /** AI analyzer is ongoing. */ + ARKUI_XCOMPONENT_AI_ANALYSIS_ONGOING = 110002, + /** AI analyzer is stopped. */ + ARKUI_XCOMPONENT_AI_ANALYSIS_STOPPED = 110003, +} ArkUI_XComponent_ImageAnalyzerState; + typedef enum { /** Trigger a touch event when a finger is pressed. */ OH_NATIVEXCOMPONENT_DOWN = 0, @@ -845,6 +863,34 @@ int32_t OH_NativeXComponent_GetNativeAccessibilityProvider( int32_t OH_NativeXComponent_RegisterKeyEventCallbackWithResult( OH_NativeXComponent* component, bool (*callback)(OH_NativeXComponent* component, void* window)); +/** + * @brief Start image analyzer for the specified XComponent + * instance created by the native API. + * + * @param node Indicates the pointer to the XComponent instance created by the native API. + * @param userData Indicates the pointer to a user defined data. + * @param callback Indicates the pointer to a image analyzer status callback function. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.\n + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} component is nullptr or callback is nullptr, + * or the type of node is not XComponent.\n + * @since 16 + */ +int32_t OH_ArkUI_XComponent_StartImageAnalyzer(ArkUI_NodeHandle node, void* userData, + void (*callback)(ArkUI_NodeHandle node, ArkUI_XComponent_ImageAnalyzerState statusCode, void* userData)); + +/** + * @brief Stop image analyzer for the specified XComponent + * instance created by the native API. + * + * @param node Indicates the pointer to the XComponent instance created by the native API. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.\n + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} component is nullptr or the type of node is not XComponent.\n + * @since 16 + */ +int32_t OH_ArkUI_XComponent_StopImageAnalyzer(ArkUI_NodeHandle node); + #ifdef __cplusplus }; #endif -- Gitee From 94604d34e10a2df50e8b2315fa28852732916b61 Mon Sep 17 00:00:00 2001 From: Zhang Jinyu Date: Sat, 18 Jan 2025 10:14:08 +0800 Subject: [PATCH 431/630] =?UTF-8?q?CalendarPicker=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=BD=93=E5=A4=A9=E9=AB=98=E4=BA=AE=E7=A6=81=E7=94=A8=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhang Jinyu --- arkui/ace_engine/native/native_node.h | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0783cab5..847ca7a30 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5822,6 +5822,35 @@ typedef enum { * @since 16 */ NODE_TEXT_PICKER_COLUMN_WIDTHS = 15009, + /** + * @brief Defines the disabled date range of the calendar picker. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: A string of dates. The `1st start date`,`1st end date`,`2nd start date`,`2nd end date`, + * ...,`nth start date`,`nth end date` of the disabled date range.\n + * Example: 1910-01-01,1910-12-31,2020-01-01,2020-12-31\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: A string of dates.\n + * + * @since 16 + */ + NODE_CALENDAR_PICKER_DISABLED_DATE_RANGE = 16006, + + /** + * @brief Defines whether the calendar picker marks today. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * value[0].i32: whether the calendar picker marks today. The default value is false.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: whether the calendar picker marks today.\n + * + * @since 16 + */ + NODE_CALENDAR_PICKER_MARK_TODAY = 16007, } ArkUI_NodeAttributeType; #define MAX_COMPONENT_EVENT_ARG_NUM 12 -- Gitee From 19c933746c59407ba9d92a19d5c093f9a97322f4 Mon Sep 17 00:00:00 2001 From: Tintin9529 Date: Sat, 18 Jan 2025 12:13:06 +0800 Subject: [PATCH 432/630] checkboxgroup-capi Signed-off-by: Tintin9529 Change-Id: Ia94d47f48d32bdda6219c0311686985609022fd2 --- arkui/ace_engine/native/native_node.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 6b94bd536..623ac326a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6943,13 +6943,18 @@ typedef enum { NODE_IMAGE_ANIMATOR_EVENT_ON_FINISH = 19004, /** - * @brief Defines the event triggered when the selected status of the ARKUI_NODE_CHECKBOX_GROOUP - * component changes. + * @brief Defines the callback triggered when the selected status of the ARKUI_NODE_CHECKBOX_GROOUP + * or checkbox changes. * * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is - * {@link ArkUI_NodeComponentEvent}. \n - * ArkUI_NodeComponentEvent.data[0].i321: selected; 0: not selected.\n - * + * {@link ArkUI_StringAsyncEvent}. \n + * ArkUI_StringAsyncEvent.pStr + * Name: The names of the selected checkboxes; + * Status: + * 0: All checkboxes are selected. + * 1: Some checkboxes are selected. + * 2: No checkboxes are selected. \n + * * @since 16 */ NODE_CHECKBOX_GROUP_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX_GROUP, -- Gitee From 640280947a9d1d160446b70bfc4fb616fe390178 Mon Sep 17 00:00:00 2001 From: cailei24 Date: Sat, 18 Jan 2025 07:44:30 +0000 Subject: [PATCH 433/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0aac=E5=B0=81=E8=A3=85?= =?UTF-8?q?=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cailei24 --- multimedia/av_codec/native_avcodec_base.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index fd4ef7373..39718b25d 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1143,6 +1143,11 @@ typedef enum OH_AVOutputFormat { * @since 12 */ AV_OUTPUT_FORMAT_WAV = 10, + /** + * The muxer output aac file format. + * @since 16 + */ + AV_OUTPUT_FORMAT_AAC = 11, } OH_AVOutputFormat; /** -- Gitee From dff111a5d1d1dcc512452c981ad48aabef7037c7 Mon Sep 17 00:00:00 2001 From: w00416770 Date: Wed, 15 Jan 2025 17:19:15 +0800 Subject: [PATCH 434/630] =?UTF-8?q?Input=5FKeyEvent=E3=80=81Input=5FMouseE?= =?UTF-8?q?vent=E3=80=81Input=5FTouchEvent=E3=80=81Input=5FAxisEvent?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=BA=94=E7=9A=84windowId=E5=92=8Cd?= =?UTF-8?q?isplayId=E5=B1=9E=E6=80=A7=E7=9A=84set=E3=80=81get=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: w00416770 --- .../kits/c/input/oh_input_manager.h | 172 ++++++++++++++++++ multimodalinput/kits/c/ohinput.ndk.json | 64 +++++++ 2 files changed, 236 insertions(+) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 0969d87e1..b86a93575 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -540,6 +540,46 @@ void OH_Input_SetKeyEventActionTime(struct Input_KeyEvent* keyEvent, int64_t act */ int64_t OH_Input_GetKeyEventActionTime(const struct Input_KeyEvent* keyEvent); +/** + * @brief Sets the windowId for a key event. + * + * @param keyEvent Key event object. + * @param windowId The windowId for a key event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +void OH_Input_SetKeyEventWindowId(struct Input_KeyEvent* keyEvent, int32_t windowId); + +/** + * @brief Obtains the windowId of a key event. + * + * @param keyEvent Key event object. + * @return windowId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +int32_t OH_Input_GetKeyEventWindowId(const struct Input_KeyEvent* keyEvent); + +/** + * @brief Sets the displayId for a key event. + * + * @param keyEvent Key event object. + * @param displayId The displayId for a key event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +void OH_Input_SetKeyEventDisplayId(struct Input_KeyEvent* keyEvent, int32_t displayId); + +/** + * @brief Obtains the displayId of a key event. + * + * @param keyEvent Key event object. + * @return displayId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +int32_t OH_Input_GetKeyEventDisplayId(const struct Input_KeyEvent* keyEvent); + /** * @brief Inject mouse event. * @@ -713,6 +753,46 @@ void OH_Input_SetMouseEventActionTime(struct Input_MouseEvent* mouseEvent, int64 */ int64_t OH_Input_GetMouseEventActionTime(const struct Input_MouseEvent* mouseEvent); +/** + * @brief Sets the windowId for a mouse event. + * + * @param mouseEvent Mouse event object. + * @param windowId The windowId for a mouse event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +void OH_Input_SetMouseEventWindowId(struct Input_MouseEvent* mouseEvent, int32_t windowId); + +/** + * @brief Obtains the windowId of a mouse event. + * + * @param mouseEvent Mouse event object. + * @return windowId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +int32_t OH_Input_GetMouseEventWindowId(const struct Input_MouseEvent* mouseEvent); + +/** + * @brief Sets the displayId for a mouse event. + * + * @param mouseEvent Mouse event object. + * @param displayId The displayId for a mouse event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +void OH_Input_SetMouseEventDisplayId(struct Input_MouseEvent* mouseEvent, int32_t displayId); + +/** + * @brief Obtains the displayId of a mouse event. + * + * @param mouseEvent Mouse event object. + * @return displayId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +int32_t OH_Input_GetMouseEventDisplayId(const struct Input_MouseEvent* mouseEvent); + /** * @brief Inject touch event. * @@ -844,6 +924,46 @@ void OH_Input_SetTouchEventActionTime(struct Input_TouchEvent* touchEvent, int64 */ int64_t OH_Input_GetTouchEventActionTime(const struct Input_TouchEvent* touchEvent); +/** + * @brief Sets the windowId for a touch event. + * + * @param touchEvent Touch event object. + * @param windowId The windowId for a touch event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +void OH_Input_SetTouchEventWindowId(struct Input_TouchEvent* touchEvent, int32_t windowId); + +/** + * @brief Obtains the windowId of a touch event. + * + * @param touchEvent Touch event object. + * @return windowId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 +*/ +int32_t OH_Input_GetTouchEventWindowId(const struct Input_TouchEvent* touchEvent); + +/** + * @brief Sets the displayId for a touch event. + * + * @param touchEvent Touch event object. + * @param displayId The displayId for a touch event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +void OH_Input_SetTouchEventDisplayId(struct Input_TouchEvent* touchEvent, int32_t displayId); + +/** + * @brief Obtains the displayId of a touch event. + * + * @param touchEvent Touch event object. + * @return displayId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 +*/ +int32_t OH_Input_GetTouchEventDisplayId(const struct Input_TouchEvent* touchEvent); + /** * @brief Cancels event injection and revokes authorization. * @@ -1061,6 +1181,58 @@ Input_Result OH_Input_SetAxisEventSourceType(Input_AxisEvent* axisEvent, InputEv */ Input_Result OH_Input_GetAxisEventSourceType(const Input_AxisEvent* axisEvent, InputEvent_SourceType* sourceType); +/** + * @brief Sets the windowId of an axis event. + * + * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. + * @param windowId The windowId for the axis event. + * @return OH_Input_SetAxisEventDisplayY function result code. + * {@link INPUT_SUCCESS} Sets the Y coordinate of the axis event success.\n + * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL.\n + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +Input_Result OH_Input_SetAxisEventWindowId(Input_AxisEvent* axisEvent, int32_t windowId); + +/** + * @brief Obtains the windowId of an axis event. + * + * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. + * @param windowId The windowId for the axis event. + * @return OH_Input_GetAxisEventDisplayY function result code. + * {@link INPUT_SUCCESS} Obtains the Y coordinate of the axis event success.\n + * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL or the displayY is NULL.\n + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +Input_Result OH_Input_GetAxisEventWindowId(const Input_AxisEvent* axisEvent, int32_t* windowId); + +/** + * @brief Sets the displayId of an axis event. + * + * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. + * @param displayId The displayId for the axis event. + * @return OH_Input_SetAxisEventDisplayY function result code. + * {@link INPUT_SUCCESS} Sets the Y coordinate of the axis event success.\n + * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL.\n + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +Input_Result OH_Input_SetAxisEventDisplayId(Input_AxisEvent* axisEvent, int32_t displayId); + +/** + * @brief Obtains the displayId of an axis event. + * + * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. + * @param displayId The displayId for the axis event. + * @return OH_Input_GetAxisEventDisplayY function result code. + * {@link INPUT_SUCCESS} Obtains the Y coordinate of the axis event success.\n + * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL or the displayY is NULL.\n + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 15 + */ +Input_Result OH_Input_GetAxisEventDisplayId(const Input_AxisEvent* axisEvent, int32_t* displayId); + /** * @brief Adds a listener of key events. * diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index 35791ebb5..56c0b8439 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -430,5 +430,69 @@ { "first_introduced": "13", "name": "OH_Input_UnregisterDeviceListeners" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetKeyEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetKeyEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetKeyEventDisplayId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetKeyEventDisplayId" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetMouseEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetMouseEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetMouseEventDisplayId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetMouseEventDisplayId" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetTouchEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetTouchEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetTouchEventDisplayId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetTouchEventDisplayId" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetAxisEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetAxisEventWindowId" + }, + { + "first_introduced": "15", + "name": "OH_Input_SetAxisEventDisplayId" + }, + { + "first_introduced": "15", + "name": "OH_Input_GetAxisEventDisplayId" } ] \ No newline at end of file -- Gitee From ae00284b0b7c026913e8e5baf0c2811edd1b8cce Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Mon, 6 Jan 2025 21:07:21 +0800 Subject: [PATCH 435/630] add ces_5.1_ndk Signed-off-by: sunjiakun --- .../commonevent/libcommonevent.ndk.json | 120 +++++ BasicServicesKit/commonevent/oh_commonevent.h | 435 ++++++++++++++++-- 2 files changed, 521 insertions(+), 34 deletions(-) diff --git a/BasicServicesKit/commonevent/libcommonevent.ndk.json b/BasicServicesKit/commonevent/libcommonevent.ndk.json index 40ddccdfe..a7762832a 100644 --- a/BasicServicesKit/commonevent/libcommonevent.ndk.json +++ b/BasicServicesKit/commonevent/libcommonevent.ndk.json @@ -94,5 +94,125 @@ { "first_introduced": "12", "name":"OH_CommonEvent_GetDoubleArrayFromParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_CreatePublishInfo" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_DestroyPublishInfo" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetPublishInfoBundleName" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetPublishInfoPermissions" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetPublishInfoCode" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetPublishInfoData" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetPublishInfoParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_CreateParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_DestroyParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetIntToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetIntArrayToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetLongToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetLongArrayToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetBoolToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetBoolArrayToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetCharToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetCharArrayToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetDoubleToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetDoubleArrayToParameters" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_Publish" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_PublishWithInfo" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_IsOrderedCommonEvent" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_FinishCommonEvent" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_GetAbortCommonEvent" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_AbortCommonEvent" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_ClearAbortCommonEvent" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_GetCodeFromSubscriber" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetCodeToSubscriber" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_GetDataFromSubscriber" + }, + { + "first_introduced": "16", + "name":"OH_CommonEvent_SetDataToSubscriber" } ] diff --git a/BasicServicesKit/commonevent/oh_commonevent.h b/BasicServicesKit/commonevent/oh_commonevent.h index bfe5c1235..c2491b51f 100644 --- a/BasicServicesKit/commonevent/oh_commonevent.h +++ b/BasicServicesKit/commonevent/oh_commonevent.h @@ -58,12 +58,18 @@ typedef enum CommonEvent_ErrCode { /** @error invalid input parameter. */ COMMONEVENT_ERR_INVALID_PARAMETER = 401, + /** @error the application cannot send system common events. */ + COMMONEVENT_ERR_NOT_SYSTEM_SERVICE = 1500004, + /** @error IPC request failed to send. */ COMMONEVENT_ERR_SENDING_REQUEST_FAILED = 1500007, /** @error Common event service not init. */ COMMONEVENT_ERR_INIT_UNDONE = 1500008, + /** @error Failed to obtain system parameters. */ + COMMONEVENT_ERR_OBTAIN_SYSTEM_PARAMS = 1500009, + /** @error The subscriber number exceed system specification */ COMMONEVENT_ERR_SUBSCRIBER_NUM_EXCEEDED = 1500010, @@ -85,6 +91,13 @@ typedef struct CommonEvent_SubscribeInfo CommonEvent_SubscribeInfo; */ typedef void CommonEvent_Subscriber; +/** + * @brief the common event publish information containing content and attributes of the common event + * + * @since 16 + */ +typedef struct CommonEvent_PublishInfo CommonEvent_PublishInfo; + /** * @brief the data of the commonEvent callback * @@ -118,10 +131,10 @@ typedef void (*CommonEvent_ReceiveCallback)(const CommonEvent_RcvData *data); CommonEvent_SubscribeInfo* OH_CommonEvent_CreateSubscribeInfo(const char* events[], int32_t eventsNum); /** - * @brief Set the subscribe information of permission. + * @brief Set the permission of the subscribe information. * - * @param info Indicates the subscribed events. - * @param permission Indicates the subscribed events of permission. + * @param info Indicates the subscribe information. + * @param permission Indicates the permission. * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. @@ -130,10 +143,10 @@ CommonEvent_SubscribeInfo* OH_CommonEvent_CreateSubscribeInfo(const char* events CommonEvent_ErrCode OH_CommonEvent_SetPublisherPermission(CommonEvent_SubscribeInfo* info, const char* permission); /** - * @brief Set the subscribe information of bundleName. + * @brief Set the bundleName of the subscribe information. * * @param info Indicates the subscribed events. - * @param bundleName Indicates the subscribed events of bundleName. + * @param bundleName Indicates the bundleName. * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. @@ -199,7 +212,7 @@ CommonEvent_ErrCode OH_CommonEvent_UnSubscribe(const CommonEvent_Subscriber* sub /** * @brief Get event name from callback data. * - * @param rcvData Indicates the event of callback data. + * @param rcvData Indicates the callback data. * @return Returns the event name. * @since 12 */ @@ -208,7 +221,7 @@ const char* OH_CommonEvent_GetEventFromRcvData(const CommonEvent_RcvData* rcvDat /** * @brief Get event result code from callback data. * - * @param rcvData Indicates the event of callback data. + * @param rcvData Indicates the callback data. * @return Returns the event of result code, default is 0. * @since 12 */ @@ -217,7 +230,7 @@ int32_t OH_CommonEvent_GetCodeFromRcvData(const CommonEvent_RcvData* rcvData); /** * @brief Get event result data from callback data. * - * @param rcvData Indicates the event of callback data. + * @param rcvData Indicates the callback data. * @return Returns the event of result data, default is null. * @since 12 */ @@ -226,7 +239,7 @@ const char* OH_CommonEvent_GetDataStrFromRcvData(const CommonEvent_RcvData* rcvD /** * @brief Get event bundlename from callback data. * - * @param rcvData Indicates the event of callback data. + * @param rcvData Indicates the callback data. * @return Returns the event of bundlename, default is null. * @since 12 */ @@ -235,17 +248,115 @@ const char* OH_CommonEvent_GetBundleNameFromRcvData(const CommonEvent_RcvData* r /** * @brief Get event parameters data from callback data. * - * @param rcvData Indicates the event of callback data. - * @return Returns the event of parameters data, default is null. + * @param rcvData Indicates the callback data. + * @return Returns the event parameters data, default is null. * @since 12 */ const CommonEvent_Parameters* OH_CommonEvent_GetParametersFromRcvData(const CommonEvent_RcvData* rcvData); /** - * @brief Check whether the parameters contains a key. + * @brief Create a common event publish information. + * + * @param ordered Indicates whether the common event is ordered. + * @return Returns the CommonEvent_PublishInfo, if create failed, returns null. + * @since 16 + */ +CommonEvent_PublishInfo* OH_CommonEvent_CreatePublishInfo(bool ordered); + +/** + * @brief Destroy the common event publish information. + * + * @param info Indicates the publish information. + * @since 16 + */ +void OH_CommonEvent_DestroyPublishInfo(CommonEvent_PublishInfo* info); + +/** + * @brief Set the bundleName of publish information. + * + * @param info Indicates the publish information. + * @param bundleName Indicates the bundleName. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoBundleName(CommonEvent_PublishInfo* info, const char* bundleName); + +/** + * @brief Set the permissions of publish information. + * + * @param info Indicates the publish information. + * @param permissions Indicates the array of permissions. + * @param num Indicates the count of permissions. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoPermissions(CommonEvent_PublishInfo* info, + const char* permissions[], int32_t num); + +/** + * @brief Set the code of publish information. + * + * @param info Indicates the publish information. + * @param code Indicates the code. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoCode(CommonEvent_PublishInfo* info, int32_t code); + +/** + * @brief Set the data of publish information. * - * @param para Indicates the event of callback data. - * @param key Indicates the key of parameter. + * @param info Indicates the publish information. + * @param data Indicates the data. + * @param length Indicates the length of data. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoData(CommonEvent_PublishInfo* info, + const char* data, size_t length); + +/** + * @brief Set the parameters of publish information. + * + * @param info Indicates the publish information. + * @param param Indicates the parameters. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoParameters(CommonEvent_PublishInfo* info, + CommonEvent_Parameters* param); + +/** + * @brief Create a common event publish information. + * + * @return Returns the CommonEvent_PublishInfo, if create failed, returns null. + * @since 16 + */ +CommonEvent_Parameters* OH_CommonEvent_CreateParameters(); + +/** + * @brief Destroy the common event publish information. + * + * @param param Indicates the publish information. + * @since 16 + */ +void OH_CommonEvent_DestroyParameters(CommonEvent_Parameters* param); + +/** + * @brief Check whether the parameters data contains a key. + * + * @param para Indicates the parameters data. + * @param key Indicates the key. * @return Returns the result of check, true means it contains. * @since 12 */ @@ -254,96 +365,211 @@ bool OH_CommonEvent_HasKeyInParameters(const CommonEvent_Parameters* para, const /** * @brief Get int data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param defaultValue Indicates default return value. * @return Returns the int data of the key in the parameters. * @since 12 */ int OH_CommonEvent_GetIntFromParameters(const CommonEvent_Parameters* para, const char* key, const int defaultValue); +/** + * @brief Set int data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the int data. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetIntToParameters(CommonEvent_Parameters* param, const char* key, int value); + /** * @brief Get int array data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param array Indicates the int array. * @return Returns the length of the array. * @since 12 */ int32_t OH_CommonEvent_GetIntArrayFromParameters(const CommonEvent_Parameters* para, const char* key, int** array); +/** + * @brief Set int array data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the int array data. + * @param num Indicates the length of the array. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetIntArrayToParameters(CommonEvent_Parameters* param, const char* key, + const int* value, size_t num); + /** * @brief Get long data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param defaultValue Indicates default return value. * @return Returns the long data of the key in the parameters. * @since 12 */ long OH_CommonEvent_GetLongFromParameters(const CommonEvent_Parameters* para, const char* key, const long defaultValue); +/** + * @brief Set long data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the long data. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetLongToParameters(CommonEvent_Parameters* param, const char* key, long value); + /** * @brief Get long array data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param array Indicates the long array. * @return Returns the length of the array. * @since 12 */ int32_t OH_CommonEvent_GetLongArrayFromParameters(const CommonEvent_Parameters* para, const char* key, long** array); +/** + * @brief Set long array data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the long array data. + * @param num Indicates the length of the array. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetLongArrayToParameters(CommonEvent_Parameters* param, const char* key, + const long* value, size_t num); + /** * @brief Get bool data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param defaultValue Indicates default return value. * @return Returns the bool data of the key in the parameters. * @since 12 */ bool OH_CommonEvent_GetBoolFromParameters(const CommonEvent_Parameters* para, const char* key, const bool defaultValue); +/** + * @brief Set bool data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the bool data. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetBoolToParameters(CommonEvent_Parameters* param, const char* key, bool value); + /** * @brief Get bool array data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param array Indicates the bool array. * @return Returns the length of the array. * @since 12 */ int32_t OH_CommonEvent_GetBoolArrayFromParameters(const CommonEvent_Parameters* para, const char* key, bool** array); +/** + * @brief Set bool array data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the bool array data. + * @param num Indicates the length of the array. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetBoolArrayToParameters(CommonEvent_Parameters* param, const char* key, + const bool* value, size_t num); + /** * @brief Get char data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param defaultValue Indicates default return value. * @return Returns the char data of the key in the parameters. * @since 12 */ char OH_CommonEvent_GetCharFromParameters(const CommonEvent_Parameters* para, const char* key, const char defaultValue); +/** + * @brief Set char data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the char data. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetCharToParameters(CommonEvent_Parameters* param, const char* key, char value); + /** * @brief Get char array data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param array Indicates the char array. * @return Returns the length of the array. * @since 12 */ int32_t OH_CommonEvent_GetCharArrayFromParameters(const CommonEvent_Parameters* para, const char* key, char** array); +/** + * @brief Set char array data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the char array data. + * @param num Indicates the length of the array. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetCharArrayToParameters(CommonEvent_Parameters* param, const char* key, + const char* value, size_t num); + /** * @brief Get double data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param defaultValue Indicates default return value. * @return Returns the double data of the key in the parameters. * @since 12 @@ -351,11 +577,25 @@ int32_t OH_CommonEvent_GetCharArrayFromParameters(const CommonEvent_Parameters* double OH_CommonEvent_GetDoubleFromParameters(const CommonEvent_Parameters* para, const char* key, const double defaultValue); +/** + * @brief Set double data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the double data. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetDoubleToParameters(CommonEvent_Parameters* param, const char* key, + double value); + /** * @brief Get double array data from parameters data by key. * - * @param para Indicates the event of parameters data. - * @param key Indicates the key of parameters data. + * @param para Indicates the parameters data. + * @param key Indicates the key. * @param array Indicates the double array. * @return Returns the length of the array, default is 0. * @since 12 @@ -363,6 +603,133 @@ double OH_CommonEvent_GetDoubleFromParameters(const CommonEvent_Parameters* para int32_t OH_CommonEvent_GetDoubleArrayFromParameters(const CommonEvent_Parameters* para, const char* key, double** array); +/** + * @brief Set double array data to parameters data by key. + * + * @param param Indicates the parameters data. + * @param key Indicates the key. + * @param value Indicates the double array data. + * @param num Indicates the length of the array. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_SetDoubleArrayToParameters(CommonEvent_Parameters* param, const char* key, + const double* value, size_t num); + +/** + * @brief Publish a standard commen event. + * + * @param event Indicates the name of the common event. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * Returns {@link COMMONEVENT_ERR_FAIL_SEND_REQUEST } if IPC request failed to send. + * Returns {@link COMMONEVENT_ERR_INIT_UNDONE } if ces not init done. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_Publish(const char* event); + +/** + * @brief Publish a commen event with specified publish information. + * + * @param event Indicates the name of the common event. + * @param info Indicates the publish information. + * @return Returns the error code. + * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. + * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. + * Returns {@link COMMONEVENT_ERR_FAIL_SEND_REQUEST } if IPC request failed to send. + * Returns {@link COMMONEVENT_ERR_INIT_UNDONE } if ces not init done. + * @since 16 + */ +CommonEvent_ErrCode OH_CommonEvent_PublishWithInfo(const char* event, const CommonEvent_PublishInfo* info); + +/** + * @brief Check an event by a subscriber whether it is ordered. + * + * @param subscriber Indicates the subscriber. + * @return Returns the result of check, true means ordered. + * @since 16 + */ +bool OH_CommonEvent_IsOrderedCommonEvent(const CommonEvent_Subscriber* subscriber); + +/** + * @brief Finish an ordered event by a subscriber. + * + * @param subscriber Indicates the subscriber. + * @return Returns the result of operation, true means succeeded. + * @since 16 + */ +bool OH_CommonEvent_FinishCommonEvent(CommonEvent_Subscriber* subscriber); + +/** + * @brief Check an event by a subscriber whether it is aborted. + * + * @param subscriber Indicates the subscriber. + * @return Returns the result of check, true means aborted. + * @since 16 + */ +bool OH_CommonEvent_GetAbortCommonEvent(const CommonEvent_Subscriber* subscriber); + +/** + * @brief Abort an ordered event by a subscriber. + * + * @param subscriber Indicates the subscriber. + * @return Returns the result of operation, true means succeeded. + * @since 16 + */ +bool OH_CommonEvent_AbortCommonEvent(CommonEvent_Subscriber* subscriber); + +/** + * @brief Clear the aborted flag of an ordered event by a subscriber. + * + * @param subscriber Indicates the subscriber. + * @return Returns the result of operation, true means succeeded. + * @since 16 + */ +bool OH_CommonEvent_ClearAbortCommonEvent(CommonEvent_Subscriber* subscriber); + +/** + * @brief Get result code from an ordered event by a subscriber. + * + * @param subscriber Indicates the subscriber. + * @return Returns the result code, default is 0. + * @since 16 + */ +int32_t OH_CommonEvent_GetCodeFromSubscriber(const CommonEvent_Subscriber* subscriber); + +/** + * @brief Set result code to an ordered event by a subscriber. + * + * @param subscriber Indicates the subscriber. + * @param code Indicates the result code. + * @return Returns the result of operation, true means succeeded. + * @since 16 + */ +bool OH_CommonEvent_SetCodeToSubscriber(CommonEvent_Subscriber* subscriber, int32_t code); + +/** + * @brief Get result data from an ordered event by a subscriber. + * + * @param subscriber Indicates the subscriber. + * @return Returns the result data, default is null. + * @since 16 + */ +const char* OH_CommonEvent_GetDataFromSubscriber(const CommonEvent_Subscriber* subscriber); + +/** + * @brief Set result data to an ordered event by a subscriber. + * + * @param subscriber Indicates the subscriber. + * @param data Indicates the result data. + * @param length Indicates the length of result data. + * @return Returns the result of operation, true means succeeded. + * @since 16 + */ +bool OH_CommonEvent_SetDataToSubscriber(CommonEvent_Subscriber* subscriber, const char* data, size_t length); + #ifdef __cplusplus } #endif -- Gitee From 69c19a33e54f5d467fbbd4c99656ec74a03d3f1a Mon Sep 17 00:00:00 2001 From: pengzhiwen Date: Sat, 18 Jan 2025 15:45:07 +0800 Subject: [PATCH 436/630] =?UTF-8?q?=E6=94=AF=E6=8C=81xcomponent=E5=A4=9A?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: pengzhiwen Change-Id: I08c7fc37a507a50ea416c9e4463cfb62e256441a --- arkui/ace_engine/native/libace.ndk.json | 4 + .../native/native_interface_accessibility.h | 98 +++++++++++++++++++ 2 files changed, 102 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 2543c34aa..7e2d642a4 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2547,6 +2547,10 @@ "first_introduced": "15", "name": "OH_ArkUI_FocusAxisEvent_SetStopPropagation" }, + { + "first_introduced": "15", + "name": "OH_ArkUI_AccessibilityProviderRegisterCallbackWithInstance" + }, { "first_introduced": "16", "name": "OH_ArkUI_KeyEvent_Dispatch" diff --git a/arkui/ace_engine/native/native_interface_accessibility.h b/arkui/ace_engine/native/native_interface_accessibility.h index d765c7d77..cbe48c58e 100644 --- a/arkui/ace_engine/native/native_interface_accessibility.h +++ b/arkui/ace_engine/native/native_interface_accessibility.h @@ -406,6 +406,104 @@ typedef struct ArkUI_AccessibilityProviderCallbacks { int32_t OH_ArkUI_AccessibilityProviderRegisterCallback( ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityProviderCallbacks* callbacks); +/** + * @brief Registers callbacks with instance for the accessibility provider. + * @since 15 + */ +typedef struct ArkUI_AccessibilityProviderCallbacksWithInstance { + /** + * @brief Called to obtain element information based on a specified node. + * @param instanceId Indicates ID of third-party framework instance. + * @param elementId The unique id of the component ID. + * @param mode Indicates accessibility search mode. + * @param requestId Matched the request and response. transfer it by callback only. + * @param elementList The all obtained accessibility elements list information. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + */ + int32_t (*findAccessibilityNodeInfosById)(const char* instanceId, int64_t elementId, + ArkUI_AccessibilitySearchMode mode, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList); + /** + * @brief Called to obtain element information based on a specified node and text content. + * @param instanceId Indicates ID of third-party framework instance. + * @param elementId The unique id of the component ID. + * @param text Filter for the child components to matched with the text. + * @param requestId Matched the request and response. transfer it by callback only. + * @param elementList The all obtained accessibility elements list information. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + */ + int32_t (*findAccessibilityNodeInfosByText)(const char* instanceId, int64_t elementId, const char* text, + int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList); + /** + * @brief Called to obtain focused element information based on a specified node. + * @param instanceId Indicates ID of third-party framework instance. + * @param elementId The unique id of the component ID. + * @param focusType Indicates focus type. + * @param requestId Matched the request and response. transfer it by callback only. + * @param elementInfo The all obtained accessibility elements list information. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + */ + int32_t (*findFocusedAccessibilityNode)(const char* instanceId, int64_t elementId, + ArkUI_AccessibilityFocusType focusType, int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo); + /** + * @brief Called to find the next focusable node based on the reference node. + * @param instanceId Indicates ID of third-party framework instance. + * @param elementId The unique id of the component ID. + * @param direction Indicates direction. + * @param requestId Matched the request and response. transfer it by callback only. + * @param elementInfo The all obtained accessibility elements list information. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + */ + int32_t (*findNextFocusAccessibilityNode)( + const char* instanceId, int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction, + int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo); + /** + * @brief Called to execute a specified action on a specified node. + * @param instanceId Indicates ID of third-party framework instance. + * @param elementId The unique id of the component ID. + * @param action Indicates action. + * @param actionArguments Indicates action arguments. + * @param requestId Matched the request and response. transfer it by callback only. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + */ + int32_t (*executeAccessibilityAction)(const char* instanceId, int64_t elementId, + ArkUI_Accessibility_ActionType action, ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId); + /** + * @brief Called to clear the focus state of the current focused node. + * @param instanceId Indicates ID of third-party framework instance. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED} if the operation is failed. + */ + int32_t (*clearFocusedFocusAccessibilityNode)(const char* instanceId); + /** + * @brief Called to query the current cursor position of the specified node. + * @param instanceId Indicates ID of third-party framework instance. + * @param elementId The unique id of the component ID. + * @param requestId Matched the request and response. transfer it by callback only. + * @param index Indicates index. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + */ + int32_t (*getAccessibilityNodeCursorPosition)(const char* instanceId, int64_t elementId, + int32_t requestId, int32_t* index); +} ArkUI_AccessibilityProviderCallbacksWithInstance; + +/** + * @brief Registers a callback with instance for this ArkUI_AccessibilityProvider instance. + * @param instanceId Indicates ID of third-party framework instance. + * @param provider Indicates the pointer to the ArkUI_AccessibilityProvider instance. + * @param callbacks Indicates the pointer to the ArkUI_AccessibilityProviderCallbacksWithInstance callback. + * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. + * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. + * @since 15 + */ +int32_t OH_ArkUI_AccessibilityProviderRegisterCallbackWithInstance(const char* instanceId, + ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityProviderCallbacksWithInstance* callbacks); + /** * @brief Sends accessibility event information. * -- Gitee From 79e7597e91729cca9d7103fe6a4c120f8cb25b8b Mon Sep 17 00:00:00 2001 From: caochuan Date: Mon, 20 Jan 2025 13:52:59 +0800 Subject: [PATCH 437/630] Add DMA ndk api. Signed-off-by: caochuan --- .../include/image/image_common.h | 25 +++++++++ .../include/image/image_source_native.h | 51 ++++++++++++++++++- .../image_framework/libimage_source.ndk.json | 4 ++ 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 1626ecbee..4f7a74b19 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -183,8 +183,33 @@ typedef enum { IMAGE_UNKNOWN_ERROR = 7600901, /** decode data source exception */ IMAGE_BAD_SOURCE = 7700101, + /** + * @error unsupported mime type + * @since 16 + */ + IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE = 7700102, + /** + * @error image to large + * @since 16 + */ + IMAGE_SOURCE_TOO_LARGE = 7700103, + /** + * @error unsupported allocator type, e.g., use share memory to decode a HDR image as only + * DMA supported hdr metadata. + * @since 16 + */ + IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE = 7700201, + /* @error unsupported options, e.g, cannot convert image into desired pixel format. + * @since 16 + */ + IMAGE_SOURCE_UNSUPPORTED_OPTIONS = 7700203, /** decode failed */ IMAGE_DECODE_FAILED = 7700301, + /** + * @error memory allocation failed + * @since 16 + */ + IMAGE_SOURCE_ALLOC_FAILED = 7700302, /** encode failed */ IMAGE_ENCODE_FAILED = 7800301, } Image_ErrorCode; diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index b48056ff5..956d87490 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -14,7 +14,7 @@ */ /** - * @addtogroup image + * @addtogroup ImageSourceNative * @{ * * @brief Provides APIs for access to the image interface. @@ -98,6 +98,26 @@ typedef enum { IMAGE_DYNAMIC_RANGE_HDR = 2, } IMAGE_DYNAMIC_RANGE; +/** + * @brief Type of allocator used to allocate memory of a PixelMap.. + * + * @since 16 + */ +typedef enum { + /* + * The system determines which memory to use to create the PixelMap. + */ + IMAGE_ALLOCATOR_TYPE_AUTO = 0, + /* + * Use DMA buffer to create the PixelMap. + */ + IMAGE_ALLOCATOR_TYPE_DMA = 1, + /* + * Use share memory to create the PixelMap. + */ + IMAGE_ALLOCATOR_TYPE_SHARE_MEMORY = 2, +} IMAGE_ALLOCATOR_TYPE; + /** * @brief Create a pointer for OH_ImageSource_Info struct. * @@ -360,6 +380,35 @@ Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFil Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source, OH_DecodingOptions *options, OH_PixelmapNative **pixelmap); +/** + * @brief Creates a PixelMap based on decoding parameters {@link OH_DecodingOptions}, the memory type used by the + * PixelMap can be specified by allocatorType {@link IMAGE_ALLOCATOR_TYPE}. By default, the system selects the memory + * type based on the image type, image size, platform capability, etc. When processing the PixelMap returned by this + * interface, please always consider the impact of stride. + * + * @param source Image Source. + * @param options Decoding parameters, such as the size, pixel format, and color space of the pixelMap. + * For details, see {@link OH_DecodingOptions}. + * @param allocator Indicate which memory type will be used by the returned PixelMap. + * @param pixelmap Decoded Pixelmap object. + * @return Error code. + * {@link IMAGE_SUCCESS} if the execution is successful. + * {@link IMAGE_BAD_PARAMETER} source is nullptr, or picture is nullptr. + * {@link IMAGE_BAD_SOURCE} data source exception. + * {@link IMAGE_SOURCE_UNSUPPORTED_MIMETYPE} unsupported mime type. + * {@link IMAGE_SOURCE_TOO_LARGE} image to large. + * {@link IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE} unsupported allocator type, + * e.g., use share memory to decode a HDR image as only DMA supported hdr metadata. + * {@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS} unsupported options, + * e.g, cannot convert image into desired pixel format. + * {@link IMAGE_DECODE_FAILED} decode failed. + * {@link IMAGE_SOURCE_ALLOC_FAILED} memory allocation failed. + * @since 16 + */ +Image_ErrorCode OH_ImageSourceNative_CreatePixelmapUsingAllocator(OH_ImageSourceNative *source, + OH_DecodingOptions *options, IMAGE_ALLOCATOR_TYPE allocator, OH_PixelmapNative **pixelmap); + + /** * @brief Decodes an void pointer * the Pixelmap objects at the C++ native layer diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json index 37312763e..fd5d4e30a 100644 --- a/multimedia/image_framework/libimage_source.ndk.json +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -95,6 +95,10 @@ "first_introduced": "12", "name": "OH_ImageSourceNative_CreatePixelmap" }, + { + "first_introduced": "16", + "name": "OH_ImageSourceNative_CreatePixelmapUsingAllocator" + }, { "first_introduced": "12", "name": "OH_ImageSourceNative_CreatePixelmapList" -- Gitee From f8165fc87ade4918c841fb4ed8a6adf0471e844e Mon Sep 17 00:00:00 2001 From: zhanghang Date: Mon, 20 Jan 2025 16:59:43 +0800 Subject: [PATCH 438/630] Feat: Add NODE_SCROLL_BACK_TO_TOP for scrollable component Signed-off-by: zhanghang Change-Id: If9e8f850e0e32a9eb0f4d52d761cb06e2cb666f6 --- arkui/ace_engine/native/native_node.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 80e0c1e99..413b28330 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5035,6 +5035,21 @@ typedef enum { */ NODE_SCROLL_CONTENT_END_OFFSET, + /** + * @brief Defines whether the scrollable scrolls back to top when status bar is clicked. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n + * .value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. + * The value 1 means to scroll back to top, and 0 means the opposite. The default value is 0/b>. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}: \n + * .value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. \n + * + * @since 16 + */ + NODE_SCROLL_BACK_TO_TOP = 1002021, + /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and * obtained as required through APIs. -- Gitee From f67b8a9d77704e953bb32789da312eade9bf3b6e Mon Sep 17 00:00:00 2001 From: Tianer Zhou Date: Sat, 28 Dec 2024 10:55:42 +0800 Subject: [PATCH 439/630] add interface Signed-off-by: Tianer Zhou Change-Id: I449f817ebcf94543b8b2514abddc6e394f5b12df --- arkui/ace_engine/native/native_node.h | 41 +++++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 26 +++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 413b28330..153b81c3f 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5050,6 +5050,34 @@ typedef enum { */ NODE_SCROLL_BACK_TO_TOP = 1002021, + /** + * @brief Defines the maximum starting fling speed of the scrollable when the fling animation starts. + * This attribute 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: maximum starting fling speed, Unit: vp/s \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}: \n + * .value[0].f32: maximum starting fling speed, Unit: vp/s \n + * + * @since 16 + */ + NODE_SCROLL_FLING_SPEED_LIMIT, + + /** + * @brief Defines the clip mode of the scrollable. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n + * .value[0].i32: clip content mode, The parameter type is {@link ArkUI_ContentClipMode}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}: \n + * .value[0].i32: clip content mode, The parameter type is {@link ArkUI_ContentClipMode}. \n + * + * @since 16 + */ + NODE_SCROLL_CLIP_CONTENT, + /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and * obtained as required through APIs. @@ -5945,6 +5973,19 @@ typedef enum { */ NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE, + /** + * @brief Defines the layout mode of the component. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: waterflow layout mode. The parameter type is {@Link ArkUI_WaterFlowLayoutMode}. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: waterflow layout mode. The parameter type is {@Link ArkUI_WaterFlowLayoutMode}. + * @since 16 + */ + NODE_WATER_FLOW_LAYOUT_MODE, + /** * @brief Set the auxiliary line in the RelativeContaine container, supporting property setting, * property reset and property acquisition interfaces. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 8faaf9dc5..a1f653901 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -705,6 +705,32 @@ typedef enum { ARKUI_STICKY_STYLE_BOTH = 3, } ArkUI_StickyStyle; +/** + * @brief Enumerates the content clipping modes of scrollable components. + * + * @since 16 + */ +typedef enum { + /** clip by content */ + ARKUI_CONTENT_CLIP_MODE_CONTENT_ONLY = 0, + /** clip by boundary */ + ARKUI_CONTENT_CLIP_MODE_BOUNDARY, + /** clip by safe area padding */ + ARKUI_CONTENT_CLIP_MODE_SAFE_AREA, +} ArkUI_ContentClipMode; + +/** + * @brief Enumerates the layout modes of the WaterFlow component. + * + * @since 16 + */ +typedef enum { + /** Layout items from top to viewport. */ + ARKUI_WATER_FLOW_LAYOUT_MODE_ALWAYS_TOP_DOWN = 0, + /** Layout items in viewport. */ + ARKUI_WATER_FLOW_LAYOUT_MODE_SLIDING_WINDOW, +} ArkUI_WaterFlowLayoutMode; + /** * @brief Enumerates the border styles. * -- Gitee From b4b171c7c41e06890b7f8d59ee7d5a9090e9655c Mon Sep 17 00:00:00 2001 From: Tianer Zhou Date: Fri, 17 Jan 2025 14:31:40 +0800 Subject: [PATCH 440/630] fix enum Change-Id: If95d25b55bb80b4df99d5d899112f92ef95c3887 Signed-off-by: Tianer Zhou --- arkui/ace_engine/native/native_node.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 153b81c3f..1090ff8ef 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5062,7 +5062,7 @@ typedef enum { * * @since 16 */ - NODE_SCROLL_FLING_SPEED_LIMIT, + NODE_SCROLL_FLING_SPEED_LIMIT = 1002019, /** * @brief Defines the clip mode of the scrollable. @@ -5076,7 +5076,7 @@ typedef enum { * * @since 16 */ - NODE_SCROLL_CLIP_CONTENT, + NODE_SCROLL_CLIP_CONTENT = 1002020, /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and -- Gitee From 34328b82d38cdb5ff600a6d6db0cd1178678568a Mon Sep 17 00:00:00 2001 From: Tianer Zhou Date: Tue, 21 Jan 2025 10:03:52 +0800 Subject: [PATCH 441/630] merge conflict Change-Id: I15f12eb72a9ffe15f036876442302cdf4d062b3a Signed-off-by: Tianer Zhou --- arkui/ace_engine/native/native_node.h | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 1090ff8ef..0f218946a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5036,47 +5036,47 @@ typedef enum { NODE_SCROLL_CONTENT_END_OFFSET, /** - * @brief Defines whether the scrollable scrolls back to top when status bar is clicked. + * @brief Defines the maximum starting fling speed of the scrollable when the fling animation starts. * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n - * .value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. - * The value 1 means to scroll back to top, and 0 means the opposite. The default value is 0/b>. \n + * .value[0].f32: maximum starting fling speed, Unit: vp/s \n * \n * Format of the return value {@link ArkUI_AttributeItem}: \n - * .value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. \n + * .value[0].f32: maximum starting fling speed, Unit: vp/s \n * * @since 16 */ - NODE_SCROLL_BACK_TO_TOP = 1002021, - + NODE_SCROLL_FLING_SPEED_LIMIT = 1002019, + /** - * @brief Defines the maximum starting fling speed of the scrollable when the fling animation starts. + * @brief Defines the clip mode of the scrollable. * This attribute 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: maximum starting fling speed, Unit: vp/s \n + * .value[0].i32: clip content mode, The parameter type is {@link ArkUI_ContentClipMode}. \n * \n * Format of the return value {@link ArkUI_AttributeItem}: \n - * .value[0].f32: maximum starting fling speed, Unit: vp/s \n + * .value[0].i32: clip content mode, The parameter type is {@link ArkUI_ContentClipMode}. \n * * @since 16 */ - NODE_SCROLL_FLING_SPEED_LIMIT = 1002019, + NODE_SCROLL_CLIP_CONTENT = 1002020, /** - * @brief Defines the clip mode of the scrollable. + * @brief Defines whether the scrollable scrolls back to top when status bar is clicked. * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n - * .value[0].i32: clip content mode, The parameter type is {@link ArkUI_ContentClipMode}. \n + * .value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. + * The value 1 means to scroll back to top, and 0 means the opposite. The default value is 0/b>. \n * \n * Format of the return value {@link ArkUI_AttributeItem}: \n - * .value[0].i32: clip content mode, The parameter type is {@link ArkUI_ContentClipMode}. \n + * .value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. \n * * @since 16 */ - NODE_SCROLL_CLIP_CONTENT = 1002020, + NODE_SCROLL_BACK_TO_TOP = 1002021, /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and -- Gitee From 6bc14d694363b7a57ce29531f41ebd75f3fad45d Mon Sep 17 00:00:00 2001 From: huqingyun Date: Sat, 18 Jan 2025 20:09:15 +0800 Subject: [PATCH 442/630] =?UTF-8?q?CAPI=EF=BC=9A=E6=94=AF=E6=8C=81backgrou?= =?UTF-8?q?ndImageResizable=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AEslice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huqingyun Change-Id: I9f86880cbf6e8e5f4b05d6fa88bee1a189eed8aa --- arkui/ace_engine/native/native_node.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index afa9efaff..1ea35e516 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1868,7 +1868,27 @@ typedef enum { * @since 16 */ NODE_BACKDROP_BLUR = 99, - + + /** + * @brief Defines the background image resizable 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: width of the left edge. The unit is vp. \n + * .value[1].f32: width of the top edge. The unit is vp. \n + * .value[2].f32: width of the right edge. The unit is vp. \n + * .value[3].f32: width of the bottom edge. The unit is vp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: width of the left edge. The unit is vp. \n + * .value[1].f32: width of the top edge. The unit is vp. \n + * .value[2].f32: width of the right edge. The unit is vp. \n + * .value[3].f32: width of the bottom edge. The unit is vp. \n + * + * @since 16 + */ + NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * -- Gitee From 8e12ee5bd5e2a2f25ecfdf9fa5cef1bf50354362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=B8=B0?= Date: Tue, 21 Jan 2025 07:52:55 +0000 Subject: [PATCH 443/630] update drivers/external_device_manager/usb/usb_ddk_api.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘丰 --- drivers/external_device_manager/usb/usb_ddk_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index db91ea97a..9bd18e9e2 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -76,7 +76,7 @@ void OH_Usb_Release(void); * @permission ohos.permission.ACCESS_DDK_USB * @return {@link USB_DDK_SUCCESS} the operation is successful. * {@link USB_DDK_NO_PERM} permission check failed. - * @since 15 + * @since 16 * @version 1.0 */ int32_t OH_Usb_ReleaseResource(void); -- Gitee From 25c9f776896c7d6e2aa99c048b8cb5e3193a6868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=B8=B0?= Date: Tue, 21 Jan 2025 07:55:54 +0000 Subject: [PATCH 444/630] update drivers/external_device_manager/usb/usb_ddk_types.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘丰 --- drivers/external_device_manager/usb/usb_ddk_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 4491f7928..8b612becf 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -299,7 +299,7 @@ typedef enum { /** @error The operation is successful. */ USB_DDK_SUCCESS = 0, /** @error The operation failed. - * @deprecate since 15 + * @deprecate since 16 */ USB_DDK_FAILED = -1, /** @error Permission denied. */ @@ -311,11 +311,11 @@ typedef enum { */ USB_DDK_MEMORY_ERROR = 27400001, /** @error Null pointer exception - * @deprecate since 15 + * @deprecate since 16 */ USB_DDK_NULL_PTR = -5, /** @error Device busy. - * @deprecate since 15 + * @deprecate since 16 */ USB_DDK_DEVICE_BUSY = -6, /** @error Invalid operation. */ -- Gitee From d662aecc07779dc8a29147408b19d2bd6bd164bf Mon Sep 17 00:00:00 2001 From: zhanghang Date: Tue, 21 Jan 2025 16:41:01 +0800 Subject: [PATCH 445/630] =?UTF-8?q?CAPI=E6=96=B0=E5=A2=9Eswiper=20onSelect?= =?UTF-8?q?ed=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang --- arkui/ace_engine/native/native_node.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f6e7ea1cd..ff6df9be7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6461,6 +6461,23 @@ typedef enum { */ NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL, + /** + * @brief Defines the event triggered when the selected index of the ARKUI_NODE_SWIPER changed. + * + * This event is triggered under the following scenarios: \n + * 1. When the page switching animation starts after the user lifts their finger after swiping and the swipe meets + * the threshold for page turning. \n + * 2. When the page is changed programmatically using either NODE_SWIPER_INDEX or + * NODE_SWIPER_SWIPE_TO_INDEX. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].i32: index of the currently selected element. \n + * + * @since 16 + */ + NODE_SWIPER_EVENT_ON_SELECTED = 1001005, + /** * @brief Defines the event triggered when the ARKUI_NODE_SCROLL component scrolls. * -- Gitee From 880018ba88d9864ae39caaefe36b140c7b754e20 Mon Sep 17 00:00:00 2001 From: greensue Date: Thu, 9 Jan 2025 14:46:21 +0800 Subject: [PATCH 446/630] jit acl:add jit error retrurn status Signed-off-by: greensue --- ark_runtime/jsvm/jsvm.h | 3 +++ ark_runtime/jsvm/jsvm_types.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index 3a5d3f7a3..02bc0ea9b 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -3052,6 +3052,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenInspectorWithName(JSVM_Env env, * Returns {@link JSVM_INVALID_ARG } if any of env, wasmBytecode is NULL, or data length is invalid.\n * Returns {@link JSVM_GENERIC_FAILURE } if compile failed.\n * Returns {@link JSVM_PENDING_EXCEPTION } if an exception occurs.\n + * Returns {@link JSVM_JIT_MODE_EXPECTED } if run in jitless mode.\n * * @since 12 */ @@ -3076,6 +3077,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileWasmModule(JSVM_Env env, * Returns {@link JSVM_INVALID_ARG } if env is NULL, or wasmModule is NULL or is not a WebAssembly module.\n * Returns {@link JSVM_GENERIC_FAILURE } if functionIndex out of range or compile failed.\n * Returns {@link JSVM_PENDING_EXCEPTION } if an exception occurs.\n + * Returns {@link JSVM_JIT_MODE_EXPECTED } if run in jitless mode.\n * * @since 12 */ @@ -3111,6 +3113,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsWasmModuleObject(JSVM_Env env, * Returns {@link JSVM_OK } if the function executed successfully.\n * Returns {@link JSVM_INVALID_ARG } if any of the input arguments is NULL.\n * Returns {@link JSVM_GENERIC_FAILURE } if create wasm cache failed.\n + * Returns {@link JSVM_JIT_MODE_EXPECTED } if run in jitless mode.\n * * @since 12 */ diff --git a/ark_runtime/jsvm/jsvm_types.h b/ark_runtime/jsvm/jsvm_types.h index 069bc95b5..ec0ad5b60 100644 --- a/ark_runtime/jsvm/jsvm_types.h +++ b/ark_runtime/jsvm/jsvm_types.h @@ -331,6 +331,10 @@ typedef enum { * @since 16 */ JSVM_INVALID_TYPE, + /** jit mode expected status. + * @since 15 + */ + JSVM_JIT_MODE_EXPECTED, } JSVM_Status; /** -- Gitee From dafa909e8d0c7b76ad7f4caa1c9d12a99ee0ea46 Mon Sep 17 00:00:00 2001 From: li-jianchao1993 Date: Tue, 21 Jan 2025 22:13:35 +0800 Subject: [PATCH 447/630] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=91=20API16=E6=96=B0=E5=A2=9E=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E8=BD=AF=E8=A7=A3MPEG2/MPEG4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-jianchao1993 --- .../libnative_media_codecbase.ndk.json | 8 ++ multimedia/av_codec/native_avcodec_base.h | 120 ++++++++++++++++++ 2 files changed, 128 insertions(+) diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 3f59edd1e..1bf09f584 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -79,6 +79,14 @@ "first_introduced": "16", "name": "OH_AVCODEC_MIMETYPE_AUDIO_RAW" }, + { + "first_introduced": "16", + "name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG2" + }, + { + "first_introduced": "16", + "name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2" + }, { "first_introduced": "9", "name": "OH_ED_KEY_TIME_STAMP" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index fd4ef7373..3b9d810fe 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -362,6 +362,20 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; * @since 16 */ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_RAW; +/** + * @brief Enumerates the MIME type of video mpeg2 codec. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG2; +/** + * @brief Enumerates the MIME type of video mpeg4 part2 codec. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2; /** * @brief Key for timeStamp in surface's extraData, value type is int64_t. @@ -1118,6 +1132,66 @@ typedef enum OH_VVCProfile { VVC_PROFILE_MAIN_16_444_STILL = 100, } OH_VVCProfile; +/** + * @brief MPEG2 Profile + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG2Profile { + /** Simple profile */ + MPEG2_PROFILE_SIMPLE = 0, + /** Main profile */ + MPEG2_PROFILE_MAIN = 1, + /** SNR scalable profile */ + MPEG2_PROFILE_SNR_SCALABLE = 2, + /** Spatially scalable profile */ + MPEG2_PROFILE_SPATIALLY_SCALABLE = 3, + /** High profile */ + MPEG2_PROFILE_HIGH = 4, + /** 4:2:2 profile */ + MPEG2_PROFILE_422 = 5, +} OH_MPEG2Profile; + +/** + * @brief MPEG4 Profile + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG4Profile { + /** Simple profile */ + MPEG4_PROFILE_SIMPLE = 0, + /** Simple scalable profile */ + MPEG4_PROFILE_SIMPLE_SCALABLE = 1, + /** Core profile */ + MPEG4_PROFILE_CORE = 2, + /** Main profile */ + MPEG4_PROFILE_MAIN = 3, + /** N-Bit profile */ + MPEG4_PROFILE_N_BIT = 4, + /** Hybrid profile */ + MPEG4_PROFILE_HYBRID = 5, + /** Basic animated texture profile */ + MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE = 6, + /** Scalable texture profile */ + MPEG4_PROFILE_SCALABLE_TEXTURE = 7, + /** Simple FA profile */ + MPEG4_PROFILE_SIMPLE_FA = 8, + /** Advanced real time simple profile */ + MPEG4_PROFILE_ADVANCED_REAL_TIME_SIMPLE = 9, + /** Core scalable profile */ + MPEG4_PROFILE_CORE_SCALABLE = 10, + /** Advanced coding efficiency profile */ + MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 11, + /** Advanced core profile */ + MPEG4_PROFILE_ADVANCED_CORE = 12, + /** Advanced scalable texture profile */ + MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE = 13, + /** Advanced simple profile */ + MPEG4_PROFILE_ADVANCED_SIMPLE = 17, +} OH_MPEG4Profile; + /** * @brief Enumerates the muxer output file format * @@ -1361,6 +1435,52 @@ typedef enum OH_VVCLevel { VVC_LEVEL_155 = 255, } OH_VVCLevel; +/** + * @brief MPEG2 Level. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG2Level { + /** Low level */ + MPEG2_LEVEL_LOW = 0, + /** Main level */ + MPEG2_LEVEL_MAIN = 1, + /** High 1440 level */ + MPEG2_LEVEL_HIGH_1440 = 2, + /** High level */ + MPEG2_LEVEL_HIGH = 3, +} OH_MPEG2Level; + +/** + * @brief MPEG4 Level. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG4Level { + /** 0 level */ + MPEG4_LEVEL_0 = 0, + /** 0B level */ + MPEG4_LEVEL_0B = 1, + /** 1 level */ + MPEG4_LEVEL_1 = 2, + /** 2 level */ + MPEG4_LEVEL_2 = 3, + /** 3 level */ + MPEG4_LEVEL_3 = 4, + /** 3B level */ + MPEG4_LEVEL_3B = 5, + /** 4 level */ + MPEG4_LEVEL_4 = 6, + /** 4A level */ + MPEG4_LEVEL_4A = 7, + /** 5 level */ + MPEG4_LEVEL_5 = 8, + /** 6 level */ + MPEG4_LEVEL_6 = 9, +} OH_MPEG4Level; + /** * @brief The reference mode in temporal group of picture. * -- Gitee From e77031330520b377c71162c7697e0fd504c3ecca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B1=B6=E8=B0=8F?= Date: Wed, 22 Jan 2025 02:01:10 +0000 Subject: [PATCH 448/630] Set the longest duration allowed for current recording MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘汶谏 --- multimedia/player_framework/avrecorder_base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index 27f397f69..02ba57543 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -257,7 +257,6 @@ typedef struct OH_AVRecorder_Metadata { * @brief Provides the media recorder configuration definitions * @syscap SystemCapability.Multimedia.Media.AVRecorder * @since 16 - * @version 1.0 */ typedef struct OH_AVRecorder_Config { /* Indicates the recording audio source type */ @@ -272,6 +271,8 @@ typedef struct OH_AVRecorder_Config { OH_AVRecorder_FileGenerationMode fileGenerationMode; /* Contains additional metadata for the recorded media */ OH_AVRecorder_Metadata metadata; + /* Set the longest duration allowed for current recording */ + int32_t maxDuration; } OH_AVRecorder_Config; /** -- Gitee From 81f2292768c7022ad811525ef5f13599b583d01c Mon Sep 17 00:00:00 2001 From: SQ Date: Tue, 21 Jan 2025 20:00:29 +0800 Subject: [PATCH 449/630] =?UTF-8?q?Swiper/Tabs=E5=A2=9E=E5=8A=A0onUnselect?= =?UTF-8?q?ed=E4=BA=8B=E4=BB=B6=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SQ --- arkui/ace_engine/native/native_node.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 47d472b70..1b751b6d0 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7139,6 +7139,23 @@ typedef enum { */ NODE_SWIPER_EVENT_ON_SELECTED = 1001005, + /** + * @brief Defines the event triggered when the selected index of the ARKUI_NODE_SWIPER changed. + * + * This event is triggered under the following scenarios: \n + * 1. When the page switching animation starts after the user lifts their finger after swiping and the swipe meets + * the threshold for page turning. \n + * 2. When the page is changed programmatically using either NODE_SWIPER_INDEX or + * NODE_SWIPER_SWIPE_TO_INDEX. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].i32: the index of the element becomes unselected. \n + * + * @since 16 + */ + NODE_SWIPER_EVENT_ON_UNSELECTED = 1001006, + /** * @brief Defines the event triggered when the ARKUI_NODE_SCROLL component scrolls. * -- Gitee From db1d856339defea24cba15297193a1820b58e51d Mon Sep 17 00:00:00 2001 From: Bagwey Date: Wed, 22 Jan 2025 10:28:02 +0800 Subject: [PATCH 450/630] add background process API Signed-off-by: Bagwey --- ndk_targets.gni | 2 + .../background_process_manager/BUILD.gn | 29 +++++ .../background_process_manager.ndk.json | 10 ++ .../include/background_process_manager.h | 112 ++++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 resourceschedule/background_process_manager/BUILD.gn create mode 100644 resourceschedule/background_process_manager/background_process_manager.ndk.json create mode 100644 resourceschedule/background_process_manager/include/background_process_manager.h diff --git a/ndk_targets.gni b/ndk_targets.gni index 344c73ff8..00fe912db 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -203,6 +203,8 @@ _ndk_library_targets = [ "//interface/sdk_c/sensors/sensor:sensor_ndk_header", "//interface/sdk_c/resourceschedule/qos_manager:libqos_ndk", "//interface/sdk_c/resourceschedule/qos_manager:qos_header", + "//interface/sdk_c/resourceschedule/background_process_manager:libbackground_process_manager_ndk", + "//interface/sdk_c/resourceschedule/background_process_manager:background_process_manager_header", "//interface/sdk_c/filemanagement/fileio:libohfileio", "//interface/sdk_c/filemanagement/fileio:oh_fileio_header", "//interface/sdk_c/filemanagement/environment:libohenvironment", diff --git a/resourceschedule/background_process_manager/BUILD.gn b/resourceschedule/background_process_manager/BUILD.gn new file mode 100644 index 000000000..e074dddca --- /dev/null +++ b/resourceschedule/background_process_manager/BUILD.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") + +ohos_ndk_headers("background_process_manager_header") { + dest_dir = "$ndk_headers_out_dir/background_process_manager" + sources = [ "include/background_process_manager.h" ] +} + +ohos_ndk_library("libbackground_process_manager_ndk") { + output_name = "background_process_manager" + ndk_description_file = "./background_process_manager.ndk.json" + system_capability = + "SystemCapability.Resourceschedule.BackgroundProcessManager" + system_capability_headers = + [ "background_process_manager/background_process_manager.h" ] +} diff --git a/resourceschedule/background_process_manager/background_process_manager.ndk.json b/resourceschedule/background_process_manager/background_process_manager.ndk.json new file mode 100644 index 000000000..022e94975 --- /dev/null +++ b/resourceschedule/background_process_manager/background_process_manager.ndk.json @@ -0,0 +1,10 @@ +[ + { + "first_introduced": "15", + "name": "OH_BackgroundProcessManager_SetProcessPriority" + }, + { + "first_introduced": "15", + "name": "OH_BackgroundProcessManager_ResetProcessPriority" + } +] \ No newline at end of file diff --git a/resourceschedule/background_process_manager/include/background_process_manager.h b/resourceschedule/background_process_manager/include/background_process_manager.h new file mode 100644 index 000000000..c9e3c085c --- /dev/null +++ b/resourceschedule/background_process_manager/include/background_process_manager.h @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup BackgroundProcessManager + * @{ + * + * @brief BackgroundProcessManager provides APIs. + * + * @since 15 + */ + +/** + * @file background_process_manager.h + * + * @brief Declares the BackgroundProcessManager interfaces in C. + * + * BackgroundProcessManager refers to set or reset priority of process + * + * @library libbackground_process_manager.z.so + * @kit BackgroundTasksKit + * @syscap SystemCapability.Resourceschedule.BackgroundProcessManager + * @since 15 + */ + +#ifndef RESOURCESCHEDULE_BACKGROUND_PROCESS_MANAGER_H +#define RESOURCESCHEDULE_BACKGROUND_PROCESS_MANAGER_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Describes the level of BackgroundProcessManager priority. + * + * @since 15 + */ +typedef enum BackgroundProcessManager_ProcessPriority { + /** + * @brief Means the process has stopped working and in the background + */ + PROCESS_BACKGROUND = 1, + + /** + * @brief Means the process is working in the background + */ + PROCESS_INACTIVE = 2, +} BackgroundProcessManager_ProcessPriority; + +/** + * @brief Enum for BackgroundProcessManager error code. + * + * @since 15 + */ +typedef enum BackgroundProcessManager_ErrorCode { + /** + * @error result is OK. + */ + ERR_BACKGROUND_PROCESS_MANAGER_SUCCESS = 0, + + /** + * @error invalid parameter. Possible causes: + * 1. priority is out of range. + */ + ERR_BACKGROUND_PROCESS_MANAGER_INVALID_PARAM = 401, + + /** + * @error remote error. Possible causes: + * 1. remote is not work. + */ + ERR_BACKGROUND_PROCESS_MANAGER_REMOTE_ERROR = 31800001, +} BackgroundProcessManager_ErrorCode; + +/** + * @brief Set the priority of process. + * + * @param pid Indicates the pid of the process to be set. + * @param priority Indicates the priority to be set. + Specific priority can be referenced {@link BackgroundProcessManager_ProcessPriority}. + * @return {@link ERR_BACKGROUND_PROCESS_MANAGER_SUCCESS} 0 - Success. + * {@link ERR_BACKGROUND_PROCESS_MANAGER_INVALID_PARAM} 401 - Parameter error. + * {@link ERR_BACKGROUND_PROCESS_MANAGER_REMOTE_ERROR} 31800001 - Remote error. + * @since 15 + */ +int OH_BackgroundProcessManager_SetProcessPriority(int pid, BackgroundProcessManager_ProcessPriority priority); + +/** + * @brief Reset the priority of process. + * + * @param pid Indicates the pid of the process to be reset. + * @return {@link ERR_BACKGROUND_PROCESS_MANAGER_SUCCESS} 0 - Success. + * {@link ERR_BACKGROUND_PROCESS_MANAGER_REMOTE_ERROR} 31800001 - Remote error. + * @since 15 + */ +int OH_BackgroundProcessManager_ResetProcessPriority(int pid); +#ifdef __cplusplus +}; +#endif +#endif // RESOURCESCHEDULE_BACKGROUND_PROCESS_MANAGER_H +/** @} */ -- Gitee From d30794b8e5bbb925a064125a93eedeba34edd03f Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Wed, 22 Jan 2025 10:32:16 +0800 Subject: [PATCH 451/630] capi_ability Signed-off-by: zhouchaobo --- arkui/ace_engine/native/native_node.h | 11 ++++ arkui/ace_engine/native/ui_input_event.h | 67 ++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0783cab5..d356333bc 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6152,6 +6152,17 @@ typedef enum { */ NODE_DISPATCH_KEY_EVENT = 24, + /** + * @brief Defines the event triggered when the mouse pointer hovers over or moves away from a component. + * + * This event is triggered when the mouse pointer enters or leaves the component's bounding box. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_UIInputEvent}. \n + * + *@since 16 + */ + NODE_ON_HOVER_EVENT = 27, + /** * @brief Triggers onDetectResultUpdate callback * when the text is set to TextDataDetectorConfig and recognized successfully. diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 503f6f8ca..6db039518 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -791,6 +791,73 @@ double OH_ArkUI_FocusAxisEvent_GetAxisValue(const ArkUI_UIInputEvent* event, int */ int32_t OH_ArkUI_FocusAxisEvent_SetStopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation); +/** +* @brief Obtains the width of the component hit by an event. +* +* @param event Pointer to an ArkUI_UIInputEvent object. +* @return Returns the width of the component hit by the event; returns 0.0f if any parameter error occurs. +* @since 16 +*/ +float OH_ArkUI_UIInputEvent_GetEventTargetWidth(const ArkUI_UIInputEvent* event); + +/** +* @brief Obtains the height of the component hit by an event. +* +* @param event Pointer to an ArkUI_UIInputEvent object. +* @return Returns the height of the component hit by the event; returns 0.0f if any parameter error occurs. +* @since 16 +*/ +float OH_ArkUI_UIInputEvent_GetEventTargetHeight(const ArkUI_UIInputEvent* event); + +/** +* @brief Obtains the X coordinate of the component hit by an event. +* +* @param event Pointer to an ArkUI_UIInputEvent object. +* @return Returns the X coordinate of the component hit by the event; returns 0.0f if any parameter error occurs. +* @since 16 +*/ +float OH_ArkUI_UIInputEvent_GetEventTargetPositionX(const ArkUI_UIInputEvent* event); + +/** +* @brief Obtains the Y coordinate of the component hit by an event. +* +* @param event Pointer to an ArkUI_UIInputEvent object. +* @return Returns the Y coordinate of the component hit by the event; +* returns 0.0f if any parameter error occurs. +* @since 16 +*/ +float OH_ArkUI_UIInputEvent_GetEventTargetPositionY(const ArkUI_UIInputEvent* event); + +/** +* @brief Obtains the global X coordinate of the component hit by an event. +* +* @param event Pointer to an ArkUI_UIInputEvent object. +* @return Returns the global X coordinate of the component hit by the event; +* returns 0.0f if any parameter error occurs. +* @since 16 +*/ +float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(const ArkUI_UIInputEvent* event); + +/** +* @brief Obtains the global Y coordinate of the component hit by an event. +* +* @param event Pointer to an ArkUI_UIInputEvent object. +* @return Returns the global Y coordinate of the component hit by the event; +* returns 0.0f if any parameter error occurs. +* @since 16 +*/ +float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEvent* event); + +/** +* @brief Checks whether the cursor is hovering over this component. +* +* @param event Pointer to an ArkUI_UIInputEvent object. +* @return Returns true if the cursor is hovering over the current component. +* Returns false if the cursor is not hovering over the current component. +* @since 16 +*/ +bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event); + #ifdef __cplusplus }; #endif -- Gitee From 71c826fa085fa7bb3ea2ad6737da9a723a058dff Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Wed, 22 Jan 2025 10:41:14 +0800 Subject: [PATCH 452/630] capi_ability Signed-off-by: zhouchaobo --- arkui/ace_engine/native/ui_input_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 6e890e584..135504fc6 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -895,9 +895,9 @@ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEve * Returns false if the cursor is not hovering over the current component. * @since 16 */ +bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event); /** -bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event); * @brief Obtains the press time of a specific touch point. * * @param event Pointer to an ArkUI_UIInputEvent object. -- Gitee From acb5de2bcb66a18f559e72299c9ef4ae75188db1 Mon Sep 17 00:00:00 2001 From: caochuan Date: Wed, 22 Jan 2025 11:15:51 +0800 Subject: [PATCH 453/630] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81ARGB=E7=BC=96=E8=A7=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caochuan Change-Id: I646b5220784837609087bb5b508b3ec100d950ef --- multimedia/image_framework/include/image/pixelmap_native.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 043f17ae7..35bb48dc9 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -99,6 +99,11 @@ typedef enum { */ PIXEL_FORMAT_UNKNOWN = 0, /* + * ARGB_8888 format + * @since 16 + */ + PIXEL_FORMAT_ARGB_8888 = 1, + /* * RGB_565 format */ PIXEL_FORMAT_RGB_565 = 2, -- Gitee From 94aa55300abdfcdfd200b3b8fdf9bffe8f1649e1 Mon Sep 17 00:00:00 2001 From: xuzhidan Date: Wed, 22 Jan 2025 16:06:06 +0800 Subject: [PATCH 454/630] Swiper add onContentWillScroll C-API Signed-off-by: xuzhidan Change-Id: I2abc9e12923dd9caaa34e7821a11f9b07448b56f --- arkui/ace_engine/native/native_node.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 1b751b6d0..76f99773e 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7156,6 +7156,22 @@ typedef enum { */ NODE_SWIPER_EVENT_ON_UNSELECTED = 1001006, + /** + * @brief Defines the event triggered when content in the swiper component will scroll. + * Instructions: Before page scrolling, the ContentWillScrollCallback callback is invoked. \n \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains three parameters:\n + * ArkUI_NodeComponentEvent.data[0].i32: the index value of the current child page. \n + * ArkUI_NodeComponentEvent.data[1].i32: the index value of the child page that will display. \n + * ArkUI_NodeComponentEvent.data[2].f32: the sliding offset of each frame. + * Positive numbers indicating slide backward(e.g. from index=1 to index=0), negative numbers indicating + * slide forward(e.g. from index=0 to index=1). \n + * + * @since 16 + */ + NODE_SWIPER_EVENT_ON_CONTENT_WILL_SCROLL = 1001007, + /** * @brief Defines the event triggered when the ARKUI_NODE_SCROLL component scrolls. * -- Gitee From ac0f810a6e94d2e54af9b0592a82c11b7316ff04 Mon Sep 17 00:00:00 2001 From: sunxuejiao Date: Thu, 16 Jan 2025 14:49:19 +0800 Subject: [PATCH 455/630] bug: Optimization get paste data progress interface Signed-off-by: sunxuejiao --- .../pasteboard/include/oh_pasteboard.h | 174 +++++++++++------- .../include/oh_pasteboard_err_code.h | 8 +- .../pasteboard/libpasteboard.ndk.json | 36 ++++ 3 files changed, 144 insertions(+), 74 deletions(-) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index c4f23689e..2f525272d 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -72,11 +72,11 @@ typedef enum Pasteboard_FileConflictOption { /** * @brief Overwrite when destUir has file with same name. */ - OH_PASTEBOARD_OVERWRITE = 0, + PASTEBOARD_OVERWRITE = 0, /** * @brief Skip when destUir has file with same name. */ - OH_PASTEBOARD_SKIP = 1 + PASTEBOARD_SKIP = 1 } Pasteboard_FileConflictOption; /** @@ -88,11 +88,11 @@ typedef enum Pasteboard_ProgressIndicator { /** * @brief Getting data without system default progress indicator. */ - OH_PASTEBOARD_NONE = 0, + PASTEBOARD_NONE = 0, /** * @brief Getting data with system default progress indicator. */ - OH_PASTEBOARD_DEFAULT = 1 + PASTEBOARD_DEFAULT = 1 } Pasteboard_ProgressIndicator; /** @@ -100,82 +100,22 @@ typedef enum Pasteboard_ProgressIndicator { * * @since 15 */ -typedef struct Pasteboard_ProgressInfo { - /** Percentage of progress when getting PasteData without using default system progress. - */ - int progress; -} Pasteboard_ProgressInfo; +typedef struct Pasteboard_ProgressInfo Pasteboard_ProgressInfo; /** - * @brief Defines the callback function used to return the progress information when getting OH_UdmfData. + * @brief Defines the callback function used to return the progress information when getting PasteData. * * @param progressInfo The progress information notified to Application. * @since 15 */ -typedef void (*Pasteboard_ProgressNotify)(Pasteboard_ProgressInfo progressInfo); - -/** - * @brief Represents the Pasteboard progress listener when getting OH_UdmfData. - * - * @since 15 - */ -typedef struct Pasteboard_ProgressListener { - /** - * Indicates the callback function used to return the progress information. - */ - Pasteboard_ProgressNotify callback; -} Pasteboard_ProgressListener; - -/** - * @brief Defines the cancel function used to cancel the progress when getting OH_PasteData. - * - * @since 15 - */ -typedef void (*Pasteboard_ProgressCancel)(void); - -/** - * brief Represents the Pasteboard progress signal when getting data. - * - * @since 15 - */ -typedef struct Pasteboard_ProgressSignal { - /** - * Indicates the signal function used to cancel the progress process. - */ - Pasteboard_ProgressCancel cancel; -} Pasteboard_ProgressSignal; +typedef void (*OH_Pasteboard_ProgressListener)(Pasteboard_ProgressInfo* progressInfo); /** * @brief Represents the pasteboard get data parameters when getting data from Pasteboard. * - * @param destUri Indicates the uri of dest path where copy file will be copied to in sandbox of Application. - * @param destUriLen Indicates the length of destUir. - * @param fileConflictOption Indicates fileConflictOption when dest path has file with same name. - * @param progressIndicator Indicates whether to use default system progress indacator. - * @param progressListener Indicates the progress listener when getting PasteData without using default system progress. - * @param progressSignal Indicates progress signal when getting PasteData with system progress indacator. * @since 15 */ -typedef struct OH_Pasteboard_GetDataParams { - /** Indicates the uri of dest path where copy files will be copied to sandbox of Application. - */ - char *destUri; - /** Indicates the length of destUir. - */ - unsigned int destUriLen; - /** Indicates fileConflictOptions when dest path has file with same name. - */ - Pasteboard_FileConflictOption fileConflictOption; - /** Indicates whether to use default system progress indicator. - */ - Pasteboard_ProgressIndicator progressIndicator; - /** Indicates the progress listener when getting PasteData without using default system progress. - */ - Pasteboard_ProgressListener progressListener; - /** Indicates progress signal when getting PasteData with system progress indacator. - */ - Pasteboard_ProgressSignal progressSignal; -} OH_Pasteboard_GetDataParams; +typedef struct Pasteboard_GetDataParams Pasteboard_GetDataParams; /** * @brief Defines the callback function used to return the Pasteboard data changed. @@ -404,6 +344,100 @@ char **OH_Pasteboard_GetMimeTypes(OH_Pasteboard *pasteboard, unsigned int *count */ uint32_t OH_Pasteboard_GetChangeCount(OH_Pasteboard *pasteboard); +/** + * @brief Create a pointer to the instance of the {@link Pasteboard_GetDataParams}. + * + * @return If the operation is successful, a pointer to the instance of the {@link Pasteboard_GetDataParams} + * structure is returned. If the operation is failed, nullptr is returned. + * @see Pasteboard_GetDataParams + * @since 15 + */ +Pasteboard_GetDataParams *OH_Pasteboard_GetDataParams_Create(void); + +/** + * @brief Destroy a pointer that points to an instance of {@link Pasteboard_GetDataParams}. + * + * @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}. + * @see Pasteboard_GetDataParams + * @since 15 + */ +void OH_Pasteboard_GetDataParams_Destroy(Pasteboard_GetDataParams* params); + +/** + * @brief Set the progress indicator to the {@link Pasteboard_GetDataParams}. + * + * @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}. + * @param progressIndicator Represents to the progress indicator. + * @see Pasteboard_GetDataParams Pasteboard_ProgressIndicator + * @since 15 + */ +void OH_Pasteboard_GetDataParams_SetProgressIndicator(Pasteboard_GetDataParams* params, + Pasteboard_ProgressIndicator progressIndicator); + +/** + * @brief Set the destination uri to the {@link Pasteboard_GetDataParams}. + * + * @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}. + * @param destUri Pointer to a destination uri. + * @param destUriLen Indicates the length of destination uri. + * @see Pasteboard_GetDataParams + * @since 15 + */ +void OH_Pasteboard_GetDataParams_SetDestUri(Pasteboard_GetDataParams* params, const char* destUri, uint32_t destUriLen); + +/** + * @brief Set the file conflict options to the {@link Pasteboard_GetDataParams}. + * + * @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}. + * @param option Represents to the file conflict options. + * @see Pasteboard_GetDataParams Pasteboard_FileConflictOption + * @since 15 + */ +void OH_Pasteboard_GetDataParams_SetFileConflictOption(Pasteboard_GetDataParams* params, + Pasteboard_FileConflictOption option); + +/** + * @brief Set the progress indicator to the {@link Pasteboard_GetDataParams}. + * + * @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}. + * @param listener Represents to the data progress listener. + * @see Pasteboard_GetDataParams OH_Pasteboard_ProgressListener + * @since 15 + */ +void OH_Pasteboard_GetDataParams_SetProgressListener(Pasteboard_GetDataParams* params, + const OH_Pasteboard_ProgressListener listener); + +/** + * @brief Get the progress from the {@link Pasteboard_ProgressInfo}. + * + * @param progressInfo Represents a pointer to an instance of {@link Pasteboard_ProgressInfo}. + * @return Returns the progress. + * @see Pasteboard_ProgressInfo + * @since 15 + */ +int OH_Pasteboard_ProgressInfo_GetProgress(Pasteboard_ProgressInfo* progressInfo); + +/** + * @brief Get the remote device name from the {@link Pasteboard_ProgressInfo}. + * + * @param progressInfo Represents a pointer to an instance of {@link Pasteboard_ProgressInfo}. + * @param deviceName Pointer to remote device name. + * @param deviceNameLen Indicates the length of remote device name. + * @see Pasteboard_ProgressInfo + * @since 15 + */ +void OH_Pasteboard_ProgressInfo_GetRemoteDeviceName(Pasteboard_ProgressInfo* progressInfo, char* deviceName, + uint32_t deviceNameLen); + +/** + * @brief Defines the cancel function used to cancel the progress when getting PasteData. + * + * @param params Pointer to indicates the {@link Pasteboard_GetDataParams}. + * @see Pasteboard_GetDataParams. + * @since 15 + */ +void OH_Pasteboard_ProgressCancel(Pasteboard_GetDataParams* params); + /** * @brief Obtains data from the Pasteboard with system progress indicator. * @@ -415,8 +449,8 @@ uint32_t OH_Pasteboard_GetChangeCount(OH_Pasteboard *pasteboard); * @see OH_Pasteboard OH_PasteData PASTEBOARD_ErrCode. * @since 15 */ -OH_UdmfData *OH_Pasteboard_GetDataWithProgress(OH_Pasteboard *pasteboard, OH_Pasteboard_GetDataParams *params, - int *status); +OH_UdmfData* OH_Pasteboard_GetDataWithProgress(OH_Pasteboard* pasteboard, Pasteboard_GetDataParams* params, + int* status); #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h index aafcb849d..8dba41d2a 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard_err_code.h @@ -78,22 +78,22 @@ typedef enum PASTEBOARD_ErrCode { * @error Copy file failed. * @since 15 */ - OH_PASTEBOARD_COPY_FILE_ERROR = 12900007, + ERR_PASTEBOARD_COPY_FILE_ERROR = 12900007, /** * @error Failed to start progress. * @since 15 */ - OH_PASTEBOARD_PROGRESS_START_ERROR = 12900008, + ERR_PASTEBOARD_PROGRESS_START_ERROR = 12900008, /** * @error Progress exits abnormally. * @since 15 */ - OH_PASTEBOARD_PROGRESS_ABNORMAL = 12900009, + ERR_PASTEBOARD_PROGRESS_ABNORMAL = 12900009, /** * @error Get Data failed. * @since 15 */ - OH_PASTEBOARD_GET_DATA_FAILED = 12900010, + ERR_PASTEBOARD_GET_DATA_FAILED = 12900010, } PASTEBOARD_ErrCode; #ifdef __cplusplus }; diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index 31542bced..4b4dd307d 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -59,6 +59,42 @@ "first_introduced": "14", "name": "OH_Pasteboard_GetMimeTypes" }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_GetDataParams_Create" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_GetDataParams_Destroy" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_GetDataParams_SetProgressIndicator" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_GetDataParams_SetDestUri" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_GetDataParams_SetFileConflictOption" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_GetDataParams_SetProgressListener" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_ProgressInfo_GetProgress" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_ProgressInfo_GetRemoteDeviceName" + }, + { + "first_introduced": "15", + "name": "OH_Pasteboard_ProgressCancel" + }, { "first_introduced": "15", "name": "OH_Pasteboard_GetDataWithProgress" -- Gitee From 30451939651824d41f820241ea432da130f22f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=80=80=E5=BE=B7?= Date: Wed, 22 Jan 2025 16:32:07 +0800 Subject: [PATCH 456/630] asset add wrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 尹耀德 --- security/asset/inc/asset_type.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/security/asset/inc/asset_type.h b/security/asset/inc/asset_type.h index fc92c4b9b..8a3bc6b79 100755 --- a/security/asset/inc/asset_type.h +++ b/security/asset/inc/asset_type.h @@ -217,6 +217,12 @@ typedef enum { * @since 16 */ ASSET_TAG_GROUP_ID = ASSET_TYPE_BYTES | 0x48, + /** + * A tag whose value is a 32-bit unsigned integer indicating the type of Asset encapsulation. + * + * @since 16 + */ + ASSET_TAG_WRAP_TYPE = ASSET_TYPE_BYTES | 0x49, } Asset_Tag; /** @@ -330,6 +336,22 @@ typedef enum { ASSET_SYNC_TYPE_TRUSTED_ACCOUNT = 1 << 2, } Asset_SyncType; +/** + * @brief An enum type indicates the type of Asset encapsulation. + * + * @since 16 + */ +typedef enum { + /** + * An Asset with this attribute value is never allowed to be wrapped up. + */ + ASSET_WRAP_TYPE_NEVER = 0, + /** + * An Asset with this attribute value can only be wrapped or unwrapped on devices logged in with trusted accounts. + */ + ASSET_WRAP_TYPE_TRUSTED_ACCOUNT = 1, +} Asset_WrapType; + /** * @brief Enumerates the policies for resolving the conflict (for example, duplicate alias) occurred when * an asset is added. -- Gitee From c5f577087ba14d110cae2f9f06407da633db07c2 Mon Sep 17 00:00:00 2001 From: wangdongyusky <15222869+wangdongyusky@user.noreply.gitee.com> Date: Tue, 17 Dec 2024 10:59:42 +0800 Subject: [PATCH 457/630] =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=8E=B7=E5=8F=96=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangdongyusky --- multimedia/camera_framework/camera.h | 23 ++++++++++++++++++ multimedia/camera_framework/camera_device.h | 26 +++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 1a907e0f7..7ee2af749 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -579,6 +579,29 @@ typedef enum Camera_PreconfigRatio { PRECONFIG_RATIO_16_9 = 2 } Camera_PreconfigRatio; +/** + * @brief Enum for remote camera device type. + * + * @since 16 + * @version 1.0 + */ +typedef enum Camera_HostDeviceType { + /** + * Indicates an unknown device camera. + */ + HOST_DEVICE_TYPE_UNKNOWN_TYPE = 0, + + /** + * Indicates a smartphone camera. + */ + HOST_DEVICE_TYPE_PHONE = 0x0E, + + /** + * Indicates tablet camera. + */ + HOST_DEVICE_TYPE_TABLET = 0x11 +} Camera_HostDeviceType; + /** * @brief Size parameter. * diff --git a/multimedia/camera_framework/camera_device.h b/multimedia/camera_framework/camera_device.h index 731e8e203..ed5119554 100644 --- a/multimedia/camera_framework/camera_device.h +++ b/multimedia/camera_framework/camera_device.h @@ -60,6 +60,32 @@ extern "C" { */ Camera_ErrorCode OH_CameraDevice_GetCameraOrientation(Camera_Device* camera, uint32_t* orientation); +/** + * @brief Gets remote device name attribute for a camera device. + * + * @param camera the {@link Camera_Device} which use to get attributes. + * @param hostDeviceName the remote device name attribute if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 16 + */ +Camera_ErrorCode OH_CameraDevice_GetHostDeviceName(Camera_Device* camera, char** hostDeviceName); + + +/** + * @brief Gets the remote device type attribute for a camera device. + * + * @param camera the {@link Camera_Device} which use to get attributes. + * @param hostDeviceType the {@link Camera_HostDeviceType} which remote device type attribute + if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 16 + */ +Camera_ErrorCode OH_CameraDevice_GetHostDeviceType(Camera_Device* camera, Camera_HostDeviceType* hostDeviceType); + #ifdef __cplusplus } #endif -- Gitee From a4b400914ddd63d1990c5fd5f5e2c3f44e2e66f9 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Thu, 23 Jan 2025 14:47:55 +0800 Subject: [PATCH 458/630] capi_ability2 Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 32 ++++++++++++++++++++++++ arkui/ace_engine/native/ui_input_event.h | 13 ++++++++++ 2 files changed, 45 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 2543c34aa..b9ef03e03 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2698,5 +2698,37 @@ { "first_introduced": "16", "name": "OH_ArkUI_DisableDropDataPrefetchOnNode" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetEventTargetWidth" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetEventTargetHeight" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetEventTargetPositionX" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetEventTargetPositionY" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_HoverEvent_IsHovered" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_UIInputEvent_GetModifierKeyStates" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 135504fc6..c13cc7c6e 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -897,6 +897,19 @@ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEve */ bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event); +/** + * @brief Obtains the state of the modifier keys in a UI input event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param keys Pointer to a variable where the current combination of pressed modifier keys will be returned. + * The application can use bitwise operations to determine the state of each modifier key. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_UIInputEvent_GetModifierKeyStates(const ArkUI_UIInputEvent* event, uint64_t* keys); + /** * @brief Obtains the press time of a specific touch point. * -- Gitee From e6fd53f87b9720d8a79813d9f3172b5d1cb06996 Mon Sep 17 00:00:00 2001 From: wc-huang <1454579418@qq.com> Date: Thu, 23 Jan 2025 10:55:31 +0800 Subject: [PATCH 459/630] next focus Signed-off-by: wc-huang <1454579418@qq.com> --- arkui/ace_engine/native/native_node.h | 12 ++++++++++++ arkui/ace_engine/native/native_type.h | 20 ++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 7d90b6421..e6b74ad82 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1889,6 +1889,18 @@ typedef enum { */ NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100, + /** + * @brief Sets the next focus node. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n + * .value[0].i32: focus movement direction, as defined in {@link ArkUI_FocusMove}. + * .object: next focus node. The parameter type is {@link ArkUI_NodeHandle}.\n + * \n + * + * @since 16 + */ + NODE_NEXT_FOCUS = 101, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index b95363f87..fd91ffb9b 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2468,6 +2468,26 @@ typedef enum { ARKUI_SAFE_AREA_EDGE_END = 1 << 3, } ArkUI_SafeAreaEdge; +/** + * @brief Define an enum for the focus movement directions. + * + * @since 16 +*/ +typedef enum { + /** Move focus forward. */ + ARKUI_FOCUS_MOVE_FORWARD = 0, + /** Move focus backward. */ + ARKUI_FOCUS_MOVE_BACKWARD, + /** Move focus up. */ + ARKUI_FOCUS_MOVE_UP, + /** Move focus down. */ + ARKUI_FOCUS_MOVE_DOWN, + /** Move focus left. */ + ARKUI_FOCUS_MOVE_LEFT, + /** Move focus right. */ + ARKUI_FOCUS_MOVE_RIGHT, +} ArkUI_FocusMove; + /** * @brief defines the enumerated value of the customDialog's keyboard avoid mode. * -- Gitee From f391578bf10e813854ffacf0030e06a5f85eb3ca Mon Sep 17 00:00:00 2001 From: y30025806 Date: Thu, 23 Jan 2025 15:50:56 +0800 Subject: [PATCH 460/630] =?UTF-8?q?=E8=A1=A5=E5=85=85format=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: y30025806 Change-Id: Ie98157a07bbd3f2c28c406b0471fec397d87ac0d --- multimedia/av_codec/native_avsource.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index 4c44206d0..620a02b80 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -111,6 +111,8 @@ OH_AVErrCode OH_AVSource_Destroy(OH_AVSource *source); /** * @brief Get the format info of source. + * It should be noted that the life cycle of the OH_AVFormat instance pointed to by the return value * needs + * to be manually released by the caller. * @syscap SystemCapability.Multimedia.Media.Spliter * @param source Pointer to an OH_AVSource instance. * @return Returns the source's format info if the execution is successful, otherwise returns nullptr. @@ -122,6 +124,8 @@ OH_AVFormat *OH_AVSource_GetSourceFormat(OH_AVSource *source); /** * @brief Get the format info of track. + * It should be noted that the life cycle of the OH_AVFormat instance pointed to by the return value * needs + * to be manually released by the caller. * @syscap SystemCapability.Multimedia.Media.Spliter * @param source Pointer to an OH_AVSource instance. * @param trackIndex The track index to get format. -- Gitee From 9f2386ba0b88a4b8b2bf00177e9d0cefef0c300f Mon Sep 17 00:00:00 2001 From: zoulinken Date: Thu, 23 Jan 2025 16:38:17 +0800 Subject: [PATCH 461/630] =?UTF-8?q?=E6=8F=90=E4=BA=A4lazy=E9=81=8D?= =?UTF-8?q?=E5=8E=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/libace.ndk.json | 12 +++++++ arkui/ace_engine/native/native_node.h | 43 +++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 14 ++++++++ 3 files changed, 69 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 7e2d642a4..b5fe922f6 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1391,6 +1391,18 @@ "first_introduced": "16", "name": "OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_GetChildWithExpandMode" + }, { "first_introduced": "12", "name": "OH_ArkUI_ListChildrenMainSizeOption_Create" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index cda063dcb..91acfcbef 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -39,6 +39,7 @@ #include "native_type.h" #include "ui_input_event.h" +#include #ifdef __cplusplus extern "C" { @@ -8793,6 +8794,48 @@ int32_t OH_ArkUI_NodeUtils_GetNodeType(ArkUI_NodeHandle node); * @since 16 */ int32_t OH_ArkUI_NodeUtils_GetWindowInfo(ArkUI_NodeHandle node, ArkUI_HostWindowInfo** info); + +/** + * @brief Obtains the index of the current FrameNode's first child node which is on the tree. + * + * @param node Indicates the target node. + * @param index The index of the subnode. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index); + +/** + * @brief Obtains the index of the current FrameNode's last child node which is on the tree. + * + * @param node Indicates the target node. + * @param index the index of the subnode. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index); + +/** + * @brief Obtains a subnode by position with the expand mode. + * + * @param node Indicates the target node. + * @param position Indicates the position of the subnode. + * @param subnode The pointer to the subnode. + * @param expandMode Indicates the expand mode. {@link ArkUI_ExpandMode}. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_GetChildWithExpandMode(ArkUI_NodeHandle node, int32_t position, + ArkUI_NodeHandle* subnode, uint32_t expandMode); /** * @brief Collapse the ListItem in its expanded state. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index b95363f87..f401fb7f2 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2492,6 +2492,20 @@ typedef enum { ARKUI_HOVER_MODE_AREA_TYPE_BOTTOM, } ArkUI_HoverModeAreaType; +/** + * @brief Enumerates the expand modes. + * + * @since 16 + */ +typedef enum { + /** Expand. */ + ARKUI_EXPAND = 0, + /** Not expand. */ + ARKUI_NOT_EXPAND = 1, + /** Lazy expand. Expand the children of node if needed. */ + ARKUI_LAZY_EXPAND = 2, +} ArkUI_ExpandMode; + /** * @brief Defines parameter used by the system font style callback event. * -- Gitee From ae86248016d634b2641f8d6dc5ec0fa9d5c0b770 Mon Sep 17 00:00:00 2001 From: "yangmaoquan@chinasoftinc.com" Date: Sat, 11 Jan 2025 16:27:33 +0800 Subject: [PATCH 462/630] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=9D=9E=E6=A0=87?= =?UTF-8?q?=E5=A4=96=E8=AE=BE=E6=89=A9=E5=B1=95=E9=A9=B1=E5=8A=A8-USBSeria?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangmaoquan@chinasoftinc.com Change-Id: Icaa6e83dd6d1da52b93fd69d167ba3194ec33636 --- .../usb_serial/BUILD.gn | 33 +++ .../usb_serial/libusb_serial.ndk.json | 54 ++++ .../usb_serial/usb_serial_api.h | 273 ++++++++++++++++++ .../usb_serial/usb_serial_types.h | 130 +++++++++ ndk_targets.gni | 2 + 5 files changed, 492 insertions(+) create mode 100644 drivers/external_device_manager/usb_serial/BUILD.gn create mode 100644 drivers/external_device_manager/usb_serial/libusb_serial.ndk.json create mode 100644 drivers/external_device_manager/usb_serial/usb_serial_api.h create mode 100644 drivers/external_device_manager/usb_serial/usb_serial_types.h diff --git a/drivers/external_device_manager/usb_serial/BUILD.gn b/drivers/external_device_manager/usb_serial/BUILD.gn new file mode 100644 index 000000000..0e47d0d1b --- /dev/null +++ b/drivers/external_device_manager/usb_serial/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") + +ohos_ndk_headers("usb_serial_header") { + dest_dir = "$ndk_headers_out_dir/usb_serial/" + sources = [ + "usb_serial_api.h", + "usb_serial_types.h", + ] +} + +ohos_ndk_library("libusb_serial") { + ndk_description_file = "./libusb_serial.ndk.json" + min_compact_version = "16" + output_name = "usb_serial_ndk" + system_capability = "SystemCapability.Driver.UsbSerial.Extension" + system_capability_headers = [ + "usb_serial/usb_serial_api.h", + "usb_serial/usb_serial_types.h", + ] +} diff --git a/drivers/external_device_manager/usb_serial/libusb_serial.ndk.json b/drivers/external_device_manager/usb_serial/libusb_serial.ndk.json new file mode 100644 index 000000000..28fbe4a80 --- /dev/null +++ b/drivers/external_device_manager/usb_serial/libusb_serial.ndk.json @@ -0,0 +1,54 @@ +[ + { + "first_introduced": "16", + "name": "OH_UsbSerial_Init" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_Release" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_Open" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_Close" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_Read" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_Write" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_SetBaudRate" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_SetParams" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_SetTimeout" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_SetFlowControl" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_Flush" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_FlushInput" + }, + { + "first_introduced": "16", + "name": "OH_UsbSerial_FlushOutput" + } +] \ No newline at end of file diff --git a/drivers/external_device_manager/usb_serial/usb_serial_api.h b/drivers/external_device_manager/usb_serial/usb_serial_api.h new file mode 100644 index 000000000..075887c5c --- /dev/null +++ b/drivers/external_device_manager/usb_serial/usb_serial_api.h @@ -0,0 +1,273 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup USBSerialDDK + * @{ + * + * @brief Provides USB SERIAL DDK types and declares the macros, enumerated variables, and\n + * data structures required by the USB SERIAL DDK APIs. + * + * @since 16 + */ + +/** + * @file usb_serial_api.h + * + * @brief Declares the USB SERIAL DDK interfaces for the usb host to access an usb serial device. + * + * @kit DriverDevelopmentKit + * @library libusb_serial.z.so + * @syscap SystemCapability.Driver.UsbSerial.Extension + * @since 16 + */ + +#ifndef DDK_USB_SERIAL_API_H +#define DDK_USB_SERIAL_API_H + +#include +#include "usb_serial_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Initializes the USB serial DDK. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk init error. + * @since 16 + */ +int32_t OH_UsbSerial_Init(void); + +/** + * @brief Releases the USB serial DDK. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * @since 16 + */ +int32_t OH_UsbSerial_Release(void); + +/** + * @brief Open USB serial device by deviceId. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param deviceId ID of the device to be operated. + * @param interfaceIndex Interface index, which corresponds to interface which supports USB Protocol ACM. + * @param dev Device handle. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: dev is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_MEMORY_ERROR} insufficient memory. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_DEVICE_NOT_FOUND} device or interface not found. + * @since 16 + */ +int32_t OH_UsbSerial_Open(uint64_t deviceId, uint8_t interfaceIndex, UsbSerial_Device **dev); + +/** + * @brief Close USB serial device. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1. dev is null.\n + * 2. *dev is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_Close(UsbSerial_Device **dev); + +/** + * @brief Read bytesRead into buff from UsbSerial device. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @param buff Received data from a serial device. + * @param bufferSize The buffer size. + * @param bytesRead Actual bytes read. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.buff is null; 3.bufferSize is zero; 4.bytesRead is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_MEMORY_ERROR} the buff is outside accessible address space error. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_Read(UsbSerial_Device *dev, uint8_t *buff, uint32_t bufferSize, uint32_t *bytesRead); + +/** + * @brief Write bytesWritten from buff to UsbSerial device. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @param buff Serial information write to device. + * @param bufferSize The buffer size. + * @param bytesWritten Actual bytes written. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.buff is null; 3.bufferSize is zero; 4. bytesWritten is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_MEMORY_ERROR} the buff is outside accessible address space error. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_Write(UsbSerial_Device *dev, uint8_t *buff, uint32_t bufferSize, uint32_t *bytesWritten); + +/** + * @brief Set the serial port baud rate. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @param baudRate Serial port baud rate set to connect device. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: dev is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_SetBaudRate(UsbSerial_Device *dev, uint32_t baudRate); + +/** + * @brief Set the serial port parameters. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @param params Serial port params set to connect device. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2.params is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_SetParams(UsbSerial_Device *dev, UsbSerial_Params *params); + +/** + * @brief Set the timeout in milliseconds. + * The timeout value defaults to 0 without calling this function. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @param timeout Set to -1 to infinite timeout, 0 to return immediately with any data, + * or > 0 to wait for data for a specified number of milliseconds. + * Timeout will be rounded to the nearest 100ms. Maximum value limited to 25500ms. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: 1.dev is null;\n + * 2. timeout < -1 or timeout > 25500. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_SetTimeout(UsbSerial_Device *dev, int timeout); + +/** + * @brief Set the flow control. + * It defaults to no flow control without calling this function. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @param flowControl {@link UsbSerial_FlowControl} flow control mode. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: dev is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_SetFlowControl(UsbSerial_Device *dev, UsbSerial_FlowControl flowControl); + +/** + * @brief Flush the input and output buffers after finish writting. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: dev is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_Flush(UsbSerial_Device *dev); + +/** + * @brief Flush the input buffer, and the data in the buffer will be cleared directly. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: dev is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_FlushInput(UsbSerial_Device *dev); + +/** + * @brief Flush the output buffer, and the data in the buffer will be cleared directly. + * + * @permission ohos.permission.ACCESS_DDK_USB_SERIAL + * @param dev Device handle. + * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. + * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. + * {@link USB_SERIAL_DDK_INVALID_PARAMETER} parameter check failed. Possible causes: dev is null. + * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. + * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. + * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. + * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. + * @since 16 + */ +int32_t OH_UsbSerial_FlushOutput(UsbSerial_Device *dev); +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif // DDK_USB_SERIAL_API_H +/** @} */ diff --git a/drivers/external_device_manager/usb_serial/usb_serial_types.h b/drivers/external_device_manager/usb_serial/usb_serial_types.h new file mode 100644 index 000000000..64a474b92 --- /dev/null +++ b/drivers/external_device_manager/usb_serial/usb_serial_types.h @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup USBSerialDDK + * @{ + * + * @brief Provides USB SERIAL DDK types and declares the macros, enumerated variables, and\n + * data structures required by the USB SERIAL DDK APIs. + * + * @since 16 + */ + +/** + * @file usb_serial_types.h + * + * @brief Provides the enumerated variables, structures, and macros used in USB SERIAL DDK APIs. + * + * @kit DriverDevelopmentKit + * @library libusb_serial.z.so + * @syscap SystemCapability.Driver.UsbSerial.Extension + * @since 16 + */ + +#ifndef DDK_USB_SERIAL_TYPES_H +#define DDK_USB_SERIAL_TYPES_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Opaque usb serial device structure. + * + * @since 16 + */ +typedef struct UsbSerial_Device UsbSerial_Device; + +/** + * @brief Defines Return codes for USB SERIAL DDK. + * + * @since 16 + */ +typedef enum { + /** @error Permission denied */ + USB_SERIAL_DDK_NO_PERM = 201, + /** @error Invalid parameter */ + USB_SERIAL_DDK_INVALID_PARAMETER = 401, + /** @error Operation successful */ + USB_SERIAL_DDK_SUCCESS = 31600000, + /** @error Invalid operation */ + USB_SERIAL_DDK_INVALID_OPERATION = 31600001, + /** @error Init operation */ + USB_SERIAL_DDK_INIT_ERROR = 31600002, + /** @error Service Error operation */ + USB_SERIAL_DDK_SERVICE_ERROR = 31600003, + /** @error Memory-related error, for example, insufficient memory, memory data copy failure,\n + * or memory application failure. + */ + USB_SERIAL_DDK_MEMORY_ERROR = 31600004, + /** @error I/O Error */ + USB_SERIAL_DDK_IO_ERROR = 31600005, + /** @error Device not found */ + USB_SERIAL_DDK_DEVICE_NOT_FOUND = 31600006, +} UsbSerial_DdkRetCode; + +/** + * @brief Defines USB Serial Port Params for USB SERIAL DDK. + * + * @since 16 + */ +typedef struct UsbSerial_Params { + /** The baud rate requested by the system */ + uint32_t baudRate; + /** The number of data bits to transmit */ + uint8_t nDataBits; + /** The number of half stop bits. */ + uint8_t nStopBits; + /** The parity setting to use during communication */ + uint8_t parity; +} __attribute__((aligned(8))) UsbSerial_Params; + +/** + * @brief Defines flow control for USB SERIAL DDK. + * + * @since 16 + */ +typedef enum { + /** No flow control */ + USB_SERIAL_NO_FLOW_CONTROL = 0, + /** Software flow control */ + USB_SERIAL_SOFTWARE_FLOW_CONTROL = 1, + /** Hardware flow control */ + USB_SERIAL_HARDWARE_FLOW_CONTROL = 2, +} UsbSerial_FlowControl; + +/** + * @brief Defines parity for USB SERIAL DDK. + * + * @since 16 + */ +typedef enum { + /** No parity */ + USB_SERIAL_PARITY_NONE = 0, + /** Odd parity */ + USB_SERIAL_PARITY_ODD = 1, + /** Even parity */ + USB_SERIAL_PARITY_EVEN = 2, +} UsbSerial_Parity; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif // DDK_USB_SERIAL_TYPES_H +/** @} */ diff --git a/ndk_targets.gni b/ndk_targets.gni index fa07e23a9..117b5fbf5 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -184,6 +184,8 @@ _ndk_library_targets = [ "//interface/sdk_c/distributeddatamgr/preferences:libohpreferences", "//interface/sdk_c/drivers/external_device_manager/usb:libusb_ndk", "//interface/sdk_c/drivers/external_device_manager/usb:usb_header", + "//interface/sdk_c/drivers/external_device_manager/usb_serial:libusb_serial", + "//interface/sdk_c/drivers/external_device_manager/usb_serial:usb_serial_header", "//interface/sdk_c/drivers/external_device_manager/hid:libhid", "//interface/sdk_c/drivers/external_device_manager/hid:hid_header", "//interface/sdk_c/drivers/external_device_manager/base:libddk_base", -- Gitee From 82b728b9fbd4802df76d75f481e4ff1a48a7344d Mon Sep 17 00:00:00 2001 From: youbing54 Date: Thu, 23 Jan 2025 11:52:11 +0800 Subject: [PATCH 463/630] IssueNo: https://gitee.com/openharmony/interface_sdk_c/issues/IBJG23 describe: add operate hand info in touchEvent Feature or Bugfix: Feature Binary Source:Yes Signed-off-by: youbing54 --- arkui/ace_engine/native/ui_input_event.h | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 1cc31e0f2..337e4991f 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -224,6 +224,20 @@ enum { UI_FOCUS_AXIS_EVENT_ABS_HAT0Y = 7, }; +/** + * @brief Defines whether the touch event is from the left or right hand. + * + * @since 16 + */ +typedef enum { + /** Unknown. */ + ARKUI_EVENT_HAND_NONE = 0, + /** Left hand. */ + ARKUI_EVENT_HAND_LEFT = 1, + /** Right hand. */ + ARKUI_EVENT_HAND_RIGHT = 2, +} ArkUI_InteractionHand; + /** * @brief Enumerates the action types for axis events. * @@ -510,6 +524,32 @@ float OH_ArkUI_PointerEvent_GetTouchAreaWidth(const ArkUI_UIInputEvent* event, u */ float OH_ArkUI_PointerEvent_GetTouchAreaHeight(const ArkUI_UIInputEvent* event, uint32_t pointerIndex); +/** + * @brief Obtains whether the current touch event is from the left or right hand. + * + * @param event Pointer to the current UI input event. + * @param hand Whether the touch point is from the left or right hand. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_GetInteractionHand(const ArkUI_UIInputEvent *event, ArkUI_InteractionHand *hand); + +/** + * @brief Obtains whether the current touch event is from the left or right hand. + * + * @param event Pointer to the current UI input event. + * @param pointerIndex Index of the target touch point in the multi-touch data list. + * @param hand Whether the touch point is from the left or right hand. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_GetInteractionHandByIndex( + const ArkUI_UIInputEvent *event, int32_t pointerIndex, ArkUI_InteractionHand *hand); + /** * @brief Obtains the number of historical events from a directional input event (such as a touch event, mouse event, * or axis event). -- Gitee From 4b3822449bde0c66470bd09c50802a3b9f0edaab Mon Sep 17 00:00:00 2001 From: fox Date: Fri, 24 Jan 2025 18:55:29 +0800 Subject: [PATCH 464/630] ii Signed-off-by: fox --- arkui/window_manager/libwm.ndk.json | 56 ++++++ arkui/window_manager/oh_window.h | 256 ++++++++++++++++++++++++++ arkui/window_manager/oh_window_comm.h | 125 +++++++++++++ 3 files changed, 437 insertions(+) create mode 100644 arkui/window_manager/oh_window.h diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index eef5bc066..d46913124 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -22,5 +22,61 @@ { "first_instroduced":"15", "name":"OH_NativeWindowManager_UnregisterTouchEventFilter" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_ShowWindow" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_IsWindowShown" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowStatusBarEnabled" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowStatusBarColor" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowNavigationBarEnabled" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_GetWindowAvoidArea" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowBackgroundColor" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowBrightness" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowKeepScreenOn" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowPrivacyMode" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_GetWindowProperties" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_Snapshot" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowTouchable" + }, + { + "first_instroduced":"16", + "name":"OH_WindowManager_SetWindowFocusable" } ] \ No newline at end of file diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h new file mode 100644 index 000000000..72f59b82c --- /dev/null +++ b/arkui/window_manager/oh_window.h @@ -0,0 +1,256 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup OH_Window + * @{ + * + * @brief Defines the data structures for the C APIs of the display module. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 16 + * @version 1.0 + */ + +/** + * @file oh_window.h + * + * @brief Declares APIs for window + * + * @kit ArkUI + * @library libnative_window_manager.so + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 16 + * @version 1.0 + */ +#ifndef OH_WINDOW_H +#define OH_WINDOW_H + +#include +#include "oh_window_comm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Set whether to show status bar. + * + * @param windowId WindowId when window is created. + * @param enabled If true, the status bar is displayed. If false, the status bar is hidden. + * @param enableAnimation If true, the status bar is displayed and hidden with animation. + * If false, the status bar is displayed and hidden with no animation. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowStatusBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); + +/** + * @brief Set status bar content color. + * + * @param windowId WindowId when window is created. + * @param color The color value to set, the format is ARGB. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowStatusBarColor(int32_t windowId, int32_t color); + +/** + * @brief Set whether to show navigation bar. + * + * @param windowId WindowId when window is created. + * @param enabled If true, the navigation bar is displayed. If false, the navigation bar is hidden. + * @param enableAnimation If true, the navigation bar is displayed and hidden with animation. + * If false, the navigation bar is displayed and hidden with no animation. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowNavigationBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); + +/** + * @brief Get the avoid area + * + * @param windowId WindowId when window is created. + * @param type Type of the avoid area. + * @param avoidArea Indicates the pointer to a WindowManager_AvoidArea object. + * @return Returns the status code of the execution. + * @return Return the result code. + * {@link OK} the function call is successful, return avoid area ptr in avoidArea. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_GetWindowAvoidArea( + int32_t windowId, WindowManager_AvoidAreaType type, WindowManager_AvoidArea* avoidArea); + +/** + * @brief Checks whether the window is displayed. + * + * @param windowId windowId when window is created. + * @param isShow Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * @since 16 + */ +WindowManager_ErrorCode OH_WindowManager_IsWindowShown(int32_t windowId, bool* isShow); + +/** + * @brief Show window. + * + * @param windowId windowId when window is created. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +WindowManager_ErrorCode OH_WindowManager_ShowWindow(int32_t windowId); + +/** + * @brief set window touchable status. + * + * @param windowId windowId when window is created. + * @param touchable window touchable status. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowTouchable(int32_t windowId, bool touchable); + +/** + * @brief Set focusable property of window. + * + * @param windowId WindowId when window is created. + * @param isFocusable Window can be focused or not. + * @return Returns the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormally. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowFocusable(int32_t windowId, bool isFocusable); + +/** + * @brief Sets the background color of window. + * + * @param windowId WindowId when window is created. + * @param color the specified color. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowBackgroundColor(int32_t windowId, const char* color); + +/** + * @brief Sets the brightness of window. + * + * @param windowId WindowId when window is created. + * @param brightness the specified brightness value. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowBrightness(int32_t windowId, float brightness); + +/** + * @brief Sets whether keep screen on or not. + * + * @param windowId WindowId when window is created. + * @param isKeepScreenOn keep screen on if true, or not if false. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScreenOn); + +/** + * @brief Sets whether is private mode or not. + * + * @param windowId WindowId when window is created. + * @param isPrivacy In private mode if true, or not if false. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); + +/** + * @brief Get the properties of current window. + * + * @param windowId WindowId when window is created. + * @param windowProperties Properties of current window. + * @return Return the result code. + * {@link OK} the function call is successful, return window properties ptr in windowProperties. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_GetWindowProperties( + int32_t windowId, WindowManager_WindowProperties* windowProperties); + +/** + * @brief Obtains snapshot of window. + * + * @param windowId windowId when window is created. + * @param pixelMap snapshot of window. + * @return Return the result code. + * {@link OK} the function call is successful, return pixel map ptr in pixelMap. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * @since 16 + */ +int32_t OH_WindowManager_Snapshot(int32_t windowId, OH_PixelmapNative* pixelMap); + +#ifdef __cplusplus +} +#endif +/** @} */ +#endif // OH_WINDOW_H \ No newline at end of file diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index f2e3a08d5..20a10e682 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -44,6 +44,13 @@ extern "C" { #endif +/** + * @brief The native pixel map information defined by Image Kit. + * + * @since 16 + */ +struct OH_PixelmapNative; + /** * @brief Enumerates the result types of the wm interface * @@ -53,11 +60,129 @@ typedef enum { /** succ. */ OK = 0, /** window id is invaild. */ + /** + * Param is invaild. + * + * @since 16 + */ + WINDOW_MANAGER_ERRORCODE_INVALID_PARAM = 401, INVAILD_WINDOW_ID = 1000, /** failed. */ SERVICE_ERROR = 2000, + /** + * Window state is abnormal. + * + * @since 16 + */ + WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY = 1300002, + /** + * Window state is abnormal. + * + * @since 16 + */ + WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY = 1300003, } WindowManager_ErrorCode; +/** + * @brief Enumerates the avoid area types. + * + * @since 16 + */ +typedef enum { + /** System. */ + WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM = 0, + /** Cutout. */ + WINDOW_MANAGER_AVOID_AREA_TYPE_CUTOUT = 1, + /** System gesture. */ + WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM_GESTURE = 2, + /** Keyboard. */ + WINDOW_MANAGER_AVOID_AREA_TYPE_KEYBOARD = 3, + /** Navigation indicator. */ + WINDOW_MANAGER_AVOID_AREA_TYPE_NAVIGATION_INDICATOR = 4, +} WindowManager_AvoidAreaType; + +/** + * @brief The type of a window + * + * @since 16 + */ +typedef enum { + /** Sub window. */ + WINDOW_MANAGER_WINDOW_TYPE_APP = 0, + /** Main Window. */ + WINDOW_MANAGER_WINDOW_TYPE_MAIN = 1, + /** Float. */ + WINDOW_MANAGER_WINDOW_TYPE_FLOAT = 8, + /** Dialog. */ + WINDOW_MANAGER_WINDOW_TYPE_DIALOG = 16, +} WindowManager_WindowType; + +/** + * @brief Defines the window rect data structure. + * + * @since 16 + */ +typedef struct { + /** X-axis of the window. */ + int32_t posX; + /** Y-axis of the window. */ + int32_t posY; + /** Width of the window. */ + uint32_t width; + /** Height of the window. */ + uint32_t height; +} WindowManager_Rect; + +/** + * @brief Properties of window + * + * @since 16 +*/ +typedef struct { + /** The position and size of the window */ + WindowManager_Rect windowRect; + /** The position relative to the window and size of drawable area */ + WindowManager_Rect drawableRect; + /** Window type */ + WindowManager_WindowType type; + /** Whether the window is displayed in full screen mode. The default value is false */ + bool isFullScreen; + /** Whether the window layout is in full screen mode(whether the window is immersive). The default value is false */ + bool isLayoutFullScreen; + /** Whether the window can gain focus. The default value is true */ + bool focusable; + /** Whether the window is touchable. The default value is false */ + bool touchable; + /** Brightness value of window */ + float brightness; + /** Whether keep screen on */ + bool isKeepScreenOn; + /** Whether make window in privacy mode or not */ + bool isPrivacyMode; + /** Whether is transparent or not */ + bool isTransparent; + /** Window id */ + uint32_t id; + /** Display id */ + uint32_t displayId; +} WindowManager_WindowProperties; + +/** + * @brief Defines the avoid area data structure. + * + * @since 16 + */ +typedef struct { + /** Top rect of the avoid area. */ + WindowManager_Rect topRect; + /** Left rect of the avoid area. */ + WindowManager_Rect leftRect; + /** Right rect of the avoid area. */ + WindowManager_Rect rightRect; + /** Bottom rect of the avoid area. */ + WindowManager_Rect bottomRect; +} WindowManager_AvoidArea; + #ifdef __cplusplus } #endif -- Gitee From 71c7ea1c96a23344f929d026d8bae85a0117efd0 Mon Sep 17 00:00:00 2001 From: fox Date: Fri, 24 Jan 2025 19:25:53 +0800 Subject: [PATCH 465/630] ii Signed-off-by: fox --- arkui/window_manager/oh_window.h | 1 + arkui/window_manager/oh_window_comm.h | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 72f59b82c..1ad0642b8 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -214,6 +214,7 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre * @return Return the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION} permission error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. * @since 16 diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 20a10e682..046974b26 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -59,13 +59,19 @@ struct OH_PixelmapNative; typedef enum { /** succ. */ OK = 0, - /** window id is invaild. */ + /** + * Permission is invaild. + * + * @since 16 + */ + WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION = 201, /** * Param is invaild. * * @since 16 */ WINDOW_MANAGER_ERRORCODE_INVALID_PARAM = 401, + /** window id is invaild. */ INVAILD_WINDOW_ID = 1000, /** failed. */ SERVICE_ERROR = 2000, -- Gitee From 0a2fe2d7849dfcbeabff7598d3b3b7239b21ef11 Mon Sep 17 00:00:00 2001 From: fox Date: Sun, 26 Jan 2025 15:29:31 +0800 Subject: [PATCH 466/630] iii Signed-off-by: fox --- arkui/window_manager/oh_window.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 1ad0642b8..81dc6364b 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -115,7 +115,8 @@ int32_t OH_WindowManager_GetWindowAvoidArea( * @brief Checks whether the window is displayed. * * @param windowId windowId when window is created. - * @param isShow Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. + * @param isShow Whether the window is displayed. + * The value true means that the window is displayed, and false means the opposite. * @return Return the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. @@ -214,7 +215,7 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre * @return Return the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION} permission error. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION} permission error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. * @since 16 -- Gitee From 58badb3b2fc4bfcb707903484d418ff7f84526e7 Mon Sep 17 00:00:00 2001 From: fox Date: Sun, 26 Jan 2025 15:49:59 +0800 Subject: [PATCH 467/630] iii Signed-off-by: fox --- arkui/window_manager/oh_window.h | 95 ++++++++++++++------------- arkui/window_manager/oh_window_comm.h | 17 +++-- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 81dc6364b..6b6094f4e 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -38,7 +38,8 @@ #ifndef OH_WINDOW_H #define OH_WINDOW_H -#include +#include "stdbool.h" +#include "stdint.h" #include "oh_window_comm.h" #ifdef __cplusplus @@ -52,12 +53,12 @@ extern "C" { * @param enabled If true, the status bar is displayed. If false, the status bar is hidden. * @param enableAnimation If true, the status bar is displayed and hidden with animation. * If false, the status bar is displayed and hidden with no animation. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_SetWindowStatusBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); @@ -67,12 +68,12 @@ int32_t OH_WindowManager_SetWindowStatusBarEnabled(int32_t windowId, bool enable * * @param windowId WindowId when window is created. * @param color The color value to set, the format is ARGB. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_SetWindowStatusBarColor(int32_t windowId, int32_t color); @@ -84,12 +85,12 @@ int32_t OH_WindowManager_SetWindowStatusBarColor(int32_t windowId, int32_t color * @param enabled If true, the navigation bar is displayed. If false, the navigation bar is hidden. * @param enableAnimation If true, the navigation bar is displayed and hidden with animation. * If false, the navigation bar is displayed and hidden with no animation. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_SetWindowNavigationBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); @@ -100,12 +101,11 @@ int32_t OH_WindowManager_SetWindowNavigationBarEnabled(int32_t windowId, bool en * @param windowId WindowId when window is created. * @param type Type of the avoid area. * @param avoidArea Indicates the pointer to a WindowManager_AvoidArea object. - * @return Returns the status code of the execution. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful, return avoid area ptr in avoidArea. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_GetWindowAvoidArea( @@ -117,51 +117,51 @@ int32_t OH_WindowManager_GetWindowAvoidArea( * @param windowId windowId when window is created. * @param isShow Whether the window is displayed. * The value true means that the window is displayed, and false means the opposite. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * @since 16 */ -WindowManager_ErrorCode OH_WindowManager_IsWindowShown(int32_t windowId, bool* isShow); +int32_t OH_WindowManager_IsWindowShown(int32_t windowId, bool* isShow); /** * @brief Show window. * * @param windowId windowId when window is created. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ -WindowManager_ErrorCode OH_WindowManager_ShowWindow(int32_t windowId); +int32_t OH_WindowManager_ShowWindow(int32_t windowId); /** * @brief set window touchable status. * * @param windowId windowId when window is created. * @param touchable window touchable status. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ -int32_t OH_WindowManager_SetWindowTouchable(int32_t windowId, bool touchable); +int32_t OH_WindowManager_SetWindowTouchable(int32_t windowId, bool isTouchable); /** * @brief Set focusable property of window. * * @param windowId WindowId when window is created. * @param isFocusable Window can be focused or not. - * @return Returns the result code. + * @return Returnss the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormally. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowFocusable(int32_t windowId, bool isFocusable); @@ -171,10 +171,10 @@ int32_t OH_WindowManager_SetWindowFocusable(int32_t windowId, bool isFocusable); * * @param windowId WindowId when window is created. * @param color the specified color. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * @since 16 */ int32_t OH_WindowManager_SetWindowBackgroundColor(int32_t windowId, const char* color); @@ -184,11 +184,11 @@ int32_t OH_WindowManager_SetWindowBackgroundColor(int32_t windowId, const char* * * @param windowId WindowId when window is created. * @param brightness the specified brightness value. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_SetWindowBrightness(int32_t windowId, float brightness); @@ -198,11 +198,11 @@ int32_t OH_WindowManager_SetWindowBrightness(int32_t windowId, float brightness) * * @param windowId WindowId when window is created. * @param isKeepScreenOn keep screen on if true, or not if false. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScreenOn); @@ -212,12 +212,12 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre * * @param windowId WindowId when window is created. * @param isPrivacy In private mode if true, or not if false. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION} permission error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); @@ -227,11 +227,11 @@ int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); * * @param windowId WindowId when window is created. * @param windowProperties Properties of current window. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful, return window properties ptr in windowProperties. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_GetWindowProperties( @@ -242,11 +242,11 @@ int32_t OH_WindowManager_GetWindowProperties( * * @param windowId windowId when window is created. * @param pixelMap snapshot of window. - * @return Return the result code. + * @return Returns the result code. * {@link OK} the function call is successful, return pixel map ptr in pixelMap. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_Snapshot(int32_t windowId, OH_PixelmapNative* pixelMap); @@ -254,5 +254,6 @@ int32_t OH_WindowManager_Snapshot(int32_t windowId, OH_PixelmapNative* pixelMap) #ifdef __cplusplus } #endif -/** @} */ -#endif // OH_WINDOW_H \ No newline at end of file + +#endif // OH_WINDOW_H +/** @} */ \ No newline at end of file diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 046974b26..9f65bbf4b 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * @addtogroup WindowManager_NativeModule * @{ @@ -60,17 +59,17 @@ typedef enum { /** succ. */ OK = 0, /** - * Permission is invaild. + * Param is invaild. * * @since 16 */ - WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION = 201, + WINDOW_MANAGER_ERRORCODE_INVALID_PARAM = 401, /** - * Param is invaild. + * Device not support. * * @since 16 */ - WINDOW_MANAGER_ERRORCODE_INVALID_PARAM = 401, + WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED = 401, /** window id is invaild. */ INVAILD_WINDOW_ID = 1000, /** failed. */ @@ -80,13 +79,13 @@ typedef enum { * * @since 16 */ - WINDOW_MANAGER_ERRORCODE_STATE_ABNORMALLY = 1300002, + WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL = 1300002, /** - * Window state is abnormal. + * Window manager service works abnormally. * * @since 16 */ - WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMALLY = 1300003, + WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL = 1300003, } WindowManager_ErrorCode; /** @@ -153,7 +152,7 @@ typedef struct { WindowManager_WindowType type; /** Whether the window is displayed in full screen mode. The default value is false */ bool isFullScreen; - /** Whether the window layout is in full screen mode(whether the window is immersive). The default value is false */ + /** Whether the window layout is in full screen mode. The default value is false */ bool isLayoutFullScreen; /** Whether the window can gain focus. The default value is true */ bool focusable; -- Gitee From 92ba845a596c9966ff3fb4c9b1c16961414d8e7c Mon Sep 17 00:00:00 2001 From: fox Date: Sun, 26 Jan 2025 16:03:08 +0800 Subject: [PATCH 468/630] iii Signed-off-by: fox --- arkui/window_manager/oh_window.h | 50 ++++++++++++--------------- arkui/window_manager/oh_window_comm.h | 38 ++++++++++---------- 2 files changed, 41 insertions(+), 47 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 6b6094f4e..12143cb84 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -14,26 +14,22 @@ */ /** - * @addtogroup OH_Window + * @addtogroup WindowManager * @{ * - * @brief Defines the data structures for the C APIs of the display module. + * @brief Provides abilities of window on the native side * - * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 16 - * @version 1.0 */ /** * @file oh_window.h * * @brief Declares APIs for window - * - * @kit ArkUI * @library libnative_window_manager.so + * @kit ArkUI * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 16 - * @version 1.0 */ #ifndef OH_WINDOW_H #define OH_WINDOW_H @@ -56,9 +52,9 @@ extern "C" { * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTEDED} capability not supported. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowStatusBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); @@ -71,9 +67,9 @@ int32_t OH_WindowManager_SetWindowStatusBarEnabled(int32_t windowId, bool enable * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowStatusBarColor(int32_t windowId, int32_t color); @@ -88,9 +84,9 @@ int32_t OH_WindowManager_SetWindowStatusBarColor(int32_t windowId, int32_t color * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORT} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowNavigationBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); @@ -105,7 +101,7 @@ int32_t OH_WindowManager_SetWindowNavigationBarEnabled(int32_t windowId, bool en * {@link OK} the function call is successful, return avoid area ptr in avoidArea. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_GetWindowAvoidArea( @@ -115,8 +111,7 @@ int32_t OH_WindowManager_GetWindowAvoidArea( * @brief Checks whether the window is displayed. * * @param windowId windowId when window is created. - * @param isShow Whether the window is displayed. - * The value true means that the window is displayed, and false means the opposite. + * @param isShow Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. @@ -128,26 +123,26 @@ int32_t OH_WindowManager_IsWindowShown(int32_t windowId, bool* isShow); /** * @brief Show window. * - * @param windowId windowId when window is created. + * @param windowId WindowId when window is created. * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_ShowWindow(int32_t windowId); /** - * @brief set window touchable status. + * @brief Set window touchable status. * - * @param windowId windowId when window is created. - * @param touchable window touchable status. + * @param windowId WindowId when window is created. + * @param isTouchable Indicates whether the specified window can be touched. * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowTouchable(int32_t windowId, bool isTouchable); @@ -157,7 +152,7 @@ int32_t OH_WindowManager_SetWindowTouchable(int32_t windowId, bool isTouchable); * * @param windowId WindowId when window is created. * @param isFocusable Window can be focused or not. - * @return Returnss the result code. + * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. @@ -188,7 +183,7 @@ int32_t OH_WindowManager_SetWindowBackgroundColor(int32_t windowId, const char* * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowBrightness(int32_t windowId, float brightness); @@ -202,7 +197,7 @@ int32_t OH_WindowManager_SetWindowBrightness(int32_t windowId, float brightness) * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScreenOn); @@ -217,7 +212,7 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION} permission error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); @@ -231,7 +226,6 @@ int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); * {@link OK} the function call is successful, return window properties ptr in windowProperties. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. * @since 16 */ int32_t OH_WindowManager_GetWindowProperties( @@ -246,7 +240,7 @@ int32_t OH_WindowManager_GetWindowProperties( * {@link OK} the function call is successful, return pixel map ptr in pixelMap. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 */ int32_t OH_WindowManager_Snapshot(int32_t windowId, OH_PixelmapNative* pixelMap); diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 9f65bbf4b..31c919a3f 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -14,11 +14,11 @@ */ /** - * @addtogroup WindowManager_NativeModule + * @addtogroup WindowManager * @{ * * - * @brief Provides abilities of windowManager on the native side, such as key event + * @brief Provides abilities of windowManager on the native side, such as key event * filtration. * * @since 12 @@ -48,7 +48,7 @@ extern "C" { * * @since 16 */ -struct OH_PixelmapNative; +typedef struct OH_PixelmapNative; /** * @brief Enumerates the result types of the wm interface @@ -59,7 +59,7 @@ typedef enum { /** succ. */ OK = 0, /** - * Param is invaild. + * Param is invalid. * * @since 16 */ @@ -69,7 +69,7 @@ typedef enum { * * @since 16 */ - WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED = 401, + WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED = 801, /** window id is invaild. */ INVAILD_WINDOW_ID = 1000, /** failed. */ @@ -114,7 +114,7 @@ typedef enum { typedef enum { /** Sub window. */ WINDOW_MANAGER_WINDOW_TYPE_APP = 0, - /** Main Window. */ + /** Main window. */ WINDOW_MANAGER_WINDOW_TYPE_MAIN = 1, /** Float. */ WINDOW_MANAGER_WINDOW_TYPE_FLOAT = 8, @@ -144,31 +144,31 @@ typedef struct { * @since 16 */ typedef struct { - /** The position and size of the window */ + /** The position and size of the window. */ WindowManager_Rect windowRect; - /** The position relative to the window and size of drawable area */ + /** The position relative to the window and size of drawable area. */ WindowManager_Rect drawableRect; - /** Window type */ + /** Window type. */ WindowManager_WindowType type; - /** Whether the window is displayed in full screen mode. The default value is false */ + /** Whether the window is displayed in full screen mode. The default value is false. */ bool isFullScreen; - /** Whether the window layout is in full screen mode. The default value is false */ + /** Whether the window layout is in full screen mode. The default value is false. */ bool isLayoutFullScreen; - /** Whether the window can gain focus. The default value is true */ + /** Whether the window can gain focus. The default value is true. */ bool focusable; - /** Whether the window is touchable. The default value is false */ + /** Whether the window is touchable. The default value is false. */ bool touchable; - /** Brightness value of window */ + /** Brightness value of window. */ float brightness; - /** Whether keep screen on */ + /** Whether keep screen on. */ bool isKeepScreenOn; - /** Whether make window in privacy mode or not */ + /** Whether make window in privacy mode or not. */ bool isPrivacyMode; - /** Whether is transparent or not */ + /** Whether is transparent or not. */ bool isTransparent; - /** Window id */ + /** Window id. */ uint32_t id; - /** Display id */ + /** Display id. */ uint32_t displayId; } WindowManager_WindowProperties; -- Gitee From 3620cf363e2a8c4f03e3f973c0064bbfa28da55c Mon Sep 17 00:00:00 2001 From: fox Date: Sun, 26 Jan 2025 16:08:26 +0800 Subject: [PATCH 469/630] iii Signed-off-by: fox --- arkui/window_manager/oh_window.h | 13 ++++++------- arkui/window_manager/oh_window_comm.h | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 12143cb84..c19a4a940 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -18,7 +18,6 @@ * @{ * * @brief Provides abilities of window on the native side - * * @since 16 */ @@ -28,7 +27,7 @@ * @brief Declares APIs for window * @library libnative_window_manager.so * @kit ArkUI - * @syscap SystemCapability.WindowManager.WindowManager.Core + * @syscap SystemCapability.Window.SessionManager.Core * @since 16 */ #ifndef OH_WINDOW_H @@ -36,6 +35,7 @@ #include "stdbool.h" #include "stdint.h" + #include "oh_window_comm.h" #ifdef __cplusplus @@ -52,7 +52,7 @@ extern "C" { * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTEDED} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 @@ -110,7 +110,7 @@ int32_t OH_WindowManager_GetWindowAvoidArea( /** * @brief Checks whether the window is displayed. * - * @param windowId windowId when window is created. + * @param windowId WindowId when window is created. * @param isShow Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. * @return Returns the result code. * {@link OK} the function call is successful. @@ -134,7 +134,7 @@ int32_t OH_WindowManager_IsWindowShown(int32_t windowId, bool* isShow); int32_t OH_WindowManager_ShowWindow(int32_t windowId); /** - * @brief Set window touchable status. + * @brief Set window touchable * * @param windowId WindowId when window is created. * @param isTouchable Indicates whether the specified window can be touched. @@ -210,7 +210,6 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre * @return Returns the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PERMISSION} permission error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 16 @@ -249,5 +248,5 @@ int32_t OH_WindowManager_Snapshot(int32_t windowId, OH_PixelmapNative* pixelMap) } #endif -#endif // OH_WINDOW_H +#endif // OH_WINDOW_H /** @} */ \ No newline at end of file diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 31c919a3f..d25ccb291 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -69,7 +69,7 @@ typedef enum { * * @since 16 */ - WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED = 801, + WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED = 801, /** window id is invaild. */ INVAILD_WINDOW_ID = 1000, /** failed. */ @@ -152,7 +152,7 @@ typedef struct { WindowManager_WindowType type; /** Whether the window is displayed in full screen mode. The default value is false. */ bool isFullScreen; - /** Whether the window layout is in full screen mode. The default value is false. */ + /** Whether the window layout is full screen mode. The default value is false. */ bool isLayoutFullScreen; /** Whether the window can gain focus. The default value is true. */ bool focusable; -- Gitee From 1f877e76a89e7cac27c04e37ee16e278c2cd6997 Mon Sep 17 00:00:00 2001 From: fox Date: Sun, 26 Jan 2025 16:10:51 +0800 Subject: [PATCH 470/630] iii Signed-off-by: fox --- arkui/window_manager/oh_window.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index c19a4a940..45d15c297 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -17,7 +17,7 @@ * @addtogroup WindowManager * @{ * - * @brief Provides abilities of window on the native side + * @brief Provides abilities of window on the native side. * @since 16 */ @@ -25,9 +25,10 @@ * @file oh_window.h * * @brief Declares APIs for window + * * @library libnative_window_manager.so * @kit ArkUI - * @syscap SystemCapability.Window.SessionManager.Core + * @syscap SystemCapability.Window.SessionManager * @since 16 */ #ifndef OH_WINDOW_H -- Gitee From 423e2288ae343a57ee17f26196e3af81ac3ec675 Mon Sep 17 00:00:00 2001 From: fox Date: Sun, 26 Jan 2025 16:56:49 +0800 Subject: [PATCH 471/630] iii Signed-off-by: fox --- arkui/window_manager/BUILD.gn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arkui/window_manager/BUILD.gn b/arkui/window_manager/BUILD.gn index fa532b650..b112add4c 100644 --- a/arkui/window_manager/BUILD.gn +++ b/arkui/window_manager/BUILD.gn @@ -21,6 +21,7 @@ ohos_ndk_library("native_window_manager") { output_extension = "so" system_capability = "SystemCapability.Window.SessionManager" system_capability_headers = [ + "oh_window", "oh_window_comm.h", "oh_window_event_filter.h", ] @@ -29,6 +30,7 @@ ohos_ndk_library("native_window_manager") { ohos_ndk_headers("window_manager_header") { dest_dir = "$ndk_headers_out_dir/window_manager" sources = [ + "oh_window", "oh_window_comm.h", "oh_window_event_filter.h", ] -- Gitee From 190423a86a39a9a68911aca3964f49fd068127bf Mon Sep 17 00:00:00 2001 From: fox Date: Sun, 26 Jan 2025 16:59:02 +0800 Subject: [PATCH 472/630] iii Signed-off-by: fox --- arkui/window_manager/BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/window_manager/BUILD.gn b/arkui/window_manager/BUILD.gn index b112add4c..b06760b56 100644 --- a/arkui/window_manager/BUILD.gn +++ b/arkui/window_manager/BUILD.gn @@ -21,7 +21,7 @@ ohos_ndk_library("native_window_manager") { output_extension = "so" system_capability = "SystemCapability.Window.SessionManager" system_capability_headers = [ - "oh_window", + "oh_window.h", "oh_window_comm.h", "oh_window_event_filter.h", ] @@ -30,7 +30,7 @@ ohos_ndk_library("native_window_manager") { ohos_ndk_headers("window_manager_header") { dest_dir = "$ndk_headers_out_dir/window_manager" sources = [ - "oh_window", + "oh_window.h", "oh_window_comm.h", "oh_window_event_filter.h", ] -- Gitee From fbf3120b76022b46acbcb0ddd5a0fbd293384bff Mon Sep 17 00:00:00 2001 From: jxw Date: Sun, 26 Jan 2025 12:16:23 +0000 Subject: [PATCH 473/630] update network/netmanager/include/net_connection.h. Signed-off-by: jxw --- network/netmanager/include/net_connection.h | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/network/netmanager/include/net_connection.h b/network/netmanager/include/net_connection.h index 13294313d..1cd795d05 100644 --- a/network/netmanager/include/net_connection.h +++ b/network/netmanager/include/net_connection.h @@ -344,6 +344,33 @@ int32_t OH_NetConn_RegisterDefaultNetConnCallback(NetConn_NetConnCallback *netCo */ int32_t OH_NetConn_UnregisterNetConnCallback(uint32_t callBackId); +/** + * @brief Sets the URL of the current PAC script. + * + * @param pacUrl the URL of the current PAC script. + * @return the result defines in {@link NetConn_ErrorCode}. + * {@link NETCONN_SUCCESS} Success. + * {@link NETCONN_PERMISSION_DENIED} Permission denied. + * {@link NETCONN_PARAMETER_ERROR} Parameter check failed. + * {@link NETCONN_OPERATION_FAILED} Failed to connect to the service. + * {@link NETCONN_INTERNAL_ERROR} System internal error. + * @permission ohos.permission.SET_PAC_URL + * @since 15 + */ +NetConn_ErrorCode OH_NetConn_SetPacUrl(const char *pacUrl); + +/** + * @brief Obtains the URL of the current PAC script. + * + * @param pacUrl the URL of the current PAC script. + * @return the result defines in {@link NetConn_ErrorCode}. + * {@link NETCONN_SUCCESS} Success. + * {@link NETCONN_PARAMETER_ERROR} Parameter check failed. + * {@link NETCONN_OPERATION_FAILED} Failed to connect to the service. + * {@link NETCONN_INTERNAL_ERROR} System internal error. + * @since 15 + */ +NetConn_ErrorCode OH_NetConn_GetPacUrl(char *pacUrl); #ifdef __cplusplus } #endif -- Gitee From 3eb2e8269caa1258ef3f0e6c1efa71a90fa398f2 Mon Sep 17 00:00:00 2001 From: jxw Date: Sun, 26 Jan 2025 12:17:11 +0000 Subject: [PATCH 474/630] update network/netmanager/include/net_connection_type.h. Signed-off-by: jxw --- .../netmanager/include/net_connection_type.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/network/netmanager/include/net_connection_type.h b/network/netmanager/include/net_connection_type.h index 663f39a7d..664656fd5 100644 --- a/network/netmanager/include/net_connection_type.h +++ b/network/netmanager/include/net_connection_type.h @@ -108,6 +108,28 @@ typedef enum NetConn_NetBearerType { NETCONN_BEARER_VPN = 4, } NetConn_NetBearerType; +/** + * @brief Enumerates NetConn error codes. + * + * @since 15 + */ +typedef enum NetConn_ErrorCode { + /** @error Success return code on success*/ + NETCONN_SUCCESS = 0, + /** @error Permission verification failed */ + NETCONN_PERMISSION_DENIED = 201, + /** @error Parameter check failed */ + NETCONN_PARAMETER_ERROR = 401, + /** @error Failed to connect to the service */ + NETCONN_OPERATION_FAILED = 2100002, + /** + * @error System internal error. + * 1. Memory-related error, for example, insufficient memory or memory data copy failures. + * 2. Null pointer error, for example, using memory that has already been released. + */ + NETCONN_INTERNAL_ERROR = 2100003 +} NetConn_ErrorCode; + /** * @brief Defines the network handle. * -- Gitee From 60d6a17bd296aeb651dda15ec2f84f327b103009 Mon Sep 17 00:00:00 2001 From: jxw Date: Sun, 26 Jan 2025 12:53:14 +0000 Subject: [PATCH 475/630] update network/netssl/include/net_ssl_c.h. Signed-off-by: jxw --- network/netssl/include/net_ssl_c.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/network/netssl/include/net_ssl_c.h b/network/netssl/include/net_ssl_c.h index 136ab3ca3..af21b8164 100644 --- a/network/netssl/include/net_ssl_c.h +++ b/network/netssl/include/net_ssl_c.h @@ -109,6 +109,32 @@ int32_t OH_NetStack_GetCertificatesForHostName(const char *hostname, NetStack_Ce */ void OH_Netstack_DestroyCertificatesContent(NetStack_Certificates *certs); +/** + * @brief Checks whether the Cleartext traffic is permitted. + * + * @permission ohos.permission.INTERNET + * @return 0 - Success. + * 201 - Permission denied. + * @param isCleartextPermitted Indicates output parameter, + * {@code true} if the Cleartext traffic is permitted, {@code false} otherwise. + * @since 16 + */ +int32_t OH_Netstack_IsCleartextPermitted(bool *isCleartextPermitted); + + +/** + * @brief Checks whether the Cleartext traffic for a specified hostname is permitted. + * + * @permission ohos.permission.INTERNET + * @return 0 - Success. + * 201 - Permission denied. + * @param hostname Indicates the host name. + * @param isCleartextPermitted Indicates output parameter, + * {@code true} if the Cleartext traffic for a specified hostname is permitted, {@code false} otherwise. + * @since 16 + */ +int32_t OH_Netstack_IsCleartextPermittedByHostName(const char *hostname, bool *isCleartextPermitted); + #ifdef __cplusplus } #endif -- Gitee From a430275c78a6e05699640338079bfb4ba6b419df Mon Sep 17 00:00:00 2001 From: jxw Date: Sun, 26 Jan 2025 13:02:25 +0000 Subject: [PATCH 476/630] update network/netssl/libnet_ssl_c.json. Signed-off-by: jxw --- network/netssl/libnet_ssl_c.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/network/netssl/libnet_ssl_c.json b/network/netssl/libnet_ssl_c.json index af49f5a35..595ffeec2 100644 --- a/network/netssl/libnet_ssl_c.json +++ b/network/netssl/libnet_ssl_c.json @@ -14,5 +14,13 @@ { "first_introduced":"12", "name": "OH_Netstack_DestroyCertificatesContent" + }, + { + "first_introduced":"16", + "name": "OH_Netstack_IsCleartextPermitted" + }, + { + "first_introduced":"16", + "name": "OH_Netstack_IsCleartextPermittedByHostName" } ] -- Gitee From b8e0e430170c14ae914b1af3ef4ec6684bbb33d8 Mon Sep 17 00:00:00 2001 From: jxw Date: Sun, 26 Jan 2025 14:15:29 +0000 Subject: [PATCH 477/630] update network/netmanager/libnet_connection.ndk.json. Signed-off-by: jxw --- network/netmanager/libnet_connection.ndk.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/network/netmanager/libnet_connection.ndk.json b/network/netmanager/libnet_connection.ndk.json index 41b98af11..56325004e 100644 --- a/network/netmanager/libnet_connection.ndk.json +++ b/network/netmanager/libnet_connection.ndk.json @@ -78,5 +78,13 @@ { "first_introduced": "13", "name": "OH_NetConn_UnregisterDnsResolver" + }, + { + "first_introduced": "15", + "name": "OH_NetConn_SetPacUrl" + }, + { + "first_introduced": "15", + "name": "OH_NetConn_GetPacUrl" } ] \ No newline at end of file -- Gitee From ca83eef090c3353fb07a5e784eb90be8f68858d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=BC=E6=AD=A4=E5=BD=BC=E6=AD=A4?= Date: Thu, 6 Feb 2025 09:28:31 +0800 Subject: [PATCH 478/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彼此彼此 --- .../avsource/libnative_media_avsource.ndk.json | 4 ++++ multimedia/av_codec/native_avsource.h | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json index 8758d51bb..26e8ab639 100644 --- a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json +++ b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json @@ -23,4 +23,8 @@ "first_introduced": "10", "name": "OH_AVSource_GetTrackFormat" } + { + "first_introduced": "16", + "name": "OH_AVSource_GetCustomMetaDataFormat" + } ] diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index 620a02b80..e50111823 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -137,6 +137,19 @@ OH_AVFormat *OH_AVSource_GetSourceFormat(OH_AVSource *source); */ OH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackIndex); +/** + * @brief Get the format info of custom metadata. + * It should be noted that the life cycle of the OH_AVFormat instance pointed to by the return value * needs + * to be manually released by the caller. + * @syscap SystemCapability.Multimedia.Media.Spliter + * @param source Pointer to an OH_AVSource instance. + * @return Returns the metadata's format info if the execution is successful, otherwise returns nullptr. + * Possible failure causes: + * 1. source is invalid. + * @since 16 + */ +OH_AVFormat *OH_AVSource_GetCustomMetaDataFormat(OH_AVSource *source); + #ifdef __cplusplus } #endif -- Gitee From a325bd7b26ed7e0cceefb2b41c59da0ffc9787c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=BC=E6=AD=A4=E5=BD=BC=E6=AD=A4?= Date: Thu, 6 Feb 2025 09:41:07 +0800 Subject: [PATCH 479/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彼此彼此 --- multimedia/av_codec/avsource/libnative_media_avsource.ndk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json index 26e8ab639..55fe52c8e 100644 --- a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json +++ b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json @@ -22,7 +22,7 @@ { "first_introduced": "10", "name": "OH_AVSource_GetTrackFormat" - } + }, { "first_introduced": "16", "name": "OH_AVSource_GetCustomMetaDataFormat" -- Gitee From c34fa71565a41dfc87ef8820cf1ae26025bc843d Mon Sep 17 00:00:00 2001 From: zhanghangkai Date: Sat, 25 Jan 2025 10:39:18 +0800 Subject: [PATCH 480/630] add action type for xweb focus move Signed-off-by: zhanghangkai Change-Id: Ibd0e732eb6e97035b08c399133def18dc90abd47 --- arkui/ace_engine/native/native_interface_accessibility.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arkui/ace_engine/native/native_interface_accessibility.h b/arkui/ace_engine/native/native_interface_accessibility.h index cbe48c58e..03c14702f 100644 --- a/arkui/ace_engine/native/native_interface_accessibility.h +++ b/arkui/ace_engine/native/native_interface_accessibility.h @@ -107,6 +107,14 @@ typedef enum { ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SET_TEXT = 0x00004000, /** Cursor position setting action. */ ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SET_CURSOR_POSITION = 0x00100000, + /** Support action for find next item in focus move operation + * @since 15 + */ + ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_NEXT_HTML_ITEM = 0x02000000, + /** Support action for find previous item in focus move operation + * @since 15 + */ + ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_PREVIOUS_HTML_ITEM = 0x04000000, } ArkUI_Accessibility_ActionType; /** -- Gitee From d794850d1187d87ecf65d880ed043d3493122002 Mon Sep 17 00:00:00 2001 From: l00844999 Date: Wed, 5 Feb 2025 10:42:46 +0800 Subject: [PATCH 481/630] Drawing themefont change api version Signed-off-by: l00844999 --- graphic/graphic_2d/native_drawing/drawing_font.h | 4 ++-- graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index f7e6311de..dd8601730 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -561,7 +561,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetTextPath(const OH_Drawing_Font* font, con * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font is nullptr. - * @since 16 + * @since 15 */ OH_Drawing_ErrorCode OH_Drawing_FontSetThemeFontFollowed(OH_Drawing_Font* font, bool followed); @@ -574,7 +574,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontSetThemeFontFollowed(OH_Drawing_Font* font, * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font or followed is nullptr. - * @since 16 + * @since 15 */ OH_Drawing_ErrorCode OH_Drawing_FontIsThemeFontFollowed(const OH_Drawing_Font* font, bool* followed); diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index d59106554..6ee257eb1 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -263,7 +263,7 @@ "name": "OH_Drawing_FontIsSubpixel" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_Drawing_FontIsThemeFontFollowed" }, { @@ -305,7 +305,7 @@ "name": "OH_Drawing_FontSetSubpixel" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_Drawing_FontSetThemeFontFollowed" }, { -- Gitee From e6a60f872d5f780026fcd1de2ddc71d5881533eb Mon Sep 17 00:00:00 2001 From: liuyaning Date: Wed, 8 Jan 2025 09:36:32 +0800 Subject: [PATCH 482/630] Remove redundant files from NDK Remove redundant files from NDK Issue:https://gitee.com/openharmony/interface_sdk_c/issues/IBGCTE Signed-off-by: liuyaning --- third_party/musl/ndk_script/toolchain.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/third_party/musl/ndk_script/toolchain.sh b/third_party/musl/ndk_script/toolchain.sh index 7f90ff69d..3f509f7bc 100755 --- a/third_party/musl/ndk_script/toolchain.sh +++ b/third_party/musl/ndk_script/toolchain.sh @@ -49,4 +49,14 @@ function strip_dir() { fi done } +function remove_unnecessary_file { + file_list=("lib/clang/current" "lib/arm-liteos-ohos" "lib/loongarch64-linux-ohos" "lib/mipsel-linux-ohos" "lib/riscv64-linux-ohos" "lib/clang/15.0.4/bin/loongarch64-linux-ohos" "lib/clang/15.0.4/lib/arm-liteos-ohos" "lib/clang/15.0.4/lib/i386-unknown-linux-gnu" "lib/clang/15.0.4/lib/loongarch64-linux-ohos" "lib/clang/15.0.4/lib/mipsel-linux-ohos" "lib/clang/15.0.4/lib/riscv64-linux-ohos" "lib/clang/15.0.4/lib/windows") + + for i in "${file_list[@]}"; do + if [ -d "${OUT_DIR}/${i}" ]; then + rm -rf "${OUT_DIR}/${i}" + fi + done +} +remove_unnecessary_file strip_dir ${OUT_DIR}/lib -- Gitee From cfba255b219c4439a49395d76bf6f5f05dbf505d Mon Sep 17 00:00:00 2001 From: verystone Date: Sun, 26 Jan 2025 19:25:29 +0800 Subject: [PATCH 483/630] Remove redundant function Signed-off-by: verystone --- .../pasteboard/include/oh_pasteboard.h | 12 ------------ distributeddatamgr/pasteboard/libpasteboard.ndk.json | 4 ---- 2 files changed, 16 deletions(-) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 2f525272d..547d3c054 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -417,18 +417,6 @@ void OH_Pasteboard_GetDataParams_SetProgressListener(Pasteboard_GetDataParams* p */ int OH_Pasteboard_ProgressInfo_GetProgress(Pasteboard_ProgressInfo* progressInfo); -/** - * @brief Get the remote device name from the {@link Pasteboard_ProgressInfo}. - * - * @param progressInfo Represents a pointer to an instance of {@link Pasteboard_ProgressInfo}. - * @param deviceName Pointer to remote device name. - * @param deviceNameLen Indicates the length of remote device name. - * @see Pasteboard_ProgressInfo - * @since 15 - */ -void OH_Pasteboard_ProgressInfo_GetRemoteDeviceName(Pasteboard_ProgressInfo* progressInfo, char* deviceName, - uint32_t deviceNameLen); - /** * @brief Defines the cancel function used to cancel the progress when getting PasteData. * diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index 4b4dd307d..f642d1eb7 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -87,10 +87,6 @@ "first_introduced": "15", "name": "OH_Pasteboard_ProgressInfo_GetProgress" }, - { - "first_introduced": "15", - "name": "OH_Pasteboard_ProgressInfo_GetRemoteDeviceName" - }, { "first_introduced": "15", "name": "OH_Pasteboard_ProgressCancel" -- Gitee From 5892e4648856c747d60544b4a710f0747de9ce6a Mon Sep 17 00:00:00 2001 From: fox Date: Thu, 6 Feb 2025 19:28:10 +0800 Subject: [PATCH 484/630] i Signed-off-by: fox --- arkui/window_manager/oh_window.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 45d15c297..1f392f2cb 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -18,7 +18,7 @@ * @{ * * @brief Provides abilities of window on the native side. - * @since 16 + * @since 15 */ /** @@ -29,7 +29,7 @@ * @library libnative_window_manager.so * @kit ArkUI * @syscap SystemCapability.Window.SessionManager - * @since 16 + * @since 15 */ #ifndef OH_WINDOW_H #define OH_WINDOW_H @@ -56,7 +56,7 @@ extern "C" { * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowStatusBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); @@ -71,7 +71,7 @@ int32_t OH_WindowManager_SetWindowStatusBarEnabled(int32_t windowId, bool enable * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowStatusBarColor(int32_t windowId, int32_t color); @@ -88,7 +88,7 @@ int32_t OH_WindowManager_SetWindowStatusBarColor(int32_t windowId, int32_t color * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowNavigationBarEnabled(int32_t windowId, bool enabled, bool enableAnimation); @@ -103,7 +103,7 @@ int32_t OH_WindowManager_SetWindowNavigationBarEnabled(int32_t windowId, bool en * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_GetWindowAvoidArea( int32_t windowId, WindowManager_AvoidAreaType type, WindowManager_AvoidArea* avoidArea); @@ -117,7 +117,7 @@ int32_t OH_WindowManager_GetWindowAvoidArea( * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_IsWindowShown(int32_t windowId, bool* isShow); @@ -130,7 +130,7 @@ int32_t OH_WindowManager_IsWindowShown(int32_t windowId, bool* isShow); * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_ShowWindow(int32_t windowId); @@ -206,6 +206,7 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre /** * @brief Sets whether is private mode or not. * + * @permission {@code ohos.permission.PRIVACY_WINDOW} * @param windowId WindowId when window is created. * @param isPrivacy In private mode if true, or not if false. * @return Returns the result code. @@ -213,6 +214,7 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. + * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. * @since 16 */ int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); -- Gitee From e56de193ed384158eec9d1e6e976f091de93c290 Mon Sep 17 00:00:00 2001 From: fox Date: Thu, 6 Feb 2025 19:38:16 +0800 Subject: [PATCH 485/630] i Signed-off-by: fox --- arkui/window_manager/oh_window_comm.h | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index d25ccb291..ba69f537e 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -59,15 +59,21 @@ typedef enum { /** succ. */ OK = 0, /** - * Param is invalid. + * @error No permission. * * @since 16 */ + WINDOW_MANAGER_ERRORCODE_NO_PERMISSION = 401, + /** + * @error Param is invalid. + * + * @since 15 + */ WINDOW_MANAGER_ERRORCODE_INVALID_PARAM = 401, /** - * Device not support. + * @error Device not support. * - * @since 16 + * @since 15 */ WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED = 801, /** window id is invaild. */ @@ -75,15 +81,15 @@ typedef enum { /** failed. */ SERVICE_ERROR = 2000, /** - * Window state is abnormal. + * @error Window state is abnormal. * - * @since 16 + * @since 15 */ WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL = 1300002, /** - * Window manager service works abnormally. + * @error Window manager service works abnormally. * - * @since 16 + * @since 15 */ WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL = 1300003, } WindowManager_ErrorCode; @@ -91,7 +97,7 @@ typedef enum { /** * @brief Enumerates the avoid area types. * - * @since 16 + * @since 15 */ typedef enum { /** System. */ @@ -125,7 +131,7 @@ typedef enum { /** * @brief Defines the window rect data structure. * - * @since 16 + * @since 15 */ typedef struct { /** X-axis of the window. */ @@ -175,7 +181,7 @@ typedef struct { /** * @brief Defines the avoid area data structure. * - * @since 16 + * @since 15 */ typedef struct { /** Top rect of the avoid area. */ -- Gitee From 2eda878ec714fc0ee7c1a19411c227dcb27ca7f8 Mon Sep 17 00:00:00 2001 From: fox Date: Thu, 6 Feb 2025 19:39:10 +0800 Subject: [PATCH 486/630] ii Signed-off-by: fox --- arkui/window_manager/oh_window_comm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index ba69f537e..f45e3ae32 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -63,7 +63,7 @@ typedef enum { * * @since 16 */ - WINDOW_MANAGER_ERRORCODE_NO_PERMISSION = 401, + WINDOW_MANAGER_ERRORCODE_NO_PERMISSION = 201, /** * @error Param is invalid. * -- Gitee From 756f9ac0c8bfd72ec95f6a8db53049ea04397d19 Mon Sep 17 00:00:00 2001 From: hanKF Date: Mon, 27 Jan 2025 16:38:44 +0800 Subject: [PATCH 487/630] add display callback Signed-off-by: hanKF --- .../player_framework/native_avscreen_capture.h | 17 +++++++++++++++++ .../native_avscreen_capture_base.h | 11 +++++++++++ 2 files changed, 28 insertions(+) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index c508cae4f..3ce096137 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -446,6 +446,23 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetMaxVideoFrameRate(struct OH_AV */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapture *capture, bool showCursor); + +/** + * @brief Set the display selection callback function so that your application can respond to the + * display device selected events generated by the av screen capture. + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param capture Pointer to an OH_AVScreenCapture instance + * @param callback State callback function, see {@link OH_AVScreenCapture_OnDisplaySelected} + * @param userData Pointer to user specific data + * @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 callback is nullptr. + * {@link AV_SCREEN_CAPTURE_ERR_NO_MEMORY} no memory, mem allocate failed. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_STATE} This interface should be called before Start is called. + * @since 15 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetDisplayCallback(struct OH_AVScreenCapture *capture, + OH_AVScreenCapture_OnDisplaySelected callback, void *userData); #ifdef __cplusplus } #endif diff --git a/multimedia/player_framework/native_avscreen_capture_base.h b/multimedia/player_framework/native_avscreen_capture_base.h index deed04f4c..46296bf53 100644 --- a/multimedia/player_framework/native_avscreen_capture_base.h +++ b/multimedia/player_framework/native_avscreen_capture_base.h @@ -521,6 +521,17 @@ typedef void (*OH_AVScreenCapture_OnError)(OH_AVScreenCapture *capture, int32_t typedef void (*OH_AVScreenCapture_OnBufferAvailable)(OH_AVScreenCapture *capture, OH_AVBuffer *buffer, OH_AVScreenCaptureBufferType bufferType, int64_t timestamp, void *userData); +/** + * @brief When one of the display devices start being captured, the function pointer will be called + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param capture Pointer to an OH_AVScreenCapture instance + * @param displayId Id of the display device that being captured + * @param userData Pointer to user specific data + * + * @since 15 + */ +typedef void (*OH_AVScreenCapture_OnDisplaySelected)(OH_AVScreenCapture *capture, uint64_t displayId, void *userData); + #ifdef __cplusplus } #endif -- Gitee From 85d55e6d152c25d7a4323da33e66da9945681e7d Mon Sep 17 00:00:00 2001 From: hanKF Date: Thu, 6 Feb 2025 19:53:27 +0800 Subject: [PATCH 488/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hanKF --- multimedia/player_framework/native_avscreen_capture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 3ce096137..7a9396d26 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -452,7 +452,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapt * display device selected events generated by the av screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @param capture Pointer to an OH_AVScreenCapture instance - * @param callback State callback function, see {@link OH_AVScreenCapture_OnDisplaySelected} + * @param callback display device selection callback function, see {@link OH_AVScreenCapture_OnDisplaySelected} * @param userData Pointer to user specific data * @return Function result code. * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. -- Gitee From c338d8a94c2c9e815f1600b0b714a6f711ac8da2 Mon Sep 17 00:00:00 2001 From: hanKF Date: Thu, 6 Feb 2025 20:22:09 +0800 Subject: [PATCH 489/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hanKF --- multimedia/player_framework/native_avscreen_capture_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/native_avscreen_capture_base.h b/multimedia/player_framework/native_avscreen_capture_base.h index 46296bf53..85b1280d1 100644 --- a/multimedia/player_framework/native_avscreen_capture_base.h +++ b/multimedia/player_framework/native_avscreen_capture_base.h @@ -527,7 +527,7 @@ typedef void (*OH_AVScreenCapture_OnBufferAvailable)(OH_AVScreenCapture *capture * @param capture Pointer to an OH_AVScreenCapture instance * @param displayId Id of the display device that being captured * @param userData Pointer to user specific data - * + * * @since 15 */ typedef void (*OH_AVScreenCapture_OnDisplaySelected)(OH_AVScreenCapture *capture, uint64_t displayId, void *userData); -- Gitee From cc629c204c7c4a5aa785c9080c59f206126312bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=B9=94=E5=BC=82?= Date: Thu, 6 Feb 2025 20:56:19 +0800 Subject: [PATCH 490/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20API=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈乔异 --- multimedia/image_framework/include/image/image_common.h | 2 +- multimedia/image_framework/include/image/pixelmap_native.h | 4 ++-- multimedia/image_framework/libpixelmap.ndk.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 4f7a74b19..d1513fd79 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -176,7 +176,7 @@ typedef enum { IMAGE_COPY_FAILED = 7600302, /** * @error memory lock or unlock failed - * @since 16 + * @since 15 */ IMAGE_LOCK_UNLOCK_FAILED = 7600303, /** unknown error */ diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 043f17ae7..0fa0d4ed7 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -974,7 +974,7 @@ Image_ErrorCode OH_PixelmapNative_GetAllocationByteCount(OH_PixelmapNative *pixe * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or addr are invalid. * {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be locked. * @see OH_PixelmapNative - * @since 16 + * @since 15 */ Image_ErrorCode OH_PixelmapNative_AccessPixels(OH_PixelmapNative *pixelmap, void **addr); @@ -988,7 +988,7 @@ Image_ErrorCode OH_PixelmapNative_AccessPixels(OH_PixelmapNative *pixelmap, void * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap is invalid. * {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be unlocked. * @see OH_PixelmapNative - * @since 16 + * @since 15 */ Image_ErrorCode OH_PixelmapNative_UnaccessPixels(OH_PixelmapNative *pixelmap); diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 7416d77b9..240f95038 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -200,11 +200,11 @@ "name": "OH_PixelmapNative_GetAllocationByteCount" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_PixelmapNative_AccessPixels" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_PixelmapNative_UnaccessPixels" } ] \ No newline at end of file -- Gitee From aca7e587943ffd635f5973ce862688a49258c5a9 Mon Sep 17 00:00:00 2001 From: hanKF Date: Fri, 7 Feb 2025 09:04:19 +0800 Subject: [PATCH 491/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BAapi16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hanKF --- multimedia/player_framework/native_avscreen_capture.h | 2 +- multimedia/player_framework/native_avscreen_capture_base.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 7a9396d26..d12e075cf 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -459,7 +459,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapt * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} input capture is nullptr or input callback is nullptr. * {@link AV_SCREEN_CAPTURE_ERR_NO_MEMORY} no memory, mem allocate failed. * {@link AV_SCREEN_CAPTURE_ERR_INVALID_STATE} This interface should be called before Start is called. - * @since 15 + * @since 16 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetDisplayCallback(struct OH_AVScreenCapture *capture, OH_AVScreenCapture_OnDisplaySelected callback, void *userData); diff --git a/multimedia/player_framework/native_avscreen_capture_base.h b/multimedia/player_framework/native_avscreen_capture_base.h index 85b1280d1..7bea8d0e6 100644 --- a/multimedia/player_framework/native_avscreen_capture_base.h +++ b/multimedia/player_framework/native_avscreen_capture_base.h @@ -528,7 +528,7 @@ typedef void (*OH_AVScreenCapture_OnBufferAvailable)(OH_AVScreenCapture *capture * @param displayId Id of the display device that being captured * @param userData Pointer to user specific data * - * @since 15 + * @since 16 */ typedef void (*OH_AVScreenCapture_OnDisplaySelected)(OH_AVScreenCapture *capture, uint64_t displayId, void *userData); -- Gitee From 8ae107f8ac8b27d1ae02d6f5d59962a6829cf711 Mon Sep 17 00:00:00 2001 From: lihui Date: Fri, 7 Feb 2025 09:37:39 +0800 Subject: [PATCH 492/630] fix new format since 15 Signed-off-by: lihui --- graphic/graphic_2d/native_buffer/native_buffer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h index 7723c55fe..70d47a631 100644 --- a/graphic/graphic_2d/native_buffer/native_buffer.h +++ b/graphic/graphic_2d/native_buffer/native_buffer.h @@ -195,12 +195,12 @@ typedef enum OH_NativeBuffer_Format { NATIVEBUFFER_PIXEL_FMT_RAW10, /** * BLOB format - * @since 16 + * @since 15 */ NATIVEBUFFER_PIXEL_FMT_BLOB, /** * RGBA16 float format - * @since 16 + * @since 15 */ NATIVEBUFFER_PIXEL_FMT_RGBA16_FLOAT, /** -- Gitee From f812a9f57277f9e62ddb26068c8c7b44f1a42315 Mon Sep 17 00:00:00 2001 From: hanKF Date: Fri, 7 Feb 2025 10:18:19 +0800 Subject: [PATCH 493/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hanKF --- multimedia/player_framework/native_avscreen_capture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index d12e075cf..4c306d085 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -448,8 +448,8 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapt bool showCursor); /** - * @brief Set the display selection callback function so that your application can respond to the - * display device selected events generated by the av screen capture. + * @brief Set the display device selection callback function so that your application can respond to the + * display device selected event generated by the av screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @param capture Pointer to an OH_AVScreenCapture instance * @param callback display device selection callback function, see {@link OH_AVScreenCapture_OnDisplaySelected} -- Gitee From 9f7de8fa0ed0e40002361dc17720aa1b4495e098 Mon Sep 17 00:00:00 2001 From: l00844999 Date: Fri, 7 Feb 2025 10:55:34 +0800 Subject: [PATCH 494/630] =?UTF-8?q?drawing=20=E8=A7=84=E8=8C=83=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20Signed-off-by:=20l00844999=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../native_drawing/drawing_gpu_context.h | 2 +- .../native_drawing/drawing_path_effect.h | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h index 9bc3239bd..1949a5e72 100644 --- a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h +++ b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h @@ -76,7 +76,7 @@ OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOp * @since 16 * @version 1.0 */ -OH_Drawing_GpuContext* OH_Drawing_GpuContextCreate(); +OH_Drawing_GpuContext* OH_Drawing_GpuContextCreate(void); /** * @brief Destroys an OH_Drawing_GpuContext object and reclaims the memory occupied by the object. diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h index 78c5d8f09..e89201d14 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h @@ -47,19 +47,19 @@ extern "C" { #endif /** - * @brief Enumerate path effect types. + * @brief Enumerate path dash style. * * @since 16 * @version 1.0 */ typedef enum { - /** Indicates that the path effect is a translation effect. */ - PATH_EFFECT_TRANSLATE, - /** Indicates that the path effect is a rotation effect. */ - PATH_EFFECT_ROTATE, - /** Indicates that the path effect is a morph effect. */ - PATH_EFFECT_MORPH, -} OH_Drawing_PathEffectType; + /** Indicates translation effect. */ + DRAWING_PATH_DASH_STYLE_TRANSLATE, + /** Indicates rotation effect. */ + DRAWING_PATH_DASH_STYLE_ROTATE, + /** Indicates morph effect. */ + DRAWING_PATH_DASH_STYLE_MORPH, +} OH_Drawing_PathDashStyle; /** * @brief Creates an OH_Drawing_PathEffect object that is a combination of paths, @@ -121,7 +121,7 @@ OH_Drawing_PathEffect* OH_Drawing_CreateDiscretePathEffect(float segLength, floa * @param path Indicates the pointer to an OH_Drawing_Path object. * @param advance Indicates the distance between the dashed segments. * @param phase Indicates the offset into intervals array. - * @param type Indicates the type of the path effect. + * @param type Indicates the type of the path dash effect. * @return Returns the pointer to the OH_Drawing_PathEffect object created. * If nullptr is returned, the creation fails. * The possible cause of the failure is advance and phase are zero or less. @@ -129,7 +129,7 @@ OH_Drawing_PathEffect* OH_Drawing_CreateDiscretePathEffect(float segLength, floa * @version 1.0 */ OH_Drawing_PathEffect* OH_Drawing_CreatePathDashEffect(const OH_Drawing_Path* path, float advance, float phase, - OH_Drawing_PathEffectType type); + OH_Drawing_PathDashStyle type); /** * @brief Creates an OH_Drawing_PathEffect object by overlaying two path effects. -- Gitee From f9b71ce743b1c09d97444f07f1a543a856314647 Mon Sep 17 00:00:00 2001 From: hanKF Date: Fri, 7 Feb 2025 10:56:08 +0800 Subject: [PATCH 495/630] =?UTF-8?q?=E8=A1=A5=E5=85=85json=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hanKF --- .../avscreen_capture/libnative_avscreen_capture.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json index 8b135b291..47af4509b 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -106,5 +106,9 @@ { "first_introduced": "15", "name": "OH_AVScreenCapture_ShowCursor" + }, + { + "first_introduced": "16", + "name": "OH_AVScreenCapture_SetDisplayCallback" } ] \ No newline at end of file -- Gitee From 6da2b840a71d2bc3b86d8f3cd11534965338dd34 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Sun, 26 Jan 2025 17:50:53 +0800 Subject: [PATCH 496/630] Gesture recognizer get capi add Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 36 +++++++ arkui/ace_engine/native/native_gesture.h | 115 +++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 5 + 3 files changed, 156 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index e11e7282f..ddf21be4b 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2563,6 +2563,42 @@ "first_introduced": "15", "name": "OH_ArkUI_AccessibilityProviderRegisterCallbackWithInstance" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_FingerCount" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_limitFingerCount" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_repeat" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_distance" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_speed" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_duration" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_angle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_distanceThreshold" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GetGestureParam_DirectMask" + }, { "first_introduced": "16", "name": "OH_ArkUI_KeyEvent_Dispatch" diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index 1c03c3746..a694089d5 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -666,6 +666,121 @@ int32_t OH_ArkUI_ParallelInnerGestureEvent_GetConflictRecognizers(ArkUI_Parallel int32_t OH_ArkUI_SetArkUIGestureRecognizerDisposeNotify(ArkUI_GestureRecognizer* recognizer, ArkUI_GestureRecognizerDisposeNotifyCallback callback, void* userData); +/** +* @brief Obtains the swipe direction of a gesture recognizer. +* +* @param recognizer Pointer to a gesture recognizer. +* @param directMask Swipe direction of the gesture recognizer. +* @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. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_DirectMask( + ArkUI_GestureRecognizer* recognizer, ArkUI_GestureDirectionMask* directMask); + +/** +* @brief Obtains the number of fingers used by a gesture recognizer. +* +* @param recognizer Pointer to a gesture recognizer. +* @param finger Number of fingers used by the gesture recognizer. +* @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. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_FingerCount(ArkUI_GestureRecognizer* recognizer, int* finger); + +/** +* @brief Checks whether a gesture recognizer has a finger count limit. +* +* @param recognizer Pointer to a gesture recognizer. +* @param isLimited Whether the gesture recognizer has a finger count limit. +* @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. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_limitFingerCount(ArkUI_GestureRecognizer* recognizer, bool* isLimited); + +/** +* @brief Checks whether a gesture recognizer supports repeated event callbacks. +* +* @param recognizer Pointer to a gesture recognizer. +* @param isRepeat Whether the gesture recognizer supports repeated event callbacks. +* @return Returns the result code. +* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. +* Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not +* supported. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_repeat(ArkUI_GestureRecognizer* recognizer, bool* isRepeat); + +/** +* @brief Obtains the allowed movement distance range for a gesture recognizer. +* +* @param recognizer Pointer to a gesture recognizer. +* @param distance Allowed movement distance range of the gesture recognizer. +* @return Returns the result code. +* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. +* Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not +* supported. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_distance(ArkUI_GestureRecognizer* recognizer, double* distance); + +/** +* @brief Obtains the minimum swipe speed recognized by a gesture recognizer. +* +* @param recognizer Pointer to a gesture recognizer. +* @param speed Minimum swipe speed recognized by a gesture recognizer. +* @return Returns the result code. +* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. +* Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not +* supported. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_speed(ArkUI_GestureRecognizer* recognizer, double* speed); + +/** +* @brief Obtains the minimum duration required to trigger a long press by a gesture recognizer. +* +* @param recognizer Pointer to a gesture recognizer. +* @param duration Minimum duration for a long press. +* @return Returns the result code. +* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. +* Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not +* supported. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_duration(ArkUI_GestureRecognizer* recognizer, int* duration); + +/** +* @brief Obtains the minimum angle change required for a rotation gesture to be recognized by a gesture recognizer. +* +* @param recognizer Pointer to a gesture recognizer. +* @param angle Minimum angle change. +* @return Returns the result code. +* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. +* Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not +* supported. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_angle(ArkUI_GestureRecognizer* recognizer, double* angle); + +/** +* @brief Obtains the movement threshold for gestures to be recognized by a gesture recognizer. +* +* @param recognizer Pointer to a gesture recognizer. +* @param distanceThresHold Movement threshold. +* @return Returns the result code. +* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. +* Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not +* supported. +* @since 16 +*/ +int32_t OH_ArkUI_GetGestureParam_distanceThreshold(ArkUI_GestureRecognizer* recognizer, double* distanceThreshold); + /** * @brief Defines the gesture APIs. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 3f9a7820b..20cebacea 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2187,6 +2187,11 @@ typedef enum { * @since 16 */ ARKUI_ERROR_CODE_CALLBACK_INVALID = 190002, + /** + * @error The gesture recognizer type is not supported. + * @since 16 + */ + ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED = 180102, } ArkUI_ErrorCode; /** -- Gitee From 5cf0b0172eb4b51ebbaff9603118dca5d81e230f Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Wed, 22 Jan 2025 10:25:52 +0800 Subject: [PATCH 497/630] clickevent Signed-off-by: zhouchaobo --- arkui/ace_engine/native/native_node.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d82ad42ef..c7d44068c 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6504,6 +6504,16 @@ typedef enum { */ NODE_DISPATCH_KEY_EVENT = 24, + /** + * @brief Defines the event triggered when the bound component is clicked. + * + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_UIInputEvent}. \n + * + * @since 16 + */ + NODE_ON_CLICK_EVENT = 26, + /** * @brief Defines the event triggered when the mouse pointer hovers over or moves away from a component. * -- Gitee From 017b3354688da12f53ef47e3e4909ba3df45f53c Mon Sep 17 00:00:00 2001 From: AnBetter Date: Fri, 7 Feb 2025 14:25:13 +0800 Subject: [PATCH 498/630] =?UTF-8?q?Progress=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81strokeWidth/strokeRadius/enableSmoothEffect=E4=BF=AE?= =?UTF-8?q?=E6=94=B9API=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AnBetter --- arkui/ace_engine/native/libace.ndk.json | 20 ++++++++++---------- arkui/ace_engine/native/native_node.h | 2 +- arkui/ace_engine/native/native_type.h | 22 +++++++++++----------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index e11e7282f..f6a8e7160 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2568,27 +2568,27 @@ "name": "OH_ArkUI_KeyEvent_Dispatch" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_Create" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_Destroy" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius" }, { @@ -2596,19 +2596,19 @@ "name": "OH_ArkUI_PointerEvent_GetChangedPointerId" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius" }, { diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index d82ad42ef..ad127c62c 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3558,7 +3558,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .object: Use the {@link ArkUI_ProgressLinearStyleOption} object to get the style. \n * - * @since 16 + * @since 15 */ NODE_PROGRESS_LINEAR_STYLE, diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 3f9a7820b..54beb57b3 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -217,7 +217,7 @@ typedef struct ArkUI_ActiveChildrenInfo ArkUI_ActiveChildrenInfo; /** * @brief Set the linear progress indicator style. * - * @since 16 + * @since 15 */ typedef struct ArkUI_ProgressLinearStyleOption ArkUI_ProgressLinearStyleOption; @@ -4349,7 +4349,7 @@ int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle); * * @return Returns a ProgressLinearStyleOption instance. *
If the result returns nullptr, there may be out of memory. - * @since 16 + * @since 15 */ ArkUI_ProgressLinearStyleOption* OH_ArkUI_ProgressLinearStyleOption_Create(void); @@ -4357,7 +4357,7 @@ ArkUI_ProgressLinearStyleOption* OH_ArkUI_ProgressLinearStyleOption_Create(void) * @brief Destroy linear progress indicator style information. * * @param option Linear progress indicator style information. - * @since 16 + * @since 15 */ void OH_ArkUI_ProgressLinearStyleOption_Destroy(ArkUI_ProgressLinearStyleOption* option); @@ -4366,7 +4366,7 @@ void OH_ArkUI_ProgressLinearStyleOption_Destroy(ArkUI_ProgressLinearStyleOption* * * @param option Linear progress indicator style information. * @param enabled Whether to enable the scan effect. Default value: false. - * @since 16 + * @since 15 */ void OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled); @@ -4376,7 +4376,7 @@ void OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled(ArkUI_ProgressLinea * @param option Linear progress indicator style information. * @param enabled Whether to enable the smooth effect. When this effect is enabled, the progress change to * the set value takes place gradually. Otherwise, it takes place immediately. Default value: true. - * @since 16 + * @since 15 */ void OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled); @@ -4386,7 +4386,7 @@ void OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled(ArkUI_ProgressLin * @param option Linear progress indicator style information. * @param strokeWidth Stroke width of the progress indicator. It cannot be set in percentage. * Default value: 4.0vp. - * @since 16 + * @since 15 */ void OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth(ArkUI_ProgressLinearStyleOption* option, float strokeWidth); @@ -4396,7 +4396,7 @@ void OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth(ArkUI_ProgressLinearStyle * @param option Linear progress indicator style information. * @param strokeRadius Rounded corner radius of the progress indicator. Value range: [0, strokeWidth/2]. * Default value: strokeWidth/2. - * @since 16 + * @since 15 */ void OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius(ArkUI_ProgressLinearStyleOption* option, float strokeRadius); @@ -4405,7 +4405,7 @@ void OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius(ArkUI_ProgressLinearStyl * * @param option Linear progress indicator style information. * @return Whether to enable the scan effect. - * @since 16 + * @since 15 */ bool OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option); @@ -4414,7 +4414,7 @@ bool OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled(ArkUI_ProgressLinea * * @param option Linear progress indicator style information. * @return Whether to enable the smooth effect. - * @since 16 + * @since 15 */ bool OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option); @@ -4423,7 +4423,7 @@ bool OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled(ArkUI_ProgressLin * * @param option Linear progress indicator style information. * @return Stroke width of the progress indicator. - * @since 16 + * @since 15 */ float OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth(ArkUI_ProgressLinearStyleOption* option); @@ -4432,7 +4432,7 @@ float OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth(ArkUI_ProgressLinearStyl * * @param option Linear progress indicator style information. * @return Rounded corner radius of the progress indicator. - * @since 16 + * @since 15 */ float OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius(ArkUI_ProgressLinearStyleOption* option); -- Gitee From f0a76b1a0e59c22c230b509409cf92a4175d86c8 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Thu, 23 Jan 2025 15:14:39 +0800 Subject: [PATCH 499/630] axisEvent Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 8 ++++++++ arkui/ace_engine/native/native_node.h | 10 ++++++++++ arkui/ace_engine/native/ui_input_event.h | 21 +++++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ddf21be4b..d81f9f0c0 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2782,5 +2782,13 @@ { "first_introduced": "16", "name": "OH_ArkUI_UIInputEvent_GetModifierKeyStates" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AxisEvent_SetPropagation" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_AxisEvent_GetScrollStep" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c7d44068c..a046c800c 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6504,6 +6504,16 @@ typedef enum { */ NODE_DISPATCH_KEY_EVENT = 24, + /** + * @brief Defines the event triggered when the bound component receives an axis event. + * + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_UIInputEvent}. \n + * + * @since 16 + */ + NODE_ON_AXIS = 25, + /** * @brief Defines the event triggered when the bound component is clicked. * diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 538bc33bb..43a2d9e94 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -1007,6 +1007,27 @@ int32_t OH_ArkUI_MouseEvent_GetPressedButtons( */ int32_t OH_ArkUI_UIInputEvent_GetTargetDisplayId(const ArkUI_UIInputEvent* event); +/** + * @brief Sets whether to enable axis event propagation. + * + * @param event Pointer to the UI input event. + * @param propagation Whether to enable event propagation. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool propagation); + +/** + * @brief Obtains the scroll step configuration of the mouse wheel axis event. + * + * @param event Pointer to the UI input event. + * @return Returns the scroll step configuration of the mouse wheel axis event. + * @since 16 + */ +int32_t OH_ArkUI_AxisEvent_GetScrollStep(const ArkUI_UIInputEvent* event); + #ifdef __cplusplus }; #endif -- Gitee From d65a817237f23eb90c8052da05e4b1de269a92b1 Mon Sep 17 00:00:00 2001 From: wu_zhende Date: Fri, 7 Feb 2025 16:08:59 +0800 Subject: [PATCH 500/630] =?UTF-8?q?OH=5FNativeArkWeb=5FLoadData=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BAapi15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wu_zhende --- web/webview/interfaces/native/arkweb_error_code.h | 4 ++-- web/webview/interfaces/native/libohweb.ndk.json | 2 +- web/webview/interfaces/native/native_interface_arkweb.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_error_code.h b/web/webview/interfaces/native/arkweb_error_code.h index a0189434f..4caab8f5d 100644 --- a/web/webview/interfaces/native/arkweb_error_code.h +++ b/web/webview/interfaces/native/arkweb_error_code.h @@ -58,7 +58,7 @@ ARKWEB_INVALID_COOKIE_VALUE = 17100104, * @brief Failed to open the library. * * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since 15 */ ARKWEB_LIBRARY_OPEN_FAILURE = 17100105, @@ -66,7 +66,7 @@ ARKWEB_LIBRARY_OPEN_FAILURE = 17100105, * @brief The required symbol was not found in the library. * * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since 15 */ ARKWEB_LIBRARY_SYMBOL_NOT_FOUND = 17100106, } ArkWeb_ErrorCode; diff --git a/web/webview/interfaces/native/libohweb.ndk.json b/web/webview/interfaces/native/libohweb.ndk.json index 2babccf41..102b67fc7 100644 --- a/web/webview/interfaces/native/libohweb.ndk.json +++ b/web/webview/interfaces/native/libohweb.ndk.json @@ -316,7 +316,7 @@ "name": "OH_ArkWeb_GetNativeAPI" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_NativeArkWeb_LoadData" } ] diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h index 8477f09c7..3952853d9 100644 --- a/web/webview/interfaces/native/native_interface_arkweb.h +++ b/web/webview/interfaces/native/native_interface_arkweb.h @@ -176,7 +176,7 @@ NativeArkWeb_OnDestroyCallback OH_NativeArkWeb_GetDestroyCallback(const char* we * {@link ARKWEB_LIBRARY_SYMBOL_NOT_FOUND} The required symbol was not found in the library. * * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since 15 */ ArkWeb_ErrorCode OH_NativeArkWeb_LoadData(const char* webTag, const char* data, -- Gitee From f52e0caa1393b5872509daac30927a37bd66fb59 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Fri, 7 Feb 2025 17:51:46 +0800 Subject: [PATCH 501/630] add new CAPI setGestureInterrupterToNode Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 4 +++ arkui/ace_engine/native/native_gesture.h | 35 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d81f9f0c0..6d45c4d7c 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2790,5 +2790,9 @@ { "first_introduced": "16", "name": "OH_ArkUI_AxisEvent_GetScrollStep" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GestureInterrupter_GetUserData" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index a694089d5..ece305d4f 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -1040,6 +1040,41 @@ typedef struct { int32_t countNum, int32_t fingersNum, double distanceThreshold); } ArkUI_NativeGestureAPI_1; +/** + * @brief Defines the gesture APIs. + * + * @since 16 + */ +typedef struct { + /** + * @brief Pointer to the ArkUI_NativeGestureAPI_1 struct. + */ + ArkUI_NativeGestureAPI_1* gestureApi1; + + /** + * @brief Sets the callback for gesture interruption events. + * + * @param node Node for which you want to set a gesture interruption callback. + * @param userData Custom data. + * @param interrupter Gesture interruption callback to set. info indicates the gesture interruption data. + * If interrupter returns GESTURE_INTERRUPT_RESULT_CONTINUE, the gesture recognition process proceeds + * properly. If it returns GESTURE_INTERRUPT_RESULT_REJECT, the gesture recognition process is paused. + * @return Returns 0 if success. + * Returns 401 if a parameter error occurs. + */ + int32_t (*setGestureInterrupterToNode)(ArkUI_NodeHandle node, void* userData, + ArkUI_GestureInterruptResult (*interrupter)(ArkUI_GestureInterruptInfo* info)); +} ArkUI_NativeGestureAPI_2; + +/** +* @brief Obtains the custom data from a gesture interruption event. +* +* @param event Pointer to the gesture interruption information. +* @return Returns the pointer to the custom data. +* @since 16 +*/ +void* OH_ArkUI_GestureInterrupter_GetUserData(ArkUI_GestureInterruptInfo* event); + #ifdef __cplusplus }; #endif -- Gitee From 32e4e61ca882fc355b4cd5b3d760d9b116279fd2 Mon Sep 17 00:00:00 2001 From: magekkkk Date: Fri, 7 Feb 2025 10:01:02 +0000 Subject: [PATCH 502/630] add new timestamp api for speed change Signed-off-by: magekkkk --- .../audio_renderer/native_audiorenderer.h | 31 +++++++++++++++++++ multimedia/audio_framework/ohaudio.ndk.json | 4 +++ 2 files changed, 35 insertions(+) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 6bfcb82ae..2ccf0ea32 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -259,6 +259,37 @@ OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* render OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer* renderer, clockid_t clockId, int64_t* framePosition, int64_t* timestamp); +/* + * Query the timestamp at which a particular frame was presented in clock monotonic timebase, the frame at + * the returned position was just committed to hardware. This is often used in video synchronization and + * recording stream alignment. + * + * Position is 0 and timestamp is fixed until stream really runs and frame is committed. Position will + * also be reset while flush function is called. When a audio route change happens, like in device or output + * type change situations, the position may also be reset but timestamp remains monotonically increasing. + * So it is better to use the values until they becomes regularly after the change. + * This interface also adapts to playback speed change. For example, the increseing speed for position + * will be double for 2x speed playback. + * + * @since 15 + * + * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() + * @param framePosition Pointer to a variable to receive the position + * @param timestamp Pointer to a variable to receive the timestamp + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of framePosition or timestamp is nullptr; + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE}: + * 1.Stopped state is illegal for getting audio timestamp. + * {@link AUDIOSTREAM_ERROR_SYSTEM}: + * 1.Crash or blocking occurs in system process. + * 2.Other unexpected error from internal system. + */ +OH_AudioStream_Result OH_AudioRenderer_GetAudioTimestampInfo(OH_AudioRenderer* renderer, + int64_t* framePosition, int64_t* timestamp); + /* * Query the frame size in callback, it is a fixed length that the stream want to be filled for each callback. * diff --git a/multimedia/audio_framework/ohaudio.ndk.json b/multimedia/audio_framework/ohaudio.ndk.json index 961c75dae..e6d5a0cd2 100644 --- a/multimedia/audio_framework/ohaudio.ndk.json +++ b/multimedia/audio_framework/ohaudio.ndk.json @@ -378,5 +378,9 @@ { "first_introduced": "13", "name": "OH_AudioRoutingManager_SetMicBlockStatusCallback" + }, + { + "first_introduced": "15", + "name": "OH_AudioRenderer_GetAudioTimestampInfo" } ] -- Gitee From 94432d59ae4eedb57170b92b6148fb1013a8bb38 Mon Sep 17 00:00:00 2001 From: magekkkk Date: Fri, 7 Feb 2025 11:05:26 +0000 Subject: [PATCH 503/630] fix comment mismatch Signed-off-by: magekkkk --- .../audio_framework/audio_renderer/native_audiorenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 2ccf0ea32..985969595 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -282,7 +282,7 @@ OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer* renderer, * 1.The param of renderer is nullptr; * 2.The param of framePosition or timestamp is nullptr; * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE}: - * 1.Stopped state is illegal for getting audio timestamp. + * 1.Only running state is legal for getting audio timestamp. * {@link AUDIOSTREAM_ERROR_SYSTEM}: * 1.Crash or blocking occurs in system process. * 2.Other unexpected error from internal system. -- Gitee From 1bf7f86d74b7f75ea6e431dea86033a744eef8e6 Mon Sep 17 00:00:00 2001 From: magekkkk Date: Fri, 7 Feb 2025 12:32:15 +0000 Subject: [PATCH 504/630] update doxygen format Signed-off-by: magekkkk --- .../audio_renderer/native_audiorenderer.h | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 985969595..18b2daa39 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -259,37 +259,6 @@ OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* render OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer* renderer, clockid_t clockId, int64_t* framePosition, int64_t* timestamp); -/* - * Query the timestamp at which a particular frame was presented in clock monotonic timebase, the frame at - * the returned position was just committed to hardware. This is often used in video synchronization and - * recording stream alignment. - * - * Position is 0 and timestamp is fixed until stream really runs and frame is committed. Position will - * also be reset while flush function is called. When a audio route change happens, like in device or output - * type change situations, the position may also be reset but timestamp remains monotonically increasing. - * So it is better to use the values until they becomes regularly after the change. - * This interface also adapts to playback speed change. For example, the increseing speed for position - * will be double for 2x speed playback. - * - * @since 15 - * - * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() - * @param framePosition Pointer to a variable to receive the position - * @param timestamp Pointer to a variable to receive the timestamp - * @return Function result code: - * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. - * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: - * 1.The param of renderer is nullptr; - * 2.The param of framePosition or timestamp is nullptr; - * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE}: - * 1.Only running state is legal for getting audio timestamp. - * {@link AUDIOSTREAM_ERROR_SYSTEM}: - * 1.Crash or blocking occurs in system process. - * 2.Other unexpected error from internal system. - */ -OH_AudioStream_Result OH_AudioRenderer_GetAudioTimestampInfo(OH_AudioRenderer* renderer, - int64_t* framePosition, int64_t* timestamp); - /* * Query the frame size in callback, it is a fixed length that the stream want to be filled for each callback. * @@ -535,6 +504,37 @@ OH_AudioStream_Result OH_AudioRenderer_GetSilentModeAndMixWithOthers( OH_AudioStream_Result OH_AudioRenderer_SetDefaultOutputDevice( OH_AudioRenderer* renderer, OH_AudioDevice_Type deviceType); +/** + * @brief Query the timestamp at which a particular frame was presented in clock monotonic timebase, + * the frame at the returned position was just committed to hardware. This is often used in + * video synchronization and recording stream alignment. + * + * Position is 0 and timestamp is fixed until stream really runs and frame is committed. Position + * will also be reset while flush function is called. When a audio route change happens, like in + * device or output type change situations, the position may also be reset but timestamp remains + * monotonically increasing. + * So it is better to use the values until they becomes regularly after the change. + * This interface also adapts to playback speed change. For example, the increseing speed for + * position will be double for 2x speed playback. + * + * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() + * @param framePosition Pointer to a variable to receive the position + * @param timestamp Pointer to a variable to receive the timestamp + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of framePosition or timestamp is nullptr; + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE}: + * 1.Only running state is legal for getting audio timestamp. + * {@link AUDIOSTREAM_ERROR_SYSTEM}: + * 1.Crash or blocking occurs in system process. + * 2.Other unexpected error from internal system. + * @since 15 + */ +OH_AudioStream_Result OH_AudioRenderer_GetAudioTimestampInfo(OH_AudioRenderer* renderer, + int64_t* framePosition, int64_t* timestamp); + #ifdef __cplusplus } #endif -- Gitee From 77e2f553a9a788a90cd04680458586b863d2886f Mon Sep 17 00:00:00 2001 From: xuzhidan Date: Sat, 8 Feb 2025 10:06:32 +0800 Subject: [PATCH 505/630] Swiper onContentWillScroll api version change to 15. Signed-off-by: xuzhidan Change-Id: I2fd4a6bfe2ae5a4b68f0f6c04719c46e2417e47b --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a046c800c..98713d367 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7232,7 +7232,7 @@ typedef enum { * Positive numbers indicating slide backward(e.g. from index=1 to index=0), negative numbers indicating * slide forward(e.g. from index=0 to index=1). \n * - * @since 16 + * @since 15 */ NODE_SWIPER_EVENT_ON_CONTENT_WILL_SCROLL = 1001007, -- Gitee From bbbf1746d7399b4be2ee863b65107264f37b2669 Mon Sep 17 00:00:00 2001 From: He Hai Date: Sat, 8 Feb 2025 09:58:39 +0800 Subject: [PATCH 506/630] Remove llvm-ifs from NDK Remove llvm-ifs from NDK Issue:https://gitee.com/openharmony/interface_sdk_c/issues/IBKRAO Signed-off-by: He Hai --- third_party/musl/ndk_script/toolchain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/musl/ndk_script/toolchain.sh b/third_party/musl/ndk_script/toolchain.sh index 3f509f7bc..1bdc1baff 100755 --- a/third_party/musl/ndk_script/toolchain.sh +++ b/third_party/musl/ndk_script/toolchain.sh @@ -50,10 +50,10 @@ function strip_dir() { done } function remove_unnecessary_file { - file_list=("lib/clang/current" "lib/arm-liteos-ohos" "lib/loongarch64-linux-ohos" "lib/mipsel-linux-ohos" "lib/riscv64-linux-ohos" "lib/clang/15.0.4/bin/loongarch64-linux-ohos" "lib/clang/15.0.4/lib/arm-liteos-ohos" "lib/clang/15.0.4/lib/i386-unknown-linux-gnu" "lib/clang/15.0.4/lib/loongarch64-linux-ohos" "lib/clang/15.0.4/lib/mipsel-linux-ohos" "lib/clang/15.0.4/lib/riscv64-linux-ohos" "lib/clang/15.0.4/lib/windows") + file_list=("bin/llvm-ifs" "bin/llvm-ifs.exe" "lib/clang/current" "lib/arm-liteos-ohos" "lib/loongarch64-linux-ohos" "lib/mipsel-linux-ohos" "lib/riscv64-linux-ohos" "lib/clang/15.0.4/bin/loongarch64-linux-ohos" "lib/clang/15.0.4/lib/arm-liteos-ohos" "lib/clang/15.0.4/lib/i386-unknown-linux-gnu" "lib/clang/15.0.4/lib/loongarch64-linux-ohos" "lib/clang/15.0.4/lib/mipsel-linux-ohos" "lib/clang/15.0.4/lib/riscv64-linux-ohos" "lib/clang/15.0.4/lib/windows") for i in "${file_list[@]}"; do - if [ -d "${OUT_DIR}/${i}" ]; then + if [ -e "${OUT_DIR}/${i}" ]; then rm -rf "${OUT_DIR}/${i}" fi done -- Gitee From 95f62892a540144fd9ca3dd0c13f4436d9652341 Mon Sep 17 00:00:00 2001 From: houguobiao Date: Sat, 8 Feb 2025 15:12:24 +0800 Subject: [PATCH 507/630] =?UTF-8?q?Dialog=E6=94=AF=E6=8C=81=E5=B1=82?= =?UTF-8?q?=E7=BA=A7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houguobiao Change-Id: Ia3328a5719229a25bd8c4c1bb9e5eac4657c2fbe --- arkui/ace_engine/native/native_dialog.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 88451ec6e..159d65422 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -370,6 +370,19 @@ typedef struct { * @since 16 */ int32_t (*setImmersiveMode)(ArkUI_NativeDialogHandle handle, ArkUI_ImmersiveMode immersiveMode); + + /** + * @brief Sets the display order for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param levelOrder Indicates the display order. The valid range is [-100000.0, 100000.0]. + * @return Returns the error 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. + * @since 16 + */ + int32_t (*setLevelOrder)(ArkUI_NativeDialogHandle handle, double levelOrder); } ArkUI_NativeDialogAPI_2; /** -- Gitee From 090e34c65f5c976315eba966a01f1f16ec07a49b Mon Sep 17 00:00:00 2001 From: echoorchid Date: Sat, 8 Feb 2025 15:40:58 +0800 Subject: [PATCH 508/630] fix abnormal code comment Signed-off-by: echoorchid --- web/webview/interfaces/native/arkweb_interface.h | 2 +- web/webview/interfaces/native/native_interface_arkweb.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_interface.h b/web/webview/interfaces/native/arkweb_interface.h index 8faee797a..cddfa99c7 100644 --- a/web/webview/interfaces/native/arkweb_interface.h +++ b/web/webview/interfaces/native/arkweb_interface.h @@ -73,7 +73,7 @@ typedef enum { ARKWEB_NATIVE_JAVASCRIPT_VALUE, } ArkWeb_NativeAPIVariantKind; -/* +/** * @brief Obtains the native API set of a specified type. * @param type Indicates the type of the native API set provided by ArkWeb. * @return Return the pointer to the native API abstract object that carries the size. diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h index 8477f09c7..83ef06888 100644 --- a/web/webview/interfaces/native/native_interface_arkweb.h +++ b/web/webview/interfaces/native/native_interface_arkweb.h @@ -131,7 +131,7 @@ void OH_NativeArkWeb_SetJavaScriptProxyValidCallback(const char* webTag, NativeA */ NativeArkWeb_OnValidCallback OH_NativeArkWeb_GetJavaScriptProxyValidCallback(const char* webTag); -/* +/** * @brief Registers the destroy callback. * * @param webTag The name of the web component. @@ -142,7 +142,7 @@ NativeArkWeb_OnValidCallback OH_NativeArkWeb_GetJavaScriptProxyValidCallback(con */ void OH_NativeArkWeb_SetDestroyCallback(const char* webTag, NativeArkWeb_OnDestroyCallback callback); -/* +/** * @brief Get the destroy callback. * * @param webTag The name of the web component. -- Gitee From d8ef551a921682184c2e2a5a394ec26f4d523b64 Mon Sep 17 00:00:00 2001 From: rachel_w Date: Sat, 8 Feb 2025 15:51:28 +0800 Subject: [PATCH 509/630] =?UTF-8?q?=E5=8F=98=E6=9B=B4VVC=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=89=88=E6=9C=AC=E8=87=B3API15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rachel_w --- multimedia/av_codec/native_avcodec_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 3b9d810fe..7210ea39b 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1097,7 +1097,7 @@ typedef enum OH_HEVCProfile { * @brief Profile: A specified subset of the syntax of VVC. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 14 + * @since 15 */ typedef enum OH_VVCProfile { /** Main 10 profile */ @@ -1400,7 +1400,7 @@ typedef enum OH_HEVCLevel { * of VVC, or the value of a transform coefficient prior to scaling. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 14 + * @since 15 */ typedef enum OH_VVCLevel { /** VVC level 1.0 */ -- Gitee From 231a7a2ef065252551501e9fcb5d79fa510c6450 Mon Sep 17 00:00:00 2001 From: wangdongyusky <15222869+wangdongyusky@user.noreply.gitee.com> Date: Sat, 8 Feb 2025 16:00:16 +0800 Subject: [PATCH 510/630] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghuanqing --- multimedia/camera_framework/camera.ndk.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index dd8d98bbc..165a48296 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -599,6 +599,14 @@ "first_introduced": "12", "name": "OH_CameraDevice_GetCameraOrientation" }, + { + "first_introduced": "16", + "name": "OH_CameraDevice_GetHostDeviceName" + }, + { + "first_introduced": "16", + "name": "OH_CameraDevice_GetHostDeviceType" + }, { "first_introduced": "12", "name": "OH_PhotoNative_GetMainImage" -- Gitee From fbfc9b7e0cd7b28aaf6defc5749f2c37c00aed3d Mon Sep 17 00:00:00 2001 From: dingwen Date: Thu, 6 Feb 2025 09:44:40 +0800 Subject: [PATCH 511/630] Add napi_wrap_enhance interface support pass binding object size and finalize_cb execute async Description:Add napi_wrap_enhance interface support pass binding object size and finalize_cb execute async Issue:https://gitee.com/openharmony/arkui_napi/issues/IBK6OE?from=project-issue Signed-off-by: dingwen Change-Id: Id81167e5805c5601540855f74fd55626f8ab55a7 --- arkui/napi/libnapi.ndk.json | 4 ++++ arkui/napi/native_api.h | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/arkui/napi/libnapi.ndk.json b/arkui/napi/libnapi.ndk.json index c63dfda6b..ca967c94e 100644 --- a/arkui/napi/libnapi.ndk.json +++ b/arkui/napi/libnapi.ndk.json @@ -238,5 +238,9 @@ { "first_introduced": "12", "name": "napi_fatal_exception" + }, + { + "first_introduced": "16", + "name": "napi_wrap_enhance" } ] diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h index 69d1cd7c3..e27c7a103 100644 --- a/arkui/napi/native_api.h +++ b/arkui/napi/native_api.h @@ -445,6 +445,33 @@ NAPI_EXTERN napi_status napi_create_sendable_object_with_properties(napi_env env size_t property_count, const napi_property_descriptor* properties, napi_value* result); +/** + * @brief Wraps a native instance in a ArkTS object. + * @param env The environment that the API is invoked under. + * @param js_object The ArkTS object that will be the wrapper for the native object. + * @param native_object The native instance that will be wrapped in the ArkTS object. + * @param finalize_cb Optional native callback that can be used to free the native instance when the ArkTS object + * has been garbage-collected. + * @param async_finalizer A bool value to determine that finalize_cb execute async or not. + * @param finalize_hint Optional contextual hint that is passed to the finalize callback. + * @param native_binding_size The size of native binding. + * @param result Optional reference to the wrapped object. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executedd successfully.\n + * {@link napi_invalid_arg } If the param env, js_object or native_object is nullptr.\n + * {@link napi_object_expected } If the param js_object is not an ArkTS Object or Function.\n + * {@link napi_pending_exception } If have uncaught exception, or exception occured in execution.\n + * @since 16 + */ +NAPI_EXTERN napi_status napi_wrap_enhance(napi_env env, + napi_value js_object, + void* native_object, + napi_finalize finalize_cb, + bool async_finalizer, + void* finalize_hint, + size_t native_binding_size, + napi_ref* result); /** * @brief Wraps a native instance in a ArkTS object. -- Gitee From 845e016133929a6912f4e5ccdb18a208b71a559b Mon Sep 17 00:00:00 2001 From: 15349246236 Date: Sat, 8 Feb 2025 17:16:53 +0800 Subject: [PATCH 512/630] get capslock state ndk api Signed-off-by: 15349246236 --- multimodalinput/kits/c/input/oh_input_manager.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index c23e8bf84..3934be3b9 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -265,6 +265,11 @@ typedef enum Input_Result { * @since 14 */ INPUT_OCCUPIED_BY_OTHER = 4200003, + /** + * @error No keyboard device connected + * @since 15 + */ + INPUT_KEYBOARD_DEVICE_NOT_EXIST = 3900002 } Input_Result; /** @@ -1827,6 +1832,7 @@ Input_Result OH_Input_GetDeviceAddress(Input_DeviceInfo *deviceInfo, char **addr * @return OH_Input_GetFunctionKeyState function api result code * {@link INPUT_SUCCESS} if the operation is successful; * {@link INPUT_PARAMETER_ERROR} if keyCode is invalid or state is a null pointer. + * {@link INPUT_KEYBOARD_DEVICE_NOT_EXIST} no keyboard device connected. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 15 */ -- Gitee From 0ed8f971610ee76ad118ce840e332c03df91c5da Mon Sep 17 00:00:00 2001 From: hanKF Date: Sat, 8 Feb 2025 18:30:56 +0800 Subject: [PATCH 513/630] add displaycallback api15 Signed-off-by: hanKF --- multimedia/player_framework/native_avscreen_capture.h | 2 +- multimedia/player_framework/native_avscreen_capture_base.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 4c306d085..150ebef4f 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -459,7 +459,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapt * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} input capture is nullptr or input callback is nullptr. * {@link AV_SCREEN_CAPTURE_ERR_NO_MEMORY} no memory, mem allocate failed. * {@link AV_SCREEN_CAPTURE_ERR_INVALID_STATE} This interface should be called before Start is called. - * @since 16 + * @since 15 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetDisplayCallback(struct OH_AVScreenCapture *capture, OH_AVScreenCapture_OnDisplaySelected callback, void *userData); diff --git a/multimedia/player_framework/native_avscreen_capture_base.h b/multimedia/player_framework/native_avscreen_capture_base.h index 7bea8d0e6..85b1280d1 100644 --- a/multimedia/player_framework/native_avscreen_capture_base.h +++ b/multimedia/player_framework/native_avscreen_capture_base.h @@ -528,7 +528,7 @@ typedef void (*OH_AVScreenCapture_OnBufferAvailable)(OH_AVScreenCapture *capture * @param displayId Id of the display device that being captured * @param userData Pointer to user specific data * - * @since 16 + * @since 15 */ typedef void (*OH_AVScreenCapture_OnDisplaySelected)(OH_AVScreenCapture *capture, uint64_t displayId, void *userData); -- Gitee From 479ff5594c7b9a98484c5aa29b43279374c32e9e Mon Sep 17 00:00:00 2001 From: liujiaxing19 Date: Fri, 7 Feb 2025 15:26:24 +0800 Subject: [PATCH 514/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9API=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujiaxing19 Change-Id: Ib6561b742411083fdae68383e818afa2ad5793bb --- .../hiappevent/include/hiappevent/hiappevent.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index c33f2ed25..71413e6dc 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -90,7 +90,7 @@ extern "C" { /** * @brief Defines error code * - * @since 16 + * @since 15 */ typedef enum { /** @error The operation is successful. */ @@ -198,7 +198,7 @@ typedef struct HiAppEvent_Processor HiAppEvent_Processor; /** * @brief The HiAppEvent_Config structure is designed for configuration. * - * @since 16 + * @since 15 */ typedef struct HiAppEvent_Config HiAppEvent_Config; @@ -810,7 +810,7 @@ int OH_HiAppEvent_RemoveProcessor(int64_t processorId); * @brief Create a HiAppEvent_Config handler pointer to set the config. * * @return Returns a pointer to the HiAppEvent_Config instance. - * @since 16 + * @since 15 */ HiAppEvent_Config* OH_HiAppEvent_CreateConfig(void); @@ -818,7 +818,7 @@ HiAppEvent_Config* OH_HiAppEvent_CreateConfig(void); * @brief Destroy the specified HiAppEvent_Config handle resource. * * @param config The pointer to the HiAppEvent_Config instance. - * @since 16 + * @since 15 */ void OH_HiAppEvent_DestroyConfig(HiAppEvent_Config* config); @@ -832,7 +832,7 @@ void OH_HiAppEvent_DestroyConfig(HiAppEvent_Config* config); * {@link HIAPPEVENT_SUCCESS} The operation is successful. * {@link HIAPPEVENT_EVENT_CONFIG_IS_NULL} The event config is null. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} The item is invalid. - * @since 16 + * @since 15 */ int OH_HiAppEvent_SetConfigItem(HiAppEvent_Config* config, const char* itemName, const char* itemValue); @@ -844,7 +844,7 @@ int OH_HiAppEvent_SetConfigItem(HiAppEvent_Config* config, const char* itemName, * @return set result. * {@link HIAPPEVENT_SUCCESS} The operation is successful. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} The config is invalid. - * @since 16 + * @since 15 */ int OH_HiAppEvent_SetEventConfig(const char* name, HiAppEvent_Config* config); #ifdef __cplusplus -- Gitee From 1bbea761f4925aa8ab589934154fb46aeab98d16 Mon Sep 17 00:00:00 2001 From: Zenix Date: Thu, 23 Jan 2025 17:29:53 +0800 Subject: [PATCH 515/630] sr async ondrop Signed-off-by: Zenix --- arkui/ace_engine/native/drag_and_drop.h | 43 +++++++++++++++++++++++++ arkui/ace_engine/native/libace.ndk.json | 12 +++++++ arkui/ace_engine/native/native_type.h | 5 +++ 3 files changed, 60 insertions(+) diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index ea482af38..d66607752 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -841,6 +841,49 @@ ArkUI_DragEvent* OH_ArkUI_DragAndDropInfo_GetDragEvent(ArkUI_DragAndDropInfo* dr */ int32_t OH_ArkUI_StartDrag(ArkUI_DragAction* dragAction); +/** + * @brief Request to delay the drop end handling for a while to wait until the process result + * is really conformed by application, the result need to be notified back to system through + * {@link OH_ArkUI_NotifyDragResult} interface. And when all the handling done, the + * {@link OH_ArkUI_NotifyDragEndPendingDone} should be called. + * Please be aware, the maximum pending time is 2 seconds; + * + * @param event Indicates the pointer to an ArkUI_DragEvent object. + * @param requestIdentify Indicates the Identify for the request initiated by this method, it's a number generated + by system automatically, and it's an out parameter too, so one valid address needed. + * @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. + * Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if current is not during the drop handing. + * @since 16 + */ +int32_t OH_ArkUI_DragEvent_RequestDragEndPending(ArkUI_DragEvent* event, int32_t* requestIdentify); + +/** + * @brief Notify the system final drag result, the request identify will be checked, it should be the same + * as the one returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface, if it's not, + * the calling will be ignored. + * + * @param requestIdentify The identify returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface. + * @param result Indicates the drag result. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult result); + +/** + * @brief Notify the system all handling done, the drag end pending can be finished. + * + * @param requestIdentify The identify returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 6d45c4d7c..da8d24c9f 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2791,6 +2791,18 @@ "first_introduced": "16", "name": "OH_ArkUI_AxisEvent_GetScrollStep" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_DragEvent_RequestDragEndPending" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NotifyDragResult" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NotifyDragEndPendingDone" + }, { "first_introduced": "16", "name": "OH_ArkUI_GestureInterrupter_GetUserData" diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 20cebacea..0181740cf 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2192,6 +2192,11 @@ typedef enum { * @since 16 */ ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED = 180102, + /** + * @error operation is not allowed for current drag drop pharse. + * @since 16 + */ + ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED = 190004, } ArkUI_ErrorCode; /** -- Gitee From d7dc5ad6237fbfec9508e9db457fbb09dbd3a7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=85=E5=BF=97=E5=9D=9A?= Date: Mon, 10 Feb 2025 11:35:43 +0800 Subject: [PATCH 516/630] =?UTF-8?q?=E5=BA=9F=E5=BC=83ffrt=5Fget=5Fcurrent?= =?UTF-8?q?=5Fqueue=E4=BB=A5=E5=8F=8A=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20Signed-off-by:=20felands=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resourceschedule/ffrt/c/condition_variable.h | 26 ++++++------- resourceschedule/ffrt/c/mutex.h | 22 +++++------ resourceschedule/ffrt/c/queue.h | 38 ++++++++++++++++++- resourceschedule/ffrt/c/sleep.h | 4 +- resourceschedule/ffrt/c/task.h | 40 +++++++++++++++++++- 5 files changed, 101 insertions(+), 29 deletions(-) diff --git a/resourceschedule/ffrt/c/condition_variable.h b/resourceschedule/ffrt/c/condition_variable.h index 0c0534246..8472dba1b 100644 --- a/resourceschedule/ffrt/c/condition_variable.h +++ b/resourceschedule/ffrt/c/condition_variable.h @@ -45,8 +45,8 @@ * * @param cond Indicates a pointer to the condition variable. * @param attr Indicates a pointer to the condition variable attribute. - * @return Returns ffrt_thrd_success if the condition variable is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is initialized; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -57,8 +57,8 @@ FFRT_C_API int ffrt_cond_init(ffrt_cond_t* cond, const ffrt_condattr_t* attr); * @brief Unblocks at least one of the threads that are blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the thread is unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -69,8 +69,8 @@ FFRT_C_API int ffrt_cond_signal(ffrt_cond_t* cond); * @brief Unblocks all threads currently blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the threads are unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the threads are unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -82,8 +82,8 @@ FFRT_C_API int ffrt_cond_broadcast(ffrt_cond_t* cond); * * @param cond Indicates a pointer to the condition variable. * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -98,9 +98,9 @@ FFRT_C_API int ffrt_cond_wait(ffrt_cond_t* cond, ffrt_mutex_t* mutex); * @param time_point Indicates the maximum duration that the thread is blocked. * If ffrt_cond_signal or ffrt_cond_broadcast is not called to unblock the thread * when the maximum duration reaches, the thread is automatically unblocked. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_timedout if the maximum duration reaches; - returns ffrt_thrd_error if the blocking fails. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_error_timedout if the maximum duration reaches; + returns ffrt_error if the blocking fails. * @since 10 * @version 1.0 */ @@ -110,8 +110,8 @@ FFRT_C_API int ffrt_cond_timedwait(ffrt_cond_t* cond, ffrt_mutex_t* mutex, const * @brief Destroys a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the condition variable is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/mutex.h b/resourceschedule/ffrt/c/mutex.h index c8f28ac0f..ec8eede4c 100644 --- a/resourceschedule/ffrt/c/mutex.h +++ b/resourceschedule/ffrt/c/mutex.h @@ -24,7 +24,7 @@ * * @since 10 */ - + /** * @file mutex.h * @kit FunctionFlowRuntimeKit @@ -90,8 +90,8 @@ FFRT_C_API int ffrt_mutexattr_destroy(ffrt_mutexattr_t* attr); * * @param mutex Indicates a pointer to the mutex. * @param attr Indicates a pointer to the mutex attribute. - * @return Returns ffrt_thrd_success if the mutex is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is initialized; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -101,8 +101,8 @@ FFRT_C_API int ffrt_mutex_init(ffrt_mutex_t* mutex, const ffrt_mutexattr_t* attr * @brief Locks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or blocks the calling thread otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or blocks the calling thread otherwise. * @since 10 * @version 1.0 */ @@ -112,8 +112,8 @@ FFRT_C_API int ffrt_mutex_lock(ffrt_mutex_t* mutex); * @brief Unlocks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is unlocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is unlocked; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -123,8 +123,8 @@ FFRT_C_API int ffrt_mutex_unlock(ffrt_mutex_t* mutex); * @brief Attempts to lock a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or ffrt_thrd_busy otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or ffrt_error_busy otherwise. * @since 10 * @version 1.0 */ @@ -134,8 +134,8 @@ FFRT_C_API int ffrt_mutex_trylock(ffrt_mutex_t* mutex); * @brief Destroys a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/queue.h b/resourceschedule/ffrt/c/queue.h index fb077e38e..b03caa8ce 100644 --- a/resourceschedule/ffrt/c/queue.h +++ b/resourceschedule/ffrt/c/queue.h @@ -222,7 +222,7 @@ FFRT_C_API int ffrt_queue_cancel(ffrt_task_handle_t handle); * @since 12 * @version 1.0 */ -FFRT_C_API ffrt_queue_t ffrt_get_main_queue(); +FFRT_C_API ffrt_queue_t ffrt_get_main_queue(void); /** * @brief Get application worker(ArkTs) thread queue. @@ -230,8 +230,42 @@ FFRT_C_API ffrt_queue_t ffrt_get_main_queue(); * @return Returns application worker(ArkTs) thread queue. * @since 12 * @version 1.0 + * @deprecated since 15 */ -FFRT_C_API ffrt_queue_t ffrt_get_current_queue(); +FFRT_C_API ffrt_queue_t ffrt_get_current_queue(void); + +/** + * @brief Get queue task count. + * + * @param queue Indicates a queue handle. + * @return Returns the queue task count. + * @since 10 + * @version 1.0 + */ +FFRT_C_API uint64_t ffrt_queue_get_task_cnt(ffrt_queue_t queue); + +/** + * @brief Submits a task to a queue, for tasks with the same delay, insert the header. + * + * @param queue Indicates a queue handle. + * @param f Indicates a pointer to the task executor. + * @param attr Indicates a pointer to the task attribute. + * @version 1.0 + */ +FFRT_C_API void ffrt_queue_submit_head(ffrt_queue_t queue, ffrt_function_header_t* f, const ffrt_task_attr_t* attr); + +/** + * @brief Submits a task to the queue, and obtains a task handle, for tasks with the same delay, insert the header. + * + * @param queue Indicates a queue handle. + * @param f Indicates a pointer to the task executor. + * @param attr Indicates a pointer to the task attribute. + * @return Returns a non-null task handle if the task is submitted; + returns a null pointer otherwise. + * @version 1.0 + */ +FFRT_C_API ffrt_task_handle_t ffrt_queue_submit_head_h( + ffrt_queue_t queue, ffrt_function_header_t* f, const ffrt_task_attr_t* attr); #endif // FFRT_API_C_QUEUE_H /** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/sleep.h b/resourceschedule/ffrt/c/sleep.h index 777cb553d..d45668ed1 100644 --- a/resourceschedule/ffrt/c/sleep.h +++ b/resourceschedule/ffrt/c/sleep.h @@ -44,8 +44,8 @@ * @brief Suspends the calling thread for a given duration. * * @param usec Indicates the duration that the calling thread is suspended, in microseconds. - * @return Returns ffrt_thrd_success if the thread is suspended; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is suspended; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/task.h b/resourceschedule/ffrt/c/task.h index 786661d82..33296f4ad 100644 --- a/resourceschedule/ffrt/c/task.h +++ b/resourceschedule/ffrt/c/task.h @@ -161,6 +161,24 @@ FFRT_C_API void ffrt_task_attr_set_stack_size(ffrt_task_attr_t* attr, uint64_t s */ FFRT_C_API uint64_t ffrt_task_attr_get_stack_size(const ffrt_task_attr_t* attr); +/** + * @brief Set the task schedule timeout. + * + * @param attr Indicates a pointer to the task attribute. + * @param timeout_us task scheduler timeout. + * @version 1.0 + */ +FFRT_C_API void ffrt_task_attr_set_timeout(ffrt_task_attr_t* attr, uint64_t timeout_us); + +/** + * @brief Get the task schedule timeout. + * + * @param attr Indicates a pointer to the task attribute. + * @return Returns the task schedule timeout. + * @version 1.0 + */ +FFRT_C_API uint64_t ffrt_task_attr_get_timeout(const ffrt_task_attr_t* attr); + /** * @brief Updates the QoS of this task. * @@ -179,7 +197,7 @@ FFRT_C_API int ffrt_this_task_update_qos(ffrt_qos_t qos); * @since 12 * @version 1.0 */ -FFRT_C_API ffrt_qos_t ffrt_this_task_get_qos(); +FFRT_C_API ffrt_qos_t ffrt_this_task_get_qos(void); /** * @brief Obtains the ID of this task. @@ -275,5 +293,25 @@ FFRT_C_API void ffrt_wait_deps(const ffrt_deps_t* deps); */ FFRT_C_API void ffrt_wait(void); +/** + * @brief Sets the thread stack size of a specified QoS level. + * + * @param qos Indicates the QoS. + * @param stack_size Indicates worker thread stack size. + * @since 10 + * @version 1.0 + */ +FFRT_C_API ffrt_error_t ffrt_set_worker_stack_size(ffrt_qos_t qos, size_t stack_size); + +/** + * @brief get gid from task handle. + * + * @param handle Indicates a task handle. + * @return Return gid + * @since 10 + * @version 1.0 + */ +FFRT_C_API uint64_t ffrt_task_handle_get_id(ffrt_task_handle_t handle); + #endif /** @} */ \ No newline at end of file -- Gitee From 6e24178f7743ba4bc0e5fd6fb43f867719a3fb3b Mon Sep 17 00:00:00 2001 From: pengzhiwen Date: Mon, 10 Feb 2025 11:55:07 +0800 Subject: [PATCH 517/630] =?UTF-8?q?inspector=E6=96=B0=E5=A2=9Ecapi?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=9B=9E=E5=90=885.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: pengzhiwen Change-Id: I3d71d78fcf1740e3d5098ef5bd481cfe572b9126 --- arkui/ace_engine/native/libace.ndk.json | 8 ++++---- arkui/ace_engine/native/native_node.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 6d45c4d7c..f23f86850 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2664,19 +2664,19 @@ "name": "OH_ArkUI_HostWindowInfo_Destroy" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_RegisterLayoutCallbackOnNodeHandle" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_RegisterDrawCallbackOnNodeHandle" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_UnregisterDrawCallbackOnNodeHandle" }, { diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a046c800c..f96659470 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8551,7 +8551,7 @@ typedef enum { /** * @brief Enumerates the inspector error codes. - * @since 16 + * @since 15 */ typedef enum { /** @@ -9032,7 +9032,7 @@ int32_t OH_ArkUI_NodeUtils_GetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_C * @return error code {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_RegisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node, void* userData, void (*onLayoutCompleted)(void* userData)); @@ -9047,7 +9047,7 @@ int32_t OH_ArkUI_RegisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node, * @return error code {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_RegisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node, void* userData, void (*onDrawCompleted)(void* userData)); @@ -9059,7 +9059,7 @@ int32_t OH_ArkUI_RegisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node, * @return error code {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node); @@ -9070,7 +9070,7 @@ int32_t OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node); * @return error code {@link ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. * {@link ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_UnregisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node); -- Gitee From bdb4db0c5e61a3512db222b8df2e3c3eb75bf701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E7=95=85?= Date: Sat, 8 Feb 2025 08:25:15 +0000 Subject: [PATCH 518/630] Add CAPI to cancel touch event. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永畅 Change-Id: I7b2c0bbb6763ca02403aaa2baec99cfe1902d2e9 --- arkui/ace_engine/native/libace.ndk.json | 12 ++++++ arkui/ace_engine/native/native_gesture.h | 54 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d81f9f0c0..ac0d90344 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -251,6 +251,18 @@ "first_introduced": "12", "name": "OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_TouchRecognizer_GetNodeHandle" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_TouchRecognizer_CancelTouch" + }, { "first_introduced": "12", "name": "OH_ArkUI_GetResponseRecognizersFromInterruptInfo" diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index a694089d5..5c470baae 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -277,6 +277,27 @@ typedef struct ArkUI_GestureEventTargetInfo ArkUI_GestureEventTargetInfo; */ typedef struct ArkUI_ParallelInnerGestureEvent ArkUI_ParallelInnerGestureEvent; +/** + * @brief Defines a touch recognizer. + * + * @since 16 + */ +typedef struct ArkUI_TouchRecognizer ArkUI_TouchRecognizer; + +/** + * @brief Defines a touch recognizer handle. + * + * @since 16 + */ +typedef ArkUI_TouchRecognizer* ArkUI_TouchRecognizerHandle; + +/** + * @brief Defines an array of touch recognizer handle. + * + * @since 16 + */ +typedef ArkUI_TouchRecognizerHandle* ArkUI_TouchRecognizerHandleArray; + /** * @brief Defines a callback function for notifying gesture recognizer destruction. * @since 12 @@ -321,6 +342,39 @@ ArkUI_GestureEvent* OH_ArkUI_GestureInterruptInfo_GetGestureEvent(const ArkUI_Ge */ int32_t OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType(const ArkUI_GestureInterruptInfo* event); +/** +* @brief Get the touch recognizer handles from the gesture interrupt info. +* +* @param info Indicates the pointer to a gesture interrupt info. +* @param recognizers Indicates the pointer to an array of touch recognizer handles. +* @param size Indicates the size of recognizers. +* @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. +* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. +* @since 16 +*/ +int32_t OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers(const ArkUI_GestureInterruptInfo* info, + ArkUI_TouchRecognizerHandleArray* recognizers, int32_t* size); + +/** +* @brief Get component object of the specific touch recognizer. +* +* @param recognizer Indicates the pointer to the TouchRecognizer. +* @return Get component object of the specific touch recognizer. +* @since 16 +*/ +ArkUI_NodeHandle OH_ArkUI_TouchRecognizer_GetNodeHandle(const ArkUI_TouchRecognizerHandle recognizer); + +/** +* @brief Send touch-cancel event to the touch recognizer in a gesture interruption callback. +* +* @param recognizer Indicates the touch recognizer handle. +* @param info Indicates the pointer to a gesture interrupt info. +* @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. +* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. +* @since 16 +*/ +int32_t OH_ArkUI_TouchRecognizer_CancelTouch(ArkUI_TouchRecognizerHandle recognizer, ArkUI_GestureInterruptInfo* info); + /** * @brief Obtains the gesture event type. * -- Gitee From bce24489c65638b8467eb9e8c38f68c1e5c30339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=85=E5=BF=97=E5=9D=9A?= Date: Mon, 10 Feb 2025 11:35:43 +0800 Subject: [PATCH 519/630] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=9C=AA=E5=BC=80?= =?UTF-8?q?=E6=BA=90=E7=9A=84=E4=BB=A3=E7=A0=81=20Signed-off-by:=20felands?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resourceschedule/ffrt/c/condition_variable.h | 26 ++++++++++---------- resourceschedule/ffrt/c/mutex.h | 22 ++++++++--------- resourceschedule/ffrt/c/queue.h | 5 ++-- resourceschedule/ffrt/c/sleep.h | 4 +-- resourceschedule/ffrt/c/task.h | 2 +- 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/resourceschedule/ffrt/c/condition_variable.h b/resourceschedule/ffrt/c/condition_variable.h index 0c0534246..8472dba1b 100644 --- a/resourceschedule/ffrt/c/condition_variable.h +++ b/resourceschedule/ffrt/c/condition_variable.h @@ -45,8 +45,8 @@ * * @param cond Indicates a pointer to the condition variable. * @param attr Indicates a pointer to the condition variable attribute. - * @return Returns ffrt_thrd_success if the condition variable is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is initialized; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -57,8 +57,8 @@ FFRT_C_API int ffrt_cond_init(ffrt_cond_t* cond, const ffrt_condattr_t* attr); * @brief Unblocks at least one of the threads that are blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the thread is unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -69,8 +69,8 @@ FFRT_C_API int ffrt_cond_signal(ffrt_cond_t* cond); * @brief Unblocks all threads currently blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the threads are unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the threads are unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -82,8 +82,8 @@ FFRT_C_API int ffrt_cond_broadcast(ffrt_cond_t* cond); * * @param cond Indicates a pointer to the condition variable. * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -98,9 +98,9 @@ FFRT_C_API int ffrt_cond_wait(ffrt_cond_t* cond, ffrt_mutex_t* mutex); * @param time_point Indicates the maximum duration that the thread is blocked. * If ffrt_cond_signal or ffrt_cond_broadcast is not called to unblock the thread * when the maximum duration reaches, the thread is automatically unblocked. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_timedout if the maximum duration reaches; - returns ffrt_thrd_error if the blocking fails. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_error_timedout if the maximum duration reaches; + returns ffrt_error if the blocking fails. * @since 10 * @version 1.0 */ @@ -110,8 +110,8 @@ FFRT_C_API int ffrt_cond_timedwait(ffrt_cond_t* cond, ffrt_mutex_t* mutex, const * @brief Destroys a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the condition variable is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/mutex.h b/resourceschedule/ffrt/c/mutex.h index c8f28ac0f..ec8eede4c 100644 --- a/resourceschedule/ffrt/c/mutex.h +++ b/resourceschedule/ffrt/c/mutex.h @@ -24,7 +24,7 @@ * * @since 10 */ - + /** * @file mutex.h * @kit FunctionFlowRuntimeKit @@ -90,8 +90,8 @@ FFRT_C_API int ffrt_mutexattr_destroy(ffrt_mutexattr_t* attr); * * @param mutex Indicates a pointer to the mutex. * @param attr Indicates a pointer to the mutex attribute. - * @return Returns ffrt_thrd_success if the mutex is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is initialized; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -101,8 +101,8 @@ FFRT_C_API int ffrt_mutex_init(ffrt_mutex_t* mutex, const ffrt_mutexattr_t* attr * @brief Locks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or blocks the calling thread otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or blocks the calling thread otherwise. * @since 10 * @version 1.0 */ @@ -112,8 +112,8 @@ FFRT_C_API int ffrt_mutex_lock(ffrt_mutex_t* mutex); * @brief Unlocks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is unlocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is unlocked; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -123,8 +123,8 @@ FFRT_C_API int ffrt_mutex_unlock(ffrt_mutex_t* mutex); * @brief Attempts to lock a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or ffrt_thrd_busy otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or ffrt_error_busy otherwise. * @since 10 * @version 1.0 */ @@ -134,8 +134,8 @@ FFRT_C_API int ffrt_mutex_trylock(ffrt_mutex_t* mutex); * @brief Destroys a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/queue.h b/resourceschedule/ffrt/c/queue.h index fb077e38e..b2a50255a 100644 --- a/resourceschedule/ffrt/c/queue.h +++ b/resourceschedule/ffrt/c/queue.h @@ -222,7 +222,7 @@ FFRT_C_API int ffrt_queue_cancel(ffrt_task_handle_t handle); * @since 12 * @version 1.0 */ -FFRT_C_API ffrt_queue_t ffrt_get_main_queue(); +FFRT_C_API ffrt_queue_t ffrt_get_main_queue(void); /** * @brief Get application worker(ArkTs) thread queue. @@ -230,8 +230,9 @@ FFRT_C_API ffrt_queue_t ffrt_get_main_queue(); * @return Returns application worker(ArkTs) thread queue. * @since 12 * @version 1.0 + * @deprecated since 15 */ -FFRT_C_API ffrt_queue_t ffrt_get_current_queue(); +FFRT_C_API ffrt_queue_t ffrt_get_current_queue(void); #endif // FFRT_API_C_QUEUE_H /** @} */ \ No newline at end of file diff --git a/resourceschedule/ffrt/c/sleep.h b/resourceschedule/ffrt/c/sleep.h index 777cb553d..d45668ed1 100644 --- a/resourceschedule/ffrt/c/sleep.h +++ b/resourceschedule/ffrt/c/sleep.h @@ -44,8 +44,8 @@ * @brief Suspends the calling thread for a given duration. * * @param usec Indicates the duration that the calling thread is suspended, in microseconds. - * @return Returns ffrt_thrd_success if the thread is suspended; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is suspended; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/task.h b/resourceschedule/ffrt/c/task.h index 786661d82..bb1296daa 100644 --- a/resourceschedule/ffrt/c/task.h +++ b/resourceschedule/ffrt/c/task.h @@ -179,7 +179,7 @@ FFRT_C_API int ffrt_this_task_update_qos(ffrt_qos_t qos); * @since 12 * @version 1.0 */ -FFRT_C_API ffrt_qos_t ffrt_this_task_get_qos(); +FFRT_C_API ffrt_qos_t ffrt_this_task_get_qos(void); /** * @brief Obtains the ID of this task. -- Gitee From 04323d3826844ce646f647eb3400739091d400d8 Mon Sep 17 00:00:00 2001 From: 136******92 Date: Mon, 10 Feb 2025 08:36:04 +0000 Subject: [PATCH 520/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0usb=E9=9F=B3=E9=A2=91?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 136******92 --- .../audio_framework/common/native_audio_device_base.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/multimedia/audio_framework/common/native_audio_device_base.h b/multimedia/audio_framework/common/native_audio_device_base.h index bb8f3f9f8..54d1313ce 100644 --- a/multimedia/audio_framework/common/native_audio_device_base.h +++ b/multimedia/audio_framework/common/native_audio_device_base.h @@ -143,6 +143,13 @@ typedef enum { */ AUDIO_DEVICE_TYPE_REMOTE_CAST = 24, + /** + * @brief Usb audio device. + * + * @since 16 + */ + AUDIO_DEVICE_TYPE_USB_DEVICE = 25, + /** * @brief Default device type. */ -- Gitee From bfe5d3a47340830d166b72d3b2026c4a4834a7d7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Sun, 9 Feb 2025 21:23:17 +0800 Subject: [PATCH 521/630] =?UTF-8?q?[L]=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E4=BA=8B=E4=BB=B6=E5=88=86=E5=8F=91=E5=92=8C=E8=B5=B0?= =?UTF-8?q?=E7=84=A6=20Capi=20=E4=BF=AE=E6=94=B9Signed-off-by:lisitaolisit?= =?UTF-8?q?ao3@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ .../native/native_interface_focus.h | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 6d45c4d7c..960744881 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2794,5 +2794,9 @@ { "first_introduced": "16", "name": "OH_ArkUI_GestureInterrupter_GetUserData" + }, + { + "first_introduced": "15", + "name": "OH_ArkUI_FocusSetKeyProcessingMode" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_focus.h b/arkui/ace_engine/native/native_interface_focus.h index 4fb6643e1..2edd17cb4 100644 --- a/arkui/ace_engine/native/native_interface_focus.h +++ b/arkui/ace_engine/native/native_interface_focus.h @@ -42,6 +42,18 @@ extern "C" { #endif +/** + * @brief Determines the priority of key event processing when component cannot handle the key event. + * + * @since 15 + */ +typedef enum { + /** Key events are used to move focus. */ + ARKUI_KEY_PROCESSING_MODE_FOCUS_NAVIGATION = 0, + /** Key events bubble up to ancestors. */ + ARKUI_KEY_PROCESSING_MODE_FOCUS_ANCESTOR_EVENT, +} ArkUI_KeyProcessingMode; + /** * @brief Apply focus for a specific node. * @@ -84,6 +96,15 @@ void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool i */ void OH_ArkUI_FocusSetAutoTransfer(ArkUI_ContextHandle uiContext, bool autoTransfer); + +/** + * @brief Set the priority of key event processing when component cannot handle the key event. + * + * @param uiContext Indicates the pointer to a UI instance. + * @param mode Indicates the key processing mode. + * @since 15 +*/ +void OH_ArkUI_FocusSetKeyProcessingMode(ArkUI_ContextHandle uiContext, ArkUI_KeyProcessingMode mode); #ifdef __cplusplus }; #endif -- Gitee From e1581e7b4f73d72d9ae84c685956f32ce3d5f0bc Mon Sep 17 00:00:00 2001 From: mazijian Date: Mon, 10 Feb 2025 16:58:04 +0800 Subject: [PATCH 522/630] =?UTF-8?q?crossLanguage=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=9B=9E=E5=90=88API15=20SDK=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mazijian Change-Id: I13d9a068d33fa363610aa8f02f430fc46ecb1a4c --- arkui/ace_engine/native/libace.ndk.json | 12 ++++++------ arkui/ace_engine/native/native_node.h | 4 ++-- arkui/ace_engine/native/native_type.h | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 6d45c4d7c..ba94c8395 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1368,27 +1368,27 @@ "name": "OH_ArkUI_NodeUtils_MoveTo" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_SetCrossLanguageOption" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetCrossLanguageOption" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_CrossLanguageOption_Create" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_CrossLanguageOption_Destroy" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus" }, { diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a046c800c..8cda9c67d 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9006,7 +9006,7 @@ int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_SetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option); @@ -9019,7 +9019,7 @@ int32_t OH_ArkUI_NodeUtils_SetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_C * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option); diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 20cebacea..5d99d8cc5 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -224,7 +224,7 @@ typedef struct ArkUI_ProgressLinearStyleOption ArkUI_ProgressLinearStyleOption; /** * @brief The cross-language option. * - * @since 16 + * @since 15 */ typedef struct ArkUI_CrossLanguageOption ArkUI_CrossLanguageOption; @@ -4474,7 +4474,7 @@ int32_t OH_ArkUI_SnapshotOptions_SetScale(ArkUI_SnapshotOptions* snapshotOptions * @brief Create a cross-language option instance. * * @return Returns a cross-language option instance. If the result is a null pointer, it may be out of memory. - * @since 16 + * @since 15 */ ArkUI_CrossLanguageOption* OH_ArkUI_CrossLanguageOption_Create(void); @@ -4482,7 +4482,7 @@ ArkUI_CrossLanguageOption* OH_ArkUI_CrossLanguageOption_Create(void); * @brief Destroy the cross-language option instance. * * @param option The cross-language option instance. - * @since 16 + * @since 15 */ void OH_ArkUI_CrossLanguageOption_Destroy(ArkUI_CrossLanguageOption* option); @@ -4492,7 +4492,7 @@ void OH_ArkUI_CrossLanguageOption_Destroy(ArkUI_CrossLanguageOption* option); * @param option The cross-language option. * @param enabled The attribute setting in the cross-language option. * Default value: false. - * @since 16 + * @since 15 */ void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageOption* option, bool enabled); @@ -4501,7 +4501,7 @@ void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageO * * @param option The cross-language option. * @return The attribute setting enable of the cross-language option. - * @since 16 + * @since 15 */ bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageOption* option); #ifdef __cplusplus -- Gitee From ecfd73d964bff3449f36e269dc4c98040aa6b931 Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Tue, 11 Feb 2025 10:38:16 +0800 Subject: [PATCH 523/630] =?UTF-8?q?[L]=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E4=BA=8B=E4=BB=B6=E5=88=86=E5=8F=91=E5=92=8C=E8=B5=B0?= =?UTF-8?q?=E7=84=A6=20Capi=E6=9B=B4=E6=94=B9version=20=E4=BF=AE=E6=94=B9S?= =?UTF-8?q?igned-off-by:lisitaolisitao3@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/libace.ndk.json | 2 +- arkui/ace_engine/native/native_key_event.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 960744881..4e90d54ca 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2600,7 +2600,7 @@ "name": "OH_ArkUI_GetGestureParam_DirectMask" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_KeyEvent_Dispatch" }, { diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h index 34ac146d1..a20f0e9b5 100644 --- a/arkui/ace_engine/native/native_key_event.h +++ b/arkui/ace_engine/native/native_key_event.h @@ -562,7 +562,7 @@ void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsu * * @param node Indicates the pointer to a component node. * @param event Pointer to an ArkUI_UIInputEvent object. - * @since 16 + * @since 15 */ void OH_ArkUI_KeyEvent_Dispatch(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event); #ifdef __cplusplus -- Gitee From b8680603d8e421b6a4d22410b1498d89fb95f01d Mon Sep 17 00:00:00 2001 From: mdd12138 <1245619585@qq.com> Date: Thu, 6 Feb 2025 17:13:24 +0800 Subject: [PATCH 524/630] update for onHoverMove feature Signed-off-by: mdd12138 <1245619585@qq.com> --- arkui/ace_engine/native/native_node.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c7d44068c..4a3623088 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6525,6 +6525,17 @@ typedef enum { */ NODE_ON_HOVER_EVENT = 27, + /** + * @brief Defines the hover event. + * + * The event is triggered when the pointer is hovered by a pen device. + * within the component. \n + * When the event callback occurs, the {@link ArkUI_NodeEvent} object can be obtained from the + * {@link ArkUI_UIInputEvent} object. \n + * @since 16 + */ + NODE_ON_HOVER_MOVE = 29, + /** * @brief Triggers onDetectResultUpdate callback * when the text is set to TextDataDetectorConfig and recognized successfully. -- Gitee From 11c40d0d64642dbd03704d1f381f0de2c339ca8c Mon Sep 17 00:00:00 2001 From: sunxuejiao Date: Tue, 11 Feb 2025 16:10:40 +0800 Subject: [PATCH 525/630] bug: modify pasteboard FileConflictOption definition Signed-off-by: sunxuejiao --- distributeddatamgr/pasteboard/include/oh_pasteboard.h | 10 +++++----- distributeddatamgr/pasteboard/libpasteboard.ndk.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 547d3c054..c4fb2990a 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -68,7 +68,7 @@ typedef enum Pasteboard_NotifyType { * * @since 15 */ -typedef enum Pasteboard_FileConflictOption { +typedef enum Pasteboard_FileConflictOptions { /** * @brief Overwrite when destUir has file with same name. */ @@ -77,7 +77,7 @@ typedef enum Pasteboard_FileConflictOption { * @brief Skip when destUir has file with same name. */ PASTEBOARD_SKIP = 1 -} Pasteboard_FileConflictOption; +} Pasteboard_FileConflictOptions; /** * @brief Enumerates the types of progress indicator when getting data from the Pastedboard. @@ -390,11 +390,11 @@ void OH_Pasteboard_GetDataParams_SetDestUri(Pasteboard_GetDataParams* params, co * * @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}. * @param option Represents to the file conflict options. - * @see Pasteboard_GetDataParams Pasteboard_FileConflictOption + * @see Pasteboard_GetDataParams Pasteboard_FileConflictOptions * @since 15 */ -void OH_Pasteboard_GetDataParams_SetFileConflictOption(Pasteboard_GetDataParams* params, - Pasteboard_FileConflictOption option); +void OH_Pasteboard_GetDataParams_SetFileConflictOptions(Pasteboard_GetDataParams* params, + Pasteboard_FileConflictOptions option); /** * @brief Set the progress indicator to the {@link Pasteboard_GetDataParams}. diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index f642d1eb7..044bcdc8e 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -77,7 +77,7 @@ }, { "first_introduced": "15", - "name": "OH_Pasteboard_GetDataParams_SetFileConflictOption" + "name": "OH_Pasteboard_GetDataParams_SetFileConflictOptions" }, { "first_introduced": "15", -- Gitee From eb536fe0e4b23746c90b941a17f464767cf3f9a8 Mon Sep 17 00:00:00 2001 From: mazijian Date: Tue, 11 Feb 2025 16:26:05 +0800 Subject: [PATCH 526/630] =?UTF-8?q?FrameNode=E6=94=AF=E6=8C=81LazyExpand?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E5=80=BC=E4=BF=AE=E6=94=B9+SDK=E5=9B=9E?= =?UTF-8?q?=E5=90=8815=EF=BC=88CAPI=20SDK=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mazijian Change-Id: Iaf439a39835059f9e0121bfe41d71036e1a6ec3e --- arkui/ace_engine/native/libace.ndk.json | 6 +++--- arkui/ace_engine/native/native_node.h | 6 +++--- arkui/ace_engine/native/native_type.h | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 960744881..5021aed7c 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1392,15 +1392,15 @@ "name": "OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetChildWithExpandMode" }, { diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index db7bf1e3e..a6f23f8d1 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8858,7 +8858,7 @@ int32_t OH_ArkUI_NodeUtils_GetWindowInfo(ArkUI_NodeHandle node, ArkUI_HostWindow * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index); @@ -8871,7 +8871,7 @@ int32_t OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand(ArkUI_NodeHandle node * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index); @@ -8886,7 +8886,7 @@ int32_t OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand(ArkUI_NodeHandle node, * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetChildWithExpandMode(ArkUI_NodeHandle node, int32_t position, ArkUI_NodeHandle* subnode, uint32_t expandMode); diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 20cebacea..4767f99db 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2520,13 +2520,13 @@ typedef enum { /** * @brief Enumerates the expand modes. * - * @since 16 + * @since 15 */ typedef enum { - /** Expand. */ - ARKUI_EXPAND = 0, /** Not expand. */ - ARKUI_NOT_EXPAND = 1, + ARKUI_NOT_EXPAND = 0, + /** Expand. */ + ARKUI_EXPAND = 1, /** Lazy expand. Expand the children of node if needed. */ ARKUI_LAZY_EXPAND = 2, } ArkUI_ExpandMode; -- Gitee From 8f10fe88de32cc5e2a64a7df237c01c47047da32 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Tue, 11 Feb 2025 17:59:38 +0800 Subject: [PATCH 527/630] Axis action get capi update Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 2 +- arkui/ace_engine/native/ui_input_event.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 960744881..1f1f51cc0 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -168,7 +168,7 @@ "name": "OH_ArkUI_AxisEvent_GetPinchAxisScaleValue" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_AxisEvent_GetAxisAction" }, { diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 43a2d9e94..5225f4dcd 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -241,7 +241,7 @@ typedef enum { /** * @brief Enumerates the action types for axis events. * - * @since 16 + * @since 15 */ enum { /** The axis event is abnormal. */ @@ -777,7 +777,7 @@ double OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(const ArkUI_UIInputEvent* event * * @param event Indicates the pointer to the current UI input event. * @return Returns the action type of the current axis event. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_AxisEvent_GetAxisAction(const ArkUI_UIInputEvent* event); -- Gitee From 387c09894df059c0544f2cf2bf9aeec929b6f69b Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Tue, 11 Feb 2025 18:04:30 +0800 Subject: [PATCH 528/630] limitFinget_changeApiVersion Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 2 +- arkui/ace_engine/native/native_gesture.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 960744881..8f391b293 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -260,7 +260,7 @@ "name": "OH_ArkUI_SetGestureRecognizerEnabled" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_SetGestureRecognizerLimitFingerCount" }, { diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index ece305d4f..2c9c691c0 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -501,7 +501,7 @@ int32_t OH_ArkUI_SetGestureRecognizerEnabled(ArkUI_GestureRecognizer* recognizer * @param limitFingerCount Indicates whether to enable strict finger count checking. * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. -* @since 16 +* @since 15 */ int32_t OH_ArkUI_SetGestureRecognizerLimitFingerCount(ArkUI_GestureRecognizer* recognizer, bool limitFingerCount); -- Gitee From 3e6af178c5a3cd04edb00c6426c0627251cf55a5 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Tue, 11 Feb 2025 20:09:03 +0800 Subject: [PATCH 529/630] revised 16 to 15 Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 10 +++++----- arkui/ace_engine/native/ui_input_event.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 960744881..2b54369ef 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2712,23 +2712,23 @@ "name": "OH_ArkUI_GetNodeSnapshot" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_GetPressedTimeByIndex" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_MouseEvent_GetRawDeltaX" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_MouseEvent_GetRawDeltaY" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_MouseEvent_GetPressedButtons" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_UIInputEvent_GetTargetDisplayId" }, { diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 43a2d9e94..e7abfcd0e 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -956,7 +956,7 @@ int32_t OH_ArkUI_UIInputEvent_GetModifierKeyStates(const ArkUI_UIInputEvent* eve * @param event Pointer to an ArkUI_UIInputEvent object. * @param pointerIndex Index of the target touch point in the multi-touch data list. * @return Returns the press time of the specific touch point; returns 0 if any parameter error occurs. - * @since 16 + * @since 15 */ int64_t OH_ArkUI_PointerEvent_GetPressedTimeByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex); @@ -967,7 +967,7 @@ int64_t OH_ArkUI_PointerEvent_GetPressedTimeByIndex(const ArkUI_UIInputEvent* ev * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the x-axis offset of the mouse pointer position relative to the position in the previously reported * mouse event; returns 0.0f if any parameter error occurs. - * @since 16 + * @since 15 */ float OH_ArkUI_MouseEvent_GetRawDeltaX(const ArkUI_UIInputEvent* event); @@ -978,7 +978,7 @@ float OH_ArkUI_MouseEvent_GetRawDeltaX(const ArkUI_UIInputEvent* event); * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the y-axis offset of the mouse pointer position relative to the position in the previously reported * mouse event; returns 0.0f if any parameter error occurs. - * @since 16 + * @since 15 */ float OH_ArkUI_MouseEvent_GetRawDeltaY(const ArkUI_UIInputEvent* event); @@ -993,7 +993,7 @@ float OH_ArkUI_MouseEvent_GetRawDeltaY(const ArkUI_UIInputEvent* event); * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the given buffer size is insufficient. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_MouseEvent_GetPressedButtons( const ArkUI_UIInputEvent* event, int32_t* pressedButtons, int32_t* length); @@ -1003,7 +1003,7 @@ int32_t OH_ArkUI_MouseEvent_GetPressedButtons( * * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the screen ID; returns 0 if any parameter error occurs. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_UIInputEvent_GetTargetDisplayId(const ArkUI_UIInputEvent* event); -- Gitee From 757abf6315cad879de22638aca074824836b7f65 Mon Sep 17 00:00:00 2001 From: wangtao Date: Wed, 12 Feb 2025 10:38:44 +0800 Subject: [PATCH 530/630] NODE_IMMUTABLE_FONT_WEIGHT since 15 Signed-off-by: wangtao Change-Id: If975d67965d083c2b0e7be80f61c6c995875c556 --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 992aade21..5048b456f 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2285,7 +2285,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: font weight {@link ArkUI_FontWeight}.\n * - * @since 16 + * @since 15 */ NODE_IMMUTABLE_FONT_WEIGHT = 1030, -- Gitee From eed52ba2d19c79d7622934813ae090b1264eac96 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Wed, 12 Feb 2025 14:50:25 +0800 Subject: [PATCH 531/630] =?UTF-8?q?api=E7=89=88=E6=9C=AC=E4=BF=AE=E6=94=B9?= =?UTF-8?q?16=20->=2015?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- arkui/ace_engine/native/libace.ndk.json | 8 ++++---- arkui/ace_engine/native/native_node.h | 2 +- arkui/ace_engine/native/native_type.h | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 63faa1451..561688e02 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2708,19 +2708,19 @@ "name": "OH_ArkUI_FocusSetAutoTransfer" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_CreateSnapshotOptions" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_DestroySnapshotOptions" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_SnapshotOptions_SetScale" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_GetNodeSnapshot" }, { diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 992aade21..eb943b033 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9098,7 +9098,7 @@ int32_t OH_ArkUI_UnregisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node); * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_INTERNAL_ERROR} if the snapshot taking failed will null pixelmap returned. * Returns {@link ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_TIMEOUT} if the snapshot taking is timeout. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_GetNodeSnapshot(ArkUI_NodeHandle node, ArkUI_SnapshotOptions* snapshotOptions, OH_PixelmapNative** pixelmap); diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 0181740cf..2eedba72f 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2118,7 +2118,7 @@ typedef enum { /** * @error Internal error occurs, such as failure occurs because of the internal environment error, * or operation failed because of the internal execution failed. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_INTERNAL_ERROR = 100001, /** @error The component does not support specific properties or events. */ @@ -2165,7 +2165,7 @@ typedef enum { ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT = 150003, /** * @error The snapshot taking is timeout. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_TIMEOUT = 160002, /** The component is not a scroll container. */ @@ -2546,7 +2546,7 @@ typedef struct ArkUI_SystemFontStyleEvent ArkUI_SystemFontStyleEvent; /** * @brief Defines the options for taking snapshot. * - * @since 16 + * @since 15 */ typedef struct ArkUI_SnapshotOptions ArkUI_SnapshotOptions; @@ -4452,7 +4452,7 @@ float OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius(ArkUI_ProgressLinearSty * * @return Returns the pointer to the created snapshot options object.If the object returns a null pointer, * it indicates a creation failure, and the reason for the failure may be that the address space is full. - * @since 16 + * @since 15 */ ArkUI_SnapshotOptions* OH_ArkUI_CreateSnapshotOptions(); @@ -4460,7 +4460,7 @@ ArkUI_SnapshotOptions* OH_ArkUI_CreateSnapshotOptions(); * @brief Dispose a snapshot option object. * * @param snapshotOptions Indicates the pointer to the snapshot option. - * @since 16 + * @since 15 */ void OH_ArkUI_DestroySnapshotOptions(ArkUI_SnapshotOptions* snapshotOptions); @@ -4471,7 +4471,7 @@ void OH_ArkUI_DestroySnapshotOptions(ArkUI_SnapshotOptions* snapshotOptions); * @param scale Indicates the scale property to take the snapshot. * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_SnapshotOptions_SetScale(ArkUI_SnapshotOptions* snapshotOptions, float scale); -- Gitee From 36667e92fa980a25e66cf6e75990c8d9d379c98c Mon Sep 17 00:00:00 2001 From: zhanghang Date: Wed, 12 Feb 2025 15:58:53 +0800 Subject: [PATCH 532/630] change 16 to 15. Signed-off-by: zhanghang --- arkui/ace_engine/native/native_node.h | 2 +- arkui/ace_engine/native/native_type.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 992aade21..190174779 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5450,7 +5450,7 @@ typedef enum { * .value[0].i32: index value of the child component. \n * .value[1]?.i32: animation mode, the parameter type is {@link ArkUI_SwiperAnimationMode}. \n * The default value is ARKUI_SWIPER_NO_ANIMATION. This parameter is valid only for the current call. \n - * This parameter is supported since API version 16. \n + * This parameter is supported since API version 15. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: index value of the child component. \n diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 0181740cf..6c68ab7db 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -862,7 +862,7 @@ typedef enum { /** * @brief Enumerates the animation modes for {@link NODE_SWIPER_INDEX}. * - * @since 16 + * @since 15 */ typedef enum { /** Jump to target index without animation. */ -- Gitee From a0eeaa16612ad3ee5025c59c7921b636b2e84f82 Mon Sep 17 00:00:00 2001 From: mlyuestc Date: Mon, 10 Feb 2025 06:46:20 +0000 Subject: [PATCH 533/630] add new interface Signed-off-by: mlyuestc --- arkui/ace_engine/native/libace.ndk.json | 36 +++++++ arkui/ace_engine/native/native_node.h | 12 +++ arkui/ace_engine/native/native_type.h | 15 +++ arkui/ace_engine/native/ui_input_event.h | 121 +++++++++++++++++++++++ 4 files changed, 184 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 6d45c4d7c..ccd02a0f3 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2794,5 +2794,41 @@ { "first_introduced": "16", "name": "OH_ArkUI_GestureInterrupter_GetUserData" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_CreateClonedEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_DestroyClonedEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_SetClonedEventLocalPosition" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_SetClonedEventActionType" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_PostClonedEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_NodeUtils_GetPositionToParent" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a046c800c..4c69cf8d0 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9092,6 +9092,18 @@ int32_t OH_ArkUI_UnregisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node); int32_t OH_ArkUI_GetNodeSnapshot(ArkUI_NodeHandle node, ArkUI_SnapshotOptions* snapshotOptions, OH_PixelmapNative** pixelmap); +/** + * @brief Obtains the offset of a specific node relative to its parent node. + * + * @param node Target node. + * @param globalOffset Offset of the target node relative to its parent node, in px. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_NodeUtils_GetPositionToParent(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 20cebacea..dc02f867d 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2172,6 +2172,21 @@ typedef enum { ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER = 180001, /** The buffer is not large enough. */ ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH = 180002, + /** + * @error The event is not a clone event. + * @since 16 + */ + ARKUI_ERROR_CODE_NOT_CLONED_POINTER_EVENT = 180003, + /** + * @error The component status is abnormal. + * @since 16 + */ + ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL = 180004, + /** + * @error No component hit to respond to the event. + * @since 16 + */ + ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT = 180005, /** * @error invalid styled string. * @since 14 diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 43a2d9e94..dc25959db 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -36,6 +36,7 @@ #ifndef _ARKUI_UI_INPUT_EVENT_H_ #define _ARKUI_UI_INPUT_EVENT_H_ +#include "native_type.h" #include #ifdef __cplusplus @@ -1028,6 +1029,126 @@ int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool */ int32_t OH_ArkUI_AxisEvent_GetScrollStep(const ArkUI_UIInputEvent* event); +/** + * @brief Creates a cloned event pointer based on an event pointer. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param clonedEvent Pointer to the cloned ArkUI_UIInputEvent object. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_CreateClonedEvent(const ArkUI_UIInputEvent* event, ArkUI_UIInputEvent** clonedEvent); + +/** + * @brief Destroys a cloned event pointer. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @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. + * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a + * cloned event pointer. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_DestroyClonedEvent(const ArkUI_UIInputEvent* event); + +/** + * @brief Sets the X and Y coordinates of a cloned event relative to the upper left corner of the current component. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param x X coordinate of the event relative to the upper left corner of the current component. + * @param y Y coordinate of the event relative to the upper left corner of the current component. + * @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. + * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a + * cloned event pointer. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPosition(const ArkUI_UIInputEvent* event, float x, float y); + +/** + * @brief Sets the X and Y coordinates of a specific contact point of a cloned event relative to the upper left corner + * of the current component. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param x X coordinate of the event relative to the upper left corner of the current component. + * @param y Y coordinate of the event relative to the upper left corner of the current component. + * @param pointerIndex Index of the target touch point in the multi-touch data list. + * @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. + * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a + * cloned event pointer. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex( + const ArkUI_UIInputEvent* event, float x, float y, int32_t pointerIndex); + +/** + * @brief Sets the action type of a cloned event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param actionType Action type of the cloned event. + * @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. + * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a + * cloned event pointer. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_SetClonedEventActionType(const ArkUI_UIInputEvent* event, int32_t actionType); + +/** + * @brief Sets the touch point ID of a cloned pointer event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param fingerId ID of the touch point that triggers the event. + * @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. + * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a + * cloned event pointer. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId(const ArkUI_UIInputEvent* event, int32_t fingerId); + +/** + * @brief Sets the touch point ID of a specific contact point of a cloned event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param fingerId Touch point ID of the specific contact point. + * @param pointerIndex Index of the target touch point in the multi-touch data list. + * @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. + * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a + * cloned event pointer. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex( + const ArkUI_UIInputEvent* event, int32_t fingerId, int32_t pointerIndex); + +/** + * @brief Posts a cloned event to a specific node. + * + * @param node Target node. + * @param event Pointer to an ArkUI_UIInputEvent object. + * @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. + * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a + * cloned event pointer. + * Returns {@link ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL} + * if the component status abnormal. + * Returns {@link ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT} + * if no component hit to response to the event. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_PostClonedEvent(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event); + #ifdef __cplusplus }; #endif -- Gitee From c81ab5efe1ed78fb365e67ef6b8ee14dd9bf8141 Mon Sep 17 00:00:00 2001 From: c30053238 Date: Wed, 22 Jan 2025 14:43:25 +0800 Subject: [PATCH 534/630] keyframeanimateto Signed-off-by: c30053238 --- arkui/ace_engine/native/libace.ndk.json | 8 ++++++++ arkui/ace_engine/native/native_animate.h | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 7e2d642a4..016349fdb 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2702,5 +2702,13 @@ { "first_introduced": "16", "name": "OH_ArkUI_DisableDropDataPrefetchOnNode" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h index 858ccfa39..94b302d3c 100644 --- a/arkui/ace_engine/native/native_animate.h +++ b/arkui/ace_engine/native/native_animate.h @@ -413,6 +413,19 @@ int32_t OH_ArkUI_KeyframeAnimateOption_SetIterations(ArkUI_KeyframeAnimateOption int32_t OH_ArkUI_KeyframeAnimateOption_RegisterOnFinishCallback( ArkUI_KeyframeAnimateOption* option, void* userData, void (*onFinish)(void* userData)); +/** + * @brief Sets the expected frame rate range of a keyframe animation. + * + * @param option Indicates the pointer to a keyframe animation configuration. + * @param frameRate Indicates the expected frame rate range. + * @return Returns the error 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. + * @since 16 + */ +int32_t OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate( + ArkUI_KeyframeAnimateOption* option, ArkUI_ExpectedFrameRateRange* frameRate); + /** * @brief Sets the duration of a keyframe animation, in milliseconds. * @@ -476,6 +489,15 @@ int32_t OH_ArkUI_KeyframeAnimateOption_GetDelay(ArkUI_KeyframeAnimateOption* opt */ int32_t OH_ArkUI_KeyframeAnimateOption_GetIterations(ArkUI_KeyframeAnimateOption* option); +/** + * @brief Obtains the expected frame rate range of a keyframe animation configuration. + * + * @param option Indicates the pointer to a keyframe animation configuration. + * @return Returns the expected frame rate range of the keyframe animation. + * @since 16 + */ +ArkUI_ExpectedFrameRateRange* OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate(ArkUI_KeyframeAnimateOption* option); + /** * @brief Obtains the duration of a specific state in a keyframe animation. * -- Gitee From acfdea2679dc640dacb60579e565373994367c41 Mon Sep 17 00:00:00 2001 From: huangxiao <1286409928@qq.com> Date: Mon, 10 Feb 2025 19:38:15 +0800 Subject: [PATCH 535/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E6=89=98=E7=AE=A1=E7=AD=96=E7=95=A5=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I618fb80c8859d33536c0589725c97980896df951 Signed-off-by: huangxiao <1286409928@qq.com> --- BasicServicesKit/commonevent/oh_commonevent_support.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BasicServicesKit/commonevent/oh_commonevent_support.h b/BasicServicesKit/commonevent/oh_commonevent_support.h index 3a0e678bf..622e86aeb 100644 --- a/BasicServicesKit/commonevent/oh_commonevent_support.h +++ b/BasicServicesKit/commonevent/oh_commonevent_support.h @@ -569,6 +569,14 @@ static const char* const COMMON_EVENT_MINORSMODE_ON = "usual.event.MINORSMODE_ON * @since 12 */ static const char* const COMMON_EVENT_MINORSMODE_OFF = "usual.event.MINORSMODE_OFF"; + +/** + * @brief This common event means that the managed browser policy is changed. + * This is a protected common event that can only be sent by system. + * + * @since 15 + */ +static const char* const COMMON_EVENT_MANAGED_BROWSER_POLICY_CHANGED = "usual.event.MANAGED_BROWSER_POLICY_CHANGED"; #ifdef __cplusplus } #endif -- Gitee From 13fb82ba266ebaebb0427ce2a703cde227702edb Mon Sep 17 00:00:00 2001 From: huangweichen Date: Wed, 1 Jan 2025 21:21:35 +0800 Subject: [PATCH 536/630] =?UTF-8?q?=E6=8C=89=E9=94=AE=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0UI=20input=E4=BA=8B=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangweichen --- arkui/ace_engine/native/ui_input_event.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 503f6f8ca..04330143f 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -60,6 +60,12 @@ typedef enum { ARKUI_UIINPUTEVENT_TYPE_AXIS = 2, /** Mouse event. */ ARKUI_UIINPUTEVENT_TYPE_MOUSE = 3, + /** + * @brief key event. + * + * @since 16 + */ + ARKUI_UIINPUTEVENT_TYPE_KEY = 4, } ArkUI_UIInputEvent_Type; /** -- Gitee From 7fe6d08a2ce93035405d9647a4fa237ad24b68e2 Mon Sep 17 00:00:00 2001 From: c30053238 Date: Thu, 13 Feb 2025 10:21:16 +0800 Subject: [PATCH 537/630] version change Signed-off-by: c30053238 --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 47d472b70..fd43f832f 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1865,7 +1865,7 @@ typedef enum { * .value[2].f32:grayscale blur settings that control the darkness of the white color.\n * The value range is [0, 127].\n * - * @since 16 + * @since 15 */ NODE_BACKDROP_BLUR = 99, -- Gitee From 563e3443fa0a30e1d0bc9f46229dda0ac7492dc8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Thu, 13 Feb 2025 10:28:22 +0800 Subject: [PATCH 538/630] =?UTF-8?q?[L]=20add=20CAPI=20setOnVisibleAreaAppr?= =?UTF-8?q?oximateChange=20=20api=20=E4=BF=AE=E6=94=B9Signed-off-by:lisita?= =?UTF-8?q?olisitao3@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/libace.ndk.json | 24 ++++++++ arkui/ace_engine/native/native_node.h | 41 +++++++++++++ arkui/ace_engine/native/native_type.h | 81 +++++++++++++++++++++++++ 3 files changed, 146 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index f6dbb1a22..2794a9ac7 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2771,6 +2771,30 @@ "first_introduced": "16", "name": "OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_VisibleAreaEventOptions_Create" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_VisibleAreaEventOptions_Dispose" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_VisibleAreaEventOptions_SetRatios" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_VisibleAreaEventOptions_GetRatios" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval" + }, { "first_introduced": "16", "name": "OH_ArkUI_UIInputEvent_GetEventTargetWidth" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index b5333c00f..7502ff62a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1902,6 +1902,28 @@ typedef enum { */ NODE_NEXT_FOCUS = 101, + /** + * @brief Sets the parameters for visible area change events. + * + * @note The visible area change callback is not a real-time callback. The actual callback interval may differ from + * the expected interval due to system load and other factors. + * The interval between two visible area change callbacks will not be less than the expected update interval. If the + * provided expected interval is too short, the actual callback interval will be determined by the system load. + * By default, the interval threshold of the visible area change callback includes 0. This means that, + * if the provided threshold is [0.5], the effective threshold will be [0.0, 0.5]. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object: parameters for visible area change events. + * The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object: parameters for visible area change events. + * The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n + * + * @since 16 + */ + NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO = 102, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * @@ -6535,6 +6557,25 @@ typedef enum { */ NODE_ON_HOVER_EVENT = 27, + /** + * @brief Sets the callback for the NODE_EVENT_ON_VISIBLE_AREA_CHANGE event, which limits the callback interval. + * + * The callback is triggered when the ratio of the component's visible area to its total area is greater than or + * less than the threshold. Before registering the callback, you must configure the threshold and update interval + * using NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains two parameters:\n + * ArkUI_NodeComponentEvent.data[0].i32: how the ratio of the component's visible area to its total area + * changes compared to the previous one. The value 1 indicates an increase, and 0 indicates + * a decrease. \n + * ArkUI_NodeComponentEvent.data[1].f32: ratio of the component's visible area to its total area + * when this callback is invoked. \n + * + * @since 16 + */ + NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_EVENT = 28, + /** * @brief Defines the hover event. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index d456dae3a..bf8a4aabd 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -4524,6 +4524,87 @@ void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageO * @since 16 */ bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageOption* option); + +/** + * @brief Defines the parameters for visible area change events. + * + * @since 16 + */ +typedef struct ArkUI_VisibleAreaEventOptions ArkUI_VisibleAreaEventOptions; + +/** +* @brief Creates an instance of visible area change event parameters +* +* @return Returns the created instance of visible area change event parameters. +* @since 16 +*/ +ArkUI_VisibleAreaEventOptions* OH_ArkUI_VisibleAreaEventOptions_Create(); + +/** +* @brief Disposes of an instance of visible area change event parameters. +* +* @param option Instance to be destroyed. +* @since 16 +*/ +void OH_ArkUI_VisibleAreaEventOptions_Dispose(ArkUI_VisibleAreaEventOptions* option); + +/** +* @brief Sets the threshold ratios for visible area changes. +* +* @param option Instance of visible area change event parameters. +* @param value Array of threshold ratios. Each element represents the ratio of the visible area of a component to +* its total area. The visible area is calculated within the parent component's bounds; any area outside the parent +* component is not considered. Each value must be within the [0.0, 1.0] range. +* Values outside this range will be handled as 0.0 or 1.0. +* @param size Size of the threshold array. +* @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. +* If an error code is returned, it may be due to a failure in parameter validation; +* the parameter must not be null. +* @since 16 +*/ +int32_t OH_ArkUI_VisibleAreaEventOptions_SetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t size); + +/** +* @brief Sets the expected update interval for visible area changes. +* +* @param option Instance of visible area change event parameters. +* @param value Expected update interval, in ms. Default value: 1000. +* @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. +* If an error code is returned, it may be due to a failure in parameter validation; +* the parameter must not be null. +* @since 16 +*/ +int32_t OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval( + ArkUI_VisibleAreaEventOptions *option, int32_t value); + +/** + * @brief Obtains the threshold ratios for visible area changes. + * + * @param option Instance of visible area change event parameters. + * @param value Array of threshold ratios. + * @param size Size of the threshold array. + * @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. + * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the provided buffer size is insufficient. + * If an error code is returned, it may be due to a failure in parameter validation; + * the parameter must not be null. + * @since 16 + */ +int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t* size); + +/** + * @brief Obtains the expected update interval for visible area changes. + * + * @param option Instance of visible area change event parameters. + * @return Returns the expected update interval, in ms. Default value: 1000. + * @since 16 + */ +int32_t OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions* option); #ifdef __cplusplus }; #endif -- Gitee From fb248a2ee32d2faf6f8f569c7def558cc74f34fe Mon Sep 17 00:00:00 2001 From: huangweichen Date: Thu, 13 Feb 2025 11:53:49 +0800 Subject: [PATCH 539/630] =?UTF-8?q?ArkUI=E6=8F=90=E4=BE=9BCAPI=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8F=8A=E5=A4=84=E7=90=86=E7=84=A6=E7=82=B9=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E8=B0=83=E6=95=B4API=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangweichen --- arkui/ace_engine/native/libace.ndk.json | 8 ++++---- arkui/ace_engine/native/native_interface_focus.h | 12 ++++++------ arkui/ace_engine/native/native_type.h | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index f6dbb1a22..ddc77a84a 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2692,19 +2692,19 @@ "name": "OH_ArkUI_UnregisterDrawCallbackOnNodeHandle" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_FocusRequest" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_FocusClear" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_FocusActivate" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_FocusSetAutoTransfer" }, { diff --git a/arkui/ace_engine/native/native_interface_focus.h b/arkui/ace_engine/native/native_interface_focus.h index 2edd17cb4..27cdc7349 100644 --- a/arkui/ace_engine/native/native_interface_focus.h +++ b/arkui/ace_engine/native/native_interface_focus.h @@ -19,7 +19,7 @@ * * @brief Provides focus capabilities of ArkUI on the native side, such as focus transfer operaions. * - * @since 16 + * @since 15 */ /** @@ -29,7 +29,7 @@ * * @library libace_ndk.z.so * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 16 + * @since 15 */ #ifndef ARKUI_NATIVE_INTERFACE_FOCUS_H @@ -63,7 +63,7 @@ typedef enum { * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE} if the node is not focusable. * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR} if the node has unfocusable ancestor. * {@link ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT} if the node is not exists. - * @since 16 + * @since 15 */ ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node); @@ -71,7 +71,7 @@ ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node); * @brief Clear current focus to root scope. * * @param uiContext Indicates the pointer to a UI instance. - * @since 16 + * @since 15 */ void OH_ArkUI_FocusClear(ArkUI_ContextHandle uiContext); @@ -83,7 +83,7 @@ void OH_ArkUI_FocusClear(ArkUI_ContextHandle uiContext); * @param isAutoInactive When touch event or mouse-pressed event triggerd, * "true" indicates to set state to inactive, * "false" indicates to maintain the state until relative API is called. - * @since 16 + * @since 15 */ void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool isAutoInactive); @@ -92,7 +92,7 @@ void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool i * * @param uiContext Indicates the pointer to a UI instance. * @param autoTransfer Indicates whether to transfer focus when focus view show. - * @since 16 + * @since 15 */ void OH_ArkUI_FocusSetAutoTransfer(ArkUI_ContextHandle uiContext, bool autoTransfer); diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index d456dae3a..1c113c695 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2150,17 +2150,17 @@ typedef enum { ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE = 106203, /** * @error The node requesting focus is not focusable. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE = 150001, /** * @error The node requesting focus has unfocusable ancestor. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR = 150002, /** * @error The node requesting focus does not exists. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT = 150003, /** -- Gitee From 869ead5ce224e8b67445807cb405a4130330dcab Mon Sep 17 00:00:00 2001 From: jxw Date: Thu, 13 Feb 2025 11:16:58 +0000 Subject: [PATCH 540/630] update network/netssl/include/net_ssl_c.h. Signed-off-by: jxw --- network/netssl/include/net_ssl_c.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/network/netssl/include/net_ssl_c.h b/network/netssl/include/net_ssl_c.h index af21b8164..7ad4db458 100644 --- a/network/netssl/include/net_ssl_c.h +++ b/network/netssl/include/net_ssl_c.h @@ -115,6 +115,7 @@ void OH_Netstack_DestroyCertificatesContent(NetStack_Certificates *certs); * @permission ohos.permission.INTERNET * @return 0 - Success. * 201 - Permission denied. + * 401 - Parameter error. * @param isCleartextPermitted Indicates output parameter, * {@code true} if the Cleartext traffic is permitted, {@code false} otherwise. * @since 16 @@ -128,6 +129,7 @@ int32_t OH_Netstack_IsCleartextPermitted(bool *isCleartextPermitted); * @permission ohos.permission.INTERNET * @return 0 - Success. * 201 - Permission denied. + * 401 - Parameter error. * @param hostname Indicates the host name. * @param isCleartextPermitted Indicates output parameter, * {@code true} if the Cleartext traffic for a specified hostname is permitted, {@code false} otherwise. -- Gitee From 1487f3fdd44c2a372e7906a1340fdc63dd2c2a9c Mon Sep 17 00:00:00 2001 From: wangdongyusky <15222869+wangdongyusky@user.noreply.gitee.com> Date: Thu, 13 Feb 2025 17:16:39 +0800 Subject: [PATCH 541/630] =?UTF-8?q?api16=E5=9B=9E=E5=90=88api15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangdongyusky --- multimedia/camera_framework/camera.h | 2 +- multimedia/camera_framework/camera.ndk.json | 4 ++-- multimedia/camera_framework/camera_device.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 8f9a213a8..eecc0d386 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -582,7 +582,7 @@ typedef enum Camera_PreconfigRatio { /** * @brief Enum for remote camera device type. * - * @since 16 + * @since 15 * @version 1.0 */ typedef enum Camera_HostDeviceType { diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index e40f87907..ee14fa97a 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -600,11 +600,11 @@ "name": "OH_CameraDevice_GetCameraOrientation" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_CameraDevice_GetHostDeviceName" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_CameraDevice_GetHostDeviceType" }, { diff --git a/multimedia/camera_framework/camera_device.h b/multimedia/camera_framework/camera_device.h index ed5119554..d96589b3c 100644 --- a/multimedia/camera_framework/camera_device.h +++ b/multimedia/camera_framework/camera_device.h @@ -68,7 +68,7 @@ Camera_ErrorCode OH_CameraDevice_GetCameraOrientation(Camera_Device* camera, uin * @return {@link #CAMERA_OK} if the method call succeeds. * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. - * @since 16 + * @since 15 */ Camera_ErrorCode OH_CameraDevice_GetHostDeviceName(Camera_Device* camera, char** hostDeviceName); @@ -82,7 +82,7 @@ Camera_ErrorCode OH_CameraDevice_GetHostDeviceName(Camera_Device* camera, char** * @return {@link #CAMERA_OK} if the method call succeeds. * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. - * @since 16 + * @since 15 */ Camera_ErrorCode OH_CameraDevice_GetHostDeviceType(Camera_Device* camera, Camera_HostDeviceType* hostDeviceType); -- Gitee From 5ee39f4b9499a01fc271aa82c6c1ab11e47ba9f5 Mon Sep 17 00:00:00 2001 From: youbing54 Date: Wed, 12 Feb 2025 17:36:23 +0800 Subject: [PATCH 542/630] =?UTF-8?q?IssueNo:=20https://gitee.com/openharmon?= =?UTF-8?q?y/interface=5Fsdk=5Fc/issues/IBLVH9=20describe:=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9API=E7=89=88=E6=9C=AC=20Feature=20or=20Bugfix:=20Featu?= =?UTF-8?q?re=20Binary=20Source:Yes=20Signed-off-by:=20youbing54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/libace.ndk.json | 8 ++++++++ arkui/ace_engine/native/ui_input_event.h | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 63faa1451..08592bde2 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -507,6 +507,14 @@ "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetTiltY" }, + { + "first_introduced": "15", + "name": "OH_ArkUI_PointerEvent_GetInteractionHand" + }, + { + "first_introduced": "15", + "name": "OH_ArkUI_PointerEvent_GetInteractionHandByIndex" + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetTouchAreaWidth" diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 43a2d9e94..53e2dc8fd 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -227,7 +227,7 @@ enum { /** * @brief Defines whether the touch event is from the left or right hand. * - * @since 16 + * @since 15 */ typedef enum { /** Unknown. */ @@ -532,7 +532,7 @@ float OH_ArkUI_PointerEvent_GetTouchAreaHeight(const ArkUI_UIInputEvent* event, * @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. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_GetInteractionHand(const ArkUI_UIInputEvent *event, ArkUI_InteractionHand *hand); @@ -545,7 +545,7 @@ int32_t OH_ArkUI_PointerEvent_GetInteractionHand(const ArkUI_UIInputEvent *event * @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. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_GetInteractionHandByIndex( const ArkUI_UIInputEvent *event, int32_t pointerIndex, ArkUI_InteractionHand *hand); -- Gitee From 548ee59ee664e4b7c2be42b26461359f0ca8f605 Mon Sep 17 00:00:00 2001 From: zhoujie Date: Fri, 14 Feb 2025 16:16:40 +0800 Subject: [PATCH 543/630] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=AE=9E=E7=8E=B0=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoujie Change-Id: Idfb69e5638b086ff8dd476d3ca9525fc9ad16f8e --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 6c53b1ea7..89e52a506 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -60,7 +60,10 @@ typedef enum { STYLISH = 1 << 2, /** Installed font types */ INSTALLED = 1 << 3, - /** Customized font types */ + /** + * Customized font types + * @since 16 + */ CUSTOMIZED = 1 << 4, } OH_Drawing_SystemFontType; -- Gitee From af5feb54e95bc88d01704e82a3554eb1f58dbdc2 Mon Sep 17 00:00:00 2001 From: zhoujie Date: Fri, 14 Feb 2025 16:42:58 +0800 Subject: [PATCH 544/630] =?UTF-8?q?=E4=BF=AE=E5=A4=8DcodeCheck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoujie Change-Id: I3e86e5b7597e3ee879adf045320a603baf32e900 --- .../graphic_2d/native_drawing/drawing_text_font_descriptor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index 89e52a506..d18a77b6f 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -60,7 +60,7 @@ typedef enum { STYLISH = 1 << 2, /** Installed font types */ INSTALLED = 1 << 3, - /** + /** * Customized font types * @since 16 */ -- Gitee From 966c50d4f045c71a3700f6afc23f76dbd470395c Mon Sep 17 00:00:00 2001 From: zhanghang Date: Sat, 15 Feb 2025 12:55:03 +0800 Subject: [PATCH 545/630] =?UTF-8?q?checkboxgrop-capi-h=E4=BF=AE=E6=94=B915?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang --- arkui/ace_engine/native/native_node.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 78a9b796f..561fe391e 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -98,7 +98,7 @@ typedef enum { */ ARKUI_NODE_XCOMPONENT_TEXTURE, /** Check box group. - * @since 16 + * @since 15 */ ARKUI_NODE_CHECKBOX_GROUP = 21, /** Stack container. */ @@ -3664,7 +3664,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: component name. \n * - * @since 16 + * @since 15 */ NODE_CHECKBOX_NAME, @@ -3678,7 +3678,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: component name. \n * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP, @@ -4709,7 +4709,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: component name. \n * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP_NAME = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX_GROUP, @@ -4724,7 +4724,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: The value 1 means that the checkboxgroup is selected, and 0 means the opposite. \n * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP_SELECT_ALL, @@ -4739,7 +4739,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].u32: color of the checkboxgroup when it is selected, in 0xARGB format, for example, 0xFF1122FF. * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP_SELECTED_COLOR, /** @@ -4752,7 +4752,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF. * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP_UNSELECTED_COLOR, @@ -4770,7 +4770,7 @@ typedef enum { * .value[1].f32: size of the internal mark, in vp. \n * .value[2].f32: stroke width of the internal mark, in vp. The default value is 2. \n * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP_MARK, @@ -4784,7 +4784,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: component shape. The parameter type is {@link ArkUI_CheckboxShape}. * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP_SHAPE, @@ -7156,7 +7156,7 @@ typedef enum { * 1: Some checkboxes are selected. * 2: No checkboxes are selected. \n * - * @since 16 + * @since 15 */ NODE_CHECKBOX_GROUP_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX_GROUP, -- Gitee From 0c4bc63ccf9553d3f74adcc7a566b8b4100c701e Mon Sep 17 00:00:00 2001 From: youbing54 Date: Sat, 15 Feb 2025 19:01:53 +0800 Subject: [PATCH 546/630] =?UTF-8?q?IssueNo:=20https://gitee.com/openharmon?= =?UTF-8?q?y/interface=5Fsdk=5Fc/issues/IBMIC3=20describe:=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9api=E6=8E=A5=E5=8F=A3=20Feature=20or=20Bugfix:=20Featu?= =?UTF-8?q?re=20Binary=20Source:Yes=20Signed-off-by:=20youbing54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/libace.ndk.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ca650397b..20c3d3262 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -507,6 +507,14 @@ "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetTiltY" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_GetInteractionHand" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_GetInteractionHandByIndex" + }, { "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetTouchAreaWidth" -- Gitee From 707971b29736560ccb3ed9868b75d1b3ab56c4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B3?= Date: Mon, 10 Feb 2025 21:25:35 +0800 Subject: [PATCH 547/630] =?UTF-8?q?List=20C-API=E6=8E=A5=E5=8F=A3=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=94=B116=E6=94=B9=E4=B8=BA15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王关 --- arkui/ace_engine/native/native_node.h | 22 +++++++++++----------- arkui/ace_engine/native/native_type.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a046c800c..bc11bbec0 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5051,7 +5051,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].f32: offset from the start of the content, in vp. \n * - * @since 16 + * @since 15 */ NODE_SCROLL_CONTENT_START_OFFSET, @@ -5064,7 +5064,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].f32: offset from the end of the content, in vp. \n * - * @since 16 + * @since 15 */ NODE_SCROLL_CONTENT_END_OFFSET, @@ -5167,12 +5167,12 @@ typedef enum { * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .value[0].i32: number of cached items in the list adapter. \n * .value[1]?.i32: whether to show cached items. The value 0 means to hide cached items, and 0 means - * to show cached items. The default value is 0. This parameter is supported since API version 16. \n + * to show cached items. The default value is 0. This parameter is supported since API version 15. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: number of cached items in the list adapter. \n * .value[1].i32: whether to show cached items. The value 0 means to hide cached items, and 0 means - * to show cached items. This parameter is supported since API version 16. \n + * to show cached items. This parameter is supported since API version 15. \n * */ NODE_LIST_CACHED_COUNT, @@ -5190,7 +5190,7 @@ typedef enum { * .value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is * {@link ArkUI_ScrollAlignment}, default value is ARKUI_SCROLL_ALIGNMENT_START. \n * .value[3]?.f32: extra offset, in vp. The default value is 0. - * This parameter is supported since API version 16. \n + * This parameter is supported since API version 15. \n * */ NODE_LIST_SCROLL_TO_INDEX, @@ -5267,7 +5267,7 @@ typedef enum { * .value[3]?.i32: how the item to scroll to is aligned with the container. The parameter type is * {@link ArkUI_ScrollAlignment}. The default value is ARKUI_SCROLL_ALIGNMENT_START. \n * - * @since 16 + * @since 15 */ NODE_LIST_SCROLL_TO_INDEX_IN_GROUP = 1003010, @@ -5288,7 +5288,7 @@ typedef enum { * .value[2].f32: maximum column width, in vp. \n * .value[3].f32: lane spacing, in vp. \n \n * - * @since 16 + * @since 15 */ NODE_LIST_LANES = 1003011, @@ -5302,7 +5302,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n *.value[0].i32: alignment mode for the list snap position. The parameter type is {@link ArkUI_ScrollSnapAlign}.\n * - * @since 16 + * @since 15 */ NODE_LIST_SCROLL_SNAP_ALIGN = 1003012, @@ -5320,7 +5320,7 @@ typedef enum { * display area of the List component. The value 0 means not to maintain the visible content's * position, and 1 means the opposite. The default value is 0. \n * - * @since 16 + * @since 15 */ NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION = 1003013, @@ -5704,7 +5704,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .object: {@link ArkUI_NodeAdapter} object. \n * - * @since 16 + * @since 15 */ NODE_LIST_ITEM_GROUP_NODE_ADAPTER = 1005004, @@ -7448,7 +7448,7 @@ typedef enum { * list item group. * If the end of the list display area is not on a list item, the value is -1. \n * - * @since 16 + * @since 15 */ NODE_LIST_ON_SCROLL_VISIBLE_CONTENT_CHANGE, diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 20cebacea..91df56ec8 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2442,7 +2442,7 @@ typedef enum { /** * @brief Define an enum for the areas of the ListItemGroup component. * - * @since 16 + * @since 15 */ typedef enum { /** Outside the area of the ListItemGroup component. */ -- Gitee From 38436e7117ea0bcade35ea86ede18f46ddf783f1 Mon Sep 17 00:00:00 2001 From: mlyuestc Date: Mon, 17 Feb 2025 03:36:31 +0000 Subject: [PATCH 548/630] change since to 15 Signed-off-by: mlyuestc --- arkui/ace_engine/native/libace.ndk.json | 18 +++++++++--------- arkui/ace_engine/native/native_node.h | 2 +- arkui/ace_engine/native/native_type.h | 6 +++--- arkui/ace_engine/native/ui_input_event.h | 16 ++++++++-------- arkui_ace_engine_interface | 1 + 5 files changed, 22 insertions(+), 21 deletions(-) create mode 160000 arkui_ace_engine_interface diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ccd02a0f3..c85b81ee9 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2796,39 +2796,39 @@ "name": "OH_ArkUI_GestureInterrupter_GetUserData" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_CreateClonedEvent" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_DestroyClonedEvent" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_SetClonedEventLocalPosition" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_SetClonedEventActionType" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_PostClonedEvent" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetPositionToParent" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 4c69cf8d0..0dd6e265a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9100,7 +9100,7 @@ int32_t OH_ArkUI_GetNodeSnapshot(ArkUI_NodeHandle node, ArkUI_SnapshotOptions* s * @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. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetPositionToParent(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset); diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index dc02f867d..2267b2d1f 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2174,17 +2174,17 @@ typedef enum { ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH = 180002, /** * @error The event is not a clone event. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_NOT_CLONED_POINTER_EVENT = 180003, /** * @error The component status is abnormal. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL = 180004, /** * @error No component hit to respond to the event. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT = 180005, /** diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index dc25959db..cd68ee2ca 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -1037,7 +1037,7 @@ int32_t OH_ArkUI_AxisEvent_GetScrollStep(const ArkUI_UIInputEvent* event); * @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. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_CreateClonedEvent(const ArkUI_UIInputEvent* event, ArkUI_UIInputEvent** clonedEvent); @@ -1050,7 +1050,7 @@ int32_t OH_ArkUI_PointerEvent_CreateClonedEvent(const ArkUI_UIInputEvent* event, * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a * cloned event pointer. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_DestroyClonedEvent(const ArkUI_UIInputEvent* event); @@ -1065,7 +1065,7 @@ int32_t OH_ArkUI_PointerEvent_DestroyClonedEvent(const ArkUI_UIInputEvent* event * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a * cloned event pointer. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPosition(const ArkUI_UIInputEvent* event, float x, float y); @@ -1082,7 +1082,7 @@ int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPosition(const ArkUI_UIInputEve * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a * cloned event pointer. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex( const ArkUI_UIInputEvent* event, float x, float y, int32_t pointerIndex); @@ -1097,7 +1097,7 @@ int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex( * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a * cloned event pointer. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_SetClonedEventActionType(const ArkUI_UIInputEvent* event, int32_t actionType); @@ -1111,7 +1111,7 @@ int32_t OH_ArkUI_PointerEvent_SetClonedEventActionType(const ArkUI_UIInputEvent* * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a * cloned event pointer. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId(const ArkUI_UIInputEvent* event, int32_t fingerId); @@ -1126,7 +1126,7 @@ int32_t OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId(const ArkUI_UIInputE * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT} if the input event pointer is not a * cloned event pointer. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex( const ArkUI_UIInputEvent* event, int32_t fingerId, int32_t pointerIndex); @@ -1145,7 +1145,7 @@ int32_t OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex( * if the component status abnormal. * Returns {@link ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT} * if no component hit to response to the event. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_PostClonedEvent(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event); diff --git a/arkui_ace_engine_interface b/arkui_ace_engine_interface new file mode 160000 index 000000000..f7e3bf16d --- /dev/null +++ b/arkui_ace_engine_interface @@ -0,0 +1 @@ +Subproject commit f7e3bf16d9470f01f5f388cd53cd13d9909f083a -- Gitee From ae675afc0ea13cd98be9b2fb672459bae43638f6 Mon Sep 17 00:00:00 2001 From: mlyuestc Date: Mon, 17 Feb 2025 03:44:27 +0000 Subject: [PATCH 549/630] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?arkui=5Face=5Fengine=5Finterface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui_ace_engine_interface | 1 - 1 file changed, 1 deletion(-) delete mode 160000 arkui_ace_engine_interface diff --git a/arkui_ace_engine_interface b/arkui_ace_engine_interface deleted file mode 160000 index f7e3bf16d..000000000 --- a/arkui_ace_engine_interface +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f7e3bf16d9470f01f5f388cd53cd13d9909f083a -- Gitee From fe925e7a897fc5dcbd70c89b6e3dcd12bc759671 Mon Sep 17 00:00:00 2001 From: aizhibo Date: Mon, 17 Feb 2025 12:16:01 +0800 Subject: [PATCH 550/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E9=95=9C=E5=83=8FNDK=E6=8E=A5=E5=8F=A3=20Signed-off-by:=20aizh?= =?UTF-8?q?ibo=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- multimedia/camera_framework/video_output.h | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/multimedia/camera_framework/video_output.h b/multimedia/camera_framework/video_output.h index d0228d3e7..abc9a04ad 100644 --- a/multimedia/camera_framework/video_output.h +++ b/multimedia/camera_framework/video_output.h @@ -188,6 +188,30 @@ Camera_ErrorCode OH_VideoOutput_GetActiveProfile(Camera_VideoOutput* videoOutput */ Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile); +/** + * @brief Check whether mirror mode is supported for videoOutput + * + * @param videoOutput the {@link Camera_VideoOutput} instance + * @param isSupported the result of whether mirror mode supported. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 15 + */ +Camera_ErrorCode OH_VideoOutput_isMirrorSupported(Camera_VideoOutput* videoOutput, bool* isSupported); + +/** + * @brief Enable or disable mirror mode for videoOutput + * + * @param videoOutput the {@link Camera_VideoOutput} instance + * @param mirrorMode enable mirror mode if mirrorMode is TRUE, otherwise disable + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 15 + */ +Camera_ErrorCode OH_VideoOutput_enableMirror(Camera_VideoOutput* videoOutput, bool mirrorMode); + /** * @brief Gets the video rotation angle. * -- Gitee From aeaa6fa7f75c07fc53b77d4c56497870f0a09f3f Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 17 Feb 2025 06:35:49 +0000 Subject: [PATCH 551/630] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: eric --- multimedia/camera_framework/camera.ndk.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index ee14fa97a..8a7da519a 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -591,6 +591,14 @@ "first_introduced": "12", "name": "OH_VideoOutput_GetActiveFrameRate" }, + { + "first_introduced": "15", + "name": "OH_VideoOutput_IsMirrorSupported" + }, + { + "first_introduced": "15", + "name": "OH_VideoOutput_EnableMirror" + }, { "first_introduced": "12", "name": "OH_VideoOutput_GetVideoRotation" -- Gitee From b9f98cd111343bf025841b95db0440f079531e72 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 17 Feb 2025 06:40:08 +0000 Subject: [PATCH 552/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E9=95=9C=E5=83=8FNDK=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: eric --- multimedia/camera_framework/video_output.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/camera_framework/video_output.h b/multimedia/camera_framework/video_output.h index abc9a04ad..d81564038 100644 --- a/multimedia/camera_framework/video_output.h +++ b/multimedia/camera_framework/video_output.h @@ -198,7 +198,7 @@ Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile); * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. * @since 15 */ -Camera_ErrorCode OH_VideoOutput_isMirrorSupported(Camera_VideoOutput* videoOutput, bool* isSupported); +Camera_ErrorCode OH_VideoOutput_IsMirrorSupported(Camera_VideoOutput* videoOutput, bool* isSupported); /** * @brief Enable or disable mirror mode for videoOutput @@ -210,7 +210,7 @@ Camera_ErrorCode OH_VideoOutput_isMirrorSupported(Camera_VideoOutput* videoOutpu * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. * @since 15 */ -Camera_ErrorCode OH_VideoOutput_enableMirror(Camera_VideoOutput* videoOutput, bool mirrorMode); +Camera_ErrorCode OH_VideoOutput_EnableMirror(Camera_VideoOutput* videoOutput, bool mirrorMode); /** * @brief Gets the video rotation angle. -- Gitee From 02e7cfe84842924f0967f671a9f9ee89a9546e35 Mon Sep 17 00:00:00 2001 From: z00562947 Date: Mon, 17 Feb 2025 15:31:30 +0800 Subject: [PATCH 553/630] add ndk interfaces Signed-off-by: z00562947 --- multimedia/media_foundation/core/BUILD.gn | 4 +- multimedia/media_foundation/media_types.h | 70 ++++++ .../player_framework/avimage_generator.h | 124 ++++++++++ .../avimage_generator/BUILD.gn | 36 +++ .../libavimage_generator.ndk.json | 18 ++ .../player_framework/avimage_generator_base.h | 79 ++++++ .../player_framework/avmetadata_extractor.h | 136 +++++++++++ .../avmetadata_extractor/BUILD.gn | 36 +++ .../libavmetadata_extractor.ndk.json | 22 ++ .../avmetadata_extractor_base.h | 225 ++++++++++++++++++ ndk_targets.gni | 6 +- 11 files changed, 754 insertions(+), 2 deletions(-) create mode 100644 multimedia/media_foundation/media_types.h create mode 100644 multimedia/player_framework/avimage_generator.h create mode 100644 multimedia/player_framework/avimage_generator/BUILD.gn create mode 100644 multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json create mode 100644 multimedia/player_framework/avimage_generator_base.h create mode 100644 multimedia/player_framework/avmetadata_extractor.h create mode 100644 multimedia/player_framework/avmetadata_extractor/BUILD.gn create mode 100644 multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json create mode 100644 multimedia/player_framework/avmetadata_extractor_base.h diff --git a/multimedia/media_foundation/core/BUILD.gn b/multimedia/media_foundation/core/BUILD.gn index 25a6ff245..e81ceb338 100644 --- a/multimedia/media_foundation/core/BUILD.gn +++ b/multimedia/media_foundation/core/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. +# Copyright (C) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -17,6 +17,7 @@ import("//build/ohos/ndk/ndk.gni") ohos_ndk_headers("native_media_core_header") { dest_dir = "$ndk_headers_out_dir/multimedia/player_framework" sources = [ + "../media_types.h", "../native_avbuffer.h", "../native_avbuffer_info.h", "../native_averrors.h", @@ -38,6 +39,7 @@ ohos_ndk_library("libnative_media_core") { system_capability = "SystemCapability.Multimedia.Media.Core" system_capability_headers = [ + "multimedia/player_framework/media_types.h", "multimedia/player_framework/native_avbuffer.h", "multimedia/player_framework/native_avbuffer_info.h", "multimedia/player_framework/native_averrors.h", diff --git a/multimedia/media_foundation/media_types.h b/multimedia/media_foundation/media_types.h new file mode 100644 index 000000000..1ec6d447c --- /dev/null +++ b/multimedia/media_foundation/media_types.h @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup Core + * @{ + * + * @brief The Core module provides basic backbone capabilities for media frameworks, + * including functions such as memory, error codes, and media data structures. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @since 16 + */ + +/** + * @file media_types.h + * + * @brief Declared the common media types definition. + * + * @kit AVCodecKit + * @library libnative_media_core.so + * @syscap SystemCapability.Multimedia.Media.Core + * @since 16 + */ + +#ifndef MEDIA_TYPES_H +#define MEDIA_TYPES_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumerates HDR types. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @since 16 + */ +typedef enum OH_Core_HdrType { + /** + * This option is used to mark none HDR type. + */ + OH_CORE_HDR_TYPE_NONE = 0, + /** + * This option is used to mark HDR Vivid type. + */ + OH_CORE_HDR_TYPE_VIVID = 1, +} OH_Core_HdrType; + +#ifdef __cplusplus +} +#endif + +#endif // MEDIA_TYPES_H +/** @} */ \ No newline at end of file diff --git a/multimedia/player_framework/avimage_generator.h b/multimedia/player_framework/avimage_generator.h new file mode 100644 index 000000000..0ae5a5b28 --- /dev/null +++ b/multimedia/player_framework/avimage_generator.h @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup AVImageGenerator + * @{ + * + * @brief Provides APIs for generating an image at the specific time from a video resource. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 16 + */ + +/** + * @file avimage_generator.h + * + * @brief Defines the avimage generator APIs. Uses the Native APIs provided by Media AVImageGenerator + * to get an image at the specific time from a video resource. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @kit MediaKit + * @library libavimage_generator.so + * @since 16 + */ + +#ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_H +#define MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_H + +#include +#include +#include +#include "native_averrors.h" +#include "avimage_generator_base.h" +#include "multimedia/image_framework/image/pixelmap_native.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Define OH_AVImageGenerator field. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 16 + */ +typedef struct OH_AVImageGenerator OH_AVImageGenerator; + +/** + * @brief Create an image generator. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @return Returns a pointer to an OH_AVImageGenerator instance for success, nullptr for failure. + * Possible failure causes: HstEngineFactory failed to CreateAVMetadataHelperEngine. + * @since 16 + */ +OH_AVImageGenerator* OH_AVImageGenerator_Create(void); + +/** + * @brief Sets the media file descriptor source for the image generator. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @param generator Pointer to an OH_AVImageGenerator instance. + * @param fd Indicates the file descriptor of media source. + * @param offset Indicates the offset of media source in file descriptor. + * @param size Indicates the size of media source. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. + * @since 16 + */ +OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, + int32_t fd, int64_t offset, int64_t size); + +/** + * @brief Fetch an image at the specific time from a video resource. + * + * This function must be called after {@link SetFDSource}. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @param generator Pointer to an OH_AVImageGenerator instance. + * @param timeUs The time expected to fetch picture from the video resource. The unit is microsecond(us). + * @param options The time options about the relationship between the given timeUs and a key frame, + * see {@link OH_AVImageGenerator_QueryOptions}. + * @param pixelMap The fetched output image from the video source. For details, see {@link OH_PixelmapNative}. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. + * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * @since 16 + */ +OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator, + int64_t timeUs, OH_AVImageGenerator_QueryOptions options, OH_PixelmapNative** pixelMap); + +/** + * @brief Release the resource used for AVImageGenerator. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @param generator Pointer to an OH_AVImageGenerator instance. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. + * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * @since 16 + */ +OH_AVErrCode OH_AVImageGenerator_Release(OH_AVImageGenerator* generator); + +#ifdef __cplusplus +} +#endif + +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_H +/** @} */ diff --git a/multimedia/player_framework/avimage_generator/BUILD.gn b/multimedia/player_framework/avimage_generator/BUILD.gn new file mode 100644 index 000000000..44efe2ff3 --- /dev/null +++ b/multimedia/player_framework/avimage_generator/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright (C) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") +import("//foundation/multimedia/player_framework/config.gni") + +ohos_ndk_headers("avimage_generator_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/player_framework" + sources = [ + "../avimage_generator.h", + "../avimage_generator_base.h", + ] +} + +ohos_ndk_library("libavimage_generator") { + ndk_description_file = "./libavimage_generator.ndk.json" + output_name = "avimage_generator" + output_extension = "so" + + system_capability = "SystemCapability.Multimedia.Media.AVImageGenerator" + system_capability_headers = [ + "multimedia/player_framework/avimage_generator.h", + "multimedia/player_framework/avimage_generator_base.h", + ] +} diff --git a/multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json b/multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json new file mode 100644 index 000000000..827ef053c --- /dev/null +++ b/multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json @@ -0,0 +1,18 @@ +[ + { + "first_introduced": "16", + "name": "OH_AVImageGenerator_Create" + }, + { + "first_introduced": "16", + "name": "OH_AVImageGenerator_SetFDSource" + }, + { + "first_introduced": "16", + "name": "OH_AVImageGenerator_FetchFrameByTime" + }, + { + "first_introduced": "16", + "name": "OH_AVImageGenerator_Release" + } +] \ No newline at end of file diff --git a/multimedia/player_framework/avimage_generator_base.h b/multimedia/player_framework/avimage_generator_base.h new file mode 100644 index 000000000..56f001257 --- /dev/null +++ b/multimedia/player_framework/avimage_generator_base.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup AVImageGenerator + * @{ + * + * @brief Provides APIs for generating an image at the specific time from a video resource. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 16 + */ + +/** + * @file avimage_generator_base.h + * + * @brief Defines the structure and enumeration for AVImageGenerator. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @kit MediaKit + * @library libavimage_generator.so + * @since 16 + */ + +#ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_BASE_H +#define MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_BASE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumerates the image query options about the relationship between the given timeUs and a key frame. + * + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 16 + */ +typedef enum OH_AVImageGenerator_QueryOptions { + /** + * This option is used to fetch a key frame from the given media + * resource that is located right after or at the given time. + */ + OH_AVIMAGE_GENERATOR_QUERY_NEXT_SYNC = 0, + /** + * This option is used to fetch a key frame from the given media + * resource that is located right before or at the given time. + */ + OH_AVIMAGE_GENERATOR_QUERY_PREVIOUS_SYNC = 1, + /** + * This option is used to fetch a key frame from the given media + * resource that is located closest to or at the given time. + */ + OH_AVIMAGE_GENERATOR_QUERY_CLOSEST_SYNC = 2, + /** + * This option is used to fetch a frame (maybe not keyframe) from + * the given media resource that is located closest to or at the given time. + */ + OH_AVIMAGE_GENERATOR_QUERY_CLOSEST = 3, +} OH_AVImageGenerator_QueryOptions; + +#ifdef __cplusplus +} +#endif +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_BASE_H +/** @} */ diff --git a/multimedia/player_framework/avmetadata_extractor.h b/multimedia/player_framework/avmetadata_extractor.h new file mode 100644 index 000000000..b6d5bba33 --- /dev/null +++ b/multimedia/player_framework/avmetadata_extractor.h @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup AVMetadataExtractor + * @{ + * + * @brief Provides APIs of metadata capability for Media Source. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ + +/** + * @file avmetadata_extractor.h + * + * @brief Defines the avmetadata extractor APIs. Uses the Native APIs provided by Media AVMetadataExtractor + * to get metadata from the media source. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @kit MediaKit + * @library libavmetadata_extractor.so + * @since 16 + */ + +#ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_H +#define MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_H + +#include +#include +#include +#include "native_averrors.h" +#include "avmetadata_extractor_base.h" +#include "native_avcodec_base.h" +#include "native_avformat.h" +#include "multimedia/image_framework/image/pixelmap_native.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Define OH_AVMetadataExtractor field. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +typedef struct OH_AVMetadataExtractor OH_AVMetadataExtractor; + +/** + * @brief Create a metadata extractor. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @return Returns a pointer to an OH_AVMetadataExtractor instance for success, nullptr for failure + * Possible failure causes: failed to HstEngineFactory::CreateAVMetadataHelperEngine. + * @since 16 + */ +OH_AVMetadataExtractor* OH_AVMetadataExtractor_Create(void); + +/** + * @brief Sets the media file descriptor source for the metadata extractor. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @param extractor Pointer to an OH_AVMetadataExtractor instance. + * @param fd Indicates the file descriptor of media source. + * @param offset Indicates the offset of media source in file descriptor. + * @param size Indicates the size of media source. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * @since 16 + */ +OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extractor, + int32_t fd, int64_t offset, int64_t size); + +/** + * @brief Extract metadata info from the media source. + * This function must be called after {@link SetFDSource}. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @param extractor Pointer to an OH_AVMetadataExtractor instance. + * @param avMetadata Pointer to an {@link OH_AVFormat} instance, its content contains the fetched metadata info. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * @since 16 + */ +OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extractor, OH_AVFormat* avMetadata); + +/** + * @brief Fetch album cover from the audio source. + * This function must be called after {@link SetFDSource}. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @param extractor Pointer to an OH_AVMetadataExtractor instance. + * @param pixelMap The fetched album cover from the audio source. For details, see {@link OH_PixelmapNative}. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * @since 16 + */ +OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extractor, OH_PixelmapNative** pixelMap); + +/** + * @brief Release the resource used for AVMetadataExtractor. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @param extractor Pointer to an OH_AVMetadataExtractor instance. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * @since 16 + */ +OH_AVErrCode OH_AVMetadataExtractor_Release(OH_AVMetadataExtractor* extractor); + +#ifdef __cplusplus +} +#endif + +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_H +/** @} */ diff --git a/multimedia/player_framework/avmetadata_extractor/BUILD.gn b/multimedia/player_framework/avmetadata_extractor/BUILD.gn new file mode 100644 index 000000000..346f6fd0d --- /dev/null +++ b/multimedia/player_framework/avmetadata_extractor/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright (C) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") +import("//foundation/multimedia/player_framework/config.gni") + +ohos_ndk_headers("avmetadata_extractor_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/player_framework" + sources = [ + "../avmetadata_extractor.h", + "../avmetadata_extractor_base.h", + ] +} + +ohos_ndk_library("libavmetadata_extractor") { + ndk_description_file = "./libavmetadata_extractor.ndk.json" + output_name = "avmetadata_extractor" + output_extension = "so" + + system_capability = "SystemCapability.Multimedia.Media.AVMetadataExtractor" + system_capability_headers = [ + "multimedia/player_framework/avmetadata_extractor.h", + "multimedia/player_framework/avmetadata_extractor_base.h", + ] +} diff --git a/multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json b/multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json new file mode 100644 index 000000000..f4c4de80d --- /dev/null +++ b/multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json @@ -0,0 +1,22 @@ +[ + { + "first_introduced": "16", + "name": "OH_AVMetadataExtractor_Create" + }, + { + "first_introduced": "16", + "name": "OH_AVMetadataExtractor_SetFDSource" + }, + { + "first_introduced": "16", + "name": "OH_AVMetadataExtractor_FetchMetadata" + }, + { + "first_introduced": "16", + "name": "OH_AVMetadataExtractor_FetchAlbumCover" + }, + { + "first_introduced": "16", + "name": "OH_AVMetadataExtractor_Release" + } +] \ No newline at end of file diff --git a/multimedia/player_framework/avmetadata_extractor_base.h b/multimedia/player_framework/avmetadata_extractor_base.h new file mode 100644 index 000000000..75c18f5a5 --- /dev/null +++ b/multimedia/player_framework/avmetadata_extractor_base.h @@ -0,0 +1,225 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup AVMetadataExtractor + * @{ + * + * @brief Provides APIs of metadata capability for Media Source. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ + +/** + * @file avmetadata_extractor_base.h + * + * @brief Defines the structure and enumeration for AVMetadataExtractor. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @kit MediaKit + * @library libavmetadata_extractor.so + * @since 16 + */ + +#ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_BASE_H +#define MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_BASE_H + +#include + +#include "native_avformat.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @brief Key to get the album title of the media source, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_ALBUM = "album"; + +/** + * @brief Key to get the album performer or artist associated, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_ALBUM_ARTIST = "albumArtist"; + +/** + * @brief Key to get the artist name, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_ARTIST = "artist"; + +/** + * @brief Key to get the author name, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_AUTHOR = "author"; + +/** + * @brief Key to get the created time of the media source, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_DATE_TIME = "dateTime"; + +/** + * @brief Key to get the created or modified time with the specific date format, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_DATE_TIME_FORMAT = "dateTimeFormat"; + +/** + * @brief Key to get the composer of the media source, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_COMPOSER = "composer"; + +/** + * @brief Key to get the playback duration of the media source, value type is int64_t, value unit is millisecond (ms). + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_DURATION = "duration"; + +/** + * @brief Key to get the content type or genre, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_GENRE = "genre"; + +/** + * @brief Key to get the value whether the media resource contains audio content, + * value type is int32_t. 1 means true and 0 means false. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_HAS_AUDIO = "hasAudio"; + +/** + * @brief Key to get the value whether the media resource contains video content, + * value type is int32_t. 1 means true and 0 means false. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_HAS_VIDEO = "hasVideo"; + +/** + * @brief Key to get the mime type of the media source, value type is const char*. + * Some example mime types include: "video/mp4", "audio/mp4", "audio/amr-wb". + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_MIME_TYPE = "mimeType"; + +/** + * @brief Key to get the number of tracks, value type is int32_t. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_TRACK_COUNT = "trackCount"; + +/** + * @brief Key to get the audio sample rate, value type is int32_t. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_SAMPLE_RATE = "sampleRate"; + +/** + * @brief Key to get the media source title, value type is const char*. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_TITLE = "title"; + +/** + * @brief Key to get the video height if the media contains video, value type is int32_t. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_HEIGHT = "videoHeight"; + +/** + * @brief Key to get the video width if the media contains video, value type is int32_t. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_WIDTH = "videoWidth"; + +/** + * @brief Key to get the video rotation angle, value type is int32_t. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_ORIENTATION = "videoOrientation"; + +/** + * @brief Key to get the information whether the video is HDR video, value type is int32_t. + * For details of the value, see {@link OH_Core_HdrType} defined in {@link media_types.h}. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_IS_HDR_VIVID = "hdrType"; + +/** + * @brief Key to get the latitude value in the geographical location, value type is float. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_LOCATION_LATITUDE = "latitude"; + +/** + * @brief Key to get the longitude value in the geographical location, value type is float. + * + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 16 + */ +static const char* OH_AVMETADATA_EXTRACTOR_LOCATION_LONGITUDE = "longitude"; + +#ifdef __cplusplus +} +#endif +#endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_BASE_H +/** @} */ diff --git a/ndk_targets.gni b/ndk_targets.gni index da0d52f11..b83bf2025 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -138,6 +138,10 @@ _ndk_library_targets = [ "//interface/sdk_c/multimedia/player_framework/avplayer:avplayer_header", "//interface/sdk_c/multimedia/player_framework/avrecorder:libavrecorder", "//interface/sdk_c/multimedia/player_framework/avrecorder:avrecorder_header", + "//interface/sdk_c/multimedia/player_framework/avmetadata_extractor:libavmetadata_extractor", + "//interface/sdk_c/multimedia/player_framework/avmetadata_extractor:avmetadata_extractor_header", + "//interface/sdk_c/multimedia/player_framework/avimage_generator:libavimage_generator", + "//interface/sdk_c/multimedia/player_framework/avimage_generator:avimage_generator_header", "//interface/sdk_c/multimedia/audio_framework:libohaudio_ndk", "//interface/sdk_c/multimedia/audio_framework:ohaudio_header", "//interface/sdk_c/multimedia/av_session:libohavsession_ndk", -- Gitee From 24b38dac86889148e20e8c9a2d5fc76363d75a8f Mon Sep 17 00:00:00 2001 From: fangyunzhong Date: Mon, 17 Feb 2025 16:22:39 +0800 Subject: [PATCH 554/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=20plural=20c=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2f7f2fa264eddcb925100dd0acfda8dd0903b99a Signed-off-by: fangyunzhong --- .../include/resourcemanager/ohresmgr.h | 100 ++++++++++++++++++ .../libnative_resmgr.ndk.json | 16 +++ 2 files changed, 116 insertions(+) diff --git a/global/resource_management/include/resourcemanager/ohresmgr.h b/global/resource_management/include/resourcemanager/ohresmgr.h index d48a69f8b..46787935f 100644 --- a/global/resource_management/include/resourcemanager/ohresmgr.h +++ b/global/resource_management/include/resourcemanager/ohresmgr.h @@ -552,6 +552,8 @@ ResourceManager_ErrorCode OH_ResourceManager_ReleaseStringArray(char ***resValue {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. * @since 12 + * @deprecated since 16 + * @useinstead OH_ResourceManager_GetIntPluralString */ ResourceManager_ErrorCode OH_ResourceManager_GetPluralString(const NativeResourceManager *mgr, uint32_t resId, uint32_t num, char **resultValue); @@ -575,10 +577,108 @@ ResourceManager_ErrorCode OH_ResourceManager_GetPluralString(const NativeResourc {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. * @since 12 + * @deprecated since 16 + * @useinstead OH_ResourceManager_GetIntPluralStringByName */ ResourceManager_ErrorCode OH_ResourceManager_GetPluralStringByName(const NativeResourceManager *mgr, const char *resName, uint32_t num, char **resultValue); +/** + * @brief Obtains the singular-plural character string represented. + * + * Obtains the singular-plural character string represented by the ID string corresponding to the specified number. + * You need to call free() to release the memory for the string. + * + * @param mgr Indicates the pointer to {@link NativeResourceManager} + * {@link OH_ResourceManager_InitNativeResourceManager}. + * @param resId Indicates the resource ID. + * @param num - an integer used to get the correct string for the current plural rules. + * @param resultValue the result write to resultValue. + * @param { const char* | int | float } args - Indicates the formatting string resource parameters. + * @return {@link SUCCESS} 0 - Success. + * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. + Possible causes: Incorrect parameter types. + {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID. + {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID. + {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. + {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. + * @since 16 + */ +ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralString(const NativeResourceManager *mgr, uint32_t resId, + uint32_t num, char **resultValue, ...); + +/** + * @brief Obtains the singular-plural character string represented. + * + * Obtains the singular-plural character string represented by the ID string corresponding to the specified number. + * You need to call free() to release the memory for the string. + * + * @param mgr Indicates the pointer to {@link NativeResourceManager} + * {@link OH_ResourceManager_InitNativeResourceManager}. + * @param resId Indicates the resource ID. + * @param num - a double parameter used to get the correct string for the current plural rules. + * @param resultValue the result write to resultValue. + * @param { const char* | int | float } args - Indicates the formatting string resource parameters. + * @return {@link SUCCESS} 0 - Success. + * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. + Possible causes: Incorrect parameter types. + {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID. + {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID. + {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. + {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. + * @since 16 + */ +ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralString(const NativeResourceManager *mgr, uint32_t resId, + double num, char **resultValue, ...); + +/** + * @brief Obtains the singular-plural character string represented. + * + * Obtains the singular-plural character string represented by the Name string corresponding to the specified number. + * You need to call free() to release the memory for the string. + * + * @param mgr Indicates the pointer to {@link NativeResourceManager} + * {@link OH_ResourceManager_InitNativeResourceManager}. + * @param resName Indicates the resource name. + * @param num - an integer used to get the correct string for the current plural rules. + * @param resultValue the result write to resultValue. + * @param { const char* | int | float } args - Indicates the formatting string resource parameters. + * @return {@link SUCCESS} 0 - Success. + * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. + Possible causes: Incorrect parameter types. + {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name. + {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name. + {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. + {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. + * @since 16 + */ +ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralStringByName(const NativeResourceManager *mgr, + const char *resName, uint32_t num, char **resultValue, ...); + +/** + * @brief Obtains the singular-plural character string represented. + * + * Obtains the singular-plural character string represented by the Name string corresponding to the specified number. + * You need to call free() to release the memory for the string. + * + * @param mgr Indicates the pointer to {@link NativeResourceManager} + * {@link OH_ResourceManager_InitNativeResourceManager}. + * @param resName Indicates the resource name. + * @param num - a double parameter used to get the correct string for the current plural rules. + * @param resultValue the result write to resultValue. + * @param { const char* | int | float } args - Indicates the formatting string resource parameters. + * @return {@link SUCCESS} 0 - Success. + * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. + Possible causes: Incorrect parameter types. + {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name. + {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name. + {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. + {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. + * @since 16 + */ +ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralStringByName(const NativeResourceManager *mgr, + const char *resName, double num, char **resultValue, ...); + /** * @brief Obtains the color resource. * diff --git a/global/resource_management/libnative_resmgr.ndk.json b/global/resource_management/libnative_resmgr.ndk.json index dcb320f42..672a1c9d8 100644 --- a/global/resource_management/libnative_resmgr.ndk.json +++ b/global/resource_management/libnative_resmgr.ndk.json @@ -138,5 +138,21 @@ { "first_introduced": "12", "name": "OH_ResourceManager_RemoveResource" + }, + { + "first_introduced": "16", + "name": "OH_ResourceManager_GetIntPluralString" + }, + { + "first_introduced": "16", + "name": "OH_ResourceManager_GetDoublePluralString" + }, + { + "first_introduced": "16", + "name": "OH_ResourceManager_GetIntPluralStringByName" + }, + { + "first_introduced": "16", + "name": "OH_ResourceManager_GetDoublePluralStringByName" } ] \ No newline at end of file -- Gitee From c83f71210a4dbc6d5c3a1289e26e0f99c5c9476b Mon Sep 17 00:00:00 2001 From: fox Date: Mon, 17 Feb 2025 17:43:04 +0800 Subject: [PATCH 555/630] iii Signed-off-by: fox --- arkui/window_manager/libwm.ndk.json | 28 +++++++++++++-------------- arkui/window_manager/oh_window.h | 16 +++++++-------- arkui/window_manager/oh_window_comm.h | 8 ++++---- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index d46913124..0563eba01 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -24,59 +24,59 @@ "name":"OH_NativeWindowManager_UnregisterTouchEventFilter" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_ShowWindow" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_IsWindowShown" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowStatusBarEnabled" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowStatusBarColor" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowNavigationBarEnabled" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_GetWindowAvoidArea" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowBackgroundColor" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowBrightness" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowKeepScreenOn" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowPrivacyMode" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_GetWindowProperties" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_Snapshot" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowTouchable" }, { - "first_instroduced":"16", + "first_instroduced":"15", "name":"OH_WindowManager_SetWindowFocusable" } ] \ No newline at end of file diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 1f392f2cb..c747b7b2b 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -144,7 +144,7 @@ int32_t OH_WindowManager_ShowWindow(int32_t windowId); * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowTouchable(int32_t windowId, bool isTouchable); @@ -158,7 +158,7 @@ int32_t OH_WindowManager_SetWindowTouchable(int32_t windowId, bool isTouchable); * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowFocusable(int32_t windowId, bool isFocusable); @@ -171,7 +171,7 @@ int32_t OH_WindowManager_SetWindowFocusable(int32_t windowId, bool isFocusable); * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowBackgroundColor(int32_t windowId, const char* color); @@ -185,7 +185,7 @@ int32_t OH_WindowManager_SetWindowBackgroundColor(int32_t windowId, const char* * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowBrightness(int32_t windowId, float brightness); @@ -199,7 +199,7 @@ int32_t OH_WindowManager_SetWindowBrightness(int32_t windowId, float brightness) * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScreenOn); @@ -215,7 +215,7 @@ int32_t OH_WindowManager_SetWindowKeepScreenOn(int32_t windowId, bool isKeepScre * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); @@ -228,7 +228,7 @@ int32_t OH_WindowManager_SetWindowPrivacyMode(int32_t windowId, bool isPrivacy); * {@link OK} the function call is successful, return window properties ptr in windowProperties. * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_GetWindowProperties( int32_t windowId, WindowManager_WindowProperties* windowProperties); @@ -243,7 +243,7 @@ int32_t OH_WindowManager_GetWindowProperties( * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. - * @since 16 + * @since 15 */ int32_t OH_WindowManager_Snapshot(int32_t windowId, OH_PixelmapNative* pixelMap); diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index f45e3ae32..d015371a5 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -46,7 +46,7 @@ extern "C" { /** * @brief The native pixel map information defined by Image Kit. * - * @since 16 + * @since 15 */ typedef struct OH_PixelmapNative; @@ -61,7 +61,7 @@ typedef enum { /** * @error No permission. * - * @since 16 + * @since 15 */ WINDOW_MANAGER_ERRORCODE_NO_PERMISSION = 201, /** @@ -115,7 +115,7 @@ typedef enum { /** * @brief The type of a window * - * @since 16 + * @since 15 */ typedef enum { /** Sub window. */ @@ -147,7 +147,7 @@ typedef struct { /** * @brief Properties of window * - * @since 16 + * @since 15 */ typedef struct { /** The position and size of the window. */ -- Gitee From c65f0ebab11efedc55dd6b20ba172b34bf118b33 Mon Sep 17 00:00:00 2001 From: htt1997 Date: Mon, 17 Feb 2025 17:12:57 +0800 Subject: [PATCH 556/630] add batchinsert Signed-off-by: htt1997 --- .../include/oh_rdb_transaction.h | 30 +++++++ .../relational_store/include/oh_rdb_types.h | 83 +++++++++++++++++++ .../include/relational_store.h | 30 +++++++ .../include/relational_store_error_code.h | 7 ++ .../relational_store/libnative_rdb.ndk.json | 8 ++ 5 files changed, 158 insertions(+) create mode 100644 distributeddatamgr/relational_store/include/oh_rdb_types.h diff --git a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h index e302f677d..7a13c9593 100644 --- a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h +++ b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h @@ -220,6 +220,36 @@ int OH_RdbTrans_Insert(OH_Rdb_Transaction *trans, const char *table, const OH_VB int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const OH_Data_VBuckets *rows, int64_t *changes); +/** + * @brief Inserts a batch of data into the target table. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param table Represents the target table. + * @param rows Represents the rows data to be inserted into the table. + * @param resolution Represents the resolution when conflict occurs. + * @param changes Represents the number of successful insertions. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * Returns {@link RDB_E_SQLITE_CONSTRAINT} SQLite: Abort due to constraint violation. + * @since 16 + */ +int OH_RdbTrans_BatchInsertWithConflictResolution(OH_Rdb_Transaction *trans, const char *table, + const OH_Data_VBuckets *rows, Rdb_Conflict_Resolution resolution, int64_t *changes); + /** * @brief Updates data in the database based on specified conditions. * diff --git a/distributeddatamgr/relational_store/include/oh_rdb_types.h b/distributeddatamgr/relational_store/include/oh_rdb_types.h new file mode 100644 index 000000000..0be2c259b --- /dev/null +++ b/distributeddatamgr/relational_store/include/oh_rdb_types.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup RDB + * @{ + * + * @brief The relational database (RDB) store manages data based on relational models. + * With the underlying SQLite database, the RDB store provides a complete mechanism for managing local databases. + * To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations + * such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. + * + * @since 10 + */ + +/** + * @file oh_rdb_types.h + * + * @brief Provides type define related to the data value. + * + * @kit ArkData + * @library libnative_rdb_ndk.z.so + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * + * @since 16 + */ + +#ifndef OH_RDB_TYPES_H +#define OH_RDB_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Describe the security area of the database. + * + * @since 16 + */ +typedef enum Rdb_Conflict_Resolution { + /** + * @brief Implements no operation when conflict occurs. + */ + RDB_CONFLICT_NONE = 1, + /** + * @brief Implements rollback operation when conflict occurs. + */ + RDB_CONFLICT_ROLLBACK, + /** + * @brief Implements abort operation when conflict occurs. + */ + RDB_CONFLICT_ABORT, + /** + * @brief Implements fail operation when conflict occurs. + */ + RDB_CONFLICT_FAIL, + /** + * @brief Implements ignore operation when conflict occurs. + */ + RDB_CONFLICT_IGNORE, + /** + * @brief Implements replace operation when conflict occurs. + */ + RDB_CONFLICT_REPLACE, +} Rdb_Conflict_Resolution; + +#ifdef __cplusplus +}; +#endif +#endif +/** @} */ \ No newline at end of file diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 01149c1b4..8e8a4fabe 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -487,6 +487,36 @@ int OH_Rdb_DeleteStoreV2(const OH_Rdb_ConfigV2 *config); */ int OH_Rdb_Insert(OH_Rdb_Store *store, const char *table, OH_VBucket *valuesBucket); +/** + * @brief Inserts a batch of data into the target table. + * + * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param table Represents the target table. + * @param rows Represents the rows data to be inserted into the table. + * @param resolution Represents the resolution when conflict occurs. + * @param changes Represents the number of successful insertions. + * @return Returns the status code of the execution. + * Returns {@link RDB_OK} if the execution is successful. + * Returns {@link RDB_E_ERROR} database common error. + * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. + * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. + * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. + * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. + * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. + * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. + * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. + * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. + * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. + * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. + * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. + * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. + * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. + * Returns {@link RDB_E_SQLITE_CONSTRAINT} SQLite: Abort due to constraint violation. + * @since 16 + */ +int OH_Rdb_BatchInsert(OH_Rdb_Transaction *trans, const char *table, + const OH_Data_VBuckets *rows, Rdb_Conflict_Resolution resolution, int64_t *changes); + /** * @brief Updates data in the database based on specified conditions. * diff --git a/distributeddatamgr/relational_store/include/relational_store_error_code.h b/distributeddatamgr/relational_store/include/relational_store_error_code.h index fb9a20805..64ec5db2a 100644 --- a/distributeddatamgr/relational_store/include/relational_store_error_code.h +++ b/distributeddatamgr/relational_store/include/relational_store_error_code.h @@ -413,6 +413,13 @@ typedef enum OH_Rdb_ErrCode { * @since 16 */ RDB_E_TYPE_MISMATCH = (E_BASE + 64), + + /** + * @brief Data value type is null. + * + * @since 16 + */ + RDB_E_SQLITE_CONSTRAINT = (E_BASE + 65), } OH_Rdb_ErrCode; #ifdef __cplusplus diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index 729444292..8d4ef570f 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -70,6 +70,10 @@ { "name":"OH_Rdb_Insert" }, + { + "first_introduced": "16", + "name":"OH_Rdb_BatchInsert" + }, { "name":"OH_Rdb_Update" }, @@ -467,6 +471,10 @@ "first_introduced": "16", "name":"OH_RdbTrans_BatchInsert" }, + { + "first_introduced": "16", + "name":"OH_RdbTrans_BatchInsertWithConflictResolution" + }, { "first_introduced": "16", "name":"OH_RdbTrans_Update" -- Gitee From eadf322a631682df1bcf03c46908b04c6c1cdeac Mon Sep 17 00:00:00 2001 From: liujiaxing19 Date: Mon, 17 Feb 2025 19:39:13 +0800 Subject: [PATCH 557/630] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujiaxing19 Change-Id: I93d6b89701f84ac7f5427a9d8e4b53be1258995f --- hiviewdfx/hiappevent/libhiappevent.ndk.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hiviewdfx/hiappevent/libhiappevent.ndk.json b/hiviewdfx/hiappevent/libhiappevent.ndk.json index 8e28e5661..7e95a119a 100644 --- a/hiviewdfx/hiappevent/libhiappevent.ndk.json +++ b/hiviewdfx/hiappevent/libhiappevent.ndk.json @@ -98,5 +98,21 @@ { "first_introduced": "12", "name": "OH_HiAppEvent_ClearData" + }, + { + "first_introduced": "15", + "name": "OH_HiAppEvent_CreateConfig" + }, + { + "first_introduced": "15", + "name": "OH_HiAppEvent_DestroyConfig" + }, + { + "first_introduced": "15", + "name": "OH_HiAppEvent_SetConfigItem" + }, + { + "first_introduced": "15", + "name": "OH_HiAppEvent_SetEventConfig" } ] -- Gitee From fffbaf97c1fe184a878dbbb2a886e3e2842692ef Mon Sep 17 00:00:00 2001 From: b30058220 Date: Mon, 17 Feb 2025 22:05:55 +0800 Subject: [PATCH 558/630] =?UTF-8?q?=E5=9B=9E=E5=90=88=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BF=AE=E6=94=B9capi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: b30058220 Change-Id: I85d492bd4987839b5c9a96884024334e5dea8c66 --- arkui/ace_engine/native/drag_and_drop.h | 6 +++--- arkui/ace_engine/native/libace.ndk.json | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index d66607752..ad98735a1 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -446,7 +446,7 @@ int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_DRAG_DATA_SYNC_FAILED} if the data sync is not allowed or failed. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_DragEvent_StartDataLoading( ArkUI_DragEvent* event, OH_UdmfGetDataParams* options, char* key, unsigned int keyLen); @@ -460,7 +460,7 @@ int32_t OH_ArkUI_DragEvent_StartDataLoading( * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_OPERATION_FAILED} if no any data sync is in progress. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_CancelDataLoading(ArkUI_ContextHandle uiContext, const char* key); @@ -478,7 +478,7 @@ int32_t OH_ArkUI_CancelDataLoading(ArkUI_ContextHandle uiContext, const char* ke * @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. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_DisableDropDataPrefetchOnNode(ArkUI_NodeHandle node, bool disabled); diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 20c3d3262..edf8080ec 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2699,6 +2699,18 @@ "first_introduced": "15", "name": "OH_ArkUI_UnregisterDrawCallbackOnNodeHandle" }, + { + "first_introduced": "15", + "name": "OH_ArkUI_DragEvent_StartDataLoading" + }, + { + "first_introduced": "15", + "name": "OH_ArkUI_CancelDataLoading" + }, + { + "first_introduced": "15", + "name": "OH_ArkUI_DisableDropDataPrefetchOnNode" + }, { "first_introduced": "16", "name": "OH_ArkUI_FocusRequest" @@ -2759,18 +2771,6 @@ "first_introduced": "16", "name": "OH_ArkUI_XComponent_StopImageAnalyzer" }, - { - "first_introduced": "16", - "name": "OH_ArkUI_DragEvent_StartDataLoading" - }, - { - "first_introduced": "16", - "name": "OH_ArkUI_CancelDataLoading" - }, - { - "first_introduced": "16", - "name": "OH_ArkUI_DisableDropDataPrefetchOnNode" - }, { "first_introduced": "16", "name": "OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate" -- Gitee From a22e39437bf1db608419479963ac9cd60987d0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=BC=E6=AD=A4=E5=BD=BC=E6=AD=A4?= Date: Tue, 18 Feb 2025 11:28:01 +0800 Subject: [PATCH 559/630] Add media info verification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彼此彼此 --- multimedia/av_codec/native_avsource.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index e50111823..fe5833374 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -139,8 +139,10 @@ OH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackIndex /** * @brief Get the format info of custom metadata. + * * It should be noted that the life cycle of the OH_AVFormat instance pointed to by the return value * needs * to be manually released by the caller. + * * @syscap SystemCapability.Multimedia.Media.Spliter * @param source Pointer to an OH_AVSource instance. * @return Returns the metadata's format info if the execution is successful, otherwise returns nullptr. -- Gitee From b6f55a77ccd4bd68abbf291d4c1583debab2354c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=BC=E6=AD=A4=E5=BD=BC=E6=AD=A4?= Date: Tue, 18 Feb 2025 14:47:04 +0800 Subject: [PATCH 560/630] Add media info verification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彼此彼此 --- multimedia/av_codec/avsource/libnative_media_avsource.ndk.json | 2 +- multimedia/av_codec/native_avsource.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json index 55fe52c8e..ecc3b3f8c 100644 --- a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json +++ b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json @@ -25,6 +25,6 @@ }, { "first_introduced": "16", - "name": "OH_AVSource_GetCustomMetaDataFormat" + "name": "OH_AVSource_GetCustomMetadataFormat" } ] diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index fe5833374..338e026a7 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -150,7 +150,7 @@ OH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackIndex * 1. source is invalid. * @since 16 */ -OH_AVFormat *OH_AVSource_GetCustomMetaDataFormat(OH_AVSource *source); +OH_AVFormat *OH_AVSource_GetCustomMetadataFormat(OH_AVSource *source); #ifdef __cplusplus } -- Gitee From ac6322c5e4a7c021d7e0251b1b349c0e50a71570 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Tue, 7 Jan 2025 18:31:20 +0800 Subject: [PATCH 561/630] =?UTF-8?q?capi=E6=8F=90=E4=BE=9B=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E4=BA=8B=E4=BB=B6=E8=A7=A6=E5=8F=91=E7=9A=84id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan Change-Id: Iec94cad8c7f7097254f11819f6c4675e8cc6cbb2 --- arkui/ace_engine/native/libace.ndk.json | 8 ++++---- arkui/ace_engine/native/ui_input_event.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index f9d42b883..1a249c7df 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2727,6 +2727,10 @@ "first_introduced": "15", "name": "OH_ArkUI_AccessibilityProviderRegisterCallbackWithInstance" }, + { + "first_introduced": "15", + "name": "OH_ArkUI_PointerEvent_GetChangedPointerId" + }, { "first_introduced": "16", "name": "OH_ArkUI_GetGestureParam_FingerCount" @@ -2791,10 +2795,6 @@ "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius" }, - { - "first_introduced": "16", - "name": "OH_ArkUI_PointerEvent_GetChangedPointerId" - }, { "first_introduced": "15", "name": "OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled" diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index dc25959db..0398a9829 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -331,7 +331,7 @@ int32_t OH_ArkUI_PointerEvent_GetPointerId(const ArkUI_UIInputEvent* event, uint * @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. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_PointerEvent_GetChangedPointerId(const ArkUI_UIInputEvent* event, uint32_t* pointerIndex); -- Gitee From ec2d1c13c47a18bd7be5ff630467ac929c88559f Mon Sep 17 00:00:00 2001 From: htt1997 Date: Tue, 18 Feb 2025 10:20:31 +0800 Subject: [PATCH 562/630] update Signed-off-by: htt1997 --- .../include/oh_rdb_transaction.h | 32 ++----------------- .../include/relational_store.h | 4 +-- .../relational_store/libnative_rdb.ndk.json | 4 --- 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h index 7a13c9593..636e78e17 100644 --- a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h +++ b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h @@ -192,34 +192,6 @@ int OH_RdbTrans_Rollback(OH_Rdb_Transaction *trans); */ int OH_RdbTrans_Insert(OH_Rdb_Transaction *trans, const char *table, const OH_VBucket *row, int64_t *rowId); -/** - * @brief Inserts a batch of data into the target table. - * - * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. - * @param table Represents the target table. - * @param rows Represents the rows data to be inserted into the table. - * @param changes Represents the number of successful insertions. - * @return Returns the status code of the execution. - * Returns {@link RDB_OK} if the execution is successful. - * Returns {@link RDB_E_ERROR} database common error. - * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * Returns {@link RDB_E_ALREADY_CLOSED} database already closed. - * Returns {@link RDB_E_WAL_SIZE_OVER_LIMIT} the WAL file size over default limit. - * Returns {@link RDB_E_SQLITE_FULL} SQLite: The database is full. - * Returns {@link RDB_E_SQLITE_CORRUPT} database corrupted. - * Returns {@link RDB_E_SQLITE_PERM} SQLite: Access permission denied. - * Returns {@link RDB_E_SQLITE_BUSY} SQLite: The database file is locked. - * Returns {@link RDB_E_SQLITE_LOCKED} SQLite: A table in the database is locked. - * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. - * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. - * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. - * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. - * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. - * @since 16 - */ -int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const OH_Data_VBuckets *rows, - int64_t *changes); - /** * @brief Inserts a batch of data into the target table. * @@ -247,8 +219,8 @@ int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const * Returns {@link RDB_E_SQLITE_CONSTRAINT} SQLite: Abort due to constraint violation. * @since 16 */ -int OH_RdbTrans_BatchInsertWithConflictResolution(OH_Rdb_Transaction *trans, const char *table, - const OH_Data_VBuckets *rows, Rdb_Conflict_Resolution resolution, int64_t *changes); +int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const OH_Data_VBuckets *rows, + Rdb_Conflict_Resolution resolution, int64_t *changes); /** * @brief Updates data in the database based on specified conditions. diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 8e8a4fabe..71b692cc6 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -490,7 +490,7 @@ int OH_Rdb_Insert(OH_Rdb_Store *store, const char *table, OH_VBucket *valuesBuck /** * @brief Inserts a batch of data into the target table. * - * @param trans Represents a pointer to an instance of OH_Rdb_Transaction. + * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. * @param table Represents the target table. * @param rows Represents the rows data to be inserted into the table. * @param resolution Represents the resolution when conflict occurs. @@ -514,7 +514,7 @@ int OH_Rdb_Insert(OH_Rdb_Store *store, const char *table, OH_VBucket *valuesBuck * Returns {@link RDB_E_SQLITE_CONSTRAINT} SQLite: Abort due to constraint violation. * @since 16 */ -int OH_Rdb_BatchInsert(OH_Rdb_Transaction *trans, const char *table, +int OH_Rdb_BatchInsert(OH_Rdb_Store *store, const char *table, const OH_Data_VBuckets *rows, Rdb_Conflict_Resolution resolution, int64_t *changes); /** diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index 8d4ef570f..afa900613 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -471,10 +471,6 @@ "first_introduced": "16", "name":"OH_RdbTrans_BatchInsert" }, - { - "first_introduced": "16", - "name":"OH_RdbTrans_BatchInsertWithConflictResolution" - }, { "first_introduced": "16", "name":"OH_RdbTrans_Update" -- Gitee From b8e8de01e5585ba1360c76f64537c21486bd5517 Mon Sep 17 00:00:00 2001 From: limabiao Date: Tue, 11 Feb 2025 18:12:22 +0800 Subject: [PATCH 563/630] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=9D=9E=E6=A0=87?= =?UTF-8?q?=E5=A4=96=E8=AE=BESCSI=E5=91=BD=E4=BB=A4=E5=AD=97=E5=8F=8A?= =?UTF-8?q?=E6=9E=84=E5=BB=BASCSI=20DDK=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: limabiao Change-Id: I6170369de27c40da97592e8b7319e49e8f2e4320 --- .../scsi_peripheral/BUILD.gn | 33 ++ .../scsi_peripheral/libscsi.ndk.json | 62 +++ .../scsi_peripheral/scsi_peripheral_api.h | 324 +++++++++++++++ .../scsi_peripheral/scsi_peripheral_types.h | 379 ++++++++++++++++++ ndk_targets.gni | 2 + 5 files changed, 800 insertions(+) create mode 100644 drivers/external_device_manager/scsi_peripheral/BUILD.gn create mode 100644 drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json create mode 100644 drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h create mode 100644 drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h diff --git a/drivers/external_device_manager/scsi_peripheral/BUILD.gn b/drivers/external_device_manager/scsi_peripheral/BUILD.gn new file mode 100644 index 000000000..a47545350 --- /dev/null +++ b/drivers/external_device_manager/scsi_peripheral/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") + +ohos_ndk_headers("scsi_header") { + dest_dir = "$ndk_headers_out_dir/scsi_peripheral/" + sources = [ + "scsi_peripheral_api.h", + "scsi_peripheral_types.h", + ] +} + +ohos_ndk_library("libscsi") { + ndk_description_file = "./libscsi.ndk.json" + min_compact_version = "16" + output_name = "scsi" + system_capability = "SystemCapability.Driver.SCSI.Extension" + system_capability_headers = [ + "scsi_peripheral/scsi_peripheral_api.h", + "scsi_peripheral/scsi_peripheral_types.h", + ] +} diff --git a/drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json b/drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json new file mode 100644 index 000000000..4d3a16661 --- /dev/null +++ b/drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json @@ -0,0 +1,62 @@ +[ + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Init" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Release" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Open" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Close" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_ReadCapacity10" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_TestUnitReady" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Inquiry" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_RequestSense" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Read10" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Write10" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_Verify10" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_SendRequestByCdb" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_CreateDeviceMemMap" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_DestroyDeviceMemMap" + }, + { + "first_introduced": "16", + "name": "OH_ScsiPeripheral_ParseBasicSenseInfo" + } +] \ No newline at end of file diff --git a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h new file mode 100644 index 000000000..b46bac27d --- /dev/null +++ b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h @@ -0,0 +1,324 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup ScsiPeripheralDDK + * @{ + * + * @brief Provide ScsiPeripheral DDK interface, including initializing DDK, releasing DDK, opening devices, reading and writing devices, etc. + * @since 16 + */ + +/** + * @file scsi_peripheral_api.h + * + * @brief Declares the ScsiPeripheral DDK APIs. + * + * @kit DriverDevelopmentKit + * @library libscsi.z.so + * @syscap SystemCapability.Driver.SCSI.Extension + * @since 16 + */ + +#ifndef SCSI_PERIPHERAL_API_H +#define SCSI_PERIPHERAL_API_H + +#include +#include "scsi_peripheral_types.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * @brief Initializes the ScsiPeripheral DDK. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk init error. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Init(void); + +/** + * @brief Releases the ScsiPeripheral DDK. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Release(void); + +/** + * @brief Open SCSI device by deviceId. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param deviceId ID of the device to be operated. + * @param interfaceIndex Interface index, which corresponds to interface which supports USB Protocol UAS. + * @param dev Device handle. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_DEVICE_NOT_FOUND} device not found by deviceId. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Open(uint64_t deviceId, uint8_t interfaceIndex, ScsiPeripheral_Device **dev); + +/** + * @brief Close SCSI device. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Close(ScsiPeripheral_Device **dev); + +/** + * @brief Check if the logical unit is ready. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request Test unit ready request information. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_TestUnitReady(ScsiPeripheral_Device *dev, ScsiPeripheral_TestUnitReadyRequest *request, + ScsiPeripheral_Response *response); + +/** + * @brief Get the information regarding the logical unit and SCSI target device. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request Inquiry request information. + * @param inquiryInfo The data of inquiry command. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or inquiryInfo is null or\n + * inquiryInfo->data is null or response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Inquiry(ScsiPeripheral_Device *dev, ScsiPeripheral_InquiryRequest *request, + ScsiPeripheral_InquiryInfo *inquiryInfo, ScsiPeripheral_Response *response); + +/** + * @brief Get the device capacity. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request ReadCapacity request information. + * @param capacityInfo The data of read capacity command. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or capacityInfo is null or\n + * response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_ReadCapacity10(ScsiPeripheral_Device *dev, ScsiPeripheral_ReadCapacityRequest *request, + ScsiPeripheral_CapacityInfo *capacityInfo, ScsiPeripheral_Response *response); + +/** + * @brief Get the sense data. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request RequestSense request information. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_RequestSense(ScsiPeripheral_Device *dev, ScsiPeripheral_RequestSenseRequest *request, + ScsiPeripheral_Response *response); + +/** + * @brief Read from the specified logical block(s). + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request The request parameters. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or request->data is null or\n + * response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Read10(ScsiPeripheral_Device *dev, ScsiPeripheral_IORequest *request, + ScsiPeripheral_Response *response); + +/** + * @brief Write data to the specified logical block(s). + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request The request parameters. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or request->data is null or\n + * response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Write10(ScsiPeripheral_Device *dev, ScsiPeripheral_IORequest *request, + ScsiPeripheral_Response *response); + +/** + * @brief Verify the specified logical block(s) on the medium. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request Verify request information. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_Verify10(ScsiPeripheral_Device *dev, ScsiPeripheral_VerifyRequest *request, + ScsiPeripheral_Response *response); + +/** + * @brief Send SCSI command that specified by CDB. + * + * @permission ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL + * @param dev Device handle. + * @param request The request parameters. + * @param response The response parameters. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. + * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or request is null or request->data is null or\n + * request->cdbLength is 0 or response is null. + * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. + * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. + * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. + * @since 16 + */ +int32_t OH_ScsiPeripheral_SendRequestByCdb(ScsiPeripheral_Device *dev, ScsiPeripheral_Request *request, + ScsiPeripheral_Response *response); + +/** + * @brief Creates a buffer. To avoid resource leakage, destroy a buffer by calling\n + * OH_ScsiPeripheral_DestroyDeviceMemMap after use. + * + * @param dev Device handle. + * @param size Buffer size. + * @param devMmap Data memory map, through which the created buffer is returned to the caller. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or devMmap is null. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * @since 16 + */ +int32_t OH_ScsiPeripheral_CreateDeviceMemMap(ScsiPeripheral_Device *dev, size_t size, + ScsiPeripheral_DeviceMemMap **devMmap); + +/** + * @brief Destroys a buffer. To avoid resource leakage, destroy a buffer in time after use. + * + * @param devMmap Device memory map created by calling OH_ScsiPeripheral_CreateDeviceMemMap. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} devMmap is null. + * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. + * @since 16 + */ +int32_t OH_ScsiPeripheral_DestroyDeviceMemMap(ScsiPeripheral_DeviceMemMap *devMmap); + +/** + * @brief Parse the basic sense data of Information、Command-specific information、Sense key specific. + * + * @param senseData Sense data. + * @param senseDataLen The length of sense data. + * @param senseInfo Basic sense data. + * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. + * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} senseData is null or senseInfo is null or\n + * senseData format is not Descriptor/Fixed format or\n + * senseDataLen is smaller than SCSIPERIPHERAL_MIN_DESCRIPTOR_FORMAT_SENSE or\n + * senseDataLen is smaller than SCSIPERIPHERAL_MIN_FIXED_FORMAT_SENSE. + * @since 16 + */ +int32_t OH_ScsiPeripheral_ParseBasicSenseInfo(uint8_t *senseData, uint8_t senseDataLen, + ScsiPeripheral_BasicSenseInfo *senseInfo); +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif // SCSI_PERIPHERAL_API_H +/** @} */ diff --git a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h new file mode 100644 index 000000000..b2044693a --- /dev/null +++ b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h @@ -0,0 +1,379 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup ScsiPeripheralDDK + * @{ + * + * @brief Provides ScsiPeripheral DDK types and declares macros, enumerations, and data structures used by the ScsiPeripheral DDK. + * @since 16 + */ + +/** + * @file scsi_peripheral_types.h + * + * @brief Provides the enums, structs, and macros used in SCSI Peripheral DDK APIs. + * + * @kit DriverDevelopmentKit + * @library libscsi.z.so + * @syscap SystemCapability.Driver.SCSI.Extension + * @since 16 + */ + +#ifndef SCSI_PERIPHERAL_TYPES_H +#define SCSI_PERIPHERAL_TYPES_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * @brief The min length of descriptor format sense data: 8. + * + * @since 16 + */ +#define SCSIPERIPHERAL_MIN_DESCRIPTOR_FORMAT_SENSE 8 + +/** + * @brief The min length of fixed format sense data: 18. + * + * @since 16 + */ +#define SCSIPERIPHERAL_MIN_FIXED_FORMAT_SENSE 18 + +/** + * @brief Defines error codes for SCSI DDK. + * + * @since 16 + */ +typedef enum { + /** @error Permission denied. */ + SCSIPERIPHERAL_DDK_NO_PERM = 201, + /** @error Invalid parameter. */ + SCSIPERIPHERAL_DDK_INVALID_PARAMETER = 401, + /** @error The operation is successful. */ + SCSIPERIPHERAL_DDK_SUCCESS = 31700000, + /** @error Memory-related error, for example, insufficient memory, memory data copy failure,\n + * or memory application failure. + */ + SCSIPERIPHERAL_DDK_MEMORY_ERROR = 31700001, + /** @error Invalid operation. */ + SCSIPERIPHERAL_DDK_INVALID_OPERATION = 31700002, + /** @error Device I/O operation failed. */ + SCSIPERIPHERAL_DDK_IO_ERROR = 31700003, + /** @error Transmission timeout. */ + SCSIPERIPHERAL_DDK_TIMEOUT = 31700004, + /** @error The ddk init error or the ddk not init. */ + SCSIPERIPHERAL_DDK_INIT_ERROR = 31700005, + /** @error Communication with the SCSI ddk service failed. */ + SCSIPERIPHERAL_DDK_SERVICE_ERROR = 31700006, + /** @error Device not found. */ + SCSIPERIPHERAL_DDK_DEVICE_NOT_FOUND = 31700007, +} ScsiPeripheral_DdkErrCode; + +/** + * @brief Defines SCSI status for response. + * + * @since 16 + */ +typedef enum { + /** Good condition */ + SCSIPERIPHERAL_STATUS_GOOD = 0x00, + /** Check condition needed */ + SCSIPERIPHERAL_STATUS_CHECK_CONDITION_NEEDED = 0x02, + /** Condition met */ + SCSIPERIPHERAL_STATUS_CONDITION_MET = 0x04, + /** Busy */ + SCSIPERIPHERAL_STATUS_BUSY = 0x08, + /** Reservation conflict */ + SCSIPERIPHERAL_STATUS_RESERVATION_CONFLICT = 0x18, + /** Task set full */ + SCSIPERIPHERAL_STATUS_TASK_SET_FULL = 0x28, + /** ACA active */ + SCSIPERIPHERAL_STATUS_ACA_ACTIVE = 0x30, + /** Task aborted */ + SCSIPERIPHERAL_STATUS_TASK_ABORTED = 0x40, +} ScsiPeripheral_Status; + +/** + * @brief Opaque SCSI device structure. + * + * @since 16 + */ +typedef struct ScsiPeripheral_Device ScsiPeripheral_Device; + +/** + * @brief Device memory map created by calling OH_ScsiPeripheral_CreateDeviceMemMap.\n + * A buffer using the device memory map can provide better performance. + * + * @since 16 + */ +typedef struct ScsiPeripheral_DeviceMemMap { + /** Buffer address. */ + uint8_t * const address; + /** Buffer size. */ + const size_t size; + /** Offset of the used buffer. The default value is 0, indicating that there is no offset\n + * and the buffer starts from the specified address. + */ + uint32_t offset; + /** Length of the used buffer. By default, the value is equal to the size, indicating that\n + * the entire buffer is used. + */ + uint32_t bufferLength; + /** Length of the transferred data. */ + uint32_t transferredLength; +} ScsiPeripheral_DeviceMemMap; + +/** + * @brief Request parameters for read/write. + * + * @since 16 + */ +typedef struct ScsiPeripheral_IORequest { + /** Starting with the logical block. */ + uint32_t lbAddress; + /** Number of contiguous logical blocks that shall be read. */ + uint16_t transferLength; + /** Control byte. */ + uint8_t control; + /** Byte 1 of the CDB. */ + uint8_t byte1; + /** Byte 6 of the CDB. */ + uint8_t byte6; + /** Buffer of data transfer. */ + ScsiPeripheral_DeviceMemMap *data; + /** Timeout(unit: millisec). */ + uint32_t timeout; +} ScsiPeripheral_IORequest; + +/** + * @brief The max length of command descriptor block: 16. + * + * @since 16 + */ +#define SCSIPERIPHERAL_MAX_CMD_DESC_BLOCK_LEN 16 + +/** + * @brief Request parameters. + * + * @since 16 + */ +typedef struct ScsiPeripheral_Request { + /** Command descriptor block. */ + uint8_t commandDescriptorBlock[SCSIPERIPHERAL_MAX_CMD_DESC_BLOCK_LEN]; + /** The length of command descriptor block. */ + uint8_t cdbLength; + /** Data transfer direction. */ + int8_t dataTransferDirection; + /** Buffer of data transfer. */ + ScsiPeripheral_DeviceMemMap *data; + /** Timeout(unit: millisec). */ + uint32_t timeout; +} ScsiPeripheral_Request; + +/** + * @brief The max length of sense data: 252. + * + * @since 16 + */ +#define SCSIPERIPHERAL_MAX_SENSE_DATA_LEN 252 + +/** + * @brief Response parameters. + * + * @since 16 + */ +typedef struct ScsiPeripheral_Response { + /** Sense data. */ + uint8_t senseData[SCSIPERIPHERAL_MAX_SENSE_DATA_LEN]; + /** The status at completion of the call, such as good, busy, or timeout. */ + ScsiPeripheral_Status status; + /** Shifted, masked scsi status. */ + uint8_t maskedStatus; + /** Messaging level data (optional). */ + uint8_t msgStatus; + /** Byte count actually written to sbp. */ + uint8_t sbLenWr; + /** Errors from host adapter. */ + uint16_t hostStatus; + /** Errors from software driver. */ + uint16_t driverStatus; + /** Dxfer_len - actual_transferred. */ + int32_t resId; + /** Time taken by cmd (unit: millisec). */ + uint32_t duration; +} ScsiPeripheral_Response; + +/** + * @brief SCSI test unit ready request. + * + * @since 16 + */ +typedef struct ScsiPeripheral_TestUnitReadyRequest { + /** Control byte. */ + uint8_t control; + /** Timeout(unit: millisec). */ + uint32_t timeout; +} ScsiPeripheral_TestUnitReadyRequest; + +/** + * @brief SCSI inquiry request. + * + * @since 16 + */ +typedef struct ScsiPeripheral_InquiryRequest { + /** Page code. */ + uint8_t pageCode; + /** Allocation length. */ + uint16_t allocationLength; + /** Control byte. */ + uint8_t control; + /** Byte 1 of the CDB. */ + uint8_t byte1; + /** Timeout(unit: millisec). */ + uint32_t timeout; +} ScsiPeripheral_InquiryRequest; + +/** + * @brief The length of vendor identification: 8. + * + * @since 16 + */ +#define SCSIPERIPHERAL_VENDOR_ID_LEN 8 + +/** + * @brief The length of product identification: 16. + * + * @since 16 + */ +#define SCSIPERIPHERAL_PRODUCT_ID_LEN 16 + +/** + * @brief The length of product revision: 4. + * + * @since 16 + */ +#define SCSIPERIPHERAL_PRODUCT_REV_LEN 4 + +/** + * @brief SCSI inquiry data. + * + * @since 16 + */ +typedef struct ScsiPeripheral_InquiryInfo { + /** Peripheral device type. */ + uint8_t deviceType; + /** Vendor identification. */ + char idVendor[SCSIPERIPHERAL_VENDOR_ID_LEN + 1]; + /** Product identification. */ + char idProduct[SCSIPERIPHERAL_PRODUCT_ID_LEN + 1]; + /** Product revision. */ + char revProduct[SCSIPERIPHERAL_PRODUCT_REV_LEN + 1]; + /** All inquiry data. */ + ScsiPeripheral_DeviceMemMap *data; +} ScsiPeripheral_InquiryInfo; + +/** + * @brief SCSI read capacity request. + * + * @since 16 + */ +typedef struct ScsiPeripheral_ReadCapacityRequest { + /** Logical block address. */ + uint32_t lbAddress; + /** Control byte. */ + uint8_t control; + /** Byte 8 of the CDB. */ + uint8_t byte8; + /** Timeout(unit: millisec). */ + uint32_t timeout; +} ScsiPeripheral_ReadCapacityRequest; + +/** + * @brief SCSI read capacity data. + * + * @since 16 + */ +typedef struct ScsiPeripheral_CapacityInfo { + /** Returned logical block address. */ + uint32_t lbAddress; + /** Logical block length in bytes. */ + uint32_t lbLength; +} ScsiPeripheral_CapacityInfo; + +/** + * @brief SCSI request sense request. + * + * @since 16 + */ +typedef struct ScsiPeripheral_RequestSenseRequest { + /** Allocation length. */ + uint8_t allocationLength; + /** Control byte. */ + uint8_t control; + /** Byte 1 of the CDB. */ + uint8_t byte1; + /** Timeout(unit: millisec). */ + uint32_t timeout; +} ScsiPeripheral_RequestSenseRequest; + +/** + * @brief Basic sense data of Information、Command-specific information、Sense key specific. + * + * @since 16 + */ +typedef struct ScsiPeripheral_BasicSenseInfo { + /** Response code. */ + uint8_t responseCode; + /** Information valid bit. */ + bool valid; + /** Information sense data descriptor. */ + uint64_t information; + /** Command-specific information sense data descriptor. */ + uint64_t commandSpecific; + /** Sense key specific valid bit. */ + bool sksv; + /** Sense key specific sense data descriptor. */ + uint32_t senseKeySpecific; +} ScsiPeripheral_BasicSenseInfo; + +/** + * @brief SCSI verify request. + * + * @since 16 + */ +typedef struct ScsiPeripheral_VerifyRequest { + /** Starting with the logical block. */ + uint32_t lbAddress; + /** Number of contiguous logical blocks that shall be verify. */ + uint16_t verificationLength; + /** Control byte. */ + uint8_t control; + /** Byte 1 of the CDB. */ + uint8_t byte1; + /** Byte 6 of the CDB. */ + uint8_t byte6; + /** Timeout(unit: millisec). */ + uint32_t timeout; +} ScsiPeripheral_VerifyRequest; +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif // SCSI_PERIPHERAL_TYPES_H +/** @} */ diff --git a/ndk_targets.gni b/ndk_targets.gni index da0d52f11..3e97a0689 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -190,6 +190,8 @@ _ndk_library_targets = [ "//interface/sdk_c/drivers/external_device_manager/usb:usb_header", "//interface/sdk_c/drivers/external_device_manager/usb_serial:libusb_serial", "//interface/sdk_c/drivers/external_device_manager/usb_serial:usb_serial_header", + "//interface/sdk_c/drivers/external_device_manager/scsi_peripheral:libscsi", + "//interface/sdk_c/drivers/external_device_manager/scsi_peripheral:scsi_header", "//interface/sdk_c/drivers/external_device_manager/hid:libhid", "//interface/sdk_c/drivers/external_device_manager/hid:hid_header", "//interface/sdk_c/drivers/external_device_manager/base:libddk_base", -- Gitee From 0cb8b5640908c7c4ca126bb9ab61a8cc24ef58dc Mon Sep 17 00:00:00 2001 From: yangqirun Date: Wed, 19 Feb 2025 09:38:12 +0800 Subject: [PATCH 564/630] export ndk interfaces Signed-off-by: yangqirun Change-Id: I02d7958be29df68ce004a4faba734133c7a05932 --- hiviewdfx/hiappevent/libhiappevent.ndk.json | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/hiviewdfx/hiappevent/libhiappevent.ndk.json b/hiviewdfx/hiappevent/libhiappevent.ndk.json index 7e95a119a..3089bea4c 100644 --- a/hiviewdfx/hiappevent/libhiappevent.ndk.json +++ b/hiviewdfx/hiappevent/libhiappevent.ndk.json @@ -114,5 +114,49 @@ { "first_introduced": "15", "name": "OH_HiAppEvent_SetEventConfig" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_CreateProcessor" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_SetReportRoute" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_SetReportPolicy" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_SetReportEvent" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_SetCustomConfig" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_SetConfigId" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_SetReportUserId" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_SetReportUserProperty" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_AddProcessor" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_DestroyProcessor" + }, + { + "first_introduced": "16", + "name": "OH_HiAppEvent_RemoveProcessor" } ] -- Gitee From 493831b4e09d4e75fbf99777685568166fcce437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E7=BA=A2=E6=9D=B0?= Date: Wed, 19 Feb 2025 10:25:38 +0800 Subject: [PATCH 565/630] =?UTF-8?q?list=E4=BB=8E=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=B8=83=E5=B1=80capi=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 石红杰 Change-Id: I9018b6b8315c384e3c2ebfef6448dff96a38ded7 --- arkui/ace_engine/native/native_node.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 78a9b796f..9bb038097 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5346,6 +5346,21 @@ typedef enum { */ NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION = 1003013, + /** + * @brief Sets whether the List component starts layout from the end. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether the List component starts layout from the end. The value 0 means layout + * starts from the top, and 1 means layout starts from the end. The default value is 0. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether the List component starts layout from the end. The value 0 means layout + * starts from the top, and 1 means layout starts from the end. The default value is 0. \n + * + * @since 16 + */ + NODE_LIST_STACK_FROM_END = 1003014, + /** * @brief Defines whether to enable loop playback for the swiper. * This attribute can be set, reset, and obtained as required through APIs. -- Gitee From ac99acdafd00396a6b7023b09e38c3bfed0b4d39 Mon Sep 17 00:00:00 2001 From: wanjining Date: Thu, 13 Feb 2025 19:34:15 +0800 Subject: [PATCH 566/630] =?UTF-8?q?=E8=B0=83=E6=95=B4API=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanjining --- arkui/ace_engine/native/libace.ndk.json | 2 +- arkui/ace_engine/native/native_node.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 342e6923b..29e34b644 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2660,7 +2660,7 @@ "name": "OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeEvent_GetTextChangeEvent" }, { diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e360130ee..69023b38b 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3053,7 +3053,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].f32: letter spacing. The default unit is fp. \n * - * @since 16 + * @since 15 */ NODE_TEXT_INPUT_LETTER_SPACING = 7032, /** @@ -3066,7 +3066,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: whether to enable preview tex. \n * - * @since 16 + * @since 15 */ NODE_TEXT_INPUT_ENABLE_PREVIEW_TEXT = 7033, @@ -3401,7 +3401,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].f32: letter spacing. The default unit is fp. \n * - * @since 16 + * @since 15 */ NODE_TEXT_AREA_LETTER_SPACING = 8023, /** @@ -3414,7 +3414,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: whether to enable preview tex. \n * - * @since 16 + * @since 15 */ NODE_TEXT_AREA_ENABLE_PREVIEW_TEXT = 8024, @@ -6200,7 +6200,7 @@ typedef struct { /** * @brief Defines a hybrid data structure for component events. * - * @since 16 + * @since 15 */ typedef struct { /** String data */ @@ -6797,7 +6797,7 @@ typedef enum { * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextInput component. * ArkUI_TextChangeEvent.number: start position of the preview text in the TextInput component. * - * @since 16 + * @since 15 */ NODE_TEXT_INPUT_ON_CHANGE_WITH_PREVIEW_TEXT = 7013, @@ -6963,7 +6963,7 @@ typedef enum { * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextArea component. * ArkUI_TextChangeEvent.number: start position of the preview text in the TextArea component. * - * @since 16 + * @since 15 */ NODE_TEXT_AREA_ON_CHANGE_WITH_PREVIEW_TEXT = 8012, @@ -7613,7 +7613,7 @@ ArkUI_StringAsyncEvent* OH_ArkUI_NodeEvent_GetStringAsyncEvent(ArkUI_NodeEvent* * * @param event Pointer to a component event. It cannot be null. * @return Returns the pointer to the ArkUI_TextChangeEvent object. - * @since 16 + * @since 15 */ ArkUI_TextChangeEvent* OH_ArkUI_NodeEvent_GetTextChangeEvent(ArkUI_NodeEvent* event); -- Gitee From 7faf7943630ee866bce0f7d44c766c4a2127c423 Mon Sep 17 00:00:00 2001 From: benb365 Date: Wed, 19 Feb 2025 12:13:10 +0800 Subject: [PATCH 567/630] Changer touch recognizer version to API15. Signed-off-by: benb365 Change-Id: Ic6b45926acacc31f28f020f5f4669786f6f6ace7 --- arkui/ace_engine/native/native_gesture.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index 5c470baae..d533ba598 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -280,21 +280,21 @@ typedef struct ArkUI_ParallelInnerGestureEvent ArkUI_ParallelInnerGestureEvent; /** * @brief Defines a touch recognizer. * - * @since 16 + * @since 15 */ typedef struct ArkUI_TouchRecognizer ArkUI_TouchRecognizer; /** * @brief Defines a touch recognizer handle. * - * @since 16 + * @since 15 */ typedef ArkUI_TouchRecognizer* ArkUI_TouchRecognizerHandle; /** * @brief Defines an array of touch recognizer handle. * - * @since 16 + * @since 15 */ typedef ArkUI_TouchRecognizerHandle* ArkUI_TouchRecognizerHandleArray; @@ -350,7 +350,7 @@ int32_t OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType(const ArkUI_Gestur * @param size Indicates the size of recognizers. * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. -* @since 16 +* @since 15 */ int32_t OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers(const ArkUI_GestureInterruptInfo* info, ArkUI_TouchRecognizerHandleArray* recognizers, int32_t* size); @@ -360,7 +360,7 @@ int32_t OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers(const ArkUI_GestureInt * * @param recognizer Indicates the pointer to the TouchRecognizer. * @return Get component object of the specific touch recognizer. -* @since 16 +* @since 15 */ ArkUI_NodeHandle OH_ArkUI_TouchRecognizer_GetNodeHandle(const ArkUI_TouchRecognizerHandle recognizer); @@ -371,7 +371,7 @@ ArkUI_NodeHandle OH_ArkUI_TouchRecognizer_GetNodeHandle(const ArkUI_TouchRecogni * @param info Indicates the pointer to a gesture interrupt info. * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. -* @since 16 +* @since 15 */ int32_t OH_ArkUI_TouchRecognizer_CancelTouch(ArkUI_TouchRecognizerHandle recognizer, ArkUI_GestureInterruptInfo* info); -- Gitee From 07d4ec725f4eaca5a23646027641359b915062f5 Mon Sep 17 00:00:00 2001 From: xiangyuan Date: Wed, 19 Feb 2025 15:34:08 +0800 Subject: [PATCH 568/630] change keyboardAppearance api num Signed-off-by: xiangyuan --- arkui/ace_engine/native/native_node.h | 4 ++-- arkui/ace_engine/native/native_type.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a046c800c..b6a6517c4 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3092,7 +3092,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32:keyboard style,the parameter type is {@link ArkUI_KeyboardAppearanceType}。\n * - * @since 16 + * @since 15 */ NODE_TEXT_INPUT_KEYBOARD_APPEARANCE = 7035, @@ -3440,7 +3440,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32:keyboard style,the parameter type is {@link ArkUI_KeyboardAppearanceType}。\n * - * @since 16 + * @since 15 */ NODE_TEXT_AREA_KEYBOARD_APPEARANCE = 8026, diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 20cebacea..5e356abc5 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2019,27 +2019,27 @@ typedef enum { /** * @brief Defines the keyboard style of input box * - * @since 16 + * @since 15 */ typedef enum { /** * Default appearance mode, won't adopt immersive styles. - * @since 16 + * @since 15 */ ARKUI_KEYBOARD_APPEARANCE_NONE_IMMERSIVE = 0, /** * Immersive mode. - * @since 16 + * @since 15 */ ARKUI_KEYBOARD_APPEARANCE_IMMERSIVE = 1, /** * Light immersive style. - * @since 16 + * @since 15 */ ARKUI_KEYBOARD_APPEARANCE_LIGHT_IMMERSIVE = 2, /** * Dark immersive style. - * @since 16 + * @since 15 */ ARKUI_KEYBOARD_APPEARANCE_DARK_IMMERSIVE = 3, } ArkUI_KeyboardAppearance; -- Gitee From 54103e9bf6e3556b77804d04376a9849b2581f93 Mon Sep 17 00:00:00 2001 From: y00656910 Date: Wed, 19 Feb 2025 15:56:28 +0800 Subject: [PATCH 569/630] modify api level 16 to 15 Signed-off-by: y00656910 Change-Id: I8bd17dcc71529a2da8145218256b20e6d7b9611e --- .../image_framework/include/image/image_common.h | 10 +++++----- .../include/image/image_source_native.h | 4 ++-- multimedia/image_framework/libimage_source.ndk.json | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index d1513fd79..67d972adf 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -185,29 +185,29 @@ typedef enum { IMAGE_BAD_SOURCE = 7700101, /** * @error unsupported mime type - * @since 16 + * @since 15 */ IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE = 7700102, /** * @error image to large - * @since 16 + * @since 15 */ IMAGE_SOURCE_TOO_LARGE = 7700103, /** * @error unsupported allocator type, e.g., use share memory to decode a HDR image as only * DMA supported hdr metadata. - * @since 16 + * @since 15 */ IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE = 7700201, /* @error unsupported options, e.g, cannot convert image into desired pixel format. - * @since 16 + * @since 15 */ IMAGE_SOURCE_UNSUPPORTED_OPTIONS = 7700203, /** decode failed */ IMAGE_DECODE_FAILED = 7700301, /** * @error memory allocation failed - * @since 16 + * @since 15 */ IMAGE_SOURCE_ALLOC_FAILED = 7700302, /** encode failed */ diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 956d87490..73deea802 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -101,7 +101,7 @@ typedef enum { /** * @brief Type of allocator used to allocate memory of a PixelMap.. * - * @since 16 + * @since 15 */ typedef enum { /* @@ -403,7 +403,7 @@ Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source * e.g, cannot convert image into desired pixel format. * {@link IMAGE_DECODE_FAILED} decode failed. * {@link IMAGE_SOURCE_ALLOC_FAILED} memory allocation failed. - * @since 16 + * @since 15 */ Image_ErrorCode OH_ImageSourceNative_CreatePixelmapUsingAllocator(OH_ImageSourceNative *source, OH_DecodingOptions *options, IMAGE_ALLOCATOR_TYPE allocator, OH_PixelmapNative **pixelmap); diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json index fd5d4e30a..5facd5daa 100644 --- a/multimedia/image_framework/libimage_source.ndk.json +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -96,7 +96,7 @@ "name": "OH_ImageSourceNative_CreatePixelmap" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ImageSourceNative_CreatePixelmapUsingAllocator" }, { -- Gitee From f6f1681a8ddf09afb22beab1aa720e30f64e47be Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Wed, 19 Feb 2025 17:05:16 +0800 Subject: [PATCH 570/630] =?UTF-8?q?[L]=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E4=BA=8B=E4=BB=B6=E5=88=86=E5=8F=91=E5=92=8C=E8=B5=B0?= =?UTF-8?q?=E7=84=A6=20=E6=9B=B4=E6=94=B9version=20=E4=BF=AE=E6=94=B9Signe?= =?UTF-8?q?d-off-by:lisitaolisitao3@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index b4e429622..9b119827c 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6565,7 +6565,7 @@ typedef enum { * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is * {@link ArkUI_NodeComponentEvent}. \n * - * @since 16 + * @since 15 */ NODE_DISPATCH_KEY_EVENT = 24, -- Gitee From 8c15f2fcb3468c5cdb9b100949db1dd1fc39562b Mon Sep 17 00:00:00 2001 From: huangzhuozhen Date: Wed, 19 Feb 2025 21:49:22 +0800 Subject: [PATCH 571/630] input click attach add requestKeyboardReason param Signed-off-by: huangzhuozhen --- .../include/inputmethod_attach_options_capi.h | 25 +++++++++++++++++++ .../inputmethod_inputmethod_proxy_capi.h | 21 +++++++++++++++- inputmethod/include/inputmethod_types_capi.h | 24 ++++++++++++++++++ inputmethod/libohinputmethodndk.json | 12 +++++++++ 4 files changed, 81 insertions(+), 1 deletion(-) diff --git a/inputmethod/include/inputmethod_attach_options_capi.h b/inputmethod/include/inputmethod_attach_options_capi.h index 3a12eaba6..8fc8fafae 100644 --- a/inputmethod/include/inputmethod_attach_options_capi.h +++ b/inputmethod/include/inputmethod_attach_options_capi.h @@ -56,6 +56,17 @@ typedef struct InputMethod_AttachOptions InputMethod_AttachOptions; * @since 12 */ InputMethod_AttachOptions *OH_AttachOptions_Create(bool showKeyboard); +/** + * @brief Create a new {@link InputMethod_AttachOptions} instance. + * + * @param showKeyboard Represents whether to show the keyboard. + * @param requestKeyboardReason the reason for showKeyboard. + * @return If the creation succeeds, a pointer to the newly created {@link InputMethod_AttachOptions} + * instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory. + * @since 15 + */ +InputMethod_AttachOptions *OH_AttachOptions_CreateWithRequestKeyboardReason( + bool showKeyboard, InputMethod_RequestKeyboardReason requestKeyboardReason); /** * @brief Delete a {@link InputMethod_AttachOptions} instance. * @@ -77,6 +88,20 @@ void OH_AttachOptions_Destroy(InputMethod_AttachOptions *options); * @since 12 */ InputMethod_ErrorCode OH_AttachOptions_IsShowKeyboard(InputMethod_AttachOptions *options, bool *showKeyboard); +/** + * @brief Get showKeyboard value from {@link InputMethod_AttachOptions}. + * + * @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be get value from. + * @param requestKeyboardReason Represents a pointer to an {@link InputMethodRequestKeyboardReason} instance which will + * be get value from. + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. If options is NULL, or requestKeyboardReason is NULL. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 15 + */ +InputMethod_ErrorCode OH_AttachOptions_GetRequestKeyboardReason( + InputMethod_AttachOptions *options, int *requestKeyboardReason); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h index f8257c2b6..7e13515ed 100644 --- a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h +++ b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h @@ -37,6 +37,7 @@ #include #include "inputmethod_types_capi.h" +#include "inputmethod_attach_options_capi.h" #include "inputmethod_cursor_info_capi.h" #include "inputmethod_private_command_capi.h" #ifdef __cplusplus @@ -66,7 +67,25 @@ typedef struct InputMethod_InputMethodProxy InputMethod_InputMethodProxy; * @since 12 */ InputMethod_ErrorCode OH_InputMethodProxy_ShowKeyboard(InputMethod_InputMethodProxy *inputMethodProxy); - +/** + * @brief ShowTextInput. + * + * @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance. + * The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}. + * @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be get value from. + * {@link ShowKeyboard} - property is always true,can not be changed,so no need to focus on + * {@link InputMethod_RequestKeyboardReason} - property is the requestKeyboardReason for show keyboard + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_IMCLIENT} - input method client error. + * {@link IME_ERR_IMMS} - input method manager service error. + * {@link IME_ERR_DETACHED} - input method client detached. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. If inputMethodProxy is NULL, or options is NULL. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 15 + */ +InputMethod_ErrorCode OH_InputMethodProxy_ShowTextInput( + InputMethod_InputMethodProxy *inputMethodProxy, InputMethod_AttachOptions *options); /** * @brief Hide keyboard. * diff --git a/inputmethod/include/inputmethod_types_capi.h b/inputmethod/include/inputmethod_types_capi.h index 0fc88c455..b3848f15f 100644 --- a/inputmethod/include/inputmethod_types_capi.h +++ b/inputmethod/include/inputmethod_types_capi.h @@ -301,6 +301,30 @@ typedef enum InputMethod_ErrorCode { */ IME_ERR_QUERY_FAILED = 12802001, } InputMethod_ErrorCode; + +/** + * @brief The value type of request keyboard. + * + * @since 15 + */ +typedef enum InputMethod_RequestKeyboardReason { + /** + * The request keyboard reason is NONE. + */ + IME_REQUEST_REASON_NONE = 0, + /** + * The request keyboard reason is MOUSE. + */ + IME_REQUEST_REASON_MOUSE = 1, + /** + * The request keyboard reason is TOUCH. + */ + IME_REQUEST_REASON_TOUCH = 2, + /** + * The request keyboard reason is OTHER. + */ + IME_REQUEST_REASON_OTHER = 20 +} InputMethod_RequestKeyboardReason; #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/inputmethod/libohinputmethodndk.json b/inputmethod/libohinputmethodndk.json index 0c026b2e6..b90b67567 100644 --- a/inputmethod/libohinputmethodndk.json +++ b/inputmethod/libohinputmethodndk.json @@ -310,5 +310,17 @@ { "first_introduced": "12", "name": "OH_PrivateCommand_GetStrValue" + }, + { + "first_introduced": "15", + "name": "OH_InputMethodProxy_ShowTextInput" + }, + { + "first_introduced": "15", + "name": "OH_AttachOptions_CreateWithRequestKeyboardReason" + }, + { + "first_introduced": "15", + "name": "OH_AttachOptions_GetRequestKeyboardReason" } ] \ No newline at end of file -- Gitee From 50d4539694860dd5bd94a59adc701c8f2e7b15b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=BC=E6=AD=A4=E5=BD=BC=E6=AD=A4?= Date: Thu, 20 Feb 2025 09:15:00 +0800 Subject: [PATCH 572/630] updata the NDK's name of demuxer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彼此彼此 --- multimedia/av_codec/native_avsource.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index 338e026a7..06796c191 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -139,10 +139,10 @@ OH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackIndex /** * @brief Get the format info of custom metadata. - * + * * It should be noted that the life cycle of the OH_AVFormat instance pointed to by the return value * needs * to be manually released by the caller. - * + * * @syscap SystemCapability.Multimedia.Media.Spliter * @param source Pointer to an OH_AVSource instance. * @return Returns the metadata's format info if the execution is successful, otherwise returns nullptr. -- Gitee From 2342e587f1b9f81535a2eee7a22e36ab6575fb14 Mon Sep 17 00:00:00 2001 From: mazijian Date: Thu, 20 Feb 2025 15:30:31 +0800 Subject: [PATCH 573/630] =?UTF-8?q?CAPI=E7=9B=B8=E5=85=B3=E9=9C=80?= =?UTF-8?q?=E6=B1=8216=E5=9B=9E=E5=90=8815=E5=BC=95=E5=85=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E6=B8=85=E9=99=A4=E5=A4=84=E7=90=86=EF=BC=88?= =?UTF-8?q?CAPI=20SDK=E9=83=A8=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mazijian Change-Id: Ie326faaee45696a772bb390e410b7534c79dbab0 --- arkui/ace_engine/native/native_node.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 1e31160c5..3c78c19ae 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -8927,9 +8927,8 @@ int32_t OH_ArkUI_NodeUtils_GetNodeType(ArkUI_NodeHandle node); * @return Error code. * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} C-API initialization error. * {@link ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE} The node is not mounted. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetWindowInfo(ArkUI_NodeHandle node, ArkUI_HostWindowInfo** info); @@ -8941,7 +8940,6 @@ int32_t OH_ArkUI_NodeUtils_GetWindowInfo(ArkUI_NodeHandle node, ArkUI_HostWindow * @return Error code. * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index); @@ -8954,7 +8952,6 @@ int32_t OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand(ArkUI_NodeHandle node * @return Error code. * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index); @@ -8969,7 +8966,6 @@ int32_t OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand(ArkUI_NodeHandle node, * @return Error code. * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetChildWithExpandMode(ArkUI_NodeHandle node, int32_t position, @@ -9073,8 +9069,7 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontSty * @return Error code. * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * @since 16 + * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node); @@ -9086,8 +9081,9 @@ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeH * @param index Indicates the index which the node is moved to. If the value is a nagative number of invalid, the * node is moved to the end of the target parent node. * @return Error code. - * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * @since 16 */ int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target_parent, int32_t index); @@ -9100,7 +9096,6 @@ int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target * @return Error code. * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * @since 15 */ int32_t OH_ArkUI_NodeUtils_SetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option); @@ -9113,7 +9108,6 @@ int32_t OH_ArkUI_NodeUtils_SetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_C * @return Error code. * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * @since 15 */ int32_t OH_ArkUI_NodeUtils_GetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option); -- Gitee From 0cfebb2384ffc9c4324b77aa7b6d590f935ef6d6 Mon Sep 17 00:00:00 2001 From: liyi0309 Date: Tue, 18 Feb 2025 15:24:05 +0800 Subject: [PATCH 574/630] =?UTF-8?q?dialog=20=E9=A1=B5=E9=9D=A2=E7=BA=A7?= =?UTF-8?q?=E8=83=BD=E5=8A=9BC-API=20=E7=89=88=E6=9C=AC=E8=B0=83=E6=95=B4?= =?UTF-8?q?=20Signed-off-by:=20liyi0309?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/native_dialog.h | 32 ++++++++++--------------- arkui/ace_engine/native/native_type.h | 4 ++-- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 159d65422..72d1e3ba0 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -63,7 +63,7 @@ typedef enum { /** * @brief Enumerates the level mode. * -* @since 16 +* @since 15 */ typedef enum { /** overlay mode. */ @@ -75,7 +75,7 @@ typedef enum { /** * @brief Enumerates the immersive mode. * -* @since 16 +* @since 15 */ typedef enum { /** Mask covering the parent node area. */ @@ -313,9 +313,14 @@ typedef struct { * @brief Provides the custom dialog box APIs for the native side. * * @version 2 - * @since 16 + * @since 15 */ typedef struct { + /** + * @brief Provides the custom dialog box APIs for the native side. The API scope is {@link ArkUI_NativeDialogAPI_1} + * + * @since 15 + */ ArkUI_NativeDialogAPI_1 nativeDialogAPI1; /** * @brief Defines the distance between the customDialog and system keyboard. @@ -328,7 +333,7 @@ typedef struct { * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 16 + * @since 15 */ int32_t (*setKeyboardAvoidDistance)(ArkUI_NativeDialogHandle handle, float distance, ArkUI_LengthMetricUnit unit); @@ -341,7 +346,7 @@ typedef struct { * @return Returns the error 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. - * @since 16 + * @since 15 */ int32_t (*setLevelMode)(ArkUI_NativeDialogHandle handle, ArkUI_LevelMode levelMode); @@ -354,7 +359,7 @@ typedef struct { * @return Returns the error 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. - * @since 16 + * @since 15 */ int32_t (*setLevelUniqueId)(ArkUI_NativeDialogHandle handle, int32_t uniqueId); @@ -367,22 +372,9 @@ typedef struct { * @return Returns the error 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. - * @since 16 + * @since 15 */ int32_t (*setImmersiveMode)(ArkUI_NativeDialogHandle handle, ArkUI_ImmersiveMode immersiveMode); - - /** - * @brief Sets the display order for a custom dialog box. - * - * @note This method must be called before the show method. - * @param handle Indicates the pointer to the custom dialog box controller. - * @param levelOrder Indicates the display order. The valid range is [-100000.0, 100000.0]. - * @return Returns the error 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. - * @since 16 - */ - int32_t (*setLevelOrder)(ArkUI_NativeDialogHandle handle, double levelOrder); } ArkUI_NativeDialogAPI_2; /** diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index e281d22ac..bdf9cd4d8 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2516,7 +2516,7 @@ typedef enum { /** * @brief defines the enumerated value of the customDialog's keyboard avoid mode. * - * @since 16 + * @since 15 */ typedef enum { /** Defines avoid keyboard when keyboard shows. */ @@ -2528,7 +2528,7 @@ typedef enum { /** * @brief defines the enumerated value of area in hover mode. * - * @since 16 + * @since 15 */ typedef enum { /** Layout top half screen when the phone in hover mode. */ -- Gitee From 582003f16e43103390185b4db28f6e5cd8b74532 Mon Sep 17 00:00:00 2001 From: htt1997 Date: Thu, 20 Feb 2025 20:38:10 +0800 Subject: [PATCH 575/630] fix Signed-off-by: htt1997 --- distributeddatamgr/relational_store/BUILD.gn | 2 ++ .../relational_store/include/oh_rdb_transaction.h | 1 + distributeddatamgr/relational_store/include/relational_store.h | 1 + .../relational_store/include/relational_store_error_code.h | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/distributeddatamgr/relational_store/BUILD.gn b/distributeddatamgr/relational_store/BUILD.gn index 203e78f46..2e11e328a 100644 --- a/distributeddatamgr/relational_store/BUILD.gn +++ b/distributeddatamgr/relational_store/BUILD.gn @@ -21,6 +21,7 @@ ohos_ndk_headers("native_rdb_ndk_header") { "./include/oh_cursor.h", "./include/oh_predicates.h", "./include/oh_rdb_transaction.h", + "./include/oh_rdb_types.h", "./include/oh_value_object.h", "./include/oh_values_bucket.h", "./include/relational_store.h", @@ -52,6 +53,7 @@ ohos_ndk_library("libnative_rdb_ndk") { "$ndk_headers_out_dir/database/rdb/oh_cursor.h", "$ndk_headers_out_dir/database/rdb/oh_predicates.h", "$ndk_headers_out_dir/database/rdb/oh_rdb_transaction.h", + "$ndk_headers_out_dir/database/rdb/oh_rdb_types.h", "$ndk_headers_out_dir/database/rdb/oh_value_object.h", "$ndk_headers_out_dir/database/rdb/oh_values_bucket.h", "$ndk_headers_out_dir/database/rdb/relational_store.h", diff --git a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h index 636e78e17..50dacd501 100644 --- a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h +++ b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h @@ -43,6 +43,7 @@ #include "database/rdb/oh_cursor.h" #include "database/rdb/oh_predicates.h" #include "database/rdb/oh_values_bucket.h" +#include "database/rdb/oh_rdb_types.h" #include "database/data/oh_data_values.h" #include "database/data/oh_data_values_buckets.h" diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 71b692cc6..a6de7b086 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -44,6 +44,7 @@ #include "database/rdb/oh_value_object.h" #include "database/rdb/oh_values_bucket.h" #include "database/rdb/oh_rdb_transaction.h" +#include "database/rdb/oh_rdb_types.h" #ifdef __cplusplus extern "C" { diff --git a/distributeddatamgr/relational_store/include/relational_store_error_code.h b/distributeddatamgr/relational_store/include/relational_store_error_code.h index 64ec5db2a..f7e0b7988 100644 --- a/distributeddatamgr/relational_store/include/relational_store_error_code.h +++ b/distributeddatamgr/relational_store/include/relational_store_error_code.h @@ -415,7 +415,7 @@ typedef enum OH_Rdb_ErrCode { RDB_E_TYPE_MISMATCH = (E_BASE + 64), /** - * @brief Data value type is null. + * @brief Data violates constraints. * * @since 16 */ -- Gitee From f6ca30953992b9bf90210c7bd86810323a9731bd Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 21 Feb 2025 03:32:22 +0000 Subject: [PATCH 576/630] =?UTF-8?q?=E4=B8=BB=E5=B9=B2=E5=88=86=E6=94=AF?= =?UTF-8?q?=E8=93=9D=E9=BB=84=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: eric --- multimedia/camera_framework/camera.ndk.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index 8a7da519a..8543be577 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -593,12 +593,12 @@ }, { "first_introduced": "15", - "name": "OH_VideoOutput_IsMirrorSupported" + "name": "OH_VideoOutput_EnableMirror" }, { "first_introduced": "15", - "name": "OH_VideoOutput_EnableMirror" - }, + "name": "OH_VideoOutput_IsMirrorSupported" + }, { "first_introduced": "12", "name": "OH_VideoOutput_GetVideoRotation" -- Gitee From 61179c4012cc2f02bfabf5c3a7f1acf5a73aaf61 Mon Sep 17 00:00:00 2001 From: htt1997 Date: Fri, 21 Feb 2025 11:33:18 +0800 Subject: [PATCH 577/630] fix rename Signed-off-by: htt1997 --- .../relational_store/include/oh_rdb_transaction.h | 2 +- distributeddatamgr/relational_store/include/oh_rdb_types.h | 4 ++-- .../relational_store/include/relational_store.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h index 50dacd501..fef729867 100644 --- a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h +++ b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h @@ -221,7 +221,7 @@ int OH_RdbTrans_Insert(OH_Rdb_Transaction *trans, const char *table, const OH_VB * @since 16 */ int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const OH_Data_VBuckets *rows, - Rdb_Conflict_Resolution resolution, int64_t *changes); + Rdb_ConflictResolution resolution, int64_t *changes); /** * @brief Updates data in the database based on specified conditions. diff --git a/distributeddatamgr/relational_store/include/oh_rdb_types.h b/distributeddatamgr/relational_store/include/oh_rdb_types.h index 0be2c259b..5080ae645 100644 --- a/distributeddatamgr/relational_store/include/oh_rdb_types.h +++ b/distributeddatamgr/relational_store/include/oh_rdb_types.h @@ -49,7 +49,7 @@ extern "C" { * * @since 16 */ -typedef enum Rdb_Conflict_Resolution { +typedef enum Rdb_ConflictResolution { /** * @brief Implements no operation when conflict occurs. */ @@ -74,7 +74,7 @@ typedef enum Rdb_Conflict_Resolution { * @brief Implements replace operation when conflict occurs. */ RDB_CONFLICT_REPLACE, -} Rdb_Conflict_Resolution; +} Rdb_ConflictResolution; #ifdef __cplusplus }; diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index a6de7b086..1974af547 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -516,7 +516,7 @@ int OH_Rdb_Insert(OH_Rdb_Store *store, const char *table, OH_VBucket *valuesBuck * @since 16 */ int OH_Rdb_BatchInsert(OH_Rdb_Store *store, const char *table, - const OH_Data_VBuckets *rows, Rdb_Conflict_Resolution resolution, int64_t *changes); + const OH_Data_VBuckets *rows, Rdb_ConflictResolution resolution, int64_t *changes); /** * @brief Updates data in the database based on specified conditions. -- Gitee From d3981f0ebd4c1cedb165ef2fa84f335ac40f1532 Mon Sep 17 00:00:00 2001 From: xiongjun_gitee11 Date: Fri, 21 Feb 2025 14:15:38 +0800 Subject: [PATCH 578/630] add OH_ArkWeb_RegisterScrollCallback Signed-off-by: xiongjun_gitee11 --- web/webview/interfaces/native/libohweb.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/webview/interfaces/native/libohweb.ndk.json b/web/webview/interfaces/native/libohweb.ndk.json index 102b67fc7..4cb145d27 100644 --- a/web/webview/interfaces/native/libohweb.ndk.json +++ b/web/webview/interfaces/native/libohweb.ndk.json @@ -318,5 +318,9 @@ { "first_introduced": "15", "name": "OH_NativeArkWeb_LoadData" + }, + { + "first_introduced": "16", + "name": "OH_ArkWeb_RegisterScrollCallback" } ] -- Gitee From 0b4eddca86c0f78290e14d3b6e7ea3e76db9820b Mon Sep 17 00:00:00 2001 From: zhanghang Date: Tue, 18 Feb 2025 20:27:56 +0800 Subject: [PATCH 579/630] =?UTF-8?q?=E6=B7=BB=E5=8A=A0swiper=E7=9A=84space?= =?UTF-8?q?=E3=80=81ignoreSize=20CAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang --- arkui/ace_engine/native/libace.ndk.json | 24 +++++++++++ arkui/ace_engine/native/native_type.h | 56 +++++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index f9d42b883..ca901f163 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1155,6 +1155,22 @@ "first_introduced": "12", "name": "OH_ArkUI_SwiperIndicator_GetMaxDisplayCount" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperIndicator_SetSpace" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperIndicator_GetSpace" + }, { "first_introduced": "16", "name": "OH_ArkUI_SwiperDigitIndicator_Create" @@ -1243,6 +1259,14 @@ "first_introduced": "16", "name": "OH_ArkUI_SwiperDigitIndicator_Destroy" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom" + }, { "first_introduced": "16", "name": "OH_ArkUI_SwiperArrowStyle_Create" diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 99aae3481..ae8e164e9 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -3137,6 +3137,43 @@ int32_t OH_ArkUI_SwiperIndicator_SetMaxDisplayCount(ArkUI_SwiperIndicator* indic */ int32_t OH_ArkUI_SwiperIndicator_GetMaxDisplayCount(ArkUI_SwiperIndicator* indicator); +/** + * @brief Sets whether to ignore the size of the indicator for {@link OH_ArkUI_SwiperIndicator_SetBottomPosition}. + * + * @param indicator Indicates the pointer to the indicator. + * @param ignoreSize Whether to ignore the size of the indicator. The value 1 means to ignore, and 0 means the opposite. + * The default value is 0. + * @since 16 +*/ +void OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator, int32_t ignoreSize); + +/** + * @brief Obtains whether to ignore the size of the indicator for {@link OH_ArkUI_SwiperIndicator_SetBottomPosition}. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns whether to ignore the size of the indicator. + * @since 16 +*/ +int32_t OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the space between the dots of the navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param space the space between the dots of the navigation indicator, the default value is 8vp. + * @since 16 +*/ +void OH_ArkUI_SwiperIndicator_SetSpace(ArkUI_SwiperIndicator* indicator, float space); + +/** + * @brief Obtains the space between the dots of the navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return the space between the dots of the navigation indicator + * @since 16 +*/ +float OH_ArkUI_SwiperIndicator_GetSpace(ArkUI_SwiperIndicator* indicator); + /** * @brief Creates a digital indicator. * @@ -3334,6 +3371,25 @@ ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight(ArkUI_Swipe */ void OH_ArkUI_SwiperDigitIndicator_Destroy(ArkUI_SwiperDigitIndicator *indicator); +/** + * @brief Sets whether to ignore the size of the indicator for {@link OH_ArkUI_SwiperDigitIndicator_SetBottomPosition}. + * + * @param indicator The pointer to the digital indicator. + * @param ignoreSize Whether to ignore the size of the indicator. The value 1 means to ignore, and 0 means the opposite. + * The default value is 0. + * @since 16 +*/ +void OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator, int32_t ignoreSize); + +/** + * @brief Obtains whether to ignore the size of the indicator for {@link OH_ArkUI_SwiperDigitIndicator_SetBottomPosition}. + * + * @param indicator The pointer to the digital indicator. + * @return Returns whether to ignore the size of the indicator. + * @since 16 +*/ +int32_t OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator); + /** * @brief Creates a arrow style for swiper. * -- Gitee From 1e57302904d236cefad180885f4cb27f17275d72 Mon Sep 17 00:00:00 2001 From: eager1 Date: Fri, 7 Feb 2025 16:54:38 +0800 Subject: [PATCH 580/630] api level 16-->15 Signed-off-by: eager1 Change-Id: I8b275a76a488c8a1d506047e293d056272f9d4f6 --- arkui/ace_engine/native/libace.ndk.json | 8 ++++---- arkui/ace_engine/native/native_type.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 2bf61a28a..bf77b63b2 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1500,7 +1500,7 @@ "name": "OH_ArkUI_NodeUtils_GetNodeType" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetWindowInfo" }, { @@ -1524,7 +1524,7 @@ "name": "OH_ArkUI_ActiveChildrenInfo_GetCount" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetAttachedNodeHandleById" }, { @@ -2820,11 +2820,11 @@ "name": "OH_ArkUI_PostFrameCallback" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_HostWindowInfo_GetName" }, { - "first_introduced": "16", + "first_introduced": "15", "name": "OH_ArkUI_HostWindowInfo_Destroy" }, { diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 55c439b83..2baa1e0df 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -217,7 +217,7 @@ typedef struct ArkUI_CustomProperty ArkUI_CustomProperty; /** * @brief Define the information of the HostWindowInfo class for window properties. * - * @since 16 + * @since 15 */ typedef struct ArkUI_HostWindowInfo ArkUI_HostWindowInfo; @@ -2159,7 +2159,7 @@ typedef enum { ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR = 106202, /** * @error The node is not on main tree. - * @since 16 + * @since 15 */ ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE = 106203, /** @@ -4679,7 +4679,7 @@ const char* OH_ArkUI_CustomProperty_GetStringValue(ArkUI_CustomProperty* handle) * * @param info HostWindowInfo object pointer. * @return Window name in HostWindowInfo. - * @since 16 + * @since 15 */ const char* OH_ArkUI_HostWindowInfo_GetName(ArkUI_HostWindowInfo* info); @@ -4687,7 +4687,7 @@ const char* OH_ArkUI_HostWindowInfo_GetName(ArkUI_HostWindowInfo* info); * @brief Destroy the instance of HostWindowInfo. * * @param info Instance of HostWindowInfo to be destroyed. - * @since 16 + * @since 15 */ void OH_ArkUI_HostWindowInfo_Destroy(ArkUI_HostWindowInfo* info); -- Gitee From 459950c8cbf419b419e6f751b134ae841e934fb2 Mon Sep 17 00:00:00 2001 From: huangweichen Date: Sat, 22 Feb 2025 11:22:22 +0800 Subject: [PATCH 581/630] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=96=87=E4=BB=B6kit?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangweichen --- arkui/ace_engine/native/native_interface_focus.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arkui/ace_engine/native/native_interface_focus.h b/arkui/ace_engine/native/native_interface_focus.h index 27cdc7349..c5878c63f 100644 --- a/arkui/ace_engine/native/native_interface_focus.h +++ b/arkui/ace_engine/native/native_interface_focus.h @@ -29,6 +29,7 @@ * * @library libace_ndk.z.so * @syscap SystemCapability.ArkUI.ArkUI.Full + * @kit ArkUI * @since 15 */ -- Gitee From 7151ad21b384c787f875dc9cb9d1259ec1c9c88d Mon Sep 17 00:00:00 2001 From: ht Date: Sat, 22 Feb 2025 06:13:27 +0000 Subject: [PATCH 582/630] update Signed-off-by: ht --- .../relational_store/include/relational_store_error_code.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distributeddatamgr/relational_store/include/relational_store_error_code.h b/distributeddatamgr/relational_store/include/relational_store_error_code.h index f7e0b7988..64ec5db2a 100644 --- a/distributeddatamgr/relational_store/include/relational_store_error_code.h +++ b/distributeddatamgr/relational_store/include/relational_store_error_code.h @@ -415,7 +415,7 @@ typedef enum OH_Rdb_ErrCode { RDB_E_TYPE_MISMATCH = (E_BASE + 64), /** - * @brief Data violates constraints. + * @brief Data value type is null. * * @since 16 */ -- Gitee From 92bac896e5d66d4d445af0eee20b9f12b01d12a0 Mon Sep 17 00:00:00 2001 From: htt1997 Date: Sat, 22 Feb 2025 15:10:39 +0800 Subject: [PATCH 583/630] code check Signed-off-by: htt1997 --- distributeddatamgr/relational_store/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distributeddatamgr/relational_store/BUILD.gn b/distributeddatamgr/relational_store/BUILD.gn index 2e11e328a..560c94d4d 100644 --- a/distributeddatamgr/relational_store/BUILD.gn +++ b/distributeddatamgr/relational_store/BUILD.gn @@ -59,4 +59,4 @@ ohos_ndk_library("libnative_rdb_ndk") { "$ndk_headers_out_dir/database/rdb/relational_store.h", "$ndk_headers_out_dir/database/rdb/relational_store_error_code.h", ] -} \ No newline at end of file +} -- Gitee From aee130812425e3ffd8697a6cd64cc2f3044cf0ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 07:52:27 +0000 Subject: [PATCH 584/630] =?UTF-8?q?ndk=E9=94=99=E8=AF=AF=E7=A0=81=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/media_foundation/native_averrors.h | 5 +++++ multimedia/player_framework/avimage_generator.h | 5 ++++- multimedia/player_framework/avmetadata_extractor.h | 7 ++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index 80cf8d292..98bb4fabb 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -94,6 +94,11 @@ typedef enum OH_AVErrCode { * @since 12 */ AV_ERR_INPUT_DATA_ERROR = 10, + /** + * @error unsupported format. + * @since 16 + */ + AV_ERR_UNSUPPORT_FORMAT = 11, /** * @error extend err start. */ diff --git a/multimedia/player_framework/avimage_generator.h b/multimedia/player_framework/avimage_generator.h index 0ae5a5b28..c008d3ca3 100644 --- a/multimedia/player_framework/avimage_generator.h +++ b/multimedia/player_framework/avimage_generator.h @@ -78,6 +78,8 @@ OH_AVImageGenerator* OH_AVImageGenerator_Create(void); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. + * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, @@ -98,6 +100,8 @@ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. + * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator, @@ -111,7 +115,6 @@ OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. - * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_Release(OH_AVImageGenerator* generator); diff --git a/multimedia/player_framework/avmetadata_extractor.h b/multimedia/player_framework/avmetadata_extractor.h index b6d5bba33..cb27b00ee 100644 --- a/multimedia/player_framework/avmetadata_extractor.h +++ b/multimedia/player_framework/avmetadata_extractor.h @@ -80,6 +80,8 @@ OH_AVMetadataExtractor* OH_AVMetadataExtractor_Create(void); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extractor, @@ -96,6 +98,8 @@ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extracto * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. + * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extractor, OH_AVFormat* avMetadata); @@ -111,6 +115,8 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extrac * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. + * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. + * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extractor, OH_PixelmapNative** pixelMap); @@ -123,7 +129,6 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extr * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. - * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_Release(OH_AVMetadataExtractor* extractor); -- Gitee From bc32e7195f536aee8902368fb70061f3419bb7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 08:00:53 +0000 Subject: [PATCH 585/630] update multimedia/player_framework/avimage_generator.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avimage_generator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/avimage_generator.h b/multimedia/player_framework/avimage_generator.h index c008d3ca3..ac57809ff 100644 --- a/multimedia/player_framework/avimage_generator.h +++ b/multimedia/player_framework/avimage_generator.h @@ -79,7 +79,7 @@ OH_AVImageGenerator* OH_AVImageGenerator_Create(void); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. - * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, @@ -101,7 +101,7 @@ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. - * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator, -- Gitee From 11ff41524b152fc489649f8de01a27b23f2c0502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 08:03:40 +0000 Subject: [PATCH 586/630] update multimedia/player_framework/avmetadata_extractor.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avmetadata_extractor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/player_framework/avmetadata_extractor.h b/multimedia/player_framework/avmetadata_extractor.h index cb27b00ee..13c563122 100644 --- a/multimedia/player_framework/avmetadata_extractor.h +++ b/multimedia/player_framework/avmetadata_extractor.h @@ -81,7 +81,7 @@ OH_AVMetadataExtractor* OH_AVMetadataExtractor_Create(void); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. - * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extractor, @@ -99,7 +99,7 @@ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extracto * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. - * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extractor, OH_AVFormat* avMetadata); @@ -116,7 +116,7 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extrac * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. - * {@link AV_ERR_NO_MEMORY}, denotes a failure in internal memory allocation. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extractor, OH_PixelmapNative** pixelMap); -- Gitee From ee4a4bc51ab8bfd49f7416a794ac8d2f82035a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 08:14:16 +0000 Subject: [PATCH 587/630] update multimedia/player_framework/avmetadata_extractor.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avmetadata_extractor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/player_framework/avmetadata_extractor.h b/multimedia/player_framework/avmetadata_extractor.h index 13c563122..243f5e129 100644 --- a/multimedia/player_framework/avmetadata_extractor.h +++ b/multimedia/player_framework/avmetadata_extractor.h @@ -81,7 +81,7 @@ OH_AVMetadataExtractor* OH_AVMetadataExtractor_Create(void); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. - * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extractor, @@ -99,7 +99,7 @@ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extracto * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. - * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extractor, OH_AVFormat* avMetadata); @@ -116,7 +116,7 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extrac * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. - * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extractor, OH_PixelmapNative** pixelMap); -- Gitee From df728ff1b06a36c354c2c4881d361ebc4388dffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 08:14:59 +0000 Subject: [PATCH 588/630] update multimedia/player_framework/avimage_generator.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avimage_generator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/avimage_generator.h b/multimedia/player_framework/avimage_generator.h index ac57809ff..680c35af2 100644 --- a/multimedia/player_framework/avimage_generator.h +++ b/multimedia/player_framework/avimage_generator.h @@ -79,7 +79,7 @@ OH_AVImageGenerator* OH_AVImageGenerator_Create(void); * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. - * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, @@ -101,7 +101,7 @@ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. - * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. + * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator, -- Gitee From ac61696f6239bece63db5a5d109aba153f8593e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 09:20:31 +0000 Subject: [PATCH 589/630] update multimedia/media_foundation/native_averrors.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/media_foundation/native_averrors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index 98bb4fabb..2fedd0834 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -98,7 +98,7 @@ typedef enum OH_AVErrCode { * @error unsupported format. * @since 16 */ - AV_ERR_UNSUPPORT_FORMAT = 11, + AV_ERR_UNSUPPORTED_FORMAT = 11, /** * @error extend err start. */ -- Gitee From a52845233015de8d11905985fa8750555ba965c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 09:22:16 +0000 Subject: [PATCH 590/630] update multimedia/player_framework/avimage_generator.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avimage_generator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/avimage_generator.h b/multimedia/player_framework/avimage_generator.h index 680c35af2..1cbf46bcf 100644 --- a/multimedia/player_framework/avimage_generator.h +++ b/multimedia/player_framework/avimage_generator.h @@ -100,7 +100,7 @@ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. - * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. + * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ -- Gitee From 645e4610a8ff10731d2351f3772e777e680d88e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Sat, 22 Feb 2025 09:23:18 +0000 Subject: [PATCH 591/630] update multimedia/player_framework/avmetadata_extractor.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avmetadata_extractor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/avmetadata_extractor.h b/multimedia/player_framework/avmetadata_extractor.h index 243f5e129..38f70846c 100644 --- a/multimedia/player_framework/avmetadata_extractor.h +++ b/multimedia/player_framework/avmetadata_extractor.h @@ -98,7 +98,7 @@ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extracto * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. - * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. + * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ @@ -115,7 +115,7 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extrac * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. - * {@link AV_ERR_UNSUPPORT_FORMAT} if format is unsupported. + * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 */ -- Gitee From 1b44893f33908c986acb59afcfcf481a183391b8 Mon Sep 17 00:00:00 2001 From: yangbiao199318 Date: Sat, 22 Feb 2025 18:41:56 +0800 Subject: [PATCH 592/630] =?UTF-8?q?Dialog=E7=94=9F=E5=91=BD=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E8=A1=A5=E9=BD=90CAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangbiao199318 --- arkui/ace_engine/native/native_dialog.h | 89 +++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 72d1e3ba0..f609945e5 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -377,6 +377,95 @@ typedef struct { int32_t (*setImmersiveMode)(ArkUI_NativeDialogHandle handle, ArkUI_ImmersiveMode immersiveMode); } ArkUI_NativeDialogAPI_2; +/** + * @brief Provides the custom dialog box APIs for the native side. + * + * @version 3 + * @since 16 + */ +typedef struct { + /** + * @brief Provides the custom dialog box APIs for the native side. The API scope is {@link ArkUI_NativeDialogAPI_1} + * + * @since 16 + */ + ArkUI_NativeDialogAPI_1 nativeDialogAPI1; + /** + * @brief Provides the custom dialog box APIs for the native side. The API scope is {@link ArkUI_NativeDialogAPI_2} + * + * @since 16 + */ + ArkUI_NativeDialogAPI_2 nativeDialogAPI2; + /** + * @brief Sets the display order for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param levelOrder Indicates the display order. The valid range is [-100000.0, 100000.0]. + * @return Returns the error 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. + * @since 16 + */ + int32_t (*setLevelOrder)(ArkUI_NativeDialogHandle handle, double levelOrder); + /** + * @brief Registers a listener callback before the dialog openAnimation starts. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback before the dialog openAnimation starts. + * @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. + * @since 16 + */ + + int32_t (*registerOnWillAppear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Registers a listener callback when the dialog appears. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback when the dialog appears. + * @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. + * @since 16 + */ + int32_t (*registerOnDidAppear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Registers a listener callback before the dialog closeAnimation starts. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback before the dialog closeAnimation starts. + * @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. + * @since 16 + */ + int32_t (*registerOnWillDisappear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Registers a listener callback when the dialog disappears. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the callback when the dialog disappears. + * @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. + * @since 16 + */ + int32_t (*registerOnDidDisappear)( + ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); +} ArkUI_NativeDialogAPI_3; + /** * @brief Sets whether to block the system behavior of dismissing a dialog box. * -- Gitee From e0740e87e42f36b59d6bcf7c0527dcb9575a1ec7 Mon Sep 17 00:00:00 2001 From: HannibalQSP Date: Mon, 24 Feb 2025 10:30:27 +0800 Subject: [PATCH 593/630] add amr Signed-off-by: HannibalQSP --- multimedia/player_framework/avrecorder_base.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index 66097c26e..f0bbfa143 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -103,6 +103,10 @@ typedef enum OH_AVRecorder_CodecMimeType { AVRECORDER_VIDEO_MPEG4 = 6, /* H.265 codec MIME type. */ AVRECORDER_VIDEO_HEVC = 8, + /* AMR-NB codec MIME type. */ + AVRECORDER_AUDIO_AMR_NB = 9, + /* AMR-WB codec MIME type. */ + AVRECORDER_AUDIO_AMR_WB = 10, } OH_AVRecorder_CodecMimeType; /** @@ -115,6 +119,8 @@ typedef enum OH_AVRecorder_ContainerFormatType { AVRECORDER_CFT_MPEG_4 = 2, /* An audio container format type m4a. */ AVRECORDER_CFT_MPEG_4A = 6, + /* An audio container format type amr. */ + AVRECORDER_CFT_AMR = 8, /* An audio container format type mp3. */ AVRECORDER_CFT_MP3 = 9, /* An audio container format type wav. */ -- Gitee From 5b7d190b11a426b572dcd9f03ecd5143975ee57a Mon Sep 17 00:00:00 2001 From: sunqi Date: Mon, 24 Feb 2025 07:18:42 +0000 Subject: [PATCH 594/630] =?UTF-8?q?NODE=5FWATER=5FFLOW=5FCACHED=5FCOUNT?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunqi --- arkui/ace_engine/native/native_node.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e9575fdd0..85a18bde2 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5212,7 +5212,6 @@ typedef enum { * .value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is * {@link ArkUI_ScrollAlignment}, default value is ARKUI_SCROLL_ALIGNMENT_START. \n * .value[3]?.f32: extra offset, in vp. The default value is 0. - * This parameter is supported since API version 15. \n * */ NODE_LIST_SCROLL_TO_INDEX, @@ -6038,7 +6037,14 @@ typedef enum { * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].i32: number of cached items in the water flowadapter. \n + * value[0].i32:number of cached items in the water flow adapter. \n + * .value[1]?.i32:whether to the cached items will be displayed, 0: not displayed, 1: displayed, default value: 0. + * This parameter is supported since API version 16. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: number of cached items in the water flow adapter. \n + * .value[1].i32: whether to the cached items will be displayed, 0: not displayed, 1: displayed, default value: 0. + * This parameter is supported since API version 16. \n */ NODE_WATER_FLOW_CACHED_COUNT, -- Gitee From b726fc4a9cf2c9cb7a5ca0c27dc37f1fbcab5918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Mon, 24 Feb 2025 08:34:38 +0000 Subject: [PATCH 595/630] update multimedia/player_framework/avimage_generator.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avimage_generator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/player_framework/avimage_generator.h b/multimedia/player_framework/avimage_generator.h index 1cbf46bcf..261202db7 100644 --- a/multimedia/player_framework/avimage_generator.h +++ b/multimedia/player_framework/avimage_generator.h @@ -77,7 +77,7 @@ OH_AVImageGenerator* OH_AVImageGenerator_Create(void); * @param size Indicates the size of media source. * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. + * {@link AV_ERR_INVALID_VAL} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 @@ -98,7 +98,7 @@ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, * @param pixelMap The fetched output image from the video source. For details, see {@link OH_PixelmapNative}. * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. + * {@link AV_ERR_INVALID_VAL} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. @@ -114,7 +114,7 @@ OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator * @param generator Pointer to an OH_AVImageGenerator instance. * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INPUT_DATA_ERROR} if input generator is nullptr or input param is invalid. + * {@link AV_ERR_INVALID_VAL} if input generator is nullptr or input param is invalid. * @since 16 */ OH_AVErrCode OH_AVImageGenerator_Release(OH_AVImageGenerator* generator); -- Gitee From 16566870e5c082723d8e265c1cc9b9c9a135ee8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=90=8C=E8=BE=89?= Date: Mon, 24 Feb 2025 08:35:06 +0000 Subject: [PATCH 596/630] update multimedia/player_framework/avmetadata_extractor.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彭同辉 --- multimedia/player_framework/avmetadata_extractor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/player_framework/avmetadata_extractor.h b/multimedia/player_framework/avmetadata_extractor.h index 38f70846c..cb54f5c89 100644 --- a/multimedia/player_framework/avmetadata_extractor.h +++ b/multimedia/player_framework/avmetadata_extractor.h @@ -79,7 +79,7 @@ OH_AVMetadataExtractor* OH_AVMetadataExtractor_Create(void); * @param size Indicates the size of media source. * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_INVALID_VAL} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. * @since 16 @@ -96,7 +96,7 @@ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extracto * @param avMetadata Pointer to an {@link OH_AVFormat} instance, its content contains the fetched metadata info. * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_INVALID_VAL} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. @@ -113,7 +113,7 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extrac * @param pixelMap The fetched album cover from the audio source. For details, see {@link OH_PixelmapNative}. * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_INVALID_VAL} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. @@ -128,7 +128,7 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extr * @param extractor Pointer to an OH_AVMetadataExtractor instance. * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. - * {@link AV_ERR_INPUT_DATA_ERROR} if input extractor is nullptr or input param is invalid. + * {@link AV_ERR_INVALID_VAL} if input extractor is nullptr or input param is invalid. * @since 16 */ OH_AVErrCode OH_AVMetadataExtractor_Release(OH_AVMetadataExtractor* extractor); -- Gitee From 1c3bc4c6513a4534d612103e42e20699907ff39c Mon Sep 17 00:00:00 2001 From: htt1997 Date: Mon, 24 Feb 2025 17:12:36 +0800 Subject: [PATCH 597/630] add memory db Signed-off-by: htt1997 --- .../relational_store/include/relational_store.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 1974af547..35ddae860 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -357,6 +357,19 @@ int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); */ int OH_Rdb_IsTokenizerSupported(Rdb_Tokenizer tokenizer, bool *isSupported); +/** + * @brief Set property isMemoryDb into config + * + * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. + * Indicates the configuration of the database related to this RDB store. + * @param isMemoryDb Indicates whether the database is memory db. + * @return Returns the status code of the execution. Successful execution returns RDB_OK, + * {@link RDB_OK} - success. + * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. + * @since 14 + */ +int OH_Rdb_SetMemoryDb(OH_Rdb_ConfigV2 *config, bool isMemoryDb); + /** * @brief Get support db type list * @param typeCount The output parameter, which is used to recieve the length of the support db type array. -- Gitee From 59497f1d1e1d18957fea9942a574c6cb1c1554cb Mon Sep 17 00:00:00 2001 From: buzhenwang Date: Tue, 25 Feb 2025 14:10:19 +0800 Subject: [PATCH 598/630] modify SetMinLogLevel api version info Signed-off-by: buzhenwang --- hiviewdfx/hilog/include/hilog/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiviewdfx/hilog/include/hilog/log.h b/hiviewdfx/hilog/include/hilog/log.h index 2a8c7000e..db6b8e1c0 100644 --- a/hiviewdfx/hilog/include/hilog/log.h +++ b/hiviewdfx/hilog/include/hilog/log.h @@ -347,7 +347,7 @@ void OH_LOG_SetCallback(LogCallback callback); * @brief Sets the lowest log level of the current application process. * * @param level log level - * @since 16 + * @since 15 */ void OH_LOG_SetMinLogLevel(LogLevel level); -- Gitee From 66d631390aebec053433710f772d04389d73b7b5 Mon Sep 17 00:00:00 2001 From: zhangkai Date: Thu, 27 Feb 2025 11:15:45 +0800 Subject: [PATCH 599/630] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangkai --- .../audio_framework/audio_capturer/native_audiocapturer.h | 2 +- .../audio_framework/audio_renderer/native_audiorenderer.h | 2 +- multimedia/audio_framework/common/native_audiostreambuilder.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h index c2c3216f6..c3eb89ecb 100644 --- a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h +++ b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h @@ -149,7 +149,7 @@ OH_AudioStream_Result OH_AudioCapturer_GetLatencyMode(OH_AudioCapturer* capturer * @since 10 * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() - * @param stramId Pointer to a variable that will be set for the stream id. + * @param streamId Pointer to a variable that will be set for the stream id. * @return Function result code: * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 18b2daa39..8b332560f 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -150,7 +150,7 @@ OH_AudioStream_Result OH_AudioRenderer_GetSamplingRate(OH_AudioRenderer* rendere * @since 10 * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() - * @param stramId Pointer to a variable that will be set for the stream id. + * @param streamId Pointer to a variable that will be set for the stream id. * @return Function result code: * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index de4451adf..7d28fb71d 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -80,8 +80,8 @@ OH_AudioStream_Result OH_AudioStreamBuilder_Destroy(OH_AudioStreamBuilder* build * * @since 10 * - * @param capturer Reference created by OH_AudioStreamBuilder - * @param channelCount Pointer to a variable that will be set for the channel count. + * @param builder Reference created by OH_AudioStreamBuilder + * @param rate Pointer to a variable that will be set for the channel count. * @return Function result code: * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: -- Gitee From 8caee85948e4e0971cd92def2e7a54b894f689dc Mon Sep 17 00:00:00 2001 From: lihui Date: Sat, 15 Feb 2025 16:00:18 +0800 Subject: [PATCH 600/630] native window add interface OH_NativeWindow_CleanCache Signed-off-by: lihui --- .../graphic_2d/native_window/external_window.h | 15 +++++++++++++++ .../native_window/libnative_window.ndk.json | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 045da5cd8..b75ffbdd2 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -868,6 +868,21 @@ int32_t OH_NativeWindow_SetMetadataValue(OHNativeWindow *window, OH_NativeBuffer */ int32_t OH_NativeWindow_GetMetadataValue(OHNativeWindow *window, OH_NativeBuffer_MetadataKey metadataKey, int32_t *size, uint8_t **metadata); + +/** + * @brief Clean all OHNativeWindowBuffer caches of this OHNativeWindow + * This interface is a non-thread-safe type interface.\n + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeWindow + * @param window Indicates the pointer to a OHNativeWindow instance. + * @return {@link NATIVE_ERROR_OK} 0 - Success. + * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - window is NULL. + * {@link NATIVE_ERROR_CONSUMER_DISCONNECTED} 41211000 - the consumer is disconnected. + * {@link NATIVE_ERROR_BINDER_ERROR} 50401000 - ipc send failed. + * @since 16 + * @version 1.0 + */ +int32_t OH_NativeWindow_CleanCache(OHNativeWindow *window); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_window/libnative_window.ndk.json b/graphic/graphic_2d/native_window/libnative_window.ndk.json index 375d3e034..40019c4e1 100644 --- a/graphic/graphic_2d/native_window/libnative_window.ndk.json +++ b/graphic/graphic_2d/native_window/libnative_window.ndk.json @@ -50,6 +50,10 @@ { "first_introduced": "12", "name": "OH_NativeWindow_GetMetadataValue" + }, + { + "first_introduced": "16", + "name": "OH_NativeWindow_CleanCache" } ] \ No newline at end of file -- Gitee From f042bfdda4d26c9402cd14f471975942edbefca6 Mon Sep 17 00:00:00 2001 From: wanjining Date: Thu, 27 Feb 2025 15:29:43 +0800 Subject: [PATCH 601/630] =?UTF-8?q?=E8=A1=A5=E5=85=85wordbreak=E7=9A=84?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanjining --- arkui/ace_engine/native/native_type.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 5031b216f..8877d0e7a 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1605,6 +1605,12 @@ typedef enum { * lines at appropriate characters (for example, spaces) whenever possible. CJK text behavior is the same as for NORMAL. */ ARKUI_WORD_BREAK_BREAK_WORD, + /** + * @brief Line breaks can occur between any two syllabic units for non-CJK text. + * CJK text behavior is the same as for NORMAL. + * @since 16 + */ + ARKUI_WORD_BREAK_HYPHENATION, } ArkUI_WordBreak; /** -- Gitee From 1caa072e8fec829825a2d4987afe030579db8883 Mon Sep 17 00:00:00 2001 From: sunbees Date: Mon, 17 Feb 2025 22:31:43 +0800 Subject: [PATCH 602/630] add surface holder callback in xcomponent ndk Signed-off-by: sunbees Change-Id: Ib83d9d314064874b200716696a0a281e6b1e0aac --- arkui/ace_engine/native/libace.ndk.json | 64 ++++++ .../native/native_interface_xcomponent.h | 201 ++++++++++++++++++ arkui/ace_engine/native/native_type.h | 5 + 3 files changed, 270 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d809c13cb..d3a870fef 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3066,5 +3066,69 @@ { "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetPositionToParent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceHolder_Create" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceHolder_Dispose" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceHolder_SetUserData" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceHolder_GetUserData" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceCallback_Create" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceCallback_Dispose" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceHolder_AddSurfaceCallback" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_XComponent_GetNativeWindow" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_XComponent_SetAutoInitialize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_XComponent_Initialize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_XComponent_Finalize" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_XComponent_IsInitialized" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index c15ecf20c..eb38cee6c 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -895,6 +895,207 @@ int32_t OH_ArkUI_XComponent_StartImageAnalyzer(ArkUI_NodeHandle node, void* user */ int32_t OH_ArkUI_XComponent_StopImageAnalyzer(ArkUI_NodeHandle node); +/** + * @brief Provides an encapsulated OH_ArkUI_SurfaceHolder instance. + * + * @since 16 + */ +typedef struct OH_ArkUI_SurfaceHolder OH_ArkUI_SurfaceHolder; + +/** + * @brief Create a OH_ArkUI_SurfaceHolder object from an XComponent node. + * + * @param node Indicates the pointer to the XComponent node. + * @return Returns the created OH_ArkUI_SurfaceHolder object's pointer. + * @since 16 + */ +OH_ArkUI_SurfaceHolder* OH_ArkUI_SurfaceHolder_Create(ArkUI_NodeHandle node); + +/** + * @brief Disposes of a OH_ArkUI_SurfaceHolder object. + * + * @param node Indicates the pointer to OH_ArkUI_SurfaceHolder object needed to dispose. + * @since 16 + */ +void OH_ArkUI_SurfaceHolder_Dispose(OH_ArkUI_SurfaceHolder* surfaceHolder); + +/** + * @brief Saves custom data on the OH_ArkUI_SurfaceHolder instance. + * + * @param surfaceHolder Indicates the OH_ArkUI_SurfaceHolder instance + * on which the custom data will be saved. + * @param userData Indicates the custom data to be saved. + * @return Returns the error 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. + * @since 16 + */ +int32_t OH_ArkUI_SurfaceHolder_SetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder, void* userData); + +/** + * @brief Obtains the custom data saved on the OH_ArkUI_SurfaceHolder instance. + * + * @param surfaceHolder Indicates the target OH_ArkUI_SurfaceHolder instance. + * @return Returns the custom data. + * @since 16 + */ +void* OH_ArkUI_SurfaceHolder_GetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder); + +/** + * @brief Define the surface lifecycle callback. + * + * @since 16 + */ +typedef struct OH_ArkUI_SurfaceCallback OH_ArkUI_SurfaceCallback; + +/** + * @brief Create a OH_ArkUI_SurfaceCallback object. + * + * @return Returns the created OH_ArkUI_SurfaceCallback object's pointer. + * @since 16 + */ +OH_ArkUI_SurfaceCallback* OH_ArkUI_SurfaceCallback_Create(); + +/** + * @brief Disposes of a OH_ArkUI_SurfaceCallback object. + * + * @param callback Indicates the pointer to OH_ArkUI_SurfaceCallback object needed to dispose. + * @since 16 + */ +void OH_ArkUI_SurfaceCallback_Dispose(OH_ArkUI_SurfaceCallback* callback); + +/** + * @brief Set the surface created event of the surface callback. + * + * @param callback Indicated the pointer to the surface callback. + * @param onSurfaceCreated Indicates the surface created callback event + * which will called when the surface is created. + * @since 16 + */ +void OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent( + OH_ArkUI_SurfaceCallback* callback, + void (*onSurfaceCreated)(OH_ArkUI_SurfaceHolder* surfaceHolder)); + +/** + * @brief Set the surface changed event of the surface callback. + * + * @param callback Indicated the pointer to the surface callback. + * @param onSurfaceChanged Indicates the surface changed callback event + * which will called when the surface is changed. + * @since 16 + */ +void OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent( + OH_ArkUI_SurfaceCallback* callback, + void (*onSurfaceChanged)(OH_ArkUI_SurfaceHolder* surfaceHolder, uint64_t width, uint64_t height)); + +/** + * @brief Set the surface destroyed event of the surface callback. + * + * @param callback Indicated the pointer to the surface callback. + * @param onSurfaceDestroyed Indicates the surface destroyed callback event + * which will called when the surface is destroyed. + * @since 16 + */ +void OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent( + OH_ArkUI_SurfaceCallback* callback, + void (*onSurfaceDestroyed)(OH_ArkUI_SurfaceHolder* surfaceHolder)); + +/** + * @brief Adds a surface lifecycle callback for this OH_ArkUI_SurfaceHolder instance. + * + * @param surfaceHolder Indicates the pointer to this OH_ArkUI_SurfaceHolder instance. + * @param callback Indicates the pointer to this new callback. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 16 + */ +int32_t OH_ArkUI_SurfaceHolder_AddSurfaceCallback( + OH_ArkUI_SurfaceHolder* surfaceHolder, + OH_ArkUI_SurfaceCallback* callback); + +/** + * @brief Removes a previously added surface lifecycle callback + * from this OH_ArkUI_SurfaceHolder instance. + * + * @param surfaceHolder Indicates the pointer to this OH_ArkUI_SurfaceHolder instance. + * @param callback Indicates the pointer to the callback needed to remove. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 16 + */ +int32_t OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback( + OH_ArkUI_SurfaceHolder* surfaceHolder, + OH_ArkUI_SurfaceCallback* callback); + +/** + * @brief Forward declaration of OHNativeWindow. + * + * @since 16 + */ +typedef struct NativeWindow OHNativeWindow; + +/** + * @brief Obtains the nativeWindow associated with a OH_ArkUI_SurfaceHolder instance. + * + * @param surfaceHolder Indicates the pointer to this OH_ArkUI_SurfaceHolder instance. + * @return Returns the nativeWindow associated with this OH_ArkUI_SurfaceHolder instance. + * @since 16 + */ +OHNativeWindow* OH_ArkUI_XComponent_GetNativeWindow(OH_ArkUI_SurfaceHolder* surfaceHolder); + +/** + * @brief Set whether the XComponent node needs to initialize automatically. + * + * @param node Indicates the pointer to the XComponent node. + * @param autoInitialize Indicates whether the XComponent node needs to initialize automatically or not. + * If the value is true, OnSurfaceCreated will be called when the node is mounted and + * OnSurfaceDestroyed will be called when the node is unmounted. + * Default value is true. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. + * @since 16 + */ +int32_t OH_ArkUI_XComponent_SetAutoInitialize(ArkUI_NodeHandle node, bool autoInitialize); + +/** + * @brief Initialize the XComponent node. + * + * @param node Indicates the pointer to the XComponent node. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. + * {@link ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID} if the node has initialized. + * @since 16 + */ +int32_t OH_ArkUI_XComponent_Initialize(ArkUI_NodeHandle node); + +/** + * @brief Finalize the XComponent node. + * + * @param node Indicates the pointer to the XComponent node. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. + * {@link ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID} if the node has finalized. + * @since 16 + */ +int32_t OH_ArkUI_XComponent_Finalize(ArkUI_NodeHandle node); + +/** + * @brief Obtains whether the XComponent node has initalized or not. + * + * @param node Indicates the pointer to the XComponent node. + * @param isInitialized Indicates whether the XComponent node has initalized. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. + * @since 16 + */ +int32_t OH_ArkUI_XComponent_IsInitialized(ArkUI_NodeHandle node, bool* isInitialized); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 140f85f11..c584adad9 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2135,6 +2135,11 @@ typedef enum { * @since 15 */ ARKUI_ERROR_CODE_INTERNAL_ERROR = 100001, + /** + * @error The XComponent is in invalid state. + * @since 16 + */ + ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID = 103501, /** @error The component does not support specific properties or events. */ ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102, /** @error The corresponding operation does not support nodes created by ArkTS. */ -- Gitee From fed94cc0db99f218089f3454e70e92896cd287e1 Mon Sep 17 00:00:00 2001 From: mdd12138 <1245619585@qq.com> Date: Fri, 28 Feb 2025 11:56:04 +0800 Subject: [PATCH 603/630] onHoverMove feature changes from 16 to 15 Signed-off-by: mdd12138 <1245619585@qq.com> --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 85a18bde2..0bbbffbd2 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6647,7 +6647,7 @@ typedef enum { * within the component. \n * When the event callback occurs, the {@link ArkUI_NodeEvent} object can be obtained from the * {@link ArkUI_UIInputEvent} object. \n - * @since 16 + * @since 15 */ NODE_ON_HOVER_MOVE = 29, -- Gitee From 7170f0e5667a03ec9ae8ff1395f7dcf79d5e445c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E9=BD=90=E7=86=A0?= Date: Thu, 20 Feb 2025 11:16:23 +0800 Subject: [PATCH 604/630] angle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑齐熠 --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/ui_input_event.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index ba3782ae6..782f8ec2e 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -507,6 +507,10 @@ "first_introduced": "12", "name": "OH_ArkUI_PointerEvent_GetTiltY" }, + { + "first_introduced": "16", + "name": "OH_ArkUI_PointerEvent_GetRollAngle" + }, { "first_introduced": "15", "name": "OH_ArkUI_PointerEvent_GetInteractionHand" diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 8f1bec823..4db022299 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -505,6 +505,18 @@ float OH_ArkUI_PointerEvent_GetTiltX(const ArkUI_UIInputEvent* event, uint32_t p */ float OH_ArkUI_PointerEvent_GetTiltY(const ArkUI_UIInputEvent* event, uint32_t pointerIndex); +/** + * @brief Obtains the rotation angle of the stylus around the z-axis from a UI input event. + * + * @param event Pointer to the UI input event. + * @param rollAngle Rotation angle of the stylus around the z-axis. + * @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. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_GetRollAngle(const ArkUI_UIInputEvent* event, double* rollAngle); + /** * @brief Obtains the width of the touch area from a directional input event (for example, a touch event). * -- Gitee From 110ac82c887e3da42e052731155655e2fbecffe5 Mon Sep 17 00:00:00 2001 From: Hu_zq Date: Sat, 1 Mar 2025 20:24:47 +0800 Subject: [PATCH 605/630] NODE_SCROLL_BACK_TO_TOP api to 15 Signed-off-by: Hu_zq Change-Id: I4c030e2cce48fae0fc73bcd1da2387233bab5788 --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 85a18bde2..0d26ae2a5 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5129,7 +5129,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}: \n * .value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. \n * - * @since 16 + * @since 15 */ NODE_SCROLL_BACK_TO_TOP = 1002021, -- Gitee From 64f31bdacee09585d0266b3f14e271c2df352e2f Mon Sep 17 00:00:00 2001 From: huangweichen Date: Sat, 1 Mar 2025 20:42:20 +0800 Subject: [PATCH 606/630] =?UTF-8?q?=E5=9B=9E=E9=80=80uiinput=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangweichen --- arkui/ace_engine/native/ui_input_event.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 038320022..8c421695a 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -61,12 +61,6 @@ typedef enum { ARKUI_UIINPUTEVENT_TYPE_AXIS = 2, /** Mouse event. */ ARKUI_UIINPUTEVENT_TYPE_MOUSE = 3, - /** - * @brief key event. - * - * @since 16 - */ - ARKUI_UIINPUTEVENT_TYPE_KEY = 4, } ArkUI_UIInputEvent_Type; /** -- Gitee From c1c62c3384952976d7a885ce12b0c470db18aebf Mon Sep 17 00:00:00 2001 From: liangliang6768 Date: Sun, 2 Mar 2025 09:56:21 +0800 Subject: [PATCH 607/630] change api18 Signed-off-by: liangliang6768 --- .../ability_runtime/application_context.h | 14 +- BasicServicesKit/commonevent/oh_commonevent.h | 62 +++---- ark_runtime/jsvm/jsvm.h | 74 ++++---- ark_runtime/jsvm/jsvm_types.h | 32 ++-- arkui/ace_engine/native/drag_and_drop.h | 6 +- arkui/ace_engine/native/native_animate.h | 4 +- arkui/ace_engine/native/native_dialog.h | 16 +- arkui/ace_engine/native/native_gesture.h | 22 +-- .../native/native_interface_xcomponent.h | 46 ++--- arkui/ace_engine/native/native_node.h | 68 ++++---- arkui/ace_engine/native/native_node_napi.h | 2 +- arkui/ace_engine/native/native_type.h | 164 +++++++++--------- arkui/ace_engine/native/ui_input_event.h | 24 +-- arkui/napi/native_api.h | 2 +- .../pasteboard/include/oh_pasteboard.h | 2 +- .../preferences/include/oh_preferences.h | 2 +- .../include/oh_preferences_option.h | 4 +- .../relational_store/include/oh_cursor.h | 4 +- .../relational_store/include/oh_data_value.h | 56 +++--- .../relational_store/include/oh_data_values.h | 58 +++---- .../include/oh_data_values_buckets.h | 14 +- .../include/oh_rdb_transaction.h | 34 ++-- .../relational_store/include/oh_rdb_types.h | 4 +- .../include/oh_values_bucket.h | 4 +- .../include/relational_store.h | 14 +- .../include/relational_store_error_code.h | 32 ++-- .../external_device_manager/hid/hid_ddk_api.h | 30 ++-- .../hid/hid_ddk_types.h | 18 +- .../scsi_peripheral/scsi_peripheral_api.h | 34 ++-- .../scsi_peripheral/scsi_peripheral_types.h | 48 ++--- .../external_device_manager/usb/usb_ddk_api.h | 4 +- .../usb/usb_ddk_types.h | 2 +- .../usb_serial/usb_serial_api.h | 30 ++-- .../usb_serial/usb_serial_types.h | 14 +- .../include/resourcemanager/ohresmgr.h | 8 +- .../native_drawing/drawing_canvas.h | 10 +- .../native_drawing/drawing_error_code.h | 2 +- .../graphic_2d/native_drawing/drawing_font.h | 6 +- .../native_drawing/drawing_gpu_context.h | 2 +- .../native_drawing/drawing_path_effect.h | 12 +- .../graphic_2d/native_drawing/drawing_rect.h | 8 +- .../native_drawing/drawing_surface.h | 4 +- .../native_drawing/drawing_text_declaration.h | 8 +- .../drawing_text_font_descriptor.h | 6 +- .../native_drawing/drawing_text_line.h | 42 ++--- .../drawing_text_lineTypography.h | 12 +- .../native_drawing/drawing_text_run.h | 34 ++-- .../native_drawing/drawing_text_typography.h | 16 +- .../native_window/external_window.h | 2 +- .../include/hiappevent/hiappevent.h | 24 +-- .../include/hiappevent/hiappevent_event.h | 2 +- .../hicollie/include/hicollie/hicollie.h | 20 +-- hiviewdfx/hilog/include/hilog/log.h | 6 +- .../common/native_audio_device_base.h | 2 +- .../common/native_audiostream_base.h | 2 +- multimedia/av_codec/native_avcodec_base.h | 20 +-- .../include/image/image_packer_native.h | 28 +-- .../include/image/pixelmap_native.h | 10 +- multimedia/media_foundation/media_types.h | 6 +- multimedia/media_foundation/native_averrors.h | 2 +- .../player_framework/avimage_generator.h | 14 +- .../player_framework/avimage_generator_base.h | 6 +- .../player_framework/avmetadata_extractor.h | 16 +- .../avmetadata_extractor_base.h | 46 ++--- multimedia/player_framework/avrecorder.h | 34 ++-- multimedia/player_framework/avrecorder_base.h | 40 ++--- network/netssl/include/net_ssl_c.h | 4 +- security/asset/inc/asset_type.h | 6 +- security/huks/include/native_huks_type.h | 16 +- .../interfaces/native/arkweb_interface.h | 4 +- web/webview/interfaces/native/arkweb_type.h | 18 +- 71 files changed, 721 insertions(+), 721 deletions(-) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index c5ac3079d..7751647d3 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -105,7 +105,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleName( * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 + * @since 18 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetTempDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); @@ -122,7 +122,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetTempDir( * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 + * @since 18 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetFilesDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); @@ -139,7 +139,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetFilesDir( * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 + * @since 18 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetDatabaseDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); @@ -156,7 +156,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetDatabaseDir( * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 + * @since 18 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetPreferencesDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); @@ -173,7 +173,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetPreferencesDir( * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 + * @since 18 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleCodeDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); @@ -190,7 +190,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleCodeDir( * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 + * @since 18 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetDistributedFilesDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); @@ -207,7 +207,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetDistributedFiles * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 16 + * @since 18 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCloudFileDir( char* buffer, const int32_t bufferSize, int32_t* writeLength); diff --git a/BasicServicesKit/commonevent/oh_commonevent.h b/BasicServicesKit/commonevent/oh_commonevent.h index c2491b51f..262ae9768 100644 --- a/BasicServicesKit/commonevent/oh_commonevent.h +++ b/BasicServicesKit/commonevent/oh_commonevent.h @@ -94,7 +94,7 @@ typedef void CommonEvent_Subscriber; /** * @brief the common event publish information containing content and attributes of the common event * - * @since 16 + * @since 18 */ typedef struct CommonEvent_PublishInfo CommonEvent_PublishInfo; @@ -259,7 +259,7 @@ const CommonEvent_Parameters* OH_CommonEvent_GetParametersFromRcvData(const Comm * * @param ordered Indicates whether the common event is ordered. * @return Returns the CommonEvent_PublishInfo, if create failed, returns null. - * @since 16 + * @since 18 */ CommonEvent_PublishInfo* OH_CommonEvent_CreatePublishInfo(bool ordered); @@ -267,7 +267,7 @@ CommonEvent_PublishInfo* OH_CommonEvent_CreatePublishInfo(bool ordered); * @brief Destroy the common event publish information. * * @param info Indicates the publish information. - * @since 16 + * @since 18 */ void OH_CommonEvent_DestroyPublishInfo(CommonEvent_PublishInfo* info); @@ -279,7 +279,7 @@ void OH_CommonEvent_DestroyPublishInfo(CommonEvent_PublishInfo* info); * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoBundleName(CommonEvent_PublishInfo* info, const char* bundleName); @@ -292,7 +292,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoBundleName(CommonEvent_PublishI * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoPermissions(CommonEvent_PublishInfo* info, const char* permissions[], int32_t num); @@ -305,7 +305,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoPermissions(CommonEvent_Publish * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoCode(CommonEvent_PublishInfo* info, int32_t code); @@ -318,7 +318,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoCode(CommonEvent_PublishInfo* i * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoData(CommonEvent_PublishInfo* info, const char* data, size_t length); @@ -331,7 +331,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoData(CommonEvent_PublishInfo* i * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoParameters(CommonEvent_PublishInfo* info, CommonEvent_Parameters* param); @@ -340,7 +340,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetPublishInfoParameters(CommonEvent_PublishI * @brief Create a common event publish information. * * @return Returns the CommonEvent_PublishInfo, if create failed, returns null. - * @since 16 + * @since 18 */ CommonEvent_Parameters* OH_CommonEvent_CreateParameters(); @@ -348,7 +348,7 @@ CommonEvent_Parameters* OH_CommonEvent_CreateParameters(); * @brief Destroy the common event publish information. * * @param param Indicates the publish information. - * @since 16 + * @since 18 */ void OH_CommonEvent_DestroyParameters(CommonEvent_Parameters* param); @@ -382,7 +382,7 @@ int OH_CommonEvent_GetIntFromParameters(const CommonEvent_Parameters* para, cons * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetIntToParameters(CommonEvent_Parameters* param, const char* key, int value); @@ -408,7 +408,7 @@ int32_t OH_CommonEvent_GetIntArrayFromParameters(const CommonEvent_Parameters* p * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetIntArrayToParameters(CommonEvent_Parameters* param, const char* key, const int* value, size_t num); @@ -433,7 +433,7 @@ long OH_CommonEvent_GetLongFromParameters(const CommonEvent_Parameters* para, co * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetLongToParameters(CommonEvent_Parameters* param, const char* key, long value); @@ -459,7 +459,7 @@ int32_t OH_CommonEvent_GetLongArrayFromParameters(const CommonEvent_Parameters* * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetLongArrayToParameters(CommonEvent_Parameters* param, const char* key, const long* value, size_t num); @@ -484,7 +484,7 @@ bool OH_CommonEvent_GetBoolFromParameters(const CommonEvent_Parameters* para, co * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetBoolToParameters(CommonEvent_Parameters* param, const char* key, bool value); @@ -510,7 +510,7 @@ int32_t OH_CommonEvent_GetBoolArrayFromParameters(const CommonEvent_Parameters* * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetBoolArrayToParameters(CommonEvent_Parameters* param, const char* key, const bool* value, size_t num); @@ -535,7 +535,7 @@ char OH_CommonEvent_GetCharFromParameters(const CommonEvent_Parameters* para, co * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetCharToParameters(CommonEvent_Parameters* param, const char* key, char value); @@ -560,7 +560,7 @@ int32_t OH_CommonEvent_GetCharArrayFromParameters(const CommonEvent_Parameters* * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetCharArrayToParameters(CommonEvent_Parameters* param, const char* key, const char* value, size_t num); @@ -586,7 +586,7 @@ double OH_CommonEvent_GetDoubleFromParameters(const CommonEvent_Parameters* para * @return Returns the error code. * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetDoubleToParameters(CommonEvent_Parameters* param, const char* key, double value); @@ -614,7 +614,7 @@ int32_t OH_CommonEvent_GetDoubleArrayFromParameters(const CommonEvent_Parameters * Returns {@link COMMONEVENT_ERR_OK} if the operation is successful. * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. * Returns {@link COMMONEVENT_ERR_ALLOC_MEMORY_FAILED} if a memory allocation error occurs. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_SetDoubleArrayToParameters(CommonEvent_Parameters* param, const char* key, const double* value, size_t num); @@ -628,7 +628,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetDoubleArrayToParameters(CommonEvent_Parame * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. * Returns {@link COMMONEVENT_ERR_FAIL_SEND_REQUEST } if IPC request failed to send. * Returns {@link COMMONEVENT_ERR_INIT_UNDONE } if ces not init done. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_Publish(const char* event); @@ -642,7 +642,7 @@ CommonEvent_ErrCode OH_CommonEvent_Publish(const char* event); * Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs. * Returns {@link COMMONEVENT_ERR_FAIL_SEND_REQUEST } if IPC request failed to send. * Returns {@link COMMONEVENT_ERR_INIT_UNDONE } if ces not init done. - * @since 16 + * @since 18 */ CommonEvent_ErrCode OH_CommonEvent_PublishWithInfo(const char* event, const CommonEvent_PublishInfo* info); @@ -651,7 +651,7 @@ CommonEvent_ErrCode OH_CommonEvent_PublishWithInfo(const char* event, const Comm * * @param subscriber Indicates the subscriber. * @return Returns the result of check, true means ordered. - * @since 16 + * @since 18 */ bool OH_CommonEvent_IsOrderedCommonEvent(const CommonEvent_Subscriber* subscriber); @@ -660,7 +660,7 @@ bool OH_CommonEvent_IsOrderedCommonEvent(const CommonEvent_Subscriber* subscribe * * @param subscriber Indicates the subscriber. * @return Returns the result of operation, true means succeeded. - * @since 16 + * @since 18 */ bool OH_CommonEvent_FinishCommonEvent(CommonEvent_Subscriber* subscriber); @@ -669,7 +669,7 @@ bool OH_CommonEvent_FinishCommonEvent(CommonEvent_Subscriber* subscriber); * * @param subscriber Indicates the subscriber. * @return Returns the result of check, true means aborted. - * @since 16 + * @since 18 */ bool OH_CommonEvent_GetAbortCommonEvent(const CommonEvent_Subscriber* subscriber); @@ -678,7 +678,7 @@ bool OH_CommonEvent_GetAbortCommonEvent(const CommonEvent_Subscriber* subscriber * * @param subscriber Indicates the subscriber. * @return Returns the result of operation, true means succeeded. - * @since 16 + * @since 18 */ bool OH_CommonEvent_AbortCommonEvent(CommonEvent_Subscriber* subscriber); @@ -687,7 +687,7 @@ bool OH_CommonEvent_AbortCommonEvent(CommonEvent_Subscriber* subscriber); * * @param subscriber Indicates the subscriber. * @return Returns the result of operation, true means succeeded. - * @since 16 + * @since 18 */ bool OH_CommonEvent_ClearAbortCommonEvent(CommonEvent_Subscriber* subscriber); @@ -696,7 +696,7 @@ bool OH_CommonEvent_ClearAbortCommonEvent(CommonEvent_Subscriber* subscriber); * * @param subscriber Indicates the subscriber. * @return Returns the result code, default is 0. - * @since 16 + * @since 18 */ int32_t OH_CommonEvent_GetCodeFromSubscriber(const CommonEvent_Subscriber* subscriber); @@ -706,7 +706,7 @@ int32_t OH_CommonEvent_GetCodeFromSubscriber(const CommonEvent_Subscriber* subsc * @param subscriber Indicates the subscriber. * @param code Indicates the result code. * @return Returns the result of operation, true means succeeded. - * @since 16 + * @since 18 */ bool OH_CommonEvent_SetCodeToSubscriber(CommonEvent_Subscriber* subscriber, int32_t code); @@ -715,7 +715,7 @@ bool OH_CommonEvent_SetCodeToSubscriber(CommonEvent_Subscriber* subscriber, int3 * * @param subscriber Indicates the subscriber. * @return Returns the result data, default is null. - * @since 16 + * @since 18 */ const char* OH_CommonEvent_GetDataFromSubscriber(const CommonEvent_Subscriber* subscriber); @@ -726,7 +726,7 @@ const char* OH_CommonEvent_GetDataFromSubscriber(const CommonEvent_Subscriber* s * @param data Indicates the result data. * @param length Indicates the length of result data. * @return Returns the result of operation, true means succeeded. - * @since 16 + * @since 18 */ bool OH_CommonEvent_SetDataToSubscriber(CommonEvent_Subscriber* subscriber, const char* data, size_t length); diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index 02bc0ea9b..06f4ce767 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -128,7 +128,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateVM(const JSVM_CreateVMOptions* options, * @param vm The VM instance to set mircrotasks policy. * @param policy Policy for running microtasks. * @return Returns JSVM_OK if the API succeeded. - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_SetMicrotaskPolicy(JSVM_VM vm, JSVM_MicrotaskPolicy policy); @@ -158,7 +158,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DestroyVM(JSVM_VM vm); * {@link JSVM_OBJECT_EXPECTED} if target or handler is not Javascript Object. \n * {@link JSVM_PENDING_EXCEPTION} if an exception occurs. \n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_CreateProxy(JSVM_Env env, JSVM_Value target, @@ -175,7 +175,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateProxy(JSVM_Env env, * {@link JSVM_OK } if the API succeeded. \n * {@link JSVM_INVALID_ARG } if the any of the input arguments is NULL. \n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_IsProxy(JSVM_Env env, JSVM_Value value, @@ -192,7 +192,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsProxy(JSVM_Env env, * {@link JSVM_INVALID_ARG } if the any of the input arguments is NULL. \n * {@link JSVM_INVALID_TYPE} if value is not a Javascript Proxy. \n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_ProxyGetTarget(JSVM_Env env, JSVM_Value value, @@ -2395,7 +2395,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsPromise(JSVM_Env env, * {@link JSVM_PENDING_EXCEPTION} if an exception occurs. \n * {@link JSVM_GENERIC_FAILURE} if the API failed. \n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_PromiseRegisterHandler(JSVM_Env env, JSVM_Value promise, @@ -3154,7 +3154,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReleaseCache(JSVM_Env env, * @return Returns JSVM funtions result code. * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if one of env, str and copied is NULL.\n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternalStringLatin1(JSVM_Env env, char* str, @@ -3180,7 +3180,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternalStringLatin1(JSVM_Env env, * @return Returns JSVM funtions result code. * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if one of env, str and copied is NULL.\n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternalStringUtf16(JSVM_Env env, @@ -3202,7 +3202,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternalStringUtf16(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if env or result is NULL.\n * {@link JSVM_STRING_EXPECTED } if the description is not a string.\n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_CreatePrivate(JSVM_Env env, JSVM_Value description, @@ -3221,7 +3221,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreatePrivate(JSVM_Env env, * {@link JSVM_OBJECT_EXPECTED } object passed in is not a real object.\n * {@link JSVM_GENERIC_FAILURE } if failed to set the private key but no exception is pending.\n * {@link JSVM_PENDING_EXCPTION } if an exception occurs.\n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_SetPrivate(JSVM_Env env, JSVM_Value object, @@ -3241,7 +3241,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetPrivate(JSVM_Env env, * {@link JSVM_OBJECT_EXPECTED } object passed in is not a real object.\n * {@link JSVM_GENERIC_FAILURE } if failed to get the private key but no exception is pending.\n * {@link JSVM_PENDING_EXCPTION } if an exception occurs.\n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetPrivate(JSVM_Env env, JSVM_Value object, @@ -3260,7 +3260,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetPrivate(JSVM_Env env, * {@link JSVM_OBJECT_EXPECTED } object passed in is not a real object.\n * {@link JSVM_GENERIC_FAILURE } if failed to delete the private key but no exception is pending.\n * {@link JSVM_PENDING_EXCPTION } if an exception occurs.\n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_DeletePrivate(JSVM_Env env, JSVM_Value object, @@ -3276,7 +3276,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DeletePrivate(JSVM_Env env, * @return Returns JSVM funtions result code. * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any parameter is null or the value of initialRefcount is 0.\n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDataReference(JSVM_Env env, JSVM_Data data, @@ -3294,7 +3294,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDataReference(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any parameter is null or the ref is not a reference to JSVM_Data.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetReferenceData(JSVM_Env env, JSVM_Ref ref, @@ -3310,7 +3310,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetReferenceData(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_IsBigIntObject(JSVM_Env env, JSVM_Value value, @@ -3326,7 +3326,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsBigIntObject(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_IsBooleanObject(JSVM_Env env, JSVM_Value value, @@ -3342,7 +3342,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsBooleanObject(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_IsStringObject(JSVM_Env env, JSVM_Value value, @@ -3358,7 +3358,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsStringObject(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_IsNumberObject(JSVM_Env env, JSVM_Value value, @@ -3374,7 +3374,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsNumberObject(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_IsSymbolObject(JSVM_Env env, JSVM_Value value, @@ -3389,7 +3389,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsSymbolObject(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolAsyncIterator(JSVM_Env env, JSVM_Value* result); @@ -3402,7 +3402,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolAsyncIterator(JSVM_Env env, JSVM_Value* * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolHasInstance(JSVM_Env env, JSVM_Value* result); @@ -3415,7 +3415,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolHasInstance(JSVM_Env env, JSVM_Value* r * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolIsConcatSpreadable(JSVM_Env env, JSVM_Value* result); @@ -3428,7 +3428,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolIsConcatSpreadable(JSVM_Env env, JSVM_V * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolMatch(JSVM_Env env, JSVM_Value* result); @@ -3441,7 +3441,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolMatch(JSVM_Env env, JSVM_Value* result) * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolReplace(JSVM_Env env, JSVM_Value* result); @@ -3454,7 +3454,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolReplace(JSVM_Env env, JSVM_Value* resul * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolSearch(JSVM_Env env, JSVM_Value* result); @@ -3467,7 +3467,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolSearch(JSVM_Env env, JSVM_Value* result * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolSplit(JSVM_Env env, JSVM_Value* result); @@ -3480,7 +3480,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolSplit(JSVM_Env env, JSVM_Value* result) * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolToPrimitive(JSVM_Env env, JSVM_Value* result); @@ -3493,7 +3493,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolToPrimitive(JSVM_Env env, JSVM_Value* r * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolUnscopables(JSVM_Env env, JSVM_Value* result); @@ -3506,7 +3506,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolUnscopables(JSVM_Env env, JSVM_Value* r * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolToStringTag(JSVM_Env env, JSVM_Value* result); @@ -3519,7 +3519,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolToStringTag(JSVM_Env env, JSVM_Value* r * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolIterator(JSVM_Env env, JSVM_Value* result); @@ -3534,7 +3534,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetSymbolIterator(JSVM_Env env, JSVM_Value* resu * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if categories or count is illegal.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_TraceStart(size_t count, const JSVM_TraceCategory* categories, const char* tag, size_t eventsCount); @@ -3548,7 +3548,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_TraceStart(size_t count, const JSVM_TraceCategor * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if stream or streamData is NULL\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_TraceStop(JSVM_OutputStream stream, void* streamData); @@ -3562,7 +3562,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_TraceStop(JSVM_OutputStream stream, void* stream * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if vm is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForOOMError(JSVM_VM vm, JSVM_HandlerForOOMError handler); @@ -3577,7 +3577,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForOOMError(JSVM_VM vm, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if vm is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForFatalError(JSVM_VM vm, JSVM_HandlerForFatalError handler); @@ -3592,7 +3592,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForFatalError(JSVM_VM vm, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if vm is NULL.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForPromiseReject(JSVM_VM vm, JSVM_HandlerForPromiseReject handler); @@ -3624,7 +3624,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetHandlerForPromiseReject(JSVM_VM vm, * {@link JSVM_OK } if the function executed successfully. \n * {@link JSVM_INVALID_ARG } if any of the pointer arguments is NULL. \n * {@link JSVM_GENERIC_FAILURE} if the input utf8name | constructor | properties is invalid. \n - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_DefineClassWithOptions(JSVM_Env env, const char* utf8name, @@ -3649,7 +3649,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DefineClassWithOptions(JSVM_Env env, * {@link JSVM_OK } if the function executed successfully.\n * {@link JSVM_INVALID_ARG } if the vm or the handler is NULL or the handler has been added before.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_AddHandlerForGC(JSVM_VM vm, JSVM_CBTriggerTimeForGC triggerTime, @@ -3669,7 +3669,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_AddHandlerForGC(JSVM_VM vm, * {@link JSVM_INVALID_ARG } if the vm or the handler is NULL, or the handler has been removed, * or the handler has never been added.\n * - * @since 16 + * @since 18 */ JSVM_EXTERN JSVM_Status OH_JSVM_RemoveHandlerForGC(JSVM_VM vm, JSVM_CBTriggerTimeForGC triggerTime, diff --git a/ark_runtime/jsvm/jsvm_types.h b/ark_runtime/jsvm/jsvm_types.h index ec0ad5b60..999214b1a 100644 --- a/ark_runtime/jsvm/jsvm_types.h +++ b/ark_runtime/jsvm/jsvm_types.h @@ -328,7 +328,7 @@ typedef enum { /** cannot run +js status. */ JSVM_CANNOT_RUN_JS, /** invalid input type status. - * @since 16 + * @since 18 */ JSVM_INVALID_TYPE, /** jit mode expected status. @@ -782,7 +782,7 @@ typedef enum { /** * @brief Microtask policies of JSVM. * - * @since 16 + * @since 18 */ typedef enum { /** Microtasks are invoked with the OH_JSVM_PerformMicrotaskCheckpoint() method. */ @@ -796,7 +796,7 @@ typedef enum { /** * @brief Trace category for jsvm internal trace events. * - * @since 16 + * @since 18 */ typedef enum { /** Tracing main interface invoking of JSVM, such as run scripts. */ @@ -818,7 +818,7 @@ typedef enum { /** * @brief The promise-reject event. * - * @since 16 + * @since 18 */ typedef enum { /** Promise is rejected for other reasons. */ @@ -836,7 +836,7 @@ typedef enum { /** * @brief The level of message error. * - * @since 16 + * @since 18 */ typedef enum { /** Log level message. */ @@ -861,7 +861,7 @@ typedef enum { * @param detail The detail of the OOM error. * @param isHeapOOM Determine whether the OOM type is Heap OOM. * - * @since 16 + * @since 18 */ typedef void(JSVM_CDECL* JSVM_HandlerForOOMError)(const char* location, const char* detail, @@ -873,7 +873,7 @@ typedef void(JSVM_CDECL* JSVM_HandlerForOOMError)(const char* location, * @param location The location information of the Fatal error. * @param message The message of the Fatal error. * - * @since 16 + * @since 18 */ typedef void(JSVM_CDECL* JSVM_HandlerForFatalError)(const char* location, const char* message); @@ -887,7 +887,7 @@ typedef void(JSVM_CDECL* JSVM_HandlerForFatalError)(const char* location, * The 'promise' represents a reference to the Promise object that was rejected. * The 'value' represents the rejection reason associated with that promise. * - * @since 16 + * @since 18 */ typedef void(JSVM_CDECL* JSVM_HandlerForPromiseReject)(JSVM_Env env, JSVM_PromiseRejectEvent rejectEvent, @@ -896,7 +896,7 @@ typedef void(JSVM_CDECL* JSVM_HandlerForPromiseReject)(JSVM_Env env, /** * @brief DefineClass options id. * - * @since 16 + * @since 18 */ typedef enum { /** Defining a class in normal mode. */ @@ -910,7 +910,7 @@ typedef enum { /** * @brief DefineClass options. * - * @since 16 + * @since 18 */ typedef struct { /** DefineClass option id. */ @@ -929,7 +929,7 @@ typedef struct { /** * @brief The property-handler used to define class. * - * @since 16 + * @since 18 */ typedef struct { /** The instance object triggers the corresponding callback function. */ @@ -941,7 +941,7 @@ typedef struct { /** * @brief The timing of GC callback trigger. * - * @since 16 + * @since 18 */ typedef enum { /** Trigger GC callback before GC. */ @@ -953,7 +953,7 @@ typedef enum { /** * @brief The GC type. * - * @since 16 + * @since 18 */ typedef enum { /** The GC algorithm is Scavenge. */ @@ -975,7 +975,7 @@ typedef enum { /** * @brief The GC callback flags. * - * @since 16 + * @since 18 */ typedef enum { /** No GC callback falgs. */ @@ -1002,7 +1002,7 @@ typedef enum { * @param flags The GC callback flags. * @param data The native pointer data. * - * @since 16 + * @since 18 */ typedef void(JSVM_CDECL* JSVM_HandlerForGC)(JSVM_VM vm, JSVM_GCType gcType, @@ -1012,7 +1012,7 @@ typedef void(JSVM_CDECL* JSVM_HandlerForGC)(JSVM_VM vm, /** * @brief To represent a JavaScript Data type. * - * @since 16 + * @since 18 */ typedef struct JSVM_Data__* JSVM_Data; /** @} */ diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index ad98735a1..38e49caad 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -855,7 +855,7 @@ int32_t OH_ArkUI_StartDrag(ArkUI_DragAction* dragAction); * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if current is not during the drop handing. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_DragEvent_RequestDragEndPending(ArkUI_DragEvent* event, int32_t* requestIdentify); @@ -869,7 +869,7 @@ int32_t OH_ArkUI_DragEvent_RequestDragEndPending(ArkUI_DragEvent* event, int32_t * @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. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult result); @@ -880,7 +880,7 @@ int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult resu * @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. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify); diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h index 94b302d3c..0fbbe8c88 100644 --- a/arkui/ace_engine/native/native_animate.h +++ b/arkui/ace_engine/native/native_animate.h @@ -421,7 +421,7 @@ int32_t OH_ArkUI_KeyframeAnimateOption_RegisterOnFinishCallback( * @return Returns the error 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. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate( ArkUI_KeyframeAnimateOption* option, ArkUI_ExpectedFrameRateRange* frameRate); @@ -494,7 +494,7 @@ int32_t OH_ArkUI_KeyframeAnimateOption_GetIterations(ArkUI_KeyframeAnimateOption * * @param option Indicates the pointer to a keyframe animation configuration. * @return Returns the expected frame rate range of the keyframe animation. - * @since 16 + * @since 18 */ ArkUI_ExpectedFrameRateRange* OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate(ArkUI_KeyframeAnimateOption* option); diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index f609945e5..27bbaf88e 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -381,19 +381,19 @@ typedef struct { * @brief Provides the custom dialog box APIs for the native side. * * @version 3 - * @since 16 + * @since 18 */ typedef struct { /** * @brief Provides the custom dialog box APIs for the native side. The API scope is {@link ArkUI_NativeDialogAPI_1} * - * @since 16 + * @since 18 */ ArkUI_NativeDialogAPI_1 nativeDialogAPI1; /** * @brief Provides the custom dialog box APIs for the native side. The API scope is {@link ArkUI_NativeDialogAPI_2} * - * @since 16 + * @since 18 */ ArkUI_NativeDialogAPI_2 nativeDialogAPI2; /** @@ -405,7 +405,7 @@ typedef struct { * @return Returns the error 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. - * @since 16 + * @since 18 */ int32_t (*setLevelOrder)(ArkUI_NativeDialogHandle handle, double levelOrder); /** @@ -417,7 +417,7 @@ typedef struct { * @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. - * @since 16 + * @since 18 */ int32_t (*registerOnWillAppear)( @@ -432,7 +432,7 @@ typedef struct { * @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. - * @since 16 + * @since 18 */ int32_t (*registerOnDidAppear)( ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); @@ -446,7 +446,7 @@ typedef struct { * @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. - * @since 16 + * @since 18 */ int32_t (*registerOnWillDisappear)( ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); @@ -460,7 +460,7 @@ typedef struct { * @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. - * @since 16 + * @since 18 */ int32_t (*registerOnDidDisappear)( ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index e3354100d..edfafda42 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -728,7 +728,7 @@ int32_t OH_ArkUI_SetArkUIGestureRecognizerDisposeNotify(ArkUI_GestureRecognizer* * @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. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_DirectMask( ArkUI_GestureRecognizer* recognizer, ArkUI_GestureDirectionMask* directMask); @@ -741,7 +741,7 @@ int32_t OH_ArkUI_GetGestureParam_DirectMask( * @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. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_FingerCount(ArkUI_GestureRecognizer* recognizer, int* finger); @@ -753,7 +753,7 @@ int32_t OH_ArkUI_GetGestureParam_FingerCount(ArkUI_GestureRecognizer* recognizer * @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. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_limitFingerCount(ArkUI_GestureRecognizer* recognizer, bool* isLimited); @@ -766,7 +766,7 @@ int32_t OH_ArkUI_GetGestureParam_limitFingerCount(ArkUI_GestureRecognizer* recog * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not * supported. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_repeat(ArkUI_GestureRecognizer* recognizer, bool* isRepeat); @@ -779,7 +779,7 @@ int32_t OH_ArkUI_GetGestureParam_repeat(ArkUI_GestureRecognizer* recognizer, boo * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not * supported. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_distance(ArkUI_GestureRecognizer* recognizer, double* distance); @@ -792,7 +792,7 @@ int32_t OH_ArkUI_GetGestureParam_distance(ArkUI_GestureRecognizer* recognizer, d * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not * supported. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_speed(ArkUI_GestureRecognizer* recognizer, double* speed); @@ -805,7 +805,7 @@ int32_t OH_ArkUI_GetGestureParam_speed(ArkUI_GestureRecognizer* recognizer, doub * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not * supported. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_duration(ArkUI_GestureRecognizer* recognizer, int* duration); @@ -818,7 +818,7 @@ int32_t OH_ArkUI_GetGestureParam_duration(ArkUI_GestureRecognizer* recognizer, i * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not * supported. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_angle(ArkUI_GestureRecognizer* recognizer, double* angle); @@ -831,7 +831,7 @@ int32_t OH_ArkUI_GetGestureParam_angle(ArkUI_GestureRecognizer* recognizer, doub * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is not * supported. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_GetGestureParam_distanceThreshold(ArkUI_GestureRecognizer* recognizer, double* distanceThreshold); @@ -1097,7 +1097,7 @@ typedef struct { /** * @brief Defines the gesture APIs. * - * @since 16 + * @since 18 */ typedef struct { /** @@ -1125,7 +1125,7 @@ typedef struct { * * @param event Pointer to the gesture interruption information. * @return Returns the pointer to the custom data. -* @since 16 +* @since 18 */ void* OH_ArkUI_GestureInterrupter_GetUserData(ArkUI_GestureInterruptInfo* event); diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index eb38cee6c..851520486 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -78,7 +78,7 @@ enum { /** * @brief Status code for AI analyzer. * - * @since 16 + * @since 18 */ typedef enum { /** AI analyzer execution is finished. */ @@ -171,7 +171,7 @@ typedef enum { OH_NATIVEXCOMPONENT_MOUSE_RELEASE, OH_NATIVEXCOMPONENT_MOUSE_MOVE, /** Triggered when the mouse event is canceled. - * @since 16 + * @since 18 */ OH_NATIVEXCOMPONENT_MOUSE_CANCEL, } OH_NativeXComponent_MouseEventAction; @@ -878,7 +878,7 @@ int32_t OH_NativeXComponent_RegisterKeyEventCallbackWithResult( * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.\n * {@link ARKUI_ERROR_CODE_PARAM_INVALID} component is nullptr or callback is nullptr, * or the type of node is not XComponent.\n - * @since 16 + * @since 18 */ int32_t OH_ArkUI_XComponent_StartImageAnalyzer(ArkUI_NodeHandle node, void* userData, void (*callback)(ArkUI_NodeHandle node, ArkUI_XComponent_ImageAnalyzerState statusCode, void* userData)); @@ -891,14 +891,14 @@ int32_t OH_ArkUI_XComponent_StartImageAnalyzer(ArkUI_NodeHandle node, void* user * @return Returns the status code of the execution. * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.\n * {@link ARKUI_ERROR_CODE_PARAM_INVALID} component is nullptr or the type of node is not XComponent.\n - * @since 16 + * @since 18 */ int32_t OH_ArkUI_XComponent_StopImageAnalyzer(ArkUI_NodeHandle node); /** * @brief Provides an encapsulated OH_ArkUI_SurfaceHolder instance. * - * @since 16 + * @since 18 */ typedef struct OH_ArkUI_SurfaceHolder OH_ArkUI_SurfaceHolder; @@ -907,7 +907,7 @@ typedef struct OH_ArkUI_SurfaceHolder OH_ArkUI_SurfaceHolder; * * @param node Indicates the pointer to the XComponent node. * @return Returns the created OH_ArkUI_SurfaceHolder object's pointer. - * @since 16 + * @since 18 */ OH_ArkUI_SurfaceHolder* OH_ArkUI_SurfaceHolder_Create(ArkUI_NodeHandle node); @@ -915,7 +915,7 @@ OH_ArkUI_SurfaceHolder* OH_ArkUI_SurfaceHolder_Create(ArkUI_NodeHandle node); * @brief Disposes of a OH_ArkUI_SurfaceHolder object. * * @param node Indicates the pointer to OH_ArkUI_SurfaceHolder object needed to dispose. - * @since 16 + * @since 18 */ void OH_ArkUI_SurfaceHolder_Dispose(OH_ArkUI_SurfaceHolder* surfaceHolder); @@ -928,7 +928,7 @@ void OH_ArkUI_SurfaceHolder_Dispose(OH_ArkUI_SurfaceHolder* surfaceHolder); * @return Returns the error 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. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_SurfaceHolder_SetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder, void* userData); @@ -937,14 +937,14 @@ int32_t OH_ArkUI_SurfaceHolder_SetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder * * @param surfaceHolder Indicates the target OH_ArkUI_SurfaceHolder instance. * @return Returns the custom data. - * @since 16 + * @since 18 */ void* OH_ArkUI_SurfaceHolder_GetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder); /** * @brief Define the surface lifecycle callback. * - * @since 16 + * @since 18 */ typedef struct OH_ArkUI_SurfaceCallback OH_ArkUI_SurfaceCallback; @@ -952,7 +952,7 @@ typedef struct OH_ArkUI_SurfaceCallback OH_ArkUI_SurfaceCallback; * @brief Create a OH_ArkUI_SurfaceCallback object. * * @return Returns the created OH_ArkUI_SurfaceCallback object's pointer. - * @since 16 + * @since 18 */ OH_ArkUI_SurfaceCallback* OH_ArkUI_SurfaceCallback_Create(); @@ -960,7 +960,7 @@ OH_ArkUI_SurfaceCallback* OH_ArkUI_SurfaceCallback_Create(); * @brief Disposes of a OH_ArkUI_SurfaceCallback object. * * @param callback Indicates the pointer to OH_ArkUI_SurfaceCallback object needed to dispose. - * @since 16 + * @since 18 */ void OH_ArkUI_SurfaceCallback_Dispose(OH_ArkUI_SurfaceCallback* callback); @@ -970,7 +970,7 @@ void OH_ArkUI_SurfaceCallback_Dispose(OH_ArkUI_SurfaceCallback* callback); * @param callback Indicated the pointer to the surface callback. * @param onSurfaceCreated Indicates the surface created callback event * which will called when the surface is created. - * @since 16 + * @since 18 */ void OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent( OH_ArkUI_SurfaceCallback* callback, @@ -982,7 +982,7 @@ void OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent( * @param callback Indicated the pointer to the surface callback. * @param onSurfaceChanged Indicates the surface changed callback event * which will called when the surface is changed. - * @since 16 + * @since 18 */ void OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent( OH_ArkUI_SurfaceCallback* callback, @@ -994,7 +994,7 @@ void OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent( * @param callback Indicated the pointer to the surface callback. * @param onSurfaceDestroyed Indicates the surface destroyed callback event * which will called when the surface is destroyed. - * @since 16 + * @since 18 */ void OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent( OH_ArkUI_SurfaceCallback* callback, @@ -1008,7 +1008,7 @@ void OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent( * @return Returns the status code of the execution. * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_SurfaceHolder_AddSurfaceCallback( OH_ArkUI_SurfaceHolder* surfaceHolder, @@ -1023,7 +1023,7 @@ int32_t OH_ArkUI_SurfaceHolder_AddSurfaceCallback( * @return Returns the status code of the execution. * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback( OH_ArkUI_SurfaceHolder* surfaceHolder, @@ -1032,7 +1032,7 @@ int32_t OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback( /** * @brief Forward declaration of OHNativeWindow. * - * @since 16 + * @since 18 */ typedef struct NativeWindow OHNativeWindow; @@ -1041,7 +1041,7 @@ typedef struct NativeWindow OHNativeWindow; * * @param surfaceHolder Indicates the pointer to this OH_ArkUI_SurfaceHolder instance. * @return Returns the nativeWindow associated with this OH_ArkUI_SurfaceHolder instance. - * @since 16 + * @since 18 */ OHNativeWindow* OH_ArkUI_XComponent_GetNativeWindow(OH_ArkUI_SurfaceHolder* surfaceHolder); @@ -1056,7 +1056,7 @@ OHNativeWindow* OH_ArkUI_XComponent_GetNativeWindow(OH_ArkUI_SurfaceHolder* surf * @return Returns the status code of the execution. * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_XComponent_SetAutoInitialize(ArkUI_NodeHandle node, bool autoInitialize); @@ -1068,7 +1068,7 @@ int32_t OH_ArkUI_XComponent_SetAutoInitialize(ArkUI_NodeHandle node, bool autoIn * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. * {@link ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID} if the node has initialized. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_XComponent_Initialize(ArkUI_NodeHandle node); @@ -1080,7 +1080,7 @@ int32_t OH_ArkUI_XComponent_Initialize(ArkUI_NodeHandle node); * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. * {@link ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID} if the node has finalized. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_XComponent_Finalize(ArkUI_NodeHandle node); @@ -1092,7 +1092,7 @@ int32_t OH_ArkUI_XComponent_Finalize(ArkUI_NodeHandle node); * @return Returns the status code of the execution. * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_XComponent_IsInitialized(ArkUI_NodeHandle node, bool* isInitialized); diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index e146acb88..c246d755f 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -94,7 +94,7 @@ typedef enum { /** Image animator. */ ARKUI_NODE_IMAGE_ANIMATOR = 19, /** XComponent of type TEXTURE. - * @since 16 + * @since 18 */ ARKUI_NODE_XCOMPONENT_TEXTURE, /** Check box group. @@ -1886,7 +1886,7 @@ typedef enum { * .value[2].f32: width of the right edge. The unit is vp. \n * .value[3].f32: width of the bottom edge. The unit is vp. \n * - * @since 16 + * @since 18 */ NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100, @@ -1898,7 +1898,7 @@ typedef enum { * .object: next focus node. The parameter type is {@link ArkUI_NodeHandle}.\n * \n * - * @since 16 + * @since 18 */ NODE_NEXT_FOCUS = 101, @@ -1920,7 +1920,7 @@ typedef enum { * .object: parameters for visible area change events. * The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n * - * @since 16 + * @since 18 */ NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO = 102, @@ -3101,7 +3101,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: whether to center text vertically. \n * - * @since 16 + * @since 18 */ NODE_TEXT_INPUT_HALF_LEADING = 7034, @@ -3449,7 +3449,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: whether to center text vertically. \n * - * @since 16 + * @since 18 */ NODE_TEXT_AREA_HALF_LEADING = 8025, @@ -3503,7 +3503,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].f32: minimum font scale, in fp. * - * @since 16 + * @since 18 */ NODE_BUTTON_MIN_FONT_SCALE, @@ -3516,7 +3516,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].f32: maximum font scale, in fp. * - * @since 16 + * @since 18 */ NODE_BUTTON_MAX_FONT_SCALE, @@ -3736,7 +3736,7 @@ typedef enum { * .value[1].i32: The vertical offset of the surface relative to XComponent, in pixels. \n * .value[2].i32: The width of the surface created by XComponent, in pixels. \n * .value[3].i32: The height of the surface created by XComponent, in pixels. \n - * @since 16 + * @since 18 */ NODE_XCOMPONENT_SURFACE_RECT, /** @@ -3748,7 +3748,7 @@ typedef enum { * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * value[0].i32: The parameter type is 1 or 0. - * @since 16 + * @since 18 */ NODE_XCOMPONENT_ENABLE_ANALYZER, @@ -3882,7 +3882,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * value[0].i32: the mode. The value is and enum of {@link ArkUI_DatePickerMode}.\n. * - * @since 16 + * @since 18 */ NODE_DATE_PICKER_MODE = 13007, /** @@ -3896,7 +3896,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * value[0].i32: whether to feedback.\n * - * @since 16 + * @since 18 */ NODE_DATE_PICKER_ENABLE_HAPTIC_FEEDBACK = 13008, /** @@ -4006,7 +4006,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: time. The default value is "00:00:00".\n * - * @since 16 + * @since 18 */ NODE_TIME_PICKER_START = 14005, /** @@ -4019,7 +4019,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: time. The default value is "23:59:59".\n * - * @since 16 + * @since 18 */ NODE_TIME_PICKER_END = 14006, /** @@ -4032,7 +4032,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: whether to enable cascade.\n * - * @since 16 + * @since 18 */ NODE_TIME_PICKER_ENABLE_CASCADE = 14007, @@ -4206,7 +4206,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * value[0].i32: whether to feedback.\n * - * @since 16 + * @since 18 */ NODE_TEXT_PICKER_ENABLE_HAPTIC_FEEDBACK = 15010, /** @@ -4288,7 +4288,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: date. \n * - * @since 16 + * @since 18 */ NODE_CALENDAR_PICKER_START = 16004, /** @@ -4301,7 +4301,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: date. \n * - * @since 16 + * @since 18 */ NODE_CALENDAR_PICKER_END = 16005, /** @@ -4542,7 +4542,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * value[0].i32: whether to feedback.\n * - * @since 16 + * @since 18 */ NODE_SLIDER_ENABLE_HAPTIC_FEEDBACK = 17013, @@ -5100,7 +5100,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}: \n * .value[0].f32: maximum starting fling speed, Unit: vp/s \n * - * @since 16 + * @since 18 */ NODE_SCROLL_FLING_SPEED_LIMIT = 1002019, @@ -5114,7 +5114,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}: \n * .value[0].i32: clip content mode, The parameter type is {@link ArkUI_ContentClipMode}. \n * - * @since 16 + * @since 18 */ NODE_SCROLL_CLIP_CONTENT = 1002020, @@ -5356,7 +5356,7 @@ typedef enum { * .value[0].i32: whether the List component starts layout from the end. The value 0 means layout * starts from the top, and 1 means layout starts from the end. The default value is 0. \n * - * @since 16 + * @since 18 */ NODE_LIST_STACK_FROM_END = 1003014, @@ -5702,7 +5702,7 @@ typedef enum { * .value[0].f32: minimum main axis size of the child element, Unit: vp. \n * .value[1].i32: whether to turn pages by group. \n * - * @since 16 + * @since 18 */ NODE_SWIPER_AUTO_FILL, @@ -6101,7 +6101,7 @@ typedef enum { * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: waterflow layout mode. The parameter type is {@Link ArkUI_WaterFlowLayoutMode}. - * @since 16 + * @since 18 */ NODE_WATER_FLOW_LAYOUT_MODE, @@ -6228,7 +6228,7 @@ typedef enum { * ...\n * value[n].f32: percentage of total width.\n * - * @since 16 + * @since 18 */ NODE_TEXT_PICKER_COLUMN_WIDTHS = 15009, /** @@ -6243,7 +6243,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: A string of dates.\n * - * @since 16 + * @since 18 */ NODE_CALENDAR_PICKER_DISABLED_DATE_RANGE = 16006, @@ -6257,7 +6257,7 @@ typedef enum { * Format of the return value {@link ArkUI_AttributeItem}:\n * value[0].i32: whether the calendar picker marks today.\n * - * @since 16 + * @since 18 */ NODE_CALENDAR_PICKER_MARK_TODAY = 16007, } ArkUI_NodeAttributeType; @@ -6596,7 +6596,7 @@ typedef enum { * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is * {@link ArkUI_UIInputEvent}. \n * - * @since 16 + * @since 18 */ NODE_ON_AXIS = 25, @@ -6606,7 +6606,7 @@ typedef enum { * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is * {@link ArkUI_UIInputEvent}. \n * - * @since 16 + * @since 18 */ NODE_ON_CLICK_EVENT = 26, @@ -6617,7 +6617,7 @@ typedef enum { * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is * {@link ArkUI_UIInputEvent}. \n * - *@since 16 + *@since 18 */ NODE_ON_HOVER_EVENT = 27, @@ -6636,7 +6636,7 @@ typedef enum { * ArkUI_NodeComponentEvent.data[1].f32: ratio of the component's visible area to its total area * when this callback is invoked. \n * - * @since 16 + * @since 18 */ NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_EVENT = 28, @@ -7315,7 +7315,7 @@ typedef enum { * {@link ArkUI_NodeComponentEvent} contains one parameter:\n * ArkUI_NodeComponentEvent.data[0].i32: index of the currently selected element. \n * - * @since 16 + * @since 18 */ NODE_SWIPER_EVENT_ON_SELECTED = 1001005, @@ -7332,7 +7332,7 @@ typedef enum { * {@link ArkUI_NodeComponentEvent} contains one parameter:\n * ArkUI_NodeComponentEvent.data[0].i32: the index of the element becomes unselected. \n * - * @since 16 + * @since 18 */ NODE_SWIPER_EVENT_ON_UNSELECTED = 1001006, @@ -9105,7 +9105,7 @@ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeH * {@link ARKUI_ERROR_CODE_NO_ERROR} success. * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target_parent, int32_t index); diff --git a/arkui/ace_engine/native/native_node_napi.h b/arkui/ace_engine/native/native_node_napi.h index bba66d373..8070149fa 100644 --- a/arkui/ace_engine/native/native_node_napi.h +++ b/arkui/ace_engine/native/native_node_napi.h @@ -369,7 +369,7 @@ ArkUI_ErrorCode OH_ArkUI_GetRouterPageId( * Returns {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. * Returns {@link ARKUI_ERROR_CODE_UI_CONTEXT_INVALID} if the uiContext is invalid. * Returns {@link ARKUI_ERROR_CODE_CALLBACK_INVALID} if the callback function is invalid. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_PostFrameCallback(ArkUI_ContextHandle uiContext, void* userData, void (*callback)(uint64_t nanoTimestamp, uint32_t frameCount, void* userData)); diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 3ebb48bba..395d66b46 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -139,14 +139,14 @@ typedef struct ArkUI_SwiperIndicator ArkUI_SwiperIndicator; /** * @brief Defines the digital indicator style for the swiper. * - * @since 16 + * @since 18 */ typedef struct ArkUI_SwiperDigitIndicator ArkUI_SwiperDigitIndicator; /** * @brief Defines the arrow style for the swiper. * - * @since 16 + * @since 18 */ typedef struct ArkUI_SwiperArrowStyle ArkUI_SwiperArrowStyle; @@ -566,7 +566,7 @@ typedef enum { /** * @brief Enumerates the modes of the date picker. * - * @since 16 + * @since 18 */ typedef enum { /** A mode that displays the date in months, days of month, and years. */ @@ -638,7 +638,7 @@ typedef enum { /** * @brief Enumerates the edges for which the effect takes effect when the boundary of the scrollable content is reached. * - * @since 16 + * @since 18 */ typedef enum { /** Start edge. */ @@ -722,7 +722,7 @@ typedef enum { /** * @brief Enumerates the content clipping modes of scrollable components. * - * @since 16 + * @since 18 */ typedef enum { /** clip by content */ @@ -736,7 +736,7 @@ typedef enum { /** * @brief Enumerates the layout modes of the WaterFlow component. * - * @since 16 + * @since 18 */ typedef enum { /** Layout items from top to viewport. */ @@ -1608,7 +1608,7 @@ typedef enum { /** * @brief Line breaks can occur between any two syllabic units for non-CJK text. * CJK text behavior is the same as for NORMAL. - * @since 16 + * @since 18 */ ARKUI_WORD_BREAK_HYPHENATION, } ArkUI_WordBreak; @@ -1885,7 +1885,7 @@ typedef enum { ARKUI_BUTTON_TYPE_CIRCLE, /** * Rounded rectangle button. - * @since 16 + * @since 18 */ ARKUI_BUTTON_ROUNDED_RECTANGLE = 8 } ArkUI_ButtonType; @@ -1953,72 +1953,72 @@ typedef enum { /** * Passport number. The scenario-based autofill feature, when enabled, can automatically save and fill in passport * numbers. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_PASSPORT_NUMBER, /** * Passport validity. The scenario-based autofill feature, when enabled, can automatically save and fill in * passport validities. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_VALIDITY, /** * Place of issue. The scenario-based autofill feature, when enabled, can automatically save and fill in * place of issues. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_ISSUE_AT, /** * Tax organization. The scenario-based autofill feature, when enabled, can automatically save and fill in tax * organizations. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_ORGANIZATION, /** * Tax id. The scenario-based autofill feature, when enabled, can automatically save and fill in standard Tax ids. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_TAX_ID, /** * City name and state name or state code. The scenario-based autofill feature, when enabled, can automatically * save and fill in city names and state names or state codes. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_ADDRESS_CITY_AND_STATE, /** * Flight number. The scenario-based autofill feature, when enabled, can automatically save and fill in flight * numbers. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_FLIGHT_NUMBER, /** * License number. The scenario-based autofill feature, when enabled, can automatically save and fill in license * numbers. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_NUMBER, /** * License file number. The scenario-based autofill feature, when enabled, can automatically save and fill in * license file numbers. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_FILE_NUMBER, /** * License plate number. The scenario-based autofill feature, when enabled, can automatically save and fill in * license plate numbers. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_PLATE, /** * Engine number. The scenario-based autofill feature, when enabled, can automatically save and fill in engine * numbers. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_ENGINE_NUMBER, /** * License chassis number. The scenario-based autofill feature, when enabled, can automatically save and fill in * license chassis numbers. - * @since 16 + * @since 18 */ ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_CHASSIS_NUMBER, } ArkUI_TextInputContentType; @@ -2132,7 +2132,7 @@ typedef enum { ARKUI_ERROR_CODE_PARAM_INVALID = 401, /** * @error CAPI init error. - * @since 16 + * @since 18 */ ARKUI_ERROR_CODE_CAPI_INIT_ERROR = 500, /** @@ -2143,7 +2143,7 @@ typedef enum { ARKUI_ERROR_CODE_INTERNAL_ERROR = 100001, /** * @error The XComponent is in invalid state. - * @since 16 + * @since 18 */ ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID = 103501, /** @error The component does not support specific properties or events. */ @@ -2219,22 +2219,22 @@ typedef enum { ARKUI_ERROR_CODE_INVALID_STYLED_STRING = 180101, /** * @error The uiContext is invalid. - * @since 16 + * @since 18 */ ARKUI_ERROR_CODE_UI_CONTEXT_INVALID = 190001, /** * @error The callback function is invalid. - * @since 16 + * @since 18 */ ARKUI_ERROR_CODE_CALLBACK_INVALID = 190002, /** * @error The gesture recognizer type is not supported. - * @since 16 + * @since 18 */ ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED = 180102, /** * @error operation is not allowed for current drag drop pharse. - * @since 16 + * @since 18 */ ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED = 190004, } ArkUI_ErrorCode; @@ -2521,7 +2521,7 @@ typedef enum { /** * @brief Define an enum for the focus movement directions. * - * @since 16 + * @since 18 */ typedef enum { /** Move focus forward. */ @@ -3154,7 +3154,7 @@ int32_t OH_ArkUI_SwiperIndicator_GetMaxDisplayCount(ArkUI_SwiperIndicator* indic * @param indicator Indicates the pointer to the indicator. * @param ignoreSize Whether to ignore the size of the indicator. The value 1 means to ignore, and 0 means the opposite. * The default value is 0. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator, int32_t ignoreSize); @@ -3163,7 +3163,7 @@ void OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indic * * @param indicator Indicates the pointer to the indicator. * @return Returns whether to ignore the size of the indicator. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator); @@ -3172,7 +3172,7 @@ int32_t OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* in * * @param indicator Indicates the pointer to the indicator. * @param space the space between the dots of the navigation indicator, the default value is 8vp. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperIndicator_SetSpace(ArkUI_SwiperIndicator* indicator, float space); @@ -3181,7 +3181,7 @@ void OH_ArkUI_SwiperIndicator_SetSpace(ArkUI_SwiperIndicator* indicator, float s * * @param indicator Indicates the pointer to the indicator. * @return the space between the dots of the navigation indicator - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperIndicator_GetSpace(ArkUI_SwiperIndicator* indicator); @@ -3189,7 +3189,7 @@ float OH_ArkUI_SwiperIndicator_GetSpace(ArkUI_SwiperIndicator* indicator); * @brief Creates a digital indicator. * * @return Returns the pointer to the new indicator. - * @since 16 + * @since 18 */ ArkUI_SwiperDigitIndicator *OH_ArkUI_SwiperDigitIndicator_Create(); @@ -3198,7 +3198,7 @@ ArkUI_SwiperDigitIndicator *OH_ArkUI_SwiperDigitIndicator_Create(); * * @param indicator The pointer to the digital indicator. * @param value Indicates the distance between the digital indicator and the start of the swiper. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetStartPosition(ArkUI_SwiperDigitIndicator* indicator, float value); @@ -3207,7 +3207,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetStartPosition(ArkUI_SwiperDigitIndicator* * * @param indicator The pointer to the digital indicator. * @return Returns the distance between the digital indicator and the start of the swiper. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperDigitIndicator_GetStartPosition(ArkUI_SwiperDigitIndicator* indicator); @@ -3216,7 +3216,7 @@ float OH_ArkUI_SwiperDigitIndicator_GetStartPosition(ArkUI_SwiperDigitIndicator* * * @param indicator The pointer to the digital indicator. * @param value Indicates the distance between the digital indicator and the top of the swiper. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetTopPosition(ArkUI_SwiperDigitIndicator* indicator, float value); @@ -3225,7 +3225,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetTopPosition(ArkUI_SwiperDigitIndicator* in * * @param indicator The pointer to the digital indicator. * @return Returns the distance between the digital indicator and the top of the swiper. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperDigitIndicator_GetTopPosition(ArkUI_SwiperDigitIndicator* indicator); @@ -3234,7 +3234,7 @@ float OH_ArkUI_SwiperDigitIndicator_GetTopPosition(ArkUI_SwiperDigitIndicator* i * * @param indicator The pointer to the digital indicator. * @param value Indicates the distance between the digital indicator and the end of the swiper. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetEndPosition(ArkUI_SwiperDigitIndicator* indicator, float value); @@ -3243,7 +3243,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetEndPosition(ArkUI_SwiperDigitIndicator* in * * @param indicator The pointer to the digital indicator. * @return Returns the distance between the digital indicator and the end of the swiper. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperDigitIndicator_GetEndPosition(ArkUI_SwiperDigitIndicator* indicator); @@ -3252,7 +3252,7 @@ float OH_ArkUI_SwiperDigitIndicator_GetEndPosition(ArkUI_SwiperDigitIndicator* i * * @param indicator The pointer to the digital indicator. * @param value Returns the distance between the digital indicator and the bottom of the swiper. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetBottomPosition(ArkUI_SwiperDigitIndicator* indicator, float value); @@ -3261,7 +3261,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetBottomPosition(ArkUI_SwiperDigitIndicator* * * @param indicator The pointer to the digital indicator. * @return Returns the distance between the digital indicator and the bottom of the swiper. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperDigitIndicator_GetBottomPosition(ArkUI_SwiperDigitIndicator* indicator); @@ -3270,7 +3270,7 @@ float OH_ArkUI_SwiperDigitIndicator_GetBottomPosition(ArkUI_SwiperDigitIndicator * * @param indicator The pointer to the digital indicator. * @param color font color, in 0xARGB format. Default value: 0xFF182431. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t color); @@ -3279,7 +3279,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetFontColor(ArkUI_SwiperDigitIndicator* indi * * @param indicator The pointer to the digital indicator. * @return font color, in 0xARGB format. - * @since 16 + * @since 18 */ uint32_t OH_ArkUI_SwiperDigitIndicator_GetFontColor(ArkUI_SwiperDigitIndicator* indicator); @@ -3288,7 +3288,7 @@ uint32_t OH_ArkUI_SwiperDigitIndicator_GetFontColor(ArkUI_SwiperDigitIndicator* * * @param indicator The pointer to the digital indicator. * @param selectedColor font color, in 0xARGB format. Default value: 0xFF182431. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t selectedColor); @@ -3297,7 +3297,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor(ArkUI_SwiperDigitIndicat * * @param indicator The pointer to the digital indicator. * @return font color, in 0xARGB format. - * @since 16 + * @since 18 */ uint32_t OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator); @@ -3306,7 +3306,7 @@ uint32_t OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor(ArkUI_SwiperDigitInd * * @param indicator The pointer to the digital indicator. * @param size font size, in fp. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetFontSize(ArkUI_SwiperDigitIndicator* indicator, float size); @@ -3315,7 +3315,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetFontSize(ArkUI_SwiperDigitIndicator* indic * * @param indicator The pointer to the digital indicator. * @return font size, in fp. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperDigitIndicator_GetFontSize(ArkUI_SwiperDigitIndicator* indicator); @@ -3324,7 +3324,7 @@ float OH_ArkUI_SwiperDigitIndicator_GetFontSize(ArkUI_SwiperDigitIndicator* indi * * @param indicator The pointer to the digital indicator. * @param size font size, in fp. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator, float size); @@ -3333,7 +3333,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize(ArkUI_SwiperDigitIndicato * * @param indicator The pointer to the digital indicator. * @return font size, in fp. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator); @@ -3342,7 +3342,7 @@ float OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize(ArkUI_SwiperDigitIndicat * * @param indicator The pointer to the digital indicator. * @param fontWeight font weight {@link ArkUI_FontWeight}. The default value is ARKUI_FONT_WEIGHT_NORMAL. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight fontWeight); @@ -3351,7 +3351,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetFontWeight(ArkUI_SwiperDigitIndicator *ind * * @param indicator The pointer to the digital indicator. * @return font weight {@link ArkUI_FontWeight}. - * @since 16 + * @since 18 */ ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetFontWeight(ArkUI_SwiperDigitIndicator* indicator); @@ -3360,7 +3360,7 @@ ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetFontWeight(ArkUI_SwiperDigitIn * * @param indicator The pointer to the digital indicator. * @param selectedFontWeight font weight {@link ArkUI_FontWeight}. The default value is ARKUI_FONT_WEIGHT_NORMAL. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight( ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight selectedFontWeight); @@ -3370,7 +3370,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight( * * @param indicator The pointer to the digital indicator. * @return font weight {@link ArkUI_FontWeight}. - * @since 16 + * @since 18 */ ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight(ArkUI_SwiperDigitIndicator* indicator); @@ -3378,7 +3378,7 @@ ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight(ArkUI_Swipe * @brief Destroys the digital indicator. * * @param indicator The pointer to the digital indicator. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_Destroy(ArkUI_SwiperDigitIndicator *indicator); @@ -3388,7 +3388,7 @@ void OH_ArkUI_SwiperDigitIndicator_Destroy(ArkUI_SwiperDigitIndicator *indicator * @param indicator The pointer to the digital indicator. * @param ignoreSize Whether to ignore the size of the indicator. The value 1 means to ignore, and 0 means the opposite. * The default value is 0. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator, int32_t ignoreSize); @@ -3397,7 +3397,7 @@ void OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndica * * @param indicator The pointer to the digital indicator. * @return Returns whether to ignore the size of the indicator. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator); @@ -3405,7 +3405,7 @@ int32_t OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperDigitInd * @brief Creates a arrow style for swiper. * * @return Returns the pointer to the new arrow style. - * @since 16 + * @since 18 */ ArkUI_SwiperArrowStyle *OH_ArkUI_SwiperArrowStyle_Create(); @@ -3416,7 +3416,7 @@ ArkUI_SwiperArrowStyle *OH_ArkUI_SwiperArrowStyle_Create(); * @param showBackground whether to show the background for the arrow. * The value 1 means to show the background, and 0 means the opposite. * The default value is 0. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperArrowStyle_SetShowBackground(ArkUI_SwiperArrowStyle *arrowStyle, int32_t showBackground); @@ -3426,7 +3426,7 @@ void OH_ArkUI_SwiperArrowStyle_SetShowBackground(ArkUI_SwiperArrowStyle *arrowSt * @param arrowStyle The pointer to the arrow style. * @return whether to show the background for the arrow. * The value 1 means to show the background, and 0 means the opposite. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_SwiperArrowStyle_GetShowBackground(ArkUI_SwiperArrowStyle* arrowStyle); @@ -3438,7 +3438,7 @@ int32_t OH_ArkUI_SwiperArrowStyle_GetShowBackground(ArkUI_SwiperArrowStyle* arro * The value 1 means to display on boths sides of the swiper, * and 0 means display on boths sides of the swiper indicator. * The default value is 0. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle, int32_t showSidebarMiddle); @@ -3448,7 +3448,7 @@ void OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arro * @param arrowStyle The pointer to the arrow style. * @return the display position of the arrow. The value 1 means to display on boths sides of the swiper, * and 0 means display on boths sides of the swiper indicator. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle); @@ -3459,7 +3459,7 @@ int32_t OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle(ArkUI_SwiperArrowStyle* a * @param backgroundSize the background size of the arrow. The unit is vp. * The default value is 24 when the arrow displays on both sides of the swiper indicator. * The default value is 32 when the arrow displays on both sides of the swiper. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperArrowStyle_SetBackgroundSize(ArkUI_SwiperArrowStyle* arrowStyle, float backgroundSize); @@ -3468,7 +3468,7 @@ void OH_ArkUI_SwiperArrowStyle_SetBackgroundSize(ArkUI_SwiperArrowStyle* arrowSt * * @param arrowStyle The pointer to the arrow style. * @return Returns the background size of the arrow. The unit is vp. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperArrowStyle_GetBackgroundSize(ArkUI_SwiperArrowStyle *arrowStyle); @@ -3476,7 +3476,7 @@ float OH_ArkUI_SwiperArrowStyle_GetBackgroundSize(ArkUI_SwiperArrowStyle *arrowS * @brief Destroys the arrow style. * * @param arrowStyle The pointer to the arrow style. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperArrowStyle_Destroy(ArkUI_SwiperArrowStyle *arrowStyle); @@ -3487,7 +3487,7 @@ void OH_ArkUI_SwiperArrowStyle_Destroy(ArkUI_SwiperArrowStyle *arrowStyle); * @param backgroundColor the background color of the arrow, in 0xARGB format. * The default value is 0x00000000 when the arrow displays on both sides of the swiper indicator. * The default value is 0x19182431 when the arrow displays on both sides of the swiper. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperArrowStyle_SetBackgroundColor(ArkUI_SwiperArrowStyle *arrowStyle, uint32_t backgroundColor); @@ -3496,7 +3496,7 @@ void OH_ArkUI_SwiperArrowStyle_SetBackgroundColor(ArkUI_SwiperArrowStyle *arrowS * * @param arrowStyle The pointer to the arrow style. * @return Returns the background color of the arrow, in 0xARGB format. - * @since 16 + * @since 18 */ uint32_t OH_ArkUI_SwiperArrowStyle_GetBackgroundColor(ArkUI_SwiperArrowStyle* arrowStyle); @@ -3508,7 +3508,7 @@ uint32_t OH_ArkUI_SwiperArrowStyle_GetBackgroundColor(ArkUI_SwiperArrowStyle* ar * The default value is 18 when the arrow displays on both sides of the swiper indicator. * The default value is 24 when the arrow displays on both sides of the swiper. * The arrow size is fixed to 3/4 of the background size when the background is shown. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperArrowStyle_SetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle, float arrowSize); @@ -3517,7 +3517,7 @@ void OH_ArkUI_SwiperArrowStyle_SetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle, * * @param arrowStyle The pointer to the arrow style. * @return the size of the arrow. The unit is vp. - * @since 16 + * @since 18 */ float OH_ArkUI_SwiperArrowStyle_GetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle); @@ -3526,7 +3526,7 @@ float OH_ArkUI_SwiperArrowStyle_GetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle) * * @param arrowStyle The pointer to the arrow style. * @param arrowColor the color of the arrow, in 0xARGB format. The default value is 0x00182431. - * @since 16 + * @since 18 */ void OH_ArkUI_SwiperArrowStyle_SetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle, uint32_t arrowColor); @@ -3535,7 +3535,7 @@ void OH_ArkUI_SwiperArrowStyle_SetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle, * * @param arrowStyle The pointer to the arrow style. * @return Returns the color of the arrow, in 0xARGB format. - * @since 16 + * @since 18 */ uint32_t OH_ArkUI_SwiperArrowStyle_GetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle); @@ -4653,7 +4653,7 @@ int32_t OH_ArkUI_AccessibilityValue_GetCurrent(ArkUI_AccessibilityValue* value); * * @param value accessibility value object. * @param rangeMin minimum value based on range components, The default value is -1. - * @since 16 + * @since 18 */ void OH_ArkUI_AccessibilityValue_SetRangeMin(ArkUI_AccessibilityValue* value, int32_t rangeMin); @@ -4663,7 +4663,7 @@ void OH_ArkUI_AccessibilityValue_SetRangeMin(ArkUI_AccessibilityValue* value, in * @param value accessibility value object. * @return minimum value based on range components, The default value is -1. * If the function parameter is abnormal, return -1. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_AccessibilityValue_GetRangeMin(ArkUI_AccessibilityValue* value); @@ -4672,7 +4672,7 @@ int32_t OH_ArkUI_AccessibilityValue_GetRangeMin(ArkUI_AccessibilityValue* value) * * @param value accessibility value object. * @param rangeMax maximum value based on range components, The default value is -1. - * @since 16 + * @since 18 */ void OH_ArkUI_AccessibilityValue_SetRangeMax(ArkUI_AccessibilityValue* value, int32_t rangeMax); @@ -4682,7 +4682,7 @@ void OH_ArkUI_AccessibilityValue_SetRangeMax(ArkUI_AccessibilityValue* value, in * @param value accessibility value object. * @return maximum value based on range components, The default value is -1. * If the function parameter is abnormal, return -1. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_AccessibilityValue_GetRangeMax(ArkUI_AccessibilityValue* value); @@ -4691,7 +4691,7 @@ int32_t OH_ArkUI_AccessibilityValue_GetRangeMax(ArkUI_AccessibilityValue* value) * * @param value accessibility value object. * @param rangeCurrent value based on range components, The default value is -1. - * @since 16 + * @since 18 */ void OH_ArkUI_AccessibilityValue_SetRangeCurrent(ArkUI_AccessibilityValue* value, int32_t rangeCurrent); @@ -4701,7 +4701,7 @@ void OH_ArkUI_AccessibilityValue_SetRangeCurrent(ArkUI_AccessibilityValue* value * @param value accessibility value object. * @return current value based on range components, The default value is -1. * If the function parameter is abnormal, return -1. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_AccessibilityValue_GetRangeCurrent(ArkUI_AccessibilityValue* value); @@ -4944,7 +4944,7 @@ bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageO /** * @brief Defines the parameters for visible area change events. * - * @since 16 + * @since 18 */ typedef struct ArkUI_VisibleAreaEventOptions ArkUI_VisibleAreaEventOptions; @@ -4952,7 +4952,7 @@ typedef struct ArkUI_VisibleAreaEventOptions ArkUI_VisibleAreaEventOptions; * @brief Creates an instance of visible area change event parameters * * @return Returns the created instance of visible area change event parameters. -* @since 16 +* @since 18 */ ArkUI_VisibleAreaEventOptions* OH_ArkUI_VisibleAreaEventOptions_Create(); @@ -4960,7 +4960,7 @@ ArkUI_VisibleAreaEventOptions* OH_ArkUI_VisibleAreaEventOptions_Create(); * @brief Disposes of an instance of visible area change event parameters. * * @param option Instance to be destroyed. -* @since 16 +* @since 18 */ void OH_ArkUI_VisibleAreaEventOptions_Dispose(ArkUI_VisibleAreaEventOptions* option); @@ -4978,7 +4978,7 @@ void OH_ArkUI_VisibleAreaEventOptions_Dispose(ArkUI_VisibleAreaEventOptions* opt * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * If an error code is returned, it may be due to a failure in parameter validation; * the parameter must not be null. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_VisibleAreaEventOptions_SetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t size); @@ -4992,7 +4992,7 @@ int32_t OH_ArkUI_VisibleAreaEventOptions_SetRatios(ArkUI_VisibleAreaEventOptions * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. * If an error code is returned, it may be due to a failure in parameter validation; * the parameter must not be null. -* @since 16 +* @since 18 */ int32_t OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval( ArkUI_VisibleAreaEventOptions *option, int32_t value); @@ -5009,7 +5009,7 @@ int32_t OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval( * Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the provided buffer size is insufficient. * If an error code is returned, it may be due to a failure in parameter validation; * the parameter must not be null. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t* size); @@ -5018,7 +5018,7 @@ int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions * * @param option Instance of visible area change event parameters. * @return Returns the expected update interval, in ms. Default value: 1000. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions* option); #ifdef __cplusplus diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 038320022..ddb8eb744 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -64,7 +64,7 @@ typedef enum { /** * @brief key event. * - * @since 16 + * @since 18 */ ARKUI_UIINPUTEVENT_TYPE_KEY = 4, } ArkUI_UIInputEvent_Type; @@ -166,7 +166,7 @@ enum { /** Move. */ UI_MOUSE_EVENT_ACTION_MOVE = 3, /** Cancel. - * @since 16 + * @since 18 */ UI_MOUSE_EVENT_ACTION_CANCEL = 13, }; @@ -882,7 +882,7 @@ int32_t OH_ArkUI_FocusAxisEvent_SetStopPropagation(const ArkUI_UIInputEvent* eve * * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the width of the component hit by the event; returns 0.0f if any parameter error occurs. -* @since 16 +* @since 18 */ float OH_ArkUI_UIInputEvent_GetEventTargetWidth(const ArkUI_UIInputEvent* event); @@ -891,7 +891,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetWidth(const ArkUI_UIInputEvent* event) * * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the height of the component hit by the event; returns 0.0f if any parameter error occurs. -* @since 16 +* @since 18 */ float OH_ArkUI_UIInputEvent_GetEventTargetHeight(const ArkUI_UIInputEvent* event); @@ -900,7 +900,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetHeight(const ArkUI_UIInputEvent* event * * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the X coordinate of the component hit by the event; returns 0.0f if any parameter error occurs. -* @since 16 +* @since 18 */ float OH_ArkUI_UIInputEvent_GetEventTargetPositionX(const ArkUI_UIInputEvent* event); @@ -910,7 +910,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetPositionX(const ArkUI_UIInputEvent* ev * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the Y coordinate of the component hit by the event; * returns 0.0f if any parameter error occurs. -* @since 16 +* @since 18 */ float OH_ArkUI_UIInputEvent_GetEventTargetPositionY(const ArkUI_UIInputEvent* event); @@ -920,7 +920,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetPositionY(const ArkUI_UIInputEvent* ev * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the global X coordinate of the component hit by the event; * returns 0.0f if any parameter error occurs. -* @since 16 +* @since 18 */ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(const ArkUI_UIInputEvent* event); @@ -930,7 +930,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(const ArkUI_UIInputEve * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns the global Y coordinate of the component hit by the event; * returns 0.0f if any parameter error occurs. -* @since 16 +* @since 18 */ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEvent* event); @@ -940,7 +940,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEve * @param event Pointer to an ArkUI_UIInputEvent object. * @return Returns true if the cursor is hovering over the current component. * Returns false if the cursor is not hovering over the current component. -* @since 16 +* @since 18 */ bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event); @@ -953,7 +953,7 @@ bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event); * @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. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_UIInputEvent_GetModifierKeyStates(const ArkUI_UIInputEvent* event, uint64_t* keys); @@ -1022,7 +1022,7 @@ int32_t OH_ArkUI_UIInputEvent_GetTargetDisplayId(const ArkUI_UIInputEvent* event * @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. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool propagation); @@ -1031,7 +1031,7 @@ int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool * * @param event Pointer to the UI input event. * @return Returns the scroll step configuration of the mouse wheel axis event. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_AxisEvent_GetScrollStep(const ArkUI_UIInputEvent* event); diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h index e27c7a103..c1dd962f8 100644 --- a/arkui/napi/native_api.h +++ b/arkui/napi/native_api.h @@ -462,7 +462,7 @@ NAPI_EXTERN napi_status napi_create_sendable_object_with_properties(napi_env env * {@link napi_invalid_arg } If the param env, js_object or native_object is nullptr.\n * {@link napi_object_expected } If the param js_object is not an ArkTS Object or Function.\n * {@link napi_pending_exception } If have uncaught exception, or exception occured in execution.\n - * @since 16 + * @since 18 */ NAPI_EXTERN napi_status napi_wrap_enhance(napi_env env, napi_value js_object, diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index c4fb2990a..c4b9c2f66 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -340,7 +340,7 @@ char **OH_Pasteboard_GetMimeTypes(OH_Pasteboard *pasteboard, unsigned int *count * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. * @return the number of Pasteboard data changes. * Returns 0 means initial value or invalid value.In this case, no action is required. - * @since 16 + * @since 18 */ uint32_t OH_Pasteboard_GetChangeCount(OH_Pasteboard *pasteboard); diff --git a/distributeddatamgr/preferences/include/oh_preferences.h b/distributeddatamgr/preferences/include/oh_preferences.h index 837891ae7..dc6c28217 100644 --- a/distributeddatamgr/preferences/include/oh_preferences.h +++ b/distributeddatamgr/preferences/include/oh_preferences.h @@ -271,7 +271,7 @@ int OH_Preferences_UnregisterDataObserver(OH_Preferences *preference, void *cont * @return Returns the status code of the execution. * {@link PREFERENCES_OK} indicates the operation is successful. * {@link PREFERENCES_ERROR_INVALID_PARAM} indicates invalid args are passed in. - * @since 16 + * @since 18 */ int OH_Preferences_IsStorageTypeSupported(Preferences_StorageType type, bool *isSupported); diff --git a/distributeddatamgr/preferences/include/oh_preferences_option.h b/distributeddatamgr/preferences/include/oh_preferences_option.h index 9100f4054..05597f409 100644 --- a/distributeddatamgr/preferences/include/oh_preferences_option.h +++ b/distributeddatamgr/preferences/include/oh_preferences_option.h @@ -55,7 +55,7 @@ typedef struct OH_PreferencesOption OH_PreferencesOption; /** * @brief Enumerates the preferences storage types. * - * @since 16 + * @since 18 */ typedef enum Preferences_StorageType { /** XML storage*/ @@ -122,7 +122,7 @@ int OH_PreferencesOption_SetDataGroupId(OH_PreferencesOption *option, const char * {@link PREFERENCES_OK} success. * {@link PREFERENCES_ERROR_INVALID_PARAM} indicates invalid args are passed in. * @see OH_PreferencesOption. - * @since 16 + * @since 18 */ int OH_PreferencesOption_SetStorageType(OH_PreferencesOption *option, Preferences_StorageType type); diff --git a/distributeddatamgr/relational_store/include/oh_cursor.h b/distributeddatamgr/relational_store/include/oh_cursor.h index 998e028d6..5f907b44b 100644 --- a/distributeddatamgr/relational_store/include/oh_cursor.h +++ b/distributeddatamgr/relational_store/include/oh_cursor.h @@ -284,7 +284,7 @@ struct OH_Cursor { * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. - * @since 16 + * @since 18 */ int OH_Cursor_GetFloatVectorCount(OH_Cursor *cursor, int32_t columnIndex, size_t *length); @@ -312,7 +312,7 @@ int OH_Cursor_GetFloatVectorCount(OH_Cursor *cursor, int32_t columnIndex, size_t * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. * @see OH_Cursor_GetFloatVectorCount. - * @since 16 + * @since 18 */ int OH_Cursor_GetFloatVector(OH_Cursor *cursor, int32_t columnIndex, float *val, size_t inLen, size_t *outLen); diff --git a/distributeddatamgr/relational_store/include/oh_data_value.h b/distributeddatamgr/relational_store/include/oh_data_value.h index efdd3a2f5..202158324 100644 --- a/distributeddatamgr/relational_store/include/oh_data_value.h +++ b/distributeddatamgr/relational_store/include/oh_data_value.h @@ -34,7 +34,7 @@ * @library libnative_rdb_ndk.z.so * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * - * @since 16 + * @since 18 */ #ifndef OH_DATA_VALUE_H @@ -98,13 +98,13 @@ typedef enum OH_ColumnType { /** * @brief Indicates the column type is FLOAT VECTOR. * - * @since 16 + * @since 18 */ TYPE_FLOAT_VECTOR, /** * @brief Indicates that the column type is a number whose length is greater than 64 bits. * - * @since 16 + * @since 18 */ TYPE_UNLIMITED_INT, } OH_ColumnType; @@ -112,7 +112,7 @@ typedef enum OH_ColumnType { /** * @brief Define the OH_Data_Value structure type. * - * @since 16 + * @since 18 */ typedef struct OH_Data_Value OH_Data_Value; @@ -123,7 +123,7 @@ typedef struct OH_Data_Value OH_Data_Value; * Otherwise, nullptr is returned. The memory must be released through the OH_Value_Destroy * interface after the use is complete. * @see OH_Value_Destroy. - * @since 16 + * @since 18 */ OH_Data_Value *OH_Value_Create(); @@ -134,7 +134,7 @@ OH_Data_Value *OH_Value_Create(); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_Destroy(OH_Data_Value *value); @@ -145,7 +145,7 @@ int OH_Value_Destroy(OH_Data_Value *value); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutNull(OH_Data_Value *value); @@ -157,7 +157,7 @@ int OH_Value_PutNull(OH_Data_Value *value); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutInt(OH_Data_Value *value, int64_t val); @@ -169,7 +169,7 @@ int OH_Value_PutInt(OH_Data_Value *value, int64_t val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutReal(OH_Data_Value *value, double val); @@ -181,7 +181,7 @@ int OH_Value_PutReal(OH_Data_Value *value, double val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutText(OH_Data_Value *value, const char *val); @@ -194,7 +194,7 @@ int OH_Value_PutText(OH_Data_Value *value, const char *val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutBlob(OH_Data_Value *value, const unsigned char *val, size_t length); @@ -206,7 +206,7 @@ int OH_Value_PutBlob(OH_Data_Value *value, const unsigned char *val, size_t leng * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutAsset(OH_Data_Value *value, const Data_Asset *val); @@ -219,7 +219,7 @@ int OH_Value_PutAsset(OH_Data_Value *value, const Data_Asset *val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutAssets(OH_Data_Value *value, const Data_Asset * const * val, size_t length); @@ -232,7 +232,7 @@ int OH_Value_PutAssets(OH_Data_Value *value, const Data_Asset * const * val, siz * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutFloatVector(OH_Data_Value *value, const float *val, size_t length); @@ -246,7 +246,7 @@ int OH_Value_PutFloatVector(OH_Data_Value *value, const float *val, size_t lengt * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_PutUnlimitedInt(OH_Data_Value *value, int sign, const uint64_t *trueForm, size_t length); @@ -258,7 +258,7 @@ int OH_Value_PutUnlimitedInt(OH_Data_Value *value, int sign, const uint64_t *tru * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_GetType(OH_Data_Value *value, OH_ColumnType *type); @@ -270,7 +270,7 @@ int OH_Value_GetType(OH_Data_Value *value, OH_ColumnType *type); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Value_IsNull(OH_Data_Value *value, bool *val); @@ -284,7 +284,7 @@ int OH_Value_IsNull(OH_Data_Value *value, bool *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetInt(OH_Data_Value *value, int64_t *val); @@ -298,7 +298,7 @@ int OH_Value_GetInt(OH_Data_Value *value, int64_t *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetReal(OH_Data_Value *value, double *val); @@ -313,7 +313,7 @@ int OH_Value_GetReal(OH_Data_Value *value, double *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetText(OH_Data_Value *value, const char **val); @@ -329,7 +329,7 @@ int OH_Value_GetText(OH_Data_Value *value, const char **val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetBlob(OH_Data_Value *value, const uint8_t **val, size_t *length); @@ -344,7 +344,7 @@ int OH_Value_GetBlob(OH_Data_Value *value, const uint8_t **val, size_t *length); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetAsset(OH_Data_Value *value, Data_Asset *val); @@ -358,7 +358,7 @@ int OH_Value_GetAsset(OH_Data_Value *value, Data_Asset *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetAssetsCount(OH_Data_Value *value, size_t *length); @@ -376,7 +376,7 @@ int OH_Value_GetAssetsCount(OH_Data_Value *value, size_t *length); * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. * @see OH_Value_GetAssetsCount. - * @since 16 + * @since 18 */ int OH_Value_GetAssets(OH_Data_Value *value, Data_Asset **val, size_t inLen, size_t *outLen); @@ -390,7 +390,7 @@ int OH_Value_GetAssets(OH_Data_Value *value, Data_Asset **val, size_t inLen, siz * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetFloatVectorCount(OH_Data_Value *value, size_t *length); @@ -408,7 +408,7 @@ int OH_Value_GetFloatVectorCount(OH_Data_Value *value, size_t *length); * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. * @see OH_Value_GetFloatVectorCount. - * @since 16 + * @since 18 */ int OH_Value_GetFloatVector(OH_Data_Value *value, float *val, size_t inLen, size_t *outLen); @@ -422,7 +422,7 @@ int OH_Value_GetFloatVector(OH_Data_Value *value, float *val, size_t inLen, size * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Value_GetUnlimitedIntBand(OH_Data_Value *value, size_t *length); @@ -441,7 +441,7 @@ int OH_Value_GetUnlimitedIntBand(OH_Data_Value *value, size_t *length); * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. * @see OH_Value_GetUnlimitedIntBand. - * @since 16 + * @since 18 */ int OH_Value_GetUnlimitedInt(OH_Data_Value *value, int *sign, uint64_t *trueForm, size_t inLen, size_t *outLen); diff --git a/distributeddatamgr/relational_store/include/oh_data_values.h b/distributeddatamgr/relational_store/include/oh_data_values.h index 791c7d0f8..a816d39c5 100644 --- a/distributeddatamgr/relational_store/include/oh_data_values.h +++ b/distributeddatamgr/relational_store/include/oh_data_values.h @@ -34,7 +34,7 @@ * @library libnative_rdb_ndk.z.so * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * - * @since 16 + * @since 18 */ #ifndef OH_DATA_VALUES_H #define OH_DATA_VALUES_H @@ -49,7 +49,7 @@ extern "C" { /** * @brief Define the OH_Data_Values structure type. * - * @since 16 + * @since 18 */ typedef struct OH_Data_Values OH_Data_Values; @@ -60,7 +60,7 @@ typedef struct OH_Data_Values OH_Data_Values; * Otherwise, nullptr is returned. The memory must be released through the OH_Values_Destroy * interface after the use is complete. * @see OH_Values_Destroy. - * @since 16 + * @since 18 */ OH_Data_Values *OH_Values_Create(); @@ -71,7 +71,7 @@ OH_Data_Values *OH_Values_Create(); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_Destroy(OH_Data_Values *values); @@ -83,7 +83,7 @@ int OH_Values_Destroy(OH_Data_Values *values); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_Put(OH_Data_Values *values, const OH_Data_Value *val); @@ -94,7 +94,7 @@ int OH_Values_Put(OH_Data_Values *values, const OH_Data_Value *val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutNull(OH_Data_Values *values); @@ -106,7 +106,7 @@ int OH_Values_PutNull(OH_Data_Values *values); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutInt(OH_Data_Values *values, int64_t val); @@ -118,7 +118,7 @@ int OH_Values_PutInt(OH_Data_Values *values, int64_t val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutReal(OH_Data_Values *values, double val); @@ -130,7 +130,7 @@ int OH_Values_PutReal(OH_Data_Values *values, double val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutText(OH_Data_Values *values, const char *val); @@ -143,7 +143,7 @@ int OH_Values_PutText(OH_Data_Values *values, const char *val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutBlob(OH_Data_Values *values, const unsigned char *val, size_t length); @@ -155,7 +155,7 @@ int OH_Values_PutBlob(OH_Data_Values *values, const unsigned char *val, size_t l * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutAsset(OH_Data_Values *values, const Data_Asset *val); @@ -168,7 +168,7 @@ int OH_Values_PutAsset(OH_Data_Values *values, const Data_Asset *val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutAssets(OH_Data_Values *values, const Data_Asset * const * val, size_t length); @@ -181,7 +181,7 @@ int OH_Values_PutAssets(OH_Data_Values *values, const Data_Asset * const * val, * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutFloatVector(OH_Data_Values *values, const float *val, size_t length); @@ -195,7 +195,7 @@ int OH_Values_PutFloatVector(OH_Data_Values *values, const float *val, size_t le * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_PutUnlimitedInt(OH_Data_Values *values, int sign, const uint64_t *trueForm, size_t length); @@ -207,7 +207,7 @@ int OH_Values_PutUnlimitedInt(OH_Data_Values *values, int sign, const uint64_t * * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_Count(OH_Data_Values *values, size_t *count); @@ -220,7 +220,7 @@ int OH_Values_Count(OH_Data_Values *values, size_t *count); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_GetType(OH_Data_Values *values, int index, OH_ColumnType *type); @@ -234,7 +234,7 @@ int OH_Values_GetType(OH_Data_Values *values, int index, OH_ColumnType *type); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_Get(OH_Data_Values *values, int index, OH_Data_Value **val); @@ -247,7 +247,7 @@ int OH_Values_Get(OH_Data_Values *values, int index, OH_Data_Value **val); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_Values_IsNull(OH_Data_Values *values, int index, bool *val); @@ -262,7 +262,7 @@ int OH_Values_IsNull(OH_Data_Values *values, int index, bool *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetInt(OH_Data_Values *values, int index, int64_t *val); @@ -277,7 +277,7 @@ int OH_Values_GetInt(OH_Data_Values *values, int index, int64_t *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetReal(OH_Data_Values *values, int index, double *val); @@ -294,7 +294,7 @@ int OH_Values_GetReal(OH_Data_Values *values, int index, double *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetText(OH_Data_Values *values, int index, const char **val); @@ -312,7 +312,7 @@ int OH_Values_GetText(OH_Data_Values *values, int index, const char **val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetBlob(OH_Data_Values *values, int index, const uint8_t **val, size_t *length); @@ -328,7 +328,7 @@ int OH_Values_GetBlob(OH_Data_Values *values, int index, const uint8_t **val, si * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetAsset(OH_Data_Values *values, int index, Data_Asset *val); @@ -343,7 +343,7 @@ int OH_Values_GetAsset(OH_Data_Values *values, int index, Data_Asset *val); * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetAssetsCount(OH_Data_Values *values, int index, size_t *length); @@ -362,7 +362,7 @@ int OH_Values_GetAssetsCount(OH_Data_Values *values, int index, size_t *length); * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. * @see OH_Values_GetAssetsCount. - * @since 16 + * @since 18 */ int OH_Values_GetAssets(OH_Data_Values *values, int index, Data_Asset **val, size_t inLen, size_t *outLen); @@ -377,7 +377,7 @@ int OH_Values_GetAssets(OH_Data_Values *values, int index, Data_Asset **val, siz * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetFloatVectorCount(OH_Data_Values *values, int index, size_t *length); @@ -396,7 +396,7 @@ int OH_Values_GetFloatVectorCount(OH_Data_Values *values, int index, size_t *len * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. * @see OH_Values_GetFloatVectorCount. - * @since 16 + * @since 18 */ int OH_Values_GetFloatVector(OH_Data_Values *values, int index, float *val, size_t inLen, size_t *outLen); @@ -411,7 +411,7 @@ int OH_Values_GetFloatVector(OH_Data_Values *values, int index, float *val, size * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. - * @since 16 + * @since 18 */ int OH_Values_GetUnlimitedIntBand(OH_Data_Values *values, int index, size_t *length); @@ -431,7 +431,7 @@ int OH_Values_GetUnlimitedIntBand(OH_Data_Values *values, int index, size_t *len * Returns {@link RDB_E_DATA_TYPE_NULL} the content stored in parameter value is null. * Returns {@link RDB_E_TYPE_MISMATCH} storage data type mismatch. * @see OH_Values_GetUnlimitedIntBand. - * @since 16 + * @since 18 */ int OH_Values_GetUnlimitedInt(OH_Data_Values *values, int index, int *sign, uint64_t *trueForm, size_t inLen, size_t *outLen); diff --git a/distributeddatamgr/relational_store/include/oh_data_values_buckets.h b/distributeddatamgr/relational_store/include/oh_data_values_buckets.h index 46cfc4b8d..1147fb08a 100644 --- a/distributeddatamgr/relational_store/include/oh_data_values_buckets.h +++ b/distributeddatamgr/relational_store/include/oh_data_values_buckets.h @@ -34,7 +34,7 @@ * @library libnative_rdb_ndk.z.so * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * - * @since 16 + * @since 18 */ @@ -48,7 +48,7 @@ extern "C" { /** * @brief Define the OH_Data_VBuckets structure type. * - * @since 16 + * @since 18 */ typedef struct OH_Data_VBuckets OH_Data_VBuckets; @@ -59,7 +59,7 @@ typedef struct OH_Data_VBuckets OH_Data_VBuckets; * Otherwise, nullptr is returned. The memory must be released through the OH_VBuckets_Destroy * interface after the use is complete. * @see OH_VBuckets_Destroy. - * @since 16 + * @since 18 */ OH_Data_VBuckets *OH_VBuckets_Create(); @@ -70,7 +70,7 @@ OH_Data_VBuckets *OH_VBuckets_Create(); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_VBuckets_Destroy(OH_Data_VBuckets *buckets); @@ -82,7 +82,7 @@ int OH_VBuckets_Destroy(OH_Data_VBuckets *buckets); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_VBuckets_PutRow(OH_Data_VBuckets *buckets, const OH_VBucket *row); @@ -94,7 +94,7 @@ int OH_VBuckets_PutRow(OH_Data_VBuckets *buckets, const OH_VBucket *row); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_VBuckets_PutRows(OH_Data_VBuckets *buckets, const OH_Data_VBuckets *rows); @@ -106,7 +106,7 @@ int OH_VBuckets_PutRows(OH_Data_VBuckets *buckets, const OH_Data_VBuckets *rows) * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_VBuckets_RowCount(OH_Data_VBuckets *buckets, size_t *count); diff --git a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h index fef729867..aa34f0228 100644 --- a/distributeddatamgr/relational_store/include/oh_rdb_transaction.h +++ b/distributeddatamgr/relational_store/include/oh_rdb_transaction.h @@ -34,7 +34,7 @@ * @library libnative_rdb_ndk.z.so * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * - * @since 16 + * @since 18 */ #ifndef OH_RDB_TRANSACTION_H @@ -54,7 +54,7 @@ extern "C" { /** * @brief Indicates relation database transaction type. * - * @since 16 + * @since 18 */ typedef enum OH_RDB_TransType { /** @@ -80,14 +80,14 @@ typedef enum OH_RDB_TransType { /** * @brief Define the OH_RDB_TransOptions structure type. * - * @since 16 + * @since 18 */ typedef struct OH_RDB_TransOptions OH_RDB_TransOptions; /** * @brief Define the OH_Rdb_Transaction structure type. * - * @since 16 + * @since 18 */ typedef struct OH_Rdb_Transaction OH_Rdb_Transaction; @@ -98,7 +98,7 @@ typedef struct OH_Rdb_Transaction OH_Rdb_Transaction; * Otherwise, nullptr is returned. The memory must be released through the OH_RdbTrans_DestroyOptions * interface after the use is complete. * @see OH_RdbTrans_DestroyOptions. - * @since 16 + * @since 18 */ OH_RDB_TransOptions *OH_RdbTrans_CreateOptions(); @@ -109,7 +109,7 @@ OH_RDB_TransOptions *OH_RdbTrans_CreateOptions(); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_RdbTrans_DestroyOptions(OH_RDB_TransOptions *opitons); @@ -121,7 +121,7 @@ int OH_RdbTrans_DestroyOptions(OH_RDB_TransOptions *opitons); * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_RdbTransOption_SetType(OH_RDB_TransOptions *opitons, OH_RDB_TransType type); @@ -141,7 +141,7 @@ int OH_RdbTransOption_SetType(OH_RDB_TransOptions *opitons, OH_RDB_TransType typ * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. * Returns {@link RDB_E_SQLITE_READONLY} SQLite: SQLite: Attempt to write a readonly database. * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. - * @since 16 + * @since 18 */ int OH_RdbTrans_Commit(OH_Rdb_Transaction *trans); @@ -161,7 +161,7 @@ int OH_RdbTrans_Commit(OH_Rdb_Transaction *trans); * Returns {@link RDB_E_SQLITE_NOMEM} SQLite: The database is out of memory. * Returns {@link RDB_E_SQLITE_READONLY} SQLite: Attempt to write a readonly database. * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. - * @since 16 + * @since 18 */ int OH_RdbTrans_Rollback(OH_Rdb_Transaction *trans); @@ -189,7 +189,7 @@ int OH_RdbTrans_Rollback(OH_Rdb_Transaction *trans); * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. - * @since 16 + * @since 18 */ int OH_RdbTrans_Insert(OH_Rdb_Transaction *trans, const char *table, const OH_VBucket *row, int64_t *rowId); @@ -218,7 +218,7 @@ int OH_RdbTrans_Insert(OH_Rdb_Transaction *trans, const char *table, const OH_VB * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. * Returns {@link RDB_E_SQLITE_CONSTRAINT} SQLite: Abort due to constraint violation. - * @since 16 + * @since 18 */ int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const OH_Data_VBuckets *rows, Rdb_ConflictResolution resolution, int64_t *changes); @@ -246,7 +246,7 @@ int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. - * @since 16 + * @since 18 */ int OH_RdbTrans_Update(OH_Rdb_Transaction *trans, const OH_VBucket *row, const OH_Predicates *predicates, int64_t *changes); @@ -273,7 +273,7 @@ int OH_RdbTrans_Update(OH_Rdb_Transaction *trans, const OH_VBucket *row, const O * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. - * @since 16 + * @since 18 */ int OH_RdbTrans_Delete(OH_Rdb_Transaction *trans, const OH_Predicates *predicates, int64_t *changes); @@ -286,7 +286,7 @@ int OH_RdbTrans_Delete(OH_Rdb_Transaction *trans, const OH_Predicates *predicate * @param len Represents the number of columns elements. * @return If the operation is successful, a pointer to the instance of the OH_Cursor structure is returned. * If database has closed or the database does not respond, nullptr is returned. - * @since 16 + * @since 18 */ OH_Cursor *OH_RdbTrans_Query(OH_Rdb_Transaction *trans, const OH_Predicates *predicates, const char *columns[], int len); @@ -299,7 +299,7 @@ OH_Cursor *OH_RdbTrans_Query(OH_Rdb_Transaction *trans, const OH_Predicates *pre * @param args Represents a pointer to an instance of OH_Data_Values and it is the selection arguments. * @return If the operation is successful, a pointer to the instance of the OH_Cursor structure is returned. * If database has closed or the database does not respond, nullptr is returned. - * @since 16 + * @since 18 */ OH_Cursor *OH_RdbTrans_QuerySql(OH_Rdb_Transaction *trans, const char *sql, const OH_Data_Values *args); @@ -328,7 +328,7 @@ OH_Cursor *OH_RdbTrans_QuerySql(OH_Rdb_Transaction *trans, const char *sql, cons * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. * @see OH_Value_Destroy. - * @since 16 + * @since 18 */ int OH_RdbTrans_Execute(OH_Rdb_Transaction *trans, const char *sql, const OH_Data_Values *args, OH_Data_Value **result); @@ -339,7 +339,7 @@ int OH_RdbTrans_Execute(OH_Rdb_Transaction *trans, const char *sql, const OH_Dat * @return Returns the error code. * Returns {@link RDB_OK} if the execution is successful. * Returns {@link RDB_E_INVALID_ARGS} if invalid input parameter. - * @since 16 + * @since 18 */ int OH_RdbTrans_Destroy(OH_Rdb_Transaction *trans); diff --git a/distributeddatamgr/relational_store/include/oh_rdb_types.h b/distributeddatamgr/relational_store/include/oh_rdb_types.h index 5080ae645..cf0f76bf0 100644 --- a/distributeddatamgr/relational_store/include/oh_rdb_types.h +++ b/distributeddatamgr/relational_store/include/oh_rdb_types.h @@ -34,7 +34,7 @@ * @library libnative_rdb_ndk.z.so * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * - * @since 16 + * @since 18 */ #ifndef OH_RDB_TYPES_H @@ -47,7 +47,7 @@ extern "C" { /** * @brief Describe the security area of the database. * - * @since 16 + * @since 18 */ typedef enum Rdb_ConflictResolution { /** diff --git a/distributeddatamgr/relational_store/include/oh_values_bucket.h b/distributeddatamgr/relational_store/include/oh_values_bucket.h index 87c90608f..455e7f97f 100644 --- a/distributeddatamgr/relational_store/include/oh_values_bucket.h +++ b/distributeddatamgr/relational_store/include/oh_values_bucket.h @@ -195,7 +195,7 @@ int OH_VBucket_PutAssets(OH_VBucket *bucket, const char *field, Data_Asset **val * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * @see OH_VBucket. - * @since 16 + * @since 18 */ int OH_VBucket_PutFloatVector(OH_VBucket *bucket, const char *field, const float *vec, size_t len); @@ -211,7 +211,7 @@ int OH_VBucket_PutFloatVector(OH_VBucket *bucket, const char *field, const float * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * @see OH_VBucket. - * @since 16 + * @since 18 */ int OH_VBucket_PutUnlimitedInt(OH_VBucket *bucket, const char *field, int sign, const uint64_t *trueForm, size_t len); #ifdef __cplusplus diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 1974af547..5395854dd 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -190,7 +190,7 @@ typedef enum Rdb_DBType { /** * @brief Define Rdb_Tokenizer type. * - * @since 16 + * @since 18 */ typedef enum Rdb_Tokenizer { /** @@ -341,7 +341,7 @@ int OH_Rdb_SetDbType(OH_Rdb_ConfigV2 *config, int dbType); * {@link RDB_OK} - success. * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. * {@link RDB_E_NOT_SUPPORTED} - The error code for not support tokenizer. - * @since 16 + * @since 18 */ int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); @@ -353,7 +353,7 @@ int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); * @return Returns the status code of the execution. * {@link RDB_OK} indicates the operation is successful. * {@link RDB_E_INVALID_ARGS} indicates invalid args are passed in. - * @since 16 + * @since 18 */ int OH_Rdb_IsTokenizerSupported(Rdb_Tokenizer tokenizer, bool *isSupported); @@ -513,7 +513,7 @@ int OH_Rdb_Insert(OH_Rdb_Store *store, const char *table, OH_VBucket *valuesBuck * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. * Returns {@link RDB_E_SQLITE_CONSTRAINT} SQLite: Abort due to constraint violation. - * @since 16 + * @since 18 */ int OH_Rdb_BatchInsert(OH_Rdb_Store *store, const char *table, const OH_Data_VBuckets *rows, Rdb_ConflictResolution resolution, int64_t *changes); @@ -602,7 +602,7 @@ int OH_Rdb_Execute(OH_Rdb_Store *store, const char *sql); * Returns {@link RDB_E_SQLITE_TOO_BIG} SQLite: TEXT or BLOB exceeds size limit. * Returns {@link RDB_E_SQLITE_MISMATCH} SQLite: Data type mismatch. * @see OH_Value_Destroy. - * @since 16 + * @since 18 */ int OH_Rdb_ExecuteV2(OH_Rdb_Store *store, const char *sql, const OH_Data_Values *args, OH_Data_Value **result); @@ -642,7 +642,7 @@ OH_Cursor *OH_Rdb_ExecuteQuery(OH_Rdb_Store *store, const char *sql); * @return If the query is successful, a pointer to the instance of the @link OH_Cursor} structure is returned. * If sql statement is invalid or the memory allocate failed, nullptr is returned. * @see OH_Rdb_Store. - * @since 16 + * @since 18 */ OH_Cursor *OH_Rdb_ExecuteQueryV2(OH_Rdb_Store *store, const char *sql, const OH_Data_Values *args); @@ -1388,7 +1388,7 @@ OH_Cursor *OH_Rdb_QueryLockedRow( * Returns {@link RDB_E_SQLITE_IOERR} SQLite: Some kind of disk I/O error occurred. * Returns {@link RDB_E_SQLITE_CANT_OPEN} SQLite: Unable to open the database file. * @see OH_RdbTrans_Destroy. - * @since 16 + * @since 18 */ int OH_Rdb_CreateTransaction(OH_Rdb_Store *store, const OH_RDB_TransOptions *options, OH_Rdb_Transaction **trans); diff --git a/distributeddatamgr/relational_store/include/relational_store_error_code.h b/distributeddatamgr/relational_store/include/relational_store_error_code.h index 64ec5db2a..c75b849e0 100644 --- a/distributeddatamgr/relational_store/include/relational_store_error_code.h +++ b/distributeddatamgr/relational_store/include/relational_store_error_code.h @@ -312,112 +312,112 @@ typedef enum OH_Rdb_ErrCode { /** * @brief Database already closed. * - * @since 16 + * @since 18 */ RDB_E_ALREADY_CLOSED = (E_BASE + 50), /** * @brief The database does not respond. * - * @since 16 + * @since 18 */ RDB_E_DATABASE_BUSY = (E_BASE + 51), /** * @brief Database corrupted. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_CORRUPT = (E_BASE + 52), /** * @brief SQLite: Access permission denied. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_PERM = (E_BASE + 53), /** * @brief SQLite: The database file is locked. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_BUSY = (E_BASE + 54), /** * @brief SQLite: A table in the database is locked. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_LOCKED = (E_BASE + 55), /** * @brief SQLite: The database is out of memory. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_NOMEM = (E_BASE + 56), /** * @brief SQLite: Attempt to write a readonly database. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_READONLY = (E_BASE + 57), /** * @brief SQLite: Some kind of disk I/O error occurred. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_IOERR = (E_BASE + 58), /** * @brief SQLite: The database is full. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_FULL = (E_BASE + 59), /** * @brief SQLite: Unable to open the database file. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_CANT_OPEN = (E_BASE + 60), /** * @brief SQLite: TEXT or BLOB exceeds size limit. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_TOO_BIG = (E_BASE + 61), /** * @brief SQLite: Data type mismatch. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_MISMATCH = (E_BASE + 62), /** * @brief Data value type is null. * - * @since 16 + * @since 18 */ RDB_E_DATA_TYPE_NULL = (E_BASE + 63), /** * @brief Data value type mismatch. * - * @since 16 + * @since 18 */ RDB_E_TYPE_MISMATCH = (E_BASE + 64), /** * @brief Data value type is null. * - * @since 16 + * @since 18 */ RDB_E_SQLITE_CONSTRAINT = (E_BASE + 65), } OH_Rdb_ErrCode; diff --git a/drivers/external_device_manager/hid/hid_ddk_api.h b/drivers/external_device_manager/hid/hid_ddk_api.h index 14babc5c3..8ceafb01a 100644 --- a/drivers/external_device_manager/hid/hid_ddk_api.h +++ b/drivers/external_device_manager/hid/hid_ddk_api.h @@ -110,7 +110,7 @@ int32_t OH_Hid_DestroyDevice(int32_t deviceId); * {@link HID_DDK_NO_PERM} permission check failed. * {@link HID_DDK_INIT_ERROR} create DDK instance failed. * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. - * @since 16 + * @since 18 */ int32_t OH_Hid_Init(void); @@ -122,7 +122,7 @@ int32_t OH_Hid_Init(void); * {@link HID_DDK_NO_PERM} permission check failed. * {@link HID_DDK_INIT_ERROR} the DDK not init. * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. - * @since 16 + * @since 18 */ int32_t OH_Hid_Release(void); @@ -141,7 +141,7 @@ int32_t OH_Hid_Release(void); * {@link HID_DDK_IO_ERROR} open device failed. * {@link HID_DDK_INVALID_PARAMETER} dev is null. * {@link HID_DDK_DEVICE_NOT_FOUND} device not found by deviceId. - * @since 16 + * @since 18 */ int32_t OH_Hid_Open(uint64_t deviceId, uint8_t interfaceIndex, Hid_DeviceHandle **dev); @@ -156,7 +156,7 @@ int32_t OH_Hid_Open(uint64_t deviceId, uint8_t interfaceIndex, Hid_DeviceHandle * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link HID_DDK_IO_ERROR} close device failed. * {@link HID_DDK_INVALID_PARAMETER} dev is null. - * @since 16 + * @since 18 */ int32_t OH_Hid_Close(Hid_DeviceHandle **dev); @@ -176,7 +176,7 @@ int32_t OH_Hid_Close(Hid_DeviceHandle **dev); * {@link HID_DDK_INIT_ERROR} the DDK not init. * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link HID_DDK_IO_ERROR } send data failed. - * @since 16 + * @since 18 */ int32_t OH_Hid_Write(Hid_DeviceHandle *dev, uint8_t *data, uint32_t length, uint32_t *bytesWritten); @@ -199,7 +199,7 @@ int32_t OH_Hid_Write(Hid_DeviceHandle *dev, uint8_t *data, uint32_t length, uint * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_TIMEOUT } read timeout. - * @since 16 + * @since 18 */ int32_t OH_Hid_ReadTimeout(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSize, int timeout, uint32_t *bytesRead); @@ -221,7 +221,7 @@ int32_t OH_Hid_ReadTimeout(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSiz * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_TIMEOUT } read timeout. - * @since 16 + * @since 18 */ int32_t OH_Hid_Read(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSize, uint32_t *bytesRead); @@ -239,7 +239,7 @@ int32_t OH_Hid_Read(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSize, uint * {@link HID_DDK_INVALID_PARAMETER} parameter check failed. Possible causes:1.dev is null;\n * 2.nonBlock is not 1 or 0. * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. - * @since 16 + * @since 18 */ int32_t OH_Hid_SetNonBlocking(Hid_DeviceHandle *dev, int nonBlock); @@ -257,7 +257,7 @@ int32_t OH_Hid_SetNonBlocking(Hid_DeviceHandle *dev, int nonBlock); * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_Hid_GetRawInfo(Hid_DeviceHandle *dev, Hid_RawDevInfo *rawDevInfo); @@ -277,7 +277,7 @@ int32_t OH_Hid_GetRawInfo(Hid_DeviceHandle *dev, Hid_RawDevInfo *rawDevInfo); * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_Hid_GetRawName(Hid_DeviceHandle *dev, char *data, uint32_t bufSize); @@ -297,7 +297,7 @@ int32_t OH_Hid_GetRawName(Hid_DeviceHandle *dev, char *data, uint32_t bufSize); * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_Hid_GetPhysicalAddress(Hid_DeviceHandle *dev, char *data, uint32_t bufSize); @@ -317,7 +317,7 @@ int32_t OH_Hid_GetPhysicalAddress(Hid_DeviceHandle *dev, char *data, uint32_t bu * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_Hid_GetRawUniqueId(Hid_DeviceHandle *dev, uint8_t *data, uint32_t bufSize); @@ -337,7 +337,7 @@ int32_t OH_Hid_GetRawUniqueId(Hid_DeviceHandle *dev, uint8_t *data, uint32_t buf * {@link HID_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link HID_DDK_IO_ERROR } send data failed. * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_Hid_SendReport(Hid_DeviceHandle *dev, Hid_ReportType reportType, const uint8_t *data, uint32_t length); @@ -358,7 +358,7 @@ int32_t OH_Hid_SendReport(Hid_DeviceHandle *dev, Hid_ReportType reportType, cons * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_Hid_GetReport(Hid_DeviceHandle *dev, Hid_ReportType reportType, uint8_t *data, uint32_t bufSize); @@ -380,7 +380,7 @@ int32_t OH_Hid_GetReport(Hid_DeviceHandle *dev, Hid_ReportType reportType, uint8 * {@link HID_DDK_MEMORY_ERROR } the memory of data copies failed. * {@link HID_DDK_IO_ERROR } read data failed. * {@link HID_DDK_INVALID_OPERATION } the operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_Hid_GetReportDescriptor(Hid_DeviceHandle *dev, uint8_t *buf, uint32_t bufSize, uint32_t *bytesRead); /** @} */ diff --git a/drivers/external_device_manager/hid/hid_ddk_types.h b/drivers/external_device_manager/hid/hid_ddk_types.h index 31d206d89..6ffd711bc 100644 --- a/drivers/external_device_manager/hid/hid_ddk_types.h +++ b/drivers/external_device_manager/hid/hid_ddk_types.h @@ -604,23 +604,23 @@ typedef enum { /** @error Timeout */ HID_DDK_TIMEOUT = 27300004, /** @error Init operation - * @since 16 + * @since 18 */ HID_DDK_INIT_ERROR = 27300005, /** @error Service error operation - * @since 16 + * @since 18 */ HID_DDK_SERVICE_ERROR = 27300006, /** @error Buff is outside accessible address space - * @since 16 + * @since 18 */ HID_DDK_MEMORY_ERROR = 27300007, /** @error Physical I/O error has occurred. - * @since 16 + * @since 18 */ HID_DDK_IO_ERROR = 27300008, /** @error Device not found. - * @since 16 + * @since 18 */ HID_DDK_DEVICE_NOT_FOUND = 27300009 } Hid_DdkErrCode; @@ -628,21 +628,21 @@ typedef enum { /** * @brief max report buffer size. * - * @since 16 + * @since 18 */ #define HID_MAX_REPORT_BUFFER_SIZE (16 * 1024 - 1) /** * @brief Opaque usb HID device structure. * - * @since 16 + * @since 18 */ typedef struct Hid_DeviceHandle Hid_DeviceHandle; /** * @brief Defines the report type. * - * @since 16 + * @since 18 */ typedef enum { /** Input report */ @@ -656,7 +656,7 @@ typedef enum { /** * @brief Defines the raw dev info. * - * @since 16 + * @since 18 */ typedef struct Hid_RawDevInfo { /** Bus type */ diff --git a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h index b46bac27d..6f0ad01d8 100644 --- a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h +++ b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h @@ -18,7 +18,7 @@ * @{ * * @brief Provide ScsiPeripheral DDK interface, including initializing DDK, releasing DDK, opening devices, reading and writing devices, etc. - * @since 16 + * @since 18 */ /** @@ -29,7 +29,7 @@ * @kit DriverDevelopmentKit * @library libscsi.z.so * @syscap SystemCapability.Driver.SCSI.Extension - * @since 16 + * @since 18 */ #ifndef SCSI_PERIPHERAL_API_H @@ -50,7 +50,7 @@ extern "C" { * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk init error. * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Init(void); @@ -62,7 +62,7 @@ int32_t OH_ScsiPeripheral_Init(void); * {@link SCSIPERIPHERAL_DDK_NO_PERM} permission check failed. * {@link SCSIPERIPHERAL_DDK_INIT_ERROR} the ddk not init. * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Release(void); @@ -82,7 +82,7 @@ int32_t OH_ScsiPeripheral_Release(void); * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_DEVICE_NOT_FOUND} device not found by deviceId. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Open(uint64_t deviceId, uint8_t interfaceIndex, ScsiPeripheral_Device **dev); @@ -97,7 +97,7 @@ int32_t OH_ScsiPeripheral_Open(uint64_t deviceId, uint8_t interfaceIndex, ScsiPe * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null. * {@link SCSIPERIPHERAL_DDK_SERVICE_ERROR} communication with ddk service failed. * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Close(ScsiPeripheral_Device **dev); @@ -117,7 +117,7 @@ int32_t OH_ScsiPeripheral_Close(ScsiPeripheral_Device **dev); * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_TestUnitReady(ScsiPeripheral_Device *dev, ScsiPeripheral_TestUnitReadyRequest *request, ScsiPeripheral_Response *response); @@ -140,7 +140,7 @@ int32_t OH_ScsiPeripheral_TestUnitReady(ScsiPeripheral_Device *dev, ScsiPeripher * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Inquiry(ScsiPeripheral_Device *dev, ScsiPeripheral_InquiryRequest *request, ScsiPeripheral_InquiryInfo *inquiryInfo, ScsiPeripheral_Response *response); @@ -163,7 +163,7 @@ int32_t OH_ScsiPeripheral_Inquiry(ScsiPeripheral_Device *dev, ScsiPeripheral_Inq * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_ReadCapacity10(ScsiPeripheral_Device *dev, ScsiPeripheral_ReadCapacityRequest *request, ScsiPeripheral_CapacityInfo *capacityInfo, ScsiPeripheral_Response *response); @@ -184,7 +184,7 @@ int32_t OH_ScsiPeripheral_ReadCapacity10(ScsiPeripheral_Device *dev, ScsiPeriphe * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_RequestSense(ScsiPeripheral_Device *dev, ScsiPeripheral_RequestSenseRequest *request, ScsiPeripheral_Response *response); @@ -206,7 +206,7 @@ int32_t OH_ScsiPeripheral_RequestSense(ScsiPeripheral_Device *dev, ScsiPeriphera * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Read10(ScsiPeripheral_Device *dev, ScsiPeripheral_IORequest *request, ScsiPeripheral_Response *response); @@ -228,7 +228,7 @@ int32_t OH_ScsiPeripheral_Read10(ScsiPeripheral_Device *dev, ScsiPeripheral_IORe * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Write10(ScsiPeripheral_Device *dev, ScsiPeripheral_IORequest *request, ScsiPeripheral_Response *response); @@ -249,7 +249,7 @@ int32_t OH_ScsiPeripheral_Write10(ScsiPeripheral_Device *dev, ScsiPeripheral_IOR * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_Verify10(ScsiPeripheral_Device *dev, ScsiPeripheral_VerifyRequest *request, ScsiPeripheral_Response *response); @@ -271,7 +271,7 @@ int32_t OH_ScsiPeripheral_Verify10(ScsiPeripheral_Device *dev, ScsiPeripheral_Ve * {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error. * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout. * {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_SendRequestByCdb(ScsiPeripheral_Device *dev, ScsiPeripheral_Request *request, ScsiPeripheral_Response *response); @@ -286,7 +286,7 @@ int32_t OH_ScsiPeripheral_SendRequestByCdb(ScsiPeripheral_Device *dev, ScsiPerip * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} dev is null or devMmap is null. * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_CreateDeviceMemMap(ScsiPeripheral_Device *dev, size_t size, ScsiPeripheral_DeviceMemMap **devMmap); @@ -298,7 +298,7 @@ int32_t OH_ScsiPeripheral_CreateDeviceMemMap(ScsiPeripheral_Device *dev, size_t * @return {@link SCSIPERIPHERAL_DDK_SUCCESS} the operation is successful. * {@link SCSIPERIPHERAL_DDK_INVALID_PARAMETER} devMmap is null. * {@link SCSIPERIPHERAL_DDK_MEMORY_ERROR} memory data operation failed. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_DestroyDeviceMemMap(ScsiPeripheral_DeviceMemMap *devMmap); @@ -313,7 +313,7 @@ int32_t OH_ScsiPeripheral_DestroyDeviceMemMap(ScsiPeripheral_DeviceMemMap *devMm * senseData format is not Descriptor/Fixed format or\n * senseDataLen is smaller than SCSIPERIPHERAL_MIN_DESCRIPTOR_FORMAT_SENSE or\n * senseDataLen is smaller than SCSIPERIPHERAL_MIN_FIXED_FORMAT_SENSE. - * @since 16 + * @since 18 */ int32_t OH_ScsiPeripheral_ParseBasicSenseInfo(uint8_t *senseData, uint8_t senseDataLen, ScsiPeripheral_BasicSenseInfo *senseInfo); diff --git a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h index b2044693a..b22e70f24 100644 --- a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h +++ b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_types.h @@ -18,7 +18,7 @@ * @{ * * @brief Provides ScsiPeripheral DDK types and declares macros, enumerations, and data structures used by the ScsiPeripheral DDK. - * @since 16 + * @since 18 */ /** @@ -29,7 +29,7 @@ * @kit DriverDevelopmentKit * @library libscsi.z.so * @syscap SystemCapability.Driver.SCSI.Extension - * @since 16 + * @since 18 */ #ifndef SCSI_PERIPHERAL_TYPES_H @@ -45,21 +45,21 @@ extern "C" { /** * @brief The min length of descriptor format sense data: 8. * - * @since 16 + * @since 18 */ #define SCSIPERIPHERAL_MIN_DESCRIPTOR_FORMAT_SENSE 8 /** * @brief The min length of fixed format sense data: 18. * - * @since 16 + * @since 18 */ #define SCSIPERIPHERAL_MIN_FIXED_FORMAT_SENSE 18 /** * @brief Defines error codes for SCSI DDK. * - * @since 16 + * @since 18 */ typedef enum { /** @error Permission denied. */ @@ -89,7 +89,7 @@ typedef enum { /** * @brief Defines SCSI status for response. * - * @since 16 + * @since 18 */ typedef enum { /** Good condition */ @@ -113,7 +113,7 @@ typedef enum { /** * @brief Opaque SCSI device structure. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_Device ScsiPeripheral_Device; @@ -121,7 +121,7 @@ typedef struct ScsiPeripheral_Device ScsiPeripheral_Device; * @brief Device memory map created by calling OH_ScsiPeripheral_CreateDeviceMemMap.\n * A buffer using the device memory map can provide better performance. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_DeviceMemMap { /** Buffer address. */ @@ -143,7 +143,7 @@ typedef struct ScsiPeripheral_DeviceMemMap { /** * @brief Request parameters for read/write. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_IORequest { /** Starting with the logical block. */ @@ -165,14 +165,14 @@ typedef struct ScsiPeripheral_IORequest { /** * @brief The max length of command descriptor block: 16. * - * @since 16 + * @since 18 */ #define SCSIPERIPHERAL_MAX_CMD_DESC_BLOCK_LEN 16 /** * @brief Request parameters. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_Request { /** Command descriptor block. */ @@ -190,14 +190,14 @@ typedef struct ScsiPeripheral_Request { /** * @brief The max length of sense data: 252. * - * @since 16 + * @since 18 */ #define SCSIPERIPHERAL_MAX_SENSE_DATA_LEN 252 /** * @brief Response parameters. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_Response { /** Sense data. */ @@ -223,7 +223,7 @@ typedef struct ScsiPeripheral_Response { /** * @brief SCSI test unit ready request. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_TestUnitReadyRequest { /** Control byte. */ @@ -235,7 +235,7 @@ typedef struct ScsiPeripheral_TestUnitReadyRequest { /** * @brief SCSI inquiry request. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_InquiryRequest { /** Page code. */ @@ -253,28 +253,28 @@ typedef struct ScsiPeripheral_InquiryRequest { /** * @brief The length of vendor identification: 8. * - * @since 16 + * @since 18 */ #define SCSIPERIPHERAL_VENDOR_ID_LEN 8 /** * @brief The length of product identification: 16. * - * @since 16 + * @since 18 */ #define SCSIPERIPHERAL_PRODUCT_ID_LEN 16 /** * @brief The length of product revision: 4. * - * @since 16 + * @since 18 */ #define SCSIPERIPHERAL_PRODUCT_REV_LEN 4 /** * @brief SCSI inquiry data. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_InquiryInfo { /** Peripheral device type. */ @@ -292,7 +292,7 @@ typedef struct ScsiPeripheral_InquiryInfo { /** * @brief SCSI read capacity request. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_ReadCapacityRequest { /** Logical block address. */ @@ -308,7 +308,7 @@ typedef struct ScsiPeripheral_ReadCapacityRequest { /** * @brief SCSI read capacity data. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_CapacityInfo { /** Returned logical block address. */ @@ -320,7 +320,7 @@ typedef struct ScsiPeripheral_CapacityInfo { /** * @brief SCSI request sense request. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_RequestSenseRequest { /** Allocation length. */ @@ -336,7 +336,7 @@ typedef struct ScsiPeripheral_RequestSenseRequest { /** * @brief Basic sense data of Information、Command-specific information、Sense key specific. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_BasicSenseInfo { /** Response code. */ @@ -356,7 +356,7 @@ typedef struct ScsiPeripheral_BasicSenseInfo { /** * @brief SCSI verify request. * - * @since 16 + * @since 18 */ typedef struct ScsiPeripheral_VerifyRequest { /** Starting with the logical block. */ diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index 9bd18e9e2..d13ed1319 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -76,7 +76,7 @@ void OH_Usb_Release(void); * @permission ohos.permission.ACCESS_DDK_USB * @return {@link USB_DDK_SUCCESS} the operation is successful. * {@link USB_DDK_NO_PERM} permission check failed. - * @since 16 + * @since 18 * @version 1.0 */ int32_t OH_Usb_ReleaseResource(void); @@ -294,7 +294,7 @@ void OH_Usb_DestroyDeviceMemMap(UsbDeviceMemMap *devMmap); * {@link USB_DDK_NO_PERM} permission check failed. * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed. * {@link USB_DDK_INVALID_PARAMETER} devices is null. - * @since 16 + * @since 18 */ int32_t OH_Usb_GetDevices(struct Usb_DeviceArray *devices); /** @} */ diff --git a/drivers/external_device_manager/usb/usb_ddk_types.h b/drivers/external_device_manager/usb/usb_ddk_types.h index 8b612becf..96ac845a1 100644 --- a/drivers/external_device_manager/usb/usb_ddk_types.h +++ b/drivers/external_device_manager/usb/usb_ddk_types.h @@ -329,7 +329,7 @@ typedef enum { /** * @brief all usb devices. * - * @since 16 + * @since 18 */ typedef struct Usb_DeviceArray { /** device id array */ diff --git a/drivers/external_device_manager/usb_serial/usb_serial_api.h b/drivers/external_device_manager/usb_serial/usb_serial_api.h index 075887c5c..46eb55427 100644 --- a/drivers/external_device_manager/usb_serial/usb_serial_api.h +++ b/drivers/external_device_manager/usb_serial/usb_serial_api.h @@ -20,7 +20,7 @@ * @brief Provides USB SERIAL DDK types and declares the macros, enumerated variables, and\n * data structures required by the USB SERIAL DDK APIs. * - * @since 16 + * @since 18 */ /** @@ -31,7 +31,7 @@ * @kit DriverDevelopmentKit * @library libusb_serial.z.so * @syscap SystemCapability.Driver.UsbSerial.Extension - * @since 16 + * @since 18 */ #ifndef DDK_USB_SERIAL_API_H @@ -51,7 +51,7 @@ extern "C" { * @return {@link USB_SERIAL_DDK_SUCCESS} the operation is successful. * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk init error. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_Init(void); @@ -63,7 +63,7 @@ int32_t OH_UsbSerial_Init(void); * {@link USB_SERIAL_DDK_NO_PERM} permission check failed. * {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init. * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_Release(void); @@ -82,7 +82,7 @@ int32_t OH_UsbSerial_Release(void); * {@link USB_SERIAL_DDK_MEMORY_ERROR} insufficient memory. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_DEVICE_NOT_FOUND} device or interface not found. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_Open(uint64_t deviceId, uint8_t interfaceIndex, UsbSerial_Device **dev); @@ -99,7 +99,7 @@ int32_t OH_UsbSerial_Open(uint64_t deviceId, uint8_t interfaceIndex, UsbSerial_D * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_Close(UsbSerial_Device **dev); @@ -120,7 +120,7 @@ int32_t OH_UsbSerial_Close(UsbSerial_Device **dev); * {@link USB_SERIAL_DDK_MEMORY_ERROR} the buff is outside accessible address space error. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_Read(UsbSerial_Device *dev, uint8_t *buff, uint32_t bufferSize, uint32_t *bytesRead); @@ -141,7 +141,7 @@ int32_t OH_UsbSerial_Read(UsbSerial_Device *dev, uint8_t *buff, uint32_t bufferS * {@link USB_SERIAL_DDK_MEMORY_ERROR} the buff is outside accessible address space error. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_Write(UsbSerial_Device *dev, uint8_t *buff, uint32_t bufferSize, uint32_t *bytesWritten); @@ -158,7 +158,7 @@ int32_t OH_UsbSerial_Write(UsbSerial_Device *dev, uint8_t *buff, uint32_t buffer * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_SetBaudRate(UsbSerial_Device *dev, uint32_t baudRate); @@ -176,7 +176,7 @@ int32_t OH_UsbSerial_SetBaudRate(UsbSerial_Device *dev, uint32_t baudRate); * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_SetParams(UsbSerial_Device *dev, UsbSerial_Params *params); @@ -197,7 +197,7 @@ int32_t OH_UsbSerial_SetParams(UsbSerial_Device *dev, UsbSerial_Params *params); * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_SetTimeout(UsbSerial_Device *dev, int timeout); @@ -215,7 +215,7 @@ int32_t OH_UsbSerial_SetTimeout(UsbSerial_Device *dev, int timeout); * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_SetFlowControl(UsbSerial_Device *dev, UsbSerial_FlowControl flowControl); @@ -231,7 +231,7 @@ int32_t OH_UsbSerial_SetFlowControl(UsbSerial_Device *dev, UsbSerial_FlowControl * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_Flush(UsbSerial_Device *dev); @@ -247,7 +247,7 @@ int32_t OH_UsbSerial_Flush(UsbSerial_Device *dev); * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_FlushInput(UsbSerial_Device *dev); @@ -263,7 +263,7 @@ int32_t OH_UsbSerial_FlushInput(UsbSerial_Device *dev); * {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed. * {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error. * {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation. - * @since 16 + * @since 18 */ int32_t OH_UsbSerial_FlushOutput(UsbSerial_Device *dev); #ifdef __cplusplus diff --git a/drivers/external_device_manager/usb_serial/usb_serial_types.h b/drivers/external_device_manager/usb_serial/usb_serial_types.h index 64a474b92..c0af700f3 100644 --- a/drivers/external_device_manager/usb_serial/usb_serial_types.h +++ b/drivers/external_device_manager/usb_serial/usb_serial_types.h @@ -20,7 +20,7 @@ * @brief Provides USB SERIAL DDK types and declares the macros, enumerated variables, and\n * data structures required by the USB SERIAL DDK APIs. * - * @since 16 + * @since 18 */ /** @@ -31,7 +31,7 @@ * @kit DriverDevelopmentKit * @library libusb_serial.z.so * @syscap SystemCapability.Driver.UsbSerial.Extension - * @since 16 + * @since 18 */ #ifndef DDK_USB_SERIAL_TYPES_H @@ -47,14 +47,14 @@ extern "C" { /** * @brief Opaque usb serial device structure. * - * @since 16 + * @since 18 */ typedef struct UsbSerial_Device UsbSerial_Device; /** * @brief Defines Return codes for USB SERIAL DDK. * - * @since 16 + * @since 18 */ typedef enum { /** @error Permission denied */ @@ -82,7 +82,7 @@ typedef enum { /** * @brief Defines USB Serial Port Params for USB SERIAL DDK. * - * @since 16 + * @since 18 */ typedef struct UsbSerial_Params { /** The baud rate requested by the system */ @@ -98,7 +98,7 @@ typedef struct UsbSerial_Params { /** * @brief Defines flow control for USB SERIAL DDK. * - * @since 16 + * @since 18 */ typedef enum { /** No flow control */ @@ -112,7 +112,7 @@ typedef enum { /** * @brief Defines parity for USB SERIAL DDK. * - * @since 16 + * @since 18 */ typedef enum { /** No parity */ diff --git a/global/resource_management/include/resourcemanager/ohresmgr.h b/global/resource_management/include/resourcemanager/ohresmgr.h index 46787935f..1515e8ceb 100644 --- a/global/resource_management/include/resourcemanager/ohresmgr.h +++ b/global/resource_management/include/resourcemanager/ohresmgr.h @@ -602,7 +602,7 @@ ResourceManager_ErrorCode OH_ResourceManager_GetPluralStringByName(const NativeR {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID. {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. - * @since 16 + * @since 18 */ ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralString(const NativeResourceManager *mgr, uint32_t resId, uint32_t num, char **resultValue, ...); @@ -626,7 +626,7 @@ ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralString(const NativeReso {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID. {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. - * @since 16 + * @since 18 */ ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralString(const NativeResourceManager *mgr, uint32_t resId, double num, char **resultValue, ...); @@ -650,7 +650,7 @@ ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralString(const NativeR {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name. {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. - * @since 16 + * @since 18 */ ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralStringByName(const NativeResourceManager *mgr, const char *resName, uint32_t num, char **resultValue, ...); @@ -674,7 +674,7 @@ ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralStringByName(const Nati {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name. {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. - * @since 16 + * @since 18 */ ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralStringByName(const NativeResourceManager *mgr, const char *resName, double num, char **resultValue, ...); diff --git a/graphic/graphic_2d/native_drawing/drawing_canvas.h b/graphic/graphic_2d/native_drawing/drawing_canvas.h index e152fc0c6..2581f31ab 100644 --- a/graphic/graphic_2d/native_drawing/drawing_canvas.h +++ b/graphic/graphic_2d/native_drawing/drawing_canvas.h @@ -236,7 +236,7 @@ void OH_Drawing_CanvasDrawPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, pixelMap * and dst is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawPixelMapNine(OH_Drawing_Canvas* canvas, OH_Drawing_PixelMap* pixelMap, @@ -433,7 +433,7 @@ void OH_Drawing_CanvasDrawArc(OH_Drawing_Canvas* canvas, * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawArcWithCenter(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, @@ -462,7 +462,7 @@ void OH_Drawing_CanvasDrawRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, outer * and inner is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawNestedRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_RoundRect* outer, @@ -914,7 +914,7 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawRecordCmd(OH_Drawing_Canvas* canvas, O * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or path is nullptr, * or quickReject is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_CanvasQuickRejectPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* path, @@ -931,7 +931,7 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasQuickRejectPath(OH_Drawing_Canvas* canvas, * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr, * or quickReject is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_CanvasQuickRejectRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h index 7b0503528..5bdc19682 100644 --- a/graphic/graphic_2d/native_drawing/drawing_error_code.h +++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h @@ -86,7 +86,7 @@ OH_Drawing_ErrorCode OH_Drawing_ErrorCodeGet(); * @brief Resets the error code of the drawing module to OH_DRAWING_SUCCESS. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_ErrorCodeReset(); diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index dd8601730..e8582939c 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -509,7 +509,7 @@ float OH_Drawing_FontGetMetrics(OH_Drawing_Font* font, OH_Drawing_Font_Metrics* * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs * and bounds is nullptr or count is 0. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontGetBounds(const OH_Drawing_Font* font, const uint16_t* glyphs, uint32_t count, @@ -526,7 +526,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetBounds(const OH_Drawing_Font* font, const * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, path * is nullptr or glyph not exist. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, uint16_t glyph, @@ -547,7 +547,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetPathForGlyph(const OH_Drawing_Font* font, * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text or path is nullptr. - * @since 16 + * @since 18 */ OH_Drawing_ErrorCode OH_Drawing_FontGetTextPath(const OH_Drawing_Font* font, const void* text, size_t byteLength, OH_Drawing_TextEncoding encoding, float x, float y, OH_Drawing_Path* path); diff --git a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h index 1949a5e72..236b2d0cc 100644 --- a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h +++ b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h @@ -73,7 +73,7 @@ OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOp * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @return Returns the pointer to the OH_Drawing_GpuContext object created. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_GpuContext* OH_Drawing_GpuContextCreate(void); diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h index e89201d14..214cea663 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h @@ -49,7 +49,7 @@ extern "C" { /** * @brief Enumerate path dash style. * - * @since 16 + * @since 18 * @version 1.0 */ typedef enum { @@ -69,7 +69,7 @@ typedef enum { * @param outer Indicates an OH_Drawing_PathEffect object * @param inner Indicates an OH_Drawing_PathEffect object * @return Returns the pointer to the OH_Drawing_PathEffect object created. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_PathEffect* OH_Drawing_CreateComposePathEffect(OH_Drawing_PathEffect* outer, OH_Drawing_PathEffect* inner); @@ -83,7 +83,7 @@ OH_Drawing_PathEffect* OH_Drawing_CreateComposePathEffect(OH_Drawing_PathEffect* * @return Returns the pointer to the OH_Drawing_PathEffect object created. * If nullptr is returned, the creation fails. * The possible cause of the failure is radius is zero or less. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_PathEffect* OH_Drawing_CreateCornerPathEffect(float radius); @@ -109,7 +109,7 @@ OH_Drawing_PathEffect* OH_Drawing_CreateDashPathEffect(float* intervals, int cou * @param segLength Indicates the maximum segment length of the path. * @param deviation Indicates the deviation during drawing. * @return Returns the pointer to the OH_Drawing_PathEffect object created. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_PathEffect* OH_Drawing_CreateDiscretePathEffect(float segLength, float deviation); @@ -125,7 +125,7 @@ OH_Drawing_PathEffect* OH_Drawing_CreateDiscretePathEffect(float segLength, floa * @return Returns the pointer to the OH_Drawing_PathEffect object created. * If nullptr is returned, the creation fails. * The possible cause of the failure is advance and phase are zero or less. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_PathEffect* OH_Drawing_CreatePathDashEffect(const OH_Drawing_Path* path, float advance, float phase, @@ -138,7 +138,7 @@ OH_Drawing_PathEffect* OH_Drawing_CreatePathDashEffect(const OH_Drawing_Path* pa * @param firstPathEffect Indicates the pointer to an OH_Drawing_PathEffect object. * @param secondPathEffect Indicates the pointer to an OH_Drawing_PathEffect object. * @return Returns the pointer to the OH_Drawing_PathEffect object created. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_PathEffect* OH_Drawing_CreateSumPathEffect(OH_Drawing_PathEffect* firstPathEffect, diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h index ecabab963..27dd05fea 100644 --- a/graphic/graphic_2d/native_drawing/drawing_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_rect.h @@ -225,7 +225,7 @@ void OH_Drawing_RectDestroy(OH_Drawing_Rect* rect); * If nullptr is returned, the creation fails. * The possible cause of the failure is that the available memory is empty, * or size is invalid. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_Array* OH_Drawing_RectCreateArray(size_t size); @@ -239,7 +239,7 @@ OH_Drawing_Array* OH_Drawing_RectCreateArray(size_t size); * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or pSize is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_RectGetArraySize(OH_Drawing_Array* rectArray, size_t* pSize); @@ -255,7 +255,7 @@ OH_Drawing_ErrorCode OH_Drawing_RectGetArraySize(OH_Drawing_Array* rectArray, si * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or rect is nullptr, * or index is valid. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_RectGetArrayElement(OH_Drawing_Array* rectArray, size_t index, @@ -269,7 +269,7 @@ OH_Drawing_ErrorCode OH_Drawing_RectGetArrayElement(OH_Drawing_Array* rectArray, * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_RectDestroyArray(OH_Drawing_Array* rectArray); diff --git a/graphic/graphic_2d/native_drawing/drawing_surface.h b/graphic/graphic_2d/native_drawing/drawing_surface.h index 67f951f74..240854f25 100644 --- a/graphic/graphic_2d/native_drawing/drawing_surface.h +++ b/graphic/graphic_2d/native_drawing/drawing_surface.h @@ -69,7 +69,7 @@ OH_Drawing_Surface* OH_Drawing_SurfaceCreateFromGpuContext( * @param imageInfo Indicates the image info. * @param window Indicates the pointer of the screen window. * @return Returns the pointer to the OH_Drawing_Surface object created. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_Surface* OH_Drawing_SurfaceCreateOnScreen( @@ -95,7 +95,7 @@ OH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface* surface); * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if surface is nullptr. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_SurfaceFlush(OH_Drawing_Surface* surface); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h index f9650a951..a005e95af 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_declaration.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_declaration.h @@ -63,7 +63,7 @@ typedef struct OH_Drawing_Typography OH_Drawing_Typography; /** * @brief Defines an OH_Drawing_LineTypography, which is used to perform line layout. * - * @since 16 + * @since 18 * @version 1.0 */ typedef struct OH_Drawing_LineTypography OH_Drawing_LineTypography; @@ -136,7 +136,7 @@ typedef struct OH_Drawing_TextShadow OH_Drawing_TextShadow; /** * @brief Defines an OH_Drawing_TextTab, which is used to to store the tab alignment type and position. * - * @since 16 + * @since 18 * @version 1.0 */ typedef struct OH_Drawing_TextTab OH_Drawing_TextTab; @@ -144,7 +144,7 @@ typedef struct OH_Drawing_TextTab OH_Drawing_TextTab; /** * @brief Defines an OH_Drawing_TextLine, which is used to manage text line. * - * @since 16 + * @since 18 * @version 1.0 */ typedef struct OH_Drawing_TextLine OH_Drawing_TextLine; @@ -152,7 +152,7 @@ typedef struct OH_Drawing_TextLine OH_Drawing_TextLine; /** * @brief Defines an OH_Drawing_Run, which is used to manage run. * - * @since 16 + * @since 18 * @version 1.0 */ typedef struct OH_Drawing_Run OH_Drawing_Run; diff --git a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h index d18a77b6f..e89a96b06 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_font_descriptor.h @@ -62,7 +62,7 @@ typedef enum { INSTALLED = 1 << 3, /** * Customized font types - * @since 16 + * @since 18 */ CUSTOMIZED = 1 << 4, } OH_Drawing_SystemFontType; @@ -81,7 +81,7 @@ typedef enum { * @param num Indicates the count of obtained OH_Drawing_FontDescriptor. * @return Returns an array of OH_Drawing_FontDescriptor. Released through the * OH_Drawing_DestroyFontDescriptors interface after use. - * @since 16 + * @since 18 */ OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescriptor* desc, size_t* num); @@ -91,7 +91,7 @@ OH_Drawing_FontDescriptor* OH_Drawing_MatchFontDescriptors(OH_Drawing_FontDescri * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param descriptors OH_Drawing_FontDescriptor object array. * @param num Represents the number of members of the OH_Drawing_FontDescriptor array. - * @since 16 + * @since 18 */ void OH_Drawing_DestroyFontDescriptors(OH_Drawing_FontDescriptor* descriptors, size_t num); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_line.h b/graphic/graphic_2d/native_drawing/drawing_text_line.h index 2d69ae963..ca57c57d8 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_line.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_line.h @@ -21,7 +21,7 @@ * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * - * @since 16 + * @since 18 * @version 1.0 */ @@ -33,7 +33,7 @@ * @kit ArkGraphics2D * @library libnative_drawing.so * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 16 + * @since 18 * @version 1.0 */ @@ -53,7 +53,7 @@ extern "C" { * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param typography Indicates the pointer to a typography object OH_Drawing_Typography. * @return Indicates the pointer to a text line array object OH_Drawing_Array. - * @since 16 + * @since 18 */ OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typography); @@ -62,7 +62,7 @@ OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typog * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param lines Indicates the pointer to the text line array object OH_Drawing_Array. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_DestroyTextLines(OH_Drawing_Array* lines); @@ -72,7 +72,7 @@ void OH_Drawing_DestroyTextLines(OH_Drawing_Array* lines); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to the text line object OH_Drawing_TextLine. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_DestroyTextLine(OH_Drawing_TextLine* line); @@ -84,7 +84,7 @@ void OH_Drawing_DestroyTextLine(OH_Drawing_TextLine* line); * @param lines Indicates the pointer to the text line array object OH_Drawing_Array. * @param index The text line object index. * @return Indicates the pointer to a text line object OH_Drawing_TextLine. - * @since 16 + * @since 18 */ OH_Drawing_TextLine* OH_Drawing_GetTextLineByIndex(OH_Drawing_Array* lines, size_t index); @@ -94,7 +94,7 @@ OH_Drawing_TextLine* OH_Drawing_GetTextLineByIndex(OH_Drawing_Array* lines, size * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Returns the count of glyphs. - * @since 16 + * @since 18 * @version 1.0 */ double OH_Drawing_TextLineGetGlyphCount(OH_Drawing_TextLine* line); @@ -106,7 +106,7 @@ double OH_Drawing_TextLineGetGlyphCount(OH_Drawing_TextLine* line); * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param start Indicates the pointer to text line start position. * @param end Indicates the pointer to text line end position. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_TextLineGetTextRange(OH_Drawing_TextLine* line, size_t* start, size_t* end); @@ -117,7 +117,7 @@ void OH_Drawing_TextLineGetTextRange(OH_Drawing_TextLine* line, size_t* start, s * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Indicates the pointer to a glyph runs array object of text line OH_Drawing_Array. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_Array* OH_Drawing_TextLineGetGlyphRuns(OH_Drawing_TextLine* line); @@ -127,7 +127,7 @@ OH_Drawing_Array* OH_Drawing_TextLineGetGlyphRuns(OH_Drawing_TextLine* line); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param runs Indicates the pointer to the run array object OH_Drawing_Array. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_DestroyRuns(OH_Drawing_Array* runs); @@ -139,7 +139,7 @@ void OH_Drawing_DestroyRuns(OH_Drawing_Array* runs); * @param runs Indicates the pointer to the run array object OH_Drawing_Array. * @param index The run object index. * @return Indicates the pointer to a run object OH_Drawing_Run. - * @since 16 + * @since 18 */ OH_Drawing_Run* OH_Drawing_GetRunByIndex(OH_Drawing_Array* runs, size_t index); @@ -151,7 +151,7 @@ OH_Drawing_Run* OH_Drawing_GetRunByIndex(OH_Drawing_Array* runs, size_t index); * @param canvas Indicates the pointer to an OH_Drawing_Canvas object. * @param x Represents the X-axis position on the canvas. * @param y Represents the Y-axis position on the canvas. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_TextLinePaint(OH_Drawing_TextLine* line, OH_Drawing_Canvas* canvas, double x, double y); @@ -166,7 +166,7 @@ void OH_Drawing_TextLinePaint(OH_Drawing_TextLine* line, OH_Drawing_Canvas* canv * For details, see the enum OH_Drawing_EllipsisModal. * @param ellipsis Indicates the ellipsis string to set. * @return Returns the pointer to the OH_Drawing_TextLine object created. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_TextLine* OH_Drawing_TextLineCreateTruncatedLine(OH_Drawing_TextLine* line, double width, int mode, @@ -181,7 +181,7 @@ OH_Drawing_TextLine* OH_Drawing_TextLineCreateTruncatedLine(OH_Drawing_TextLine* * @param descent Indicates the pointer to the distance that remains below the baseline. * @param leading Indicates the pointer to the line Spacing. * @return Returns The total width of the typesetting border. - * @since 16 + * @since 18 * @version 1.0 */ double OH_Drawing_TextLineGetTypographicBounds(OH_Drawing_TextLine* line, double* ascent, double* descent, @@ -193,7 +193,7 @@ double OH_Drawing_TextLineGetTypographicBounds(OH_Drawing_TextLine* line, double * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Returns the pointer to the OH_Drawing_Rect struct created. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_Rect* OH_Drawing_TextLineGetImageBounds(OH_Drawing_TextLine* line); @@ -204,7 +204,7 @@ OH_Drawing_Rect* OH_Drawing_TextLineGetImageBounds(OH_Drawing_TextLine* line); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @return Returns the tail space width. - * @since 16 + * @since 18 * @version 1.0 */ double OH_Drawing_TextLineGetTrailingSpaceWidth(OH_Drawing_TextLine* line); @@ -216,7 +216,7 @@ double OH_Drawing_TextLineGetTrailingSpaceWidth(OH_Drawing_TextLine* line); * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param point Indicates the pointer to an OH_Drawing_Point object. * @return Returns the string index for a given position. - * @since 16 + * @since 18 */ int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, OH_Drawing_Point* point); @@ -227,7 +227,7 @@ int32_t OH_Drawing_TextLineGetStringIndexForPosition(OH_Drawing_TextLine* line, * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param index The given string index. * @return Returns the offset for a given string index. - * @since 16 + * @since 18 */ double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int32_t index); @@ -241,7 +241,7 @@ double OH_Drawing_TextLineGetOffsetForStringIndex(OH_Drawing_TextLine* line, int * @return The return value of the user-defined callback function. * If false is returned, the traversal continues. * If true is returned, the traversal stops. - * @since 16 + * @since 18 * @version 1.0 */ typedef bool (*Drawing_CaretOffsetsCallback)(double offset, int32_t index, bool leadingEdge); @@ -252,7 +252,7 @@ typedef bool (*Drawing_CaretOffsetsCallback)(double offset, int32_t index, bool * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param line Indicates the pointer to an OH_Drawing_TextLine object. * @param callback User-defined callback functions, see Drawing_CaretOffsetsCallback. - * @since 16 + * @since 18 */ void OH_Drawing_TextLineEnumerateCaretOffsets(OH_Drawing_TextLine* line, Drawing_CaretOffsetsCallback callback); @@ -267,7 +267,7 @@ void OH_Drawing_TextLineEnumerateCaretOffsets(OH_Drawing_TextLine* line, Drawing * @param alignmentWidth The width of the text to be aligned. * Returns 0 if it is less than the actual width of the text. * @return Returns the offset of the aligned text. - * @since 16 + * @since 18 * @version 1.0 */ double OH_Drawing_TextLineGetAlignmentOffset(OH_Drawing_TextLine* line, double alignmentFactor, double alignmentWidth); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h index 0ab0b3a1f..1d594b13c 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_lineTypography.h @@ -21,7 +21,7 @@ * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * - * @since 16 + * @since 18 * @version 1.0 */ @@ -33,7 +33,7 @@ * @kit ArkGraphics2D * @library libnative_drawing.so * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 16 + * @since 18 * @version 1.0 */ @@ -52,7 +52,7 @@ extern "C" { * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. * @return Returns the pointer to the OH_Drawing_LineTypography object created. - * @since 16 + * @since 18 */ OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_TypographyCreate* handler); @@ -61,7 +61,7 @@ OH_Drawing_LineTypography* OH_Drawing_CreateLineTypography(OH_Drawing_Typography * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param lineTypography Indicates the pointer to an OH_Drawing_LineTypography object. - * @since 16 + * @since 18 */ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography); @@ -73,7 +73,7 @@ void OH_Drawing_DestroyLineTypography(OH_Drawing_LineTypography* lineTypography) * @param startIndex Indicates the starting point for the line-break calculations. * @param width Indicates the requested line-break width. * @return Returns the count of the characters from startIndex that would cause the line break. - * @since 16 + * @since 18 */ size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypography, size_t startIndex, double width); @@ -86,7 +86,7 @@ size_t OH_Drawing_LineTypographyGetLineBreak(OH_Drawing_LineTypography* lineTypo * @param startIndex Indicates the starting index of the text range. * @param count Indicates the characters count of the text range. * @return Returns the pointer to the OH_Drawing_TextLine object created. - * @since 16 + * @since 18 */ OH_Drawing_TextLine* OH_Drawing_LineTypographyCreateLine(OH_Drawing_LineTypography* lineTypography, size_t startIndex, size_t count); diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index f37f6afad..8873eaaf2 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -21,7 +21,7 @@ * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * - * @since 16 + * @since 18 * @version 1.0 */ @@ -33,7 +33,7 @@ * @kit ArkGraphics2D * @library libnative_drawing.so * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @since 16 + * @since 18 * @version 1.0 */ @@ -54,7 +54,7 @@ extern "C" { * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. * @return Run of glyph indices array object OH_Drawing_Array. - * @since 16 + * @since 18 */ OH_Drawing_Array* OH_Drawing_GetRunStringIndices(OH_Drawing_Run* run, int64_t start, int64_t length); @@ -65,7 +65,7 @@ OH_Drawing_Array* OH_Drawing_GetRunStringIndices(OH_Drawing_Run* run, int64_t st * @param stringIndices the run glyph indices array object OH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph indices element. - * @since 16 + * @since 18 */ uint64_t OH_Drawing_GetRunStringIndicesByIndex(OH_Drawing_Array* stringIndices, size_t index); @@ -74,7 +74,7 @@ uint64_t OH_Drawing_GetRunStringIndicesByIndex(OH_Drawing_Array* stringIndices, * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param stringIndices glyph indices array object OH_Drawing_Array. - * @since 16 + * @since 18 */ void OH_Drawing_DestroyRunStringIndices(OH_Drawing_Array* stringIndices); @@ -85,7 +85,7 @@ void OH_Drawing_DestroyRunStringIndices(OH_Drawing_Array* stringIndices); * @param run Indicates the pointer to an OH_Drawing_Run object. * @param location The run of glyph location. * @param length The run of glyph length. - * @since 16 + * @since 18 */ void OH_Drawing_GetRunStringRange(OH_Drawing_Run* run, uint64_t* location, uint64_t* length); @@ -98,7 +98,7 @@ void OH_Drawing_GetRunStringRange(OH_Drawing_Run* run, uint64_t* location, uint6 * @param descent The run of descent. * @param leading The run of leading. * @return run typographic width. - * @since 16 + * @since 18 */ float OH_Drawing_GetRunTypographicBounds(OH_Drawing_Run* run, float* ascent, float* descent, float* leading); @@ -110,7 +110,7 @@ float OH_Drawing_GetRunTypographicBounds(OH_Drawing_Run* run, float* ascent, flo * @param run Indicates the pointer to an OH_Drawing_Run object. * @param x Indicates the x coordinate. * @param y Indicates the y coordinate. - * @since 16 + * @since 18 */ void OH_Drawing_RunPaint(OH_Drawing_Canvas* canvas, OH_Drawing_Run* run, double x, double y); @@ -120,7 +120,7 @@ void OH_Drawing_RunPaint(OH_Drawing_Canvas* canvas, OH_Drawing_Run* run, double * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param run Indicates the pointer to an OH_Drawing_Run object. * @return The run image bounds to an OH_Drawing_Rect object. - * @since 16 + * @since 18 */ OH_Drawing_Rect* OH_Drawing_GetRunImageBounds(OH_Drawing_Run* run); @@ -129,7 +129,7 @@ OH_Drawing_Rect* OH_Drawing_GetRunImageBounds(OH_Drawing_Run* run); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param rect Run image bounds to an OH_Drawing_Rect object. - * @since 16 + * @since 18 */ void OH_Drawing_DestroyRunImageBounds(OH_Drawing_Rect* rect); @@ -141,7 +141,7 @@ void OH_Drawing_DestroyRunImageBounds(OH_Drawing_Rect* rect); * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. * @return Run of glyph array object OH_Drawing_ArrayOH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph element. - * @since 16 + * @since 18 * @version 1.0 */ uint16_t OH_Drawing_GetRunGlyphsByIndex(OH_Drawing_Array* glyphs, size_t index); @@ -162,7 +162,7 @@ uint16_t OH_Drawing_GetRunGlyphsByIndex(OH_Drawing_Array* glyphs, size_t index); * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param glyphs The run of glyph array object OH_Drawing_Array. - * @since 16 + * @since 18 */ void OH_Drawing_DestroyRunGlyphs(OH_Drawing_Array* glyphs); @@ -174,7 +174,7 @@ void OH_Drawing_DestroyRunGlyphs(OH_Drawing_Array* glyphs); * @param start The run of start index. * @param length The run of length, if start and length are set to 0, then get all of the current run. * @return Run of position array object OH_Drawing_Array. - * @since 16 + * @since 18 */ OH_Drawing_Array* OH_Drawing_GetRunPositions(OH_Drawing_Run* run, int64_t start, int64_t length); @@ -185,7 +185,7 @@ OH_Drawing_Array* OH_Drawing_GetRunPositions(OH_Drawing_Run* run, int64_t start, * @param positions The run of position array object OH_Drawing_Array. * @param index The run of glyph index. * @return Run of glyph position pointer to an OH_Drawing_Point object. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_Point* OH_Drawing_GetRunPositionsByIndex(OH_Drawing_Array* positions, size_t index); @@ -195,7 +195,7 @@ OH_Drawing_Point* OH_Drawing_GetRunPositionsByIndex(OH_Drawing_Array* positions, * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param positions The run of position array object OH_Drawing_Array. - * @since 16 + * @since 18 */ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); @@ -205,7 +205,7 @@ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param run Indicates the pointer to an OH_Drawing_Run object. * @return The number of glyph. - * @since 16 + * @since 18 */ uint32_t OH_Drawing_GetRunGlyphCount(OH_Drawing_Run* run); #ifdef __cplusplus diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index db40d99ae..966621728 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -281,7 +281,7 @@ typedef enum { WORD_BREAK_TYPE_BREAK_WORD = 2, /** * Break word with hyphens - * @since 16 + * @since 18 */ WORD_BREAK_TYPE_BREAK_HYPHEN = 3, } OH_Drawing_WordBreakType; @@ -768,7 +768,7 @@ void OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle* style, int decorati * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param decoration Indicates the text decoration to add. For details, see the enum OH_Drawing_TextDecoration. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle* style, int decoration); @@ -780,7 +780,7 @@ void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle* style, int decorati * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param decoration Indicates the text decoration to remove, shoud be match existing text decorations. * For details, see the enum OH_Drawing_TextDecoration. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_RemoveTextStyleDecoration(OH_Drawing_TextStyle* style, int decoration); @@ -2837,7 +2837,7 @@ void OH_Drawing_SetTextShadow(OH_Drawing_TextShadow* shadow, uint32_t color, OH_ * @return Returns the pointer to the OH_Drawing_TextTab object created. If the object returns NULL, * the creation failed. The possible cause of the failure is that the application address space is used up. * As a result, space cannot be allocated. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_TextTab* OH_Drawing_CreateTextTab(OH_Drawing_TextAlign alignment, float location); @@ -2847,7 +2847,7 @@ OH_Drawing_TextTab* OH_Drawing_CreateTextTab(OH_Drawing_TextAlign alignment, flo * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param tab Indicates the pointer to an OH_Drawing_TextTab object. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab* tab); @@ -2858,7 +2858,7 @@ void OH_Drawing_DestroyTextTab(OH_Drawing_TextTab* tab); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @return Returns align of an OH_Drawing_TextTab object. - * @since 16 + * @since 18 * @version 1.0 */ OH_Drawing_TextAlign OH_Drawing_GetTextTabAlignment(OH_Drawing_TextTab* tab); @@ -2869,7 +2869,7 @@ OH_Drawing_TextAlign OH_Drawing_GetTextTabAlignment(OH_Drawing_TextTab* tab); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param tab Indicates the pointer to an OH_Drawing_TextTab object. * @return Returns location of an OH_Drawing_TextTab object. - * @since 16 + * @since 18 * @version 1.0 */ float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab* tab); @@ -2883,7 +2883,7 @@ float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab* tab); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param tab Indicates the pointer to an OH_Drawing_TextTab object. - * @since 16 + * @since 18 * @version 1.0 */ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawing_TextTab* tab); diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index b75ffbdd2..41b01ce8d 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -879,7 +879,7 @@ int32_t OH_NativeWindow_GetMetadataValue(OHNativeWindow *window, OH_NativeBuffer * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - window is NULL. * {@link NATIVE_ERROR_CONSUMER_DISCONNECTED} 41211000 - the consumer is disconnected. * {@link NATIVE_ERROR_BINDER_ERROR} 50401000 - ipc send failed. - * @since 16 + * @since 18 * @version 1.0 */ int32_t OH_NativeWindow_CleanCache(OHNativeWindow *window); diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index 71413e6dc..07333c781 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -191,7 +191,7 @@ typedef struct HiAppEvent_Watcher HiAppEvent_Watcher; /** * @brief The HiAppEvent_Processor structure is designed for event report. * - * @since 16 + * @since 18 */ typedef struct HiAppEvent_Processor HiAppEvent_Processor; @@ -654,7 +654,7 @@ void OH_HiAppEvent_ClearData(); * * @param name The name of the processor. * @return Returns a pointer to the HiAppEvent_Processor instance. - * @since 16 + * @since 18 */ HiAppEvent_Processor* OH_HiAppEvent_CreateProcessor(const char* name); @@ -670,7 +670,7 @@ HiAppEvent_Processor* OH_HiAppEvent_CreateProcessor(const char* name); * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. - * @since 16 + * @since 18 */ int OH_HiAppEvent_SetReportRoute(HiAppEvent_Processor* processor, const char* appId, const char* routeInfo); @@ -687,7 +687,7 @@ int OH_HiAppEvent_SetReportRoute(HiAppEvent_Processor* processor, const char* ap * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. - * @since 16 + * @since 18 */ int OH_HiAppEvent_SetReportPolicy(HiAppEvent_Processor* processor, int periodReport, int batchReport, bool onStartReport, bool onBackgroundReport); @@ -704,7 +704,7 @@ int OH_HiAppEvent_SetReportPolicy(HiAppEvent_Processor* processor, int periodRep * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. - * @since 16 + * @since 18 */ int OH_HiAppEvent_SetReportEvent(HiAppEvent_Processor* processor, const char* domain, const char* name, bool isRealTime); @@ -721,7 +721,7 @@ int OH_HiAppEvent_SetReportEvent(HiAppEvent_Processor* processor, const char* do * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. - * @since 16 + * @since 18 */ int OH_HiAppEvent_SetCustomConfig(HiAppEvent_Processor* processor, const char* key, const char* value); @@ -735,7 +735,7 @@ int OH_HiAppEvent_SetCustomConfig(HiAppEvent_Processor* processor, const char* k * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. - * @since 16 + * @since 18 */ int OH_HiAppEvent_SetConfigId(HiAppEvent_Processor* processor, int configId); @@ -751,7 +751,7 @@ int OH_HiAppEvent_SetConfigId(HiAppEvent_Processor* processor, int configId); * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. - * @since 16 + * @since 18 */ int OH_HiAppEvent_SetReportUserId(HiAppEvent_Processor* processor, const char* const * userIdNames, int size); @@ -767,7 +767,7 @@ int OH_HiAppEvent_SetReportUserId(HiAppEvent_Processor* processor, const char* c * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. - * @since 16 + * @since 18 */ int OH_HiAppEvent_SetReportUserProperty(HiAppEvent_Processor* processor, const char* const * userPropertyNames, int size); @@ -781,7 +781,7 @@ int OH_HiAppEvent_SetReportUserProperty(HiAppEvent_Processor* processor, const c * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. * {@link HIAPPEVENT_OPERATE_FAILED} Name not found or register processor error. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. - * @since 16 + * @since 18 */ int64_t OH_HiAppEvent_AddProcessor(HiAppEvent_Processor* processor); @@ -789,7 +789,7 @@ int64_t OH_HiAppEvent_AddProcessor(HiAppEvent_Processor* processor); * @brief The interface to destroy processor. * * @param processor The pointer to the HiAppEvent_Processor instance. - * @since 16 + * @since 18 */ void OH_HiAppEvent_DestroyProcessor(HiAppEvent_Processor* processor); @@ -802,7 +802,7 @@ void OH_HiAppEvent_DestroyProcessor(HiAppEvent_Processor* processor); * {@link HIAPPEVENT_PROCESSOR_NOT_FOUND} Processor not add. * {@link HIAPPEVENT_OPERATE_FAILED} The operation is failed. * {@link HIAPPEVENT_INVALID_UID} Invalid uid. - * @since 16 + * @since 18 */ int OH_HiAppEvent_RemoveProcessor(int64_t processorId); diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h index 6ae0c342a..63dc8cf01 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h @@ -155,7 +155,7 @@ extern "C" { /** * @brief app hicollie event. * - * @since 16 + * @since 18 * @version 1.0 */ #define EVENT_APP_HICOLLIE "APP_HICOLLIE" diff --git a/hiviewdfx/hicollie/include/hicollie/hicollie.h b/hiviewdfx/hicollie/include/hicollie/hicollie.h index 26afa1be0..794fd3c6d 100644 --- a/hiviewdfx/hicollie/include/hicollie/hicollie.h +++ b/hiviewdfx/hicollie/include/hicollie/hicollie.h @@ -64,22 +64,22 @@ typedef enum HiCollie_ErrorCode { HICOLLIE_REMOTE_FAILED = 29800002, /** * Invalid timer name - * @since 16 + * @since 18 */ HICOLLIE_INVALID_TIMER_NAME = 29800003, /** * Invalid timeout value - * @since 16 + * @since 18 */ HICOLLIE_INVALID_TIMEOUT_VALUE = 29800004, /** * Wrong process context - * @since 16 + * @since 18 */ HICOLLIE_WRONG_PROCESS_CONTEXT = 29800005, /** * The pointer used to save returned timer id should not be NULL - * @since 16 + * @since 18 */ HICOLLIE_WRONG_TIMER_ID_OUTPUT_PARAM = 29800006, } HiCollie_ErrorCode; @@ -152,7 +152,7 @@ HiCollie_ErrorCode OH_HiCollie_Init_StuckDetection(OH_HiCollie_Task task); * {@link HICOLLIE_INVALID_ARGUMENT} 401 - stuckTimeout is less than 3 seconds and greater than 15 seconds. * {@link HICOLLIE_WRONG_THREAD_CONTEXT} 29800001 - Wrong thread context * The function can not be called from main thread. - * @since 16 + * @since 18 */ HiCollie_ErrorCode OH_HiCollie_Init_StuckDetectionWithTimeout(OH_HiCollie_Task task, uint32_t stuckTimeout); @@ -191,14 +191,14 @@ HiCollie_ErrorCode OH_HiCollie_Report(bool* isSixSecond); * @brief When user call {@link OH_HiCollie_SetTimer} and do not call {@link OH_HiCollie_CancelTimer} * in specific time, the callback function will be executed. * - * @since 16 + * @since 18 */ typedef void (*OH_HiCollie_Callback)(void*); /** * @brief Defines the actions that will be executed when timeout happens. * - * @since 16 + * @since 18 */ typedef enum HiCollie_Flag { /** Default action is generate log file and do recovery */ @@ -214,7 +214,7 @@ typedef enum HiCollie_Flag { /** * @brief Defines the input parameter for {@link OH_HiCollie_SetTimer} * -* @since 16 +* @since 18 */ typedef struct HiCollie_SetTimerParam { /** The timer name */ @@ -241,7 +241,7 @@ typedef struct HiCollie_SetTimerParam { * from appspawn and native process. * {@link HICOLLIE_WRONG_TIMER_ID_OUTPUT_PARAM} 29800006 - The pointer used to save returned timer id * should not be NULL. - * @since 16 + * @since 18 */ HiCollie_ErrorCode OH_HiCollie_SetTimer(HiCollie_SetTimerParam param, int *id); @@ -249,7 +249,7 @@ HiCollie_ErrorCode OH_HiCollie_SetTimer(HiCollie_SetTimerParam param, int *id); * @brief Cancel the timer right after calling the time-consuming function. * * @param id The timer id that is return from {@link OH_HiCollie_SetTimer}. - * @since 16 + * @since 18 */ void OH_HiCollie_CancelTimer(int id); diff --git a/hiviewdfx/hilog/include/hilog/log.h b/hiviewdfx/hilog/include/hilog/log.h index db6b8e1c0..1c4cda704 100644 --- a/hiviewdfx/hilog/include/hilog/log.h +++ b/hiviewdfx/hilog/include/hilog/log.h @@ -170,7 +170,7 @@ int OH_LOG_Print(LogType type, LogLevel level, unsigned int domain, const char * * @param message Indicates the log string. * @return Returns 0 or a larger value if the operation is successful; returns a value smaller * than 0 otherwise. - * @since 16 + * @since 18 */ int OH_LOG_PrintMsg(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *message); @@ -190,7 +190,7 @@ int OH_LOG_PrintMsg(LogType type, LogLevel level, unsigned int domain, const cha * @param messageLen Indicates the length of message. * @return Returns 0 or a larger value if the operation is successful; returns a value smaller * than 0 otherwise. - * @since 16 + * @since 18 */ int OH_LOG_PrintMsgByLen(LogType type, LogLevel level, unsigned int domain, const char *tag, size_t tagLen, const char *message, size_t messageLen); @@ -214,7 +214,7 @@ int OH_LOG_PrintMsgByLen(LogType type, LogLevel level, unsigned int domain, cons * in the format string. * @return Returns 0 or a larger value if the operation is successful; returns a value smaller * than 0 otherwise. - * @since 16 + * @since 18 */ int OH_LOG_VPrint(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *fmt, va_list ap) __attribute__((__format__(os_log, 5, 0))); diff --git a/multimedia/audio_framework/common/native_audio_device_base.h b/multimedia/audio_framework/common/native_audio_device_base.h index 54d1313ce..0e751ac95 100644 --- a/multimedia/audio_framework/common/native_audio_device_base.h +++ b/multimedia/audio_framework/common/native_audio_device_base.h @@ -146,7 +146,7 @@ typedef enum { /** * @brief Usb audio device. * - * @since 16 + * @since 18 */ AUDIO_DEVICE_TYPE_USB_DEVICE = 25, diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index c41efaf91..af6f59c31 100644 --- a/multimedia/audio_framework/common/native_audiostream_base.h +++ b/multimedia/audio_framework/common/native_audiostream_base.h @@ -136,7 +136,7 @@ typedef enum { /** * Float 32, little endian. * - * @since 16 + * @since 18 */ AUDIOSTREAM_SAMPLE_F32LE = 4, } OH_AudioStream_SampleFormat; diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index b43637757..ce92ddfee 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -359,21 +359,21 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; * @brief Enumerates the mime type of audio raw stream. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_RAW; /** * @brief Enumerates the MIME type of video mpeg2 codec. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG2; /** * @brief Enumerates the MIME type of video mpeg4 part2 codec. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2; @@ -1011,7 +1011,7 @@ extern const char *OH_MD_KEY_CREATION_TIME; * it will sumbit the previous frame repeatly in milliseconds. It is used in configure. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER; /** @@ -1020,7 +1020,7 @@ extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER; * {@link VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER} is vaild. It is used in configure. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT; @@ -1136,7 +1136,7 @@ typedef enum OH_VVCProfile { * @brief MPEG2 Profile * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ typedef enum OH_MPEG2Profile { /** Simple profile */ @@ -1157,7 +1157,7 @@ typedef enum OH_MPEG2Profile { * @brief MPEG4 Profile * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ typedef enum OH_MPEG4Profile { /** Simple profile */ @@ -1219,7 +1219,7 @@ typedef enum OH_AVOutputFormat { AV_OUTPUT_FORMAT_WAV = 10, /** * The muxer output aac file format. - * @since 16 + * @since 18 */ AV_OUTPUT_FORMAT_AAC = 11, } OH_AVOutputFormat; @@ -1444,7 +1444,7 @@ typedef enum OH_VVCLevel { * @brief MPEG2 Level. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ typedef enum OH_MPEG2Level { /** Low level */ @@ -1461,7 +1461,7 @@ typedef enum OH_MPEG2Level { * @brief MPEG4 Level. * * @syscap SystemCapability.Multimedia.Media.CodecBase - * @since 16 + * @since 18 */ typedef enum OH_MPEG4Level { /** 0 level */ diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index f31105200..0a1498f3a 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -62,14 +62,14 @@ typedef struct OH_PackingOptions OH_PackingOptions; /** * @brief Defines the image sequence packing options. * - * @since 16 + * @since 18 */ struct OH_PackingOptionsForSequence; /** * @brief Defines the image sequence packing options. * - * @since 16 + * @since 18 */ typedef struct OH_PackingOptionsForSequence OH_PackingOptionsForSequence; @@ -203,7 +203,7 @@ Image_ErrorCode OH_PackingOptions_Release(OH_PackingOptions *options); * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_Create(OH_PackingOptionsForSequence **options); @@ -215,7 +215,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_Create(OH_PackingOptionsForSequence * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_SetFrameCount(OH_PackingOptionsForSequence *options, uint32_t frameCount); @@ -228,7 +228,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetFrameCount(OH_PackingOptionsForS * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or frameCount is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_GetFrameCount(OH_PackingOptionsForSequence *options, uint32_t *frameCount); @@ -242,7 +242,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetFrameCount(OH_PackingOptionsForS * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_SetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength); @@ -256,7 +256,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetDelayTimeList(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_GetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength); @@ -270,7 +270,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetDelayTimeList(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_SetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength); @@ -284,7 +284,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetDisposalTypes(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_GetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength); @@ -297,7 +297,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetDisposalTypes(OH_PackingOptionsF * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_SetLoopCount(OH_PackingOptionsForSequence *options, uint32_t loopCount); @@ -309,7 +309,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_SetLoopCount(OH_PackingOptionsForSe * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options or loopCount is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_GetLoopCount(OH_PackingOptionsForSequence *options, uint32_t *loopCount); @@ -320,7 +320,7 @@ Image_ErrorCode OH_PackingOptionsForSequence_GetLoopCount(OH_PackingOptionsForSe * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} options is nullptr. - * @since 16 + * @since 18 */ Image_ErrorCode OH_PackingOptionsForSequence_Release(OH_PackingOptionsForSequence *options); @@ -392,7 +392,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPicture(OH_ImagePackerNative * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or size/length is invalid * {@link IMAGE_ENCODE_FAILED} encode failed. - * @since 16 + * @since 18 */ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, @@ -452,7 +452,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPicture(OH_ImagePackerNative * {@link IMAGE_SUCCESS} if the execution is successful. * {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or length is invalid * {@link IMAGE_ENCODE_FAILED} encode failed. - * @since 16 + * @since 18 */ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, size_t sequenceLength, int32_t fd); diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 7319dde37..376b2891f 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -100,7 +100,7 @@ typedef enum { PIXEL_FORMAT_UNKNOWN = 0, /* * ARGB_8888 format - * @since 16 + * @since 18 */ PIXEL_FORMAT_ARGB_8888 = 1, /* @@ -754,7 +754,7 @@ Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing(OH_PixelmapNative *pixel * {@link IMAGE_SUCCESS} If the execution is successful. * {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid. * @see OH_PixelmapNative - * @since 16 + * @since 18 */ Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcPixelmap, OH_PixelmapNative **dstPixelmap, float scaleX, float scaleY); @@ -773,7 +773,7 @@ Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcPix * {@link IMAGE_TOO_LARGE} If image is too large. * {@link IMAGE_ALLOC_FAILED} If device has no memory. * @see OH_PixelmapNative - * @since 16 + * @since 18 */ Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing(OH_PixelmapNative *srcPixelmap, OH_PixelmapNative **dstPixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level); @@ -950,7 +950,7 @@ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, cha * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. * @see OH_PixelmapNative - * @since 16 + * @since 18 */ Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint32_t *byteCount); @@ -963,7 +963,7 @@ Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or allocationByteCount are invalid. * @see OH_PixelmapNative - * @since 16 + * @since 18 */ Image_ErrorCode OH_PixelmapNative_GetAllocationByteCount(OH_PixelmapNative *pixelmap, uint32_t *allocationByteCount); diff --git a/multimedia/media_foundation/media_types.h b/multimedia/media_foundation/media_types.h index 1ec6d447c..d302fb970 100644 --- a/multimedia/media_foundation/media_types.h +++ b/multimedia/media_foundation/media_types.h @@ -21,7 +21,7 @@ * including functions such as memory, error codes, and media data structures. * * @syscap SystemCapability.Multimedia.Media.Core - * @since 16 + * @since 18 */ /** @@ -32,7 +32,7 @@ * @kit AVCodecKit * @library libnative_media_core.so * @syscap SystemCapability.Multimedia.Media.Core - * @since 16 + * @since 18 */ #ifndef MEDIA_TYPES_H @@ -49,7 +49,7 @@ extern "C" { * @brief Enumerates HDR types. * * @syscap SystemCapability.Multimedia.Media.Core - * @since 16 + * @since 18 */ typedef enum OH_Core_HdrType { /** diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index 2fedd0834..398a16f0f 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -96,7 +96,7 @@ typedef enum OH_AVErrCode { AV_ERR_INPUT_DATA_ERROR = 10, /** * @error unsupported format. - * @since 16 + * @since 18 */ AV_ERR_UNSUPPORTED_FORMAT = 11, /** diff --git a/multimedia/player_framework/avimage_generator.h b/multimedia/player_framework/avimage_generator.h index 261202db7..280b7b040 100644 --- a/multimedia/player_framework/avimage_generator.h +++ b/multimedia/player_framework/avimage_generator.h @@ -20,7 +20,7 @@ * @brief Provides APIs for generating an image at the specific time from a video resource. * * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 16 + * @since 18 */ /** @@ -32,7 +32,7 @@ * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @kit MediaKit * @library libavimage_generator.so - * @since 16 + * @since 18 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_H @@ -53,7 +53,7 @@ extern "C" { * @brief Define OH_AVImageGenerator field. * * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 16 + * @since 18 */ typedef struct OH_AVImageGenerator OH_AVImageGenerator; @@ -63,7 +63,7 @@ typedef struct OH_AVImageGenerator OH_AVImageGenerator; * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @return Returns a pointer to an OH_AVImageGenerator instance for success, nullptr for failure. * Possible failure causes: HstEngineFactory failed to CreateAVMetadataHelperEngine. - * @since 16 + * @since 18 */ OH_AVImageGenerator* OH_AVImageGenerator_Create(void); @@ -80,7 +80,7 @@ OH_AVImageGenerator* OH_AVImageGenerator_Create(void); * {@link AV_ERR_INVALID_VAL} if input generator is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, int32_t fd, int64_t offset, int64_t size); @@ -102,7 +102,7 @@ OH_AVErrCode OH_AVImageGenerator_SetFDSource(OH_AVImageGenerator* generator, * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator, int64_t timeUs, OH_AVImageGenerator_QueryOptions options, OH_PixelmapNative** pixelMap); @@ -115,7 +115,7 @@ OH_AVErrCode OH_AVImageGenerator_FetchFrameByTime(OH_AVImageGenerator* generator * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input generator is nullptr or input param is invalid. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVImageGenerator_Release(OH_AVImageGenerator* generator); diff --git a/multimedia/player_framework/avimage_generator_base.h b/multimedia/player_framework/avimage_generator_base.h index 56f001257..570979142 100644 --- a/multimedia/player_framework/avimage_generator_base.h +++ b/multimedia/player_framework/avimage_generator_base.h @@ -20,7 +20,7 @@ * @brief Provides APIs for generating an image at the specific time from a video resource. * * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 16 + * @since 18 */ /** @@ -31,7 +31,7 @@ * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @kit MediaKit * @library libavimage_generator.so - * @since 16 + * @since 18 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_BASE_H @@ -47,7 +47,7 @@ extern "C" { * @brief Enumerates the image query options about the relationship between the given timeUs and a key frame. * * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 16 + * @since 18 */ typedef enum OH_AVImageGenerator_QueryOptions { /** diff --git a/multimedia/player_framework/avmetadata_extractor.h b/multimedia/player_framework/avmetadata_extractor.h index cb54f5c89..9aa92ad09 100644 --- a/multimedia/player_framework/avmetadata_extractor.h +++ b/multimedia/player_framework/avmetadata_extractor.h @@ -20,7 +20,7 @@ * @brief Provides APIs of metadata capability for Media Source. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ /** @@ -32,7 +32,7 @@ * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @kit MediaKit * @library libavmetadata_extractor.so - * @since 16 + * @since 18 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_H @@ -55,7 +55,7 @@ extern "C" { * @brief Define OH_AVMetadataExtractor field. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ typedef struct OH_AVMetadataExtractor OH_AVMetadataExtractor; @@ -65,7 +65,7 @@ typedef struct OH_AVMetadataExtractor OH_AVMetadataExtractor; * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @return Returns a pointer to an OH_AVMetadataExtractor instance for success, nullptr for failure * Possible failure causes: failed to HstEngineFactory::CreateAVMetadataHelperEngine. - * @since 16 + * @since 18 */ OH_AVMetadataExtractor* OH_AVMetadataExtractor_Create(void); @@ -82,7 +82,7 @@ OH_AVMetadataExtractor* OH_AVMetadataExtractor_Create(void); * {@link AV_ERR_INVALID_VAL} if input extractor is nullptr or input param is invalid. * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extractor, int32_t fd, int64_t offset, int64_t size); @@ -100,7 +100,7 @@ OH_AVErrCode OH_AVMetadataExtractor_SetFDSource(OH_AVMetadataExtractor* extracto * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extractor, OH_AVFormat* avMetadata); @@ -117,7 +117,7 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchMetadata(OH_AVMetadataExtractor* extrac * {@link AV_ERR_OPERATE_NOT_PERMIT} if operation not allowed. * {@link AV_ERR_UNSUPPORTED_FORMAT} if format is unsupported. * {@link AV_ERR_NO_MEMORY} if internal memory allocation failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extractor, OH_PixelmapNative** pixelMap); @@ -129,7 +129,7 @@ OH_AVErrCode OH_AVMetadataExtractor_FetchAlbumCover(OH_AVMetadataExtractor* extr * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input extractor is nullptr or input param is invalid. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVMetadataExtractor_Release(OH_AVMetadataExtractor* extractor); diff --git a/multimedia/player_framework/avmetadata_extractor_base.h b/multimedia/player_framework/avmetadata_extractor_base.h index 75c18f5a5..b0051eb8c 100644 --- a/multimedia/player_framework/avmetadata_extractor_base.h +++ b/multimedia/player_framework/avmetadata_extractor_base.h @@ -20,7 +20,7 @@ * @brief Provides APIs of metadata capability for Media Source. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ /** @@ -31,7 +31,7 @@ * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @kit MediaKit * @library libavmetadata_extractor.so - * @since 16 + * @since 18 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_BASE_H @@ -50,7 +50,7 @@ extern "C" { * @brief Key to get the album title of the media source, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_ALBUM = "album"; @@ -58,7 +58,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_ALBUM = "album"; * @brief Key to get the album performer or artist associated, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_ALBUM_ARTIST = "albumArtist"; @@ -66,7 +66,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_ALBUM_ARTIST = "albumArtist"; * @brief Key to get the artist name, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_ARTIST = "artist"; @@ -74,7 +74,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_ARTIST = "artist"; * @brief Key to get the author name, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_AUTHOR = "author"; @@ -82,7 +82,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_AUTHOR = "author"; * @brief Key to get the created time of the media source, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_DATE_TIME = "dateTime"; @@ -90,7 +90,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_DATE_TIME = "dateTime"; * @brief Key to get the created or modified time with the specific date format, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_DATE_TIME_FORMAT = "dateTimeFormat"; @@ -98,7 +98,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_DATE_TIME_FORMAT = "dateTimeFormat"; * @brief Key to get the composer of the media source, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_COMPOSER = "composer"; @@ -106,7 +106,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_COMPOSER = "composer"; * @brief Key to get the playback duration of the media source, value type is int64_t, value unit is millisecond (ms). * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_DURATION = "duration"; @@ -114,7 +114,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_DURATION = "duration"; * @brief Key to get the content type or genre, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_GENRE = "genre"; @@ -123,7 +123,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_GENRE = "genre"; * value type is int32_t. 1 means true and 0 means false. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_HAS_AUDIO = "hasAudio"; @@ -132,7 +132,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_HAS_AUDIO = "hasAudio"; * value type is int32_t. 1 means true and 0 means false. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_HAS_VIDEO = "hasVideo"; @@ -141,7 +141,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_HAS_VIDEO = "hasVideo"; * Some example mime types include: "video/mp4", "audio/mp4", "audio/amr-wb". * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_MIME_TYPE = "mimeType"; @@ -149,7 +149,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_MIME_TYPE = "mimeType"; * @brief Key to get the number of tracks, value type is int32_t. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_TRACK_COUNT = "trackCount"; @@ -157,7 +157,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_TRACK_COUNT = "trackCount"; * @brief Key to get the audio sample rate, value type is int32_t. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_SAMPLE_RATE = "sampleRate"; @@ -165,7 +165,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_SAMPLE_RATE = "sampleRate"; * @brief Key to get the media source title, value type is const char*. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_TITLE = "title"; @@ -173,7 +173,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_TITLE = "title"; * @brief Key to get the video height if the media contains video, value type is int32_t. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_HEIGHT = "videoHeight"; @@ -181,7 +181,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_HEIGHT = "videoHeight"; * @brief Key to get the video width if the media contains video, value type is int32_t. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_WIDTH = "videoWidth"; @@ -189,7 +189,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_WIDTH = "videoWidth"; * @brief Key to get the video rotation angle, value type is int32_t. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_ORIENTATION = "videoOrientation"; @@ -198,7 +198,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_ORIENTATION = "videoOrientation * For details of the value, see {@link OH_Core_HdrType} defined in {@link media_types.h}. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_IS_HDR_VIVID = "hdrType"; @@ -206,7 +206,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_VIDEO_IS_HDR_VIVID = "hdrType"; * @brief Key to get the latitude value in the geographical location, value type is float. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_LOCATION_LATITUDE = "latitude"; @@ -214,7 +214,7 @@ static const char* OH_AVMETADATA_EXTRACTOR_LOCATION_LATITUDE = "latitude"; * @brief Key to get the longitude value in the geographical location, value type is float. * * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 16 + * @since 18 */ static const char* OH_AVMETADATA_EXTRACTOR_LOCATION_LONGITUDE = "longitude"; diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h index abd2af71e..b94e92b97 100644 --- a/multimedia/player_framework/avrecorder.h +++ b/multimedia/player_framework/avrecorder.h @@ -20,7 +20,7 @@ * @brief Provides APIs of request capability for Recorder. * * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 * @} */ @@ -33,7 +33,7 @@ * @kit MediaKit * @library libavrecorder.so * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_H @@ -54,7 +54,7 @@ extern "C" { * @brief Create a recorder * @syscap SystemCapability.Multimedia.Media.AVRecorder * @return Returns a pointer to an OH_AVRecorder instance for success, nullptr for failure - * @since 16 + * @since 18 */ OH_AVRecorder *OH_AVRecorder_Create(void); @@ -66,7 +66,7 @@ OH_AVRecorder *OH_AVRecorder_Create(void); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder Prepare failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_Prepare(OH_AVRecorder *recorder, OH_AVRecorder_Config *config); @@ -78,7 +78,7 @@ OH_AVErrCode OH_AVRecorder_Prepare(OH_AVRecorder *recorder, OH_AVRecorder_Config * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or config is null. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_GetAVRecorderConfig(OH_AVRecorder *recorder, OH_AVRecorder_Config **config); @@ -90,7 +90,7 @@ OH_AVErrCode OH_AVRecorder_GetAVRecorderConfig(OH_AVRecorder *recorder, OH_AVRec * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_GetInputSurface(OH_AVRecorder *recorder, OHNativeWindow **window); @@ -102,7 +102,7 @@ OH_AVErrCode OH_AVRecorder_GetInputSurface(OH_AVRecorder *recorder, OHNativeWind * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or update rotation failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_UpdateRotation(OH_AVRecorder *recorder, int32_t rotation); @@ -113,7 +113,7 @@ OH_AVErrCode OH_AVRecorder_UpdateRotation(OH_AVRecorder *recorder, int32_t rotat * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder start failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_Start(OH_AVRecorder *recorder); @@ -124,7 +124,7 @@ OH_AVErrCode OH_AVRecorder_Start(OH_AVRecorder *recorder); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder pause failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_Pause(OH_AVRecorder *recorder); @@ -135,7 +135,7 @@ OH_AVErrCode OH_AVRecorder_Pause(OH_AVRecorder *recorder); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder resume failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_Resume(OH_AVRecorder *recorder); @@ -146,7 +146,7 @@ OH_AVErrCode OH_AVRecorder_Resume(OH_AVRecorder *recorder); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder stop failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_Stop(OH_AVRecorder *recorder); @@ -157,7 +157,7 @@ OH_AVErrCode OH_AVRecorder_Stop(OH_AVRecorder *recorder); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder reset failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_Reset(OH_AVRecorder *recorder); @@ -168,7 +168,7 @@ OH_AVErrCode OH_AVRecorder_Reset(OH_AVRecorder *recorder); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or recorder release failed. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder); @@ -181,7 +181,7 @@ OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder); * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_GetAvailableEncoder(OH_AVRecorder *recorder, OH_AVRecorder_EncoderInfo **info, int32_t *length); @@ -196,7 +196,7 @@ OH_AVErrCode OH_AVRecorder_GetAvailableEncoder(OH_AVRecorder *recorder, OH_AVRec * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_SetStateCallback( OH_AVRecorder *recorder, OH_AVRecorder_OnStateChange callback, void *userData); @@ -211,7 +211,7 @@ OH_AVErrCode OH_AVRecorder_SetStateCallback( * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_SetErrorCallback(OH_AVRecorder *recorder, OH_AVRecorder_OnError callback, void *userData); @@ -225,7 +225,7 @@ OH_AVErrCode OH_AVRecorder_SetErrorCallback(OH_AVRecorder *recorder, OH_AVRecord * @return Function result code. * {@link AV_ERR_OK} if the execution is successful. * {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or input callback is nullptr. - * @since 16 + * @since 18 */ OH_AVErrCode OH_AVRecorder_SetUriCallback(OH_AVRecorder *recorder, OH_AVRecorder_OnUri callback, void *userData); diff --git a/multimedia/player_framework/avrecorder_base.h b/multimedia/player_framework/avrecorder_base.h index 66097c26e..8b69d6268 100644 --- a/multimedia/player_framework/avrecorder_base.h +++ b/multimedia/player_framework/avrecorder_base.h @@ -20,7 +20,7 @@ * @brief Provides APIs of request capability for Recorder. * * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 * @} */ @@ -32,7 +32,7 @@ * @kit MediaKit * @library libavrecorder.so * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVRECORDER_BASE_H @@ -49,14 +49,14 @@ extern "C" { /** * @brief Initialization of avrecorder * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder OH_AVRecorder; /** * @brief audio source type for recorder * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef enum OH_AVRecorder_AudioSourceType { /* Default audio source type. */ @@ -76,7 +76,7 @@ typedef enum OH_AVRecorder_AudioSourceType { /** * @brief video source type for recorder * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef enum OH_AVRecorder_VideoSourceType { /* Surface raw data. */ @@ -88,7 +88,7 @@ typedef enum OH_AVRecorder_VideoSourceType { /** * @brief Enumerates Codec MIME types * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef enum OH_AVRecorder_CodecMimeType { /* H.264 codec MIME type. */ @@ -108,7 +108,7 @@ typedef enum OH_AVRecorder_CodecMimeType { /** * @brief Enumerates container format type(The abbreviation for 'container format type' is CFT) * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef enum OH_AVRecorder_ContainerFormatType { /* A video container format type mp4. */ @@ -124,7 +124,7 @@ typedef enum OH_AVRecorder_ContainerFormatType { /** * @brief Recorder States * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef enum OH_AVRecorder_State { /* idle states */ @@ -146,7 +146,7 @@ typedef enum OH_AVRecorder_State { /** * @brief reason of recorder state change * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef enum OH_AVRecorder_StateChangeReason { /* State changed by user operation */ @@ -158,7 +158,7 @@ typedef enum OH_AVRecorder_StateChangeReason { /** * @brief mode of creating recorder file * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef enum OH_AVRecorder_FileGenerationMode { /* Application Creation */ @@ -170,7 +170,7 @@ typedef enum OH_AVRecorder_FileGenerationMode { /** * @brief Provides the media recorder profile definitions * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder_Profile { /* Indicates the audio bitrate */ @@ -202,7 +202,7 @@ typedef struct OH_AVRecorder_Profile { /** * @brief Provides the geographical location definitions for media resources * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder_Location { /* Latitude */ @@ -214,7 +214,7 @@ typedef struct OH_AVRecorder_Location { /** * @brief define the basic template of metadata * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder_MetadataTemplate { /* key value of the metadata */ @@ -226,7 +226,7 @@ typedef struct OH_AVRecorder_MetadataTemplate { /** * @brief Provides the container definition for media data * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder_Metadata { /* The metadata to retrieve the content type or genre of the data source */ @@ -242,7 +242,7 @@ typedef struct OH_AVRecorder_Metadata { /** * @brief Provides the media recorder configuration definitions * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder_Config { /* Indicates the recording audio source type */ @@ -264,7 +264,7 @@ typedef struct OH_AVRecorder_Config { /** * @brief Provides Range with lower and upper limit * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder_Range { /* lower limit of the range */ @@ -276,7 +276,7 @@ typedef struct OH_AVRecorder_Range { /** * @brief Provides encoder info * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 16 + * @since 18 */ typedef struct OH_AVRecorder_EncoderInfo { /* encoder format MIME */ @@ -306,7 +306,7 @@ typedef struct OH_AVRecorder_EncoderInfo { * @param state Indicates the recorder state. For details, see {@link OH_AVRecorder_State}. * @param reason Reason for recorder state change. For details, see {@link OH_AVRecorder_StateChangeReason}. * @param userData Pointer to user specific data. - * @since 16 + * @since 18 */ typedef void (*OH_AVRecorder_OnStateChange)(OH_AVRecorder *recorder, OH_AVRecorder_State state, OH_AVRecorder_StateChangeReason reason, void *userData); @@ -318,7 +318,7 @@ typedef void (*OH_AVRecorder_OnStateChange)(OH_AVRecorder *recorder, * @param errorCode Error code. * @param errorMsg Error message. * @param userData Pointer to user specific data. - * @since 16 + * @since 18 */ typedef void (*OH_AVRecorder_OnError)(OH_AVRecorder *recorder, int32_t errorCode, const char *errorMsg, void *userData); @@ -329,7 +329,7 @@ typedef void (*OH_AVRecorder_OnError)(OH_AVRecorder *recorder, int32_t errorCode * @param recorder Pointer to an OH_AVRecorder instance. * @param asset Pointer to an OH_MediaAsset instance. * @param userData Pointer to user specific data. - * @since 16 + * @since 18 */ typedef void (*OH_AVRecorder_OnUri)(OH_AVRecorder *recorder, OH_MediaAsset *asset, void *userData); diff --git a/network/netssl/include/net_ssl_c.h b/network/netssl/include/net_ssl_c.h index 7ad4db458..15d86407a 100644 --- a/network/netssl/include/net_ssl_c.h +++ b/network/netssl/include/net_ssl_c.h @@ -118,7 +118,7 @@ void OH_Netstack_DestroyCertificatesContent(NetStack_Certificates *certs); * 401 - Parameter error. * @param isCleartextPermitted Indicates output parameter, * {@code true} if the Cleartext traffic is permitted, {@code false} otherwise. - * @since 16 + * @since 18 */ int32_t OH_Netstack_IsCleartextPermitted(bool *isCleartextPermitted); @@ -133,7 +133,7 @@ int32_t OH_Netstack_IsCleartextPermitted(bool *isCleartextPermitted); * @param hostname Indicates the host name. * @param isCleartextPermitted Indicates output parameter, * {@code true} if the Cleartext traffic for a specified hostname is permitted, {@code false} otherwise. - * @since 16 + * @since 18 */ int32_t OH_Netstack_IsCleartextPermittedByHostName(const char *hostname, bool *isCleartextPermitted); diff --git a/security/asset/inc/asset_type.h b/security/asset/inc/asset_type.h index 8a3bc6b79..34fc2da44 100755 --- a/security/asset/inc/asset_type.h +++ b/security/asset/inc/asset_type.h @@ -214,13 +214,13 @@ typedef enum { /** * A tag whose value is a byte array indicating the group id an asset belongs to. * - * @since 16 + * @since 18 */ ASSET_TAG_GROUP_ID = ASSET_TYPE_BYTES | 0x48, /** * A tag whose value is a 32-bit unsigned integer indicating the type of Asset encapsulation. * - * @since 16 + * @since 18 */ ASSET_TAG_WRAP_TYPE = ASSET_TYPE_BYTES | 0x49, } Asset_Tag; @@ -339,7 +339,7 @@ typedef enum { /** * @brief An enum type indicates the type of Asset encapsulation. * - * @since 16 + * @since 18 */ typedef enum { /** diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index 49f976334..b3c1838c9 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -138,11 +138,11 @@ enum OH_Huks_KeyPadding { /** PKCS #7. */ OH_HUKS_PADDING_PKCS7 = 5, /** ISO IEC 9796-2 - * @since 16 + * @since 18 */ OH_HUKS_PADDING_ISO_IEC_9796_2 = 6, /** ISO IEC 9797-1 - * @since 16 + * @since 18 */ OH_HUKS_PADDING_ISO_IEC_9797_1 = 7, }; @@ -227,15 +227,15 @@ enum OH_Huks_KeySize { OH_HUKS_SM4_KEY_SIZE_128 = 128, /** DES key of 64 bits. - * @since 16 + * @since 18 */ OH_HUKS_DES_KEY_SIZE_64 = 64, /** 3DES key of 128 bits. - * @since 16 + * @since 18 */ OH_HUKS_3DES_KEY_SIZE_128 = 128, /** 3DES key of 192 bits. - * @since 16 + * @since 18 */ OH_HUKS_3DES_KEY_SIZE_192 = 192, }; @@ -280,15 +280,15 @@ enum OH_Huks_KeyAlg { OH_HUKS_ALG_SM4 = 152, /** DES. - * @since 16 + * @since 18 */ OH_HUKS_ALG_DES = 160, /** 3DES. - * @since 16 + * @since 18 */ OH_HUKS_ALG_3DES = 161, /** CMAC. - * @since 16 + * @since 18 */ OH_HUKS_ALG_CMAC = 162, }; diff --git a/web/webview/interfaces/native/arkweb_interface.h b/web/webview/interfaces/native/arkweb_interface.h index cddfa99c7..f6c1ea37b 100644 --- a/web/webview/interfaces/native/arkweb_interface.h +++ b/web/webview/interfaces/native/arkweb_interface.h @@ -68,7 +68,7 @@ typedef enum { /** * @brief API type related to ArkWeb JavaScript value. * - * @since 16 + * @since 18 */ ARKWEB_NATIVE_JAVASCRIPT_VALUE, } ArkWeb_NativeAPIVariantKind; @@ -93,7 +93,7 @@ ArkWeb_AnyNativeAPI* OH_ArkWeb_GetNativeAPI(ArkWeb_NativeAPIVariantKind type); * @return Returns whether the registration was successful, false indicates failure. * * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since 18 */ bool OH_ArkWeb_RegisterScrollCallback( const char* webTag, ArkWeb_OnScrollCallback callback, void* userData); diff --git a/web/webview/interfaces/native/arkweb_type.h b/web/webview/interfaces/native/arkweb_type.h index 796325713..b8b65f4fa 100644 --- a/web/webview/interfaces/native/arkweb_type.h +++ b/web/webview/interfaces/native/arkweb_type.h @@ -71,7 +71,7 @@ typedef enum ArkWeb_WebMessageType { /** * @brief Defines the data type carried in a ArkWeb_JavaScriptValue. * - * @since 16 + * @since 18 */ typedef enum ArkWeb_JavaScriptValueType { /** Represent error data */ @@ -92,7 +92,7 @@ typedef struct ArkWeb_WebMessage* ArkWeb_WebMessagePtr; /** * @brief Defines the ArkWeb_JavaScriptValuePtr. * - * @since 16 + * @since 18 */ typedef struct ArkWeb_JavaScriptValue* ArkWeb_JavaScriptValuePtr; @@ -120,7 +120,7 @@ typedef void (*ArkWeb_OnJavaScriptProxyCallback)( * @param arraySize The number of elements in the array. * @param userData The data set by user. * - * @since 16 + * @since 18 */ typedef ArkWeb_JavaScriptValuePtr (*ArkWeb_OnJavaScriptProxyCallbackWithResult)( const char* webTag, const ArkWeb_JavaScriptBridgeData* dataArray, size_t arraySize, void* userData); @@ -140,7 +140,7 @@ typedef void (*ArkWeb_OnComponentCallback)(const char* webTag, void* userData); * @param x X-axis scrolling offset. * @param y Y-axis scrolling offset. * - * @since 16 + * @since 18 */ typedef void (*ArkWeb_OnScrollCallback)(const char* webTag, void* userData, double x, double y); @@ -197,7 +197,7 @@ typedef struct { /** * @brief Defines the JavaScript proxy method with a return value. * - * @since 16 + * @since 18 */ typedef struct { /** The method of the application side JavaScript object participating in the registration. */ @@ -225,7 +225,7 @@ typedef struct { /** * @brief Defines the JavaScript proxy registered object with methodList that has a return value. * - * @since 16 + * @since 18 */ typedef struct { /** The name of the registered object. */ @@ -306,7 +306,7 @@ typedef struct { * @param permission The JSON string, which defaults to null, is used to configure the permission control for * JSBridge, allowing for the definition of URL whitelists at the object and method levels. * - * @since 16 + * @since 18 */ void (*registerJavaScriptProxyEx)(const char* webTag, const ArkWeb_ProxyObjectWithResult* proxyObject, const char* permission); @@ -319,7 +319,7 @@ typedef struct { * @param permission The JSON string, which defaults to null, is used to configure the permission control * for JSBridge, allowing for the definition of URL whitelists at the object and method levels. * - * @since 16 + * @since 18 */ void (*registerAsyncJavaScriptProxyEx)(const char* webTag, const ArkWeb_ProxyObject* proxyObject, const char* permission); @@ -514,7 +514,7 @@ typedef struct { * whether the function structure has a corresponding function pointer to avoid crash * caused by mismatch between the SDK and the device ROM. * - * @since 16 + * @since 18 */ typedef struct { /** The ArkWeb_JavaScriptValueAPI struct size. */ -- Gitee From 1abee3291b3b77fb50e29c8c7a52c7b5ca9c5187 Mon Sep 17 00:00:00 2001 From: zhuhan Date: Tue, 25 Feb 2025 14:39:45 +0800 Subject: [PATCH 608/630] add cwant ndk Signed-off-by: zhuhan Change-Id: I7e02c01568167e71188a4682555bbd73af08d008 --- .../ability_base/libability_base_want.json | 32 ++++++ AbilityKit/ability_base/want.h | 103 ++++++++++++++++++ 2 files changed, 135 insertions(+) diff --git a/AbilityKit/ability_base/libability_base_want.json b/AbilityKit/ability_base/libability_base_want.json index efde6fe47..03133ce91 100644 --- a/AbilityKit/ability_base/libability_base_want.json +++ b/AbilityKit/ability_base/libability_base_want.json @@ -30,5 +30,37 @@ { "first_introduced": "15", "name": "OH_AbilityBase_GetWantFd" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_SetWantUri" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_GetWantUri" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_SetWantInt32Param" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_GetWantInt32Param" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_SetWantBoolParam" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_GetWantBoolParam" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_SetWantDoubleParam" + }, + { + "first_introduced": "18", + "name": "OH_AbilityBase_GetWantDoubleParam" } ] \ No newline at end of file diff --git a/AbilityKit/ability_base/want.h b/AbilityKit/ability_base/want.h index 49110a541..e688836ec 100644 --- a/AbilityKit/ability_base/want.h +++ b/AbilityKit/ability_base/want.h @@ -161,6 +161,109 @@ AbilityBase_ErrorCode OH_AbilityBase_AddWantFd(AbilityBase_Want* want, const cha */ AbilityBase_ErrorCode OH_AbilityBase_GetWantFd(AbilityBase_Want* want, const char* key, int32_t* fd); +/** + * @brief Set uri to want. + * + * @param want The want needs to set uri. + * @param uri The uri of the want. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_SetWantUri(AbilityBase_Want* want, const char* uri); + +/** + * @brief Get uri from want. + * + * @param want The want that includes uri. + * @param uri The uri of the want. + * @param uriSize Size of the uri. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_GetWantUri(AbilityBase_Want* want, char* uri, size_t uriSize); + +/** + * @brief Set int32_t to want. + * + * @param want The want needs to set int32_t value. + * @param key The key of int32_t param. + * @param value The value of int32_t param. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_SetWantInt32Param(AbilityBase_Want* want, const char* key, int32_t value); + +/** + * @brief Get int32_t from want. + * + * @param want The want includes int32_t value. + * @param key The key of int32_t param. + * @param value The value of int32_t param. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_GetWantInt32Param(AbilityBase_Want* want, const char* key, int32_t* value); + +/** + * @brief Set bool to want. + * + * @param want The want needs to set bool value. + * @param key The key of bool param. + * @param value The value of bool param. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_SetWantBoolParam(AbilityBase_Want* want, const char* key, bool value); + +/** + * @brief Get bool from want. + * + * @param want The want needs to set bool value. + * @param key The key of bool param. + * @param value The value of bool param. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_GetWantBoolParam(AbilityBase_Want* want, const char* key, bool* value); + +/** + * @brief Set double to want. + * + * @param want The want needs to set double value. + * @param key The key of double param. + * @param value The value of double param. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_SetWantDoubleParam(AbilityBase_Want* want, const char* key, double value); + +/** + * @brief Get double from want. + * + * @param want The want needs to set double value. + * @param key The key of double param. + * @param value The value of double param. + * @return The error code. + * {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid. + * @since 18 + */ +AbilityBase_ErrorCode OH_AbilityBase_GetWantDoubleParam(AbilityBase_Want* want, const char* key, double* value); + #ifdef __cplusplus } // extern "C" #endif -- Gitee From 8c47f149105a906593cf6e7fddd5c2c4e25a3625 Mon Sep 17 00:00:00 2001 From: Your Date: Mon, 3 Mar 2025 10:07:21 +0800 Subject: [PATCH 609/630] change api 16 to 18 Signed-off-by: Your --- .../libability_runtime.ndk.json | 14 +- .../commonevent/libcommonevent.ndk.json | 60 +++--- ark_runtime/jsvm/libjsvm.ndk.json | 74 +++---- arkui/ace_engine/native/libace.ndk.json | 204 +++++++++--------- arkui/napi/libnapi.ndk.json | 2 +- .../pasteboard/libpasteboard.ndk.json | 2 +- .../relational_store/libnative_rdb.ndk.json | 154 ++++++------- .../scsi_peripheral/libscsi.ndk.json | 30 +-- .../usb_serial/libusb_serial.ndk.json | 26 +-- .../libnative_resmgr.ndk.json | 8 +- .../native_drawing/libnative_drawing.ndk.json | 134 ++++++------ .../native_window/libnative_window.ndk.json | 2 +- hiviewdfx/hiappevent/libhiappevent.ndk.json | 22 +- hiviewdfx/hicollie/libhicollie.ndk.json | 4 +- .../libnative_media_codecbase.ndk.json | 10 +- .../image_framework/libimage_packer.ndk.json | 24 +-- .../image_framework/libpixelmap.ndk.json | 8 +- .../libavimage_generator.ndk.json | 8 +- .../libavmetadata_extractor.ndk.json | 10 +- .../avrecorder/libavrecorder.ndk.json | 30 +-- .../libnative_avscreen_capture.ndk.json | 2 +- .../interfaces/native/libohweb.ndk.json | 2 +- 22 files changed, 415 insertions(+), 415 deletions(-) diff --git a/AbilityKit/ability_runtime/libability_runtime.ndk.json b/AbilityKit/ability_runtime/libability_runtime.ndk.json index 4ef2c9800..90182407a 100644 --- a/AbilityKit/ability_runtime/libability_runtime.ndk.json +++ b/AbilityKit/ability_runtime/libability_runtime.ndk.json @@ -16,31 +16,31 @@ "name": "OH_AbilityRuntime_StartSelfUIAbility" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AbilityRuntime_ApplicationContextGetTempDir" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AbilityRuntime_ApplicationContextGetFilesDir" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AbilityRuntime_ApplicationContextGetDatabaseDir" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AbilityRuntime_ApplicationContextGetPreferencesDir" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AbilityRuntime_ApplicationContextGetBundleCodeDir" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AbilityRuntime_ApplicationContextGetDistributedFilesDir" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AbilityRuntime_ApplicationContextGetCloudFileDir" } ] \ No newline at end of file diff --git a/BasicServicesKit/commonevent/libcommonevent.ndk.json b/BasicServicesKit/commonevent/libcommonevent.ndk.json index a7762832a..e2becf3e4 100644 --- a/BasicServicesKit/commonevent/libcommonevent.ndk.json +++ b/BasicServicesKit/commonevent/libcommonevent.ndk.json @@ -96,123 +96,123 @@ "name":"OH_CommonEvent_GetDoubleArrayFromParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_CreatePublishInfo" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_DestroyPublishInfo" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetPublishInfoBundleName" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetPublishInfoPermissions" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetPublishInfoCode" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetPublishInfoData" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetPublishInfoParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_CreateParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_DestroyParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetIntToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetIntArrayToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetLongToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetLongArrayToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetBoolToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetBoolArrayToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetCharToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetCharArrayToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetDoubleToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetDoubleArrayToParameters" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_Publish" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_PublishWithInfo" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_IsOrderedCommonEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_FinishCommonEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_GetAbortCommonEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_AbortCommonEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_ClearAbortCommonEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_GetCodeFromSubscriber" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetCodeToSubscriber" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_GetDataFromSubscriber" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_CommonEvent_SetDataToSubscriber" } ] diff --git a/ark_runtime/jsvm/libjsvm.ndk.json b/ark_runtime/jsvm/libjsvm.ndk.json index abfded3f9..a0fb85dd2 100644 --- a/ark_runtime/jsvm/libjsvm.ndk.json +++ b/ark_runtime/jsvm/libjsvm.ndk.json @@ -736,151 +736,151 @@ "name": "OH_JSVM_ReleaseCache" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_PromiseRegisterHandler" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_CreateProxy" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_IsProxy" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_ProxyGetTarget" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_IsBigIntObject" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_IsBooleanObject" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_IsStringObject" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_IsNumberObject" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_IsSymbolObject" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolAsyncIterator" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolHasInstance" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolIsConcatSpreadable" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolMatch" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolReplace" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolSearch" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolSplit" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolToPrimitive" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolUnscopables" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolToStringTag" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetSymbolIterator" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_SetMicrotaskPolicy" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_TraceStart" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_TraceStop" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_SetHandlerForOOMError" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_SetHandlerForFatalError" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_SetHandlerForPromiseReject" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_DefineClassWithOptions" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_AddHandlerForGC" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_RemoveHandlerForGC" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_CreateExternalStringLatin1" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_CreateExternalStringUtf16" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_CreatePrivate" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_SetPrivate" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetPrivate" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_DeletePrivate" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_CreateDataReference" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_JSVM_GetReferenceData" } ] diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 3ede235ab..52160972b 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -252,15 +252,15 @@ "name": "OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_TouchRecognizer_GetNodeHandle" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_TouchRecognizer_CancelTouch" }, { @@ -1156,171 +1156,171 @@ "name": "OH_ArkUI_SwiperIndicator_GetMaxDisplayCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperIndicator_SetSpace" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperIndicator_GetSpace" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetStartPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetStartPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetTopPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetTopPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetEndPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetEndPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetBottomPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetBottomPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetFontColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetFontColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetFontSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetFontSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetFontWeight" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetFontWeight" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_Destroy" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_SetShowBackground" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_GetShowBackground" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_SetBackgroundSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_GetBackgroundSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_SetBackgroundColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_GetBackgroundColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_SetArrowSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_GetArrowSize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_SetArrowColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_GetArrowColor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SwiperArrowStyle_Destroy" }, { @@ -1552,7 +1552,7 @@ "name": "OH_ArkUI_NodeUtils_GetAttachedNodeHandleById" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_NodeUtils_MoveTo" }, { @@ -1764,27 +1764,27 @@ "name": "OH_ArkUI_AccessibilityValue_GetCurrent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AccessibilityValue_SetRangeMin" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AccessibilityValue_GetRangeMin" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AccessibilityValue_SetRangeMax" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AccessibilityValue_GetRangeMax" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AccessibilityValue_SetRangeCurrent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AccessibilityValue_GetRangeCurrent" }, { @@ -2756,39 +2756,39 @@ "name": "OH_ArkUI_PointerEvent_GetChangedPointerId" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_FingerCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_limitFingerCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_repeat" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_distance" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_speed" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_duration" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_angle" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_distanceThreshold" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GetGestureParam_DirectMask" }, { @@ -2840,7 +2840,7 @@ "name": "OH_ArkUI_NodeEvent_GetTextChangeEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_PostFrameCallback" }, { @@ -2932,99 +2932,99 @@ "name": "OH_ArkUI_UIInputEvent_GetTargetDisplayId" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_XComponent_StartImageAnalyzer" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_XComponent_StopImageAnalyzer" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_VisibleAreaEventOptions_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_VisibleAreaEventOptions_Dispose" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_VisibleAreaEventOptions_SetRatios" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_VisibleAreaEventOptions_GetRatios" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_UIInputEvent_GetEventTargetWidth" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_UIInputEvent_GetEventTargetHeight" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_UIInputEvent_GetEventTargetPositionX" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_UIInputEvent_GetEventTargetPositionY" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_HoverEvent_IsHovered" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_UIInputEvent_GetModifierKeyStates" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AxisEvent_SetPropagation" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_AxisEvent_GetScrollStep" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_DragEvent_RequestDragEndPending" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_NotifyDragResult" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_NotifyDragEndPendingDone" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_GestureInterrupter_GetUserData" }, { @@ -3068,67 +3068,67 @@ "name": "OH_ArkUI_NodeUtils_GetPositionToParent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceHolder_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceHolder_Dispose" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceHolder_SetUserData" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceHolder_GetUserData" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceCallback_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceCallback_Dispose" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceHolder_AddSurfaceCallback" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_XComponent_GetNativeWindow" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_XComponent_SetAutoInitialize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_XComponent_Initialize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_XComponent_Finalize" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_XComponent_IsInitialized" } ] \ No newline at end of file diff --git a/arkui/napi/libnapi.ndk.json b/arkui/napi/libnapi.ndk.json index ca967c94e..04e3cc6d4 100644 --- a/arkui/napi/libnapi.ndk.json +++ b/arkui/napi/libnapi.ndk.json @@ -240,7 +240,7 @@ "name": "napi_fatal_exception" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "napi_wrap_enhance" } ] diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index 044bcdc8e..6b21588f7 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -96,7 +96,7 @@ "name": "OH_Pasteboard_GetDataWithProgress" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Pasteboard_GetChangeCount" } diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index afa900613..1362aea0c 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -71,7 +71,7 @@ "name":"OH_Rdb_Insert" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Rdb_BatchInsert" }, { @@ -220,307 +220,307 @@ "name":"OH_Rdb_QueryLockedRow" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_Destroy" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutNull" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutReal" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutText" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutBlob" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutAsset" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutAssets" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutFloatVector" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_PutUnlimitedInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetType" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_IsNull" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetReal" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetText" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetBlob" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetAsset" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetAssetsCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetAssets" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetFloatVectorCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetFloatVector" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetUnlimitedIntBand" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Value_GetUnlimitedInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_VBuckets_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_VBuckets_Destroy" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_VBuckets_PutRow" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_VBuckets_PutRows" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_VBuckets_RowCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_Destroy" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_Put" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutNull" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutReal" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutText" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutBlob" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutAsset" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutAssets" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutFloatVector" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_PutUnlimitedInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_Count" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetType" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_Get" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_IsNull" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetReal" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetText" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetBlob" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetAsset" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetAssetsCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetAssets" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetFloatVectorCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetFloatVector" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetUnlimitedIntBand" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Values_GetUnlimitedInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_CreateOptions" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_DestroyOptions" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTransOption_SetType" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Commit" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Rollback" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Insert" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_BatchInsert" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Update" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Delete" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Query" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_QuerySql" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Execute" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_RdbTrans_Destroy" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Rdb_CreateTransaction" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_VBucket_PutFloatVector" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_VBucket_PutUnlimitedInt" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Rdb_ExecuteV2" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Rdb_ExecuteQueryV2" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Cursor_GetFloatVectorCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Cursor_GetFloatVector" } ] \ No newline at end of file diff --git a/drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json b/drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json index 4d3a16661..7c996ab31 100644 --- a/drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json +++ b/drivers/external_device_manager/scsi_peripheral/libscsi.ndk.json @@ -1,62 +1,62 @@ [ { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Init" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Release" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Open" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Close" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_ReadCapacity10" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_TestUnitReady" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Inquiry" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_RequestSense" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Read10" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Write10" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_Verify10" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_SendRequestByCdb" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_CreateDeviceMemMap" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_DestroyDeviceMemMap" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ScsiPeripheral_ParseBasicSenseInfo" } ] \ No newline at end of file diff --git a/drivers/external_device_manager/usb_serial/libusb_serial.ndk.json b/drivers/external_device_manager/usb_serial/libusb_serial.ndk.json index 28fbe4a80..6a62ecb85 100644 --- a/drivers/external_device_manager/usb_serial/libusb_serial.ndk.json +++ b/drivers/external_device_manager/usb_serial/libusb_serial.ndk.json @@ -1,54 +1,54 @@ [ { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_Init" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_Release" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_Open" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_Close" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_Read" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_Write" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_SetBaudRate" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_SetParams" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_SetTimeout" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_SetFlowControl" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_Flush" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_FlushInput" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_UsbSerial_FlushOutput" } ] \ No newline at end of file diff --git a/global/resource_management/libnative_resmgr.ndk.json b/global/resource_management/libnative_resmgr.ndk.json index 672a1c9d8..ecf473474 100644 --- a/global/resource_management/libnative_resmgr.ndk.json +++ b/global/resource_management/libnative_resmgr.ndk.json @@ -140,19 +140,19 @@ "name": "OH_ResourceManager_RemoveResource" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ResourceManager_GetIntPluralString" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ResourceManager_GetDoublePluralString" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ResourceManager_GetIntPluralStringByName" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ResourceManager_GetDoublePluralStringByName" } ] \ No newline at end of file diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 6ee257eb1..da43bd3aa 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -153,24 +153,24 @@ }, { "name": "OH_Drawing_CreateDashPathEffect" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_CreatePathDashEffect" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_CreateSumPathEffect" }, { "name": "OH_Drawing_PathEffectDestroy" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_CreateDiscretePathEffect" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_CreateCornerPathEffect" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_CreateComposePathEffect" }, { "name": "OH_Drawing_ColorFilterCreateBlendMode" }, @@ -185,7 +185,7 @@ "name": "OH_Drawing_ErrorCodeGet" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_ErrorCodeReset" }, { "name": "OH_Drawing_FilterCreate" }, @@ -323,7 +323,7 @@ "name": "OH_Drawing_GpuContextCreateFromGL" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_GpuContextCreate" }, { @@ -664,11 +664,11 @@ { "name": "OH_Drawing_SetTextStyleBaseLine" }, { "name": "OH_Drawing_SetTextStyleDecoration" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_AddTextStyleDecoration" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_RemoveTextStyleDecoration" }, { "name": "OH_Drawing_SetTextStyleDecorationColor" }, @@ -713,7 +713,7 @@ "name": "OH_Drawing_SurfaceCreateFromGpuContext" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_SurfaceCreateOnScreen" }, { @@ -721,7 +721,7 @@ "name": "OH_Drawing_SurfaceGetCanvas" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_SurfaceFlush" }, { @@ -979,11 +979,11 @@ "name": "OH_Drawing_DestroyFontDescriptor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_MatchFontDescriptors" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_DestroyFontDescriptors" }, { @@ -1567,67 +1567,67 @@ "name":"OH_Drawing_RecordCmdDestroy" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_CreateLineTypography" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_DestroyLineTypography" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_LineTypographyGetLineBreak" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_LineTypographyCreateLine" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_FontGetBounds" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_FontGetPathForGlyph" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_RectCreateArray" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_RectGetArraySize" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_RectGetArrayElement" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_RectDestroyArray" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_CreateTextTab" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyTextTab" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetTextTabAlignment" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetTextTabLocation" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_SetTypographyTextTab" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_FontGetTextPath" }, { @@ -1635,135 +1635,135 @@ "name":"OH_Drawing_GetDrawingArraySize" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TypographyGetTextLines" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyTextLines" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyTextLine" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetTextLineByIndex" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetGlyphCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetTextRange" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetGlyphRuns" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyRuns" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunByIndex" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLinePaint" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineCreateTruncatedLine" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetTypographicBounds" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetImageBounds" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetTrailingSpaceWidth" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetStringIndexForPosition" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetOffsetForStringIndex" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_TextLineEnumerateCaretOffsets" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_TextLineGetAlignmentOffset" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunStringIndices" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunStringIndicesByIndex" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyRunStringIndices" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunStringRange" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunTypographicBounds" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_RunPaint" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunImageBounds" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyRunImageBounds" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunGlyphs" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunGlyphsByIndex" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyRunGlyphs" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunPositions" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunPositionsByIndex" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_DestroyRunPositions" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_GetRunGlyphCount" }, { @@ -1771,23 +1771,23 @@ "name":"OH_Drawing_GetFontCollectionGlobalInstance" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_CanvasQuickRejectPath" }, { - "first_introduced": "16", + "first_introduced": "18", "name":"OH_Drawing_CanvasQuickRejectRect" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_CanvasDrawNestedRoundRect" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_CanvasDrawArcWithCenter" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_Drawing_CanvasDrawPixelMapNine" } ] \ No newline at end of file diff --git a/graphic/graphic_2d/native_window/libnative_window.ndk.json b/graphic/graphic_2d/native_window/libnative_window.ndk.json index 40019c4e1..ded24b2e8 100644 --- a/graphic/graphic_2d/native_window/libnative_window.ndk.json +++ b/graphic/graphic_2d/native_window/libnative_window.ndk.json @@ -52,7 +52,7 @@ "name": "OH_NativeWindow_GetMetadataValue" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_NativeWindow_CleanCache" } diff --git a/hiviewdfx/hiappevent/libhiappevent.ndk.json b/hiviewdfx/hiappevent/libhiappevent.ndk.json index 3089bea4c..98c62ebeb 100644 --- a/hiviewdfx/hiappevent/libhiappevent.ndk.json +++ b/hiviewdfx/hiappevent/libhiappevent.ndk.json @@ -116,47 +116,47 @@ "name": "OH_HiAppEvent_SetEventConfig" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_CreateProcessor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_SetReportRoute" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_SetReportPolicy" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_SetReportEvent" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_SetCustomConfig" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_SetConfigId" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_SetReportUserId" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_SetReportUserProperty" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_AddProcessor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_DestroyProcessor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiAppEvent_RemoveProcessor" } ] diff --git a/hiviewdfx/hicollie/libhicollie.ndk.json b/hiviewdfx/hicollie/libhicollie.ndk.json index bec806ac1..095797ad2 100644 --- a/hiviewdfx/hicollie/libhicollie.ndk.json +++ b/hiviewdfx/hicollie/libhicollie.ndk.json @@ -12,11 +12,11 @@ "name": "OH_HiCollie_Report" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiCollie_SetTimer" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_HiCollie_CancelTimer" } ] diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 1bf09f584..c84f06a87 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -76,15 +76,15 @@ "name": "OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVCODEC_MIMETYPE_AUDIO_RAW" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG2" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2" }, { @@ -412,11 +412,11 @@ "name": "OH_MD_KEY_CREATION_TIME" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT" }, { diff --git a/multimedia/image_framework/libimage_packer.ndk.json b/multimedia/image_framework/libimage_packer.ndk.json index 59cc97ad8..5684b6584 100644 --- a/multimedia/image_framework/libimage_packer.ndk.json +++ b/multimedia/image_framework/libimage_packer.ndk.json @@ -40,43 +40,43 @@ "name": "OH_PackingOptions_Release" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_SetFrameCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_GetFrameCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_SetDelayTimeList" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_GetDelayTimeList" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_SetDisposalTypes" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_GetDisposalTypes" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_SetLoopCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_GetLoopCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PackingOptionsForSequence_Release" }, { @@ -96,7 +96,7 @@ "name": "OH_ImagePackerNative_PackToDataFromPicture" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ImagePackerNative_PackToDataFromPixelmapSequence" }, { @@ -112,7 +112,7 @@ "name": "OH_ImagePackerNative_PackToFileFromPicture" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ImagePackerNative_PackToFileFromPixelmapSequence" }, { diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 240f95038..356953cf6 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -124,11 +124,11 @@ "name": "OH_PixelmapNative_ScaleWithAntiAliasing" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PixelmapNative_CreateScaledPixelMap" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing" }, { @@ -192,11 +192,11 @@ "name": "OH_PixelmapNative_SetMemoryName" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PixelmapNative_GetByteCount" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_PixelmapNative_GetAllocationByteCount" }, { diff --git a/multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json b/multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json index 827ef053c..9234bee89 100644 --- a/multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json +++ b/multimedia/player_framework/avimage_generator/libavimage_generator.ndk.json @@ -1,18 +1,18 @@ [ { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVImageGenerator_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVImageGenerator_SetFDSource" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVImageGenerator_FetchFrameByTime" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVImageGenerator_Release" } ] \ No newline at end of file diff --git a/multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json b/multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json index f4c4de80d..ef6a56170 100644 --- a/multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json +++ b/multimedia/player_framework/avmetadata_extractor/libavmetadata_extractor.ndk.json @@ -1,22 +1,22 @@ [ { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVMetadataExtractor_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVMetadataExtractor_SetFDSource" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVMetadataExtractor_FetchMetadata" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVMetadataExtractor_FetchAlbumCover" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVMetadataExtractor_Release" } ] \ No newline at end of file diff --git a/multimedia/player_framework/avrecorder/libavrecorder.ndk.json b/multimedia/player_framework/avrecorder/libavrecorder.ndk.json index c5f0ad4e1..29ca772eb 100644 --- a/multimedia/player_framework/avrecorder/libavrecorder.ndk.json +++ b/multimedia/player_framework/avrecorder/libavrecorder.ndk.json @@ -1,62 +1,62 @@ [ { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Create" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Prepare" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_GetAVRecorderConfig" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_GetInputSurface" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_UpdateRotation" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Start" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Pause" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Resume" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Stop" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Reset" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_Release" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_GetAvailableEncoder" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_SetStateCallback" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_SetErrorCallback" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVRecorder_SetUriCallback" } ] \ No newline at end of file diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json index 47af4509b..d175c78a7 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -108,7 +108,7 @@ "name": "OH_AVScreenCapture_ShowCursor" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVScreenCapture_SetDisplayCallback" } ] \ No newline at end of file diff --git a/web/webview/interfaces/native/libohweb.ndk.json b/web/webview/interfaces/native/libohweb.ndk.json index 4cb145d27..4981b04a4 100644 --- a/web/webview/interfaces/native/libohweb.ndk.json +++ b/web/webview/interfaces/native/libohweb.ndk.json @@ -320,7 +320,7 @@ "name": "OH_NativeArkWeb_LoadData" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkWeb_RegisterScrollCallback" } ] -- Gitee From 5c4874d2379dfe6769f3e1a85f92b6116bb30f03 Mon Sep 17 00:00:00 2001 From: htt1997 Date: Fri, 28 Feb 2025 16:40:50 +0800 Subject: [PATCH 610/630] fix update name Signed-off-by: htt1997 --- .../include/relational_store.h | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 35ddae860..3a702123c 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -345,6 +345,19 @@ int OH_Rdb_SetDbType(OH_Rdb_ConfigV2 *config, int dbType); */ int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); +/** + * @brief Set property persist into config + * + * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. + * Indicates the configuration of the database related to this RDB store. + * @param isPersistent Indicates whether the database need persistence. + * @return Returns the status code of the execution. Successful execution returns RDB_OK, + * {@link RDB_OK} - success. + * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. + * @since 18 + */ +int OH_Rdb_SetPersistent(OH_Rdb_ConfigV2 *config, bool isPersistent); + /** * @brief Check if a tokenizer is supported or not. * @@ -357,19 +370,6 @@ int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); */ int OH_Rdb_IsTokenizerSupported(Rdb_Tokenizer tokenizer, bool *isSupported); -/** - * @brief Set property isMemoryDb into config - * - * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. - * Indicates the configuration of the database related to this RDB store. - * @param isMemoryDb Indicates whether the database is memory db. - * @return Returns the status code of the execution. Successful execution returns RDB_OK, - * {@link RDB_OK} - success. - * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. - * @since 14 - */ -int OH_Rdb_SetMemoryDb(OH_Rdb_ConfigV2 *config, bool isMemoryDb); - /** * @brief Get support db type list * @param typeCount The output parameter, which is used to recieve the length of the support db type array. -- Gitee From 953651a1215a97f1a217e0473b4dbd6a3e09472b Mon Sep 17 00:00:00 2001 From: wangqing Date: Sat, 8 Feb 2025 11:52:07 +0800 Subject: [PATCH 611/630] add hitracemeter interfaces Signed-off-by: wangqing Change-Id: I768aa31c558c58d3eee9c7cfa48166c6ae371cb1 --- hiviewdfx/hitrace/include/hitrace/trace.h | 129 ++++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/hiviewdfx/hitrace/include/hitrace/trace.h b/hiviewdfx/hitrace/include/hitrace/trace.h index 21c1c6d82..4dcf2c51e 100644 --- a/hiviewdfx/hitrace/include/hitrace/trace.h +++ b/hiviewdfx/hitrace/include/hitrace/trace.h @@ -293,6 +293,45 @@ typedef enum HiTrace_Communication_Mode { HITRACE_CM_DEVICE = 3, } HiTrace_Communication_Mode; +/** + * @brief Enumerates the HiTrace output levels. The output level threshold system parameter determines + * the minimum output trace. + * + * @since 18 + */ +typedef enum HiTrace_Output_Level { + /** + * @brief Ouput level only for debug usage. + * + * @since 18 + */ + HITRACE_LEVEL_DEBUG = 0, + /** + * @brief Output level for beta version usage. + * + * @since 18 + */ + HITRACE_LEVEL_INFO = 1, + /** + * @brief Output level for beta version usage, with higher priority than HITRACE_LEVEL_INFO. + * + * @since 18 + */ + HITRACE_LEVEL_CRITICAL = 2, + /** + * @brief Output level for commercial version usage. + * + * @since 18 + */ + HITRACE_LEVEL_COMMERCIAL = 3, + /** + * @brief Output level for range limit. + * + * @since 18 + */ + HITRACE_LEVEL_MAX = HITRACE_LEVEL_COMMERCIAL, +} HiTrace_Output_Level; + /** * @brief Defines a HiTraceId instance. * @@ -684,6 +723,96 @@ void OH_HiTrace_FinishAsyncTrace(const char *name, int32_t taskId); */ void OH_HiTrace_CountTrace(const char *name, int64_t count); +/** + * @brief Marks the start of a synchronous trace task with output level control. + * + * The OH_HiTrace_StartTraceEx and OH_HiTrace_FinishTraceEx APIs must be used in pairs. + * The two APIs can be used in nested mode. The stack data structure is used for matching during trace data parsing. + * + * @param level Level of output priority. + * @param name Name of a trace task. + * @param customArgs key=value pair, multiple pairs use comma as seperator. + * @atomicservice + * @since 18 + */ +void OH_HiTrace_StartTraceEx(HiTrace_Output_Level level, const char* name, const char* customArgs); + +/** + * @brief Marks the end of a synchronous trace task with output level control. + * + * This API must be used with OH_HiTrace_StartTraceEx in pairs. During trace data parsing, the system matches + * it with the most recent OH_HiTrace_StartTraceEx API invocation in the service process. + * + * @param level Level of output priority. + * @atomicservice + * @since 18 + */ +void OH_HiTrace_FinishTraceEx(HiTrace_Output_Level level); + +/** + * @brief Marks the start of an asynchronous trace task with output level control. + * + * This API is called to implement performance trace in asynchronous manner. The start and end of an asynchronous + * trace task do not occur in sequence. Therefore, a unique taskId is required to ensure proper data parsing. + * It is passed as an input parameter for the asynchronous API. + * This API is used with OH_HiTrace_FinishAsyncTraceEx in pairs. The two APIs, which have the same level, + * name, and task ID, form an asynchronous timeslice trace task. + * If customCategory is specified, the trace slice will be grouped and displayed together with other trace slices + * with the same customCategory. + * If multiple trace tasks with the same name need to be performed at the same time or a trace task needs to be + * performed multiple times concurrently, different task IDs must be specified in OH_HiTrace_StartAsyncTraceEx. + * If the trace tasks with the same name are not performed at the same time, the same taskId can be used. + * Different processes's taskId do not interfere. + * + * @param level Level of output priority. + * @param name Name of the asynchronous trace task. + * @param taskId ID of the asynchronous trace task. + * @param customCategory Label used to aggregate the asynchronous trace. + * @param customArgs key=value pair, multiple pairs use comma as seperator. + * @atomicservice + * @since 18 + */ +void OH_HiTrace_StartAsyncTraceEx(HiTrace_Output_Level level, const char* name, int32_t taskId, + const char* customCategory, const char* customArgs); + +/** + * @brief Marks the end of an asynchronous trace task with output level control. + * + * This API is called in the callback function after an asynchronous trace is complete. + * It is used with OH_HiTrace_StartAsyncTraceEx in pairs. Its level, name, and task ID must be + * the same as those of OH_HiTrace_StartAsyncTraceEx. + * + * @param level Level of output priority. + * @param name Name of the asynchronous trace task. + * @param taskId ID of the asynchronous trace task. + * @atomicservice + * @since 18 + */ +void OH_HiTrace_FinishAsyncTraceEx(HiTrace_Output_Level level, const char* name, int32_t taskId); + +/** + * @brief Traces the value change of an integer variable based on its name with output level control. + * + * This API can be executed for multiple times to trace the value change of a given integer variable at different + * time points. + * + * @param level Level of output priority. + * @param name Name of the integer variable. It does not need to be the same as the real variable name. + * @param count Integer value. Generally, an integer variable can be passed. + * @atomicservice + * @since 18 + */ +void OH_HiTrace_CountTraceEx(HiTrace_Output_Level level, const char* name, int64_t count); + +/** + * @brief Get the trace output status of the calling process. + * + * @return Returns whether the calling process is allowed to output trace. + * @atomicservice + * @since 18 + */ +bool OH_HiTrace_IsTraceEnabled(); + #ifdef __cplusplus } #endif -- Gitee From 35a2a3a55a3ae007a3c56045b6a0503696a06931 Mon Sep 17 00:00:00 2001 From: qian-dan <756328797@qq.com> Date: Mon, 3 Mar 2025 16:16:37 +0800 Subject: [PATCH 612/630] modify headers Signed-off-by: qian-dan <756328797@qq.com> --- third_party/mindspore/kits/context.h | 4 ++-- third_party/mindspore/kits/data_type.h | 4 ++-- third_party/mindspore/kits/format.h | 4 ++-- third_party/mindspore/kits/model.h | 4 ++-- third_party/mindspore/kits/status.h | 4 ++-- third_party/mindspore/kits/tensor.h | 4 ++-- third_party/mindspore/kits/types.h | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/third_party/mindspore/kits/context.h b/third_party/mindspore/kits/context.h index b6b7f084f..55c4efacc 100644 --- a/third_party/mindspore/kits/context.h +++ b/third_party/mindspore/kits/context.h @@ -18,7 +18,7 @@ * @addtogroup MindSpore * @{ * - * @brief 提供MindSpore Lite的模型推理相关接口。 + * @brief Provides APIs related to MindSpore Lite model inference. * * @Syscap SystemCapability.Ai.MindSpore * @since 9 @@ -27,7 +27,7 @@ /** * @file context.h * @kit MindSporeLiteKit - * @brief 提供了Context相关的接口,可以配置运行时信息。 + * @brief Provides **Context** APIs for configuring runtime information. * * @library libmindspore_lite_ndk.so * @since 9 diff --git a/third_party/mindspore/kits/data_type.h b/third_party/mindspore/kits/data_type.h index d16a99fc0..f6a0f1cad 100644 --- a/third_party/mindspore/kits/data_type.h +++ b/third_party/mindspore/kits/data_type.h @@ -18,7 +18,7 @@ * @addtogroup MindSpore * @{ * - * @brief 提供MindSpore Lite的模型推理相关接口。 + * @brief Provides APIs related to MindSpore Lite model inference. * * @Syscap SystemCapability.Ai.MindSpore * @since 9 @@ -27,7 +27,7 @@ /** * @file data_type.h * @kit MindSporeLiteKit - * @brief 声明了张量的数据的类型。 + * @brief Declares tensor data types. * * @library libmindspore_lite_ndk.so * @since 9 diff --git a/third_party/mindspore/kits/format.h b/third_party/mindspore/kits/format.h index a9ba6a6be..f62482648 100644 --- a/third_party/mindspore/kits/format.h +++ b/third_party/mindspore/kits/format.h @@ -18,7 +18,7 @@ * @addtogroup MindSpore * @{ * - * @brief 提供MindSpore Lite的模型推理相关接口。 + * @brief Provides APIs related to MindSpore Lite model inference. * * @Syscap SystemCapability.Ai.MindSpore * @since 9 @@ -27,7 +27,7 @@ /** * @file format.h * @kit MindSporeLiteKit - * @brief 提供张量数据的排列格式。 + * @brief Declares tensor data formats. * * @library libmindspore_lite_ndk.so * @since 9 diff --git a/third_party/mindspore/kits/model.h b/third_party/mindspore/kits/model.h index 7ac15719e..1f5978035 100644 --- a/third_party/mindspore/kits/model.h +++ b/third_party/mindspore/kits/model.h @@ -18,7 +18,7 @@ * @addtogroup MindSpore * @{ * - * @brief provide the model reasoning related interfaces of MindSpore Lite. + * @brief Provides APIs related to MindSpore Lite model inference. * * @Syscap SystemCapability.Ai.MindSpore * @since 9 @@ -27,7 +27,7 @@ /** * @file model.h * @kit MindSporeLiteKit - * @brief provide model-related interfaces that can be used for model creation, model reasoning, and more. + * @brief Provides model-related APIs for model creation and inference. * * @library libmindspore_lite_ndk.so * @since 9 diff --git a/third_party/mindspore/kits/status.h b/third_party/mindspore/kits/status.h index 65b6eec5f..029e08b2d 100644 --- a/third_party/mindspore/kits/status.h +++ b/third_party/mindspore/kits/status.h @@ -18,7 +18,7 @@ * @addtogroup MindSpore * @{ * - * @brief 提供MindSpore Lite的模型推理相关接口。 + * @brief Provides APIs related to MindSpore Lite model inference. * * @Syscap SystemCapability.Ai.MindSpore * @since 9 @@ -27,7 +27,7 @@ /** * @file status.h * @kit MindSporeLiteKit - * @brief 提供了Mindspore Lite运行时的状态码。 + * @brief Provides the status codes of MindSpore Lite. * * @library libmindspore_lite_ndk.so * @since 9 diff --git a/third_party/mindspore/kits/tensor.h b/third_party/mindspore/kits/tensor.h index fb4d2b25a..cccd8605c 100644 --- a/third_party/mindspore/kits/tensor.h +++ b/third_party/mindspore/kits/tensor.h @@ -18,7 +18,7 @@ * @addtogroup MindSpore * @{ * - * @brief 提供MindSpore Lite的模型推理相关接口。 + * @brief Provides APIs related to MindSpore Lite model inference. * * @Syscap SystemCapability.Ai.MindSpore * @since 9 @@ -27,7 +27,7 @@ /** * @file tensor.h * @kit MindSporeLiteKit - * @brief 提供了张量相关的接口,可用于创建和修改张量信息。 + * @brief Provides APIs for creating and modifying tensor information. * * @library libmindspore_lite_ndk.so * @since 9 diff --git a/third_party/mindspore/kits/types.h b/third_party/mindspore/kits/types.h index 8d0b6fd21..0b3d26965 100644 --- a/third_party/mindspore/kits/types.h +++ b/third_party/mindspore/kits/types.h @@ -18,7 +18,7 @@ * @addtogroup MindSpore * @{ * - * @brief provide the model reasoning related interfaces of MindSpore Lite. + * @brief Provides APIs related to MindSpore Lite model inference. * * @Syscap SystemCapability.Ai.MindSpore * @since 9 @@ -27,7 +27,7 @@ /** * @file types.h * @kit MindSporeLiteKit - * @brief provides the model file types and device types supported by MindSpore Lite. + * @brief Provides the model file types and device types supported by MindSpore Lite. * * @library libmindspore_lite_ndk.so * @since 9 -- Gitee From 8dcd46d4f80cf881d0d3bdbb5367c50077c4c6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=BC=E6=AD=A4=E5=BD=BC=E6=AD=A4?= Date: Mon, 3 Mar 2025 17:39:41 +0800 Subject: [PATCH 613/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 彼此彼此 --- multimedia/av_codec/avsource/libnative_media_avsource.ndk.json | 2 +- multimedia/av_codec/native_avsource.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json index ecc3b3f8c..759d6231b 100644 --- a/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json +++ b/multimedia/av_codec/avsource/libnative_media_avsource.ndk.json @@ -24,7 +24,7 @@ "name": "OH_AVSource_GetTrackFormat" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_AVSource_GetCustomMetadataFormat" } ] diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h index 06796c191..f59fe1f2f 100644 --- a/multimedia/av_codec/native_avsource.h +++ b/multimedia/av_codec/native_avsource.h @@ -148,7 +148,7 @@ OH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackIndex * @return Returns the metadata's format info if the execution is successful, otherwise returns nullptr. * Possible failure causes: * 1. source is invalid. - * @since 16 + * @since 18 */ OH_AVFormat *OH_AVSource_GetCustomMetadataFormat(OH_AVSource *source); -- Gitee From 9b72e9dd87fb16f4e601ffaf28e8dc683d357be8 Mon Sep 17 00:00:00 2001 From: ustc-tianyu Date: Sat, 22 Feb 2025 10:24:04 +0800 Subject: [PATCH 614/630] path add getSegment Signed-off-by: ustc-tianyu --- .../graphic_2d/native_drawing/drawing_path.h | 22 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_path.h b/graphic/graphic_2d/native_drawing/drawing_path.h index 3cc9269c9..a198ec855 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path.h +++ b/graphic/graphic_2d/native_drawing/drawing_path.h @@ -40,6 +40,7 @@ #ifndef C_INCLUDE_DRAWING_PATH_H #define C_INCLUDE_DRAWING_PATH_H +#include "drawing_error_code.h" #include "drawing_types.h" #ifdef __cplusplus @@ -652,6 +653,27 @@ bool OH_Drawing_PathIsClosed(OH_Drawing_Path* path, bool forceClosed); bool OH_Drawing_PathGetPositionTangent(OH_Drawing_Path* path, bool forceClosed, float distance, OH_Drawing_Point2D* position, OH_Drawing_Point2D* tangent); +/** + * @brief Gets the path between the start and end points. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param forceClosed Whether to close the path. + * @param start The distance from the starting point of the segment to the starting point of the path. + * @param stop The distance from the end point of the segment to the starting point of the path. + * @param startWithMoveTo Whether the path obtained moveTo to the starting segment. + * @param dst The path obtained. + * @param result Indicates the result of getting the path segment. + * The value is false if the segment is zero-length or start >= stop, and true otherwise. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of path, dst and result is nullptr. + * @since 18 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PathGetSegment(OH_Drawing_Path* path, bool forceClosed, + float start, float stop, bool startWithMoveTo, OH_Drawing_Path* dst, bool* result); + /** * @brief Combines two paths. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 6ee257eb1..7b1f4dc62 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -503,6 +503,10 @@ "first_introduced": "12", "name": "OH_Drawing_PathGetPositionTangent" }, + { + "first_introduced": "18", + "name": "OH_Drawing_PathGetSegment" + }, { "first_introduced": "12", "name": "OH_Drawing_PathOp" -- Gitee From bc2842e8c9c3cb37cb0dbbc68bdac58ef431ac95 Mon Sep 17 00:00:00 2001 From: fangyunzhong Date: Mon, 3 Mar 2025 19:57:35 +0800 Subject: [PATCH 615/630] api18 Change-Id: Ic3207794627a472bbaa186cdcae34b6d4471c8ac Signed-off-by: fangyunzhong --- global/resource_management/include/resourcemanager/ohresmgr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global/resource_management/include/resourcemanager/ohresmgr.h b/global/resource_management/include/resourcemanager/ohresmgr.h index 1515e8ceb..ea4c2b7ae 100644 --- a/global/resource_management/include/resourcemanager/ohresmgr.h +++ b/global/resource_management/include/resourcemanager/ohresmgr.h @@ -552,7 +552,7 @@ ResourceManager_ErrorCode OH_ResourceManager_ReleaseStringArray(char ***resValue {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. * @since 12 - * @deprecated since 16 + * @deprecated since 18 * @useinstead OH_ResourceManager_GetIntPluralString */ ResourceManager_ErrorCode OH_ResourceManager_GetPluralString(const NativeResourceManager *mgr, uint32_t resId, @@ -577,7 +577,7 @@ ResourceManager_ErrorCode OH_ResourceManager_GetPluralString(const NativeResourc {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. * @since 12 - * @deprecated since 16 + * @deprecated since 18 * @useinstead OH_ResourceManager_GetIntPluralStringByName */ ResourceManager_ErrorCode OH_ResourceManager_GetPluralStringByName(const NativeResourceManager *mgr, -- Gitee From 866a820d1378e58ac9294c1a566635e61885329b Mon Sep 17 00:00:00 2001 From: bluhuang Date: Wed, 26 Feb 2025 11:01:07 +0800 Subject: [PATCH 616/630] change branch name to GSKV Signed-off-by: bluhuang --- .../preferences/include/oh_preferences_option.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributeddatamgr/preferences/include/oh_preferences_option.h b/distributeddatamgr/preferences/include/oh_preferences_option.h index 05597f409..efeb5161a 100644 --- a/distributeddatamgr/preferences/include/oh_preferences_option.h +++ b/distributeddatamgr/preferences/include/oh_preferences_option.h @@ -60,8 +60,8 @@ typedef struct OH_PreferencesOption OH_PreferencesOption; typedef enum Preferences_StorageType { /** XML storage*/ PREFERENCES_STORAGE_XML = 0, - /** CLKV storage */ - PREFERENCES_STORAGE_CLKV + /** GSKV storage */ + PREFERENCES_STORAGE_GSKV } Preferences_StorageType; /** -- Gitee From 66635a1905eca985e5c375cbbf796b8b777ffc75 Mon Sep 17 00:00:00 2001 From: zhanghang Date: Mon, 24 Feb 2025 17:11:12 +0800 Subject: [PATCH 617/630] textPicker and customDialog Signed-off-by: zhanghang --- arkui/ace_engine/native/libace.ndk.json | 156 +++++++ arkui/ace_engine/native/native_dialog.h | 574 ++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 92 ++++ 3 files changed, 822 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index fe628525d..9d3932dcb 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3071,6 +3071,162 @@ "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetPositionToParent" }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_CreateOptions" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_DisposeOptions" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetLevelMode" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetLevelUniqueId" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetImmersiveMode" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_OpenDialog" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_UpdateDialog" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_CloseDialog" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetBackgroundColor" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetCornerRadius" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetBorderWidth" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetBorderColor" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetBorderStyle" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetWidth" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetHeight" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetShadow" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetCustomShadow" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetBackgroundBlurStyle" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetAlignment" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetModalMode" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetAutoCancel" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetSubwindowMode" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetMask" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetKeyboardAvoidMode" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetHoverModeEnabled" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetHoverModeArea" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_RegisterOnWillDismissCallback" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_RegisterOnWillAppearCallback" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_RegisterOnDidAppearCallback" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_RegisterOnWillDisappearCallback" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_RegisterOnDidDisappearCallback" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextPickerRangeContentArray_Create" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextPickerRangeContentArray_SetIconAtIndex" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextPickerRangeContentArray_SetTextAtIndex" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextPickerRangeContentArray_Destroy" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextCascadePickerRangeContentArray_Create" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextCascadePickerRangeContentArray_SetTextAtIndex" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextCascadePickerRangeContentArray_SetChildAtIndex" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_TextCascadePickerRangeContentArray_Destroy" + }, { "first_introduced": "18", "name": "OH_ArkUI_SurfaceHolder_Create" diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 27bbaf88e..d0ca71fea 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -39,6 +39,7 @@ #include #include "native_type.h" +#include "native_node.h" #ifdef __cplusplus extern "C" { @@ -98,6 +99,13 @@ typedef bool (*ArkUI_OnWillDismissEvent)(int32_t reason); */ typedef struct ArkUI_DialogDismissEvent ArkUI_DialogDismissEvent; +/** + * @brief Defines a struct for the content object of a custom dialog box. + * + * @since 18 + */ +typedef struct ArkUI_CustomDialogOptions ArkUI_CustomDialogOptions; + /** * @brief Provides the custom dialog box APIs for the native side. * @@ -464,6 +472,164 @@ typedef struct { */ int32_t (*registerOnDidDisappear)( ArkUI_NativeDialogHandle handle, void* userData, void (*callback)(void* userData)); + + /** + * @brief Sets the border width of the dialog box. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param top Width of the top border. + * @param right Width of the right border. + * @param bottom Width of the bottom border. + * @param left Width of the left border. + * @param unit Unit of the width. The default value is vp. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setBorderWidth)( + ArkUI_NativeDialogHandle handle, float top, float right, float bottom, float left, ArkUI_LengthMetricUnit unit); + + /** + * @brief Sets the border color of the dialog box. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param top Color of the top border. + * @param right Color of the right border. + * @param bottom Color of the bottom border. + * @param left Color of the left border. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setBorderColor)( + ArkUI_NativeDialogHandle handle, uint32_t top, uint32_t right, uint32_t bottom, uint32_t left); + + /** + * @brief Sets the border style of the dialog box. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param top Style of the top border. + * @param right Style of the right border. + * @param bottom Style of the bottom border. + * @param left Style of the left border. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setBorderStyle)( + ArkUI_NativeDialogHandle handle, int32_t top, int32_t right, int32_t bottom, int32_t left); + + /** + * @brief Sets the width of the dialog box background. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param width Width of the background. + * @param unit Unit of the width. The default value is vp. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setWidth)(ArkUI_NativeDialogHandle handle, float width, ArkUI_LengthMetricUnit unit); + + /** + * @brief Sets the height of the dialog box background. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param height Height of the background. + * @param unit Unit of the height. The default value is vp. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setHeight)(ArkUI_NativeDialogHandle handle, float height, ArkUI_LengthMetricUnit unit); + + /** + * @brief Sets the shadow of the dialog box background. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param shadow Shadow style of the background, specified by an enumerated value. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setShadow)(ArkUI_NativeDialogHandle handle, ArkUI_ShadowStyle shadow); + + /** + * @brief Sets the custom shadow of the dialog box background. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param customShadow Custom shadow parameter. The format is the same as that of the NODE_SHADOW property. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setCustomShadow)(ArkUI_NativeDialogHandle handle, const ArkUI_AttributeItem* customShadow); + + /** + * @brief Sets the background blur style of the dialog box. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param blurStyle Background blur style, specified by an enumerated value. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setBackgroundBlurStyle)(ArkUI_NativeDialogHandle handle, ArkUI_BlurStyle blurStyle); + + /** + * @brief Sets the keyboard avoidance mode of the dialog box. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param keyboardAvoidMode Keyboard avoidance mode, specified by an enumerated value. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*setKeyboardAvoidMode)(ArkUI_NativeDialogHandle handle, ArkUI_KeyboardAvoidMode keyboardAvoidMode); + + /** + * @brief Sets whether to enable the hover mode for the dialog box. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param enableHoverMode Whether to enable the hover mode. The default value is false. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur.. + * @since 18 + */ + int32_t (*enableHoverMode)(ArkUI_NativeDialogHandle handle, bool enableHoverMode); + + /** + * @brief Set the default display area of the dialog box in hover mode. + * + * @note This method must be called before the show method. + * @param handle Pointer to the dialog box controller. + * @param hoverModeAreaType Display area in hover mode, specified by an enumerated value. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occur. + * @since 18 + */ + int32_t (*setHoverModeArea)(ArkUI_NativeDialogHandle handle, ArkUI_HoverModeAreaType hoverModeAreaType); } ArkUI_NativeDialogAPI_3; /** @@ -501,6 +667,414 @@ void* OH_ArkUI_DialogDismissEvent_GetUserData(ArkUI_DialogDismissEvent* event); */ int32_t OH_ArkUI_DialogDismissEvent_GetDismissReason(ArkUI_DialogDismissEvent* event); +/** + * @brief Displays a custom dialog box. + * + * @param options Dialog box parameters. + * @param callback Callback to be invoked when the custom dialog box displays. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_OpenDialog(ArkUI_CustomDialogOptions* options, void (*callback)(int32_t dialogId)); + +/** + * @brief Updates a custom dialog box. + * + * @param options Dialog box parameters. + * @param callback Callback to be invoked when the custom dialog box updates. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_UpdateDialog(ArkUI_CustomDialogOptions* options, void (*callback)(int32_t dialogId)); + +/** + * @brief Closes a custom dialog box. + * + * @param dialogId Dialog id. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_CloseDialog(int32_t dialogId); + +/** + * @brief Creates custom dialog box options. + * + * @param content Content of the custom dialog box. + * @return Returns the pointer to the custom dialog box options. + * @since 18 + */ +ArkUI_CustomDialogOptions* OH_ArkUI_CustomDialog_CreateOptions(ArkUI_NodeHandle content); + +/** + * @brief Destroys the custom dialog box options. + * + * @param options The pointer to the custom dialog box options. + * @since 18 + */ +void OH_ArkUI_CustomDialog_DisposeOptions(ArkUI_CustomDialogOptions* options); + +/** + * @brief Sets the level mode for a custom dialog box. + * + * @note This method must be called before the OH_ArkUI_CustomDialog_OpenDialog method. + * @param options Indicates the pointer to the custom dialog options. + * @param levelMode Indicates the level mode. The parameter type is {@link ArkUI_LevelMode}. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetLevelMode(ArkUI_CustomDialogOptions* options, ArkUI_LevelMode levelMode); + +/** + * @brief Sets the level uniqueId for a custom dialog box. + * + * @param options Indicates the pointer to the custom dialog options. + * @param uniqueId Indicates the unique id of any nodes in router or navigation pages. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetLevelUniqueId(ArkUI_CustomDialogOptions* options, int32_t uniqueId); + +/** + * @brief Sets the immersive mode for a custom dialog box. + * + * @note This method must be called before the OH_ArkUI_CustomDialog_OpenDialog method. + * @param options Indicates the pointer to the custom dialog options. + * @param immersiveMode Indicates the immersive mode. The parameter type is {@link ArkUI_ImmersiveMode}. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetImmersiveMode(ArkUI_CustomDialogOptions* options, ArkUI_ImmersiveMode immersiveMode); + +/** + * @brief Sets the background color of the dialog box. + * + * @param options Dialog box parameters. + * @param backgroundColor Background color of the dialog box. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetBackgroundColor(ArkUI_CustomDialogOptions* options, uint32_t backgroundColor); + +/** + * @brief Sets the corner radius for a custom dialog box. + * + * @param options Dialog box parameters. + * @param topLeft Corner radius of the upper left corner. + * @param topRight Corner radius of the upper right corner. + * @param bottomLeft Corner radius of the lower left corner. + * @param bottomRight Corner radius of the lower right corner. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetCornerRadius( + ArkUI_CustomDialogOptions* options, float topLeft, float topRight, float bottomLeft, float bottomRight); + +/** + * @brief Sets the border width of the dialog box. + * + * @param options Dialog box parameters. + * @param top Width of the top border. + * @param right Width of the right border. + * @param bottom Width of the bottom border. + * @param left Width of the left border. + * @param unit Unit of the width. The default value is vp. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetBorderWidth( + ArkUI_CustomDialogOptions* options, float top, float right, float bottom, float left, ArkUI_LengthMetricUnit unit); + +/** + * @brief Sets the border color of the dialog box. + * + * @param options Dialog box parameters. + * @param top Color of the top border. + * @param right Color of the right border. + * @param bottom Color of the bottom border. + * @param left Color of the left border. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetBorderColor( + ArkUI_CustomDialogOptions* options, uint32_t top, uint32_t right, uint32_t bottom, uint32_t left); + +/** + * @brief Sets the border style of the dialog box. + * + * @param options Dialog box parameters. + * @param top Style of the top border. + * @param right Style of the right border. + * @param bottom Style of the bottom border. + * @param left Style of the left border. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetBorderStyle( + ArkUI_CustomDialogOptions* options, int32_t top, int32_t right, int32_t bottom, int32_t left); + +/** + * @brief Sets the width of the dialog box background. + * + * @param options Dialog box parameters. + * @param width Width of the background. + * @param unit Unit of the width. The default value is vp. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetWidth(ArkUI_CustomDialogOptions* options, float width, ArkUI_LengthMetricUnit unit); + +/** + * @brief Sets the height of the dialog box background. + * + * @param options Dialog box parameters. + * @param height Height of the background. + * @param unit Unit of the height. The default value is vp. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetHeight(ArkUI_CustomDialogOptions* options, float height, ArkUI_LengthMetricUnit unit); + +/** + * @brief Sets the shadow of the dialog box background. + * + * @param options Dialog box parameters. + * @param shadow Shadow style of the background, specified by an enumerated value. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetShadow(ArkUI_CustomDialogOptions* options, ArkUI_ShadowStyle shadow); + +/** + * @brief Sets the custom shadow of the dialog box background. + * + * @param options Dialog box parameters. + * @param customShadow Custom shadow parameter. The format is the same as that of the NODE_SHADOW property. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetCustomShadow( + ArkUI_CustomDialogOptions* options, const ArkUI_AttributeItem* customShadow); + +/** + * @brief Sets the background blur style of the dialog box. + * + * @param options Dialog box parameters. + * @param blurStyle Background blur style, specified by an enumerated value. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetBackgroundBlurStyle(ArkUI_CustomDialogOptions* options, ArkUI_BlurStyle blurStyle); + +/** + * @brief Sets the alignment mode of the dialog box. + * + * @param options Dialog box parameters. + * @param alignment Alignment mode of the dialog box. The parameter type is {@link ArkUI_Alignment}. + * @param offsetX Indicates the horizontal offset of the custom dialog box. The value is a floating point number. + * @param offsetY Indicates the vertical offset of the custom dialog box. The value is a floating point number. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetAlignment( + ArkUI_CustomDialogOptions* options, int32_t alignment, float offsetX, float offsetY); + +/** + * @brief Sets the modal mode for a custom dialog box. + * + * @param options Dialog box parameters. + * @param isModal Whether the dialog box is a modal. A modal dialog box has a mask applied, + * while a non-modal dialog box does not. The value true means that the dialog box is a modal. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetModalMode(ArkUI_CustomDialogOptions* options, bool isModal); + +/** + * @brief Specifies whether to allow users to touch the mask to dismiss the custom dialog box. + * + * @param options Dialog box parameters. + * @param autoCancel Specifies whether to allow users to touch the mask to dismiss the dialog box. + * The value true means to allow users to do so, and false means the opposite. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetAutoCancel(ArkUI_CustomDialogOptions* options, bool autoCancel); + +/** + * @brief Sets whether to display the dialog box in a subwindow. + * + * @param options Dialog box parameters. + * @param showInSubwindow Whether to display the dialog box in a subwindow when it is not in the main window. + * The default value is false, meaning the dialog box is displayed within the application, not in a + * separate subwindow. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetSubwindowMode(ArkUI_CustomDialogOptions* options, bool showInSubwindow); + +/** + * @brief Sets the mask for a custom dialog box. + * + * @param options Dialog box parameters. + * @param maskColor Mask color, in 0xargb format. + * @param maskRect Pointer to the mask area. Events outside the mask area are transparently transmitted, + * and events within the mask area are not. The parameter type is {@link ArkUI_Rect}. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetMask( + ArkUI_CustomDialogOptions* options, uint32_t maskColor, const ArkUI_Rect* maskRect); + +/** + * @brief Sets the keyboard avoidance mode of the dialog box. + * + * @param options Dialog box parameters. + * @param keyboardAvoidMode Keyboard avoidance mode, specified by an enumerated value. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetKeyboardAvoidMode( + ArkUI_CustomDialogOptions* options, ArkUI_KeyboardAvoidMode keyboardAvoidMode); + +/** + * @brief Sets whether to enable the hover mode for the dialog box. + * + * @param options Dialog box parameters. + * @param enabled Whether to enable the hover mode. The default value is false. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetHoverModeEnabled(ArkUI_CustomDialogOptions* options, bool enabled); + +/** + * @brief Set the default display area of the dialog box in hover mode. + * + * @param options Dialog box parameters. + * @param hoverModeAreaType Display area in hover mode, specified by an enumerated value. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_SetHoverModeArea( + ArkUI_CustomDialogOptions* options, ArkUI_HoverModeAreaType hoverModeAreaType); + +/** + * @brief Registers a callback for the dismissal event of the custom dialog box. + * + * @param options Dialog box parameters. + * @param userData Pointer to the user-defined data. + * @param callback Callback for the dismissal event of the custom dialog box. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_RegisterOnWillDismissCallback( + ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(ArkUI_DialogDismissEvent* event)); + +/** + * @brief Registers a callback to be invoked when the custom dialog box is about to appear. + * + * @param options Dialog box parameters. + * @param userData Pointer to the user-defined data. + * @param callback Callback to be invoked when the dialog box is about to appear. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_RegisterOnWillAppearCallback( + ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(void* userData)); + +/** + * @brief Registers a callback to be invoked when the custom dialog box appears. + * + * @param options Dialog box parameters. + * @param userData Pointer to the user-defined data. + * @param callback Callback to be invoked when the custom dialog box appears. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_RegisterOnDidAppearCallback( + ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(void* userData)); + +/** + * @brief Registers a callback to be invoked when the custom dialog box is about to disappear. + * + * @param options Dialog box parameters. + * @param userData Pointer to the user-defined data. + * @param callback Callback to be invoked when the dialog box is about to disappear. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_RegisterOnWillDisappearCallback( + ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(void* userData)); + +/** + * @brief Registers a callback to be invoked when the custom dialog box disappears. + * + * @param options Dialog box parameters. + * @param userData Pointer to the user-defined data. + * @param callback Callback to be invoked when the custom dialog box disappears. + * @return Returns the error 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. + * @since 18 + */ +int32_t OH_ArkUI_CustomDialog_RegisterOnDidDisappearCallback( + ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(void* userData)); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 395d66b46..64676cb95 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2590,6 +2590,20 @@ typedef struct ArkUI_SystemFontStyleEvent ArkUI_SystemFontStyleEvent; */ typedef struct ArkUI_SnapshotOptions ArkUI_SnapshotOptions; +/** + * @brief TextPicker single column selector, supports mixing text and images. + * + * @since 18 + */ +typedef struct ArkUI_TextPickerRangeContentArray ArkUI_TextPickerRangeContentArray; + + /** + * @brief TextPicker multi column selector, supports mixing text and images. + * + * @since 18 + */ +typedef struct ArkUI_TextCascadePickerRangeContentArray ArkUI_TextCascadePickerRangeContentArray; + /** * @brief Creates a size constraint. * @@ -5021,6 +5035,84 @@ int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions * @since 18 */ int32_t OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions* option); + +/** + *@brief Creates a TextPickerRangeContent instance. + * + *@param length The length of the picker array. + *@return Returns a TextPickerRangeContent instance. + *@since 18 + */ +ArkUI_TextPickerRangeContentArray* OH_ArkUI_TextPickerRangeContentArray_Create(int32_t length); + +/** + *@brief Sets the icon of items in a text picker ranges. + * + *@param handle The TextPickerRangeContent instance for obtaining information. + *@param icon Icon addreass. + *@param index The index position of the value to be obtained. + *@since 18 + */ +void OH_ArkUI_TextPickerRangeContentArray_SetIconAtIndex( + ArkUI_TextPickerRangeContentArray* handle, char* icon, int32_t index); + +/** + *@brief Sets the text of items in a text picker ranges + * + *@param handle The TextPickerRangeContent instance for obtaining information. + *@param text Text content + *@param index The index position of the value to be obtained. + *@since 18 + */ +void OH_ArkUI_TextPickerRangeContentArray_SetTextAtIndex( + ArkUI_TextPickerRangeContentArray* handle, char* text, int32_t index); + +/** + *@brief Destroy the TextPickerRangeContent instance. + * + *@param handle The TextPickerRangeContent instance for obtaining information. + *@since 18 + */ +void OH_ArkUI_TextPickerRangeContentArray_Destroy(ArkUI_TextPickerRangeContentArray* handle); + +/** + *@brief Creates a TextCascadePickerRangeContent instance. + * + *@param length The length of the picker array. + *@return Returns a TextCascadePickerRangeContent instance. + *@since 18 + */ +ArkUI_TextCascadePickerRangeContentArray* OH_ArkUI_TextCascadePickerRangeContentArray_Create(int32_t length); + +/** + *@brief Sets the text of items in a multi text picker ranges. + * + *@param handle The TextCascadePickerRangeContent instance for obtaining information. + *@param text text content + *@param index The index position of the value to be obtained. + *@since 18 + */ +void OH_ArkUI_TextCascadePickerRangeContentArray_SetTextAtIndex( + ArkUI_TextCascadePickerRangeContentArray* handle, char* text, int32_t index); + +/** + *@brief Sets the childs info of items in a multi text picker ranges. + * + *@param handle The TextCascadePickerRangeContent instance for obtaining information. + *@param child The child instance. + *@param index The index position of the value to be obtained. + *@since 18 + */ +void OH_ArkUI_TextCascadePickerRangeContentArray_SetChildAtIndex( + ArkUI_TextCascadePickerRangeContentArray* handle, ArkUI_TextCascadePickerRangeContentArray* child, int32_t index); + +/** + *@brief Destroy the TextCascadePickerRangeContent instance. + * + *@param handle The TextCascadePickerRangeContent instance for obtaining information. + *@since 18 + */ +void OH_ArkUI_TextCascadePickerRangeContentArray_Destroy(ArkUI_TextCascadePickerRangeContentArray* handle); #ifdef __cplusplus }; #endif -- Gitee From b9953131d697fc2553481e14b77beb49d790432f Mon Sep 17 00:00:00 2001 From: jxw Date: Wed, 5 Mar 2025 01:24:01 +0000 Subject: [PATCH 618/630] change api 16 to 18 Signed-off-by: jxw --- network/netssl/libnet_ssl_c.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/netssl/libnet_ssl_c.json b/network/netssl/libnet_ssl_c.json index 595ffeec2..4336fd70a 100644 --- a/network/netssl/libnet_ssl_c.json +++ b/network/netssl/libnet_ssl_c.json @@ -16,11 +16,11 @@ "name": "OH_Netstack_DestroyCertificatesContent" }, { - "first_introduced":"16", + "first_introduced":"18", "name": "OH_Netstack_IsCleartextPermitted" }, { - "first_introduced":"16", + "first_introduced":"18", "name": "OH_Netstack_IsCleartextPermittedByHostName" } ] -- Gitee From 417f80f4c4c60064ec39eba6e00de0591eba4570 Mon Sep 17 00:00:00 2001 From: yangxiaoyu Date: Wed, 5 Mar 2025 10:28:05 +0800 Subject: [PATCH 619/630] =?UTF-8?q?=E3=80=90av=5Fcodec=E3=80=91=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=83=BD=E5=8A=9B=E6=B7=B7=E7=94=A8=E4=BC=9A=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E6=9C=AA=E5=AE=9A=E4=B9=89=E8=A1=8C=E4=B8=BA=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangxiaoyu --- multimedia/av_codec/native_avcapability.h | 51 +++++++++++++++-------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index 0d8a9264e..dd17584d4 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -143,7 +143,8 @@ int32_t OH_AVCapability_GetMaxSupportedInstances(OH_AVCapability *capability); /** * @brief Get the encoder's supported bitrate range. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Encoder capability pointer. Do not give a decoder capability pointer + * @param capability Encoder capability pointer. If a decoder capability pointer is given, + * undefined behavior occurs * @param bitrateRange Output parameter. Encoder bitrate range * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -155,7 +156,8 @@ OH_AVErrCode OH_AVCapability_GetEncoderBitrateRange(OH_AVCapability *capability, /** * @brief Check if the encoder supports the specific bitrate mode. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Encoder capability pointer. Do not give a decoder capability pointer + * @param capability Encoder capability pointer. If a decoder capability pointer is given, + * undefined behavior occurs * @param bitrateMode Bitrate mode * @return Returns true if the bitrate mode is supported, false if the bitrate mode is not supported * @since 10 @@ -165,7 +167,8 @@ bool OH_AVCapability_IsEncoderBitrateModeSupported(OH_AVCapability *capability, /** * @brief Get the encoder's supported quality range. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Encoder capability pointer. Do not give a decoder capability pointer + * @param capability Encoder capability pointer. If a decoder capability pointer is given, + * undefined behavior occurs * @param qualityRange Output parameter. Encoder quality range * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -177,7 +180,8 @@ OH_AVErrCode OH_AVCapability_GetEncoderQualityRange(OH_AVCapability *capability, /** * @brief Get the encoder's supported encoder complexity range. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Encoder capability pointer. Do not give a decoder capability pointer + * @param capability Encoder capability pointer. If a decoder capability pointer is given, + * undefined behavior occurs * @param complexityRange Output parameter. Encoder complexity range * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -189,7 +193,8 @@ OH_AVErrCode OH_AVCapability_GetEncoderComplexityRange(OH_AVCapability *capabili /** * @brief Get the audio codec's supported sample rates. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Audio codec capability pointer. Do not give a video codec capability pointer + * @param capability Audio codec capability pointer. If a video codec capability pointer is given, + * undefined behavior occurs * @param sampleRates Output parameter. A pointer to the sample rates array * @param sampleRateNum Output parameter. The element number of the sample rates array * @return Returns AV_ERR_OK if the execution is successful, @@ -205,7 +210,8 @@ OH_AVErrCode OH_AVCapability_GetAudioSupportedSampleRates(OH_AVCapability *capab /** * @brief Get the audio codec's supported audio channel count range. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Audio codec capability pointer. Do not give a video codec capability pointer + * @param capability Audio codec capability pointer. If a video codec capability pointer is given, + * undefined behavior occurs * @param channelCountRange Output parameter. Audio channel count range * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -217,7 +223,8 @@ OH_AVErrCode OH_AVCapability_GetAudioChannelCountRange(OH_AVCapability *capabili /** * @brief Get the video codec's supported video width alignment. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param widthAlignment Output parameter. Video width alignment * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -229,7 +236,8 @@ OH_AVErrCode OH_AVCapability_GetVideoWidthAlignment(OH_AVCapability *capability, /** * @brief Get the video codec's supported video height alignment. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param heightAlignment Output parameter. Video height alignment * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -241,7 +249,8 @@ OH_AVErrCode OH_AVCapability_GetVideoHeightAlignment(OH_AVCapability *capability /** * @brief Get the video codec's supported video width range for a specific height. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability video codec capability pointer. Do not give an audio codec capability pointer + * @param capability video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param height Vertical pixel number of the video * @param widthRange Output parameter. Video width range * @return Returns AV_ERR_OK if the execution is successful, @@ -256,7 +265,8 @@ OH_AVErrCode OH_AVCapability_GetVideoWidthRangeForHeight(OH_AVCapability *capabi /** * @brief Get the video codec's supported video height range for a specific width. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param width Horizontal pixel number of the video * @param heightRange Output parameter. Video height range * @return Returns AV_ERR_OK if the execution is successful, @@ -271,7 +281,8 @@ OH_AVErrCode OH_AVCapability_GetVideoHeightRangeForWidth(OH_AVCapability *capabi /** * @brief Get the video codec's supported video width range. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. DO not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param widthRange Output parameter. Video width range * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -283,7 +294,8 @@ OH_AVErrCode OH_AVCapability_GetVideoWidthRange(OH_AVCapability *capability, OH_ /** * @brief Get the video codec's supported video height range. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param heightRange Output parameter. Video height range * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -295,7 +307,8 @@ OH_AVErrCode OH_AVCapability_GetVideoHeightRange(OH_AVCapability *capability, OH /** * @brief Check if the video codec supports the specific video size. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param width Horizontal pixel number of the video * @param height Vertical pixel number of the video * @return Returns true if the video size is supported, false if the video size is not supported @@ -306,7 +319,8 @@ bool OH_AVCapability_IsVideoSizeSupported(OH_AVCapability *capability, int32_t w /** * @brief Get the video codec's supported video frame rate range. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param frameRateRange Output parameter. Video frame rate range * @return Returns AV_ERR_OK if the execution is successful, * otherwise returns a specific error code, refer to {@link OH_AVErrCode} @@ -318,7 +332,8 @@ OH_AVErrCode OH_AVCapability_GetVideoFrameRateRange(OH_AVCapability *capability, /** * @brief Get the Video codec's supported video frame rate range for a specified video size. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param width Horizontal pixel number of the video * @param height Vertical pixel number of the video * @param frameRateRange Output parameter. Frame rate range @@ -334,7 +349,8 @@ OH_AVErrCode OH_AVCapability_GetVideoFrameRateRangeForSize(OH_AVCapability *capa /** * @brief Check if the video codec supports the specific combination of video size and frame rate. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param width Horizontal pixel number of the video * @param height Vertical pixel number of the video * @param frameRate Frame number per second @@ -348,7 +364,8 @@ bool OH_AVCapability_AreVideoSizeAndFrameRateSupported(OH_AVCapability *capabili /** * @brief Get the video codec's supported video pixel format. * @syscap SystemCapability.Multimedia.Media.CodecBase - * @param capability Video codec capability pointer. Do not give an audio codec capability pointer + * @param capability Video codec capability pointer. If an audio codec capability pointer is given, + * undefined behavior occurs * @param pixelFormats Output parameter. A pointer to the video pixel format array * @param pixelFormatNum Output parameter. The element number of the pixel format array * @return Returns AV_ERR_OK if the execution is successful, -- Gitee From 630392a667731eeba04ef0fadee8e920f87ec933 Mon Sep 17 00:00:00 2001 From: zhengzhuolan Date: Wed, 5 Mar 2025 14:38:36 +0800 Subject: [PATCH 620/630] size_t_fix Signed-off-by: zhengzhuolan --- BasicServicesKit/commonevent/oh_commonevent.h | 1 + 1 file changed, 1 insertion(+) diff --git a/BasicServicesKit/commonevent/oh_commonevent.h b/BasicServicesKit/commonevent/oh_commonevent.h index 262ae9768..a5b93c498 100644 --- a/BasicServicesKit/commonevent/oh_commonevent.h +++ b/BasicServicesKit/commonevent/oh_commonevent.h @@ -36,6 +36,7 @@ #ifndef OH_COMMONEVENT_H #define OH_COMMONEVENT_H +#include #include #ifdef __cplusplus -- Gitee From 4be5db7b4442a765e6b1b6e497afb5b85f1e2129 Mon Sep 17 00:00:00 2001 From: l00844999 Date: Wed, 5 Mar 2025 15:06:15 +0800 Subject: [PATCH 621/630] drawing fix Signed-off-by: l00844999 --- graphic/graphic_2d/native_drawing/drawing_gpu_context.h | 2 +- graphic/graphic_2d/native_drawing/drawing_surface.h | 4 ++-- .../graphic_2d/native_drawing/libnative_drawing.ndk.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h index 236b2d0cc..1949a5e72 100644 --- a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h +++ b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h @@ -73,7 +73,7 @@ OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOp * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @return Returns the pointer to the OH_Drawing_GpuContext object created. - * @since 18 + * @since 16 * @version 1.0 */ OH_Drawing_GpuContext* OH_Drawing_GpuContextCreate(void); diff --git a/graphic/graphic_2d/native_drawing/drawing_surface.h b/graphic/graphic_2d/native_drawing/drawing_surface.h index 240854f25..67f951f74 100644 --- a/graphic/graphic_2d/native_drawing/drawing_surface.h +++ b/graphic/graphic_2d/native_drawing/drawing_surface.h @@ -69,7 +69,7 @@ OH_Drawing_Surface* OH_Drawing_SurfaceCreateFromGpuContext( * @param imageInfo Indicates the image info. * @param window Indicates the pointer of the screen window. * @return Returns the pointer to the OH_Drawing_Surface object created. - * @since 18 + * @since 16 * @version 1.0 */ OH_Drawing_Surface* OH_Drawing_SurfaceCreateOnScreen( @@ -95,7 +95,7 @@ OH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface* surface); * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if surface is nullptr. - * @since 18 + * @since 16 * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_SurfaceFlush(OH_Drawing_Surface* surface); diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index da43bd3aa..5b90bdc92 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -323,7 +323,7 @@ "name": "OH_Drawing_GpuContextCreateFromGL" }, { - "first_introduced": "18", + "first_introduced": "16", "name": "OH_Drawing_GpuContextCreate" }, { @@ -713,7 +713,7 @@ "name": "OH_Drawing_SurfaceCreateFromGpuContext" }, { - "first_introduced": "18", + "first_introduced": "16", "name": "OH_Drawing_SurfaceCreateOnScreen" }, { @@ -721,7 +721,7 @@ "name": "OH_Drawing_SurfaceGetCanvas" }, { - "first_introduced": "18", + "first_introduced": "16", "name": "OH_Drawing_SurfaceFlush" }, { -- Gitee From e53b64937cbe243f4ddd3bef6ad7e1f158e0fb26 Mon Sep 17 00:00:00 2001 From: htt1997 Date: Wed, 5 Mar 2025 17:37:10 +0800 Subject: [PATCH 622/630] fix Signed-off-by: htt1997 --- distributeddatamgr/relational_store/libnative_rdb.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index afa900613..48da5ba0e 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -44,6 +44,10 @@ "first_introduced": "14", "name":"OH_Rdb_SetDbType" }, + { + "first_introduced": "18", + "name":"OH_Rdb_SetPersistent" + }, { "first_introduced": "14", "name":"OH_Rdb_GetSupportedDbType" -- Gitee From d55947695b18e02d7167ebfd6820bbd24bf74e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E9=BD=90=E7=86=A0?= Date: Wed, 5 Mar 2025 17:46:18 +0800 Subject: [PATCH 623/630] change api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑齐熠 --- arkui/ace_engine/native/libace.ndk.json | 2 +- arkui/ace_engine/native/ui_input_event.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index fe628525d..ff687459e 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -508,7 +508,7 @@ "name": "OH_ArkUI_PointerEvent_GetTiltY" }, { - "first_introduced": "16", + "first_introduced": "18", "name": "OH_ArkUI_PointerEvent_GetRollAngle" }, { diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 6a1788d5a..3c452f9e2 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -519,7 +519,7 @@ float OH_ArkUI_PointerEvent_GetTiltY(const ArkUI_UIInputEvent* event, uint32_t p * @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. - * @since 16 + * @since 18 */ int32_t OH_ArkUI_PointerEvent_GetRollAngle(const ArkUI_UIInputEvent* event, double* rollAngle); -- Gitee From d06e185e0ec3ddf34b3c5a08d073a5892f6e17ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=80=80=E5=BE=B7?= Date: Thu, 6 Mar 2025 01:18:10 +0000 Subject: [PATCH 624/630] update security/asset/inc/asset_type.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 尹耀德 --- security/asset/inc/asset_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/asset/inc/asset_type.h b/security/asset/inc/asset_type.h index 34fc2da44..1706eb602 100755 --- a/security/asset/inc/asset_type.h +++ b/security/asset/inc/asset_type.h @@ -222,7 +222,7 @@ typedef enum { * * @since 18 */ - ASSET_TAG_WRAP_TYPE = ASSET_TYPE_BYTES | 0x49, + ASSET_TAG_WRAP_TYPE = ASSET_TYPE_NUMBER | 0x49, } Asset_Tag; /** -- Gitee From 4d2609d4b5fc17d21c151f45fcbae57b6cdc5ba9 Mon Sep 17 00:00:00 2001 From: hanchenZz Date: Mon, 3 Mar 2025 19:19:07 +0800 Subject: [PATCH 625/630] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3OH?= =?UTF-8?q?=5FAbility=5FGetChildProcessArgs=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=AD=90=E8=BF=9B=E7=A8=8B=E8=8E=B7=E5=8F=96=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hanchenZz --- .../child_process/libchild_process.ndk.json | 4 ++++ .../ability_runtime/child_process/native_child_process.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/ability/ability_runtime/child_process/libchild_process.ndk.json b/ability/ability_runtime/child_process/libchild_process.ndk.json index b00d0d189..d812f5a08 100644 --- a/ability/ability_runtime/child_process/libchild_process.ndk.json +++ b/ability/ability_runtime/child_process/libchild_process.ndk.json @@ -6,5 +6,9 @@ { "first_introduced": "13", "name": "OH_Ability_StartNativeChildProcess" + }, + { + "first_introduced": "16", + "name": "OH_Ability_GetCurrentChildProcessArgs" } ] \ No newline at end of file diff --git a/ability/ability_runtime/child_process/native_child_process.h b/ability/ability_runtime/child_process/native_child_process.h index a60cca635..283710400 100644 --- a/ability/ability_runtime/child_process/native_child_process.h +++ b/ability/ability_runtime/child_process/native_child_process.h @@ -279,6 +279,15 @@ Ability_NativeChildProcess_ErrCode OH_Ability_StartNativeChildProcess( const char* entry, NativeChildProcess_Args args, NativeChildProcess_Options options, int32_t *pid); +/** + * @brief Child process get self NativeChildProcess_Args. + * + * @return Returns a pointer to the arguments passed to current child process.\n + * For details, see {@link NativeChildProcess_Args}. + * @since 16 + */ +NativeChildProcess_Args* OH_Ability_GetCurrentChildProcessArgs(); + #ifdef __cplusplus } // extern "C" #endif -- Gitee From 89e5833298f0c6b3718b4c0f6becefa247e3c33b Mon Sep 17 00:00:00 2001 From: houguobiao Date: Thu, 6 Mar 2025 19:26:00 +0800 Subject: [PATCH 626/630] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89=E7=84=A6?= =?UTF-8?q?=E7=82=B9=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houguobiao Change-Id: I41b76889269124a66e80791af419159061d3fe93 --- arkui/ace_engine/native/native_dialog.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index d0ca71fea..5de204ab4 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -630,6 +630,18 @@ typedef struct { * @since 18 */ int32_t (*setHoverModeArea)(ArkUI_NativeDialogHandle handle, ArkUI_HoverModeAreaType hoverModeAreaType); + + /** + * @brief Sets whether to get focus when the custom dialog is displayed. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param focusable Specifies whether to get focus when the custom dialog is displayed. The default value is true. + * @return Returns the error 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. + * @since 18 + */ + int32_t (*setFocusable)(ArkUI_NativeDialogHandle handle, bool focusable); } ArkUI_NativeDialogAPI_3; /** -- Gitee From 8f0e0574597c8faaba9f42effa60fc320ad10886 Mon Sep 17 00:00:00 2001 From: AOL Date: Fri, 7 Mar 2025 09:17:06 +0000 Subject: [PATCH 627/630] add set volume apis in ohaudio and avplayer Signed-off-by: AOL --- .../common/native_audiostream_base.h | 23 +++++++++++++++++++ .../common/native_audiostreambuilder.h | 17 ++++++++++++++ multimedia/player_framework/avplayer.h | 14 +++++++++++ 3 files changed, 54 insertions(+) diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index af6f59c31..aed8e102c 100644 --- a/multimedia/audio_framework/common/native_audiostream_base.h +++ b/multimedia/audio_framework/common/native_audiostream_base.h @@ -726,6 +726,29 @@ typedef enum { */ typedef OH_AudioData_Callback_Result (*OH_AudioRenderer_OnWriteDataCallback)(OH_AudioRenderer* renderer, void* userData, void* audioData, int32_t audioDataSize); + +/** + * @brief Define the audio stream volume mode. + * + * @since 18 + */ +typedef enum { + /** + * Indicates this audio stream volume will be affected by system volume, also the default behavior. + * + * @since 18 + */ + AUDIOSTREAM_VOLUMEMODE_SYSTEM_GLOBAL = 0, + + /** + * Indicates this audio stream volume will be affected by app's individual volume percentage which set by yourself + * using the app volume api. + * + * @since 18 + */ + AUDIOSTREAM_VOLUMEMODE_APP_INDIVIDUAL = 1 +} OH_AudioStream_VolumeMode; + #ifdef __cplusplus } #endif diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index 7d28fb71d..cedc25bdc 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -361,6 +361,23 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInterruptMode(OH_AudioStr */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererWriteDataCallback(OH_AudioStreamBuilder* builder, OH_AudioRenderer_OnWriteDataCallback callback, void* userData); + +/* + * Set the renderer volume mode of the stream client + * + * @since 18 + * + * @param builder Reference provided by OH_AudioStreamBuilder_Create() + * @param volumeMode Set the volume mode for the renderer client. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.The param of volumeMode invalid. + */ +OH_AudioStream_Result OH_AudioStreamBuilder_SetVolumeMode(OH_AudioStreamBuilder* builder, + OH_AudioStream_VolumeMode volumeMode); + #ifdef __cplusplus } #endif diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h index 474b2885a..f87d5b2bc 100644 --- a/multimedia/player_framework/avplayer.h +++ b/multimedia/player_framework/avplayer.h @@ -592,6 +592,20 @@ OH_AVErrCode OH_AVPlayer_SetOnInfoCallback(OH_AVPlayer *player, OH_AVPlayerOnInf */ OH_AVErrCode OH_AVPlayer_SetOnErrorCallback(OH_AVPlayer *player, OH_AVPlayerOnErrorCallback callback, void *userData); +/** + * @brief Set volume mode of the player + * @param player Pointer to an OH_AVPlayer instance + * @param volumeMode The value {@link OH_AudioStream_VolumeMode} indicated volume mode of the player. + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input player is nullptr or volumeMode value is invalid. + * {@link AV_ERR_INVALID_STATE} function called in invalid state, should before prepare state. + * {@link AV_ERR_SERVICE_DIED} media service died, system error. + * @since 18 + * @version 1.0 + */ +OH_AVErrCode OH_AVPlayer_SetVolumeMode(OH_AVPlayer *player, OH_AudioStream_VolumeMode volumeMode); + #ifdef __cplusplus } #endif -- Gitee From 2e53139e04566336d9a6c51b07f7e96e94ba4091 Mon Sep 17 00:00:00 2001 From: AOL Date: Fri, 7 Mar 2025 09:20:34 +0000 Subject: [PATCH 628/630] add ndk json Signed-off-by: AOL --- multimedia/audio_framework/ohaudio.ndk.json | 4 ++++ multimedia/player_framework/avplayer/libavplayer.ndk.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/multimedia/audio_framework/ohaudio.ndk.json b/multimedia/audio_framework/ohaudio.ndk.json index e6d5a0cd2..2c8537d6c 100644 --- a/multimedia/audio_framework/ohaudio.ndk.json +++ b/multimedia/audio_framework/ohaudio.ndk.json @@ -382,5 +382,9 @@ { "first_introduced": "15", "name": "OH_AudioRenderer_GetAudioTimestampInfo" + }, + { + "first_introduced": "18", + "name": "OH_AudioStreamBuilder_SetVolumeMode" } ] diff --git a/multimedia/player_framework/avplayer/libavplayer.ndk.json b/multimedia/player_framework/avplayer/libavplayer.ndk.json index d7151471e..b48545cad 100644 --- a/multimedia/player_framework/avplayer/libavplayer.ndk.json +++ b/multimedia/player_framework/avplayer/libavplayer.ndk.json @@ -134,5 +134,9 @@ { "first_introduced": "12", "name": "OH_AVPlayer_SetAudioEffectMode" + }, + { + "first_introduced": "12", + "name": "OH_AudioStreamBuilder_SetVolumeMode" } ] \ No newline at end of file -- Gitee From 1586371cbeafffa99b5e0868aa7f59414115930e Mon Sep 17 00:00:00 2001 From: AOL Date: Fri, 7 Mar 2025 09:22:24 +0000 Subject: [PATCH 629/630] fix ver error Signed-off-by: AOL --- multimedia/player_framework/avplayer/libavplayer.ndk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/avplayer/libavplayer.ndk.json b/multimedia/player_framework/avplayer/libavplayer.ndk.json index b48545cad..46e077818 100644 --- a/multimedia/player_framework/avplayer/libavplayer.ndk.json +++ b/multimedia/player_framework/avplayer/libavplayer.ndk.json @@ -136,7 +136,7 @@ "name": "OH_AVPlayer_SetAudioEffectMode" }, { - "first_introduced": "12", + "first_introduced": "18", "name": "OH_AudioStreamBuilder_SetVolumeMode" } ] \ No newline at end of file -- Gitee From cb07be59e859d1b290398f9a3ee213ae122fadc5 Mon Sep 17 00:00:00 2001 From: songlehappy Date: Thu, 20 Mar 2025 10:40:06 +0800 Subject: [PATCH 630/630] 123 Signed-off-by: songlehappy --- test/testAlpha/test2.h | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 test/testAlpha/test2.h diff --git a/test/testAlpha/test2.h b/test/testAlpha/test2.h new file mode 100644 index 000000000..3cfea6e50 --- /dev/null +++ b/test/testAlpha/test2.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup ArkUI_TestModule + * @{ + * + * @brief this is example. + * @since 1 + */ + +/** + * @file test2.h + * + * @brief this is kit example. + * + * @library example.so + * @kit TestCKitAlpha + * @syscap example + * @since 1 + */ + +/** + * @brief this enum example Enum_Class1727407743761. + * + * @since 1 + */ +typedef enum { + /** the enumInstance example VALUE_ONE1727407761755. */ + VALUE_ONE1727407761755 = 1 +} Enum_Class1727407743761 Enum_Class; + +/** + * @brief this struct example My_Component1727407821965. + * + * @since 1 + */ +typedef struct { + /** Test number. */ + int32_t num; +} My_Component1727407821965; + +/** + * @brief this struct example My_Component1727407826859. + * + * @since 1 + */ +typedef struct { + /** Test number. */ + int32_t num; +} My_Component1727407826859; \ No newline at end of file -- Gitee