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

📄 dialog.lst

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


C51 COMPILER V8.05a, COMPILATION OF MODULE DIALOG
OBJECT MODULE PLACED IN Dialog.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Widget\Dialog.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXTEND 
                    -PRINT(.\Dialog.lst) OBJECT(Dialog.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        : 
  16          Purpose     : Dialog box include
  17          ----------------------------------------------------------------------
  18          Open items:
  19          None
  20          --------------------END-OF-HEADER-------------------------------------
  21          */
  22          
  23          #include <stddef.h>           /* needed for definition of NULL */
  24          #include "gui\Widget\Dialog.h"
  25          #include "gui\Widget\Widget.h"
  26          #include "gui\WM\WM_Intern.h"
  27          
  28          #if GUI_WINSUPPORT
              
              /*********************************************************************
              *
              *       Private config defaults
              *
              **********************************************************************
              */
              
              /* Define colors */
              #ifndef DIALOG_BKCOLOR0_DEFAULT
                #define DIALOG_BKCOLOR0_DEFAULT 0xc0c0c0
              #endif
              
              /*********************************************************************
              *
              *           static data;
              *
              **********************************************************************
              */
              static WM_CALLBACK* _cb;
              static int _r;
              static LCD_COLOR _BkColor = DIALOG_BKCOLOR0_DEFAULT;
              
              /*********************************************************************
              *
              *           static code: API functions
C51 COMPILER V8.05a   DIALOG                                                               04/11/2008 14:19:32 PAGE 2   

              *
              **********************************************************************
              */
              
              
              
              
              
              /************************************************************
              *
              *           _cbDialog
                This callback is hooked before the user callback in order to be
                able to intercept some messages.
              */
              
              static void _cbDialog(WM_MESSAGE* pMsg) {
                if (_cb) {
                  (*_cb)(pMsg);
                }
              }
              
              /*********************************************************************
              *
              *           Public code: API functions
              *
              **********************************************************************
              */
              
              /************************************************************
              *
              *           GUI_CreateDialogbox
              */
              WM_HWIN GUI_CreateDialogBox(const GUI_WIDGET_CREATE_INFO* paWidget, int NumWidgets, WM_CALLBACK* cb, WM_HW
             -IN hParent,
                                          int x0, int y0)
              {
                WM_HWIN hDialog = paWidget->pfCreateIndirect(paWidget, hParent, x0, y0, cb);     /* Create parent window
             - */
                WM_HWIN hDialogClient = WM_GetClientWindow(hDialog);
                WIDGET_OrState(hDialog, paWidget->Flags);
                WM_ShowWindow(hDialog);
                WM_ShowWindow(hDialogClient);
                while (--NumWidgets > 0) {
                  WM_HWIN hChild;
                  paWidget++;
                  hChild = paWidget->pfCreateIndirect(paWidget, hDialogClient, 0, 0, 0);     /* Create child window */
                  WM_ShowWindow(hChild);
                }
                WM_SetFocusOnNextChild(hDialog);     /* Set the focus to the first child */
                WM__SendMessageNoPara(hDialogClient, WM_INIT_DIALOG);
                return hDialog;
              }
              
              /************************************************************
              *
              *           GUI_EndDialog
              */
              void GUI_EndDialog(WM_HWIN hWin, int r) {
                _cb = NULL;
                _r = r;
                WM_DeleteWindow(hWin);
              }
C51 COMPILER V8.05a   DIALOG                                                               04/11/2008 14:19:32 PAGE 3   

              
              /************************************************************
              *
              *           DIALOG_GetBkColor()
              */
              LCD_COLOR DIALOG_GetBkColor(void) {
                return _BkColor;
              }
              
              /************************************************************
              *
              *           DIALOG_SetBkColor()
              */
              LCD_COLOR DIALOG_SetBkColor(LCD_COLOR BkColor) {
                LCD_COLOR r;
                r = _BkColor;
                _BkColor = BkColor;
                return r;
              }
              
              /************************************************************
              *
              *           GUI_ExecDialogbox
              */
              int     GUI_ExecDialogBox(const GUI_WIDGET_CREATE_INFO* paWidget,
                                        int NumWidgets, WM_CALLBACK* cb, WM_HWIN hParent,
                                        int x0, int y0)
              {
                _cb = cb;
                GUI_CreateDialogBox(paWidget, NumWidgets, _cbDialog, hParent, x0, y0);
                while (_cb) {
                  if (!GUI_Exec())
                    GUI_X_ExecIdle();
                }
                return _r;
              }
              
              
              #else
 154            void Dialog_c(void);    /* Avoid problems with empty object modules */
 155          #endif   /* GUI_WINSUPPORT */
 156          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   ----    ----
   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 + -