/**
 * @file hv_cal_OsdGrid.h
 * @brief Osd Cal layer grid interface.
 * @verbatim
 * ==============================================================================
 *                        ##### How to use this driver #####
 * ==============================================================================
 * @endverbatim
 *
 * @author HiView SoC Software Team
 * @version 0.0.1
 * @date 2022-08-22
 */

#ifndef _HV_CAL_OSDGRID_H
#define _HV_CAL_OSDGRID_H

#include "hv_comm_DataType.h"

/**
 * @brief set current grid
 * @param[in] grid index
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetCurrentGrid(OsdGridPhyId enIndex);

/**
 * @brief set rect enable/disable status
 * @param[in] enType highlight or non-highlight
 * @param[in] bEnable enable or disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetEnable(OsdRegionType enType, BOOL bEnable);

/**
 * @brief set grid position
 * @param[in] usX X-axis value
 * @param[in] usY Y-axis value
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetPos(USHORT16 usX, USHORT16 usY);

/**
 * @brief set rect number
 * @param[in] ucHnum rect number in H direction
 * @param[in] ucVnum rect number in V direction
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectNum(UCHAR8 ucHnum, UCHAR8 ucVnum);

/**
 * @brief set rect size
 * @param[in] usWidth width of rect
 * @param[in] usHeight height of rect
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectSize(USHORT16 usWidth, USHORT16 usHeight);

/**
 * @brief set space between rect
 * @param[in] ucHSpace space in H direction
 * @param[in] ucVSpace space in V direction
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetSpace(UCHAR8 ucHSpace, UCHAR8 ucVSpace);

/**
 * @brief set border enable/disable status
 * @param[in] enType highlight or non-highlight
 * @param[in] bEnable enable or disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectBorderEnable(OsdRegionType enType, BOOL bEnable);
/**
 * @brief set border type
 * @param[in] enType OSD_BORDER_2D: 2D border
 *                   OSD_BORDER_3D: 3D border
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectBorderType(OsdRectBorderType enType);

/**
 * @brief set border size
 * @param[in] ucSizeX X-axis value
 * @param[in] ucSizeY Y-axis value
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectBorderSize(UCHAR8 ucSizeX, UCHAR8 ucSizeY);

/**
 * @brief set border color
 * @param[in] enType highlight or non-highlight
 * @param[in] usTopColor top border color in RGB565 format
 * @param[in] usBottomColor bottom border color in RGB565 format
 * @param[in] usLeftColor left border color in RGB565 format
 * @param[in] usRightColor right border color in RGB565 format
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectBorderColor(OsdRegionType enType, USHORT16 usTopColor, USHORT16 usBottomColor, USHORT16 usLeftColor, USHORT16 usRightColor);

/**
 * @brief set shadow enable/disable status
 * @param[in] enType highlight or non-highlight
 * @param[in] bEnable enable or disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectShadowEnable(OsdRegionType enType, BOOL bEnable);

/**
 * @brief set shadow type
 * @param[in] enType shadow position selection OSD_SHADOW_BOTTOM_RIGHT
 *                                             OSD_SHADOW_TOP_RIGHT
 *                                             OSD_SHADOW_BOTTOM_LEFT
 *                                             OSD_SHADOW_TOP_LEFT
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectShadowType(OsdRectShadowType enType);

/**
 * @brief set shadow size
 * @param[in] ucSizeX X-axis value
 * @param[in] ucSizeY Y-axis value
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectShadowSize(UCHAR8 ucSizeX, UCHAR8 ucSizeY);

/**
 * @brief set shadow color
 * @param[in] enType highlight or non-highlight
 * @param[in] usColor shadow color in RGB565 format
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectShadowColor(OsdRegionType enType, USHORT16 usColor);

/**
 * @brief set background enable/disable status
 * @param[in] enType highlight or non-highlight
 * @param[in] bEnable enable or disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectBackgroundEnable(OsdRegionType enType, BOOL bEnable);

/**
 * @brief set gradient background enable/disable status
 * @param[in] enType highlight or non-highlight
 * @param[in] bEnable enable or disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectBackgroundGradientEnable(OsdRegionType enType, BOOL bEnable);

/**
 * @brief set background color
 * @param[in] enType highlight or non-highlight
 * @param[in] usStartColor start color in RGB565 format
 * @param[in] usEndColor end color in RGB565 format, only for gradient
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectBackgroundColor(OsdRegionType enType, USHORT16 usStartColor, USHORT16 usEndColor);

/**
 * @brief set gradient background type
 * @param[in] enType highlight or non-highlight
 * @param[in] enGradientType gradient type OSD_GRADIENT_LEFT_RIGHT: left to right
 *                                 OSD_GRADIENT_TOP_BOTTOM: top to bottom
 *                                 OSD_GRADIENT_CENTER_BORDER: center to border
 *                                 OSD_GRADIENT_BORDER_CENTER: border to center
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetRectGradientType(OsdRegionType enType, OsdGradientType enGradientType);

/**
 * @brief set gradient background step
 * @param[in] enType highlight or non-highlight
 * @param[in] usStepR step for R
 * @param[in] usStepG step for G
 * @param[in] usStepB step for B
 * @return VOID without return
 */

VOID Hv_Cal_OsdGrid_SetRectGradientStep(OsdRegionType enType, USHORT16 usStepR, USHORT16 usStepG, USHORT16 usStepB);

/**
 * @brief highlight mode in H direction
 * @param[in] enMode highlight mode ALL_MATCH: match range
 *                                  BIT0_MATCH: match lowest bit
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetHighlightHMode(OsdHighLightAxisMode enMode);

/**
 * @brief highlight mode in V direction
 * @param[in] enMode highlight mode ALL_MATCH: match range
 *                                  BIT0_MATCH: match lowest bit
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetHighlightVMode(OsdHighLightAxisMode enMode);

/**
 * @brief highlight selection in H direction
 * @param[in] ucHStartNum start count of rect
 * @param[in] ucHEndNum end count of rect
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetHighlightHRange(UCHAR8 ucHStartNum, UCHAR8 ucHEndNum);

/**
 * @brief highlight selection in V direction
 * @param[in] ucVStartNum start count of rect
 * @param[in] ucVEndNum end count of rect
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetHighlightVRange(UCHAR8 ucVStartNum, UCHAR8 ucVEndNum);

/**
 * @brief set grid highlight mode
 * @param[in] enMode highlight mode selection OSD_HIGHLIGHT_H_AND_V: H & V both match
 *                                            OSD_HIGHLIGHT_H_OR_V: H or V match
 *                                            OSD_HIGHLIGHT_H_ONLY: only match H
 *                                            OSD_HIGHLIGHT_V_ONLY: only match V
 * @return VOID without return
 */
VOID Hv_Cal_OsdGrid_SetHighlightMode(OsdHighLightMode enMode);

#endif
