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

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

?? wm.c

?? UC_GUI開(kāi)發(fā)源代碼,里面含有范例,源文件
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
*   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_HWIN hWin, 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)) {
            #if GUI_SUPPORT_MEMDEV
              /* Within the paint event the application is alowed to deal with memory devices.
                 So the pointer(s) could be invalid after the last function call and needs
                 to be restored.
              */
              pChild = WM_H2P(hChild);
            #endif
            _PaintTransChildren(hChild, pChild);
            #if GUI_SUPPORT_MEMDEV
              /* Within the paint event the application is alowed to deal with memory devices.
                 So the pointer(s) could be invalid after the last function call and needs
                 to be restored.
              */
              pChild = WM_H2P(hChild);
              pWin   = WM_H2P(hWin);
            #endif
          }
          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);
        #if GUI_SUPPORT_MEMDEV
          /* Within the paint event the application is alowed to deal with memory devices.
             So the pointer(s) could be invalid after the last function call and needs
             to be restored.
          */
          pWin   = WM_H2P(hWin);
        #endif
      }
      /* paint transparent & visible children */
      _PaintTransChildren(hWin, 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 (!pWin) {
    pWin = WM_H2P(hWin);
  }
  #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 GUI_SUPPORT_MEMDEV
    /* Within the paint event the application is alowed to deal with memory devices.
       So the pointer(s) could be invalid after the last function call and needs
       to be restored.
    */
    pWin = WM_H2P(hWin);
  #endif
  #if WM_SUPPORT_TRANSPARENCY
    }
    if (WM__TransWindowCnt != 0) {
      _PaintTransChildren(hWin, pWin);             /* Draw all transparent children */
      #if GUI_SUPPORT_MEMDEV
        /* Within the paint event the application is alowed to deal with memory devices.
           So the pointer(s) could be invalid after the last function call and needs
           to be restored.
        */
        pWin = WM_H2P(hWin);
      #endif
      _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

/*********************************************************************
*
*       WM__Paint
  Returns:
    1: a window has been redrawn
    0: No window has been drawn  
*/
int WM__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;
        WM_SelectWindow(hWin);
        #if GUI_SUPPORT_MEMDEV
          Info.pWin = NULL; /* 'Invalidate' the window pointer, because it can 
                                become invalid through the creation of a memory device
                            */
          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
        {
          Info.pWin = pWin;
          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 (WM__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 (WM_IsActive) {
    if (GUI_PollKeyMsg()) {
      return 1;               /* We have done something ... */
    }
  }
#ifdef WIN32
  if (WM_PollSimMsg()) {
    return 1;               /* We have done something ... */
  }
#endif
  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);
    #if GUI_SUPPORT_MOUSE
      WM__AddCriticalHandle(&WM__CHWinMouseOver);
    #endif

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


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

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

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美腿丝袜在线亚洲一区| 精品无人码麻豆乱码1区2区 | 久久久久国产精品麻豆ai换脸| 国产精品私人影院| 日产欧产美韩系列久久99| 丰满亚洲少妇av| 欧美不卡视频一区| 一区二区三区在线观看网站| 懂色av一区二区三区免费观看| 日韩一区二区在线观看视频| 一区二区三区**美女毛片| 风间由美中文字幕在线看视频国产欧美 | 91久久免费观看| 久久久国产一区二区三区四区小说 | 国产成人在线视频网址| 91精品国产综合久久香蕉麻豆 | 欧美三级在线视频| 国产精品激情偷乱一区二区∴| 久久99日本精品| 亚洲男帅同性gay1069| 久久国产尿小便嘘嘘尿| 538在线一区二区精品国产| 亚洲一区二区三区四区在线观看| 成人美女视频在线看| 久久精品水蜜桃av综合天堂| 蜜桃免费网站一区二区三区| 91精品在线免费| 天使萌一区二区三区免费观看| 91精品91久久久中77777| 专区另类欧美日韩| 色中色一区二区| 亚洲激情六月丁香| 色婷婷综合五月| 亚洲黄色小说网站| 欧美最新大片在线看 | 免费成人美女在线观看.| 欧美三级韩国三级日本一级| 亚洲一级二级三级| 欧美性猛片aaaaaaa做受| 亚洲一区二区三区免费视频| 欧美影院一区二区三区| 亚洲国产aⅴ成人精品无吗| 欧美在线啊v一区| 亚洲超丰满肉感bbw| 69av一区二区三区| 蜜桃av一区二区| 26uuu另类欧美| 国产91精品在线观看| 国产精品二区一区二区aⅴ污介绍| av在线免费不卡| 亚洲在线免费播放| 91精品国模一区二区三区| 国内精品自线一区二区三区视频| 国产亚洲一区字幕| 91丨porny丨户外露出| 亚洲一区二区精品久久av| 69久久夜色精品国产69蝌蚪网| 久久精品国产免费| 国产精品视频九色porn| 91福利在线观看| 蜜臀av一区二区| 国产精品电影一区二区三区| 欧美午夜精品久久久久久超碰| 婷婷开心久久网| 国产日产欧美一区| 欧美午夜电影在线播放| 国产在线看一区| 亚洲精品中文在线观看| 日韩欧美激情一区| 99久久婷婷国产综合精品电影| 亚洲不卡av一区二区三区| 精品久久久三级丝袜| 99久久精品99国产精品| 久久国产精品区| 亚洲黄色性网站| 国产亚洲精品aa| 欧美精品色综合| 波多野结衣一区二区三区| 日韩电影免费在线观看网站| 国产精品午夜电影| 欧美一区二区日韩| 色噜噜狠狠色综合中国| 国内久久精品视频| 日本不卡中文字幕| 亚洲精品中文在线观看| 久久精品亚洲精品国产欧美| 91精品国产综合久久精品app| 成人伦理片在线| 极品瑜伽女神91| 午夜视频一区二区三区| 中文字幕一区二区三区精华液 | 欧美精品一卡两卡| 成人av免费在线播放| 久久99国产精品久久99果冻传媒| 99精品桃花视频在线观看| 免费美女久久99| 日韩专区一卡二卡| 夜夜亚洲天天久久| 亚洲三级理论片| 国产欧美1区2区3区| 精品国产一区二区三区四区四| 欧美系列在线观看| 91色porny| 97精品视频在线观看自产线路二| 高清不卡在线观看av| 精品一区二区三区久久久| 日韩**一区毛片| 肉丝袜脚交视频一区二区| 亚洲午夜私人影院| 亚洲综合在线视频| 亚洲麻豆国产自偷在线| 亚洲婷婷综合久久一本伊一区| 欧美高清在线视频| 国产精品色哟哟网站| 欧美国产激情二区三区| 国产亚洲自拍一区| 国产精品久久综合| 中文字幕中文字幕在线一区| 最新欧美精品一区二区三区| 中文字幕一区二区三区在线观看| 亚洲私人黄色宅男| 亚洲精品乱码久久久久久日本蜜臀| 1024成人网| 亚洲一线二线三线视频| 亚洲成人黄色影院| 青娱乐精品在线视频| 美美哒免费高清在线观看视频一区二区 | 一区二区三区91| 香港成人在线视频| 麻豆一区二区三| 激情综合五月天| 不卡免费追剧大全电视剧网站| 9i在线看片成人免费| 欧美综合一区二区三区| 欧美日韩高清影院| 日韩免费观看2025年上映的电影 | 亚洲综合一区二区| 日韩二区三区四区| 国产精品一二三四区| 9l国产精品久久久久麻豆| 欧美三级视频在线| 欧美xxxxx牲另类人与| 国产精品色一区二区三区| 亚洲靠逼com| 久久成人久久爱| 大尺度一区二区| 欧美在线观看视频一区二区三区| 欧美一区二区三区四区视频| 国产女同互慰高潮91漫画| 亚洲欧美色图小说| 美女尤物国产一区| 91天堂素人约啪| 日韩精品中文字幕一区二区三区| 国产精品久久久久毛片软件| 亚洲bdsm女犯bdsm网站| 韩国三级中文字幕hd久久精品| 99久久精品国产一区| 日韩三级精品电影久久久| 国产精品人人做人人爽人人添| 三级一区在线视频先锋 | 欧美猛男超大videosgay| 久久久国产午夜精品| 亚洲va欧美va国产va天堂影院| 国产老女人精品毛片久久| 欧美无砖专区一中文字| 久久精品人人做人人爽人人| 午夜私人影院久久久久| 91丨porny丨国产入口| 26uuu精品一区二区| 香蕉av福利精品导航 | 国产v日产∨综合v精品视频| 欧美日本一道本| 最新日韩在线视频| 国产福利不卡视频| 91精品欧美综合在线观看最新| 亚洲男同1069视频| 成人深夜在线观看| 精品久久国产字幕高潮| 亚洲国产乱码最新视频| 99久久99久久精品免费看蜜桃| 久久一二三国产| 免费成人性网站| 宅男噜噜噜66一区二区66| 一区二区三区丝袜| 不卡一区二区在线| 国产精品剧情在线亚洲| 成人午夜看片网址| 国产亚洲一本大道中文在线| 美女视频黄 久久| 日韩欧美一区二区免费| 日本vs亚洲vs韩国一区三区二区| 欧美揉bbbbb揉bbbbb| 亚洲免费观看高清完整版在线观看| 丁香婷婷综合色啪| 国产亚洲成aⅴ人片在线观看| 麻豆精品精品国产自在97香蕉| 4hu四虎永久在线影院成人| 丝袜美腿亚洲一区| 91精品国产免费| 免费在线观看日韩欧美|