| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- /** @file
- * Header file for GEL region handling API.
- *
- * @author mandy.wu 2010/03/30 (GEL_CreateRegionEx only on OSD layer2)
- * @version 0.1
- */
- #ifndef __GEL_REGION__
- #define __GEL_REGION__
- #include "gui_eng/stddefs.h"
- #include "gui_eng/gui_engine.h"
- #define GUI_MAX_REGIONS (12) // SUPPORT_OSD_REGION + SUPPORT_G2D_REGION in osd8600_hw.h
- /* Global variables for region handling */
- extern const UINT8 gRegions;
- extern RegionParams_t gRegionDetails[GUI_MAX_REGIONS];
- /**
- * Get current panel width and height.
- *
- * @param pwWidth The width of OSD plane.
- * @param pwHeight The height of OSD plane.
- */
- GUIResult_e GEL_GetOsdPlaneSize (UINT16 *pwWidth, UINT16 *pwHeight)__attribute__ ((warn_unused_result));
- /**
- * Resize the UI from the original size to the desired size.
- *
- * @param wWidth The original width of UI.
- * @param wHeight The original height of UI.
- * @param wTargetWidth The desired width of UI to be scaled.
- * @param wTargetHeight The desired height of UI to be scaled.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_ResizeUI(OSD_Layer_t osd_layer, UINT16 wWidth, UINT16 wHeight, UINT16 wTargetWidth,
- UINT16 wTargetHeight) __attribute__ ((warn_unused_result));
- /**
- * Get the region index from a window control.
- *
- * @param pWinCtrl Pointer to WinControl_t of a menu/popup.
- * @param pRegionIndex Return the region index of a win_control.
- * @return The region index belongs to a menu.
- */
- GUIResult_e GEL_GetRegionIndex(WinControl_t *pWinCtrl, UINT32 *pRegionIndex)__attribute__ ((warn_unused_result));
- /**
- * Create a region with the specific region index from UI resources.
- *
- * @param pRegionInfo Region information
- * @param dRegionIndex Region index
- * @param pRegionHandle Returned region handle.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_CreateRegion (RegionInfo_t *pRegionInfo, UINT32 dRegionIndex,
- RegionHandle_t* pRegionHandle)__attribute__ ((warn_unused_result));
- /**
- * Create a region on OSD layer1/2. Only support LUT8/ARGB4444/ARGB format regions.
- *
- * @param eLayer The region layer to be created.
- * @param eFormat Format of the region to be created.
- * @param wWidth Width(pixel) of the region to be created.
- * @param wHeight Height(pixel) of the region to be created.
- * @param pRegionHandle The returned region handle.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_CreateRegionEx(OSD_Layer_t eLayer, GEL_PixelFormat_e eFormat,
- UINT16 wWidth, UINT16 wHeight, RegionHandle_t * pRegionHandle)
- __attribute__ ((warn_unused_result));
- /**
- * Destroy a created region by its region handle.
- *
- * @param sdRegionHandle The region handle index of a region to be closed.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_CloseRegion (RegionHandle_t sdRegionHandle)__attribute__ ((warn_unused_result));
- /**
- * Get the region_handle from a region_index to a region_info array.
- *
- * @param pRegionInfo Region information
- * @param dRegionIndex Region index
- * @param pRegionHandle Returned region handle.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_GetRegionHandle(RegionInfo_t *pRegionInfo, INT32 sdRegionIndex,
- RegionHandle_t *pRegionHandle)__attribute__ ((warn_unused_result));
- /**
- * Move a region to the given x and y position.
- *
- * @param sdRegionHandle The region handle index of a region to be moved.
- * @param swXPos x coordinate to be moved to.
- * @param swYPos y coordinate to be moved to.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_MoveRegion (RegionHandle_t sdRegionHandle, INT16 swXPos, INT16 swYPos)__attribute__ ((warn_unused_result));
- /**
- * Change the region's palette to the given palette.
- *
- * @param sdRegionHandle The region handle index of a region to be moved.
- * @param pPal The pointer to a palette which is generated by uiDesign tool.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_SetRegionPal(RegionHandle_t sdRegionHandle, const PALENTRY *pPal)__attribute__ ((warn_unused_result));
- /**
- * Set a transparency value to an OSD region.
- *
- * @param sdRegionHandle The region handle index of an OSD region.
- * @param bTransValue The transparency value to be set to the OSD region.
- * @param bEnable Wether to enable the OSD region blend mode.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_SetRegionTransparency(RegionHandle_t sdRegionHandle, UINT8 bTransValue,
- BOOLEAN bEnable)__attribute__ ((warn_unused_result));
- /**
- * Get the position and width/height of a region related to an OSD/G2D plane.
- *
- * @param sdRegionHandle The region handle index of an OSD region.
- * @param pstRect Return the position and width/height coordinate of the region.
- * @return GUI_SUCCESS if succeed, error code otherwise.
- */
- GUIResult_e GEL_GetRegionArea(RegionHandle_t sdRegionHandle, PRECT pstRect)__attribute__ ((warn_unused_result));
- #endif /* __GEL_REGION__ */
|