/**
 * @file hv_drv_OsdEffect.h
 * @brief Osd driver layer font effect interface.
 * @verbatim
 * ==============================================================================
 *                        ##### How to use this driver #####
 * ==============================================================================
 * (+) Use Hv_Drv_OsdEffect_StartFadeInOut(...) to execute fade in/out effect.
 * (+) Use Hv_Drv_OsdEffect_StartShutterInOut(...) to execute shutter in/out effect.
 * (+) Use Hv_Drv_OsdEffect_SetBlinkEnable(...) to set row blink effect.
 * @endverbatim
 *
 * @author HiView SoC Software Team
 * @version 0.0.1
 * @date 2022-08-22
 */

#ifndef __HV_DRV_OSDEFFECT_H
#define __HV_DRV_OSDEFFECT_H

#include "hv_mw_OsdComm.h"
#include "hv_drv_OsdTypes.h"
/*
 * 百叶窗多少行为一段
 *
 * 可以设置的值为 16、32、64、128
 */
#define OSD_SHUTTER_SEGMENT 64

/*
 * 百叶窗每次增加几行
 *
 * 可以设置的值为 1~255
 */
#define OSD_SHUTTER_STEP 4

/**
 * @brief set time in ms of one blink period
 * @param[in] enId window index to which apply blink effect
 * @param[in] usMs time in ms of one blink period
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_SetBlinkPeriod(OsdWindowPhyId enId, USHORT16 usMs);

/**
 * @brief set blink duration
 * @param[in] enId window index to which apply blink effect
 * @param[in] enDuty blink duration OSD_BLINK_DUTY_25: stay 25% percent of time
 *                                  OSD_BLINK_DUTY_50: stay 50% percent of time
 *                                  OSD_BLINK_DUTY_75: stay 75% percent of time
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_SetBlinkDuration(OsdWindowPhyId enId, OsdBlinkDuty enDuty);

/**
 * @brief set blink effect by row Y-axis
 * @param[in] enId window index to which apply blink effect
 * @param[in] usY Y-axis value of the row
 * @param[in] bEnable enable or disable blink effect
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_SetBlinkEnable(OsdWindowPhyId enId, USHORT16 usY, BOOL bEnable);

/**
 * @brief set total time to execute fade effect
 * @param[in] enId window index to which apply fade effect
 * @param[in] usMs time in ms to execute fade effect
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_SetFadeInOutSpeed(OsdWindowPhyId enId, USHORT16 usMs);

/**
 * @brief start to execute font fade in/out effect
 * @param[in] enId window index of which to apply fade effect
 * @param[in] bIsShowing fade-in or fade-out
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_StartFadeInOut(OsdWindowPhyId enId, BOOL bIsShowing);

/**
 * @brief set total time to execute shutter effect
 * @param[in] enId window index to which apply shutter effect
 * @param[in] usMs time in ms to execute shutter effect
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_SetShutterSpeed(OsdWindowPhyId enId, USHORT16 usMs);

/**
 * @brief start to execute font shutter in/out effect
 * @param[in] enId window index to which apply shutter effect
 * @param[in] bIsShowing shutter-in or shutter-out
 * @param[in] enDirection OSD_TRANS_DI_V: V direction shutter
 *                        OSD_TRANS_DI_H: H direction shutter
 *                        OSD_TRANS_DI_V_H: H&V direction shutter
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_StartShutterInOut(OsdWindowPhyId enId, BOOL bIsShowing, OsdTransDirection enDirection);

/**
 * @brief set shutter2 effect
 * @param[in] enId window index to which apply shutter effect
 * @param[in] ucSpeed effect speed(pixels per frame)
 * @param[in] enDirection OSD_TRANS_DI_V: V direction shutter
 *                        OSD_TRANS_DI_H: H direction shutter
 *                        OSD_TRANS_DI_V_H: H&V direction shutter
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_SetShutter2(OsdWindowPhyId enId, UCHAR8 ucSpeed, OsdTransDirection enDirection);

/**
 * @brief disable trans effect
 * @param[in] enId window index to which apply shutter effect
 * @return VOID without return
 */
VOID Hv_Drv_OsdEffect_DisableTranMode(OsdWindowPhyId enId);

#endif
