rename get_valid_dc to get_effective_dc; rename release_valid_dc to release_effective_dc

This commit is contained in:
Vincent Wei
2020-02-27 10:40:17 +08:00
parent 98cdfd9bfb
commit 16d3a63fbb
7 changed files with 44 additions and 43 deletions
+26 -26
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -666,7 +666,7 @@ leave_drawing:
#endif // #if MGUI_BYTEORDER == MGUI_LIL_ENDIAN
static inline HDC get_valid_dc (PMAINWIN pWin, BOOL client)
static inline HDC get_effective_dc (PMAINWIN pWin, BOOL client)
{
if (!(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)
&& (pWin->pMainWin->secondaryDC)) {
@@ -690,7 +690,7 @@ static inline HDC get_valid_dc (PMAINWIN pWin, BOOL client)
}
}
static inline void release_valid_dc (PMAINWIN pWin, HDC hdc)
static inline void release_effective_dc (PMAINWIN pWin, HDC hdc)
{
if (pWin->pMainWin->secondaryDC) {
if (pWin->privCDC != hdc)
+2 -2
View File
@@ -562,7 +562,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
//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_valid_dc(pWin, TRUE);
hdc = get_effective_dc(pWin, TRUE);
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
while (pcrc) {
@@ -605,7 +605,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
ReleaseDC (real_dc);
}
release_valid_dc(pWin, hdc);
release_effective_dc(pWin, hdc);
GetClientRect((HWND)pWin, &rcClient);
+2 -2
View File
@@ -2524,7 +2524,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
//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 = get_valid_dc(pWin, TRUE);
hdc = get_effective_dc(pWin, TRUE);
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
while (pcrc) {
@@ -2565,7 +2565,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
ReleaseDC (real_dc);
}
release_valid_dc(pWin, hdc);
release_effective_dc(pWin, hdc);
GetClientRect((HWND)pWin, &rcClient);
+2 -2
View File
@@ -717,7 +717,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
//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_valid_dc (pWin, TRUE);
hdc = get_effective_dc (pWin, TRUE);
#ifndef _MGSCHEMA_COMPOSITING
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
@@ -770,7 +770,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
ReleaseDC (real_dc);
}
release_valid_dc(pWin, hdc);
release_effective_dc(pWin, hdc);
GetClientRect((HWND)pWin, &rcClient);
+4 -4
View File
@@ -2723,10 +2723,10 @@ HDC GUIAPI GetSecondaryDC (HWND hwnd)
return pWin->secondaryDC;
}
else if (pWin->pMainWin->secondaryDC){
return get_valid_dc (pWin, FALSE);
return get_effective_dc (pWin, FALSE);
}
#else
return get_valid_dc (pWin, TRUE);
return get_effective_dc (pWin, TRUE);
#endif
return HDC_SCREEN;
}
@@ -2736,7 +2736,7 @@ HDC GUIAPI GetSecondaryClientDC (HWND hwnd)
PMAINWIN pWin;
pWin = MG_GET_WINDOW_PTR (hwnd);
return get_valid_dc (pWin, TRUE);
return get_effective_dc (pWin, TRUE);
}
void GUIAPI ReleaseSecondaryDC (HWND hwnd, HDC hdc)
@@ -2747,7 +2747,7 @@ void GUIAPI ReleaseSecondaryDC (HWND hwnd, HDC hdc)
if (MG_IS_MAIN_WINDOW(hwnd) && pWin->secondaryDC == hdc)
return ;
release_valid_dc (pWin, hdc);
release_effective_dc (pWin, hdc);
}
BOOL dc_GenerateMemDCECRgn(PDC pdc, BOOL fForce)