/*
 * @file hv_mw_OsdComm.h
 * @brief Header file of osd common.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use Hv_Mw_OsdGetPropAddr() to get osd component prop data address.
 * (+) Use Hv_Mw_OsdGetSceneNum() to get osd scene number.
 * (+) Use Hv_Mw_OsdGetDynamicPropAddr() to get osd dynamic component prop data address.
 * (+) Use Hv_Mw_OsdGetItemComponent() to get osd item's components.
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2022-09-01
 */

#ifndef _HV_MW_OSD_COMM_H
#define _HV_MW_OSD_COMM_H

#include "hv_comm_DataType.h"
#include "hv_res_OsdProp.h"
#include "hv_res_OsdMenuOperation.h"
#include "hv_res_OsdMoeRes.h"

#define __END__                 (0xffff)
#define __NEXTLINE__            (0xfffe)
#define __NEWLINE__             (0xfffd)
#define __WORDSPLIT__           (0xfffc)

#define OSD_LOGO_MAGIC_NUMBER   (0x4fe182af) /* unicode: 信芯 */
#define OSD_LOGO_VERSION        (1)

/* OSD Panel attribute start */
USHORT16 Hv_Mw_OsdGetPanelHActive(VOID);
USHORT16 Hv_Mw_OsdGetPanelVActive(VOID);
#define _PANEL_OSD_H_ACTIVE                 Hv_Mw_OsdGetPanelHActive()
#define _PANEL_OSD_V_ACTIVE                 Hv_Mw_OsdGetPanelVActive()

#if (HV_PROJECT_CONFIG_OSD_SCALER == HV_CONFIG_ON)

#if (defined(CONFIG_USER_PANEL_RESOLUTION_TYPE_UHD) && (HV_OSD_CONFIG_EXTRA_DDR_BUFFER == HV_CONFIG_ON))
#define PANEL_OSD_H_ACTIVE                  (HV_OSD_CONFIG_EXTRA_BUFFER_HACTIVE)
#define PANEL_OSD_V_ACTIVE                  (HV_OSD_CONFIG_EXTRA_BUFFER_VACTIVE)
#else
#define PANEL_OSD_H_ACTIVE                  (_PANEL_OSD_H_ACTIVE / 2)
#define PANEL_OSD_V_ACTIVE                  (_PANEL_OSD_V_ACTIVE / 2)
#endif

#else

#define PANEL_OSD_H_ACTIVE                  (_PANEL_OSD_H_ACTIVE)
#define PANEL_OSD_V_ACTIVE                  (_PANEL_OSD_V_ACTIVE)

#endif

/* 通过 Hv_Drv_OsdSetPanelHtotal 动态屏参 */
//#define PANEL_OSD_H_TOTAL     (PANEL_H_TOTAL_TYP - 4)
#define PANEL_OSD_V_TOTAL     (PANEL_OSD_V_ACTIVE + 10)


#if (HV_PROJECT_CONFIG_OSD_ROTATION == HV_CONFIG_ON)
#define HV_OSD_CONFIG_ROTATION_H_ACTIVE                     (PANEL_OSD_H_ACTIVE / 2)
#define HV_OSD_CONFIG_ROTATION_V_ACTIVE                     (PANEL_OSD_V_ACTIVE / 2)
#endif

#if (HV_PROJECT_CONFIG_OSD_GRAPHIC == HV_CONFIG_ON)
#if (HV_OSD_CONFIG_GRAPHIC_FORMAT == 0)
#define HV_OSD_CONFIG_GRAPHIC_PIXEL_BYTES                       4
#elif (HV_OSD_CONFIG_GRAPHIC_FORMAT == 1)
#define HV_OSD_CONFIG_GRAPHIC_PIXEL_BYTES                       2
#elif (HV_OSD_CONFIG_GRAPHIC_FORMAT == 2)
#define HV_OSD_CONFIG_GRAPHIC_PIXEL_BYTES                       2
#elif (HV_OSD_CONFIG_GRAPHIC_FORMAT == 5)
#define HV_OSD_CONFIG_GRAPHIC_PIXEL_BYTES                       3
#else
#error "OSD GRAPHIC format not supported"
#endif

#define HV_OSD_CONFIG_GRAPHIC_H_ACTIVE                      (PANEL_OSD_H_ACTIVE / 2)
#define HV_OSD_CONFIG_GRAPHIC_V_ACTIVE                      (PANEL_OSD_V_ACTIVE / 2)
#endif
/* OSD Panel attribute end */

/* 动态组件属性标志：uiDynamicFlag */
#define DYN_STATE_COLOR     (BIT_0)     //状态颜色，Item与cursor内部组件自动生成
#define DYN_POSITION        (BIT_1)     //位置，cursor内部组件自动生成，ItemDynamicPos打开时，内部组件自动生成
#define DYN_X               (BIT_2)     //位置X（与userdata相关）
#define DYN_Y               (BIT_3)     //位置Y（与userdata相关）
#define DYN_WIDTH           (BIT_4)     //宽（与userdata相关）
#define DYN_HEIGHT          (BIT_5)     //高（与userdata相关）
#define DYN_RESOURCE        (BIT_6)     //资源
#define DYN_COLOR           (BIT_7)     //颜色
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
#define DYN_MIRROR          (BIT_8)     //镜像
#define DYN_ICON_REVERSE    (BIT_9)     //图标镜像
#endif
#define DYN_CUSTOM1         (BIT_10)    //用户自定义1
#define DYN_CUSTOM2         (BIT_11)    //用户自定义2
#define DYN_CUSTOM3         (BIT_12)    //用户自定义3

#define OSD_A(color)        ((UCHAR8)(color >> 24) & 0xFF)
#define OSD_R(color)        ((UCHAR8)(color) & 0xFF)
#define OSD_G(color)        ((UCHAR8)(color >> 8) & 0xFF)
#define OSD_B(color)        ((UCHAR8)(color >> 16) & 0xFF)

typedef enum _OsdUniversalAlphaType
{
    OSD_UNIVERSAL_ALPHA_TYPE_ALL = 0,
    OSD_UNIVERSAL_ALPHA_TYPE_EXCLUDE_FONT,
    OSD_UNIVERSAL_ALPHA_TYPE_NON_UNIVERSAL,
} OsdUniversalAlphaType;

