亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? wm.c

?? ucCos移植到廣州友善nano2410
?? C
?? 第 1 頁 / 共 4 頁
字號:
      WM_SetDefault();
      WM_SendMessage(hWin, &Msg);
    } else {
      WM_ITERATE_START(&pWin->InvalidRect) {
        Msg.hWin   = hWin;
        Msg.MsgId  = WM_PAINT;
        Msg.Data.p = (GUI_RECT*)&pWin->InvalidRect;
        WM_SetDefault();
        WM_SendMessage(hWin, &Msg);
      } WM_ITERATE_END();
    }
    WM__PaintCallbackCnt--;
  }
}
/*********************************************************************
*
*       _Paint1Trans
*
* Purpose:
*   Draw a transparent window as part of an other one (the active window: pAWin).
*   This is required because transparent windows are drawn as part of their
*   non-transparent parents.
* Return value:
*   0 if nothing was drawn (no invalid rect)
*   1 if something was drawn (invalid rect exists)
* Add. info:
*   It is important to restore the modified settings, especially the invalid rectangle
*   of the window. The invalid rectangle needs to be set, as it is passed as add. info
*   to the callback on WM_PAINT.
*   On traditional transparent windows, the transparent window is never drawn on its own,
*   so there is no need to restore the invalid rectangle.
*   However, with WM_SF_CONST_OUTLINE, the window itself may need to be redrawn because it
*   can be invalid. Modifying the invalid rectangle would lead to not updating the window
*   in the worst case.
*/

#if WM_SUPPORT_TRANSPARENCY
static int _Paint1Trans(WM_HWIN hWin, WM_Obj* pWin) {
  int xPrev, yPrev;
  WM_Obj* pAWin = WM_H2P(GUI_Context.hAWin);
  /* Check if we need to do any drawing */
  if (GUI_RectsIntersect(&pAWin->InvalidRect, &pWin->Rect)) {
    /* Save old values */
    xPrev = GUI_Context.xOff;
    yPrev = GUI_Context.yOff;
    /* Set values for the current (transparent) window, rather than the one below */
    GUI__IntersectRects(&pWin->InvalidRect, &pWin->Rect, &pAWin->InvalidRect);
    WM__hATransWindow = hWin;
    GUI_Context.xOff = pWin->Rect.x0;
    GUI_Context.yOff = pWin->Rect.y0;
    /* Do the actual drawing ... */
    _Paint1(hWin, pWin);
    /* Restore settings */
    WM__hATransWindow = 0;
    GUI_Context.xOff = xPrev;
    GUI_Context.yOff = yPrev;
    return 1;                       /* Some drawing took place */
  }
  return 0;                         /* No invalid area, so nothing was drawn */
}
#endif

/*********************************************************************
*
*       _PaintTransChildren
*
* Purpose:
*   Paint transparent children. This function is obviously required
*   only if there are transparent windows.
* Function:  Obvious
* Parameter: Obvious
* Returns:   ---
*/
#if WM_SUPPORT_TRANSPARENCY
static void _PaintTransChildren(WM_Obj* pWin) {
  WM_HWIN hChild;
  WM_Obj* pChild;
  if (pWin->Status & WM_SF_ISVIS) {
    for (hChild = pWin->hFirstChild; hChild; hChild = pChild->hNext) {
      pChild = WM_H2P(hChild);
      if ((pChild->Status & (WM_SF_HASTRANS | WM_SF_ISVIS))   /* Transparent & visible ? */
		                ==  (WM_SF_HASTRANS | WM_SF_ISVIS)) {
        /* Set invalid area of the window to draw */
        if (GUI_RectsIntersect(&pChild->Rect, &pWin->InvalidRect)) {
          GUI_RECT InvalidRectPrev;
          InvalidRectPrev = pWin->InvalidRect;
          if(_Paint1Trans(hChild, pChild)) {
            _PaintTransChildren(pChild);
          }
          pWin->InvalidRect = InvalidRectPrev;
        }
      }
    }
  }
}
#endif

