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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wm.c

?? uCGUI
?? C
?? 第 1 頁 / 共 4 頁
字號:
                                 if callbacks are being used, but it
                                 does not cost a lot and makes life
                                 easier ... */
    }
  /* Mark client area as invalid */
    WM__SendMsgNoData(hWin, WM_CREATE);
  /* Handle the Style flags, one at a time */
    if (Style & WM_CF_SHOW) {
      WM_ShowWindow(hWin);
    }
  /* Hide if parent is not visible */
    if (hWinParent) {
      WM_Obj* pWinParent = WM_H2P(hWinParent);
      if (!(pWinParent->Status & WM_SF_ISVIS)) {
        WM_HideWindow(hWin);
      }
    }
    /* Copy the flags which can simply be accepted */
    pWin->Status |= (Style & (WM_SF_MEMDEV|WM_SF_STAYONTOP|WM_SF_HASTRANS));
  }
  WM_UNLOCK();
  return hWin;
}

WM_HWIN WM_CreateWindow(int x0, int y0, int width, int height, U16 Style, WM_CALLBACK* cb, int NumExtraBytes) {
  return WM_CreateWindowAsChild(x0,y0,width,height, 0 /* No parent */,  Style, cb, NumExtraBytes);
}



/****************************************************************
*
*          Delete window
*
*****************************************************************

*/

void WM_DeleteWindow (WM_HWIN Win) {
  WM_Obj* pWin;
  if (!Win)
    return;
  WM_LOCK();
  if (WM__IsWindow(Win)) {
    pWin = WM_H2P(Win);
    ResetNextDrawWin();              /* Make sure the window will no longer receive drawing messages */
  /* Make sure that focus is set to an existing window */
    if (WM__hWinFocus == Win) {
      WM__hWinFocus = 0;
    }
    if (Win == WM__hCapture) {
      WM__hCapture = 0;
    }
  /* Delete all children */
    _DeleteAllChildren(pWin->hFirstChild);
    _DeleteInSiblingList(Win);
  /* Send WM_DELETE message to window in order to inform window itself */
    WM__SendMsgNoData(Win, WM_DELETE);     /* tell window about it */
    /* Inform other modules if necessary */
    if (WM__pfDeleteWindowHook) {
      (*WM__pfDeleteWindowHook)(Win);
    }
  /* Remove window from window stack */
    if (pWin->Status & WM_SF_INVALID) {
      WM__NumInvalidWindows--;
    }
    WM__RemoveFromLinList(Win);
  /* Clear area used by this window */
    WM_InvalidateArea(&pWin->Rect);
  /* Free window memory */
    WM__NumWindows--;
    WM_FREE(Win);
  /* Select a valid window */
    WM_SelectWindow(WM__FirstWin);
  } else {
    GUI_DEBUG_WARN("WM_DeleteWindow: Invalid handle");
  }
  WM_UNLOCK();
}


void WM__SetMaxClipRect(const WM_Obj* pWin) {
  WM_LOCK();
  LCD_SetClipRectEx(&pWin->Rect);
  WM_UNLOCK();
}

/****************************************************************
*
*              WM_SelectWindow
*
*****************************************************************

Sets the active Window. The active Window is the one that is used for all
drawing (and text) operations.
*/

WM_HWIN WM_SelectWindow(WM_HWIN  hWin) {
  WM_HWIN hWinPrev;
  WM_LOCK();
  hWinPrev = GUI_Context.hAWin;
  if (hWin == 0) {
    hWin = WM__FirstWin;
  }
  if (!(WM_H2P(hWin)->Status & WM_SF_INUSE)) {
    GUI_DEBUG_ERROROUT1("Selecting invalid window", hWin);
    hWin=0;
  }
  /* Select new window */
  GUI_Context.hAWin = hWin;
  WM__SetMaxClipRect(WM_H2P(hWin));
  WM_UNLOCK();
  return hWinPrev;
}