typedef struct _OsdInfoMap
{
    USHORT16 usItemId;
    USHORT16 usInfoStringId;
} OsdInfoMap;

typedef enum _OsdWindowPhyId
{
    PHY_WIN_0,
    PHY_WIN_1,
    PHY_WIN_2,
    PHY_WIN_3,
    PHY_WIN_RECT_0,
    PHY_WIN_RECT_1,
    PHY_WIN_ID_MAX,
    PHY_GRAPHIC = PHY_WIN_ID_MAX,
} OsdWindowPhyId;

typedef enum _OsdResourceSize
{
    OSD_RESOURCE_SIZE_8X8 = 0,
    OSD_RESOURCE_SIZE_12X12 = 1,
    OSD_RESOURCE_SIZE_12X14 = 2,
    OSD_RESOURCE_SIZE_12X16 = 3,
    OSD_RESOURCE_SIZE_12X18 = 4,
    OSD_RESOURCE_SIZE_16X16 = 5,
    OSD_RESOURCE_SIZE_16X18 = 6,
    OSD_RESOURCE_SIZE_16X24 = 7,
    OSD_RESOURCE_SIZE_20X20 = 8,
    OSD_RESOURCE_SIZE_20X24 = 9,
    OSD_RESOURCE_SIZE_20X28 = 10,
    OSD_RESOURCE_SIZE_24X24 = 11,
    OSD_RESOURCE_SIZE_24X30 = 12,
    OSD_RESOURCE_SIZE_32X32 = 13,
    OSD_RESOURCE_SIZE_32X36 = 14,
    OSD_RESOURCE_SIZE_USERDEFINED = 15,
} OsdResourceSize;

#define OSD_RESOURCE_DEFINED_WIDTH_SHIFT    (4)
#define OSD_RESOURCE_DEFINED_HEIGHT_SHIFT   (9)

typedef enum _OsdResourceType
{
    OSD_RESOURCE_TYPE_1BIT = 0,
    OSD_RESOURCE_TYPE_2BIT,
    OSD_RESOURCE_TYPE_4BIT,
    OSD_RESOURCE_TYPE_6BIT,
    OSD_RESOURCE_TYPE_8BIT,
} OsdResourceType;

typedef enum _OsdRectPhyId
{
    PHY_WIN0_RECT_0,
    PHY_WIN0_RECT_1,
    PHY_WIN0_RECT_2,
    PHY_WIN0_RECT_3,
    PHY_WIN1_RECT_0,
    PHY_WIN1_RECT_1,
    PHY_WIN1_RECT_2,
    PHY_WIN1_RECT_3,
    PHY_WIN2_RECT_0,
    PHY_WIN2_RECT_1,
    PHY_WIN2_RECT_2,
    PHY_WIN2_RECT_3,
    PHY_WIN3_RECT_0,
    PHY_WIN3_RECT_1,
    PHY_WIN3_RECT_2,
    PHY_WIN3_RECT_3,
    PHY_RECT0_RECT_0,
    PHY_RECT0_RECT_1,
    PHY_RECT0_RECT_2,
    PHY_RECT0_RECT_3,
    PHY_RECT0_RECT_4,
    PHY_RECT0_RECT_5,
    PHY_RECT0_RECT_6,
    PHY_RECT0_RECT_7,
    PHY_RECT1_RECT_0,
    PHY_RECT1_RECT_1,
    PHY_RECT1_RECT_2,
    PHY_RECT1_RECT_3,
    PHY_RECT1_RECT_4,
    PHY_RECT1_RECT_5,
    PHY_RECT1_RECT_6,
    PHY_RECT1_RECT_7,
    PHY_RECT_ID_MAX,
} OsdRectPhyId;

typedef enum _OsdGridPhyId
{
    PHY_WIN0_GRID_0,
    PHY_WIN0_GRID_1,
    PHY_WIN1_GRID_0,
    PHY_WIN1_GRID_1,
    PHY_WIN2_GRID_0,
    PHY_WIN2_GRID_1,
    PHY_WIN3_GRID_0,
    PHY_WIN3_GRID_1,
    PHY_RECT0_GRID_0,
    PHY_RECT0_GRID_1,
    PHY_RECT1_GRID_0,
    PHY_RECT1_GRID_1,
    PHY_GRID_ID_MAX,
} OsdGridPhyId;

typedef enum _OsdLinePhyId
{
    PHY_WIN0_LINE_0,
    PHY_WIN0_LINE_1,
    PHY_WIN1_LINE_0,
    PHY_WIN1_LINE_1,
    PHY_WIN2_LINE_0,
    PHY_WIN2_LINE_1,
    PHY_WIN3_LINE_0,
    PHY_WIN3_LINE_1,
    PHY_RECT0_LINE_0,
    PHY_RECT0_LINE_1,
    PHY_RECT1_LINE_0,
    PHY_RECT1_LINE_1,
    PHY_LINE_ID_MAX,
} OsdLinePhyId;

typedef enum _OsdStrAlignType
{
    OSD_STRING_ALIGN_LEFT = 0,
    OSD_STRING_ALIGN_CENTER,
    OSD_STRING_ALIGN_RIGHT,
} OsdStrAlignType;

typedef enum _OsdRectBorderType
{
    OSD_BORDER_2D = 0,
    OSD_BORDER_3D,
    OSD_BORDER_MAX
} OsdRectBorderType;

typedef enum _OsdRectShadowType
{
    OSD_SHADOW_BOTTOM_RIGHT = 0,
    OSD_SHADOW_TOP_RIGHT,
    OSD_SHADOW_BOTTOM_LEFT,
    OSD_SHADOW_TOP_LEFT,
    OSD_SHADOW_MAX
} OsdRectShadowType;

typedef enum _OsdRegionType
{
    OSD_REGION_NO_HIGHLIGHT = 0,
    OSD_REGION_HIGHLIGHT,
    OSD_REGION_MAX
} OsdRegionType;

