mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-30 06:23:22 +08:00
remove old deprecated code
This commit is contained in:
@@ -562,159 +562,6 @@ static void dskEnableWindow (PMAINWIN pWin, int flags)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
{
|
||||
HDC hdc;
|
||||
RECT rcClient, rcScreen, rcInvalid;
|
||||
BOOL inved = FALSE;
|
||||
PCLIPRECT pcrc;
|
||||
PINVRGN pInvRgn;
|
||||
|
||||
lock_zi_for_read (__mg_zorder_info);
|
||||
dskClientToScreen (pWin, pswi->rc1, &rcScreen);
|
||||
|
||||
//BUGFIX: if the MainWindow is AutoSecondaryDC, the secondaryDC and
|
||||
//client dc would be diffirent, so we must get the scondaryDC,
|
||||
//the update to client dc (dongjunjie 2010/7/28)
|
||||
//hdc = GetClientDC ((HWND)pWin);
|
||||
hdc = get_effective_dc(pWin, TRUE);
|
||||
|
||||
pcrc = pWin->pGCRInfo->crgn.head;
|
||||
while (pcrc) {
|
||||
RECT rcMove;
|
||||
|
||||
if (!IntersectRect (&rcMove, &pcrc->rc, &rcScreen)) {
|
||||
pcrc = pcrc->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
dskScreenToClient (pWin, &rcMove, &rcMove);
|
||||
if (!IntersectRect (&rcMove, &rcMove, pswi->rc1)) {
|
||||
pcrc = pcrc->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pWin->dwExStyle & WS_EX_TRANSPARENT) {
|
||||
/* set invalidate rect. */
|
||||
InvalidateRect ((HWND)pWin, &rcMove, TRUE);
|
||||
inved = TRUE;
|
||||
}
|
||||
else {
|
||||
dskRecalcRect (pWin, &rcMove);
|
||||
|
||||
SelectClipRect (hdc, &rcMove);
|
||||
|
||||
BitBlt (hdc, rcMove.left, rcMove.top,
|
||||
rcMove.right - rcMove.left,
|
||||
rcMove.bottom - rcMove.top,
|
||||
hdc, pswi->iOffx + rcMove.left, pswi->iOffy + rcMove.top, 0);
|
||||
}
|
||||
|
||||
pcrc = pcrc->next;
|
||||
}
|
||||
//ReleaseDC (hdc);
|
||||
//BUGFIXED: we must update the secondaryDC to clientDC, to ensure
|
||||
//the secondaryDC and clientDC are same (dongjunjie 2010/07/08)
|
||||
if(pWin->pMainWin->secondaryDC){
|
||||
HDC real_dc = GetClientDC((HWND)pWin->pMainWin);
|
||||
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
|
||||
ReleaseDC (real_dc);
|
||||
}
|
||||
release_effective_dc(pWin, hdc);
|
||||
|
||||
|
||||
GetClientRect((HWND)pWin, &rcClient);
|
||||
|
||||
pInvRgn = &pWin->InvRgn;
|
||||
if (!pInvRgn->frozen) {
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_lock (&pInvRgn->lock);
|
||||
#endif
|
||||
/*scroll whole screen, offset invalid region*/
|
||||
if (EqualRect (pswi->rc1, &rcClient))
|
||||
OffsetRegion (&(pInvRgn->rgn), pswi->iOffx, pswi->iOffy);
|
||||
else
|
||||
OffsetRegionEx (&(pInvRgn->rgn), &rcClient,
|
||||
pswi->rc1, pswi->iOffx, pswi->iOffy);
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_unlock (&pInvRgn->lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
pcrc = pWin->pGCRInfo->crgn.head;
|
||||
while (pcrc) {
|
||||
BOOL bNeedInvalidate = FALSE;
|
||||
RECT rcMove;
|
||||
if (!IntersectRect (&rcMove, &pcrc->rc, &rcScreen)) {
|
||||
pcrc = pcrc->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
dskScreenToClient (pWin, &rcMove, &rcMove);
|
||||
|
||||
dskRecalcRect (pWin, &rcMove);
|
||||
|
||||
rcInvalid = rcMove;
|
||||
|
||||
if (pswi->iOffx < 0) {
|
||||
rcInvalid.left = rcInvalid.right + pswi->iOffx;
|
||||
bNeedInvalidate = TRUE;
|
||||
}
|
||||
else if (pswi->iOffx > 0) {
|
||||
rcInvalid.right = rcInvalid.left + pswi->iOffx;
|
||||
bNeedInvalidate = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* BUGFIXED: offx and offy would make the two diffrent areas invalidate
|
||||
* we should invalid both them (dongjunjie) 2010/07/30
|
||||
*
|
||||
* content
|
||||
* ---------------------------
|
||||
* |//: offX |
|
||||
* |//: |
|
||||
* |//: View |
|
||||
* |//: |
|
||||
* |//: |
|
||||
* |/////////////////////////| offY
|
||||
* ---------------------------
|
||||
* // - represent area need the Need invalidate
|
||||
* see the to area must be invalidate
|
||||
*/
|
||||
if (bNeedInvalidate) {
|
||||
InvalidateRect ((HWND)pWin, &rcInvalid, TRUE);
|
||||
rcInvalid = rcMove; //restore the invalidate area
|
||||
bNeedInvalidate = FALSE; //resotre the inved value
|
||||
inved = TRUE;
|
||||
}
|
||||
|
||||
if (pswi->iOffy < 0) {
|
||||
rcInvalid.top = rcInvalid.bottom + pswi->iOffy;
|
||||
bNeedInvalidate = TRUE;
|
||||
}
|
||||
else if (pswi->iOffy > 0) {
|
||||
rcInvalid.bottom = rcInvalid.top + pswi->iOffy;
|
||||
bNeedInvalidate = TRUE;
|
||||
}
|
||||
|
||||
if (bNeedInvalidate) {
|
||||
InvalidateRect ((HWND)pWin, &rcInvalid, TRUE);
|
||||
inved = TRUE;
|
||||
}
|
||||
|
||||
pcrc = pcrc->next;
|
||||
}
|
||||
|
||||
unlock_zi_for_read (__mg_zorder_info);
|
||||
if (inved) {
|
||||
PostMessage ((HWND)pWin, MSG_PAINT, 0, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int dskMoveMainWindow (PMAINWIN pWin, const RECT* prcExpect)
|
||||
{
|
||||
RECT rcResult;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -743,7 +743,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
//BUGFIXED: we must update the secondaryDC to clientDC, to ensure
|
||||
//the secondaryDC and clientDC are same (dongjunjie 2010/07/08)
|
||||
if (pWin->pMainWin->secondaryDC) {
|
||||
HDC real_dc = GetClientDC((HWND)pWin->pMainWin);
|
||||
HDC real_dc = GetClientDC ((HWND)pWin->pMainWin);
|
||||
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
|
||||
ReleaseDC (real_dc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user