/*********************************************************************
*
*       _PaintTransTopSiblings
*
* Purpose:
*   Paint transparent top siblings. This function is obviously required
*   only if there are transparent windows.
* Function:  Obvious
* Parameter: Obvious
* Returns:   ---
*/
#if WM_SUPPORT_TRANSPARENCY
static void _PaintTransTopSiblings(WM_HWIN hWin, WM_Obj* pWin) {
  WM_HWIN hParent;
  WM_Obj* pParent;
  hParent = pWin->hParent;
  hWin = pWin->hNext;
  while (hParent) { /* Go hierarchy up to desktop window */
    for (; hWin; hWin = pWin->hNext) {
      pWin = WM_H2P(hWin);
      /* paint window if it is transparent & visible */
      if ((pWin->Status & (WM_SF_HASTRANS | WM_SF_ISVIS)) ==  (WM_SF_HASTRANS | WM_SF_ISVIS)) {
        _Paint1Trans(hWin, pWin);
      }
      /* paint transparent & visible children */
      _PaintTransChildren(pWin);
    }
    pParent = WM_H2P(hParent);
    hWin = pParent->hNext;
    hParent = pParent->hParent;
  }
}
#endif

/*********************************************************************
*
*       Callback for Paint message
*
* This callback is used by the window manger in conjunction with
* banding memory devices. A pointer to this routine is given to
* the banding memory device. This callback in turn will send the
* paint message to the window.
*
**********************************************************************
*/

/*********************************************************************
*
*       WM__PaintWinAndOverlays
*
* Purpose
*   Paint the given window and all overlaying windows
*   (transparent children and transparent top siblings)
*/
void WM__PaintWinAndOverlays(WM_PAINTINFO* pInfo) {
  WM_HWIN hWin;
  WM_Obj* pWin;
  hWin = pInfo->hWin;
  pWin = pInfo->pWin;
  #if WM_SUPPORT_TRANSPARENCY
    /* Transparent windows without const outline are drawn as part of the background and can be skipped. */
    if ((pWin->Status & (WM_SF_HASTRANS | WM_SF_CONST_OUTLINE)) != WM_SF_HASTRANS) {
  #endif
  _Paint1(hWin, pWin);    /* Draw the window itself */
  #if WM_SUPPORT_TRANSPARENCY
    }
    if (WM__TransWindowCnt != 0) {
      _PaintTransChildren(pWin);       /* Draw all transparent children */
      _PaintTransTopSiblings(hWin, pWin);    /* Draw all transparent top level siblings */
    }
  #endif
}

/*********************************************************************
*
*       _cbPaintMemDev
*
* Purpose:
*   This is the routine called by the banding memory device. It calls
*   the same _cbPaint Routine which is also used when drawing directly;
*   the only add. work done is adjustment of the invalid rectangle.
*   This way the invalid rectangle visible by the window callback function
*   is limited to the current band, allowing the callback to optimize
*   better.
*/
#if GUI_SUPPORT_MEMDEV
static void _cbPaintMemDev(void* p) {
  GUI_RECT Rect;
  WM_Obj* pWin = WM_H2P(GUI_Context.hAWin);
  Rect = pWin->InvalidRect;
  pWin->InvalidRect = GUI_Context.ClipRect;
  WM__PaintWinAndOverlays((WM_PAINTINFO*)p);
  pWin->InvalidRect = Rect;
}
#endif

/*********************************************************************
*
*       _Paint
  Returns:
    1: a window has been redrawn
    0: No window has been drawn  
*/
static int _Paint(WM_HWIN hWin, WM_Obj* pWin) {
  int Ret = 0;
  if (pWin->Status & WM_SF_INVALID) {
    if (pWin->cb) {
      if (WM__ClipAtParentBorders(&pWin->InvalidRect, hWin)) {
        WM_PAINTINFO Info;
        Info.hWin = hWin;
        Info.pWin = pWin;
        WM_SelectWindow(hWin);
        #if GUI_SUPPORT_MEMDEV
          if (pWin->Status & WM_SF_MEMDEV) {
            int Flags;
            GUI_RECT r = pWin->InvalidRect;
            Flags = (pWin->Status & WM_SF_HASTRANS) ? GUI_MEMDEV_HASTRANS : GUI_MEMDEV_NOTRANS;
            /*
             * Currently we treat a desktop window as transparent, because per default it does not repaint itself.
             */
            if (pWin->hParent == 0) {
              Flags = GUI_MEMDEV_HASTRANS;
            }
            GUI_MEMDEV_Draw(&r, _cbPaintMemDev, &Info, 0, Flags);
          } else
        #endif
        {
          WM__PaintWinAndOverlays(&Info);
          Ret = 1;    /* Something has been done */
        }
      }
    }
    /* We purposly clear the invalid flag after painting so we can still query the invalid rectangle while painting */
    pWin->Status &=  ~WM_SF_INVALID; /* Clear invalid flag */
    if (pWin->Status & WM_CF_MEMDEV_ON_REDRAW) {
      pWin->Status |= WM_CF_MEMDEV;
    }
    WM__NumInvalidWindows--;
  }
  return Ret;      /* Nothing done */
}

/*********************************************************************
*
*       _DrawNext
*/
static void _DrawNext(void) {
  int UpdateRem = 1;
  WM_HWIN iWin = (NextDrawWin == WM_HWIN_NULL) ? WM__FirstWin : NextDrawWin;
  GUI_CONTEXT ContextOld;
  GUI_SaveContext(&ContextOld);
  /* Make sure the next window to redraw is valid */
  for (; iWin && UpdateRem; ) {
    WM_Obj* pWin = WM_H2P(iWin);
    if (_Paint(iWin, pWin)) {
      UpdateRem--;  /* Only the given number of windows at a time ... */
    }
    iWin = pWin->hNextLin;
  }  
  NextDrawWin = iWin;   /* Remember the window */
  GUI_RestoreContext(&ContextOld);
}

/*********************************************************************
*
*       WM_Exec1
*/
int WM_Exec1(void) {
  /* Poll PID if necessary */
  if (WM_pfPollPID) {
    WM_pfPollPID();
  }
  if (WM_pfHandlePID) {
    if (WM_pfHandlePID())
      return 1;               /* We have done something ... */
  }
  if (GUI_PollKeyMsg()) {
    return 1;               /* We have done something ... */
  }
  if (WM_IsActive && WM__NumInvalidWindows) {
    WM_LOCK();
    _DrawNext();
    WM_UNLOCK();
    return 1;               /* We have done something ... */
  }
  return 0;                  /* There was nothing to do ... */
}

/*********************************************************************
*
*       WM_Exec
*/
int WM_Exec(void) {
  int r = 0;
  while (WM_Exec1()) {
    r = 1;                  /* We have done something */
  }
  return r;
}

/*********************************************************************
*
*       cbBackWin
*
* Purpose
*   Callback for background window
*
*/
static void cbBackWin( WM_MESSAGE* pMsg) {
  const WM_KEY_INFO* pKeyInfo;
  switch (pMsg->MsgId) {
  case WM_KEY:
    pKeyInfo = (const WM_KEY_INFO*)pMsg->Data.p;
    if (pKeyInfo->PressedCnt == 1) {
      GUI_StoreKey(pKeyInfo->Key);
    }
    break;
  case WM_PAINT:
    {
      int LayerIndex;
      #if GUI_NUM_LAYERS > 1
        LayerIndex = _DesktopHandle2Index(pMsg->hWin);
      #else
        LayerIndex = 0;
      #endif
      if (WM__aBkColor[LayerIndex] != GUI_INVALID_COLOR) {
        GUI_SetBkColor(WM__aBkColor[LayerIndex]);
        GUI_Clear();
      }
    }
  default:
    WM_DefaultProc(pMsg);
  }
}

/*********************************************************************
*
*       WM_Activate
*/
void WM_Activate(void) {
  WM_IsActive = 1;       /* Running */
}

/*********************************************************************
*
*       WM_Deactivate
*/
void WM_Deactivate(void) {
  WM_IsActive = 0;       /* No clipping performed by WM */
  WM_LOCK();
  LCD_SetClipRectMax();
  WM_UNLOCK();
}

/*********************************************************************
*
*       WM_DefaultProc
*
* Purpose
*   Default callback for windows
*   Any window should call this routine in the "default" part of the
*   its callback function for messages it does not handle itself.
*
*/
void WM_DefaultProc(WM_MESSAGE* pMsg) {
  WM_HWIN hWin = pMsg->hWin;
  const void *p = pMsg->Data.p;
  WM_Obj* pWin = WM_H2P(hWin);
  /* Exec message */
  switch (pMsg->MsgId) {
  case WM_GET_INSIDE_RECT:      /* return client window in absolute (screen) coordinates */
    WM__GetClientRectWin(pWin, (GUI_RECT*)p);
    break;
  case WM_GET_CLIENT_WINDOW:      /* return handle to client window. For most windows, there is no seperate client window, so it is the same handle */
    pMsg->Data.v = (int)hWin;
    return;                       /* Message handled */
  case WM_KEY:
    WM_SendToParent(hWin, pMsg);
    return;                       /* Message handled */
   case WM_GET_BKCOLOR:
    pMsg->Data.Color = GUI_INVALID_COLOR;
    return;                       /* Message handled */
  case WM_NOTIFY_ENABLE:
    WM_InvalidateWindow(hWin);    
    return;                       /* Message handled */
  }
  /* Message not handled. If it queries something, we return 0 to be on the safe side. */
  pMsg->Data.v = 0;
  pMsg->Data.p = 0;
}

/*********************************************************************
*
*       WM_Init
*/
void WM_Init(void) {
	if (!_IsInited) {
	  NextDrawWin = WM__FirstWin = WM_HWIN_NULL;
	  GUI_Context.WM__pUserClipRect = NULL;
	  WM__NumWindows = WM__NumInvalidWindows =0;
	  /* Make sure we have at least one window. This greatly simplifies the
		  drawing routines as they do not have to check if the window is valid.
	  */
    #if GUI_NUM_LAYERS == 1
      WM__ahDesktopWin[0] = WM_CreateWindow(0, 0, GUI_XMAX, GUI_YMAX, WM_CF_SHOW, cbBackWin, 0);
      WM__aBkColor[0] = GUI_INVALID_COLOR;
      WM_InvalidateWindow(WM__ahDesktopWin[0]); /* Required because a desktop window has no parent. */
    #else
    {
      int i;
      for (i = 0; i < GUI_NUM_LAYERS; i++) {
        WM__ahDesktopWin[i] = WM_CreateWindowAsChild(0, 0, GUI_XMAX, GUI_YMAX, WM_UNATTACHED, WM_CF_SHOW, cbBackWin, 0);
        WM__aBkColor[i] = GUI_INVALID_COLOR;
        WM_InvalidateWindow(WM__ahDesktopWin[i]); /* Required because a desktop window has no parent. */
      }
    }
    #endif
    /* Register the critical handles ... Note: This could be moved into the module setting the Window handle */
    WM__AddCriticalHandle(&WM__CHWinModal);
    WM__AddCriticalHandle(&WM__CHWinLast);

    WM_SelectWindow(WM__ahDesktopWin[0]);
	  WM_Activate();
    _IsInited =1;
	}
}


#else
  void WM(void) {} /* avoid empty object files */
#endif   /* GUI_WINSUPPORT */

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费视频中文字幕| 久久日一线二线三线suv| 亚洲欧美精品午睡沙发| 94-欧美-setu| 亚洲成人av电影| 91精品国产综合久久久蜜臀图片| 日韩专区在线视频| 日韩欧美国产1| 成人免费视频app| 亚洲一区二区在线免费观看视频| 欧美精品欧美精品系列| 久久国产精品第一页| 国产亚洲一二三区| 91女厕偷拍女厕偷拍高清| 亚洲成人免费影院| 欧美成人精品1314www| 国产69精品久久久久毛片| 玉足女爽爽91| 欧美不卡激情三级在线观看| 成人午夜免费视频| 日日夜夜免费精品视频| www久久久久| 色综合欧美在线| 天天综合色天天综合色h| 国产午夜精品一区二区| 91激情五月电影| 老司机精品视频在线| 亚洲视频一区在线观看| 日韩欧美成人一区| 日本久久电影网| 国内精品久久久久影院色| 最好看的中文字幕久久| 日韩三级免费观看| 97精品久久久久中文字幕| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产欧美一区视频| 欧美一级日韩免费不卡| 99久久伊人精品| 国产一区二区三区国产| 亚洲精品国产a| 国产亚洲欧美中文| 日韩欧美成人一区二区| 欧美在线制服丝袜| 国产精品一区二区免费不卡 | 在线观看成人免费视频| 久久成人麻豆午夜电影| 亚洲影院在线观看| 中文字幕一区二区三区在线观看| 日韩视频中午一区| 欧美中文字幕不卡| 91网站视频在线观看| 国产一区不卡在线| 免费一级片91| 天天操天天综合网| 亚洲国产精品视频| 亚洲天堂中文字幕| 国产精品久久久久影视| 久久品道一品道久久精品| 91精品欧美久久久久久动漫| 精品视频色一区| 91免费精品国自产拍在线不卡| 国产在线看一区| 奇米色777欧美一区二区| 亚洲观看高清完整版在线观看| 中文字幕欧美一区| 国产欧美日韩视频一区二区| 日韩精品一区二区三区在线| 欧美日韩成人激情| 欧美日韩国产综合视频在线观看| 欧美在线观看一区| 色一情一乱一乱一91av| 91视频免费看| 91国偷自产一区二区三区观看| 成人高清免费在线播放| www.日韩av| 色综合久久久久网| 在线看日本不卡| 在线观看免费成人| 欧美一区三区二区| 欧美一级生活片| 久久精品这里都是精品| 国产女主播视频一区二区| 国产精品麻豆久久久| ...av二区三区久久精品| 中文字幕视频一区二区三区久| 国产精品久久二区二区| 国产精品成人免费精品自在线观看 | 亚洲福中文字幕伊人影院| 一区二区三区四区亚洲| 亚洲综合色婷婷| 男女激情视频一区| 韩国精品久久久| 成人福利视频在线| 91婷婷韩国欧美一区二区| 91丝袜高跟美女视频| 欧美日韩中文一区| 精品欧美久久久| 中文字幕不卡在线| 亚洲影院在线观看| 久久99蜜桃精品| 国产激情视频一区二区三区欧美| 懂色av一区二区三区蜜臀| 色吧成人激情小说| 欧美电影免费观看高清完整版| 久久亚洲影视婷婷| 亚洲黄一区二区三区| 伦理电影国产精品| 成人国产视频在线观看| 欧美视频三区在线播放| 久久新电视剧免费观看| 18涩涩午夜精品.www| 日韩国产在线观看| 波波电影院一区二区三区| 91黄色激情网站| 久久免费看少妇高潮| 亚洲免费av网站| 久久精品国产亚洲aⅴ| 波波电影院一区二区三区| 51午夜精品国产| 中文字幕第一页久久| 日韩在线卡一卡二| kk眼镜猥琐国模调教系列一区二区| 欧美日韩久久久一区| 亚洲国产精品成人综合 | 亚洲欧美日韩在线| 精品一区二区三区免费| 色综合天天性综合| 精品成a人在线观看| 午夜欧美电影在线观看| 丁香五精品蜜臀久久久久99网站| 欧美日韩免费不卡视频一区二区三区| 26uuu国产日韩综合| 午夜精品久久一牛影视| www.欧美日韩| 久久美女艺术照精彩视频福利播放 | 日韩 欧美一区二区三区| 成人免费视频视频| 欧美电影免费观看高清完整版在线 | 国产网站一区二区| 日韩va欧美va亚洲va久久| 色综合激情五月| 中文字幕av一区 二区| 久久99在线观看| 欧美一区2区视频在线观看| 一区二区在线看| thepron国产精品| 国产视频一区二区在线| 激情五月婷婷综合网| 欧美日韩国产小视频在线观看| 亚洲另类春色国产| 91社区在线播放| 日韩美女视频一区| eeuss鲁片一区二区三区在线看| 国产香蕉久久精品综合网| 久久国产日韩欧美精品| 欧美一区二区三区免费在线看| 一区二区三区日韩| 色狠狠一区二区三区香蕉| 日韩伦理免费电影| youjizz国产精品| 综合久久综合久久| 色婷婷精品久久二区二区蜜臀av| 中文字幕一区二区三区不卡在线| 成人免费视频网站在线观看| 亚洲国产成人在线| bt欧美亚洲午夜电影天堂| 国产精品久久午夜| 一本大道av伊人久久综合| 亚洲丝袜精品丝袜在线| 在线亚洲一区二区| 亚洲成人自拍一区| 欧美一级免费大片| 久久精品免费观看| 久久精品一区四区| 91女人视频在线观看| 一区二区三区视频在线看| 欧美日韩视频在线第一区| 午夜精品福利一区二区三区av| 欧美日本一区二区| 精品一区二区三区在线播放视频| 欧美成人精品福利| 岛国一区二区三区| 亚洲男人的天堂av| 欧美丰满少妇xxxbbb| 老司机午夜精品99久久| 国产午夜三级一区二区三| aaa欧美日韩| 亚洲成人av一区二区三区| 日韩三级在线免费观看| 国产成人免费av在线| 亚洲免费在线电影| 欧美一区二区三区日韩视频| 国内精品在线播放| 亚洲天堂精品视频| 欧美日韩国产一级| 久99久精品视频免费观看| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产欧美一区二区精品秋霞影院 | 国产欧美精品一区二区三区四区 | 国产精品亚洲а∨天堂免在线|