typedef enum _OsdGradientType
{
    OSD_GRADIENT_LEFT_RIGHT = 0,
    OSD_GRADIENT_TOP_BOTTOM,
    OSD_GRADIENT_CENTER_BORDER,
    OSD_GRADIENT_BORDER_CENTER,
    OSD_GRADIENT_LEFT_RIGHT_RGBINVERT,
    OSD_GRADIENT_TOP_BOTTOM_RGBINVERT,
    OSD_GRADIENT_CENTER_BORDER_RGBINVERT,
    OSD_GRADIENT_BORDER_CENTER_RGBINVERT,
    OSD_GRADIENT_MAX
} OsdGradientType;

typedef enum _OsdHighLightAxisMode
{
    ALL_MATCH = 0,
    BIT0_MATCH,
    MATCH_MAX
} OsdHighLightAxisMode;

typedef enum _OsdHighlightMode
{
    OSD_HIGHLIGHT_H_AND_V = 0,
    OSD_HIGHLIGHT_H_OR_V,
    OSD_HIGHLIGHT_H_ONLY,
    OSD_HIGHLIGHT_V_ONLY,
    OSD_HIGHLIGHT_MAX
} OsdHighLightMode;

typedef struct _OsdText
{
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth        : 12; /* 对齐框的宽度 */
    USHORT16 usAlignType    : 2;  /* 对齐方式 */
    USHORT16 usIsLongText   : 1;
    USHORT16 usReserved     : 1;
#if (HV_PROJECT_CONFIG_OSD_TEXT_WRAPPING == HV_CONFIG_ON)
    UCHAR8 ucWrapMaxRows;
    UCHAR8 ucWrapRowSpace;
#endif
    UCHAR8 ucWindowIndex;
    UCHAR8 ucColorIndex;
    UCHAR8 ucBlockID;
    USHORT16 usStringId;
    UINT32 uiDynamicFlag    : 24;
    UINT32 uiDynamicIndex   : 8;
} OsdText;

typedef struct _OsdTextList
{
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth        : 12; /* 对齐框的宽度 */
    USHORT16 usAlignType    : 2;  /* 对齐方式 */
    USHORT16 usIsLongText   : 1;
    USHORT16 usReserved     : 1;
    UCHAR8 ucWindowIndex;
    UCHAR8 ucColorIndex;
    const USHORT16 *pusStringIDList;
    UCHAR8 ucStringNum;
    UCHAR8 ucStringCurID;
    UCHAR8 ucBlockID;
    UINT32 uiDynamicFlag    : 24;
    UINT32 uiDynamicIndex   : 8;
} OsdTextList;

typedef struct _OsdNumber
{
    UCHAR8 ucBlockID;
    UCHAR8 ucWindowIndex;
    UCHAR8 ucColorIndex;
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth            : 12; /* 对齐框的宽度 */
    USHORT16 usAlignType        : 2;  /* 对齐方式 */
    USHORT16 usShowSignSymbol   : 1;
    USHORT16 usIsLongText       : 1;
    INT32 iValue;
    UINT32 uiDynamicFlag        : 24;
    UINT32 uiDynamicIndex       : 8;
} OsdNumber;

typedef struct _OsdAsciiString
{
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth        : 11; /* 对齐框的宽度 */
    USHORT16 usAlignType    : 2;  /* 对齐方式 */
    USHORT16 usIsLongText   : 1;
#if (HV_PROJECT_CONFIG_OSD_BIGFONT_SUPPORT == HV_CONFIG_ON)
    USHORT16 usIsBigIconFont  : 1;
    USHORT16 usIsBigBmpFont : 1;
#else
    USHORT16 usReserved     : 2;
#endif
#if (HV_PROJECT_CONFIG_OSD_TEXT_WRAPPING == HV_CONFIG_ON)
    UCHAR8 ucWrapMaxRows;
    UCHAR8 ucWrapRowSpace;
#endif
    UCHAR8 ucWindowIndex;
    USHORT16 ucColorIndex;
    USHORT16 ausString[OSD_ASCII_STRING_LENGTH_MAX];
    UCHAR8 ucStringLength;
    UCHAR8 ucBlockID;
    UINT32 uiDynamicFlag    : 24;
    UINT32 uiDynamicIndex   : 8;
} OsdAsciiString;

typedef struct  _OsdIcon
{
    USHORT16 usX;
    USHORT16 usY;
    UCHAR8 ucHCount;
    UCHAR8 ucVCount;
    USHORT16 usIconOffset;
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
    USHORT16 usReverseIconOffset;
#endif
    UCHAR8 ucBlockID;
    UCHAR8 ucWindowIndex;
    UCHAR8 ucColorIndex;
    USHORT16 usIconCount;
#if (HV_PROJECT_CONFIG_OSD_CPU_CANVAS_SUPPORT == HV_CONFIG_ON)
    UINT32 uiDynamicFlag    : 23;
    UINT32 uiIsCPUCanvas    : 1;
#else
    UINT32 uiDynamicFlag    : 24;
#endif
    UINT32 uiDynamicIndex   : 8;
} OsdIcon;

typedef struct  _OsdIconAttr
{
    USHORT16 usIconOffset;
    USHORT16 usIconCount;
} OsdIconAttr;

typedef struct  _OsdIconList
{
    USHORT16 usX;
    USHORT16 usY;
    UCHAR8 ucHCount;
    UCHAR8 ucVCount;
    UCHAR8 ucBlockID;
    UCHAR8 ucIconCurID;
    const OsdIconAttr *pstIconList;
    UCHAR8 ucIconNum;
    UCHAR8 ucWindowIndex;
    UCHAR8 ucColorIndex;
    UINT32 uiDynamicFlag    : 24;
    UINT32 uiDynamicIndex   : 8;
} OsdIconList;

typedef struct  _OsdBmp
{
    USHORT16 usX;
    USHORT16 usY;
    UCHAR8 ucHCount;
    UCHAR8 ucVCount;
    USHORT16 usBMPOffset;
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
    USHORT16 usReverseBMPOffset;
#endif
    UCHAR8 ucBlockID;
    UCHAR8 ucWindowIndex;
    USHORT16 usPaletteOffset; /* 存放每块对应的palette偏移*/
    USHORT16 usBmpCount;
#if (HV_PROJECT_CONFIG_OSD_CPU_CANVAS_SUPPORT == HV_CONFIG_ON)
    UINT32 uiDynamicFlag    : 23;
    UINT32 uiIsCPUCanvas    : 1;
#else
    UINT32 uiDynamicFlag    : 24;
#endif
    UINT32 uiDynamicIndex   : 8;
} OsdBmp;

