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

📄 widget_simple.lst

📁 Keil C下通过的UCGUI,UCGUI的移植源代码
💻 LST
字号:
C51 COMPILER V8.05a   WIDGET_SIMPLE                                                        04/11/2008 14:19:40 PAGE 1   


C51 COMPILER V8.05a, COMPILATION OF MODULE WIDGET_SIMPLE
OBJECT MODULE PLACED IN Widget_Simple.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Widget\Widget_Simple.c LARGE BROWSE MDU_F120 DEBUG OBJECT
                    -EXTEND PRINT(.\Widget_Simple.lst) OBJECT(Widget_Simple.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        : BUTTON.c
  16          Purpose     : emWin GSC button widget
  17          ---------------------------END-OF-HEADER------------------------------
  18          */
  19          
  20          #include <stdlib.h>
  21          #include <string.h>
  22          
  23          #include "WIDGET.h"
  24          #include "gui\Core\GUIDebug.h"
  25          #include "gui\Core\GUI.h"
  26          #include "gui\Core\GUI_Protected.h"
  27          #include "gui\WM\WM_Intern.h"
  28          
  29          #if GUI_WINSUPPORT
              
              /*********************************************************************
              *
              *       Private config defaults
              *
              **********************************************************************
              */
              
              
              /*********************************************************************
              *
              *       Object definition
              *
              **********************************************************************
              */
              
              /*********************************************************************
              *
              *       Static data
              *
              **********************************************************************
              */
              
              
              /*********************************************************************
C51 COMPILER V8.05a   WIDGET_SIMPLE                                                        04/11/2008 14:19:40 PAGE 2   

              *
              *       Macros for internal use
              *
              **********************************************************************
              */
              
              #define WIDGET_H2P(hWin)        ((WIDGET*)WM_HMEM2Ptr(hWin))
              
              /*********************************************************************
              *
              *       Static routines
              *
              **********************************************************************
              */
              
              
              /*********************************************************************
              *
              *       Public routines
              *
              **********************************************************************
              */
              
              /*********************************************************************
              *
              *       WIDGET_DrawSimpleFrame
              */
              
              void WIDGET_EFFECT_Simple_DrawUpRect(const GUI_RECT* pRect) {
                GUI_CONTEXT Context;
                GUI_SaveContext(&Context);
                GUI_SetColor(GUI_BLACK);
                GUI_DrawRect(pRect->x0, pRect->y0, pRect->x1, pRect->y1);          /* Draw rectangle around it */
                GUI_RestoreContext(&Context);
              }
              
              /*********************************************************************
              *
              *       WIDGET_EFFECT_Simple_DrawUp
              */
              
              void WIDGET_EFFECT_Simple_DrawUp(void) {
                GUI_RECT r;
                WM_GetClientRect(&r);
                WIDGET_EFFECT_Simple_DrawUpRect(&r);
              }
              /*********************************************************************
              *
              *       WIDGET_EFFECT_Simple_DrawDown
              */
              void WIDGET_EFFECT_Simple_DrawDownRect(const GUI_RECT* pRect) {
                GUI_CONTEXT Context;
                GUI_SaveContext(&Context);
                GUI_SetColor(GUI_BLACK);
                GUI_DrawRect(pRect->x0, pRect->y0, pRect->x1, pRect->y1);          /* Draw rectangle around it */
                GUI_RestoreContext(&Context);
              }
              
              void WIDGET_EFFECT_Simple_DrawDown(void) {
                GUI_RECT r;
                WM_GetClientRect(&r);
                WIDGET_EFFECT_Simple_DrawDownRect(&r);
C51 COMPILER V8.05a   WIDGET_SIMPLE                                                        04/11/2008 14:19:40 PAGE 3   

              }
              
              /*********************************************************************
              *
              *       WIDGET_EFFECT_Simple_GetRect
              */
              void WIDGET_EFFECT_Simple_GetRect(GUI_RECT* pRect) {
                WM_GetClientRect(pRect);
                GUI__ReduceRect(pRect, pRect, 1);
              }
              
              /*********************************************************************
              *
              *       Effect tables --- Mainly function pointers
              *
              **********************************************************************
              */
              
              const WIDGET_EFFECT WIDGET_Effect_Simple = {
                WIDGET_EFFECT_Simple_DrawUp, WIDGET_EFFECT_Simple_DrawDown,
                WIDGET_EFFECT_Simple_DrawUpRect, WIDGET_EFFECT_Simple_DrawDownRect,
                WIDGET_EFFECT_Simple_GetRect, 1
              };
              
              void WIDGET_SetDefaultEffect_Simple(void) {
                WIDGET_SetDefaultEffect(&WIDGET_Effect_Simple);
              }
              
              #else                            /* Avoid problems with empty object modules */
 146            void WIDGET_Simple_C(void) {}
 147          #endif /* GUI_WINSUPPORT */
 148          
 149          
 150          
 151          


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 + -