WM_HWIN WM_GetActiveWindow(void) {
  return GUI_Context.hAWin;
}



/*
  ********************************************************************
  *                                                                  *
  *                 Show / hide window                               *
  *                                                                  *
  ********************************************************************
*/
void WM_ShowWindow   (WM_HWIN hWin) {
  WM_Obj *pWin;
  WM_LOCK();
  pWin = WM_H2P(hWin);  
  /* First check if this is necessary at all */
  if ((pWin->Status&WM_SF_ISVIS)) {
    WM_UNLOCK();
    return;
  }
  /* Set Visibility flag */
  pWin->Status |= WM_SF_ISVIS;
  /* Mark content as invalid */
  WM_InvalidateWindow(hWin);
  WM_UNLOCK();
}



/*
          *****************************************************************
          *                                                               *
          *                    GetOrg                                     *
          *                                                               *
          *****************************************************************

These routines return the offset of the client area in absolute coordinates.
They are used to convert window coordinates into absolute coordinates and are
used in the clipping libraries (CL_).
*/


int WM__GetOrgX(void) {
  return WM_H2P(GUI_Context.hAWin)->Rect.x0;
}

int WM__GetOrgY(void) {
  return WM_H2P(GUI_Context.hAWin)->Rect.y0;
}


/*************************************************************************************************************
*           IVR calculation

IVRs are invalid rectangles. When redrawing, only the portion of the
window which is
  a) within the window-rectangle
  b) not covered by an other window
  c) marked as invalid
  is actually redrawn. Unfortunately, this section is not always
  rectangular. If the window is partially covered by an other window,
  it consists of the sum of multiple rectangles. In all drawing
  operations, we have to iterate over every one of these rectangles in
  order to make sure the window is drawn completly.
Function works as follows:
  STEP 1: - Set upper left coordinates to next pixel. If end of line (right border), goto next line -> (r.x0, r.y0)
  STEP 2: - Check if we are done, return if we are.
  STEP 3: - If we are at the left border, find max. heigtht (r.y1) by iterating over windows above
  STEP 4: - Find x0 for the given y0, y1 by iterating over windows above
  STEP 5: - If r.x0 out of right border, this stripe is done. Set next stripe and goto STEP 2
  STEP 6: - Find r.x1. We have to Iterate over all windows which are above
*/



