mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 18:31:57 +08:00
remove unnecessary kernel_GetGCRgnInfo functions
This commit is contained in:
@@ -164,7 +164,7 @@ tab2space() {
|
||||
# sed -i 's/\<get_valid_dc\>/get_effective_dc/g' `grep '\<get_valid_dc\>' -rl include/ src/`
|
||||
# sed -i 's/\<release_valid_dc\>/release_effective_dc/g' `grep '\<release_valid_dc\>' -rl include/ src/`
|
||||
|
||||
sed -i 's/\<gui_GetMainWindowPtrOfControl\>/checkAndGetMainWindowPtrOfControl/g' `grep '\<gui_GetMainWindowPtrOfControl\>' -rl include/ src/`
|
||||
sed -i 's/\<gui_CheckAndGetMainWindowPtr\>/checkAndGetMainWindowPtrOfMainWin/g' `grep '\<gui_CheckAndGetMainWindowPtr\>' -rl include/ src/`
|
||||
# sed -i 's/\<gui_GetMainWindowPtrOfControl\>/checkAndGetMainWindowPtrOfControl/g' `grep '\<gui_GetMainWindowPtrOfControl\>' -rl include/ src/`
|
||||
# sed -i 's/\<gui_CheckAndGetMainWindowPtr\>/checkAndGetMainWindowPtrOfMainWin/g' `grep '\<gui_CheckAndGetMainWindowPtr\>' -rl include/ src/`
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -110,7 +110,6 @@ PLOGFONT g_SysLogFont[1]; // TODO: bad coding
|
||||
#define salone_StandAloneStartup() TRUE
|
||||
#define salone_StandAloneCleanup()
|
||||
#define salone_IdleHandler4StandAlone(qmsg) NULL
|
||||
#define kernel_GetGCRgnInfo(hwnd) NULL
|
||||
#define GetWindowFont(hwnd) NULL
|
||||
#define mg_InitControlClass() TRUE
|
||||
#define mg_InitAccel() TRUE
|
||||
|
||||
@@ -578,11 +578,6 @@ PMAINWIN gui_GetMainWindowPtrUnderPoint (int x, int y);
|
||||
/* return the next window need to repaint. */
|
||||
HWND kernel_CheckInvalidRegion (PMAINWIN pWin);
|
||||
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
/* return global clipping region of window. */
|
||||
PGCRINFO kernel_GetGCRgnInfo (HWND hWnd);
|
||||
#endif
|
||||
|
||||
/* internal variables */
|
||||
typedef struct _TRACKMENUINFO* PTRACKMENUINFO;
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
//hdc = GetClientDC ((HWND)pWin);
|
||||
hdc = get_effective_dc(pWin, TRUE);
|
||||
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
pcrc = pWin->pGCRInfo->crgn.head;
|
||||
while (pcrc) {
|
||||
RECT rcMove;
|
||||
|
||||
@@ -625,7 +625,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
#endif
|
||||
}
|
||||
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
pcrc = pWin->pGCRInfo->crgn.head;
|
||||
while (pcrc) {
|
||||
BOOL bNeedInvalidate = FALSE;
|
||||
RECT rcMove;
|
||||
|
||||
@@ -2526,7 +2526,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
//the update to client dc (dongjunjie 2010/7/28)
|
||||
hdc = get_effective_dc(pWin, TRUE);
|
||||
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
pcrc = pWin->pGCRInfo->crgn.head;
|
||||
while (pcrc) {
|
||||
RECT rcMove;
|
||||
|
||||
@@ -2585,7 +2585,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
#endif
|
||||
}
|
||||
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
pcrc = pWin->pGCRInfo->crgn.head;
|
||||
while (pcrc) {
|
||||
BOOL bNeedInvalidate = FALSE;
|
||||
RECT rcMove;
|
||||
|
||||
@@ -130,24 +130,24 @@ static const int _zof_types_for_level [] = {
|
||||
typedef BOOL (* CB_ONE_ZNODE) (void* context,
|
||||
const ZORDERINFO* zi, ZORDERNODE* node);
|
||||
|
||||
#if 0 /* deprecated code */
|
||||
PGCRINFO kernel_GetGCRgnInfo (HWND hWnd)
|
||||
{
|
||||
return ((PMAINWIN)hWnd)->pGCRInfo;
|
||||
}
|
||||
#endif /* deprecated code */
|
||||
|
||||
typedef struct _DEF_CONTEXT
|
||||
{
|
||||
PBITMAP bg;
|
||||
int x, y;
|
||||
} DEF_CONTEXT;
|
||||
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
PGCRINFO kernel_GetGCRgnInfo (HWND hWnd)
|
||||
{
|
||||
return ((PMAINWIN)hWnd)->pGCRInfo;
|
||||
}
|
||||
#endif /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
#if defined(_MGRM_PROCESSES)
|
||||
static DEF_CONTEXT g_def_context;
|
||||
#endif
|
||||
|
||||
static ZORDERINFO* get_zorder_info (int cli)
|
||||
static inline ZORDERINFO* get_zorder_info (int cli)
|
||||
{
|
||||
#if defined (_MGRM_THREADS) || defined (_MGRM_STANDALONE)
|
||||
return __mg_zorder_info;
|
||||
@@ -697,7 +697,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
hdc = get_effective_dc (pWin, TRUE);
|
||||
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
pcrc = pWin->pGCRInfo->crgn.head;
|
||||
#else
|
||||
crcOne.next = crcOne.prev = NULL;
|
||||
crcOne.rc.left = pWin->pMainWin->left;
|
||||
@@ -770,7 +770,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
prgn = CreateClipRgn ();
|
||||
lock_zi_for_read (__mg_zorder_info);
|
||||
CopyRegion (prgn, &kernel_GetGCRgnInfo((HWND)pWin)->crgn);
|
||||
CopyRegion (prgn, &pWin->pGCRInfo->crgn);
|
||||
pcrc = prgn->head;
|
||||
unlock_zi_for_read (__mg_zorder_info);
|
||||
#else
|
||||
@@ -882,8 +882,8 @@ void __mg_lock_recalc_gcrinfo (PDC pdc)
|
||||
unsigned short idx;
|
||||
CLIPRGN invisible_rgn;
|
||||
|
||||
gcrinfo = kernel_GetGCRgnInfo (pdc->hwnd);
|
||||
mainwin = (PMAINWIN)(pdc->hwnd);
|
||||
gcrinfo = mainwin->pGCRInfo;
|
||||
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_lock (&pdc->pGCRInfo->lock);
|
||||
|
||||
@@ -1875,7 +1875,7 @@ static void dc_InitDC (PDC pdc, HWND hWnd, BOOL bIsClient)
|
||||
#else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
RECT minimal;
|
||||
|
||||
pdc->pGCRInfo = kernel_GetGCRgnInfo (hWnd);
|
||||
pdc->pGCRInfo = ((PMAINWIN)hWnd)->pGCRInfo;
|
||||
|
||||
LOCK_GCRINFO (pdc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user