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


#ifndef __HV_DRV_OSDBLEND_H
#define __HV_DRV_OSDBLEND_H

typedef VOID (*pfBlendingCallback)(OsdBlendingStage enStage, VOID *pvArg1, VOID *pvArg2);

VOID Hv_Drv_OsdBlend_SetRectGroupAlpha(OsdWindowPhyId enWinID, UCHAR8 ucAlpha);
VOID Hv_Drv_OsdBlend_SetSwitch(OsdBlendingStage enStage, BOOL bSwitch);
VOID Hv_Drv_OsdBlend_SetAlphaSelect(OsdBlendingStage enStage, OsdAlphaSelectType enType, UCHAR8 ucValue);
VOID Hv_Drv_OsdBlend_SetAlphaOutput(OsdBlendingStage enStage, OsdAlphaOutputType enType, UCHAR8 ucValue);
VOID Hv_Drv_OsdBlend_SetAlphaOutputRatio(OsdBlendingStage enStage, BOOL bEnable, UCHAR8 ucValue);
VOID Hv_Drv_OsdBlend_SetBackground(OsdBlendingStage enStage, BOOL bEnable, USHORT16 usColor, UCHAR8 ucAlpha);
VOID Hv_Drv_OsdBlend_UniversalAlphaExcludeStage(OsdBlendingStage enStage, UINT32 uiParam);
VOID Hv_Drv_OsdBlend_UniversalAlphaExcludeClear(VOID);

/**
 * @brief set osd universal alpha type
 * @param[in] enType universal alpha type OSD_UNIVERSAL_ALPHA_TYPE_ALL: all have same alpha, include fonts
 *                                        OSD_UNIVERSAL_ALPHA_TYPE_EXCLUDE_FONT: all except fonts have same alpha
 * @param[in] ucAlpha alpha value to set
 * @return VOID without return
 */
VOID Hv_Drv_OsdBlend_SetUniversalAlpha(OsdUniversalAlphaType enType, UCHAR8 ucAlpha);

/**
 * @brief set blending type
 * @param[in] enStage blending stage OSD_BLENDING_STAGE_RECT_GROUP: rect/grid/line within window
 *                                   OSD_BLENDING_STAGE_RECT_FONT: rect-group/font within font window
 *                                   OSD_BLENDING_STAGE_WIN01: win0/win1
 *                                   OSD_BLENDING_STAGE_WIN23: win2/win3
 *                                   OSD_BLENDING_STAGE_WIN0123: win01/win23
 *                                   OSD_BLENDING_STAGE_WINRECT: win_rect0/win_rect1
 *                                   OSD_BLENDING_STAGE_WINALL: win_rect01/win_0123
 *                                   OSD_BLENDING_STAGE_GRAPHIC: winall/graphic
 * @param[in] enType blending type OSD_BLENDING_TYPE_NOBLENDING: no blend between two layers
 *                                 OSD_BLENDING_TYPE_BLENDING: blend between two layers
 * @param[in] ucAlpha alpha value
 * @return VOID without return
 */
VOID Hv_Drv_OsdBlend_SetBlendingType(OsdBlendingStage enStage, OsdBlendingType enType, UCHAR8 ucAlpha);

/**
 * @brief init blend options
 * @param[in] None
 * @return VOID without return
 */
VOID Hv_Drv_OsdBlend_Init(VOID);
#endif
