📄 wm_validate.lst
字号:
C51 COMPILER V8.05a WM_VALIDATE 04/11/2008 14:19:57 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE WM_VALIDATE
OBJECT MODULE PLACED IN WM_Validate.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\WM\WM_Validate.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXTEND
- PRINT(.\WM_Validate.lst) OBJECT(WM_Validate.obj)
line level source
1 /*
2 *********************************************************************************************************
3 * uC/GUI
4 * Universal graphic software for embedded applications
5 *
6 * (c) Copyright 2002, Micrium Inc., Weston, FL
7 * (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
8 *
9 * 礐/GUI is protected by international copyright laws. Knowledge of the
10 * source code may not be used to write a similar product. This file may
11 * only be used in accordance with a license and should not be redistributed
12 * in any way. We appreciate your understanding and fairness.
13 *
14 ----------------------------------------------------------------------
15 File : WM_Validate.C
16 Purpose : Windows manager, add. module
17 ----------------------------------------------------------------------
18 */
19
20 #include <stddef.h> /* needed for definition of NULL */
21 #include "WM_Intern.h"
22
23 #if GUI_WINSUPPORT /* If 0, WM will not generate any code */
/*******************************************************************
*
* Macros for internal use
*
********************************************************************
*/
#define Min(v0,v1) ((v0>v1) ? v1 : v0)
#define Max(v0,v1) ((v0>v1) ? v0 : v1)
/*******************************************************************
*
* Subtract rectangle
The result is the smallest rectangle which includes the entire
remaining area.
*pDest = *pr0- *pr1;
*/
void WM__SubRect(GUI_RECT* pDest, const GUI_RECT* pr0, const GUI_RECT* pr1) {
if ((pDest == NULL) || (pr0 == NULL))
return;
*pDest = *pr0;
if (pr1 == NULL)
return;
/* Check left/right sides */
if ( (pr1->y0 <= pr0->y0)
&&(pr1->y1 >= pr0->y1)) {
pDest->x0 = Max(pr0->x0, pr1->x1);
C51 COMPILER V8.05a WM_VALIDATE 04/11/2008 14:19:57 PAGE 2
pDest->x1 = Min(pr0->x1, pr1->x0);
}
/* Check top/bottom sides */
if ( (pr1->x0 <= pr0->x0)
&&(pr1->x1 >= pr0->x1)) {
pDest->y0 = Max(pr0->y0, pr1->y1);
pDest->y1 = Min(pr0->y1, pr1->y0);
}
}
/*
*****************************************************************
* *
* Validate window *
* *
*****************************************************************
Use this function with great care ! It should under most circumstances not
be necessary to use it, as validation is done automatically as soon as
a window has been redrawn. If you validate a section of a window, this
part will not be included in the paint-command and could therefor not
be updated.
*/
void WM_ValidateRect(WM_HWIN hWin, const GUI_RECT*pRect) {
WM_Obj* pWin;
WM_LOCK();
pWin = WM_HANDLE2PTR(hWin);
if (pWin->Status & WM_SF_INVALID) {
if (pRect) {
WM__SubRect(&pWin->InvalidRect, &pWin->InvalidRect, pRect);
if (WM__RectIsNZ(&pWin->InvalidRect))
goto Done;
}
pWin->Status &= ~WM_SF_INVALID;
WM__NumInvalidWindows--;
}
Done:
WM_UNLOCK();
}
#else
98
99 void WM_Validate(void) {} /* avoid empty object files */
100
101 #endif /* WM_MAX_WINDOW */
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -