enum未加typedef会导致c文件编译失败 Signed-off-by: m00472246 <majingtao1@huawei.com>

Signed-off-by: m00472246 <majingtao1@huawei.com>
This commit is contained in:
m00472246 2024-04-29 13:00:02 +08:00
parent cd6f905d59
commit 02713532ce
2 changed files with 12 additions and 12 deletions

View File

@ -54,7 +54,7 @@ typedef struct OH_NativeBuffer OH_NativeBuffer;
* @since 10 * @since 10
* @version 1.0 * @version 1.0
*/ */
enum OH_NativeBuffer_Usage { typedef enum OH_NativeBuffer_Usage {
NATIVEBUFFER_USAGE_CPU_READ = (1ULL << 0), /// < CPU read buffer */ NATIVEBUFFER_USAGE_CPU_READ = (1ULL << 0), /// < CPU read buffer */
NATIVEBUFFER_USAGE_CPU_WRITE = (1ULL << 1), /// < CPU write memory */ NATIVEBUFFER_USAGE_CPU_WRITE = (1ULL << 1), /// < CPU write memory */
NATIVEBUFFER_USAGE_MEM_DMA = (1ULL << 3), /// < Direct memory access (DMA) buffer */ NATIVEBUFFER_USAGE_MEM_DMA = (1ULL << 3), /// < Direct memory access (DMA) buffer */
@ -62,7 +62,7 @@ enum OH_NativeBuffer_Usage {
NATIVEBUFFER_USAGE_HW_TEXTURE = (1ULL << 9), /// < For GPU read case */ NATIVEBUFFER_USAGE_HW_TEXTURE = (1ULL << 9), /// < For GPU read case */
NATIVEBUFFER_USAGE_CPU_READ_OFTEN = (1ULL << 16), /// < Often be mapped for direct CPU reads */ NATIVEBUFFER_USAGE_CPU_READ_OFTEN = (1ULL << 16), /// < Often be mapped for direct CPU reads */
NATIVEBUFFER_USAGE_ALIGNMENT_512 = (1ULL << 18), /// < 512 bytes alignment */ NATIVEBUFFER_USAGE_ALIGNMENT_512 = (1ULL << 18), /// < 512 bytes alignment */
}; } OH_NativeBuffer_Usage;
/** /**
* @brief Indicates the format of a native buffer. * @brief Indicates the format of a native buffer.
@ -71,7 +71,7 @@ enum OH_NativeBuffer_Usage {
* @since 10 * @since 10
* @version 1.0 * @version 1.0
*/ */
enum OH_NativeBuffer_Format { typedef enum OH_NativeBuffer_Format {
/** /**
* CLUT8 format * CLUT8 format
* @since 12 * @since 12
@ -196,7 +196,7 @@ enum OH_NativeBuffer_Format {
*/ */
NATIVEBUFFER_PIXEL_FMT_VENDER_MASK = 0X7FFF0000, NATIVEBUFFER_PIXEL_FMT_VENDER_MASK = 0X7FFF0000,
NATIVEBUFFER_PIXEL_FMT_BUTT = 0X7FFFFFFF /// < Invalid pixel format */ NATIVEBUFFER_PIXEL_FMT_BUTT = 0X7FFFFFFF /// < Invalid pixel format */
}; } OH_NativeBuffer_Format;
/** /**
* @brief Indicates the color space of a native buffer. * @brief Indicates the color space of a native buffer.
@ -205,7 +205,7 @@ enum OH_NativeBuffer_Format {
* @since 11 * @since 11
* @version 1.0 * @version 1.0
*/ */
enum OH_NativeBuffer_ColorSpace { typedef enum OH_NativeBuffer_ColorSpace {
/** None color space */ /** None color space */
OH_COLORSPACE_NONE, OH_COLORSPACE_NONE,
/** COLORPRIMARIES_BT601_P | (TRANSFUNC_BT709 << 8) | (MATRIX_BT601_P << 16) | (RANGE_FULL << 21) */ /** COLORPRIMARIES_BT601_P | (TRANSFUNC_BT709 << 8) | (MATRIX_BT601_P << 16) | (RANGE_FULL << 21) */
@ -270,7 +270,7 @@ enum OH_NativeBuffer_ColorSpace {
OH_COLORSPACE_DISPLAY_BT2020_HLG, OH_COLORSPACE_DISPLAY_BT2020_HLG,
/** equal to OH_COLORSPACE_BT2020_PQ_FULL */ /** equal to OH_COLORSPACE_BT2020_PQ_FULL */
OH_COLORSPACE_DISPLAY_BT2020_PQ, OH_COLORSPACE_DISPLAY_BT2020_PQ,
}; } OH_NativeBuffer_ColorSpace;
/** /**
* @brief Indicates the transform type of a native buffer. * @brief Indicates the transform type of a native buffer.
@ -279,7 +279,7 @@ enum OH_NativeBuffer_ColorSpace {
* @since 12 * @since 12
* @version 1.0 * @version 1.0
*/ */
enum OH_NativeBuffer_TransformType { typedef enum OH_NativeBuffer_TransformType {
NATIVEBUFFER_ROTATE_NONE = 0, /**< No rotation */ NATIVEBUFFER_ROTATE_NONE = 0, /**< No rotation */
NATIVEBUFFER_ROTATE_90, /**< Rotation by 90 degrees */ NATIVEBUFFER_ROTATE_90, /**< Rotation by 90 degrees */
NATIVEBUFFER_ROTATE_180, /**< Rotation by 180 degrees */ NATIVEBUFFER_ROTATE_180, /**< Rotation by 180 degrees */
@ -292,7 +292,7 @@ enum OH_NativeBuffer_TransformType {
NATIVEBUFFER_FLIP_V_ROT180, /**< Flip vertically and rotate 180 degrees */ NATIVEBUFFER_FLIP_V_ROT180, /**< Flip vertically and rotate 180 degrees */
NATIVEBUFFER_FLIP_H_ROT270, /**< Flip horizontally and rotate 270 degrees */ NATIVEBUFFER_FLIP_H_ROT270, /**< Flip horizontally and rotate 270 degrees */
NATIVEBUFFER_FLIP_V_ROT270, /**< Flip vertically and rotate 270 degrees */ NATIVEBUFFER_FLIP_V_ROT270, /**< Flip vertically and rotate 270 degrees */
}; } OH_NativeBuffer_TransformType;
/** /**
* @brief Indicates the color gamut of a native buffer. * @brief Indicates the color gamut of a native buffer.
@ -301,7 +301,7 @@ enum OH_NativeBuffer_TransformType {
* @since 12 * @since 12
* @version 1.0 * @version 1.0
*/ */
enum OH_NativeBuffer_ColorGamut { typedef enum OH_NativeBuffer_ColorGamut {
NATIVEBUFFER_COLOR_GAMUT_NATIVE = 0, /**< Native or default */ NATIVEBUFFER_COLOR_GAMUT_NATIVE = 0, /**< Native or default */
NATIVEBUFFER_COLOR_GAMUT_STANDARD_BT601 = 1, /**< Standard BT601 */ NATIVEBUFFER_COLOR_GAMUT_STANDARD_BT601 = 1, /**< Standard BT601 */
NATIVEBUFFER_COLOR_GAMUT_STANDARD_BT709 = 2, /**< Standard BT709 */ NATIVEBUFFER_COLOR_GAMUT_STANDARD_BT709 = 2, /**< Standard BT709 */
@ -313,7 +313,7 @@ enum OH_NativeBuffer_ColorGamut {
NATIVEBUFFER_COLOR_GAMUT_BT2100_PQ = 8, /**< BT2100 PQ */ NATIVEBUFFER_COLOR_GAMUT_BT2100_PQ = 8, /**< BT2100 PQ */
NATIVEBUFFER_COLOR_GAMUT_BT2100_HLG = 9, /**< BT2100 HLG */ NATIVEBUFFER_COLOR_GAMUT_BT2100_HLG = 9, /**< BT2100 HLG */
NATIVEBUFFER_COLOR_GAMUT_DISPLAY_BT2020 = 10, /**< Display BT2020 */ NATIVEBUFFER_COLOR_GAMUT_DISPLAY_BT2020 = 10, /**< Display BT2020 */
}; } OH_NativeBuffer_ColorGamut;
/** /**
* @brief <b>OH_NativeBuffer</b> config. \n * @brief <b>OH_NativeBuffer</b> config. \n

View File

@ -90,7 +90,7 @@ typedef struct Region {
* @brief Indicates the operation code in the function OH_NativeWindow_NativeWindowHandleOpt. * @brief Indicates the operation code in the function OH_NativeWindow_NativeWindowHandleOpt.
* @since 8 * @since 8
*/ */
enum NativeWindowOperation { typedef enum NativeWindowOperation {
/** /**
* set native window buffer geometry, * set native window buffer geometry,
* variable parameter in function is * variable parameter in function is
@ -200,7 +200,7 @@ enum NativeWindowOperation {
* @since 12 * @since 12
*/ */
GET_BUFFERQUEUE_SIZE, GET_BUFFERQUEUE_SIZE,
}; } NativeWindowOperation;
/** /**
* @brief Indicates Scaling Mode. * @brief Indicates Scaling Mode.