typedef struct  _OsdBmpAttr
{
    USHORT16 usBMPOffset;
    USHORT16 usPaletteOffset; /* 存放每块对应的palette偏移*/
    USHORT16 usBmpCount;
} OsdBmpAttr;

typedef struct  _OsdBmpList
{
    USHORT16 usX;
    USHORT16 usY;
    UCHAR8 ucHCount;
    UCHAR8 ucVCount;
    UCHAR8 ucBlockID;
    UCHAR8 ucBmpCurID;
    const OsdBmpAttr *pstBmpList;
    UCHAR8 ucBmpNum;
    UCHAR8 ucWindowIndex;
    UINT32 uiDynamicFlag    : 24;
    UINT32 uiDynamicIndex   : 8;
} OsdBmpList;

typedef struct _OsdGraphic
{
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth;
    USHORT16 usHeight;
    UCHAR8 ucWindowIndex;
    UCHAR8 ucFormat         : 3;
    UCHAR8 ucGraphicID      : 3;
    UCHAR8 ucSetAlpha       : 1;
    UCHAR8 ucCompressed     : 1;
    UCHAR8 ucAlpha;
    UCHAR8 ucColorKeyEn;
    UINT32 uiColorKey;
    UINT32 uiColor;
    UINT32 uiDynamicFlag    : 24;
    UINT32 uiDynamicIndex   : 8;
} OsdGraphic;

typedef struct _OsdGraphicAddition
{
    BOOL bIsAddition;
    UINT32 uiAdditionAddr;
    UINT32 uiAdditionSize;
} OsdGraphicAddition;

typedef struct _OsdBorder
{
    UCHAR8 ucBorderEnable   : 1;
    UCHAR8 ucBorderType     : 7;
    UCHAR8 ucSizeY          : 4;
    UCHAR8 ucSizeX          : 4;
    USHORT16 usColor0;
    USHORT16 usColor1;
    USHORT16 usColor2;
    USHORT16 usColor3;
} OsdBorder;

typedef struct _OsdShadow
{
    UCHAR8 ucShadowEnable   : 1;
    UCHAR8 ucShadowType     : 7;
    UCHAR8 ucSizeY          : 4;
    UCHAR8 ucSizeX          : 4;
    USHORT16 usShadowColor;
} OsdShadow;

typedef struct _OsdGradient
{
    UCHAR8 ucGradientEnable : 1;
    UCHAR8 ucGradientType   : 7;
    USHORT16 usStartColor;
    USHORT16 usEndColor;
    USHORT16 usStepR;
    USHORT16 usStepG;
    USHORT16 usStepB;
} OsdGradient;

typedef struct _OsdRectStyle
{
    OsdBorder stBorder;
    OsdShadow stShadow;
    OsdGradient stGrad;
} OsdRectStyle;

typedef struct _OsdRect
{
    UCHAR8 ucIndex;
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth;
    USHORT16 usHeight;
    UCHAR8 ucWindowIndex;
    UCHAR8 ucStyleIndex     : 7;    /* 索引样式，规定0为无sytle */
    UCHAR8 ucBgColorEnable  : 1;    /* 填充背景色使能 */
    USHORT16 usBgColor;
    UINT32 uiDynamicFlag    : 24;
    UINT32 uiDynamicIndex   : 8;
} OsdRect;

typedef struct _OsdAxisHighlight
{
    OsdHighLightAxisMode ucMode;
    UCHAR8 ucStartPos;
    UCHAR8 ucStopPos;
} OsdAxisHighlight;

typedef struct _OsdRectHighligh
{
    UCHAR8  ucHighlightMode;
    OsdAxisHighlight stHOption;
    OsdAxisHighlight stVOption;
    UCHAR8 ucHlStyleIndex       : 7; /* 样式index，规定0为无sytle */
    UCHAR8 ucBgColorEnable      : 1; /* 填充背景色使能 */
    USHORT16 usBgColor;
} OsdRectHighlight;

typedef struct _OsdRectGrid
{
    UCHAR8 ucIndex;
    UCHAR8 ucWindowIndex;
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth;
    USHORT16 usHeight;
    UCHAR8 ucRectHCount         : 4; /* 高4bit表示Vcount，低4bit表示Hcount*/
    UCHAR8 ucRectVCount         : 4;
    UCHAR8 ucRectHSpace;
    UCHAR8 ucRectVSpace;
    UCHAR8 ucNonHlStyleIndex    : 7; /* 索引样式，规定0为无sytle */
    UCHAR8 ucBgColorEnable      : 1; /* 填充背景色使能 */
    USHORT16 usBgColor;
    UCHAR8 ucHlOptionIndex;          /* 规定0为无高亮区*/
    UINT32 uiDynamicFlag        : 24;
    UINT32 uiDynamicIndex       : 8;
} OsdRectGrid;

typedef struct _OsdLine
{
    UCHAR8 ucIndex;
    UCHAR8 ucWindowIndex;
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth;
    USHORT16 usHeight;
    UCHAR8 ucBgColorEnable; /* 填充背景色使能 */
    USHORT16 usBgColor;
    USHORT16 usBorderColor;
    UINT32 uiDynamicFlag        : 24;
    UINT32 uiDynamicIndex       : 8;
} OsdLine;

typedef struct _OsdLineHighlight
{
    UCHAR8  ucHighlightMode;
    OsdAxisHighlight stHOption;
    OsdAxisHighlight stVOption;
    UCHAR8 ucBgColorEnable; /* 填充背景色使能 */
    USHORT16 usBgColor;
    USHORT16 usBorderColor;
} OsdLineHighlight;

typedef struct _OsdLineGrid
{
    UCHAR8 ucIndex;
    UCHAR8 ucWindowIndex;
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth;
    USHORT16 usHeight;
    UCHAR8 ucLineHCount         : 4; /* 高4bit表示Vcount，低4bit表示Hcount*/
    UCHAR8 ucLineVCount         : 4;
    UCHAR8 ucLineHSpace;
    UCHAR8 ucLineVSpace;
    UCHAR8 ucBgColorEnable;         /* 填充背景色使能 */
    USHORT16 usBgColor;
    USHORT16 usBorderColor;
    UCHAR8 ucHlOptionIndex;         /* 规定0为无高亮区 */
    UINT32 uiDynamicFlag        : 24;
    UINT32 uiDynamicIndex       : 8;
} OsdLineGrid;

