⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 osdwrap.h

📁 关于嵌入式PCB板UI的程序
💻 H
字号:
/*****************************************************************************

File Name: osdwrap.h

Description: osd operation configuration

COPYRIGHT (C) 2004 STMicroelectronics

*****************************************************************************/

/* Define to prevent recursive inclusion */
#ifndef __OSDWRAP_H
#define __OSDWRAP_H

/* Includes --------------------------------------------------------------- */

#include "stddefs.h"    /* STAPI includes */


/* Exported Types --------------------------------------------------------- */
typedef U32 STOSD_RegionHandle_t;

typedef enum STOSD_ColorType_e
{
	STOSD_COLOR_TYPE_PALETTE  = 1,
	STOSD_COLOR_TYPE_YCRCB888 = 2
} STOSD_ColorType_t;

typedef struct STOSD_RegionParams_s
{
	S32 PositionX;
	S32 PositionY;
	U32 Width;
	U32 Height;
	STOSD_ColorType_t ColorType;
	U8 NbBitsPerPel;
	U8 MixWeight;
	BOOL Recordable;
} STOSD_RegionParams_t;

typedef enum STOSD_BitmapType_e
{
	STOSD_BITMAP_TYPE_DIB            = 1,
	STOSD_BITMAP_TYPE_DIB_BYTE_ALIGN = 2
} STOSD_BitmapType_t;

typedef struct STOSD_Bitmap_s
{
	STOSD_BitmapType_t BitmapType;
	STOSD_ColorType_t  ColorType;
	U8 BitsPerPel;
	U32 Width;
	U32 Height;
	void* Data_p;
} STOSD_Bitmap_t;

typedef struct STOSD_ColorYCrCb888_s
{
	U8 Y;
	U8 Cr;
	U8 Cb;
} STOSD_ColorYCrCb888_t;

typedef union STOSD_ColorValue_u
{
	U8 PaletteEntry;
	STOSD_ColorYCrCb888_t YCrCb888;
} STOSD_ColorValue_t;

typedef struct STOSD_Color_s
{
	STOSD_ColorType_t  Type;
	STOSD_ColorValue_t Value;
	U8 MixWeight;
} STOSD_Color_t;

typedef enum
{
	TRIANGLE_UP,
	TRIANGLE_DOWN,
	TRIANGLE_LEFT,
	TRIANGLE_RIGHT
}Triangle_Type_e;

/* Exported Constants ----------------------------------------------------- */
#define REG2_8BPP_X  0//100//
#define REG2_8BPP_Y  0//100//
#define REG2_8BPP_W  (720)//
#define REG2_8BPP_H  (576)//
#define MAX_MIXWEIGHT 63
/* Exported Variables ----------------------------------------------------- */
extern STOSD_RegionHandle_t Handle8bpp;
/* Exported Macros -------------------------------------------------------- */



/* Exported Functions ----------------------------------------------------- */
ST_ErrorCode_t STOSD_FillRectangle(STOSD_RegionHandle_t Handle,S32 PositionX,S32 PositionY,U32 Width,U32 Height,STOSD_Color_t Color);
ST_ErrorCode_t STOSD_PutRectangle(STOSD_RegionHandle_t Handle, S32 PositionX, S32 PositionY, STOSD_Bitmap_t * Bitmap_p);
ST_ErrorCode_t STOSD_GetRectangle(STOSD_RegionHandle_t Handle,S32 PositionX,S32 PositionY,U32 Width,U32 Height,STOSD_Bitmap_t* Bitmap_p);
ST_ErrorCode_t STOSD_GetPixel(STOSD_RegionHandle_t Handle,U32 PositionX,U32 PositionY,STOSD_Color_t* Color_p);

ST_ErrorCode_t STOSD_SetPixel(STOSD_RegionHandle_t Handle,U32 PositionX,U32 PositionY,STOSD_Color_t Color);
ST_ErrorCode_t STOSD_SetRegionMixWeight (STOSD_RegionHandle_t Handle,U8 MixWeight);
ST_ErrorCode_t STOSD_GetRegionMixWeight(STOSD_RegionHandle_t   Handle,U8* MixWeight_p);
ST_ErrorCode_t STOSD_DrawRectangle(STOSD_RegionHandle_t Handle, U32 x, U32 y, U32 width, U32 height, STOSD_Color_t color);
ST_ErrorCode_t HL_STOSD_DrawRectangle(STOSD_RegionHandle_t Handle, U32 x, U32 y, U32 width, U32 height, STOSD_Color_t color);

ST_ErrorCode_t STOSD_DrawLine(STOSD_RegionHandle_t Handle, U32 x1, U32 y1, U32 x2, U32 y2, STOSD_Color_t color);
ST_ErrorCode_t HL_STOSD_DrawBMP(STOSD_RegionHandle_t Handle, U32 positionX, U32 positionY, STOSD_Bitmap_t bitmap);
void EMC_HideAllRegions(void);


#endif /* __OSDWRAP_H */

/* EOF --------------------------------------------------------------------- */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -