WMMemDev.c
上传用户:zbk8730
上传日期:2017-08-10
资源大小:12168k
文件大小:2k
源码类别:

uCOS

开发平台:

C/C++

  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        : WMMemDev.C
  16. Purpose     : Windows manager add on, support for memory devices
  17. ----------------------------------------------------------------------
  18. */
  19. #include "WM_Intern.H"
  20. #include "GUIDebug.h"
  21. #if GUI_WINSUPPORT    /* If 0, WM will not generate any code */
  22. /*
  23.   ********************************************************************
  24.   *                                                                  *
  25.   *           Enable /disable memory devices for window              *
  26.   *                                                                  *
  27.   ********************************************************************
  28. */
  29. void WM_EnableMemdev (WM_HWIN hWin) {
  30.   #if GUI_SUPPORT_MEMDEV
  31.     if (hWin) {
  32.       WM_Obj *pWin    = WM_HANDLE2PTR(hWin);  
  33.       pWin->Status |= (WM_SF_MEMDEV);
  34.     }
  35.   #else
  36.     GUI_DEBUG_WARN("WM_EnableMemdev: No effect because disabled in GUIConf.h (GUI_SUPPORT_MEMDEV == 0)");
  37.   #endif
  38. }
  39. void WM_DisableMemdev(WM_HWIN hWin) {
  40.   #if GUI_SUPPORT_MEMDEV
  41.     if (hWin) {
  42.       WM_Obj *pWin = WM_HANDLE2PTR(hWin);  
  43.       pWin->Status &= ~(WM_SF_MEMDEV);
  44.     }
  45.   #else
  46.     GUI_DEBUG_WARN("WM_EnableMemdev: No effect because disabled in GUIConf.h (GUI_SUPPORT_MEMDEV == 0)");
  47.   #endif
  48. }
  49. #else
  50. void WM_MemDev(void) {} /* avoid empty object files */
  51. #endif /* GUI_WIN_SUPPORT */