/* 组件类型 */
typedef enum _OsdComponentType
{
    OSD_CP_TYPE_NONE,
    OSD_CP_TYPE_TEXT,
    OSD_CP_TYPE_TEXT_LIST,
    OSD_CP_TYPE_NUMBER,
    OSD_CP_TYPE_INTACT_NUMBER,
    OSD_CP_TYPE_ASCII_STRING,
    OSD_CP_TYPE_ICON,
    OSD_CP_TYPE_ICON_LIST,
    OSD_CP_TYPE_BMP,
    OSD_CP_TYPE_BMP_LIST,
#if (HV_PROJECT_CONFIG_OSD_CUSTOM_GROUP_SUPPORT == HV_CONFIG_ON)
    OSD_CP_TYPE_CUSTOM_GROUP,
#endif
    /* FONT type must before here */
    OSD_CP_TYPE_RECT,
    OSD_CP_TYPE_RECTGRID,
    OSD_CP_TYPE_LINEGRID,
    OSD_CP_TYPE_LINE,
    OSD_CP_TYPE_GRAPHIC,
    OSD_CP_TYPE_MAX,
} OsdComponentType;

typedef struct _OsdComponent
{
    /* 组件类型：OsdComponentType */
    USHORT16 enType     : 5;
    /* 组件序号 */
    USHORT16 usIndex    : 11;
} OsdComponent;

typedef struct _OsdBox
{
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usW;
    USHORT16 usH;
    USHORT16 usRealWidth;
    USHORT16 usIndex;
} OsdBox;

#if (HV_PROJECT_CONFIG_OSD_MARQUEE == HV_CONFIG_ON)
typedef enum _OsdMarqueeDirection
{
    OSD_MARQUEE_LEFT = 0,
    OSD_MARQUEE_RIGHT,
} OsdMarqueeDirection;

typedef enum _OsdMarqueeType
{
    /* disable marquee */
    OSD_MARQUEE_TYPE_NONE = 0,

    /* |ABCDE    | -> |BCDE    A| */
    OSD_MARQUEE_TYPE_CYCLING_LEFT,
    /* |    ABCDE| -> |E    ABCD| */
    OSD_MARQUEE_TYPE_CYCLING_RIGHT,

    /* */
    OSD_MARQUEE_TYPE_SCROLLING_LEFT,
    /* */
    OSD_MARQUEE_TYPE_SCROLLING_RIGHT,

    OSD_MARQUEE_TYPE_SLIDING_LEFT,
    OSD_MARQUEE_TYPE_SLIDING_RIGHT,

    /* Used for text list animation */
    OSD_MARQUEE_TYPE_SLIDING_NEXT,

    /* Pseudo type used for width excessed component marquee */
    OSD_MARQUEE_TYPE_DEFAULT,
    OSD_MARQUEE_TYPE_MAX,
} OsdMarqueeType;

struct _OsdMarqueeNode;
#endif

typedef struct _OsdComponentNode
{
    /* 下一个组件 */
    struct _OsdComponentNode* pstNext;
    /* 组件属性数据 */
    VOID* pvCpData;
    /* 组件属性数据 */
    VOID* pvDynamicData;

    VOID *pstRowInfo;
    /* 组件位置大小 */
    OsdBox stBox;
    /* 组件类型 */
    OsdComponent stCp;

    UCHAR8 ucFontCount : 7;
    UCHAR8 bInCustomGroup : 1;
#if (HV_OSD_CONFIG_FONT_AS_BACKGROUND == HV_CONFIG_ON)
    USHORT16 usBankSlot;
#endif

#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
    BOOL bIsMirrored;
#endif

#if (HV_PROJECT_CONFIG_OSD_MARQUEE == HV_CONFIG_ON)
    OsdMarqueeType enMarqueeType;
    BOOL bStartAfterCreate;
    struct _OsdMarqueeNode *pstMarquee;
#endif

} OsdComponentNode;

#define HV_OSD_CONFIG_CUSTOM_GROUP_MAX_COMPONENTS 16
typedef struct _OsdCustomGroup
{
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth        : 12;
    USHORT16 usAlignType    : 2;
    UCHAR8 ucComponentCount;
    UCHAR8 aucGapWidth[HV_OSD_CONFIG_CUSTOM_GROUP_MAX_COMPONENTS - 1];
    OsdComponent astComponents[HV_OSD_CONFIG_CUSTOM_GROUP_MAX_COMPONENTS];
} OsdCustomGroup;

typedef struct _OsdCustomGroupInfo
{
    USHORT16 usX;
    USHORT16 usY;
    USHORT16 usWidth        : 12;
    USHORT16 usAlignType    : 2;
    UCHAR8 ucComponentCount;
    UCHAR8 aucGapWidth[HV_OSD_CONFIG_CUSTOM_GROUP_MAX_COMPONENTS - 1];
    OsdComponentNode *apComponents[HV_OSD_CONFIG_CUSTOM_GROUP_MAX_COMPONENTS];
} OsdCustomGroupInfo;

typedef struct _OsdNodeHead
{
    /* 第一个组件 */
    OsdComponentNode* pstNode;
    /* 最后一个组件 */
    OsdComponentNode* pstLastNode;
    /* 当前显示的组件个数 */
    USHORT16 usTotalNum;
    /* 需要更新的组件个数（仅update window时有效） */
    USHORT16 usUpdateNum;

} OsdNodeHead;

typedef enum _OsdItemRelationship
{
    ITEM_PREV,
    ITEM_NEXT,
    ITEM_PARENT,
    ITEM_CHILD,
    ITEM_VALUE,
} OsdItemRelationship;

typedef enum _OsdItemState
{
    /* 普通 */
    OSD_ITEM_NORMAL,
    /* 正在聚焦 */
    OSD_ITEM_FOCUS,
    /* 聚焦保持 */
    OSD_ITEM_STAY,
    /* 被选中（用于设置选项） */
    OSD_ITEM_SELECT,
    /* 被选中且正在聚焦（用于设置选项） */
    OSD_ITEM_SELECT_FOCUS,
    /* 禁用 */
    OSD_ITEM_DISABLED,

    OSD_ITEM_STATE_NUM,
} OsdItemState;