#if WM_SUPPORT_OBSTRUCT
static int FindNext_IVR(void) {
  int hParent;
  int iWin;
  GUI_RECT r;
  U8 Status;
  WM_Obj* pWin;
  WM_Obj* pAWin;
  WM_Obj* pParent;
  r = ClipContext.CurRect;  /* temps  so we do not have to work with pointers too much */
  /*
     STEP 1:
       Set the next position which could be part of the next IVR
       This will be the first unhandle pixel in reading order, i.e. next one to the right
       or next one down if we are at the right border.
  */
  if (ClipContext.Cnt == 0) {       /* First IVR starts in upper left */
    r.x0 = ClipContext.ClientRect.x0;
    r.y0 = ClipContext.ClientRect.y0;
  } else {
    r.x0 = ClipContext.CurRect.x1+1;
    r.y0 = ClipContext.CurRect.y0;
    if (r.x0 > ClipContext.ClientRect.x1) {
NextStripe:  /* go down to next stripe */
      r.x0 = ClipContext.ClientRect.x0;
      r.y0 = ClipContext.CurRect.y1+1;
    }
  }
  /*
     STEP 2:
       Check if we are done completely.
  */
  if (r.y0 >ClipContext.ClientRect.y1)
    return 0;
  /* STEP 3:
       Find out the max. height (r.y1) if we are at the left border.
       Since we are using the same height for all IVRs at the same y0,
       we do this only for the leftmost one.
  */
  pAWin = WM_H2P(GUI_Context.hAWin);
  if (r.x0 == ClipContext.ClientRect.x0) {
    r.y1 = ClipContext.ClientRect.y1;
    r.x1 = ClipContext.ClientRect.x1;
    /* Iterate over all windows which are above */
    /* Check all siblings above (Iterate over Parents and top siblings (hNext) */
    for (hParent = GUI_Context.hAWin; hParent; hParent = pParent->hParent) {
      pParent = WM_H2P(hParent);
      for (iWin= pParent->hNext; iWin !=0; iWin = pWin->hNext) { 
        Status = (pWin = WM_H2P(iWin))->Status;
        /* Check if this window affects us at all */    
        if ((Status & WM_SF_ISVIS)  && (!(Status & WM_SF_HASTRANS)) && GUI_RectsIntersect(&r, &pWin->Rect)) {
          if (pWin->Rect.y0 > r.y0) {
            ASSIGN_IF_LESS(r.y1, pWin->Rect.y0-1);      /* Check upper border of window */
          } else {
            ASSIGN_IF_LESS(r.y1, pWin->Rect.y1);        /* Check lower border of window */
          }
        }
      }
    }
    /* Check all children */
    for (iWin= pAWin->hFirstChild; iWin !=0; iWin = pWin->hNext) { 
      Status = (pWin = WM_H2P(iWin))->Status;
      /* Check if this window affects us at all */    
      if ((Status & WM_SF_ISVIS)  && (!(Status & WM_SF_HASTRANS)) && GUI_RectsIntersect(&r, &pWin->Rect)) {
        if (pWin->Rect.y0 > r.y0) {
          ASSIGN_IF_LESS(r.y1, pWin->Rect.y0-1);      /* Check upper border of window */
        } else {
          ASSIGN_IF_LESS(r.y1, pWin->Rect.y1);        /* Check lower border of window */
        }
      }
    }
  }
  /* 
    STEP 4
      Find out x0 for the given y0, y1 by iterating over windows above.
      if we find one that intersects, adjust x0 to the right.
  */
Find_x0:
  r.x1 = r.x0;
  /* Iterate over all windows which are above */
  /* Check all siblings above */
    for (hParent = GUI_Context.hAWin; hParent; hParent = pParent->hParent) {
    pParent = WM_H2P(hParent);
    for (iWin= pParent->hNext; iWin !=0; iWin = pWin->hNext) { 
      Status = (pWin = WM_H2P(iWin))->Status;
      if ( (Status & WM_SF_ISVIS) && (!(Status & WM_SF_HASTRANS)) && GUI_RectsIntersect(&r, &pWin->Rect)) {     /* Check if this window affects us at all */
        r.x0 = pWin->Rect.x1+1;
        goto Find_x0;
      }
    }
  }
  /* Check all children */
  for (iWin= pAWin->hFirstChild; iWin !=0; iWin = pWin->hNext) { 
    Status = (pWin = WM_H2P(iWin))->Status;
    if ( (Status & WM_SF_ISVIS) && (!(Status & WM_SF_HASTRANS)) && GUI_RectsIntersect(&r, &pWin->Rect)) {     /* Check if this window affects us at all */
      r.x0 = pWin->Rect.x1+1;
      goto Find_x0;
    }
  }
  /* 
   STEP 5:
     If r.x0 out of right border, this stripe is done. Set next stripe and goto STEP 2
     Find out x1 for the given x0, y0, y1
  */
  r.x1 = ClipContext.ClientRect.x1;
  if (r.x1 < r.x0) {/* horizontal border reached ? */
    ClipContext.CurRect = r;
    goto NextStripe;
  }    
  /* 
   STEP 6:
     Find r.x1. We have to Iterate over all windows which are above
  */
  /* Check all siblings above (Iterate over Parents and top siblings (hNext) */
  for (hParent = GUI_Context.hAWin; hParent; hParent = pParent->hParent) {
    pParent = WM_H2P(hParent);
    for (iWin= pParent->hNext; iWin !=0; iWin = pWin->hNext) { 
      Status = (pWin = WM_H2P(iWin))->Status;
      if (    (Status & WM_SF_ISVIS) && (!(Status & WM_SF_HASTRANS)) && GUI_RectsIntersect(&r, &pWin->Rect)) {     /* Check if this window affects us at all */
        r.x1 = pWin->Rect.x0-1;    
      }
    }
  }
  /* Check all children */
  for (iWin= pAWin->hFirstChild; iWin !=0; iWin = pWin->hNext) { 
    Status = (pWin = WM_H2P(iWin))->Status;
    if (    (Status & WM_SF_ISVIS) && (!(Status & WM_SF_HASTRANS)) && GUI_RectsIntersect(&r, &pWin->Rect)) {     /* Check if this window affects us at all */
      r.x1 = pWin->Rect.x0-1;    
    }
  }
  /* We are done. Return the rectangle we found in the ClipContext. */
  if (ClipContext.Cnt >200) {
    return 0;  /* error !!! This should not happen !*/
  }
  ClipContext.CurRect = r;
  return 1;  /* IVR is valid ! */
}

