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

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

?? wm.c

?? ucgui源碼3.32
?? C
?? 第 1 頁 / 共 4 頁
字號:
    WM__NumWindows++;
    pWin = WM_H2P(hWin);
    memset (pWin,   0, sizeof(WM_Obj));        /* erase this data structure
           The explicit zero-init is no longer needed since the entire data structure
           is already zeroed. The advantage is that it reduces program size.
           */
    pWin->Rect.x0 = x0;
    pWin->Rect.y0 = y0;
    pWin->Rect.x1 = x0+width-1;
    pWin->Rect.y1 = y0+height-1;
    pWin->Status = WM_SF_INUSE;     /* Mark window as in use */
    pWin->cb = cb;
    /* Add to linked lists */
    pWin->hParent = hParent;
    _AddChild(hParent, hWin, Style & WM_CF_STAYONTOP);
    _AddToLinList(hWin);
  /* Put Window on top (or bottom) of windows stack */
    if (Style & WM_CF_ACTIVATE /*| (cb==NULL)*/) {
      WM_SelectWindow(hWin);  /* This is not needed
                                 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 (hParent) {
      WM_Obj* pWinParent = WM_H2P(hParent);
      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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
高清不卡一二三区| 精品中文字幕一区二区| 精品国产髙清在线看国产毛片| 国产精品一二三区在线| 亚洲成精国产精品女| 国产午夜精品一区二区三区四区| 欧美亚洲一区二区在线| 成人三级伦理片| 日韩电影一区二区三区四区| 亚洲欧美aⅴ...| 久久久不卡影院| 91麻豆精品国产91久久久使用方法| av在线不卡免费看| 激情欧美日韩一区二区| 日韩黄色一级片| 亚洲综合无码一区二区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲美女屁股眼交3| 久久久久综合网| 日韩一区二区精品| 91麻豆精品国产自产在线观看一区| 色狠狠色噜噜噜综合网| 成人动漫视频在线| 丰满放荡岳乱妇91ww| 国产在线精品免费av| 免费人成在线不卡| 丝袜诱惑制服诱惑色一区在线观看 | 国产日产欧美一区二区视频| 久久精品夜色噜噜亚洲aⅴ| 91麻豆精品国产无毒不卡在线观看| 欧美色倩网站大全免费| 日本电影欧美片| 在线日韩一区二区| 欧洲一区在线观看| 欧美日韩精品系列| 欧美日韩另类一区| 欧美美女bb生活片| 欧美精品vⅰdeose4hd| 欧美巨大另类极品videosbest| 欧美日韩免费观看一区三区| 欧美午夜在线一二页| 欧美日韩成人在线一区| 91精品国产aⅴ一区二区| 91精品欧美一区二区三区综合在 | 一本到不卡免费一区二区| 岛国精品在线播放| gogo大胆日本视频一区| av影院午夜一区| 色婷婷精品大视频在线蜜桃视频| 91麻豆免费看片| 欧美午夜免费电影| 日韩西西人体444www| 久久亚洲一区二区三区明星换脸| 久久精品视频在线看| 国产精品乱码人人做人人爱| 亚洲三级免费观看| 天天亚洲美女在线视频| 美女一区二区三区| 国产福利精品导航| 一本久久a久久精品亚洲| 欧美老年两性高潮| 久久久久久久久久久久久夜| 日韩一区欧美小说| 午夜激情综合网| 国产乱人伦偷精品视频免下载 | 国产麻豆视频一区| 99久久精品免费看| 777色狠狠一区二区三区| 久久亚洲精品小早川怜子| 国产精品电影一区二区| 亚洲成精国产精品女| 91免费在线看| 555夜色666亚洲国产免| 国产亚洲综合性久久久影院| 一区二区三区四区中文字幕| 另类小说图片综合网| 91在线精品一区二区三区| 欧美一区二区三区在线电影| 欧美经典一区二区| 亚洲国产成人91porn| 国产传媒一区在线| 777亚洲妇女| 国产精品乱码久久久久久| 日韩精品91亚洲二区在线观看 | 国产一区二区按摩在线观看| 色8久久人人97超碰香蕉987| 欧美第一区第二区| 亚洲欧美色一区| 国产一区二区三区不卡在线观看| 日本精品视频一区二区三区| 久久色中文字幕| 五月天视频一区| 懂色av一区二区三区蜜臀| 69av一区二区三区| 亚洲美女区一区| 国产69精品久久久久毛片 | 4438亚洲最大| 亚洲女同女同女同女同女同69| 精品一区二区三区在线播放视频| 日本久久一区二区| 国产精品麻豆视频| 国产伦精一区二区三区| 欧美一区二区久久| 亚洲永久精品国产| 成人免费视频caoporn| 精品欧美乱码久久久久久1区2区 | 极品美女销魂一区二区三区免费| 欧美色网一区二区| 亚洲人123区| 高清在线不卡av| 久久亚洲精华国产精华液 | 成人丝袜18视频在线观看| 精品日韩欧美一区二区| 日韩专区中文字幕一区二区| 91精品福利在线| 综合中文字幕亚洲| 成人亚洲精品久久久久软件| 久久亚洲精品国产精品紫薇| 久久99蜜桃精品| 日韩一级免费观看| 国产99久久精品| 久久一夜天堂av一区二区三区| 蓝色福利精品导航| 欧美一级在线观看| 免费人成黄页网站在线一区二区| 欧美日韩国产另类不卡| 亚洲一区二区三区自拍| 欧美性videosxxxxx| 亚洲在线视频免费观看| 在线观看中文字幕不卡| 亚洲最新视频在线播放| 欧洲一区在线观看| 亚洲gay无套男同| 欧美精品vⅰdeose4hd| 日本 国产 欧美色综合| 日韩欧美在线综合网| 精品系列免费在线观看| 久久精品亚洲精品国产欧美| 国产精品一区二区你懂的| 国产欧美日韩视频一区二区 | 欧美亚洲日本国产| 亚洲成人一区在线| 日韩写真欧美这视频| 国产一区啦啦啦在线观看| 久久综合九色综合97婷婷| 国产盗摄女厕一区二区三区| 中文字幕在线观看不卡视频| 色综合久久六月婷婷中文字幕| 一区二区视频在线| 欧美猛男男办公室激情| 裸体健美xxxx欧美裸体表演| 久久综合五月天婷婷伊人| 国产成人在线影院| 亚洲欧美日韩人成在线播放| 欧美日韩成人综合| 国产综合色视频| 自拍视频在线观看一区二区| 欧美日韩成人高清| 国产一区在线观看视频| 亚洲视频狠狠干| 欧美日韩夫妻久久| 国产高清在线精品| 亚洲免费成人av| 日韩欧美国产电影| 成人性色生活片免费看爆迷你毛片| 亚洲精品va在线观看| 337p亚洲精品色噜噜噜| 国产成人精品午夜视频免费 | 成人av在线观| 亚洲成人精品影院| 国产喂奶挤奶一区二区三区| 一本大道久久a久久综合| 美日韩黄色大片| 中文字幕一区二| 欧美一区二区三区日韩视频| 国产成都精品91一区二区三| 亚洲一区在线免费观看| 久久久午夜电影| 欧美三级电影网| 丁香婷婷深情五月亚洲| 天堂va蜜桃一区二区三区漫画版| 国产三级久久久| 欧美精品18+| 91蝌蚪国产九色| 韩国在线一区二区| 性做久久久久久久久| 国产精品二区一区二区aⅴ污介绍| 欧美精品在欧美一区二区少妇| 色视频成人在线观看免| 国产一区二区视频在线播放| 亚洲一区二区三区在线看| 欧美国产亚洲另类动漫| 日韩欧美国产综合一区| 欧美丝袜自拍制服另类| 成人激情小说乱人伦| 久久成人18免费观看| 亚洲高清三级视频| 亚洲特黄一级片| 国产色产综合色产在线视频 | 精品国产不卡一区二区三区|