typedef struct _OsdStateColor
{
    UCHAR8 ucNormalColor;
    UCHAR8 ucFocusColor;
    UCHAR8 ucStayColor;
    UCHAR8 ucSelectColor;
    UCHAR8 ucSelectFocusColor;
    UCHAR8 ucDisableColor;
} OsdStateColor;

typedef struct _OsdItemStyle
{
    const OsdComponent *pstNormal;
    const OsdComponent *pstFocus;
    const OsdComponent *pstStay;
    const OsdComponent *pstSelect;
    const OsdComponent *pstSelectFocus;
    const OsdComponent *pstDisable;
} OsdItemStyle;

typedef VOID(*OsdMenuOpsFn)(VOID);

typedef struct _OsdItemProp         OsdItemProp;
typedef struct _OsdWindowProp       OsdWindowProp;
typedef struct _OsdFramePartProp    OsdFramePartProp;
typedef struct _OsdSceneProp        OsdSceneProp;

typedef struct _OsdItem             OsdItem;
typedef struct _OsdWindow           OsdWindow;
typedef struct _OsdScene            OsdScene;

struct _OsdItemProp
{
    /* item的序号 */
    USHORT16 usItemId;
    /* item的X坐标 */
    USHORT16 usX;
    /* item的Y坐标 */
    USHORT16 usY;
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
    /* item的宽 */
    USHORT16 usWidth;
#endif
    /* item的菜单操作句柄 */
    OsdMenuOpsFn pfMenuOpsHandle;
    /* 上一个item的id */
    USHORT16 usPrevItemId;
    /* 下一个item的id */
    USHORT16 usNextItemId;
    /* Item的value item的id */
    USHORT16 usValueItemId;
    /* Item的父Item的id */
    USHORT16 usParentItemId;
    /* Item的首个子Item的id */
    USHORT16 usChildItemId;
    /* 对应的Userdata */
    USHORT16 usUserdata      : 9;
    /* 对应的Userdata Value */
    USHORT16 usUserdataValue : 6;
    /* 是否为Userdata Value */
    USHORT16 bIsValue        : 1;
    /* item对应的CommonStyleId */
    UCHAR8 ucCursorStyleId   : 7;
    /* item是否位置可变 */
    UCHAR8 ucIsDynamicPos    : 1;
};

struct _OsdWindowProp
{
    /* Window的物理Id */
    UCHAR8 ucWindowID                : 3;
    /* Window的背景使能 */
    UCHAR8 ucBgEnable                : 1;
    /* Window的边框使能 */
    UCHAR8 ucBorderEnable            : 1;
    /* Window的字符换行使能 */
    UCHAR8 ucPunctuatedEnable        : 1;
    UCHAR8 bIsBackground             : 1;
    /* Window的自定义字体索引 */
    UCHAR8 ucReserved    : 1;
    UCHAR8 ucFixColumns;
    /* Window的X坐标（工具提供相对与scene的位置，FW计算更新为绝对位置） */
    USHORT16 usX;
    /* Window的Y坐标（工具提供相对与scene的位置，FW计算更新为绝对位置） */
    USHORT16 usY;
    /* Window的宽 */
    USHORT16 usWidth;
    /* Window的高 */
    USHORT16 usHeight;
    /* Window的边框颜色 */
    USHORT16 usBgColor;
    /* Window的背景颜色 */
    USHORT16 usBorderColor;
};

struct _OsdFramePartProp
{
    /* FramePart中包含的CP组件列表 */
    const OsdComponent* pstCpList;
    /* FramePart内所包含的首个WindowId */
    UCHAR8 ucWindowStartId;
    /* FramePart包含的Window个数 */
    UCHAR8 ucWindowNum;
};

struct _OsdSceneProp
{
    /* Scene的X坐标（绝对位置） */
    USHORT16 usX;
    /* Scene的Y坐标（绝对位置） */
    USHORT16 usY;
    /* Scene的宽 */
    USHORT16 usWidth;
    /* Scene的高 */
    USHORT16 usHeight;
    /* Scene包含的首个itemId */
    USHORT16 usItemStartId;
    /* Scene包含Item数量 */
    USHORT16 usItemNum;
    /* Scene包含FramePart */
    OsdFramePartProp astFramePart[OSD_FRAME_PART_MAX];
    /* Scene包含FramePart数量 */
    UCHAR8 ucFramePartNum;
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
    /* RTL菜单时是否镜像 */
    BOOL bMirror;
#endif
};

struct _OsdItem
{
    /* item的X坐标（相对与window的位置） */
    USHORT16 usX;
    /* item的Y坐标（相对与window的位置） */
    USHORT16 usY;
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
    /* item的宽 */
    USHORT16 usWidth;
#endif
    /* ItemId */
    USHORT16 usId;
    /* 所属的SceneID */
    UCHAR8 ucSceneId;
    /* item的显示状态 */
    UCHAR8 ucState;
    /* item当前是否可见 */
    BOOL bVisable;
};

struct _OsdWindow
{
    /* 所属的Scene */
    OsdScene *pstScene;

    /* window中需要显示的一般组件链表 */
    OsdNodeHead stCpShowListHead;
    /* window中需要显示的font组件链表 */
    OsdNodeHead stFontShowListHead;
    /* window中需要删除的组件链表 */
    OsdNodeHead stDeleteListHead;
    /* window中需要删除的组件链表 */
    OsdNodeHead stFontDeleteListHead;

    /* Window的宽（画font需要） */
    USHORT16 usFontAreaWidth;
    /* 用户定义的一行的列的个数 */
    UCHAR8 ucFixColumns;
    /* WindowId */
    UCHAR8 ucId;
    UCHAR8 ucPhyId;
    /* window当前是否可见 */
    BOOL bVisable;
    /* window当前是否改变 */
    BOOL bModify;
};

