hv_drv_OsdWindow.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /**
  2. * @file hv_drv_OsdWindow.h
  3. * @brief Osd driver layer window drawing interface.
  4. * @verbatim
  5. * ==============================================================================
  6. * ##### How to use this driver #####
  7. * ==============================================================================
  8. * (+) Use Hv_Drv_OsdWindow_(Draw/Update/Erase)Rect(...) to handle rect.
  9. * (+) Use Hv_Drv_OsdWindow_(Draw/Update/Erase)RectGrid(...) to handle rectgrid.
  10. * (+) Use Hv_Drv_OsdWindow_(Draw/Update/Erase)Line(...) to handle line.
  11. * (+) Use Hv_Drv_OsdWindow_(Draw/Update/Erase)LineGrid(...) to handle linegrid.
  12. * (+) Use Hv_Drv_OsdWindow_(Draw/Update/Erase)Window(...) to handle window.
  13. * @endverbatim
  14. *
  15. * @author HiView SoC Software Team
  16. * @version 0.0.1
  17. * @date 2022-08-22
  18. */
  19. #ifndef __HV_DRV_OSDWINDOW_H
  20. #define __HV_DRV_OSDWINDOW_H
  21. #include "hv_comm_DataType.h"
  22. #include "hv_mw_OsdComm.h"
  23. #include "hv_drv_OsdTypes.h"
  24. /**
  25. * @brief convert pixel format
  26. * @param[in] enSrcFormat source pixel format
  27. * @param[in] enDstFormat destination pixel format
  28. * @param[in] uiColor color value
  29. * @return color value of required format
  30. */
  31. UINT32 Hv_Drv_OsdWindow_PixelFormatConvert(OsdPixelFormat enSrcFormat, OsdPixelFormat enDstFormat, UINT32 uiColor);
  32. /**
  33. * @brief draw rect
  34. * @param[in] pstRect rect structure
  35. * @param[in] pstRectStyle rect style
  36. * @return VOID without return
  37. */
  38. VOID Hv_Drv_OsdWindow_DrawRect(OsdRect *pstRect, const OsdRectStyle *pstRectStyle);
  39. /**
  40. * @brief update rect
  41. * @param[in] pstRect rect structure
  42. * @param[in] pstRectStyle rect style
  43. * @return VOID without return
  44. */
  45. VOID Hv_Drv_OsdWindow_UpdateRect(OsdRect *pstRect, const OsdRectStyle *pstRectStyle);
  46. /**
  47. * @brief hide rect
  48. * @param[in] pstRect rect structure
  49. * @return VOID without return
  50. */
  51. VOID Hv_Drv_OsdWindow_EraseRect(OsdRect *pstRect);
  52. /**
  53. * @brief draw rectgrid
  54. * @param[in] pstGrid rectgrid structure
  55. * @param[in] pstNonHlRectStyle non-highlight rect style
  56. * @param[in] pstRectHighlight highlight options
  57. * @param[in] pstHlRectStyle highlight rect style
  58. * @return VOID without return
  59. */
  60. VOID Hv_Drv_OsdWindow_DrawRectGrid(OsdRectGrid* pstGrid,
  61. const OsdRectStyle *pstNonHlRectStyle,
  62. const OsdRectHighlight *pstRectHighlight,
  63. const OsdRectStyle *pstHlRectStyle);
  64. /**
  65. * @brief update rectgrid
  66. * @param[in] pstGrid rectgrid structure
  67. * @param[in] pstNonHlRectStyle non-highlight rect style
  68. * @param[in] pstRectHighlight highlight options
  69. * @param[in] pstHlRectStyle highlight rect style
  70. * @return VOID without return
  71. */
  72. VOID Hv_Drv_OsdWindow_UpdateRectGrid(OsdRectGrid* pstGrid,
  73. const OsdRectStyle *pstNonHlRectStyle,
  74. const OsdRectHighlight *pstRectHighlight,
  75. const OsdRectStyle *pstHlRectStyle);
  76. /**
  77. * @brief hide rectgrid
  78. * @param[in] pstGrid rectgrid structure
  79. * @return VOID without return
  80. */
  81. VOID Hv_Drv_OsdWindow_EraseRectGrid(OsdRectGrid* pstGrid);
  82. /**
  83. * @brief draw linegrid
  84. * @param[in] pstLineGrid linegrid structure
  85. * @param[in] pstLineHighlight highlight options
  86. * @return VOID without return
  87. */
  88. VOID Hv_Drv_OsdWindow_DrawLineGrid(OsdLineGrid* pstLineGrid, const OsdLineHighlight *pstLineHighlight);
  89. /**
  90. * @brief update linegrid
  91. * @param[in] pstLineGrid linegrid structure
  92. * @param[in] pstLineHighlight highlight options
  93. * @return VOID without return
  94. */
  95. VOID Hv_Drv_OsdWindow_UpdateLineGrid(OsdLineGrid* pstLineGrid, const OsdLineHighlight *pstLineHighlight);
  96. /**
  97. * @brief hide line grid
  98. * @param[in] pstLineGrid linegrid structure
  99. * @return VOID without return
  100. */
  101. VOID Hv_Drv_OsdWindow_EraseLineGrid(OsdLineGrid* pstLineGrid);
  102. /**
  103. * @brief draw line
  104. * @param[in] pstLine line structure
  105. * @return VOID without return
  106. */
  107. VOID Hv_Drv_OsdWindow_DrawLine(OsdLine* pstLine);
  108. /**
  109. * @brief update line
  110. * @param[in] pstLine line structure
  111. * @return VOID without return
  112. */
  113. VOID Hv_Drv_OsdWindow_UpdateLine(OsdLine* pstLine);
  114. /**
  115. * @brief hide line
  116. * @param[in] pstLine line structure
  117. * @return VOID without return
  118. */
  119. VOID Hv_Drv_OsdWindow_EraseLine(OsdLine* pstLine);
  120. /**
  121. * @brief get current window index
  122. * @param[in] None
  123. * @return current window index
  124. */
  125. OsdWindowPhyId Hv_Drv_OsdWindow_GetCurrentWindow(VOID);
  126. /**
  127. * @brief set current window index
  128. * @param[in] enIndex window index
  129. * @return VOID without return
  130. */
  131. VOID Hv_Drv_OsdWindow_SetCurrentWindow(OsdWindowPhyId enIndex);
  132. /**
  133. * @brief set all window font en
  134. * @param[in] bEnable enable
  135. */
  136. VOID Hv_Drv_OsdWindow_SetAllFontEnable(BOOL bEnable);
  137. /**
  138. * @brief disable rect/grid/line/font of all windows
  139. * @param[in] None
  140. * @return VOID without return
  141. */
  142. VOID Hv_Drv_OsdWindow_DisableAll(VOID);
  143. /**
  144. * @brief draw window
  145. * @param[in] pstWindowProp window property structure
  146. * @return VOID without return
  147. */
  148. VOID Hv_Drv_OsdWindow_DrawWindow(OsdWindowProp *pstWindowProp);
  149. /**
  150. * @brief update window property
  151. * @param[in] pstWindowProp window property structure
  152. * @return VOID without return
  153. */
  154. VOID Hv_Drv_OsdWindow_UpdateWindow(OsdWindowProp *pstWindowProp);
  155. /**
  156. * @brief hide window
  157. * @param[in] pstWindowProp window property structure
  158. * @return VOID without return
  159. */
  160. VOID Hv_Drv_OsdWindow_EraseWindow(OsdWindowProp *pstWindowProp);
  161. #endif