#else

static int FindNext_IVR(void) {
  if (ClipContext.Cnt ==0) {
    ClipContext.CurRect = GUI_Context.pAWin->Rect;
    return 1;  /* IVR is valid ! */
  }
  return 0;  /* Nothing left to draw */
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品精品亚洲| 国产亚洲欧美一级| 亚洲另类色综合网站| 综合婷婷亚洲小说| 中文字幕在线观看一区| 精品视频在线免费| 国产精品911| 国产成人自拍网| 亚洲欧洲av在线| 国产视频一区二区在线| 国产精品一区二区视频| 亚洲已满18点击进入久久| 日本不卡视频在线| 亚洲国产欧美在线| 99精品久久99久久久久| 亚洲成a人片在线观看中文| 一区二区在线观看av| 亚洲久草在线视频| 亚洲图片欧美综合| 日韩不卡一区二区| 经典三级视频一区| 国产成人午夜精品影院观看视频| 国产精品一区在线观看乱码| www.日韩av| 欧美无砖砖区免费| 欧美sm极限捆绑bd| 国产精品美女一区二区| 亚洲精品视频在线看| 日韩和的一区二区| 国产一区二区三区蝌蚪| 99久久精品免费精品国产| 欧美伊人久久大香线蕉综合69| 欧美高清一级片在线| 亚洲精品一线二线三线无人区| 欧美国产综合色视频| 一区二区三区中文在线观看| 丝袜美腿一区二区三区| 国产传媒一区在线| 日韩一区中文字幕| 亚洲黄色免费电影| 美女视频网站黄色亚洲| av在线不卡电影| 91精品国产乱码久久蜜臀| 久久久美女毛片| 亚洲女爱视频在线| 久久99国产精品免费网站| 91在线观看下载| 日韩视频免费直播| 国产精品福利一区二区三区| 五月天一区二区| 丰满放荡岳乱妇91ww| 欧美三级电影在线看| 久久久精品欧美丰满| 亚洲一区二区三区四区的| 国产精品主播直播| 欧美剧情片在线观看| 欧美国产日韩一二三区| 亚洲bt欧美bt精品777| 成人伦理片在线| 精品欧美一区二区三区精品久久| 亚洲精品成人a在线观看| 国产自产视频一区二区三区| 欧美日韩国产不卡| 中文字幕在线一区免费| 久久狠狠亚洲综合| 欧美日韩高清在线| 国产精品久久久久久妇女6080| 欧美a一区二区| 日本道色综合久久| 国产精品毛片高清在线完整版| 日本免费新一区视频| 欧洲人成人精品| 国产精品久久久久精k8| 国产乱码精品一区二区三区五月婷| 欧美猛男gaygay网站| 亚洲日本一区二区三区| 国产精品18久久久久久久久久久久| 欧美人与z0zoxxxx视频| 亚洲欧美日韩久久精品| 国产精品夜夜爽| 精品国产乱码久久| 日韩av电影天堂| 欧美日韩视频在线一区二区| 亚洲色图在线看| www.亚洲人| 国产精品丝袜91| 高清国产午夜精品久久久久久| 2024国产精品视频| 久久精品国产精品亚洲红杏 | 日日夜夜免费精品| 色综合天天综合给合国产| 欧美激情中文不卡| 国产精品综合久久| 久久麻豆一区二区| 国精品**一区二区三区在线蜜桃| 日韩视频一区在线观看| 日本不卡视频在线| 日韩欧美一区电影| 久久99九九99精品| 欧美一区二区三级| 免费的成人av| 欧美成人午夜电影| 久久99精品一区二区三区三区| 欧美一级午夜免费电影| xnxx国产精品| 亚洲电影第三页| 欧美美女bb生活片| 日本午夜一本久久久综合| 91麻豆精品91久久久久久清纯| 亚洲超碰精品一区二区| 91精品国产综合久久久蜜臀图片| 亚洲成人1区2区| 欧美日韩国产一二三| 婷婷成人激情在线网| 欧美一级片免费看| 国模大尺度一区二区三区| 国产亚洲精久久久久久| 成人做爰69片免费看网站| 中文字幕一区二区三区不卡在线 | 国产亚洲va综合人人澡精品 | 日韩欧美精品在线视频| 国模大尺度一区二区三区| 日本一区二区高清| 91在线免费视频观看| 伊人夜夜躁av伊人久久| 欧美精品色一区二区三区| 免费观看在线色综合| 2021国产精品久久精品| 成人app在线观看| 亚洲最新视频在线观看| 日韩视频免费直播| 国产精品12区| 亚洲精品高清在线| 日韩一区二区中文字幕| 国内成人免费视频| 最近日韩中文字幕| 在线综合亚洲欧美在线视频| 国产精品白丝jk黑袜喷水| 亚洲欧美精品午睡沙发| 91精品国产入口在线| 懂色av中文一区二区三区| 亚洲乱码一区二区三区在线观看| 在线观看免费亚洲| 激情综合网激情| 亚洲女人****多毛耸耸8| 欧美一级日韩一级| a在线欧美一区| 美脚の诱脚舐め脚责91| 亚洲天堂免费在线观看视频| 日韩写真欧美这视频| 福利视频网站一区二区三区| 亚洲成av人片在www色猫咪| 久久久不卡网国产精品一区| 在线精品视频免费播放| 国产美女视频91| 一区二区三区日韩在线观看| 精品国产一区二区精华| 色综合久久66| 国产成人超碰人人澡人人澡| 亚洲mv在线观看| 中文字幕一区二区三区在线播放| 3d动漫精品啪啪1区2区免费 | 欧美三级日韩三级| 国产一区二区三区最好精华液| 一区二区三区四区亚洲| 久久久久久99精品| 欧美喷水一区二区| 96av麻豆蜜桃一区二区| 国产综合色精品一区二区三区| 欧美一区二区三区视频免费| 另类调教123区| 一区二区三区视频在线观看| 欧美国产日产图区| 日韩亚洲欧美在线观看| 色婷婷久久久久swag精品 | 午夜精品一区二区三区免费视频| 一区二区三区免费看视频| 日本va欧美va欧美va精品| 成人av网站免费| 久久夜色精品一区| 一区二区三区四区激情| 国产在线精品一区在线观看麻豆| 色综合夜色一区| 日本一区二区久久| 日本欧美在线观看| 91美女在线看| 国产精品系列在线| 日韩国产成人精品| 色综合婷婷久久| 亚洲欧洲成人av每日更新| 精品一区二区三区不卡| 91精品国产乱码| 日产精品久久久久久久性色 | 久久国产生活片100| 在线观看91视频| 国产精品一区二区久激情瑜伽| 国产精品国产三级国产有无不卡| 久久国内精品自在自线400部| 日韩欧美国产wwwww| 日韩美女久久久|