窗口框架使用二叉树
This commit is contained in:
@@ -524,6 +524,8 @@ int WIN_Working(WIN_WindowStruct *win) {
|
||||
WIN_MsgStruct msg = {0};
|
||||
win->msgLoopEnter++;
|
||||
WIN_WindowStruct *winCurrent_old = WIN_GetWinStruct()->winCurrent;
|
||||
WIN_WindowStruct *prev;
|
||||
WIN_WindowStruct *next;
|
||||
WIN_GetWinStruct()->winCurrent = win;
|
||||
void *msgData = 0;
|
||||
while (QUEUE_Out(&win->winMsgQueue, &msg)) {
|
||||
@@ -541,25 +543,27 @@ int WIN_Working(WIN_WindowStruct *win) {
|
||||
continue;
|
||||
|
||||
// ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>λ<EFBFBD>õ<EFBFBD><C3B5>Ӵ<EFBFBD><D3B4><EFBFBD>ҲҪ<D2B2>ػ<EFBFBD>
|
||||
prev = WIN_GetLastChidWin(win);
|
||||
for (int i = win->chidWinNum; i > 0; i--) {
|
||||
// <20>ж<EFBFBD><D0B6><EFBFBD>Щ<EFBFBD><D0A9><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڵ<EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
RECT_Struct ret = {0};
|
||||
RECT_Struct r1 = {0};
|
||||
r1.x = win->chidWin[i - 1]->x;
|
||||
r1.y = win->chidWin[i - 1]->y;
|
||||
r1.x_size = win->chidWin[i - 1]->x_size;
|
||||
r1.y_size = win->chidWin[i - 1]->y_size;
|
||||
r1.x = prev->x;
|
||||
r1.y = prev->y;
|
||||
r1.x_size = prev->x_size;
|
||||
r1.y_size = prev->y_size;
|
||||
if (POS_RectIntersection(&ret, &r1, &r)) {
|
||||
ret.x -= win->chidWin[i - 1]->x;
|
||||
ret.y -= win->chidWin[i - 1]->y; // <20><>ȥ<EFBFBD><C8A5><EFBFBD>ڶ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD>꣬2020.2.26
|
||||
WIN_SetInvalidRect(win->chidWin[i - 1], ret.x, ret.y, ret.x_size,
|
||||
ret.x -= prev->x;
|
||||
ret.y -= prev->y; // <20><>ȥ<EFBFBD><C8A5><EFBFBD>ڶ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD>꣬2020.2.26
|
||||
WIN_SetInvalidRect(prev, ret.x, ret.y, ret.x_size,
|
||||
ret.y_size);
|
||||
if (POS_RectSub(&r, &r, &r1) == 0) {
|
||||
// <20>ػ<EFBFBD><D8BB><EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ػ<EFBFBD>
|
||||
break;
|
||||
}
|
||||
}
|
||||
prev = prev->prev;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ػ<EFBFBD>
|
||||
@@ -604,7 +608,7 @@ int WIN_Working(WIN_WindowStruct *win) {
|
||||
// <20>ѵ<EFBFBD><D1B5><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>
|
||||
case MOVE_DATA_TOUCHIN:
|
||||
if (win->baseWin) {
|
||||
if (win != win->baseWin->chidWin[win->baseWin->chidWinNum - 1]) {
|
||||
if (win != win->baseWin->chid->prev) {
|
||||
// <20><><EFBFBD>Ƕ<EFBFBD><C7B6>˴<EFBFBD><CBB4>ڣ<EFBFBD><DAA3>ػ<EFBFBD><D8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (WIN_SetChidWinTop(win->baseWin, win) == 0)
|
||||
WIN_SetInvalid(win);
|
||||
@@ -630,8 +634,10 @@ int WIN_Working(WIN_WindowStruct *win) {
|
||||
} // while (QUEUE_Out (&win->winMsgQueue,&msg))
|
||||
|
||||
// Ȼ<><C8BB><EFBFBD>Ӵ<EFBFBD><D3B4>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
for (int i = 0; i < win->chidWinNum; i++) {
|
||||
run |= WIN_Working(win->chidWin[i]);
|
||||
next = win->chid;
|
||||
while(next) {
|
||||
run |= WIN_Working(next);
|
||||
next = next->next;
|
||||
}
|
||||
|
||||
WIN_GetWinStruct()->winCurrent = winCurrent_old;
|
||||
|
Reference in New Issue
Block a user