struct _OsdScene
{
    /* Scene的X坐标 */
    USHORT16 usX;
    /* Scene的Y坐标 */
    USHORT16 usY;
    /* Scene的宽 */
    USHORT16 usWidth;
    /* Scene的高 */
    USHORT16 usHeight;
    /* SceneId */
    UCHAR8 ucId;
    /* 当前绘制FramePart序号 */
    UCHAR8 ucCurFrame;
    /* scene当前是否可见 */
    BOOL bVisable;
    /* scene当前是否改变 */
    BOOL bModify;
#if (HV_PROJECT_CONFIG_OSD_ROTATION == HV_CONFIG_ON)
    /* 是否不旋转 */
    BOOL bSkipRotate;
    /* scene绝对位置(不受旋转影响) */
    BOOL bAbsolutePostion;
    USHORT16 usAbsoluteX;
    USHORT16 usAbsoluteY;
#endif
#if (HV_PROJECT_CONFIG_OSD_MIRROR == HV_CONFIG_ON)
    /* RTL菜单时是否镜像 */
    BOOL bMirror;
#endif
};

/* 获取组件 */
#define COMPONENT(type, id)     ({ OsdComponent __component = {type, id}; __component; })
/* 对比是否为同一组件 */
#define CP_COMPARE(cp1, cp2)    ((cp1.enType == cp2.enType) && (cp1.usIndex == cp2.usIndex))
/* 判断是否为font类型组件 */
#define CP_IS_FONT(cp)          ((cp.enType > OSD_CP_TYPE_NONE) && (cp.enType < OSD_CP_TYPE_RECT))

extern OsdScene g_astOsdSceneArray[];
extern OsdWindow g_astOsdWindowArray[];
extern OsdItem g_astOsdItemArray[];
#define OSD_GET_SCENE(i)        (i < SCENE_ID_MAX ? &g_astOsdSceneArray[i] : NULL)
#define OSD_GET_WINDOW(i)       (i < WIN_ID_MAX ? &g_astOsdWindowArray[i] : NULL)
#define OSD_GET_ITEM(i)         (i < ITEM_ID_MAX ? &g_astOsdItemArray[i] : NULL)
#define ITEM_GET_SCENEID(i)     (i < ITEM_ID_MAX ? OSD_GET_ITEM(i)->ucSceneId : SCENE_ID_MAX)

extern const OsdSceneProp g_astScenePropArray[];
extern const OsdWindowProp g_astWindowPropArray[];
extern const OsdItemProp g_astItemPropArray[];

/* 获取Item属性数据地址 */
#define OSD_GET_SCENE_PROP(i)        (i < SCENE_ID_MAX ? &g_astScenePropArray[i] : NULL)
/* 获取Window属性数据地址 */
#define OSD_GET_WINDOW_PROP(i)       (i < WIN_ID_MAX ? &g_astWindowPropArray[i] : NULL)
/* 获取Scene属性数据地址 */
#define OSD_GET_ITEM_PROP(i)         (i < ITEM_ID_MAX ? &g_astItemPropArray[i] : NULL)

#define NEXT_ITEM(i)            (i < ITEM_ID_MAX ? g_astItemPropArray[i].usNextItemId : ITEM_NONE_ID)
#define PREV_ITEM(i)            (i < ITEM_ID_MAX ? g_astItemPropArray[i].usPrevItemId : ITEM_NONE_ID)
#define PARENT_ITEM(i)          (i < ITEM_ID_MAX ? g_astItemPropArray[i].usParentItemId : ITEM_NONE_ID)
#define CHILD_ITEM(i)           (i < ITEM_ID_MAX ? g_astItemPropArray[i].usChildItemId : ITEM_NONE_ID)
#define VALUE_ITEM(i)           (i < ITEM_ID_MAX ? g_astItemPropArray[i].usValueItemId : ITEM_NONE_ID)

extern const OsdText g_astTextPropArray[];
extern const OsdTextList g_astTextListPropArray[];
extern const OsdNumber g_astNumberPropArray[];
extern const OsdAsciiString g_astAsciiStringPropArray[];
extern const OsdIcon g_astIconPropArray[];
#if (HV_PROJECT_CONFIG_OSD_BIGFONT_SUPPORT == HV_CONFIG_ON)
extern const OsdIcon g_astIconPropBigFontArray[];
extern const USHORT16 g_usBigIconFontArrayLen;
extern const OsdBmp g_astBmpPropBigFontArray[];
extern const USHORT16 g_usBigBmpFontArrayLen;
#endif
extern const OsdIconList g_astIconListPropArray[];
extern const OsdBmp g_astBmpPropArray[];
extern const OsdBmpList g_astBmpListPropArray[];
#if (HV_PROJECT_CONFIG_OSD_CUSTOM_GROUP_SUPPORT == HV_CONFIG_ON)
extern const OsdCustomGroup g_astCustomGroupPropArray[];
#endif
extern const OsdGraphic g_astGraphicPropArray[];
extern const OsdRect g_astRectPropArray[];
extern const OsdRectGrid g_astRectGridPropArray[];
extern const OsdLineGrid g_astLineGridPropArray[];
extern const OsdLine g_astLinePropArray[];

#define OSD_GET_TEXT_PROP(i)            (i < TEXT_ID_MAX ? &g_astTextPropArray[i] : NULL)
#define OSD_GET_TEXT_LIST_PROP(i)       (i < TEXT_LIST_ID_MAX ? &g_astTextListPropArray[i] : NULL)
#define OSD_GET_NUMBER_PROP(i)          (i < NUMBER_ID_MAX ? &g_astNumberPropArray[i] : NULL)
#define OSD_GET_ASCII_STRING_PROP(i)    (i < ASCII_STRING_ID_MAX ? &g_astAsciiStringPropArray[i] : NULL)
#define OSD_GET_ICON_PROP(i)            (i < ICON_ID_MAX ? &g_astIconPropArray[i] : NULL)
#define OSD_GET_ICON_LIST_PROP(i)       (i < ICON_LIST_ID_MAX ? &g_astIconListPropArray[i] : NULL)
#define OSD_GET_BMP_PROP(i)             (i < BMP_ID_MAX ? &g_astBmpPropArray[i] : NULL)
#define OSD_GET_BMP_LIST_PROP(i)        (i < BMP_LIST_ID_MAX ? &g_astBmpListPropArray[i] : NULL)
#if (HV_PROJECT_CONFIG_OSD_CUSTOM_GROUP_SUPPORT == HV_CONFIG_ON)
#define OSD_GET_CUSTOM_GROUP_PROP(i)    (i < GROUP_ID_MAX ? &g_astCustomGroupPropArray[i] : NULL)
#else
#define OSD_GET_CUSTOM_GROUP_PROP(i)    NULL
#endif
#define OSD_GET_GRAPHIC_PROP(i)         (i < GRAPHIC_ID_MAX ? &g_astGraphicPropArray[i] : NULL)
#define OSD_GET_RECT_PROP(i)            (i < RECT_ID_MAX ? &g_astRectPropArray[i] : NULL)
#define OSD_GET_RECTGRID_PROP(i)        (i < RECTGRID_ID_MAX ? &g_astRectGridPropArray[i] : NULL)
#define OSD_GET_LINEGRID_PROP(i)        (i < LINEGRID_ID_MAX ? &g_astLineGridPropArray[i] : NULL)
#define OSD_GET_LINE_PROP(i)            (i < LINE_ID_MAX ? &g_astLinePropArray[i] : NULL)

