diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-07-08 15:15:15 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-07-08 15:15:15 +1000 |
commit | 93da5a0578e7f16ea846eb257f36a24e316ef8d4 (patch) | |
tree | b0e08e991919fdb1fa9079b0ea40c23909cbcd3e /src/gwin | |
parent | 215f31ee3dd27f461540384cdba04b58b481fadc (diff) | |
download | uGFX-93da5a0578e7f16ea846eb257f36a24e316ef8d4.tar.gz uGFX-93da5a0578e7f16ea846eb257f36a24e316ef8d4.tar.bz2 uGFX-93da5a0578e7f16ea846eb257f36a24e316ef8d4.zip |
gDelayNone/gDelayForever to replace TIME_IMMEDIATE/TIME_INFINITE
Diffstat (limited to 'src/gwin')
-rw-r--r-- | src/gwin/gwin_image.c | 4 | ||||
-rw-r--r-- | src/gwin/gwin_wm.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gwin/gwin_image.c b/src/gwin/gwin_image.c index d19c4d30..c40ecc81 100644 --- a/src/gwin/gwin_image.c +++ b/src/gwin/gwin_image.c @@ -99,10 +99,10 @@ static void ImageRedraw(GHandle gh) { // Wait for that delay if required switch(delay) { - case TIME_INFINITE: + case gDelayForever: // Everything is done break; - case TIME_IMMEDIATE: + case gDelayNone: // We can't allow a continuous loop here as it would lock the system up so we delay for the minimum period delay = 1; // Fall through diff --git a/src/gwin/gwin_wm.c b/src/gwin/gwin_wm.c index 2c9f25d9..6d48cd36 100644 --- a/src/gwin/gwin_wm.c +++ b/src/gwin/gwin_wm.c @@ -190,7 +190,7 @@ void _gwmInit(void) #endif #if !GWIN_REDRAW_IMMEDIATE gtimerInit(&RedrawTimer); - gtimerStart(&RedrawTimer, RedrawTimerFn, 0, gTrue, TIME_INFINITE); + gtimerStart(&RedrawTimer, RedrawTimerFn, 0, gTrue, gDelayForever); #endif _GWINwm = (GWindowManager *)&GNullWindowManager; _GWINwm->vmt->Init(); @@ -231,8 +231,8 @@ void _gwinFlushRedraws(GRedrawMethod how) { // Obtain the drawing lock if (how == REDRAW_WAIT) - gfxSemWait(&gwinsem, TIME_INFINITE); - else if (how == REDRAW_NOWAIT && !gfxSemWait(&gwinsem, TIME_IMMEDIATE)) + gfxSemWait(&gwinsem, gDelayForever); + else if (how == REDRAW_NOWAIT && !gfxSemWait(&gwinsem, gDelayNone)) // Someone is drawing - They will do the redraw when they are finished return; @@ -373,7 +373,7 @@ gBool _gwinDrawStart(GHandle gh) { return gFalse; // Obtain the drawing lock - gfxSemWait(&gwinsem, TIME_INFINITE); + gfxSemWait(&gwinsem, gDelayForever); // Re-test visibility as we may have waited a while if (!(gh->flags & GWIN_FLG_SYSVISIBLE)) { @@ -742,7 +742,7 @@ static gBool WM_Add(GHandle gh, const GWindowInit *pInit) { static void WM_Delete(GHandle gh) { // Remove it from the window list - gfxSemWait(&gwinsem, TIME_INFINITE); + gfxSemWait(&gwinsem, gDelayForever); gfxQueueASyncRemove(&_GWINList, &gh->wmq); gfxSemSignal(&gwinsem); } @@ -986,7 +986,7 @@ static void WM_Raise(GHandle gh) { // Take it off the list and then put it back on top // The order of the list then reflects the z-order. - gfxSemWait(&gwinsem, TIME_INFINITE); + gfxSemWait(&gwinsem, gDelayForever); gfxQueueASyncRemove(&_GWINList, &gh->wmq); gfxQueueASyncPut(&_GWINList, &gh->wmq); |