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

📄 wm_diag.c

📁 MCB2300_ucgui_LCD320240.rar LPC2368的uc/gui的移植
💻 C
字号:
/*
*********************************************************************************************************
*   											 uC/GUI
*   					 Universal graphic software for embedded applications
*
*   					(c) Copyright 2002, Micrium Inc., Weston, FL
*   					(c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
*   		   礐/GUI is protected by international copyright laws. Knowledge of the
*   		   source code may not be used to write a similar product. This file may
*   		   only be used in accordance with a license and should not be redistributed
*   		   in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File		: WM_DIAG.c
Purpose 	: Implementation of WM_DIAG_ ... functions
----------------------------------------------------------------------
*/

#include <stddef.h>
#include "WM_Intern.h"

#if defined (__WATCOMC__)
#define Sleep()
#else
#if GUI_WINSUPPORT
#if WM_SUPPORT_DIAG 	 /* Only defined if GUI_WINSUPPORT >= 0 */
#include "windows.h"   /* Required for sleep only */
#endif
#endif
#endif

/*********************************************************************
*
*   	Static routines
*
**********************************************************************
*/

/*********************************************************************
*
*   	_ShowInvalid
*
* Function:
*   Debug code: shows invalid areas
*/
#if (WM_SUPPORT_DIAG)
static void _ShowInvalid(WM_HWIN hWin)
{
	GUI_CONTEXT Context = GUI_Context;
	GUI_RECT rClient;
	WM_Obj * pWin;
	pWin = WM_H2P(hWin);
	rClient = pWin->InvalidRect;
	GUI_MoveRect(&rClient, -pWin->Rect.x0, -pWin->Rect.y0);
	WM_SelectWindow(hWin);
	GUI_SetColor(GUI_GREEN);
	GUI_SetBkColor(GUI_GREEN);
	GUI_FillRect(rClient.x0, rClient.y0, rClient.x1, rClient.y1);
	Sleep(20);
	GUI_Context = Context;
}
#endif

/*********************************************************************
*
*   	Public code
*
**********************************************************************
*/
/*********************************************************************
*
*   	WM_DIAG_EnableInvalidationColoring
*/
#if (WM_SUPPORT_DIAG)
void WM_DIAG_EnableInvalidationColoring(int OnOff)
{
	if (OnOff)
	{
		WM__pfShowInvalid = _ShowInvalid;
	}
	else
	{
		WM__pfShowInvalid = NULL;
	}
}

#else
void WM_DIAG_C(void);   /* Avoid "no prototype" warnings */
void WM_DIAG_C(void)
{
} /* Avoid empty object files */
#endif

/*************************** End of file ****************************/

⌨️ 快捷键说明

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