#define PHY_RECT_ID(i)                  (OSD_GET_RECT_PROP(i) ? OSD_GET_RECT_PROP(i)->ucIndex : PHY_RECT_ID_MAX)
#define PHY_RECTGRID_ID(i)              (OSD_GET_RECTGRID_PROP(i) ? OSD_GET_RECTGRID_PROP(i)->ucIndex : PHY_GRID_ID_MAX)
#define PHY_LINEGRID_ID(i)              (OSD_GET_LINEGRID_PROP(i) ? OSD_GET_LINEGRID_PROP(i)->ucIndex : PHY_LINE_ID_MAX)
#define PHY_LINE_ID(i)                  (OSD_GET_LINE_PROP(i) ? OSD_GET_LINE_PROP(i)->ucIndex : PHY_LINE_ID_MAX)

extern const OsdRectStyle g_astRectStyleArray[];
extern const OsdRectHighlight g_astRectHighlightArray[];
extern const OsdLineHighlight g_astLineHighlightArray[];

#define OSD_GET_RECT_STYLE(i)            (i < COMPONET_RECT_STYLE_NUM_MAX ? &g_astRectStyleArray[i] : NULL)
#define OSD_GET_RECTGRID_HIGHLIGHT(i)    (i < COMPONET_RECT_HIGHLIGHT_NUM_MAX ? &g_astRectHighlightArray[i] : NULL)
#define OSD_GET_LINEGRID_HIGHLIGHT(i)    (i < COMPONET_LINE_HIGHLIGHT_NUM_MAX ? &g_astLineHighlightArray[i] : NULL)

extern const OsdStateColor astOsdDynamicStateColor[];
extern const OsdItemStyle g_astCursorStyleList[];
extern const OsdItemStyle g_astItemStyleList[];

/* 获取组件名称 */
#define CP_NAME(component)          Hv_Mw_OsdGetComponentName(component)
/* 获取item名称 */
#define ITEM_NAME(id)               Hv_Mw_OsdGetItemName(id)
/* 获取scene名称 */
#define SCENE_NAME(id)              Hv_Mw_OsdGetSceneName(id)

#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_MIRROR)
BOOL bRTLShow;
#endif

/* Common Function Declaration */

/**
 * @brief 获取组件名称
 * @param[in] stComponent  组件结构
 * @return CHAR8 *  组件名称字符串
 */
const CHAR8 *Hv_Mw_OsdGetComponentName(OsdComponent stComponent);

/**
 * @brief 获取item名称
 * @param[in] usItemId  item索引
 * @return CHAR8 *  item名称字符串
 */
const CHAR8 *Hv_Mw_OsdGetItemName(USHORT16 usItemId);

/**
 * @brief 获取scene名称
 * @param[in] ucSceneId  scene索引
 * @return CHAR8 *  scene名称字符串
 */
const CHAR8 *Hv_Mw_OsdGetSceneName(UCHAR8 ucSceneId);

/**
 * @brief 获取CommonStyle组件列表
 * @param[in] ucCursorStyleId
 * @param[in] enState
 * @return OsdComponent  组件列表指针
 */
const OsdComponent* Hv_Mw_OsdGetCursorStyle(UCHAR8 ucCursorStyleId, OsdItemState enState);

/**
 * @brief 获取ItemStyle组件列表
 * @param[in] usItemId
 * @param[in] enState
 * @return OsdComponent  组件列表指针
 */
const OsdComponent* Hv_Mw_OsdGetItemStyle(USHORT16 usItemId, OsdItemState enState);

/**
 * @brief 获取Component类型大小
 * @param[in] enType  组件类型
 * @return UINT32  组件类型大小
 */
UINT32 Hv_Mw_OsdGetComponentPropSize(OsdComponentType enType);

/**
 * @brief 获取Component属性数据地址
 * @param[in] stCp  组件类型结构
 * @return UINT32  组件属性数据地址
 */
UINT32 Hv_Mw_OsdGetComponentPropAddr(OsdComponent stCp);

/**
 * @brief 获取状态color index
 * @param[in] ucColorChoose
 * @param[in] ucState
 * @return UCHAR8  对应状态的 color index
 */
UCHAR8 Hv_Mw_OsdGetDynamicStateColor(UCHAR8 ucColorChoose, UCHAR8 ucState);

/**
 * @brief 获取Rect类型组件的Style
 * @param[in] ucStyleIndex
 * @return OsdRectStyle  Rect类型组件的Style指针
 */
const OsdRectStyle* Hv_Mw_OsdGetRectStyle(UCHAR8 ucStyleIndex);

/**
 * @brief 获取Rect类型组件的高亮Style
 * @param[in] ucHlOptionIndex
 * @return OsdRectHighlight  Rect类型组件的高亮Style指针
 */
const OsdRectHighlight* Hv_Mw_OsdGetRectHl(UCHAR8 ucHlOptionIndex);

/**
 * @brief 获取Line类型组件的高亮Style
 * @param[in] ucHlOptionIndex
 * @return OsdLineHighlight  Line类型组件的高亮Style指针
 */
const OsdLineHighlight* Hv_Mw_OsdGetLineHl(UCHAR8 ucHlOptionIndex);

#endif
